Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_texteditor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorTom Needham <tom@owncloud.com>2015-06-01 13:48:10 +0300
committerTom Needham <tom@owncloud.com>2015-06-01 13:48:10 +0300
commita4827175ae19635316e6694b76631047bb1925ff (patch)
tree8987073e145eb1e3c89280cfe64d1bdf585e139e /js
parentb62057add61ae69c771eb8997417401d2aec0e95 (diff)
Update ACE to 26.04.15
Diffstat (limited to 'js')
-rw-r--r--js/vendor/.DS_Storebin0 -> 6148 bytes
-rw-r--r--js/vendor/ace/.DS_Storebin0 -> 6148 bytes
-rw-r--r--js/vendor/ace/src-noconflict/.DS_Storebin0 -> 6148 bytes
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ace.js17781
-rwxr-xr-xjs/vendor/ace/src-noconflict/ext-beautify.js334
-rwxr-xr-xjs/vendor/ace/src-noconflict/ext-chromevox.js541
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-elastic_tabstops_lite.js40
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-emmet.js872
-rwxr-xr-xjs/vendor/ace/src-noconflict/ext-error_marker.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-keybinding_menu.js145
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-language_tools.js1541
-rwxr-xr-xjs/vendor/ace/src-noconflict/ext-linking.js52
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-modelist.js83
-rwxr-xr-xjs/vendor/ace/src-noconflict/ext-old_ie.js494
-rw-r--r--js/vendor/ace/src-noconflict/ext-options.js252
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-searchbox.js89
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-settings_menu.js599
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-spellcheck.js12
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-split.js49
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-static_highlight.js137
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-statusbar.js14
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-textarea.js354
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-themelist.js138
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/ext-whitespace.js75
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/keybinding-emacs.js1345
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/keybinding-vim.js6888
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-abap.js138
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-abc.js260
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-actionscript.js186
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-ada.js84
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-apache_conf.js355
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-applescript.js271
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-asciidoc.js108
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-assembly_x86.js84
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-autohotkey.js186
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-batchfile.js189
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-c9search.js261
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-c_cpp.js704
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-cirru.js202
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-clojure.js191
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-cobol.js84
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-coffee.js217
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-coldfusion.js2904
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-csharp.js731
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-css.js756
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-curly.js2126
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-d.js754
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-dart.js773
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-diff.js212
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-django.js2238
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-dockerfile.js803
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-dot.js314
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-eiffel.js128
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-ejs.js2451
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-elixir.js493
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-elm.js293
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-erlang.js186
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-forth.js186
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-ftl.js996
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-gcode.js85
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-gherkin.js129
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-gitignore.js51
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-glsl.js759
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-golang.js628
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-groovy.js794
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-haml.js433
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-handlebars.js2551
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-haskell.js190
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-haxe.js605
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-html.js2068
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-html_ruby.js2438
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-ini.js251
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-io.js246
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-jack.js696
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-jade.js1488
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-java.js798
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-javascript.js771
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-json.js584
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-jsoniq.js2932
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-jsp.js1236
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-jsx.js605
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-julia.js198
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-latex.js114
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-lean.js281
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-less.js718
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-liquid.js928
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-lisp.js83
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-live_script.js481
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-livescript.js96
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-logiql.js585
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-lsl.js858
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-lua.js304
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-luapage.js2295
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-lucene.js39
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-makefile.js301
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-markdown.js2218
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-mask.js1983
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-matlab.js169
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-mavens_mate_log.js211
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-mel.js613
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-mips_assembler.js235
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-mipsassembler.js196
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-mushcode.js200
-rw-r--r--js/vendor/ace/src-noconflict/mode-mushcode_high_rules.js569
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-mysql.js136
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-nix.js993
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-objectivec.js629
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-ocaml.js174
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-pascal.js100
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-perl.js262
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-pgsql.js1666
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-php.js3405
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-plain_text.js51
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-powershell.js552
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-praat.js463
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-prolog.js192
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-properties.js71
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-protobuf.js940
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-python.js200
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-r.js224
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-rdoc.js147
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-rhtml.js2295
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-ruby.js619
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-rust.js255
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-sass.js180
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-scad.js663
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-scala.js796
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-scheme.js85
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-scss.js718
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-sh.js759
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-sjs.js1242
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-smarty.js2561
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-snippets.js184
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-soy_template.js2775
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-space.js159
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-sql.js102
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-sqlserver.js437
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-stylus.js363
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-svg.js1842
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-tcl.js248
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-tex.js88
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-text.js1
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-textile.js113
-rw-r--r--js/vendor/ace/src-noconflict/mode-tmsnippet.js200
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-toml.js143
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-twig.js2385
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-typescript.js831
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-vala.js1026
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-vbscript.js193
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-velocity.js3258
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-verilog.js85
-rwxr-xr-xjs/vendor/ace/src-noconflict/mode-vhdl.js110
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-xml.js1004
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-xquery.js1532
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/mode-yaml.js147
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/abap.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/abc.js38
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/actionscript.js9
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/ada.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/apache_conf.js7
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/applescript.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/asciidoc.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/assembly_x86.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/autohotkey.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/batchfile.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/c9search.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/c_cpp.js4
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/cirru.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/clojure.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/cobol.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/coffee.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/coldfusion.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/csharp.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/css.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/curly.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/d.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/dart.js19
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/diff.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/django.js4
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/dockerfile.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/dot.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/eiffel.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/ejs.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/elixir.js7
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/elm.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/erlang.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/forth.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/ftl.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/gcode.js7
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/gherkin.js7
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/gitignore.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/glsl.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/golang.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/groovy.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/haml.js4
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/handlebars.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/haskell.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/haxe.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/html.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/html_ruby.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/ini.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/io.js69
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/jack.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/jade.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/java.js10
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/javascript.js21
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/json.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/jsoniq.js67
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/jsp.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/jsx.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/julia.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/latex.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/lean.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/less.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/liquid.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/lisp.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/live_script.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/livescript.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/logiql.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/lsl.js1177
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/lua.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/luapage.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/lucene.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/makefile.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/markdown.js15
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/mask.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/matlab.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/mel.js7
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/mips_assembler.js7
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/mipsassembler.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/mushcode.js6
-rw-r--r--js/vendor/ace/src-noconflict/snippets/mushcode_high_rules.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/mysql.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/nix.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/objectivec.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/ocaml.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/pascal.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/perl.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/pgsql.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/php.js121
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/plain_text.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/powershell.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/praat.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/prolog.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/properties.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/protobuf.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/python.js10
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/r.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/rdoc.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/rhtml.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/ruby.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/rust.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/sass.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/scad.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/scala.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/scheme.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/scss.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/sh.js4
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/sjs.js7
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/smarty.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/snippets.js4
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/soy_template.js7
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/space.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/sql.js4
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/sqlserver.js76
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/stylus.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/svg.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/tcl.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/tex.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/text.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/textile.js4
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/toml.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/twig.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/typescript.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/vala.js193
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/vbscript.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/velocity.js35
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/verilog.js6
-rwxr-xr-xjs/vendor/ace/src-noconflict/snippets/vhdl.js7
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/xml.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/xquery.js67
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/snippets/yaml.js6
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-ambiance.js28
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-chaos.js27
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-chrome.js39
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-clouds.js38
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-clouds_midnight.js44
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-cobalt.js63
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-crimson_editor.js38
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-dawn.js48
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-dreamweaver.js42
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-eclipse.js42
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-github.js49
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-idle_fingers.js42
-rwxr-xr-xjs/vendor/ace/src-noconflict/theme-iplastic.js121
-rwxr-xr-xjs/vendor/ace/src-noconflict/theme-katzenmilch.js122
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-kr_theme.js (renamed from js/vendor/ace/src-noconflict/theme-kr.js)47
-rwxr-xr-xjs/vendor/ace/src-noconflict/theme-kuroir.js62
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-merbivore.js40
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-merbivore_soft.js40
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-mono_industrial.js40
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-monokai.js40
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-pastel_on_dark.js40
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-solarized_dark.js46
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-solarized_light.js42
-rwxr-xr-xjs/vendor/ace/src-noconflict/theme-sqlserver.js141
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-terminal.js38
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-textmate.js41
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-tomorrow.js42
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-tomorrow_night.js43
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-tomorrow_night_blue.js45
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-tomorrow_night_bright.js58
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-tomorrow_night_eighties.js46
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-twilight.js42
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-vibrant_ink.js40
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/theme-xcode.js40
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/worker-coffee.js5375
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/worker-css.js4771
-rwxr-xr-xjs/vendor/ace/src-noconflict/worker-html.js11531
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/worker-javascript.js18957
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/worker-json.js2409
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/worker-lua.js2411
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/worker-php.js2484
-rwxr-xr-xjs/vendor/ace/src-noconflict/worker-xml.js3813
-rwxr-xr-x[-rw-r--r--]js/vendor/ace/src-noconflict/worker-xquery.js31919
325 files changed, 148171 insertions, 63121 deletions
diff --git a/js/vendor/.DS_Store b/js/vendor/.DS_Store
new file mode 100644
index 0000000..b1f0ff4
--- /dev/null
+++ b/js/vendor/.DS_Store
Binary files differ
diff --git a/js/vendor/ace/.DS_Store b/js/vendor/ace/.DS_Store
new file mode 100644
index 0000000..d1810b8
--- /dev/null
+++ b/js/vendor/ace/.DS_Store
Binary files differ
diff --git a/js/vendor/ace/src-noconflict/.DS_Store b/js/vendor/ace/src-noconflict/.DS_Store
new file mode 100644
index 0000000..5008ddf
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/.DS_Store
Binary files differ
diff --git a/js/vendor/ace/src-noconflict/ace.js b/js/vendor/ace/src-noconflict/ace.js
index a1beaab..c371da7 100644..100755
--- a/js/vendor/ace/src-noconflict/ace.js
+++ b/js/vendor/ace/src-noconflict/ace.js
@@ -3,7 +3,7 @@
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
@@ -14,7 +14,7 @@
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -28,76 +28,81 @@
*
* ***** END LICENSE BLOCK ***** */
+/**
+ * Define a module along with a payload
+ * @param module a name for the payload
+ * @param payload a function to call with (require, exports, module) params
+ */
+
(function() {
var ACE_NAMESPACE = "ace";
-var global = (function() {
- return this;
-})();
+var global = (function() { return this; })();
+if (!global && typeof window != "undefined") global = window; // strict mode
if (!ACE_NAMESPACE && typeof requirejs !== "undefined")
return;
-var _define = function(module, deps, payload) {
- if (typeof module !== 'string') {
- if (_define.original)
- _define.original.apply(window, arguments);
+var define = function(module, deps, payload) {
+ if (typeof module !== "string") {
+ if (define.original)
+ define.original.apply(this, arguments);
else {
- console.error('dropping module because define wasn\'t a string.');
+ console.error("dropping module because define wasn\'t a string.");
console.trace();
}
return;
}
-
if (arguments.length == 2)
payload = deps;
-
- if (!_define.modules) {
- _define.modules = {};
- _define.payloads = {};
+ if (!define.modules[module]) {
+ define.payloads[module] = payload;
+ define.modules[module] = null;
}
-
- _define.payloads[module] = payload;
- _define.modules[module] = null;
};
+
+define.modules = {};
+define.payloads = {};
+
+/**
+ * Get at functionality ace.define()ed using the function above
+ */
var _require = function(parentId, module, callback) {
- if (Object.prototype.toString.call(module) === "[object Array]") {
+ if (typeof module === "string") {
+ var payload = lookup(parentId, module);
+ if (payload != undefined) {
+ callback && callback();
+ return payload;
+ }
+ } else if (Object.prototype.toString.call(module) === "[object Array]") {
var params = [];
for (var i = 0, l = module.length; i < l; ++i) {
var dep = lookup(parentId, module[i]);
- if (!dep && _require.original)
- return _require.original.apply(window, arguments);
+ if (dep == undefined && require.original)
+ return;
params.push(dep);
}
- if (callback) {
- callback.apply(null, params);
- }
+ return callback && callback.apply(null, params) || true;
}
- else if (typeof module === 'string') {
- var payload = lookup(parentId, module);
- if (!payload && _require.original)
- return _require.original.apply(window, arguments);
-
- if (callback) {
- callback();
- }
+};
- return payload;
- }
- else {
- if (_require.original)
- return _require.original.apply(window, arguments);
- }
+var require = function(module, callback) {
+ var packagedModule = _require("", module, callback);
+ if (packagedModule == undefined && require.original)
+ return require.original.apply(this, arguments);
+ return packagedModule;
};
var normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
if (moduleName.indexOf("!") !== -1) {
var chunks = moduleName.split("!");
return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
}
+ // normalize relative requires
if (moduleName.charAt(0) == ".") {
var base = parentId.split("/").slice(0, -1).join("/");
moduleName = base + "/" + moduleName;
@@ -107,16 +112,19 @@ var normalizeModule = function(parentId, moduleName) {
moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
-
return moduleName;
};
-var lookup = function(parentId, moduleName) {
+/**
+ * Internal function to lookup moduleNames and resolve them by calling the
+ * definition function if needed.
+ */
+var lookup = function(parentId, moduleName) {
moduleName = normalizeModule(parentId, moduleName);
- var module = _define.modules[moduleName];
+ var module = define.modules[moduleName];
if (!module) {
- module = _define.payloads[moduleName];
+ module = define.payloads[moduleName];
if (typeof module === 'function') {
var exports = {};
var mod = {
@@ -132,19 +140,15 @@ var lookup = function(parentId, moduleName) {
var returnValue = module(req, exports, mod);
exports = returnValue || mod.exports;
- _define.modules[moduleName] = exports;
- delete _define.payloads[moduleName];
+ define.modules[moduleName] = exports;
+ delete define.payloads[moduleName];
}
- module = _define.modules[moduleName] = exports || module;
+ module = define.modules[moduleName] = exports || module;
}
return module;
};
function exportAce(ns) {
- var require = function(module, callback) {
- return _require("", module, callback);
- };
-
var root = global;
if (ns) {
if (!global[ns])
@@ -153,13 +157,13 @@ function exportAce(ns) {
}
if (!root.define || !root.define.packaged) {
- _define.original = root.define;
- root.define = _define;
+ define.original = root.define;
+ root.define = define;
root.define.packaged = true;
}
if (!root.require || !root.require.packaged) {
- _require.original = root.require;
+ require.original = root.require;
root.require = require;
root.require.packaged = true;
}
@@ -169,75 +173,8 @@ exportAce(ACE_NAMESPACE);
})();
-ace.define('ace/ace', ['require', 'exports', 'module' , 'ace/lib/fixoldbrowsers', 'ace/lib/dom', 'ace/lib/event', 'ace/editor', 'ace/edit_session', 'ace/undomanager', 'ace/virtual_renderer', 'ace/multi_select', 'ace/worker/worker_client', 'ace/keyboard/hash_handler', 'ace/placeholder', 'ace/mode/folding/fold_mode', 'ace/theme/textmate', 'ace/config'], function(require, exports, module) {
-
-
-require("./lib/fixoldbrowsers");
-
-var dom = require("./lib/dom");
-var event = require("./lib/event");
-
-var Editor = require("./editor").Editor;
-var EditSession = require("./edit_session").EditSession;
-var UndoManager = require("./undomanager").UndoManager;
-var Renderer = require("./virtual_renderer").VirtualRenderer;
-var MultiSelect = require("./multi_select").MultiSelect;
-require("./worker/worker_client");
-require("./keyboard/hash_handler");
-require("./placeholder");
-require("./mode/folding/fold_mode");
-require("./theme/textmate");
-
-exports.config = require("./config");
-exports.require = require;
-exports.edit = function(el) {
- if (typeof(el) == "string") {
- var _id = el;
- var el = document.getElementById(_id);
- if (!el)
- throw "ace.edit can't find div #" + _id;
- }
-
- if (el.env && el.env.editor instanceof Editor)
- return el.env.editor;
-
- var doc = exports.createEditSession(dom.getInnerText(el));
- el.innerHTML = '';
-
- var editor = new Editor(new Renderer(el));
- new MultiSelect(editor);
- editor.setSession(doc);
-
- var env = {
- document: doc,
- editor: editor,
- onResize: editor.resize.bind(editor, null)
- };
- event.addListener(window, "resize", env.onResize);
- editor.on("destroy", function() {
- event.removeListener(window, "resize", env.onResize);
- });
- el.env = editor.env = env;
- return editor;
-};
-exports.createEditSession = function(text, mode) {
- var doc = new EditSession(text, mode);
- doc.setUndoManager(new UndoManager());
- return doc;
-}
-exports.EditSession = EditSession;
-exports.UndoManager = UndoManager;
-});
-
-ace.define('ace/lib/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/regexp', 'ace/lib/es5-shim'], function(require, exports, module) {
-
-
-require("./regexp");
-require("./es5-shim");
-
-});
-
-ace.define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/lib/regexp",["require","exports","module"], function(require, exports, module) {
+"use strict";
var real = {
exec: RegExp.prototype.exec,
@@ -309,7 +246,7 @@ ace.define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require
});
-ace.define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
function Empty() {}
@@ -1006,11 +943,16 @@ var toObject = function (o) {
});
-ace.define('ace/lib/dom', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"], function(require, exports, module) {
+"use strict";
+require("./regexp");
+require("./es5-shim");
-if (typeof document == "undefined")
- return;
+});
+
+ace.define("ace/lib/dom",["require","exports","module"], function(require, exports, module) {
+"use strict";
var XHTML_NS = "http://www.w3.org/1999/xhtml";
@@ -1027,7 +969,7 @@ exports.createElement = function(tag, ns) {
};
exports.hasCssClass = function(el, name) {
- var classes = el.className.split(/\s+/g);
+ var classes = (el.className || "").split(/\s+/g);
return classes.indexOf(name) !== -1;
};
exports.addCssClass = function(el, name) {
@@ -1139,6 +1081,10 @@ exports.getInnerHeight = function(element) {
);
};
+
+if (typeof document == "undefined")
+ return;
+
if (window.pageYOffset !== undefined) {
exports.getPageScrollTop = function() {
return window.pageYOffset;
@@ -1239,12 +1185,201 @@ exports.getParentWindow = function(document) {
});
-ace.define('ace/lib/event', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/useragent', 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"], function(require, exports, module) {
+"use strict";
+
+require("./fixoldbrowsers");
+
+var oop = require("./oop");
+var Keys = (function() {
+ var ret = {
+ MODIFIER_KEYS: {
+ 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta'
+ },
+
+ KEY_MODS: {
+ "ctrl": 1, "alt": 2, "option" : 2, "shift": 4,
+ "super": 8, "meta": 8, "command": 8, "cmd": 8
+ },
+
+ FUNCTION_KEYS : {
+ 8 : "Backspace",
+ 9 : "Tab",
+ 13 : "Return",
+ 19 : "Pause",
+ 27 : "Esc",
+ 32 : "Space",
+ 33 : "PageUp",
+ 34 : "PageDown",
+ 35 : "End",
+ 36 : "Home",
+ 37 : "Left",
+ 38 : "Up",
+ 39 : "Right",
+ 40 : "Down",
+ 44 : "Print",
+ 45 : "Insert",
+ 46 : "Delete",
+ 96 : "Numpad0",
+ 97 : "Numpad1",
+ 98 : "Numpad2",
+ 99 : "Numpad3",
+ 100: "Numpad4",
+ 101: "Numpad5",
+ 102: "Numpad6",
+ 103: "Numpad7",
+ 104: "Numpad8",
+ 105: "Numpad9",
+ '-13': "NumpadEnter",
+ 112: "F1",
+ 113: "F2",
+ 114: "F3",
+ 115: "F4",
+ 116: "F5",
+ 117: "F6",
+ 118: "F7",
+ 119: "F8",
+ 120: "F9",
+ 121: "F10",
+ 122: "F11",
+ 123: "F12",
+ 144: "Numlock",
+ 145: "Scrolllock"
+ },
+
+ PRINTABLE_KEYS: {
+ 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5',
+ 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a',
+ 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h',
+ 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',
+ 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',
+ 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',
+ 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`',
+ 219: '[', 220: '\\',221: ']', 222: '\''
+ }
+ };
+ var name, i;
+ for (i in ret.FUNCTION_KEYS) {
+ name = ret.FUNCTION_KEYS[i].toLowerCase();
+ ret[name] = parseInt(i, 10);
+ }
+ for (i in ret.PRINTABLE_KEYS) {
+ name = ret.PRINTABLE_KEYS[i].toLowerCase();
+ ret[name] = parseInt(i, 10);
+ }
+ oop.mixin(ret, ret.MODIFIER_KEYS);
+ oop.mixin(ret, ret.PRINTABLE_KEYS);
+ oop.mixin(ret, ret.FUNCTION_KEYS);
+ ret.enter = ret["return"];
+ ret.escape = ret.esc;
+ ret.del = ret["delete"];
+ ret[173] = '-';
+
+ (function() {
+ var mods = ["cmd", "ctrl", "alt", "shift"];
+ for (var i = Math.pow(2, mods.length); i--;) {
+ ret.KEY_MODS[i] = mods.filter(function(x) {
+ return i & ret.KEY_MODS[x];
+ }).join("-") + "-";
+ }
+ })();
+
+ ret.KEY_MODS[0] = "";
+ ret.KEY_MODS[-1] = "input-";
+
+ return ret;
+})();
+oop.mixin(exports, Keys);
+
+exports.keyCodeToString = function(keyCode) {
+ var keyString = Keys[keyCode];
+ if (typeof keyString != "string")
+ keyString = String.fromCharCode(keyCode);
+ return keyString.toLowerCase();
+};
+
+});
+
+ace.define("ace/lib/useragent",["require","exports","module"], function(require, exports, module) {
+"use strict";
+exports.OS = {
+ LINUX: "LINUX",
+ MAC: "MAC",
+ WINDOWS: "WINDOWS"
+};
+exports.getOS = function() {
+ if (exports.isMac) {
+ return exports.OS.MAC;
+ } else if (exports.isLinux) {
+ return exports.OS.LINUX;
+ } else {
+ return exports.OS.WINDOWS;
+ }
+};
+if (typeof navigator != "object")
+ return;
+
+var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase();
+var ua = navigator.userAgent;
+exports.isWin = (os == "win");
+exports.isMac = (os == "mac");
+exports.isLinux = (os == "linux");
+exports.isIE =
+ (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0)
+ ? parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1])
+ : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]); // for ie
+
+exports.isOldIE = exports.isIE && exports.isIE < 9;
+exports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === "Gecko";
+exports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv\:(\d+)/)||[])[1], 10) < 4;
+exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]";
+exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined;
+exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined;
+
+exports.isAIR = ua.indexOf("AdobeAIR") >= 0;
+
+exports.isIPad = ua.indexOf("iPad") >= 0;
+
+exports.isTouchPad = ua.indexOf("TouchPad") >= 0;
+
+exports.isChromeOS = ua.indexOf(" CrOS ") >= 0;
+
+});
+
+ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
var keys = require("./keys");
var useragent = require("./useragent");
-var dom = require("./dom");
exports.addListener = function(elem, type, callback) {
if (elem.addEventListener) {
@@ -1252,7 +1387,7 @@ exports.addListener = function(elem, type, callback) {
}
if (elem.attachEvent) {
var wrapper = function() {
- callback(window.event);
+ callback.call(elem, window.event);
};
callback._wrapper = wrapper;
elem.attachEvent("on" + type, wrapper);
@@ -1289,7 +1424,7 @@ exports.preventDefault = function(e) {
exports.getButton = function(e) {
if (e.type == "dblclick")
return 0;
- if (e.type == "contextmenu" || (e.ctrlKey && useragent.isMac))
+ if (e.type == "contextmenu" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey)))
return 2;
if (e.preventDefault) {
return e.button;
@@ -1299,51 +1434,27 @@ exports.getButton = function(e) {
}
};
-if (document.documentElement.setCapture) {
- exports.capture = function(el, eventHandler, releaseCaptureHandler) {
- var called = false;
- function onReleaseCapture(e) {
- eventHandler(e);
-
- if (!called) {
- called = true;
- releaseCaptureHandler(e);
- }
-
- exports.removeListener(el, "mousemove", eventHandler);
- exports.removeListener(el, "mouseup", onReleaseCapture);
- exports.removeListener(el, "losecapture", onReleaseCapture);
-
- el.releaseCapture();
- }
-
- exports.addListener(el, "mousemove", eventHandler);
- exports.addListener(el, "mouseup", onReleaseCapture);
- exports.addListener(el, "losecapture", onReleaseCapture);
- el.setCapture();
- };
-}
-else {
- exports.capture = function(el, eventHandler, releaseCaptureHandler) {
- function onMouseUp(e) {
- eventHandler && eventHandler(e);
- releaseCaptureHandler && releaseCaptureHandler(e);
-
- document.removeEventListener("mousemove", eventHandler, true);
- document.removeEventListener("mouseup", onMouseUp, true);
+exports.capture = function(el, eventHandler, releaseCaptureHandler) {
+ function onMouseUp(e) {
+ eventHandler && eventHandler(e);
+ releaseCaptureHandler && releaseCaptureHandler(e);
- e.stopPropagation();
- }
+ exports.removeListener(document, "mousemove", eventHandler, true);
+ exports.removeListener(document, "mouseup", onMouseUp, true);
+ exports.removeListener(document, "dragstart", onMouseUp, true);
+ }
- document.addEventListener("mousemove", eventHandler, true);
- document.addEventListener("mouseup", onMouseUp, true);
- };
-}
+ exports.addListener(document, "mousemove", eventHandler, true);
+ exports.addListener(document, "mouseup", onMouseUp, true);
+ exports.addListener(document, "dragstart", onMouseUp, true);
+
+ return onMouseUp;
+};
exports.addMouseWheelListener = function(el, callback) {
if ("onmousewheel" in el) {
- var factor = 8;
exports.addListener(el, "mousewheel", function(e) {
+ var factor = 8;
if (e.wheelDeltaX !== undefined) {
e.wheelX = -e.wheelDeltaX / factor;
e.wheelY = -e.wheelDeltaY / factor;
@@ -1355,8 +1466,19 @@ exports.addMouseWheelListener = function(el, callback) {
});
} else if ("onwheel" in el) {
exports.addListener(el, "wheel", function(e) {
- e.wheelX = (e.deltaX || 0) * 5;
- e.wheelY = (e.deltaY || 0) * 5;
+ var factor = 0.35;
+ switch (e.deltaMode) {
+ case e.DOM_DELTA_PIXEL:
+ e.wheelX = e.deltaX * factor || 0;
+ e.wheelY = e.deltaY * factor || 0;
+ break;
+ case e.DOM_DELTA_LINE:
+ case e.DOM_DELTA_PAGE:
+ e.wheelX = (e.deltaX || 0) * 5;
+ e.wheelY = (e.deltaY || 0) * 5;
+ break;
+ }
+
callback(e);
});
} else {
@@ -1375,7 +1497,7 @@ exports.addMouseWheelListener = function(el, callback) {
exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbackName) {
var clicks = 0;
- var startX, startY, timer;
+ var startX, startY, timer;
var eventNames = {
2: "dblclick",
3: "tripleclick",
@@ -1383,24 +1505,30 @@ exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbac
};
exports.addListener(el, "mousedown", function(e) {
- if (exports.getButton(e) != 0) {
+ if (exports.getButton(e) !== 0) {
clicks = 0;
+ } else if (e.detail > 1) {
+ clicks++;
+ if (clicks > 4)
+ clicks = 1;
} else {
+ clicks = 1;
+ }
+ if (useragent.isIE) {
var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;
-
if (!timer || isNewClick)
- clicks = 0;
-
- clicks += 1;
-
+ clicks = 1;
if (timer)
- clearTimeout(timer)
+ clearTimeout(timer);
timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600);
+
+ if (clicks == 1) {
+ startX = e.clientX;
+ startY = e.clientY;
+ }
}
- if (clicks == 1) {
- startX = e.clientX;
- startY = e.clientY;
- }
+
+ e._clicks = clicks;
eventHandler[callbackName]("mousedown", e);
@@ -1422,74 +1550,71 @@ exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbac
}
};
-function normalizeCommandKeys(callback, e, keyCode) {
- var hashId = 0;
- if ((useragent.isOpera && !("KeyboardEvent" in window)) && useragent.isMac) {
- hashId = 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0)
- | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);
- } else {
- hashId = 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0)
- | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);
+var getModifierHash = useragent.isMac && useragent.isOpera && !("KeyboardEvent" in window)
+ ? function(e) {
+ return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);
}
+ : function(e) {
+ return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);
+ };
+
+exports.getModifierString = function(e) {
+ return keys.KEY_MODS[getModifierHash(e)];
+};
+
+function normalizeCommandKeys(callback, e, keyCode) {
+ var hashId = getModifierHash(e);
if (!useragent.isMac && pressedKeys) {
if (pressedKeys[91] || pressedKeys[92])
hashId |= 8;
if (pressedKeys.altGr) {
if ((3 & hashId) != 3)
- pressedKeys.altGr = 0
+ pressedKeys.altGr = 0;
else
return;
}
- if (keyCode == 18 || keyCode == 17) {
- var location = e.location || e.keyLocation;
- if (keyCode == 17 && location == 1) {
- ts = e.timeStamp;
- } else if (keyCode == 18 && hashId == 3 && location == 2) {
- var dt = -ts;
- ts = e.timeStamp;
- dt += ts;
- if (dt < 3)
+ if (keyCode === 18 || keyCode === 17) {
+ var location = "location" in e ? e.location : e.keyLocation;
+ if (keyCode === 17 && location === 1) {
+ if (pressedKeys[keyCode] == 1)
+ ts = e.timeStamp;
+ } else if (keyCode === 18 && hashId === 3 && location === 2) {
+ var dt = e.timeStamp - ts;
+ if (dt < 50)
pressedKeys.altGr = true;
}
}
}
if (keyCode in keys.MODIFIER_KEYS) {
- switch (keys.MODIFIER_KEYS[keyCode]) {
- case "Alt":
- hashId = 2;
- break;
- case "Shift":
- hashId = 4;
- break;
- case "Ctrl":
- hashId = 1;
- break;
- default:
- hashId = 8;
- break;
- }
- keyCode = 0;
+ keyCode = -1;
}
- if (hashId & 8 && (keyCode == 91 || keyCode == 93)) {
- keyCode = 0;
+ if (hashId & 8 && (keyCode === 91 || keyCode === 93)) {
+ keyCode = -1;
}
- if (!hashId && keyCode == 13) {
- if (e.keyLocation || e.location == 3) {
- callback(e, hashId, -keyCode)
+ if (!hashId && keyCode === 13) {
+ var location = "location" in e ? e.location : e.keyLocation;
+ if (location === 3) {
+ callback(e, hashId, -keyCode);
if (e.defaultPrevented)
return;
}
}
+
+ if (useragent.isChromeOS && hashId & 8) {
+ callback(e, hashId, keyCode);
+ if (e.defaultPrevented)
+ return;
+ else
+ hashId &= ~8;
+ }
if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) {
return false;
}
-
-
return callback(e, hashId, keyCode);
}
@@ -1509,7 +1634,7 @@ exports.addCommandKeyListener = function(el, callback) {
var lastDefaultPrevented = null;
addListener(el, "keydown", function(e) {
- pressedKeys[e.keyCode] = true;
+ pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1;
var result = normalizeCommandKeys(callback, e, e.keyCode);
lastDefaultPrevented = e.defaultPrevented;
return result;
@@ -1566,1749 +1691,13 @@ else
};
});
-ace.define('ace/lib/keys', ['require', 'exports', 'module' , 'ace/lib/oop'], function(require, exports, module) {
-
-
-var oop = require("./oop");
-var Keys = (function() {
- var ret = {
- MODIFIER_KEYS: {
- 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta'
- },
-
- KEY_MODS: {
- "ctrl": 1, "alt": 2, "option" : 2,
- "shift": 4, "meta": 8, "command": 8, "cmd": 8
- },
-
- FUNCTION_KEYS : {
- 8 : "Backspace",
- 9 : "Tab",
- 13 : "Return",
- 19 : "Pause",
- 27 : "Esc",
- 32 : "Space",
- 33 : "PageUp",
- 34 : "PageDown",
- 35 : "End",
- 36 : "Home",
- 37 : "Left",
- 38 : "Up",
- 39 : "Right",
- 40 : "Down",
- 44 : "Print",
- 45 : "Insert",
- 46 : "Delete",
- 96 : "Numpad0",
- 97 : "Numpad1",
- 98 : "Numpad2",
- 99 : "Numpad3",
- 100: "Numpad4",
- 101: "Numpad5",
- 102: "Numpad6",
- 103: "Numpad7",
- 104: "Numpad8",
- 105: "Numpad9",
- '-13': "NumpadEnter",
- 112: "F1",
- 113: "F2",
- 114: "F3",
- 115: "F4",
- 116: "F5",
- 117: "F6",
- 118: "F7",
- 119: "F8",
- 120: "F9",
- 121: "F10",
- 122: "F11",
- 123: "F12",
- 144: "Numlock",
- 145: "Scrolllock"
- },
-
- PRINTABLE_KEYS: {
- 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5',
- 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a',
- 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h',
- 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',
- 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',
- 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',
- 188: ',', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\',
- 221: ']', 222: '\''
- }
- };
- for (var i in ret.FUNCTION_KEYS) {
- var name = ret.FUNCTION_KEYS[i].toLowerCase();
- ret[name] = parseInt(i, 10);
- }
- oop.mixin(ret, ret.MODIFIER_KEYS);
- oop.mixin(ret, ret.PRINTABLE_KEYS);
- oop.mixin(ret, ret.FUNCTION_KEYS);
- ret.enter = ret["return"];
- ret.escape = ret.esc;
- ret.del = ret["delete"];
- ret[173] = '-';
-
- return ret;
-})();
-oop.mixin(exports, Keys);
-
-exports.keyCodeToString = function(keyCode) {
- return (Keys[keyCode] || String.fromCharCode(keyCode)).toLowerCase();
-}
-
-});
-
-ace.define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-exports.inherits = (function() {
- var tempCtor = function() {};
- return function(ctor, superCtor) {
- tempCtor.prototype = superCtor.prototype;
- ctor.super_ = superCtor.prototype;
- ctor.prototype = new tempCtor();
- ctor.prototype.constructor = ctor;
- };
-}());
-
-exports.mixin = function(obj, mixin) {
- for (var key in mixin) {
- obj[key] = mixin[key];
- }
- return obj;
-};
-
-exports.implement = function(proto, mixin) {
- exports.mixin(proto, mixin);
-};
-
-});
-
-ace.define('ace/lib/useragent', ['require', 'exports', 'module' ], function(require, exports, module) {
-exports.OS = {
- LINUX: "LINUX",
- MAC: "MAC",
- WINDOWS: "WINDOWS"
-};
-exports.getOS = function() {
- if (exports.isMac) {
- return exports.OS.MAC;
- } else if (exports.isLinux) {
- return exports.OS.LINUX;
- } else {
- return exports.OS.WINDOWS;
- }
-};
-if (typeof navigator != "object")
- return;
-
-var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase();
-var ua = navigator.userAgent;
-exports.isWin = (os == "win");
-exports.isMac = (os == "mac");
-exports.isLinux = (os == "linux");
-exports.isIE =
- (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0)
- && parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]);
-
-exports.isOldIE = exports.isIE && exports.isIE < 9;
-exports.isGecko = exports.isMozilla = window.controllers && window.navigator.product === "Gecko";
-exports.isOldGecko = exports.isGecko && parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1], 10) < 4;
-exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]";
-exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined;
-
-exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined;
-
-exports.isAIR = ua.indexOf("AdobeAIR") >= 0;
-
-exports.isIPad = ua.indexOf("iPad") >= 0;
-
-exports.isTouchPad = ua.indexOf("TouchPad") >= 0;
-
-});
-
-ace.define('ace/editor', ['require', 'exports', 'module' , 'ace/lib/fixoldbrowsers', 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/lang', 'ace/lib/useragent', 'ace/keyboard/textinput', 'ace/mouse/mouse_handler', 'ace/mouse/fold_handler', 'ace/keyboard/keybinding', 'ace/edit_session', 'ace/search', 'ace/range', 'ace/lib/event_emitter', 'ace/commands/command_manager', 'ace/commands/default_commands', 'ace/config'], function(require, exports, module) {
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-require("./lib/fixoldbrowsers");
-
-var oop = require("./lib/oop");
-var dom = require("./lib/dom");
-var lang = require("./lib/lang");
-var useragent = require("./lib/useragent");
-var TextInput = require("./keyboard/textinput").TextInput;
-var MouseHandler = require("./mouse/mouse_handler").MouseHandler;
-var FoldHandler = require("./mouse/fold_handler").FoldHandler;
-var KeyBinding = require("./keyboard/keybinding").KeyBinding;
-var EditSession = require("./edit_session").EditSession;
-var Search = require("./search").Search;
-var Range = require("./range").Range;
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var CommandManager = require("./commands/command_manager").CommandManager;
-var defaultCommands = require("./commands/default_commands").commands;
-var config = require("./config");
-var Editor = function(renderer, session) {
- var container = renderer.getContainerElement();
- this.container = container;
- this.renderer = renderer;
-
- this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands);
- this.textInput = new TextInput(renderer.getTextAreaContainer(), this);
- this.renderer.textarea = this.textInput.getElement();
- this.keyBinding = new KeyBinding(this);
- this.$mouseHandler = new MouseHandler(this);
- new FoldHandler(this);
-
- this.$blockScrolling = 0;
- this.$search = new Search().set({
- wrap: true
- });
-
- this.$historyTracker = this.$historyTracker.bind(this);
- this.commands.on("exec", this.$historyTracker);
-
- this.$initOperationListeners();
-
- this.setSession(session || new EditSession(""));
- config.resetOptions(this);
- config._emit("editor", this);
+exports.last = function(a) {
+ return a[a.length - 1];
};
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.$initOperationListeners = function() {
- function last(a) {return a[a.length - 1]};
-
- this.selections = [];
- this.commands.on("exec", function(e) {
- this.startOperation(e);
-
- var command = e.command;
- if (command.group == "fileJump") {
- var prev = this.prevOp;
- if (!prev || prev.command.group != "fileJump") {
- this.lastFileJumpPos = last(this.selections)
- }
- } else {
- this.lastFileJumpPos = null;
- }
- }.bind(this), true);
-
- this.commands.on("afterExec", function(e) {
- var command = e.command;
-
- if (command.group == "fileJump") {
- if (this.lastFileJumpPos && !this.curOp.selectionChanged) {
- this.selection.fromJSON(this.lastFileJumpPos);
- return
- }
- }
- this.endOperation(e);
- }.bind(this), true);
-
- this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this));
-
- this.on("change", function() {
- this.curOp || this.startOperation();
- this.curOp.docChanged = true;
- }.bind(this), true);
-
- this.on("changeSelection", function() {
- this.curOp || this.startOperation();
- this.curOp.selectionChanged = true;
- }.bind(this), true);
- }
-
- this.curOp = null;
- this.prevOp = {};
- this.startOperation = function(commadEvent) {
- if (this.curOp) {
- if (!commadEvent || this.curOp.command)
- return;
- this.prevOp = this.curOp;
- }
- if (!commadEvent) {
- this.previousCommand = null;
- commadEvent = {};
- }
-
- this.$opResetTimer.schedule();
- this.curOp = {
- command: commadEvent.command || {},
- args: commadEvent.args
- };
-
- this.selections.push(this.selection.toJSON());
- };
-
- this.endOperation = function() {
- if (this.curOp) {
- this.prevOp = this.curOp;
- this.curOp = null;
- }
- };
-
- this.$historyTracker = function(e) {
- if (!this.$mergeUndoDeltas)
- return;
-
-
- var prev = this.prevOp;
- var mergeableCommands = ["backspace", "del", "insertstring"];
- var shouldMerge = prev.command && (e.command.name == prev.command.name);
- if (e.command.name == "insertstring") {
- var text = e.args;
- if (this.mergeNextCommand === undefined)
- this.mergeNextCommand = true;
-
- shouldMerge = shouldMerge
- && this.mergeNextCommand // previous command allows to coalesce with
- && (!/\s/.test(text) || /\s/.test(prev.args)) // previous insertion was of same type
-
- this.mergeNextCommand = true;
- } else {
- shouldMerge = shouldMerge
- && mergeableCommands.indexOf(e.command.name) !== -1// the command is mergeable
- }
-
- if (
- this.$mergeUndoDeltas != "always"
- && Date.now() - this.sequenceStartTime > 2000
- ) {
- shouldMerge = false; // the sequence is too long
- }
-
- if (shouldMerge)
- this.session.mergeUndoDeltas = true;
- else if (mergeableCommands.indexOf(e.command.name) !== -1)
- this.sequenceStartTime = Date.now();
- };
- this.setKeyboardHandler = function(keyboardHandler) {
- if (!keyboardHandler) {
- this.keyBinding.setKeyboardHandler(null);
- } else if (typeof keyboardHandler == "string") {
- this.$keybindingId = keyboardHandler;
- var _self = this;
- config.loadModule(["keybinding", keyboardHandler], function(module) {
- if (_self.$keybindingId == keyboardHandler)
- _self.keyBinding.setKeyboardHandler(module && module.handler);
- });
- } else {
- delete this.$keybindingId;
- this.keyBinding.setKeyboardHandler(keyboardHandler);
- }
- };
- this.getKeyboardHandler = function() {
- return this.keyBinding.getKeyboardHandler();
- };
- this.setSession = function(session) {
- if (this.session == session)
- return;
-
- if (this.session) {
- var oldSession = this.session;
- this.session.removeEventListener("change", this.$onDocumentChange);
- this.session.removeEventListener("changeMode", this.$onChangeMode);
- this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
- this.session.removeEventListener("changeTabSize", this.$onChangeTabSize);
- this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit);
- this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode);
- this.session.removeEventListener("onChangeFold", this.$onChangeFold);
- this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker);
- this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker);
- this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint);
- this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation);
- this.session.removeEventListener("changeOverwrite", this.$onCursorChange);
- this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange);
- this.session.removeEventListener("changeScrollLeft", this.$onScrollLeftChange);
-
- var selection = this.session.getSelection();
- selection.removeEventListener("changeCursor", this.$onCursorChange);
- selection.removeEventListener("changeSelection", this.$onSelectionChange);
- }
-
- this.session = session;
-
- this.$onDocumentChange = this.onDocumentChange.bind(this);
- session.addEventListener("change", this.$onDocumentChange);
- this.renderer.setSession(session);
-
- this.$onChangeMode = this.onChangeMode.bind(this);
- session.addEventListener("changeMode", this.$onChangeMode);
-
- this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
- session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
-
- this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);
- session.addEventListener("changeTabSize", this.$onChangeTabSize);
-
- this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
- session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit);
-
- this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
- session.addEventListener("changeWrapMode", this.$onChangeWrapMode);
-
- this.$onChangeFold = this.onChangeFold.bind(this);
- session.addEventListener("changeFold", this.$onChangeFold);
-
- this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
- this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker);
-
- this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
- this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker);
-
- this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
- this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint);
-
- this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
- this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation);
-
- this.$onCursorChange = this.onCursorChange.bind(this);
- this.session.addEventListener("changeOverwrite", this.$onCursorChange);
-
- this.$onScrollTopChange = this.onScrollTopChange.bind(this);
- this.session.addEventListener("changeScrollTop", this.$onScrollTopChange);
-
- this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
- this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange);
-
- this.selection = session.getSelection();
- this.selection.addEventListener("changeCursor", this.$onCursorChange);
-
- this.$onSelectionChange = this.onSelectionChange.bind(this);
- this.selection.addEventListener("changeSelection", this.$onSelectionChange);
-
- this.onChangeMode();
-
- this.$blockScrolling += 1;
- this.onCursorChange();
- this.$blockScrolling -= 1;
-
- this.onScrollTopChange();
- this.onScrollLeftChange();
- this.onSelectionChange();
- this.onChangeFrontMarker();
- this.onChangeBackMarker();
- this.onChangeBreakpoint();
- this.onChangeAnnotation();
- this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();
- this.renderer.updateFull();
-
- this._emit("changeSession", {
- session: session,
- oldSession: oldSession
- });
- };
- this.getSession = function() {
- return this.session;
- };
- this.setValue = function(val, cursorPos) {
- this.session.doc.setValue(val);
-
- if (!cursorPos)
- this.selectAll();
- else if (cursorPos == 1)
- this.navigateFileEnd();
- else if (cursorPos == -1)
- this.navigateFileStart();
-
- return val;
- };
- this.getValue = function() {
- return this.session.getValue();
- };
- this.getSelection = function() {
- return this.selection;
- };
- this.resize = function(force) {
- this.renderer.onResize(force);
- };
- this.setTheme = function(theme) {
- this.renderer.setTheme(theme);
- };
- this.getTheme = function() {
- return this.renderer.getTheme();
- };
- this.setStyle = function(style) {
- this.renderer.setStyle(style);
- };
- this.unsetStyle = function(style) {
- this.renderer.unsetStyle(style);
- };
- this.getFontSize = function () {
- return this.getOption("fontSize") ||
- dom.computedStyle(this.container, "fontSize");
- };
- this.setFontSize = function(size) {
- this.setOption("fontSize", size);
- };
-
- this.$highlightBrackets = function() {
- if (this.session.$bracketHighlight) {
- this.session.removeMarker(this.session.$bracketHighlight);
- this.session.$bracketHighlight = null;
- }
-
- if (this.$highlightPending) {
- return;
- }
- var self = this;
- this.$highlightPending = true;
- setTimeout(function() {
- self.$highlightPending = false;
-
- var pos = self.session.findMatchingBracket(self.getCursorPosition());
- if (pos) {
- var range = new Range(pos.row, pos.column, pos.row, pos.column+1);
- } else if (self.session.$mode.getMatching) {
- var range = self.session.$mode.getMatching(self.session);
- }
- if (range)
- self.session.$bracketHighlight = self.session.addMarker(range, "ace_bracket", "text");
- }, 50);
- };
- this.focus = function() {
- var _self = this;
- setTimeout(function() {
- _self.textInput.focus();
- });
- this.textInput.focus();
- };
- this.isFocused = function() {
- return this.textInput.isFocused();
- };
- this.blur = function() {
- this.textInput.blur();
- };
- this.onFocus = function() {
- if (this.$isFocused)
- return;
- this.$isFocused = true;
- this.renderer.showCursor();
- this.renderer.visualizeFocus();
- this._emit("focus");
- };
- this.onBlur = function() {
- if (!this.$isFocused)
- return;
- this.$isFocused = false;
- this.renderer.hideCursor();
- this.renderer.visualizeBlur();
- this._emit("blur");
- };
-
- this.$cursorChange = function() {
- this.renderer.updateCursor();
- };
- this.onDocumentChange = function(e) {
- var delta = e.data;
- var range = delta.range;
- var lastRow;
-
- if (range.start.row == range.end.row && delta.action != "insertLines" && delta.action != "removeLines")
- lastRow = range.end.row;
- else
- lastRow = Infinity;
- this.renderer.updateLines(range.start.row, lastRow);
-
- this._emit("change", e);
- this.$cursorChange();
- };
-
- this.onTokenizerUpdate = function(e) {
- var rows = e.data;
- this.renderer.updateLines(rows.first, rows.last);
- };
-
-
- this.onScrollTopChange = function() {
- this.renderer.scrollToY(this.session.getScrollTop());
- };
-
- this.onScrollLeftChange = function() {
- this.renderer.scrollToX(this.session.getScrollLeft());
- };
- this.onCursorChange = function() {
- this.$cursorChange();
-
- if (!this.$blockScrolling) {
- this.renderer.scrollCursorIntoView();
- }
-
- this.$highlightBrackets();
- this.$updateHighlightActiveLine();
- this._emit("changeSelection");
- };
-
- this.$updateHighlightActiveLine = function() {
- var session = this.getSession();
-
- var highlight;
- if (this.$highlightActiveLine) {
- if ((this.$selectionStyle != "line" || !this.selection.isMultiLine()))
- highlight = this.getCursorPosition();
- if (this.renderer.$maxLines && this.session.getLength() === 1)
- highlight = false;
- }
-
- if (session.$highlightLineMarker && !highlight) {
- session.removeMarker(session.$highlightLineMarker.id);
- session.$highlightLineMarker = null;
- } else if (!session.$highlightLineMarker && highlight) {
- var range = new Range(highlight.row, highlight.column, highlight.row, Infinity);
- range.id = session.addMarker(range, "ace_active-line", "screenLine");
- session.$highlightLineMarker = range;
- } else if (highlight) {
- session.$highlightLineMarker.start.row = highlight.row;
- session.$highlightLineMarker.end.row = highlight.row;
- session.$highlightLineMarker.start.column = highlight.column;
- session._emit("changeBackMarker");
- }
- };
-
- this.onSelectionChange = function(e) {
- var session = this.session;
-
- if (session.$selectionMarker) {
- session.removeMarker(session.$selectionMarker);
- }
- session.$selectionMarker = null;
-
- if (!this.selection.isEmpty()) {
- var range = this.selection.getRange();
- var style = this.getSelectionStyle();
- session.$selectionMarker = session.addMarker(range, "ace_selection", style);
- } else {
- this.$updateHighlightActiveLine();
- }
-
- var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp()
- this.session.highlight(re);
-
- this._emit("changeSelection");
- };
-
- this.$getSelectionHighLightRegexp = function() {
- var session = this.session;
-
- var selection = this.getSelectionRange();
- if (selection.isEmpty() || selection.isMultiLine())
- return;
-
- var startOuter = selection.start.column - 1;
- var endOuter = selection.end.column + 1;
- var line = session.getLine(selection.start.row);
- var lineCols = line.length;
- var needle = line.substring(Math.max(startOuter, 0),
- Math.min(endOuter, lineCols));
- if ((startOuter >= 0 && /^[\w\d]/.test(needle)) ||
- (endOuter <= lineCols && /[\w\d]$/.test(needle)))
- return;
-
- needle = line.substring(selection.start.column, selection.end.column);
- if (!/^[\w\d]+$/.test(needle))
- return;
-
- var re = this.$search.$assembleRegExp({
- wholeWord: true,
- caseSensitive: true,
- needle: needle
- });
-
- return re;
- };
-
-
- this.onChangeFrontMarker = function() {
- this.renderer.updateFrontMarkers();
- };
-
- this.onChangeBackMarker = function() {
- this.renderer.updateBackMarkers();
- };
-
-
- this.onChangeBreakpoint = function() {
- this.renderer.updateBreakpoints();
- };
-
- this.onChangeAnnotation = function() {
- this.renderer.setAnnotations(this.session.getAnnotations());
- };
-
-
- this.onChangeMode = function(e) {
- this.renderer.updateText();
- this._emit("changeMode", e);
- };
-
-
- this.onChangeWrapLimit = function() {
- this.renderer.updateFull();
- };
-
- this.onChangeWrapMode = function() {
- this.renderer.onResize(true);
- };
-
-
- this.onChangeFold = function() {
- this.$updateHighlightActiveLine();
- this.renderer.updateFull();
- };
-
- this.getCopyText = function() {
- var text = "";
- if (!this.selection.isEmpty())
- text = this.session.getTextRange(this.getSelectionRange());
-
- this._emit("copy", text);
- return text;
- };
- this.onCopy = function() {
- this.commands.exec("copy", this);
- };
- this.onCut = function() {
- this.commands.exec("cut", this);
- };
- this.onPaste = function(text) {
- if (this.$readOnly)
- return;
- this._emit("paste", text);
- this.insert(text);
- };
-
-
- this.execCommand = function(command, args) {
- this.commands.exec(command, this, args);
- };
- this.insert = function(text) {
- var session = this.session;
- var mode = session.getMode();
- var cursor = this.getCursorPosition();
-
- if (this.getBehavioursEnabled()) {
- var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);
- if (transform) {
- if (text !== transform.text) {
- this.session.mergeUndoDeltas = false;
- this.$mergeNextCommand = false;
- }
- text = transform.text;
-
- }
- }
-
- if (text == "\t")
- text = this.session.getTabString();
- if (!this.selection.isEmpty()) {
- var range = this.getSelectionRange();
- cursor = this.session.remove(range);
- this.clearSelection();
- }
- else if (this.session.getOverwrite()) {
- var range = new Range.fromPoints(cursor, cursor);
- range.end.column += text.length;
- this.session.remove(range);
- }
-
- if (text == "\n" || text == "\r\n") {
- var line = session.getLine(cursor.row)
- if (cursor.column > line.search(/\S|$/)) {
- var d = line.substr(cursor.column).search(/\S|$/);
- session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d);
- }
- }
- this.clearSelection();
-
- var start = cursor.column;
- var lineState = session.getState(cursor.row);
- var line = session.getLine(cursor.row);
- var shouldOutdent = mode.checkOutdent(lineState, line, text);
- var end = session.insert(cursor, text);
-
- if (transform && transform.selection) {
- if (transform.selection.length == 2) { // Transform relative to the current column
- this.selection.setSelectionRange(
- new Range(cursor.row, start + transform.selection[0],
- cursor.row, start + transform.selection[1]));
- } else { // Transform relative to the current row.
- this.selection.setSelectionRange(
- new Range(cursor.row + transform.selection[0],
- transform.selection[1],
- cursor.row + transform.selection[2],
- transform.selection[3]));
- }
- }
-
- if (session.getDocument().isNewLine(text)) {
- var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());
-
- session.insert({row: cursor.row+1, column: 0}, lineIndent);
- }
- if (shouldOutdent)
- mode.autoOutdent(lineState, session, cursor.row);
- };
-
- this.onTextInput = function(text) {
- this.keyBinding.onTextInput(text);
- };
-
- this.onCommandKey = function(e, hashId, keyCode) {
- this.keyBinding.onCommandKey(e, hashId, keyCode);
- };
- this.setOverwrite = function(overwrite) {
- this.session.setOverwrite(overwrite);
- };
- this.getOverwrite = function() {
- return this.session.getOverwrite();
- };
- this.toggleOverwrite = function() {
- this.session.toggleOverwrite();
- };
- this.setScrollSpeed = function(speed) {
- this.setOption("scrollSpeed", speed);
- };
- this.getScrollSpeed = function() {
- return this.getOption("scrollSpeed");
- };
- this.setDragDelay = function(dragDelay) {
- this.setOption("dragDelay", dragDelay);
- };
- this.getDragDelay = function() {
- return this.getOption("dragDelay");
- };
- this.setSelectionStyle = function(val) {
- this.setOption("selectionStyle", val);
- };
- this.getSelectionStyle = function() {
- return this.getOption("selectionStyle");
- };
- this.setHighlightActiveLine = function(shouldHighlight) {
- this.setOption("highlightActiveLine", shouldHighlight);
- };
- this.getHighlightActiveLine = function() {
- return this.getOption("highlightActiveLine");
- };
- this.setHighlightGutterLine = function(shouldHighlight) {
- this.setOption("highlightGutterLine", shouldHighlight);
- };
-
- this.getHighlightGutterLine = function() {
- return this.getOption("highlightGutterLine");
- };
- this.setHighlightSelectedWord = function(shouldHighlight) {
- this.setOption("highlightSelectedWord", shouldHighlight);
- };
- this.getHighlightSelectedWord = function() {
- return this.$highlightSelectedWord;
- };
-
- this.setAnimatedScroll = function(shouldAnimate){
- this.renderer.setAnimatedScroll(shouldAnimate);
- };
-
- this.getAnimatedScroll = function(){
- return this.renderer.getAnimatedScroll();
- };
- this.setShowInvisibles = function(showInvisibles) {
- this.renderer.setShowInvisibles(showInvisibles);
- };
- this.getShowInvisibles = function() {
- return this.renderer.getShowInvisibles();
- };
-
- this.setDisplayIndentGuides = function(display) {
- this.renderer.setDisplayIndentGuides(display);
- };
-
- this.getDisplayIndentGuides = function() {
- return this.renderer.getDisplayIndentGuides();
- };
- this.setShowPrintMargin = function(showPrintMargin) {
- this.renderer.setShowPrintMargin(showPrintMargin);
- };
- this.getShowPrintMargin = function() {
- return this.renderer.getShowPrintMargin();
- };
- this.setPrintMarginColumn = function(showPrintMargin) {
- this.renderer.setPrintMarginColumn(showPrintMargin);
- };
- this.getPrintMarginColumn = function() {
- return this.renderer.getPrintMarginColumn();
- };
- this.setReadOnly = function(readOnly) {
- this.setOption("readOnly", readOnly);
- };
- this.getReadOnly = function() {
- return this.getOption("readOnly");
- };
- this.setBehavioursEnabled = function (enabled) {
- this.setOption("behavioursEnabled", enabled);
- };
- this.getBehavioursEnabled = function () {
- return this.getOption("behavioursEnabled");
- };
- this.setWrapBehavioursEnabled = function (enabled) {
- this.setOption("wrapBehavioursEnabled", enabled);
- };
- this.getWrapBehavioursEnabled = function () {
- return this.getOption("wrapBehavioursEnabled");
- };
- this.setShowFoldWidgets = function(show) {
- this.setOption("showFoldWidgets", show);
-
- };
- this.getShowFoldWidgets = function() {
- return this.getOption("showFoldWidgets");
- };
-
- this.setFadeFoldWidgets = function(fade) {
- this.setOption("fadeFoldWidgets", fade);
- };
-
- this.getFadeFoldWidgets = function() {
- return this.getOption("fadeFoldWidgets");
- };
- this.remove = function(dir) {
- if (this.selection.isEmpty()){
- if (dir == "left")
- this.selection.selectLeft();
- else
- this.selection.selectRight();
- }
-
- var range = this.getSelectionRange();
- if (this.getBehavioursEnabled()) {
- var session = this.session;
- var state = session.getState(range.start.row);
- var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);
-
- if (range.end.column == 0) {
- var text = session.getTextRange(range);
- if (text[text.length - 1] == "\n") {
- var line = session.getLine(range.end.row)
- if (/^\s+$/.test(line)) {
- range.end.column = line.length
- }
- }
- }
- if (new_range)
- range = new_range;
- }
-
- this.session.remove(range);
- this.clearSelection();
- };
- this.removeWordRight = function() {
- if (this.selection.isEmpty())
- this.selection.selectWordRight();
-
- this.session.remove(this.getSelectionRange());
- this.clearSelection();
- };
- this.removeWordLeft = function() {
- if (this.selection.isEmpty())
- this.selection.selectWordLeft();
-
- this.session.remove(this.getSelectionRange());
- this.clearSelection();
- };
- this.removeToLineStart = function() {
- if (this.selection.isEmpty())
- this.selection.selectLineStart();
-
- this.session.remove(this.getSelectionRange());
- this.clearSelection();
- };
- this.removeToLineEnd = function() {
- if (this.selection.isEmpty())
- this.selection.selectLineEnd();
-
- var range = this.getSelectionRange();
- if (range.start.column == range.end.column && range.start.row == range.end.row) {
- range.end.column = 0;
- range.end.row++;
- }
-
- this.session.remove(range);
- this.clearSelection();
- };
- this.splitLine = function() {
- if (!this.selection.isEmpty()) {
- this.session.remove(this.getSelectionRange());
- this.clearSelection();
- }
-
- var cursor = this.getCursorPosition();
- this.insert("\n");
- this.moveCursorToPosition(cursor);
- };
- this.transposeLetters = function() {
- if (!this.selection.isEmpty()) {
- return;
- }
-
- var cursor = this.getCursorPosition();
- var column = cursor.column;
- if (column === 0)
- return;
-
- var line = this.session.getLine(cursor.row);
- var swap, range;
- if (column < line.length) {
- swap = line.charAt(column) + line.charAt(column-1);
- range = new Range(cursor.row, column-1, cursor.row, column+1);
- }
- else {
- swap = line.charAt(column-1) + line.charAt(column-2);
- range = new Range(cursor.row, column-2, cursor.row, column);
- }
- this.session.replace(range, swap);
- };
- this.toLowerCase = function() {
- var originalRange = this.getSelectionRange();
- if (this.selection.isEmpty()) {
- this.selection.selectWord();
- }
-
- var range = this.getSelectionRange();
- var text = this.session.getTextRange(range);
- this.session.replace(range, text.toLowerCase());
- this.selection.setSelectionRange(originalRange);
- };
- this.toUpperCase = function() {
- var originalRange = this.getSelectionRange();
- if (this.selection.isEmpty()) {
- this.selection.selectWord();
- }
-
- var range = this.getSelectionRange();
- var text = this.session.getTextRange(range);
- this.session.replace(range, text.toUpperCase());
- this.selection.setSelectionRange(originalRange);
- };
- this.indent = function() {
- var session = this.session;
- var range = this.getSelectionRange();
-
- if (range.start.row < range.end.row) {
- var rows = this.$getSelectedRows();
- session.indentRows(rows.first, rows.last, "\t");
- return;
- } else if (range.start.column < range.end.column) {
- var text = session.getTextRange(range)
- if (!/^\s+$/.test(text)) {
- var rows = this.$getSelectedRows();
- session.indentRows(rows.first, rows.last, "\t");
- return;
- }
- }
-
- var line = session.getLine(range.start.row)
- var position = range.start;
- var size = session.getTabSize();
- var column = session.documentToScreenColumn(position.row, position.column);
-
- if (this.session.getUseSoftTabs()) {
- var count = (size - column % size);
- var indentString = lang.stringRepeat(" ", count);
- } else {
- var count = column % size;
- while (line[range.start.column] == " " && count) {
- range.start.column--;
- count--;
- }
- this.selection.setSelectionRange(range);
- indentString = "\t";
- }
- return this.insert(indentString);
- };
- this.blockIndent = function() {
- var rows = this.$getSelectedRows();
- this.session.indentRows(rows.first, rows.last, "\t");
- };
- this.blockOutdent = function() {
- var selection = this.session.getSelection();
- this.session.outdentRows(selection.getRange());
- };
- this.sortLines = function() {
- var rows = this.$getSelectedRows();
- var session = this.session;
-
- var lines = [];
- for (i = rows.first; i <= rows.last; i++)
- lines.push(session.getLine(i));
-
- lines.sort(function(a, b) {
- if (a.toLowerCase() < b.toLowerCase()) return -1;
- if (a.toLowerCase() > b.toLowerCase()) return 1;
- return 0;
- });
-
- var deleteRange = new Range(0, 0, 0, 0);
- for (var i = rows.first; i <= rows.last; i++) {
- var line = session.getLine(i);
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- deleteRange.end.column = line.length;
- session.replace(deleteRange, lines[i-rows.first]);
- }
- };
- this.toggleCommentLines = function() {
- var state = this.session.getState(this.getCursorPosition().row);
- var rows = this.$getSelectedRows();
- this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);
- };
-
- this.toggleBlockComment = function() {
- var cursor = this.getCursorPosition();
- var state = this.session.getState(cursor.row);
- var range = this.getSelectionRange();
- this.session.getMode().toggleBlockComment(state, this.session, range, cursor);
- };
- this.getNumberAt = function( row, column ) {
- var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g
- _numberRx.lastIndex = 0
-
- var s = this.session.getLine(row)
- while (_numberRx.lastIndex < column) {
- var m = _numberRx.exec(s)
- if(m.index <= column && m.index+m[0].length >= column){
- var number = {
- value: m[0],
- start: m.index,
- end: m.index+m[0].length
- }
- return number;
- }
- }
- return null;
- };
- this.modifyNumber = function(amount) {
- var row = this.selection.getCursor().row;
- var column = this.selection.getCursor().column;
- var charRange = new Range(row, column-1, row, column);
-
- var c = this.session.getTextRange(charRange);
- if (!isNaN(parseFloat(c)) && isFinite(c)) {
- var nr = this.getNumberAt(row, column);
- if (nr) {
- var fp = nr.value.indexOf(".") >= 0 ? nr.start + nr.value.indexOf(".") + 1 : nr.end;
- var decimals = nr.start + nr.value.length - fp;
-
- var t = parseFloat(nr.value);
- t *= Math.pow(10, decimals);
-
-
- if(fp !== nr.end && column < fp){
- amount *= Math.pow(10, nr.end - column - 1);
- } else {
- amount *= Math.pow(10, nr.end - column);
- }
-
- t += amount;
- t /= Math.pow(10, decimals);
- var nnr = t.toFixed(decimals);
- var replaceRange = new Range(row, nr.start, row, nr.end);
- this.session.replace(replaceRange, nnr);
- this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length));
-
- }
- }
- };
- this.removeLines = function() {
- var rows = this.$getSelectedRows();
- var range;
- if (rows.first === 0 || rows.last+1 < this.session.getLength())
- range = new Range(rows.first, 0, rows.last+1, 0);
- else
- range = new Range(
- rows.first-1, this.session.getLine(rows.first-1).length,
- rows.last, this.session.getLine(rows.last).length
- );
- this.session.remove(range);
- this.clearSelection();
- };
-
- this.duplicateSelection = function() {
- var sel = this.selection;
- var doc = this.session;
- var range = sel.getRange();
- var reverse = sel.isBackwards();
- if (range.isEmpty()) {
- var row = range.start.row;
- doc.duplicateLines(row, row);
- } else {
- var point = reverse ? range.start : range.end;
- var endPoint = doc.insert(point, doc.getTextRange(range), false);
- range.start = point;
- range.end = endPoint;
-
- sel.setSelectionRange(range, reverse)
- }
- };
- this.moveLinesDown = function() {
- this.$moveLines(function(firstRow, lastRow) {
- return this.session.moveLinesDown(firstRow, lastRow);
- });
- };
- this.moveLinesUp = function() {
- this.$moveLines(function(firstRow, lastRow) {
- return this.session.moveLinesUp(firstRow, lastRow);
- });
- };
- this.moveText = function(range, toPosition) {
- return this.session.moveText(range, toPosition);
- };
- this.copyLinesUp = function() {
- this.$moveLines(function(firstRow, lastRow) {
- this.session.duplicateLines(firstRow, lastRow);
- return 0;
- });
- };
- this.copyLinesDown = function() {
- this.$moveLines(function(firstRow, lastRow) {
- return this.session.duplicateLines(firstRow, lastRow);
- });
- };
- this.$moveLines = function(mover) {
- var selection = this.selection;
- if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {
- var range = selection.toOrientedRange();
- var rows = this.$getSelectedRows(range);
- var linesMoved = mover.call(this, rows.first, rows.last);
- range.moveBy(linesMoved, 0);
- selection.fromOrientedRange(range);
- } else {
- var ranges = selection.rangeList.ranges;
- selection.rangeList.detach(this.session);
-
- for (var i = ranges.length; i--; ) {
- var rangeIndex = i;
- var rows = ranges[i].collapseRows();
- var last = rows.end.row;
- var first = rows.start.row;
- while (i--) {
- var rows = ranges[i].collapseRows();
- if (first - rows.end.row <= 1)
- first = rows.end.row;
- else
- break;
- }
- i++;
-
- var linesMoved = mover.call(this, first, last);
- while (rangeIndex >= i) {
- ranges[rangeIndex].moveBy(linesMoved, 0);
- rangeIndex--;
- }
- }
- selection.fromOrientedRange(selection.ranges[0]);
- selection.rangeList.attach(this.session);
- }
- };
- this.$getSelectedRows = function() {
- var range = this.getSelectionRange().collapseRows();
-
- return {
- first: range.start.row,
- last: range.end.row
- };
- };
-
- this.onCompositionStart = function(text) {
- this.renderer.showComposition(this.getCursorPosition());
- };
-
- this.onCompositionUpdate = function(text) {
- this.renderer.setCompositionText(text);
- };
-
- this.onCompositionEnd = function() {
- this.renderer.hideComposition();
- };
- this.getFirstVisibleRow = function() {
- return this.renderer.getFirstVisibleRow();
- };
- this.getLastVisibleRow = function() {
- return this.renderer.getLastVisibleRow();
- };
- this.isRowVisible = function(row) {
- return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());
- };
- this.isRowFullyVisible = function(row) {
- return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());
- };
- this.$getVisibleRowCount = function() {
- return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;
- };
-
- this.$moveByPage = function(dir, select) {
- var renderer = this.renderer;
- var config = this.renderer.layerConfig;
- var rows = dir * Math.floor(config.height / config.lineHeight);
-
- this.$blockScrolling++;
- if (select == true) {
- this.selection.$moveSelection(function(){
- this.moveCursorBy(rows, 0);
- });
- } else if (select == false) {
- this.selection.moveCursorBy(rows, 0);
- this.selection.clearSelection();
- }
- this.$blockScrolling--;
-
- var scrollTop = renderer.scrollTop;
-
- renderer.scrollBy(0, rows * config.lineHeight);
- if (select != null)
- renderer.scrollCursorIntoView(null, 0.5);
-
- renderer.animateScrolling(scrollTop);
- };
- this.selectPageDown = function() {
- this.$moveByPage(1, true);
- };
- this.selectPageUp = function() {
- this.$moveByPage(-1, true);
- };
- this.gotoPageDown = function() {
- this.$moveByPage(1, false);
- };
- this.gotoPageUp = function() {
- this.$moveByPage(-1, false);
- };
- this.scrollPageDown = function() {
- this.$moveByPage(1);
- };
- this.scrollPageUp = function() {
- this.$moveByPage(-1);
- };
- this.scrollToRow = function(row) {
- this.renderer.scrollToRow(row);
- };
- this.scrollToLine = function(line, center, animate, callback) {
- this.renderer.scrollToLine(line, center, animate, callback);
- };
- this.centerSelection = function() {
- var range = this.getSelectionRange();
- var pos = {
- row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),
- column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)
- }
- this.renderer.alignCursor(pos, 0.5);
- };
- this.getCursorPosition = function() {
- return this.selection.getCursor();
- };
- this.getCursorPositionScreen = function() {
- return this.session.documentToScreenPosition(this.getCursorPosition());
- };
- this.getSelectionRange = function() {
- return this.selection.getRange();
- };
- this.selectAll = function() {
- this.$blockScrolling += 1;
- this.selection.selectAll();
- this.$blockScrolling -= 1;
- };
- this.clearSelection = function() {
- this.selection.clearSelection();
- };
- this.moveCursorTo = function(row, column) {
- this.selection.moveCursorTo(row, column);
- };
- this.moveCursorToPosition = function(pos) {
- this.selection.moveCursorToPosition(pos);
- };
- this.jumpToMatching = function(select) {
- var cursor = this.getCursorPosition();
-
- var range = this.session.getBracketRange(cursor);
- if (!range) {
- range = this.find({
- needle: /[{}()\[\]]/g,
- preventScroll:true,
- start: {row: cursor.row, column: cursor.column - 1}
- });
- if (!range)
- return;
- var pos = range.start;
- if (pos.row == cursor.row && Math.abs(pos.column - cursor.column) < 2)
- range = this.session.getBracketRange(pos);
- }
-
- pos = range && range.cursor || pos;
- if (pos) {
- if (select) {
- if (range && range.isEqual(this.getSelectionRange()))
- this.clearSelection();
- else
- this.selection.selectTo(pos.row, pos.column);
- } else {
- this.clearSelection();
- this.moveCursorTo(pos.row, pos.column);
- }
- }
- };
- this.gotoLine = function(lineNumber, column, animate) {
- this.selection.clearSelection();
- this.session.unfold({row: lineNumber - 1, column: column || 0});
-
- this.$blockScrolling += 1;
- this.exitMultiSelectMode && this.exitMultiSelectMode();
- this.moveCursorTo(lineNumber - 1, column || 0);
- this.$blockScrolling -= 1;
-
- if (!this.isRowFullyVisible(lineNumber - 1))
- this.scrollToLine(lineNumber - 1, true, animate);
- };
- this.navigateTo = function(row, column) {
- this.clearSelection();
- this.moveCursorTo(row, column);
- };
- this.navigateUp = function(times) {
- if (this.selection.isMultiLine() && !this.selection.isBackwards()) {
- var selectionStart = this.selection.anchor.getPosition();
- return this.moveCursorToPosition(selectionStart);
- }
- this.selection.clearSelection();
- times = times || 1;
- this.selection.moveCursorBy(-times, 0);
- };
- this.navigateDown = function(times) {
- if (this.selection.isMultiLine() && this.selection.isBackwards()) {
- var selectionEnd = this.selection.anchor.getPosition();
- return this.moveCursorToPosition(selectionEnd);
- }
- this.selection.clearSelection();
- times = times || 1;
- this.selection.moveCursorBy(times, 0);
- };
- this.navigateLeft = function(times) {
- if (!this.selection.isEmpty()) {
- var selectionStart = this.getSelectionRange().start;
- this.moveCursorToPosition(selectionStart);
- }
- else {
- times = times || 1;
- while (times--) {
- this.selection.moveCursorLeft();
- }
- }
- this.clearSelection();
- };
- this.navigateRight = function(times) {
- if (!this.selection.isEmpty()) {
- var selectionEnd = this.getSelectionRange().end;
- this.moveCursorToPosition(selectionEnd);
- }
- else {
- times = times || 1;
- while (times--) {
- this.selection.moveCursorRight();
- }
- }
- this.clearSelection();
- };
- this.navigateLineStart = function() {
- this.selection.moveCursorLineStart();
- this.clearSelection();
- };
- this.navigateLineEnd = function() {
- this.selection.moveCursorLineEnd();
- this.clearSelection();
- };
- this.navigateFileEnd = function() {
- var scrollTop = this.renderer.scrollTop;
- this.selection.moveCursorFileEnd();
- this.clearSelection();
- this.renderer.animateScrolling(scrollTop);
- };
- this.navigateFileStart = function() {
- var scrollTop = this.renderer.scrollTop;
- this.selection.moveCursorFileStart();
- this.clearSelection();
- this.renderer.animateScrolling(scrollTop);
- };
- this.navigateWordRight = function() {
- this.selection.moveCursorWordRight();
- this.clearSelection();
- };
- this.navigateWordLeft = function() {
- this.selection.moveCursorWordLeft();
- this.clearSelection();
- };
- this.replace = function(replacement, options) {
- if (options)
- this.$search.set(options);
-
- var range = this.$search.find(this.session);
- var replaced = 0;
- if (!range)
- return replaced;
-
- if (this.$tryReplace(range, replacement)) {
- replaced = 1;
- }
- if (range !== null) {
- this.selection.setSelectionRange(range);
- this.renderer.scrollSelectionIntoView(range.start, range.end);
- }
-
- return replaced;
- };
- this.replaceAll = function(replacement, options) {
- if (options) {
- this.$search.set(options);
- }
-
- var ranges = this.$search.findAll(this.session);
- var replaced = 0;
- if (!ranges.length)
- return replaced;
-
- this.$blockScrolling += 1;
-
- var selection = this.getSelectionRange();
- this.clearSelection();
- this.selection.moveCursorTo(0, 0);
-
- for (var i = ranges.length - 1; i >= 0; --i) {
- if(this.$tryReplace(ranges[i], replacement)) {
- replaced++;
- }
- }
-
- this.selection.setSelectionRange(selection);
- this.$blockScrolling -= 1;
-
- return replaced;
- };
-
- this.$tryReplace = function(range, replacement) {
- var input = this.session.getTextRange(range);
- replacement = this.$search.replace(input, replacement);
- if (replacement !== null) {
- range.end = this.session.replace(range, replacement);
- return range;
- } else {
- return null;
- }
- };
- this.getLastSearchOptions = function() {
- return this.$search.getOptions();
- };
- this.find = function(needle, options, animate) {
- if (!options)
- options = {};
-
- if (typeof needle == "string" || needle instanceof RegExp)
- options.needle = needle;
- else if (typeof needle == "object")
- oop.mixin(options, needle);
-
- var range = this.selection.getRange();
- if (options.needle == null) {
- needle = this.session.getTextRange(range)
- || this.$search.$options.needle;
- if (!needle) {
- range = this.session.getWordRange(range.start.row, range.start.column);
- needle = this.session.getTextRange(range);
- }
- this.$search.set({needle: needle});
- }
-
- this.$search.set(options);
- if (!options.start)
- this.$search.set({start: range});
-
- var newRange = this.$search.find(this.session);
- if (options.preventScroll)
- return newRange;
- if (newRange) {
- this.revealRange(newRange, animate);
- return newRange;
- }
- if (options.backwards)
- range.start = range.end;
- else
- range.end = range.start;
- this.selection.setRange(range);
- };
- this.findNext = function(options, animate) {
- this.find({skipCurrent: true, backwards: false}, options, animate);
- };
- this.findPrevious = function(options, animate) {
- this.find(options, {skipCurrent: true, backwards: true}, animate);
- };
-
- this.revealRange = function(range, animate) {
- this.$blockScrolling += 1;
- this.session.unfold(range);
- this.selection.setSelectionRange(range);
- this.$blockScrolling -= 1;
-
- var scrollTop = this.renderer.scrollTop;
- this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);
- if (animate != false)
- this.renderer.animateScrolling(scrollTop);
- };
- this.undo = function() {
- this.$blockScrolling++;
- this.session.getUndoManager().undo();
- this.$blockScrolling--;
- this.renderer.scrollCursorIntoView(null, 0.5);
- };
- this.redo = function() {
- this.$blockScrolling++;
- this.session.getUndoManager().redo();
- this.$blockScrolling--;
- this.renderer.scrollCursorIntoView(null, 0.5);
- };
- this.destroy = function() {
- this.renderer.destroy();
- this._emit("destroy", this);
- };
- this.setAutoScrollEditorIntoView = function(enable) {
- if (enable === false)
- return;
- var rect;
- var self = this;
- var shouldScroll = false;
- if (!this.$scrollAnchor)
- this.$scrollAnchor = document.createElement("div");
- var scrollAnchor = this.$scrollAnchor;
- scrollAnchor.style.cssText = "position:absolute";
- this.container.insertBefore(scrollAnchor, this.container.firstChild);
- var onChangeSelection = this.on("changeSelection", function() {
- shouldScroll = true;
- });
- var onBeforeRender = this.renderer.on("beforeRender", function() {
- if (shouldScroll)
- rect = self.renderer.container.getBoundingClientRect();
- });
- var onAfterRender = this.renderer.on("afterRender", function() {
- if (shouldScroll && rect && self.isFocused()) {
- var renderer = self.renderer;
- var pos = renderer.$cursorLayer.$pixelPos;
- var config = renderer.layerConfig;
- var top = pos.top - config.offset;
- if (pos.top >= 0 && top + rect.top < 0) {
- shouldScroll = true;
- } else if (pos.top < config.height &&
- pos.top + rect.top + config.lineHeight > window.innerHeight) {
- shouldScroll = false;
- } else {
- shouldScroll = null;
- }
- if (shouldScroll != null) {
- scrollAnchor.style.top = top + "px";
- scrollAnchor.style.left = pos.left + "px";
- scrollAnchor.style.height = config.lineHeight + "px";
- scrollAnchor.scrollIntoView(shouldScroll);
- }
- shouldScroll = rect = null;
- }
- });
- this.setAutoScrollEditorIntoView = function(enable) {
- if (enable === true)
- return;
- delete this.setAutoScrollEditorIntoView;
- this.removeEventListener("changeSelection", onChangeSelection);
- this.renderer.removeEventListener("afterRender", onAfterRender);
- this.renderer.removeEventListener("beforeRender", onBeforeRender);
- };
- };
-
-
- this.$resetCursorStyle = function() {
- var style = this.$cursorStyle || "ace";
- var cursorLayer = this.renderer.$cursorLayer;
- if (!cursorLayer)
- return;
- cursorLayer.setSmoothBlinking(style == "smooth");
- cursorLayer.isBlinking = !this.$readOnly && style != "wide";
- };
-
-}).call(Editor.prototype);
-
-
-
-config.defineOptions(Editor.prototype, "editor", {
- selectionStyle: {
- set: function(style) {
- this.onSelectionChange();
- this._emit("changeSelectionStyle", {data: style});
- },
- initialValue: "line"
- },
- highlightActiveLine: {
- set: function() {this.$updateHighlightActiveLine();},
- initialValue: true
- },
- highlightSelectedWord: {
- set: function(shouldHighlight) {this.$onSelectionChange();},
- initialValue: true
- },
- readOnly: {
- set: function(readOnly) { this.$resetCursorStyle(); },
- initialValue: false
- },
- cursorStyle: {
- set: function(val) { this.$resetCursorStyle(); },
- values: ["ace", "slim", "smooth", "wide"],
- initialValue: "ace"
- },
- mergeUndoDeltas: {
- values: [false, true, "always"],
- initialValue: true
- },
- behavioursEnabled: {initialValue: true},
- wrapBehavioursEnabled: {initialValue: true},
-
- hScrollBarAlwaysVisible: "renderer",
- highlightGutterLine: "renderer",
- animatedScroll: "renderer",
- showInvisibles: "renderer",
- showPrintMargin: "renderer",
- printMarginColumn: "renderer",
- printMargin: "renderer",
- fadeFoldWidgets: "renderer",
- showFoldWidgets: "renderer",
- showGutter: "renderer",
- displayIndentGuides: "renderer",
- fontSize: "renderer",
- fontFamily: "renderer",
- maxLines: "renderer",
- minLines: "renderer",
- scrollPastEnd: "renderer",
-
- scrollSpeed: "$mouseHandler",
- dragDelay: "$mouseHandler",
- focusTimout: "$mouseHandler",
-
- firstLineNumber: "session",
- overwrite: "session",
- newLineMode: "session",
- useWorker: "session",
- useSoftTabs: "session",
- tabSize: "session",
- wrap: "session",
- foldStyle: "session"
-});
-
-exports.Editor = Editor;
-});
-
-ace.define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
exports.stringReverse = function(string) {
return string.split("").reverse().join("");
};
@@ -3355,18 +1744,24 @@ exports.copyArray = function(array){
return copy;
};
-exports.deepCopy = function (obj) {
- if (typeof obj != "object") {
+exports.deepCopy = function deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
}
+ var cons = obj.constructor;
+ if (cons === RegExp)
+ return obj;
- var copy = obj.constructor();
+ copy = cons();
for (var key in obj) {
- if (typeof obj[key] == "object") {
- copy[key] = this.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
+ copy[key] = deepCopy(obj[key]);
}
return copy;
};
@@ -3416,7 +1811,6 @@ exports.getMatchOffsets = function(string, regExp) {
return matches;
};
exports.deferredCall = function(fcn) {
-
var timer = null;
var callback = function() {
timer = null;
@@ -3442,6 +1836,10 @@ exports.deferredCall = function(fcn) {
timer = null;
return deferred;
};
+
+ deferred.isPending = function() {
+ return timer;
+ };
return deferred;
};
@@ -3455,15 +1853,15 @@ exports.delayedCall = function(fcn, defaultTimeout) {
};
var _self = function(timeout) {
- timer && clearTimeout(timer);
- timer = setTimeout(callback, timeout || defaultTimeout);
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
- _self.delay = _self;
- _self.schedule = function(timeout) {
- if (timer == null)
- timer = setTimeout(callback, timeout || 0);
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
+ _self.schedule = _self;
_self.call = function() {
this.cancel();
@@ -3483,32 +1881,34 @@ exports.delayedCall = function(fcn, defaultTimeout) {
};
});
-ace.define('ace/keyboard/textinput', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/lib/useragent', 'ace/lib/dom', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var event = require("../lib/event");
var useragent = require("../lib/useragent");
var dom = require("../lib/dom");
var lang = require("../lib/lang");
var BROKEN_SETDATA = useragent.isChrome < 18;
+var USE_IE_MIME_TYPE = useragent.isIE;
var TextInput = function(parentNode, host) {
var text = dom.createElement("textarea");
text.className = "ace_text-input";
+
if (useragent.isTouchPad)
text.setAttribute("x-palm-disable-auto-cap", true);
- text.wrap = "off";
- text.autocorrect = "off";
- text.autocapitalize = "off";
- text.spellcheck = false;
+ text.setAttribute("wrap", "off");
+ text.setAttribute("autocorrect", "off");
+ text.setAttribute("autocapitalize", "off");
+ text.setAttribute("spellcheck", false);
- text.style.bottom = "2000em";
+ text.style.opacity = "0";
+ if (useragent.isOldIE) text.style.top = "-1000px";
parentNode.insertBefore(text, parentNode.firstChild);
var PLACEHOLDER = "\x01\x01";
- var cut = false;
var copied = false;
var pasted = false;
var inComposition = false;
@@ -3516,16 +1916,24 @@ var TextInput = function(parentNode, host) {
var isSelectionEmpty = true;
try { var isFocused = document.activeElement === text; } catch(e) {}
- event.addListener(text, "blur", function() {
- host.onBlur();
+ event.addListener(text, "blur", function(e) {
+ host.onBlur(e);
isFocused = false;
});
- event.addListener(text, "focus", function() {
+ event.addListener(text, "focus", function(e) {
isFocused = true;
- host.onFocus();
+ host.onFocus(e);
resetSelection();
});
- this.focus = function() { text.focus(); };
+ this.focus = function() {
+ if (tempStyle) return text.focus();
+ text.style.position = "fixed";
+ text.style.top = "-1000px";
+ text.focus();
+ setTimeout(function() {
+ text.style.position = "";
+ }, 0);
+ };
this.blur = function() { text.blur(); };
this.isFocused = function() {
return isFocused;
@@ -3543,6 +1951,8 @@ var TextInput = function(parentNode, host) {
function resetSelection(isEmpty) {
if (inComposition)
return;
+ inComposition = true;
+
if (inputHandler) {
selectionStart = 0;
selectionEnd = isEmpty ? 0 : text.value.length - 1;
@@ -3553,6 +1963,8 @@ var TextInput = function(parentNode, host) {
try {
text.setSelectionRange(selectionStart, selectionEnd);
} catch(e){}
+
+ inComposition = false;
}
function resetValue() {
@@ -3628,9 +2040,7 @@ var TextInput = function(parentNode, host) {
}
var onSelect = function(e) {
- if (cut) {
- cut = false;
- } else if (copied) {
+ if (copied) {
copied = false;
} else if (isAllSelected(text)) {
host.selectAll();
@@ -3655,17 +2065,19 @@ var TextInput = function(parentNode, host) {
if (data)
host.onPaste(data);
pasted = false;
- } else if (data == PLACEHOLDER[0]) {
+ } else if (data == PLACEHOLDER.charAt(0)) {
if (afterContextMenu)
host.execCommand("del", {source: "ace"});
+ else // some versions of android do not fire keydown when pressing backspace
+ host.execCommand("backspace", {source: "ace"});
} else {
if (data.substring(0, 2) == PLACEHOLDER)
data = data.substr(2);
- else if (data[0] == PLACEHOLDER[0])
+ else if (data.charAt(0) == PLACEHOLDER.charAt(0))
data = data.substr(1);
- else if (data[data.length - 1] == PLACEHOLDER[0])
+ else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))
data = data.slice(0, -1);
- if (data[data.length - 1] == PLACEHOLDER[0])
+ if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))
data = data.slice(0, -1);
if (data)
@@ -3681,53 +2093,28 @@ var TextInput = function(parentNode, host) {
sendText(data);
resetValue();
};
-
- var onCut = function(e) {
- var data = host.getCopyText();
- if (!data) {
- event.preventDefault(e);
- return;
- }
-
+
+ var handleClipboardData = function(e, data) {
var clipboardData = e.clipboardData || window.clipboardData;
-
- if (clipboardData && !BROKEN_SETDATA) {
- var supported = clipboardData.setData("Text", data);
- if (supported) {
- host.onCut();
- event.preventDefault(e);
- }
- }
-
- if (!supported) {
- cut = true;
- text.value = data;
- text.select();
- setTimeout(function(){
- cut = false;
- resetValue();
- resetSelection();
- host.onCut();
- });
+ if (!clipboardData || BROKEN_SETDATA)
+ return;
+ var mime = USE_IE_MIME_TYPE ? "Text" : "text/plain";
+ if (data) {
+ return clipboardData.setData(mime, data) !== false;
+ } else {
+ return clipboardData.getData(mime);
}
};
- var onCopy = function(e) {
+ var doCopy = function(e, isCut) {
var data = host.getCopyText();
- if (!data) {
- event.preventDefault(e);
- return;
- }
+ if (!data)
+ return event.preventDefault(e);
- var clipboardData = e.clipboardData || window.clipboardData;
- if (clipboardData && !BROKEN_SETDATA) {
- var supported = clipboardData.setData("Text", data);
- if (supported) {
- host.onCopy();
- event.preventDefault(e);
- }
- }
- if (!supported) {
+ if (handleClipboardData(e, data)) {
+ isCut ? host.onCut() : host.onCopy();
+ event.preventDefault(e);
+ } else {
copied = true;
text.value = data;
text.select();
@@ -3735,16 +2122,22 @@ var TextInput = function(parentNode, host) {
copied = false;
resetValue();
resetSelection();
- host.onCopy();
+ isCut ? host.onCut() : host.onCopy();
});
}
};
-
+
+ var onCut = function(e) {
+ doCopy(e, true);
+ };
+
+ var onCopy = function(e) {
+ doCopy(e, false);
+ };
+
var onPaste = function(e) {
- var clipboardData = e.clipboardData || window.clipboardData;
-
- if (clipboardData) {
- var data = clipboardData.getData("Text");
+ var data = handleClipboardData(e);
+ if (typeof data == "string") {
if (data)
host.onPaste(data);
if (useragent.isIE)
@@ -3769,7 +2162,7 @@ var TextInput = function(parentNode, host) {
if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)){
event.addListener(parentNode, "keydown", function(e) {
if ((useragent.isMac && !e.metaKey) || !e.ctrlKey)
- return;
+ return;
switch (e.keyCode) {
case 67:
@@ -3785,7 +2178,8 @@ var TextInput = function(parentNode, host) {
});
}
var onCompositionStart = function(e) {
- if (inComposition) return;
+ if (inComposition || !host.onCompositionStart || host.$readOnly)
+ return;
inComposition = {};
host.onCompositionStart();
setTimeout(onCompositionUpdate, 0);
@@ -3799,11 +2193,15 @@ var TextInput = function(parentNode, host) {
};
var onCompositionUpdate = function() {
- if (!inComposition) return;
- host.onCompositionUpdate(text.value);
+ if (!inComposition || !host.onCompositionUpdate || host.$readOnly)
+ return;
+ var val = text.value.replace(/\x01/g, "");
+ if (inComposition.lastValue === val) return;
+
+ host.onCompositionUpdate(val);
if (inComposition.lastValue)
host.undo();
- inComposition.lastValue = text.value.replace(/\x01/g, "")
+ inComposition.lastValue = val;
if (inComposition.lastValue) {
var r = host.selection.getRange();
host.insert(inComposition.lastValue);
@@ -3815,12 +2213,14 @@ var TextInput = function(parentNode, host) {
};
var onCompositionEnd = function(e) {
+ if (!host.onCompositionEnd || host.$readOnly) return;
var c = inComposition;
inComposition = false;
var timer = setTimeout(function() {
+ timer = null;
var str = text.value.replace(/\x01/g, "");
if (inComposition)
- return
+ return;
else if (str == c.lastValue)
resetValue();
else if (!c.lastValue && str) {
@@ -3829,14 +2229,15 @@ var TextInput = function(parentNode, host) {
}
});
inputHandler = function compositionInputHandler(str) {
- clearTimeout(timer);
+ if (timer)
+ clearTimeout(timer);
str = str.replace(/\x01/g, "");
if (str == c.lastValue)
return "";
- if (c.lastValue)
+ if (c.lastValue && timer)
host.undo();
return str;
- }
+ };
host.onCompositionEnd();
host.removeListener("mousedown", onCompositionEnd);
if (e.type == "compositionend" && c.range) {
@@ -3849,7 +2250,12 @@ var TextInput = function(parentNode, host) {
var syncComposition = lang.delayedCall(onCompositionUpdate, 50);
event.addListener(text, "compositionstart", onCompositionStart);
- event.addListener(text, useragent.isGecko ? "text" : "keyup", function(){syncComposition.schedule()});
+ if (useragent.isGecko) {
+ event.addListener(text, "text", function(){syncComposition.schedule()});
+ } else {
+ event.addListener(text, "keyup", function(){syncComposition.schedule()});
+ event.addListener(text, "keydown", function(){syncComposition.schedule()});
+ }
event.addListener(text, "compositionend", onCompositionEnd);
this.getElement = function() {
@@ -3862,18 +2268,25 @@ var TextInput = function(parentNode, host) {
this.onContextMenu = function(e) {
afterContextMenu = true;
+ resetSelection(host.selection.isEmpty());
+ host._emit("nativecontextmenu", {target: host, domEvent: e});
+ this.moveToMouse(e, true);
+ };
+
+ this.moveToMouse = function(e, bringToFront) {
+ if (!bringToFront && useragent.isOldIE)
+ return;
if (!tempStyle)
tempStyle = text.style.cssText;
+ text.style.cssText = (bringToFront ? "z-index:100000;" : "")
+ + "height:" + text.style.height + ";"
+ + (useragent.isIE ? "opacity:0.1;" : "");
- text.style.cssText = "z-index:100000;" + (useragent.isIE ? "opacity:0.1;" : "");
-
- resetSelection(host.selection.isEmpty());
- host._emit("nativecontextmenu", {target: host, domEvent: e});
var rect = host.container.getBoundingClientRect();
var style = dom.computedStyle(host.container);
var top = rect.top + (parseInt(style.borderTopWidth) || 0);
var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);
- var maxTop = rect.bottom - top - text.clientHeight;
+ var maxTop = rect.bottom - top - text.clientHeight -2;
var move = function(e) {
text.style.left = e.clientX - left - 2 + "px";
text.style.top = Math.min(e.clientY - top - 2, maxTop) + "px";
@@ -3885,13 +2298,15 @@ var TextInput = function(parentNode, host) {
if (host.renderer.$keepTextAreaAtCursor)
host.renderer.$keepTextAreaAtCursor = null;
- if (useragent.isWin)
+ if (useragent.isWin && !useragent.isOldIE)
event.capture(host.container, move, onContextMenuClose);
};
this.onContextMenuClose = onContextMenuClose;
+ var closeTimeout;
function onContextMenuClose() {
- setTimeout(function () {
+ clearTimeout(closeTimeout)
+ closeTimeout = setTimeout(function () {
if (tempStyle) {
text.style.cssText = tempStyle;
tempStyle = '';
@@ -3900,144 +2315,25 @@ var TextInput = function(parentNode, host) {
host.renderer.$keepTextAreaAtCursor = true;
host.renderer.$moveTextAreaToCursor();
}
- }, 0);
+ }, useragent.isOldIE ? 200 : 0);
}
- if (!useragent.isGecko || useragent.isMac) {
- event.addListener(text, "contextmenu", function(e) {
- host.textInput.onContextMenu(e);
- onContextMenuClose();
- });
- }
-};
-
-exports.TextInput = TextInput;
-});
-
-ace.define('ace/mouse/mouse_handler', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/lib/useragent', 'ace/mouse/default_handlers', 'ace/mouse/default_gutter_handler', 'ace/mouse/mouse_event', 'ace/mouse/dragdrop', 'ace/config'], function(require, exports, module) {
-
-
-var event = require("../lib/event");
-var useragent = require("../lib/useragent");
-var DefaultHandlers = require("./default_handlers").DefaultHandlers;
-var DefaultGutterHandler = require("./default_gutter_handler").GutterHandler;
-var MouseEvent = require("./mouse_event").MouseEvent;
-var DragdropHandler = require("./dragdrop").DragdropHandler;
-var config = require("../config");
-
-var MouseHandler = function(editor) {
- this.editor = editor;
-
- new DefaultHandlers(this);
- new DefaultGutterHandler(this);
- new DragdropHandler(this);
-
- var mouseTarget = editor.renderer.getMouseEventTarget();
- event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
- event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"));
- event.addMultiMouseDownListener(mouseTarget, [300, 300, 250], this, "onMouseEvent");
- event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
-
- var gutterEl = editor.renderer.$gutter;
- event.addListener(gutterEl, "mousedown", this.onMouseEvent.bind(this, "guttermousedown"));
- event.addListener(gutterEl, "click", this.onMouseEvent.bind(this, "gutterclick"));
- event.addListener(gutterEl, "dblclick", this.onMouseEvent.bind(this, "gutterdblclick"));
- event.addListener(gutterEl, "mousemove", this.onMouseEvent.bind(this, "guttermousemove"));
-
- event.addListener(mouseTarget, "mousedown", function(e) {
- editor.focus();
- return event.preventDefault(e);
- });
-
- event.addListener(gutterEl, "mousedown", function(e) {
- editor.focus();
- return event.preventDefault(e);
- });
-};
-
-(function() {
- this.onMouseEvent = function(name, e) {
- this.editor._emit(name, new MouseEvent(e, this.editor));
- };
-
- this.onMouseMove = function(name, e) {
- var listeners = this.editor._eventRegistry && this.editor._eventRegistry.mousemove;
- if (!listeners || !listeners.length)
- return;
-
- this.editor._emit(name, new MouseEvent(e, this.editor));
- };
-
- this.onMouseWheel = function(name, e) {
- var mouseEvent = new MouseEvent(e, this.editor);
- mouseEvent.speed = this.$scrollSpeed * 2;
- mouseEvent.wheelX = e.wheelX;
- mouseEvent.wheelY = e.wheelY;
-
- this.editor._emit(name, mouseEvent);
- };
-
- this.setState = function(state) {
- this.state = state;
- };
-
- this.captureMouse = function(ev, state) {
- if (state)
- this.setState(state);
-
- this.x = ev.x;
- this.y = ev.y;
-
- this.isMousePressed = true;
- var renderer = this.editor.renderer;
- if (renderer.$keepTextAreaAtCursor)
- renderer.$keepTextAreaAtCursor = null;
-
- var self = this;
- var onMouseMove = function(e) {
- self.x = e.clientX;
- self.y = e.clientY;
- };
-
- var onCaptureEnd = function(e) {
- clearInterval(timerId);
- onCaptureInterval();
- self[self.state + "End"] && self[self.state + "End"](e);
- self.$clickSelection = null;
- if (renderer.$keepTextAreaAtCursor == null) {
- renderer.$keepTextAreaAtCursor = true;
- renderer.$moveTextAreaToCursor();
- }
- self.isMousePressed = false;
- self.onMouseEvent("mouseup", e)
- };
- var onCaptureInterval = function() {
- self[self.state] && self[self.state]();
- };
-
- if (useragent.isOldIE && ev.domEvent.type == "dblclick") {
- return setTimeout(function() {onCaptureEnd(ev);});
- }
-
- event.capture(this.editor.container, onMouseMove, onCaptureEnd);
- var timerId = setInterval(onCaptureInterval, 20);
+ var onContextMenu = function(e) {
+ host.textInput.onContextMenu(e);
+ onContextMenuClose();
};
-}).call(MouseHandler.prototype);
-
-config.defineOptions(MouseHandler.prototype, "mouseHandler", {
- scrollSpeed: {initialValue: 2},
- dragDelay: {initialValue: 150},
- focusTimout: {initialValue: 0}
-});
-
+ event.addListener(host.renderer.scroller, "contextmenu", onContextMenu);
+ event.addListener(text, "contextmenu", onContextMenu);
+};
-exports.MouseHandler = MouseHandler;
+exports.TextInput = TextInput;
});
-ace.define('ace/mouse/default_handlers', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/useragent'], function(require, exports, module) {
-
+ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
var dom = require("../lib/dom");
+var event = require("../lib/event");
var useragent = require("../lib/useragent");
var DRAG_OFFSET = 0; // pixels
@@ -4052,8 +2348,8 @@ function DefaultHandlers(mouseHandler) {
editor.setDefaultHandler("quadclick", this.onQuadClick.bind(mouseHandler));
editor.setDefaultHandler("mousewheel", this.onMouseWheel.bind(mouseHandler));
- var exports = ["select", "startSelect", "drag", "dragEnd", "dragWait",
- "dragWaitEnd", "startDrag", "focusWait"];
+ var exports = ["select", "startSelect", "selectEnd", "selectAllEnd", "selectByWordsEnd",
+ "selectByLinesEnd", "dragWait", "dragWaitEnd", "focusWait"];
exports.forEach(function(x) {
mouseHandler[x] = this[x];
@@ -4075,50 +2371,51 @@ function DefaultHandlers(mouseHandler) {
if (button !== 0) {
var selectionRange = editor.getSelectionRange();
var selectionEmpty = selectionRange.isEmpty();
-
- if (selectionEmpty) {
- editor.moveCursorToPosition(pos);
- editor.selection.clearSelection();
- }
+ editor.$blockScrolling++;
+ if (selectionEmpty)
+ editor.selection.moveToPosition(pos);
+ editor.$blockScrolling--;
editor.textInput.onContextMenu(ev.domEvent);
return; // stopping event here breaks contextmenu on ff mac
}
+
+ this.mousedownEvent.time = Date.now();
if (inSelection && !editor.isFocused()) {
editor.focus();
if (this.$focusTimout && !this.$clickSelection && !editor.inMultiSelectMode) {
this.setState("focusWait");
this.captureMouse(ev);
- return ev.preventDefault();
+ return;
}
}
- if (!inSelection || this.$clickSelection || ev.getShiftKey() || editor.inMultiSelectMode) {
- this.startSelect(pos);
- } else if (inSelection) {
- this.mousedownEvent.time = (new Date()).getTime();
- this.setState("dragWait");
- }
-
this.captureMouse(ev);
+ this.startSelect(pos, ev.domEvent._clicks > 1);
return ev.preventDefault();
};
- this.startSelect = function(pos) {
+ this.startSelect = function(pos, waitForClickSelection) {
pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y);
- if (this.mousedownEvent.getShiftKey()) {
- this.editor.selection.selectToPosition(pos);
- }
- else if (!this.$clickSelection) {
- this.editor.moveCursorToPosition(pos);
- this.editor.selection.clearSelection();
- }
+ var editor = this.editor;
+ editor.$blockScrolling++;
+ if (this.mousedownEvent.getShiftKey())
+ editor.selection.selectToPosition(pos);
+ else if (!waitForClickSelection)
+ editor.selection.moveToPosition(pos);
+ if (!waitForClickSelection)
+ this.select();
+ if (editor.renderer.scroller.setCapture) {
+ editor.renderer.scroller.setCapture();
+ }
+ editor.setStyle("ace_selecting");
this.setState("select");
+ editor.$blockScrolling--;
};
this.select = function() {
var anchor, editor = this.editor;
var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);
-
+ editor.$blockScrolling++;
if (this.$clickSelection) {
var cmp = this.$clickSelection.comparePoint(cursor);
@@ -4134,7 +2431,7 @@ function DefaultHandlers(mouseHandler) {
editor.selection.setSelectionAnchor(anchor.row, anchor.column);
}
editor.selection.selectToPosition(cursor);
-
+ editor.$blockScrolling--;
editor.renderer.scrollCursorIntoView();
};
@@ -4142,7 +2439,7 @@ function DefaultHandlers(mouseHandler) {
var anchor, editor = this.editor;
var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);
var range = editor.selection[unitName](cursor.row, cursor.column);
-
+ editor.$blockScrolling++;
if (this.$clickSelection) {
var cmpStart = this.$clickSelection.comparePoint(range.start);
var cmpEnd = this.$clickSelection.comparePoint(range.end);
@@ -4166,99 +2463,29 @@ function DefaultHandlers(mouseHandler) {
editor.selection.setSelectionAnchor(anchor.row, anchor.column);
}
editor.selection.selectToPosition(cursor);
-
+ editor.$blockScrolling--;
editor.renderer.scrollCursorIntoView();
};
- this.startDrag = function() {
- var editor = this.editor;
- this.setState("drag");
- this.dragRange = editor.getSelectionRange();
- var style = editor.getSelectionStyle();
- this.dragSelectionMarker = editor.session.addMarker(this.dragRange, "ace_selection", style);
- editor.clearSelection();
- dom.addCssClass(editor.container, "ace_dragging");
- if (!this.$dragKeybinding) {
- this.$dragKeybinding = {
- handleKeyboard: function(data, hashId, keyString, keyCode) {
- if (keyString == "esc")
- return {command: this.command};
- },
- command: {
- exec: function(editor) {
- var self = editor.$mouseHandler;
- self.dragCursor = null;
- self.dragEnd();
- self.startSelect();
- }
- }
- }
+ this.selectEnd =
+ this.selectAllEnd =
+ this.selectByWordsEnd =
+ this.selectByLinesEnd = function() {
+ this.$clickSelection = null;
+ this.editor.unsetStyle("ace_selecting");
+ if (this.editor.renderer.scroller.releaseCapture) {
+ this.editor.renderer.scroller.releaseCapture();
}
-
- editor.keyBinding.addKeyboardHandler(this.$dragKeybinding);
};
this.focusWait = function() {
var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
- var time = (new Date()).getTime();
+ var time = Date.now();
if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout)
this.startSelect(this.mousedownEvent.getDocumentPosition());
};
- this.dragWait = function(e) {
- var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
- var time = (new Date()).getTime();
- var editor = this.editor;
-
- if (distance > DRAG_OFFSET) {
- this.startSelect(this.mousedownEvent.getDocumentPosition());
- } else if (time - this.mousedownEvent.time > editor.$mouseHandler.$dragDelay) {
- this.startDrag();
- }
- };
-
- this.dragWaitEnd = function(e) {
- this.mousedownEvent.domEvent = e;
- this.startSelect();
- };
-
- this.drag = function() {
- var editor = this.editor;
- this.dragCursor = editor.renderer.screenToTextCoordinates(this.x, this.y);
- editor.moveCursorToPosition(this.dragCursor);
- editor.renderer.scrollCursorIntoView();
- };
-
- this.dragEnd = function(e) {
- var editor = this.editor;
- var dragCursor = this.dragCursor;
- var dragRange = this.dragRange;
- dom.removeCssClass(editor.container, "ace_dragging");
- editor.session.removeMarker(this.dragSelectionMarker);
- editor.keyBinding.removeKeyboardHandler(this.$dragKeybinding);
-
- if (!dragCursor)
- return;
-
- editor.clearSelection();
- if (e && (e.ctrlKey || e.altKey)) {
- var session = editor.session;
- var newRange = dragRange;
- newRange.end = session.insert(dragCursor, session.getTextRange(dragRange));
- newRange.start = dragCursor;
- } else if (dragRange.contains(dragCursor.row, dragCursor.column)) {
- return;
- } else {
- var newRange = editor.moveText(dragRange, dragCursor);
- }
-
- if (!newRange)
- return;
-
- editor.selection.setSelectionRange(newRange);
- };
-
this.onDoubleClick = function(ev) {
var pos = ev.getDocumentPosition();
var editor = this.editor;
@@ -4270,13 +2497,13 @@ function DefaultHandlers(mouseHandler) {
range.start.column--;
range.end.column++;
}
- this.$clickSelection = range;
this.setState("select");
- return;
+ } else {
+ range = editor.selection.getWordRange(pos.row, pos.column);
+ this.setState("selectByWords");
}
-
- this.$clickSelection = editor.selection.getWordRange(pos.row, pos.column);
- this.setState("selectByWords");
+ this.$clickSelection = range;
+ this.select();
};
this.onTripleClick = function(ev) {
@@ -4284,7 +2511,14 @@ function DefaultHandlers(mouseHandler) {
var editor = this.editor;
this.setState("selectByLines");
- this.$clickSelection = editor.selection.getLineRange(pos.row);
+ var range = editor.getSelectionRange();
+ if (range.isMultiLine() && range.contains(pos.row, pos.column)) {
+ this.$clickSelection = editor.selection.getLineRange(range.start.row);
+ this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end;
+ } else {
+ this.$clickSelection = editor.selection.getLineRange(pos.row);
+ }
+ this.select();
};
this.onQuadClick = function(ev) {
@@ -4292,12 +2526,17 @@ function DefaultHandlers(mouseHandler) {
editor.selectAll();
this.$clickSelection = editor.getSelectionRange();
- this.setState("null");
+ this.setState("selectAll");
};
this.onMouseWheel = function(ev) {
- if (ev.getShiftKey() || ev.getAccelKey())
+ if (ev.getAccelKey())
return;
+ if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) {
+ ev.wheelX = ev.wheelY;
+ ev.wheelY = 0;
+ }
+
var t = ev.domEvent.timeStamp;
var dt = t - (this.$lastScrollTime||0);
@@ -4334,14 +2573,81 @@ function calcRangeOrientation(range, cursor) {
});
-ace.define('ace/mouse/default_gutter_handler', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/event'], function(require, exports, module) {
+ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+function Tooltip (parentNode) {
+ this.isOpen = false;
+ this.$element = null;
+ this.$parentNode = parentNode;
+}
+
+(function() {
+ this.$init = function() {
+ this.$element = dom.createElement("div");
+ this.$element.className = "ace_tooltip";
+ this.$element.style.display = "none";
+ this.$parentNode.appendChild(this.$element);
+ return this.$element;
+ };
+ this.getElement = function() {
+ return this.$element || this.$init();
+ };
+ this.setText = function(text) {
+ dom.setInnerText(this.getElement(), text);
+ };
+ this.setHtml = function(html) {
+ this.getElement().innerHTML = html;
+ };
+ this.setPosition = function(x, y) {
+ this.getElement().style.left = x + "px";
+ this.getElement().style.top = y + "px";
+ };
+ this.setClassName = function(className) {
+ dom.addCssClass(this.getElement(), className);
+ };
+ this.show = function(text, x, y) {
+ if (text != null)
+ this.setText(text);
+ if (x != null && y != null)
+ this.setPosition(x, y);
+ if (!this.isOpen) {
+ this.getElement().style.display = "block";
+ this.isOpen = true;
+ }
+ };
+
+ this.hide = function() {
+ if (this.isOpen) {
+ this.getElement().style.display = "none";
+ this.isOpen = false;
+ }
+ };
+ this.getHeight = function() {
+ return this.getElement().offsetHeight;
+ };
+ this.getWidth = function() {
+ return this.getElement().offsetWidth;
+ };
+
+}).call(Tooltip.prototype);
+
+exports.Tooltip = Tooltip;
+});
+ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"], function(require, exports, module) {
+"use strict";
var dom = require("../lib/dom");
+var oop = require("../lib/oop");
var event = require("../lib/event");
+var Tooltip = require("../tooltip").Tooltip;
function GutterHandler(mouseHandler) {
var editor = mouseHandler.editor;
var gutter = editor.renderer.$gutterLayer;
+ var tooltip = new GutterTooltip(editor.container);
mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) {
if (!editor.isFocused() || e.getButton() != 0)
@@ -4363,23 +2669,15 @@ function GutterHandler(mouseHandler) {
}
mouseHandler.$clickSelection = editor.selection.getLineRange(row);
}
- mouseHandler.captureMouse(e, "selectByLines");
+ mouseHandler.setState("selectByLines");
+ mouseHandler.captureMouse(e);
return e.preventDefault();
});
- var tooltipTimeout, mouseEvent, tooltip, tooltipAnnotation;
- function createTooltip() {
- tooltip = dom.createElement("div");
- tooltip.className = "ace_gutter-tooltip";
- tooltip.style.display = "none";
- editor.container.appendChild(tooltip);
- }
+ var tooltipTimeout, mouseEvent, tooltipAnnotation;
function showTooltip() {
- if (!tooltip) {
- createTooltip();
- }
var row = mouseEvent.getDocumentPosition().row;
var annotation = gutter.$annotations[row];
if (!annotation)
@@ -4397,33 +2695,33 @@ function GutterHandler(mouseHandler) {
return;
tooltipAnnotation = annotation.text.join("<br/>");
- tooltip.style.display = "block";
- tooltip.innerHTML = tooltipAnnotation;
+ tooltip.setHtml(tooltipAnnotation);
+ tooltip.show();
editor.on("mousewheel", hideTooltip);
- moveTooltip(mouseEvent);
+ if (mouseHandler.$tooltipFollowsMouse) {
+ moveTooltip(mouseEvent);
+ } else {
+ var gutterElement = gutter.$cells[editor.session.documentToScreenRow(row, 0)].element;
+ var rect = gutterElement.getBoundingClientRect();
+ var style = tooltip.getElement().style;
+ style.left = rect.right + "px";
+ style.top = rect.bottom + "px";
+ }
}
function hideTooltip() {
if (tooltipTimeout)
tooltipTimeout = clearTimeout(tooltipTimeout);
if (tooltipAnnotation) {
- tooltip.style.display = "none";
+ tooltip.hide();
tooltipAnnotation = null;
editor.removeEventListener("mousewheel", hideTooltip);
}
}
function moveTooltip(e) {
- var rect = editor.renderer.$gutter.getBoundingClientRect();
- tooltip.style.left = e.x + 15 + "px";
- if (e.y + 3 * editor.renderer.lineHeight + 15 < rect.bottom) {
- tooltip.style.bottom = "";
- tooltip.style.top = e.y + 15 + "px";
- } else {
- tooltip.style.top = "";
- tooltip.style.bottom = rect.bottom - e.y + 5 + "px";
- }
+ tooltip.setPosition(e.x, e.y);
}
mouseHandler.editor.setDefaultHandler("guttermousemove", function(e) {
@@ -4431,7 +2729,7 @@ function GutterHandler(mouseHandler) {
if (dom.hasCssClass(target, "ace_fold-widget"))
return hideTooltip();
- if (tooltipAnnotation)
+ if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse)
moveTooltip(e);
mouseEvent = e;
@@ -4460,12 +2758,39 @@ function GutterHandler(mouseHandler) {
editor.on("changeSession", hideTooltip);
}
+function GutterTooltip(parentNode) {
+ Tooltip.call(this, parentNode);
+}
+
+oop.inherits(GutterTooltip, Tooltip);
+
+(function(){
+ this.setPosition = function(x, y) {
+ var windowWidth = window.innerWidth || document.documentElement.clientWidth;
+ var windowHeight = window.innerHeight || document.documentElement.clientHeight;
+ var width = this.getWidth();
+ var height = this.getHeight();
+ x += 15;
+ y += 15;
+ if (x + width > windowWidth) {
+ x -= (x + width) - windowWidth;
+ }
+ if (y + height > windowHeight) {
+ y -= 20 + height;
+ }
+ Tooltip.prototype.setPosition.call(this, x, y);
+ };
+
+}).call(GutterTooltip.prototype);
+
+
+
exports.GutterHandler = GutterHandler;
});
-ace.define('ace/mouse/mouse_event', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/lib/useragent'], function(require, exports, module) {
-
+ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
var event = require("../lib/event");
var useragent = require("../lib/useragent");
@@ -4512,18 +2837,15 @@ var MouseEvent = exports.MouseEvent = function(domEvent, editor) {
var editor = this.editor;
- if (editor.getReadOnly()) {
+
+ var selectionRange = editor.getSelectionRange();
+ if (selectionRange.isEmpty())
this.$inSelection = false;
- }
else {
- var selectionRange = editor.getSelectionRange();
- if (selectionRange.isEmpty())
- this.$inSelection = false;
- else {
- var pos = this.getDocumentPosition();
- this.$inSelection = selectionRange.contains(pos.row, pos.column);
- }
+ var pos = this.getDocumentPosition();
+ this.$inSelection = selectionRange.contains(pos.row, pos.column);
}
+
return this.$inSelection;
};
this.getButton = function() {
@@ -4541,82 +2863,255 @@ var MouseEvent = exports.MouseEvent = function(domEvent, editor) {
});
-ace.define('ace/mouse/dragdrop', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
-
+ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
+var dom = require("../lib/dom");
var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+
+var AUTOSCROLL_DELAY = 200;
+var SCROLL_CURSOR_DELAY = 200;
+var SCROLL_CURSOR_HYSTERESIS = 5;
+
+function DragdropHandler(mouseHandler) {
-var DragdropHandler = function(mouseHandler) {
var editor = mouseHandler.editor;
+
+ var blankImage = dom.createElement("img");
+ blankImage.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
+ if (useragent.isOpera)
+ blankImage.style.cssText = "width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;";
+
+ var exports = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"];
+
+ exports.forEach(function(x) {
+ mouseHandler[x] = this[x];
+ }, this);
+ editor.addEventListener("mousedown", this.onMouseDown.bind(mouseHandler));
+
+
+ var mouseTarget = editor.container;
var dragSelectionMarker, x, y;
var timerId, range;
var dragCursor, counter = 0;
+ var dragOperation;
+ var isInternal;
+ var autoScrollStartTime;
+ var cursorMovedTime;
+ var cursorPointOnCaretMoved;
+
+ this.onDragStart = function(e) {
+ if (this.cancelDrag || !mouseTarget.draggable) {
+ var self = this;
+ setTimeout(function(){
+ self.startSelect();
+ self.captureMouse(e);
+ }, 0);
+ return e.preventDefault();
+ }
+ range = editor.getSelectionRange();
- var mouseTarget = editor.container;
- event.addListener(mouseTarget, "dragenter", function(e) {
- if (editor.getReadOnly())
- return;
- var types = e.dataTransfer.types;
- if (types && Array.prototype.indexOf.call(types, "text/plain") === -1)
+ var dataTransfer = e.dataTransfer;
+ dataTransfer.effectAllowed = editor.getReadOnly() ? "copy" : "copyMove";
+ if (useragent.isOpera) {
+ editor.container.appendChild(blankImage);
+ blankImage.scrollTop = 0;
+ }
+ dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0);
+ if (useragent.isOpera) {
+ editor.container.removeChild(blankImage);
+ }
+ dataTransfer.clearData();
+ dataTransfer.setData("Text", editor.session.getTextRange());
+
+ isInternal = true;
+ this.setState("drag");
+ };
+
+ this.onDragEnd = function(e) {
+ mouseTarget.draggable = false;
+ isInternal = false;
+ this.setState(null);
+ if (!editor.getReadOnly()) {
+ var dropEffect = e.dataTransfer.dropEffect;
+ if (!dragOperation && dropEffect == "move")
+ editor.session.remove(editor.getSelectionRange());
+ editor.renderer.$cursorLayer.setBlinking(true);
+ }
+ this.editor.unsetStyle("ace_dragging");
+ this.editor.renderer.setCursorStyle("");
+ };
+
+ this.onDragEnter = function(e) {
+ if (editor.getReadOnly() || !canAccept(e.dataTransfer))
return;
+ x = e.clientX;
+ y = e.clientY;
if (!dragSelectionMarker)
addDragMarker();
counter++;
+ e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);
return event.preventDefault(e);
- });
+ };
- event.addListener(mouseTarget, "dragover", function(e) {
- if (editor.getReadOnly())
- return;
- var types = e.dataTransfer.types;
- if (types && Array.prototype.indexOf.call(types, "text/plain") === -1)
+ this.onDragOver = function(e) {
+ if (editor.getReadOnly() || !canAccept(e.dataTransfer))
return;
- if (onMouseMoveTimer !== null)
- onMouseMoveTimer = null;
x = e.clientX;
y = e.clientY;
- return event.preventDefault(e);
- });
+ if (!dragSelectionMarker) {
+ addDragMarker();
+ counter++;
+ }
+ if (onMouseMoveTimer !== null)
+ onMouseMoveTimer = null;
- var onDragInterval = function() {
- dragCursor = editor.renderer.screenToTextCoordinates(x, y);
- editor.moveCursorToPosition(dragCursor);
- editor.renderer.scrollCursorIntoView();
+ e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);
+ return event.preventDefault(e);
};
- event.addListener(mouseTarget, "dragleave", function(e) {
+ this.onDragLeave = function(e) {
counter--;
if (counter <= 0 && dragSelectionMarker) {
clearDragMarker();
+ dragOperation = null;
return event.preventDefault(e);
}
- });
+ };
- event.addListener(mouseTarget, "drop", function(e) {
- if (!dragSelectionMarker)
+ this.onDrop = function(e) {
+ if (!dragCursor)
return;
- range.end = editor.session.insert(dragCursor, e.dataTransfer.getData('Text'));
- range.start = dragCursor;
+ var dataTransfer = e.dataTransfer;
+ if (isInternal) {
+ switch (dragOperation) {
+ case "move":
+ if (range.contains(dragCursor.row, dragCursor.column)) {
+ range = {
+ start: dragCursor,
+ end: dragCursor
+ };
+ } else {
+ range = editor.moveText(range, dragCursor);
+ }
+ break;
+ case "copy":
+ range = editor.moveText(range, dragCursor, true);
+ break;
+ }
+ } else {
+ var dropData = dataTransfer.getData('Text');
+ range = {
+ start: dragCursor,
+ end: editor.session.insert(dragCursor, dropData)
+ };
+ editor.focus();
+ dragOperation = null;
+ }
clearDragMarker();
- editor.focus();
return event.preventDefault(e);
- });
+ };
+
+ event.addListener(mouseTarget, "dragstart", this.onDragStart.bind(mouseHandler));
+ event.addListener(mouseTarget, "dragend", this.onDragEnd.bind(mouseHandler));
+ event.addListener(mouseTarget, "dragenter", this.onDragEnter.bind(mouseHandler));
+ event.addListener(mouseTarget, "dragover", this.onDragOver.bind(mouseHandler));
+ event.addListener(mouseTarget, "dragleave", this.onDragLeave.bind(mouseHandler));
+ event.addListener(mouseTarget, "drop", this.onDrop.bind(mouseHandler));
+
+ function scrollCursorIntoView(cursor, prevCursor) {
+ var now = Date.now();
+ var vMovement = !prevCursor || cursor.row != prevCursor.row;
+ var hMovement = !prevCursor || cursor.column != prevCursor.column;
+ if (!cursorMovedTime || vMovement || hMovement) {
+ editor.$blockScrolling += 1;
+ editor.moveCursorToPosition(cursor);
+ editor.$blockScrolling -= 1;
+ cursorMovedTime = now;
+ cursorPointOnCaretMoved = {x: x, y: y};
+ } else {
+ var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y);
+ if (distance > SCROLL_CURSOR_HYSTERESIS) {
+ cursorMovedTime = null;
+ } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) {
+ editor.renderer.scrollCursorIntoView();
+ cursorMovedTime = null;
+ }
+ }
+ }
+
+ function autoScroll(cursor, prevCursor) {
+ var now = Date.now();
+ var lineHeight = editor.renderer.layerConfig.lineHeight;
+ var characterWidth = editor.renderer.layerConfig.characterWidth;
+ var editorRect = editor.renderer.scroller.getBoundingClientRect();
+ var offsets = {
+ x: {
+ left: x - editorRect.left,
+ right: editorRect.right - x
+ },
+ y: {
+ top: y - editorRect.top,
+ bottom: editorRect.bottom - y
+ }
+ };
+ var nearestXOffset = Math.min(offsets.x.left, offsets.x.right);
+ var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom);
+ var scrollCursor = {row: cursor.row, column: cursor.column};
+ if (nearestXOffset / characterWidth <= 2) {
+ scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2);
+ }
+ if (nearestYOffset / lineHeight <= 1) {
+ scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1);
+ }
+ var vScroll = cursor.row != scrollCursor.row;
+ var hScroll = cursor.column != scrollCursor.column;
+ var vMovement = !prevCursor || cursor.row != prevCursor.row;
+ if (vScroll || (hScroll && !vMovement)) {
+ if (!autoScrollStartTime)
+ autoScrollStartTime = now;
+ else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY)
+ editor.renderer.scrollCursorIntoView(scrollCursor);
+ } else {
+ autoScrollStartTime = null;
+ }
+ }
+
+ function onDragInterval() {
+ var prevCursor = dragCursor;
+ dragCursor = editor.renderer.screenToTextCoordinates(x, y);
+ scrollCursorIntoView(dragCursor, prevCursor);
+ autoScroll(dragCursor, prevCursor);
+ }
function addDragMarker() {
range = editor.selection.toOrientedRange();
dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle());
editor.clearSelection();
+ if (editor.isFocused())
+ editor.renderer.$cursorLayer.setBlinking(false);
clearInterval(timerId);
+ onDragInterval();
timerId = setInterval(onDragInterval, 20);
counter = 0;
event.addListener(document, "mousemove", onMouseMove);
}
+
function clearDragMarker() {
clearInterval(timerId);
editor.session.removeMarker(dragSelectionMarker);
dragSelectionMarker = null;
+ editor.$blockScrolling += 1;
editor.selection.fromOrientedRange(range);
+ editor.$blockScrolling -= 1;
+ if (editor.isFocused() && !isInternal)
+ editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly());
+ range = null;
+ dragCursor = null;
counter = 0;
+ autoScrollStartTime = null;
+ cursorMovedTime = null;
event.removeListener(document, "mousemove", onMouseMove);
}
var onMouseMoveTimer = null;
@@ -4628,18 +3123,423 @@ var DragdropHandler = function(mouseHandler) {
}, 20);
}
}
-};
+
+ function canAccept(dataTransfer) {
+ var types = dataTransfer.types;
+ return !types || Array.prototype.some.call(types, function(type) {
+ return type == 'text/plain' || type == 'Text';
+ });
+ }
+
+ function getDropEffect(e) {
+ var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized'];
+ var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized'];
+
+ var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey;
+ var effectAllowed = "uninitialized";
+ try {
+ effectAllowed = e.dataTransfer.effectAllowed.toLowerCase();
+ } catch (e) {}
+ var dropEffect = "none";
+
+ if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0)
+ dropEffect = "copy";
+ else if (moveAllowed.indexOf(effectAllowed) >= 0)
+ dropEffect = "move";
+ else if (copyAllowed.indexOf(effectAllowed) >= 0)
+ dropEffect = "copy";
+
+ return dropEffect;
+ }
+}
+
+(function() {
+
+ this.dragWait = function() {
+ var interval = Date.now() - this.mousedownEvent.time;
+ if (interval > this.editor.getDragDelay())
+ this.startDrag();
+ };
+
+ this.dragWaitEnd = function() {
+ var target = this.editor.container;
+ target.draggable = false;
+ this.startSelect(this.mousedownEvent.getDocumentPosition());
+ this.selectEnd();
+ };
+
+ this.dragReadyEnd = function(e) {
+ this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly());
+ this.editor.unsetStyle("ace_dragging");
+ this.editor.renderer.setCursorStyle("");
+ this.dragWaitEnd();
+ };
+
+ this.startDrag = function(){
+ this.cancelDrag = false;
+ var editor = this.editor;
+ var target = editor.container;
+ target.draggable = true;
+ editor.renderer.$cursorLayer.setBlinking(false);
+ editor.setStyle("ace_dragging");
+ var cursorStyle = useragent.isWin ? "default" : "move";
+ editor.renderer.setCursorStyle(cursorStyle);
+ this.setState("dragReady");
+ };
+
+ this.onMouseDrag = function(e) {
+ var target = this.editor.container;
+ if (useragent.isIE && this.state == "dragReady") {
+ var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
+ if (distance > 3)
+ target.dragDrop();
+ }
+ if (this.state === "dragWait") {
+ var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
+ if (distance > 0) {
+ target.draggable = false;
+ this.startSelect(this.mousedownEvent.getDocumentPosition());
+ }
+ }
+ };
+
+ this.onMouseDown = function(e) {
+ if (!this.$dragEnabled)
+ return;
+ this.mousedownEvent = e;
+ var editor = this.editor;
+
+ var inSelection = e.inSelection();
+ var button = e.getButton();
+ var clickCount = e.domEvent.detail || 1;
+ if (clickCount === 1 && button === 0 && inSelection) {
+ if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey()))
+ return;
+ this.mousedownEvent.time = Date.now();
+ var eventTarget = e.domEvent.target || e.domEvent.srcElement;
+ if ("unselectable" in eventTarget)
+ eventTarget.unselectable = "on";
+ if (editor.getDragDelay()) {
+ if (useragent.isWebKit) {
+ this.cancelDrag = true;
+ var mouseTarget = editor.container;
+ mouseTarget.draggable = true;
+ }
+ this.setState("dragWait");
+ } else {
+ this.startDrag();
+ }
+ this.captureMouse(e, this.onMouseDrag.bind(this));
+ e.defaultPrevented = true;
+ }
+ };
+
+}).call(DragdropHandler.prototype);
+
+
+function calcDistance(ax, ay, bx, by) {
+ return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));
+}
exports.DragdropHandler = DragdropHandler;
+
+});
+
+ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+var dom = require("./dom");
+
+exports.get = function (url, callback) {
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', url, true);
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === 4) {
+ callback(xhr.responseText);
+ }
+ };
+ xhr.send(null);
+};
+
+exports.loadScript = function(path, callback) {
+ var head = dom.getDocumentHead();
+ var s = document.createElement('script');
+
+ s.src = path;
+ head.appendChild(s);
+
+ s.onload = s.onreadystatechange = function(_, isAbort) {
+ if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") {
+ s = s.onload = s.onreadystatechange = null;
+ if (!isAbort)
+ callback();
+ }
+ };
+};
+exports.qualifyURL = function(url) {
+ var a = document.createElement('a');
+ a.href = url;
+ return a.href;
+}
+
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+EventEmitter._emit =
+EventEmitter._dispatchEvent = function(eventName, e) {
+ this._eventRegistry || (this._eventRegistry = {});
+ this._defaultHandlers || (this._defaultHandlers = {});
+
+ var listeners = this._eventRegistry[eventName] || [];
+ var defaultHandler = this._defaultHandlers[eventName];
+ if (!listeners.length && !defaultHandler)
+ return;
+
+ if (typeof e != "object" || !e)
+ e = {};
+
+ if (!e.type)
+ e.type = eventName;
+ if (!e.stopPropagation)
+ e.stopPropagation = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+EventEmitter.removeListener =
+EventEmitter.removeEventListener = function(eventName, callback) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ return;
+
+ var index = listeners.indexOf(callback);
+ if (index !== -1)
+ listeners.splice(index, 1);
+};
+
+EventEmitter.removeAllListeners = function(eventName) {
+ if (this._eventRegistry) this._eventRegistry[eventName] = [];
+};
+
+exports.EventEmitter = EventEmitter;
+
+});
+
+ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"no use strict";
+
+var oop = require("./oop");
+var EventEmitter = require("./event_emitter").EventEmitter;
+
+var optionsProvider = {
+ setOptions: function(optList) {
+ Object.keys(optList).forEach(function(key) {
+ this.setOption(key, optList[key]);
+ }, this);
+ },
+ getOptions: function(optionNames) {
+ var result = {};
+ if (!optionNames) {
+ optionNames = Object.keys(this.$options);
+ } else if (!Array.isArray(optionNames)) {
+ result = optionNames;
+ optionNames = Object.keys(result);
+ }
+ optionNames.forEach(function(key) {
+ result[key] = this.getOption(key);
+ }, this);
+ return result;
+ },
+ setOption: function(name, value) {
+ if (this["$" + name] === value)
+ return;
+ var opt = this.$options[name];
+ if (!opt) {
+ return warn('misspelled option "' + name + '"');
+ }
+ if (opt.forwardTo)
+ return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);
+
+ if (!opt.handlesSet)
+ this["$" + name] = value;
+ if (opt && opt.set)
+ opt.set.call(this, value);
+ },
+ getOption: function(name) {
+ var opt = this.$options[name];
+ if (!opt) {
+ return warn('misspelled option "' + name + '"');
+ }
+ if (opt.forwardTo)
+ return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);
+ return opt && opt.get ? opt.get.call(this) : this["$" + name];
+ }
+};
+
+function warn(message) {
+ if (typeof console != "undefined" && console.warn)
+ console.warn.apply(console, arguments);
+}
+
+function reportError(msg, data) {
+ var e = new Error(msg);
+ e.data = data;
+ if (typeof console == "object" && console.error)
+ console.error(e);
+ setTimeout(function() { throw e; });
+}
+
+var AppConfig = function() {
+ this.$defaultOptions = {};
+};
+
+(function() {
+ oop.implement(this, EventEmitter);
+ this.defineOptions = function(obj, path, options) {
+ if (!obj.$options)
+ this.$defaultOptions[path] = obj.$options = {};
+
+ Object.keys(options).forEach(function(key) {
+ var opt = options[key];
+ if (typeof opt == "string")
+ opt = {forwardTo: opt};
+
+ opt.name || (opt.name = key);
+ obj.$options[opt.name] = opt;
+ if ("initialValue" in opt)
+ obj["$" + opt.name] = opt.initialValue;
+ });
+ oop.implement(obj, optionsProvider);
+
+ return this;
+ };
+
+ this.resetOptions = function(obj) {
+ Object.keys(obj.$options).forEach(function(key) {
+ var opt = obj.$options[key];
+ if ("value" in opt)
+ obj.setOption(key, opt.value);
+ });
+ };
+
+ this.setDefaultValue = function(path, name, value) {
+ var opts = this.$defaultOptions[path] || (this.$defaultOptions[path] = {});
+ if (opts[name]) {
+ if (opts.forwardTo)
+ this.setDefaultValue(opts.forwardTo, name, value);
+ else
+ opts[name].value = value;
+ }
+ };
+
+ this.setDefaultValues = function(path, optionHash) {
+ Object.keys(optionHash).forEach(function(key) {
+ this.setDefaultValue(path, key, optionHash[key]);
+ }, this);
+ };
+
+ this.warn = warn;
+ this.reportError = reportError;
+
+}).call(AppConfig.prototype);
+
+exports.AppConfig = AppConfig;
+
});
-ace.define('ace/config', ['require', 'exports', 'module' , 'ace/lib/lang', 'ace/lib/oop', 'ace/lib/net', 'ace/lib/event_emitter'], function(require, exports, module) {
+ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"], function(require, exports, module) {
"no use strict";
var lang = require("./lib/lang");
var oop = require("./lib/oop");
var net = require("./lib/net");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var AppConfig = require("./lib/app_config").AppConfig;
+
+module.exports = exports = new AppConfig();
var global = (function() {
return this;
@@ -4672,8 +3572,6 @@ exports.set = function(key, value) {
exports.all = function() {
return lang.copyObject(options);
};
-oop.implement(exports, EventEmitter);
-
exports.moduleUrl = function(name, component) {
if (options.$moduleUrls[name])
return options.$moduleUrls[name];
@@ -4681,9 +3579,9 @@ exports.moduleUrl = function(name, component) {
var parts = name.split("/");
component = component || parts[parts.length - 2] || "";
var sep = component == "snippets" ? "/" : "-";
- var base = parts[parts.length - 1];
- if (sep == "-") {
- var re = new RegExp("^" + component + "[\-_]|[\-_]" + component + "$", "g");
+ var base = parts[parts.length - 1];
+ if (component == "worker" && sep == "-") {
+ var re = new RegExp("^" + component + "[\\-_]|[\\-_]" + component + "$", "g");
base = base.replace(re, "");
}
@@ -4714,7 +3612,7 @@ exports.loadModule = function(moduleName, onLoad) {
try {
module = require(moduleName);
- } catch (e) {};
+ } catch (e) {}
if (module && !exports.$loading[moduleName])
return onLoad && onLoad(module);
@@ -4741,16 +3639,19 @@ exports.loadModule = function(moduleName, onLoad) {
return afterLoad();
net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad);
};
-exports.init = function() {
- options.packaged = require.packaged || module.packaged || (global.define && define.packaged);
+init(true);function init(packaged) {
+
+ options.packaged = packaged || require.packaged || module.packaged || (global.define && define.packaged);
if (!global.document)
return "";
var scriptOptions = {};
var scriptUrl = "";
-
- var scripts = document.getElementsByTagName("script");
+ var currentScript = (document.currentScript || document._currentScript ); // native or polyfill
+ var currentDocument = currentScript && currentScript.ownerDocument || document;
+
+ var scripts = currentDocument.getElementsByTagName("script");
for (var i=0; i<scripts.length; i++) {
var script = scripts[i];
@@ -4787,258 +3688,185 @@ exports.init = function() {
exports.set(key, scriptOptions[key]);
};
+exports.init = init;
+
function deHyphenate(str) {
return str.replace(/-(.)/g, function(m, m1) { return m1.toUpperCase(); });
}
-var optionsProvider = {
- setOptions: function(optList) {
- Object.keys(optList).forEach(function(key) {
- this.setOption(key, optList[key]);
- }, this);
- },
- getOptions: function(optionNames) {
- var result = {};
- if (!optionNames) {
- optionNames = Object.keys(this.$options);
- } else if (!Array.isArray(optionNames)) {
- result = optionNames;
- optionNames = Object.keys(result);
- }
- optionNames.forEach(function(key) {
- result[key] = this.getOption(key);
- }, this);
- return result;
- },
- setOption: function(name, value) {
- if (this["$" + name] === value)
- return;
- var opt = this.$options[name];
- if (!opt)
- return undefined;
- if (opt.forwardTo)
- return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);
-
- if (!opt.handlesSet)
- this["$" + name] = value;
- if (opt && opt.set)
- opt.set.call(this, value);
- },
- getOption: function(name) {
- var opt = this.$options[name];
- if (!opt)
- return undefined;
- if (opt.forwardTo)
- return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);
- return opt && opt.get ? opt.get.call(this) : this["$" + name];
- }
-};
+});
-var defaultOptions = {};
-exports.defineOptions = function(obj, path, options) {
- if (!obj.$options)
- defaultOptions[path] = obj.$options = {};
+ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"], function(require, exports, module) {
+"use strict";
- Object.keys(options).forEach(function(key) {
- var opt = options[key];
- if (typeof opt == "string")
- opt = {forwardTo: opt};
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+var DefaultHandlers = require("./default_handlers").DefaultHandlers;
+var DefaultGutterHandler = require("./default_gutter_handler").GutterHandler;
+var MouseEvent = require("./mouse_event").MouseEvent;
+var DragdropHandler = require("./dragdrop_handler").DragdropHandler;
+var config = require("../config");
- opt.name || (opt.name = key);
- obj.$options[opt.name] = opt;
- if ("initialValue" in opt)
- obj["$" + opt.name] = opt.initialValue;
- });
- oop.implement(obj, optionsProvider);
+var MouseHandler = function(editor) {
+ var _self = this;
+ this.editor = editor;
- return this;
-};
+ new DefaultHandlers(this);
+ new DefaultGutterHandler(this);
+ new DragdropHandler(this);
-exports.resetOptions = function(obj) {
- Object.keys(obj.$options).forEach(function(key) {
- var opt = obj.$options[key];
- if ("value" in opt)
- obj.setOption(key, opt.value);
- });
-};
+ var focusEditor = function(e) {
+ if (!document.hasFocus || !document.hasFocus())
+ window.focus();
+ editor.focus();
+ };
-exports.setDefaultValue = function(path, name, value) {
- var opts = defaultOptions[path] || (defaultOptions[path] = {});
- if (opts[name]) {
- if (opts.forwardTo)
- exports.setDefaultValue(opts.forwardTo, name, value)
- else
- opts[name].value = value;
+ var mouseTarget = editor.renderer.getMouseEventTarget();
+ event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
+ event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"));
+ event.addMultiMouseDownListener(mouseTarget, [400, 300, 250], this, "onMouseEvent");
+ if (editor.renderer.scrollBarV) {
+ event.addMultiMouseDownListener(editor.renderer.scrollBarV.inner, [400, 300, 250], this, "onMouseEvent");
+ event.addMultiMouseDownListener(editor.renderer.scrollBarH.inner, [400, 300, 250], this, "onMouseEvent");
+ if (useragent.isIE) {
+ event.addListener(editor.renderer.scrollBarV.element, "mousedown", focusEditor);
+ event.addListener(editor.renderer.scrollBarH.element, "mousedown", focusEditor);
+ }
}
-};
-
-exports.setDefaultValues = function(path, optionHash) {
- Object.keys(optionHash).forEach(function(key) {
- exports.setDefaultValue(path, key, optionHash[key]);
- });
-};
+ event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
-});
-ace.define('ace/lib/net', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ var gutterEl = editor.renderer.$gutter;
+ event.addListener(gutterEl, "mousedown", this.onMouseEvent.bind(this, "guttermousedown"));
+ event.addListener(gutterEl, "click", this.onMouseEvent.bind(this, "gutterclick"));
+ event.addListener(gutterEl, "dblclick", this.onMouseEvent.bind(this, "gutterdblclick"));
+ event.addListener(gutterEl, "mousemove", this.onMouseEvent.bind(this, "guttermousemove"));
-var dom = require("./dom");
+ event.addListener(mouseTarget, "mousedown", focusEditor);
-exports.get = function (url, callback) {
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url, true);
- xhr.onreadystatechange = function () {
- if (xhr.readyState === 4) {
- callback(xhr.responseText);
- }
- };
- xhr.send(null);
-};
+ event.addListener(gutterEl, "mousedown", function(e) {
+ editor.focus();
+ return event.preventDefault(e);
+ });
-exports.loadScript = function(path, callback) {
- var head = dom.getDocumentHead();
- var s = document.createElement('script');
+ editor.on("mousemove", function(e){
+ if (_self.state || _self.$dragDelay || !_self.$dragEnabled)
+ return;
- s.src = path;
- head.appendChild(s);
+ var character = editor.renderer.screenToTextCoordinates(e.x, e.y);
+ var range = editor.session.selection.getRange();
+ var renderer = editor.renderer;
- s.onload = s.onreadystatechange = function(_, isAbort) {
- if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") {
- s = s.onload = s.onreadystatechange = null;
- if (!isAbort)
- callback();
+ if (!range.isEmpty() && range.insideStart(character.row, character.column)) {
+ renderer.setCursorStyle("default");
+ } else {
+ renderer.setCursorStyle("");
}
- };
+ });
};
-});
-
-ace.define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-var EventEmitter = {};
-var stopPropagation = function() { this.propagationStopped = true; };
-var preventDefault = function() { this.defaultPrevented = true; };
-
-EventEmitter._emit =
-EventEmitter._dispatchEvent = function(eventName, e) {
- this._eventRegistry || (this._eventRegistry = {});
- this._defaultHandlers || (this._defaultHandlers = {});
-
- var listeners = this._eventRegistry[eventName] || [];
- var defaultHandler = this._defaultHandlers[eventName];
- if (!listeners.length && !defaultHandler)
- return;
-
- if (typeof e != "object" || !e)
- e = {};
-
- if (!e.type)
- e.type = eventName;
- if (!e.stopPropagation)
- e.stopPropagation = stopPropagation;
- if (!e.preventDefault)
- e.preventDefault = preventDefault;
+(function() {
+ this.onMouseEvent = function(name, e) {
+ this.editor._emit(name, new MouseEvent(e, this.editor));
+ };
- for (var i=0; i<listeners.length; i++) {
- listeners[i](e, this);
- if (e.propagationStopped)
- break;
- }
-
- if (defaultHandler && !e.defaultPrevented)
- return defaultHandler(e, this);
-};
+ this.onMouseMove = function(name, e) {
+ var listeners = this.editor._eventRegistry && this.editor._eventRegistry.mousemove;
+ if (!listeners || !listeners.length)
+ return;
+ this.editor._emit(name, new MouseEvent(e, this.editor));
+ };
-EventEmitter._signal = function(eventName, e) {
- var listeners = (this._eventRegistry || {})[eventName];
- if (!listeners)
- return;
+ this.onMouseWheel = function(name, e) {
+ var mouseEvent = new MouseEvent(e, this.editor);
+ mouseEvent.speed = this.$scrollSpeed * 2;
+ mouseEvent.wheelX = e.wheelX;
+ mouseEvent.wheelY = e.wheelY;
- for (var i=0; i<listeners.length; i++)
- listeners[i](e, this);
-};
+ this.editor._emit(name, mouseEvent);
+ };
-EventEmitter.once = function(eventName, callback) {
- var _self = this;
- callback && this.addEventListener(eventName, function newCallback() {
- _self.removeEventListener(eventName, newCallback);
- callback.apply(null, arguments);
- });
-};
+ this.setState = function(state) {
+ this.state = state;
+ };
+ this.captureMouse = function(ev, mouseMoveHandler) {
+ this.x = ev.x;
+ this.y = ev.y;
-EventEmitter.setDefaultHandler = function(eventName, callback) {
- var handlers = this._defaultHandlers
- if (!handlers)
- handlers = this._defaultHandlers = {_disabled_: {}};
-
- if (handlers[eventName]) {
- var old = handlers[eventName];
- var disabled = handlers._disabled_[eventName];
- if (!disabled)
- handlers._disabled_[eventName] = disabled = [];
- disabled.push(old);
- var i = disabled.indexOf(callback);
- if (i != -1)
- disabled.splice(i, 1);
- }
- handlers[eventName] = callback;
-};
-EventEmitter.removeDefaultHandler = function(eventName, callback) {
- var handlers = this._defaultHandlers
- if (!handlers)
- return;
- var disabled = handlers._disabled_[eventName];
-
- if (handlers[eventName] == callback) {
- var old = handlers[eventName];
- if (disabled)
- this.setDefaultHandler(eventName, disabled.pop());
- } else if (disabled) {
- var i = disabled.indexOf(callback);
- if (i != -1)
- disabled.splice(i, 1);
- }
-};
+ this.isMousePressed = true;
+ var renderer = this.editor.renderer;
+ if (renderer.$keepTextAreaAtCursor)
+ renderer.$keepTextAreaAtCursor = null;
-EventEmitter.on =
-EventEmitter.addEventListener = function(eventName, callback, capturing) {
- this._eventRegistry = this._eventRegistry || {};
+ var self = this;
+ var onMouseMove = function(e) {
+ if (!e) return;
+ if (useragent.isWebKit && !e.which && self.releaseMouse)
+ return self.releaseMouse();
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- listeners = this._eventRegistry[eventName] = [];
+ self.x = e.clientX;
+ self.y = e.clientY;
+ mouseMoveHandler && mouseMoveHandler(e);
+ self.mouseEvent = new MouseEvent(e, self.editor);
+ self.$mouseMoved = true;
+ };
- if (listeners.indexOf(callback) == -1)
- listeners[capturing ? "unshift" : "push"](callback);
- return callback;
-};
+ var onCaptureEnd = function(e) {
+ clearInterval(timerId);
+ onCaptureInterval();
+ self[self.state + "End"] && self[self.state + "End"](e);
+ self.state = "";
+ if (renderer.$keepTextAreaAtCursor == null) {
+ renderer.$keepTextAreaAtCursor = true;
+ renderer.$moveTextAreaToCursor();
+ }
+ self.isMousePressed = false;
+ self.$onCaptureMouseMove = self.releaseMouse = null;
+ e && self.onMouseEvent("mouseup", e);
+ };
-EventEmitter.off =
-EventEmitter.removeListener =
-EventEmitter.removeEventListener = function(eventName, callback) {
- this._eventRegistry = this._eventRegistry || {};
+ var onCaptureInterval = function() {
+ self[self.state] && self[self.state]();
+ self.$mouseMoved = false;
+ };
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- return;
+ if (useragent.isOldIE && ev.domEvent.type == "dblclick") {
+ return setTimeout(function() {onCaptureEnd(ev);});
+ }
- var index = listeners.indexOf(callback);
- if (index !== -1)
- listeners.splice(index, 1);
-};
+ self.$onCaptureMouseMove = onMouseMove;
+ self.releaseMouse = event.capture(this.editor.container, onMouseMove, onCaptureEnd);
+ var timerId = setInterval(onCaptureInterval, 20);
+ };
+ this.releaseMouse = null;
+ this.cancelContextMenu = function() {
+ var stop = function(e) {
+ if (e && e.domEvent && e.domEvent.type != "contextmenu")
+ return;
+ this.editor.off("nativecontextmenu", stop);
+ if (e && e.domEvent)
+ event.stopEvent(e.domEvent);
+ }.bind(this);
+ setTimeout(stop, 10);
+ this.editor.on("nativecontextmenu", stop);
+ };
+}).call(MouseHandler.prototype);
-EventEmitter.removeAllListeners = function(eventName) {
- if (this._eventRegistry) this._eventRegistry[eventName] = [];
-};
+config.defineOptions(MouseHandler.prototype, "mouseHandler", {
+ scrollSpeed: {initialValue: 2},
+ dragDelay: {initialValue: (useragent.isMac ? 150 : 0)},
+ dragEnabled: {initialValue: true},
+ focusTimout: {initialValue: 0},
+ tooltipFollowsMouse: {initialValue: true}
+});
-exports.EventEmitter = EventEmitter;
+exports.MouseHandler = MouseHandler;
});
-ace.define('ace/mouse/fold_handler', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/mouse/fold_handler",["require","exports","module"], function(require, exports, module) {
+"use strict";
function FoldHandler(editor) {
@@ -5080,7 +3908,7 @@ function FoldHandler(editor) {
var range = data.range || data.firstRange;
if (range) {
- var row = range.start.row;
+ row = range.start.row;
var fold = session.getFoldAt(row, session.getLine(row).length, 1);
if (fold) {
@@ -5099,15 +3927,15 @@ exports.FoldHandler = FoldHandler;
});
-ace.define('ace/keyboard/keybinding', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/event'], function(require, exports, module) {
-
+ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"], function(require, exports, module) {
+"use strict";
var keyUtil = require("../lib/keys");
var event = require("../lib/event");
var KeyBinding = function(editor) {
this.$editor = editor;
- this.$data = { };
+ this.$data = {editor: editor};
this.$handlers = [];
this.setDefaultHandler(editor.commands);
};
@@ -5117,7 +3945,6 @@ var KeyBinding = function(editor) {
this.removeKeyboardHandler(this.$defaultHandler);
this.$defaultHandler = kb;
this.addKeyboardHandler(kb, 0);
- this.$data = {editor: this.$editor};
};
this.setKeyboardHandler = function(kb) {
@@ -5134,6 +3961,8 @@ var KeyBinding = function(editor) {
this.addKeyboardHandler = function(kb, pos) {
if (!kb)
return;
+ if (typeof kb == "function" && !kb.handleKeyboard)
+ kb.handleKeyboard = kb;
var i = this.$handlers.indexOf(kb);
if (i != -1)
this.$handlers.splice(i, 1);
@@ -5159,8 +3988,16 @@ var KeyBinding = function(editor) {
this.getKeyboardHandler = function() {
return this.$handlers[this.$handlers.length - 1];
};
+
+ this.getStatusText = function() {
+ var data = this.$data;
+ var editor = data.editor;
+ return this.$handlers.map(function(h) {
+ return h.getStatusText && h.getStatusText(editor, data) || "";
+ }).filter(Boolean).join(" ");
+ };
- this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {
+ this.$callKeyboardHandlers = function(hashId, keyString, keyCode, e) {
var toExecute;
var success = false;
var commands = this.$editor.commands;
@@ -5176,8 +4013,11 @@ var KeyBinding = function(editor) {
} else {
success = commands.exec(toExecute.command, this.$editor, toExecute.args, e);
}
- if (success && e && hashId != -1 && toExecute.passEvent != true)
+ if (success && e && hashId != -1 &&
+ toExecute.passEvent != true && toExecute.command.passEvent != true
+ ) {
event.stopEvent(e);
+ }
if (success)
break;
}
@@ -5200,1639 +4040,247 @@ var KeyBinding = function(editor) {
exports.KeyBinding = KeyBinding;
});
-ace.define('ace/edit_session', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/config', 'ace/lib/event_emitter', 'ace/selection', 'ace/mode/text', 'ace/range', 'ace/document', 'ace/background_tokenizer', 'ace/search_highlight', 'ace/edit_session/folding', 'ace/edit_session/bracket_match'], function(require, exports, module) {
-
-
-var oop = require("./lib/oop");
-var lang = require("./lib/lang");
-var config = require("./config");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Selection = require("./selection").Selection;
-var TextMode = require("./mode/text").Mode;
-var Range = require("./range").Range;
-var Document = require("./document").Document;
-var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer;
-var SearchHighlight = require("./search_highlight").SearchHighlight;
-
-var EditSession = function(text, mode) {
- this.$breakpoints = [];
- this.$decorations = [];
- this.$frontMarkers = {};
- this.$backMarkers = {};
- this.$markerId = 1;
- this.$undoSelect = true;
-
- this.$foldData = [];
- this.$foldData.toString = function() {
- return this.join("\n");
- }
- this.on("changeFold", this.onChangeFold.bind(this));
- this.$onChange = this.onChange.bind(this);
-
- if (typeof text != "object" || !text.getLine)
- text = new Document(text);
-
- this.setDocument(text);
- this.selection = new Selection(this);
-
- config.resetOptions(this);
- this.setMode(mode);
- config._emit("session", this);
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
};
-
-
-(function() {
-
- oop.implement(this, EventEmitter);
- this.setDocument = function(doc) {
- if (this.doc)
- this.doc.removeListener("change", this.$onChange);
-
- this.doc = doc;
- doc.on("change", this.$onChange);
-
- if (this.bgTokenizer)
- this.bgTokenizer.setDocument(this.getDocument());
-
- this.resetCaches();
- };
- this.getDocument = function() {
- return this.doc;
- };
- this.$resetRowCache = function(docRow) {
- if (!docRow) {
- this.$docRowCache = [];
- this.$screenRowCache = [];
- return;
- }
- var l = this.$docRowCache.length;
- var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;
- if (l > i) {
- this.$docRowCache.splice(i, l);
- this.$screenRowCache.splice(i, l);
- }
- };
-
- this.$getRowCacheIndex = function(cacheArray, val) {
- var low = 0;
- var hi = cacheArray.length - 1;
-
- while (low <= hi) {
- var mid = (low + hi) >> 1;
- var c = cacheArray[mid];
-
- if (val > c)
- low = mid + 1;
- else if (val < c)
- hi = mid - 1;
- else
- return mid;
- }
-
- return low -1;
- };
-
- this.resetCaches = function() {
- this.$modified = true;
- this.$wrapData = [];
- this.$rowLengthCache = [];
- this.$resetRowCache(0);
- if (this.bgTokenizer)
- this.bgTokenizer.start(0);
- };
-
- this.onChangeFold = function(e) {
- var fold = e.data;
- this.$resetRowCache(fold.start.row);
+var Range = function(startRow, startColumn, endRow, endColumn) {
+ this.start = {
+ row: startRow,
+ column: startColumn
};
- this.onChange = function(e) {
- var delta = e.data;
- this.$modified = true;
-
- this.$resetRowCache(delta.range.start.row);
-
- var removedFolds = this.$updateInternalDataOnChange(e);
- if (!this.$fromUndo && this.$undoManager && !delta.ignore) {
- this.$deltasDoc.push(delta);
- if (removedFolds && removedFolds.length != 0) {
- this.$deltasFold.push({
- action: "removeFolds",
- folds: removedFolds
- });
- }
-
- this.$informUndoManager.schedule();
- }
-
- this.bgTokenizer.$updateOnChange(delta);
- this._emit("change", e);
+ this.end = {
+ row: endRow,
+ column: endColumn
};
- this.setValue = function(text) {
- this.doc.setValue(text);
- this.selection.moveCursorTo(0, 0);
- this.selection.clearSelection();
+};
- this.$resetRowCache(0);
- this.$deltas = [];
- this.$deltasDoc = [];
- this.$deltasFold = [];
- this.getUndoManager().reset();
+(function() {
+ this.isEqual = function(range) {
+ return this.start.row === range.start.row &&
+ this.end.row === range.end.row &&
+ this.start.column === range.start.column &&
+ this.end.column === range.end.column;
};
- this.getValue =
this.toString = function() {
- return this.doc.getValue();
- };
- this.getSelection = function() {
- return this.selection;
- };
- this.getState = function(row) {
- return this.bgTokenizer.getState(row);
- };
- this.getTokens = function(row) {
- return this.bgTokenizer.getTokens(row);
- };
- this.getTokenAt = function(row, column) {
- var tokens = this.bgTokenizer.getTokens(row);
- var token, c = 0;
- if (column == null) {
- i = tokens.length - 1;
- c = this.getLine(row).length;
- } else {
- for (var i = 0; i < tokens.length; i++) {
- c += tokens[i].value.length;
- if (c >= column)
- break;
- }
- }
- token = tokens[i];
- if (!token)
- return null;
- token.index = i;
- token.start = c - token.value.length;
- return token;
- };
- this.setUndoManager = function(undoManager) {
- this.$undoManager = undoManager;
- this.$deltas = [];
- this.$deltasDoc = [];
- this.$deltasFold = [];
-
- if (this.$informUndoManager)
- this.$informUndoManager.cancel();
-
- if (undoManager) {
- var self = this;
-
- this.$syncInformUndoManager = function() {
- self.$informUndoManager.cancel();
-
- if (self.$deltasFold.length) {
- self.$deltas.push({
- group: "fold",
- deltas: self.$deltasFold
- });
- self.$deltasFold = [];
- }
-
- if (self.$deltasDoc.length) {
- self.$deltas.push({
- group: "doc",
- deltas: self.$deltasDoc
- });
- self.$deltasDoc = [];
- }
-
- if (self.$deltas.length > 0) {
- undoManager.execute({
- action: "aceupdate",
- args: [self.$deltas, self],
- merge: self.mergeUndoDeltas
- });
- }
- self.mergeUndoDeltas = false;
- self.$deltas = [];
- }
- this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);
- }
- };
- this.markUndoGroup = function() {
- if (this.$syncInformUndoManager)
- this.$syncInformUndoManager();
- };
-
- this.$defaultUndoManager = {
- undo: function() {},
- redo: function() {},
- reset: function() {}
- };
- this.getUndoManager = function() {
- return this.$undoManager || this.$defaultUndoManager;
- };
- this.getTabString = function() {
- if (this.getUseSoftTabs()) {
- return lang.stringRepeat(" ", this.getTabSize());
- } else {
- return "\t";
- }
- };
- this.setUseSoftTabs = function(val) {
- this.setOption("useSoftTabs", val);
- };
- this.getUseSoftTabs = function() {
- return this.$useSoftTabs && !this.$mode.$indentWithTabs;
- };
- this.setTabSize = function(tabSize) {
- this.setOption("tabSize", tabSize)
- };
- this.getTabSize = function() {
- return this.$tabSize;
- };
- this.isTabStop = function(position) {
- return this.$useSoftTabs && (position.column % this.$tabSize == 0);
- };
-
- this.$overwrite = false;
- this.setOverwrite = function(overwrite) {
- this.setOption("overwrite", overwrite)
- };
- this.getOverwrite = function() {
- return this.$overwrite;
- };
- this.toggleOverwrite = function() {
- this.setOverwrite(!this.$overwrite);
- };
- this.addGutterDecoration = function(row, className) {
- if (!this.$decorations[row])
- this.$decorations[row] = "";
- this.$decorations[row] += " " + className;
- this._emit("changeBreakpoint", {});
- };
- this.removeGutterDecoration = function(row, className) {
- this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, "");
- this._emit("changeBreakpoint", {});
- };
- this.getBreakpoints = function() {
- return this.$breakpoints;
- };
- this.setBreakpoints = function(rows) {
- this.$breakpoints = [];
- for (var i=0; i<rows.length; i++) {
- this.$breakpoints[rows[i]] = "ace_breakpoint";
- }
- this._emit("changeBreakpoint", {});
- };
- this.clearBreakpoints = function() {
- this.$breakpoints = [];
- this._emit("changeBreakpoint", {});
- };
- this.setBreakpoint = function(row, className) {
- if (className === undefined)
- className = "ace_breakpoint";
- if (className)
- this.$breakpoints[row] = className;
- else
- delete this.$breakpoints[row];
- this._emit("changeBreakpoint", {});
- };
- this.clearBreakpoint = function(row) {
- delete this.$breakpoints[row];
- this._emit("changeBreakpoint", {});
- };
- this.addMarker = function(range, clazz, type, inFront) {
- var id = this.$markerId++;
-
- var marker = {
- range : range,
- type : type || "line",
- renderer: typeof type == "function" ? type : null,
- clazz : clazz,
- inFront: !!inFront,
- id: id
- }
-
- if (inFront) {
- this.$frontMarkers[id] = marker;
- this._emit("changeFrontMarker")
- } else {
- this.$backMarkers[id] = marker;
- this._emit("changeBackMarker")
- }
-
- return id;
- };
- this.addDynamicMarker = function(marker, inFront) {
- if (!marker.update)
- return;
- var id = this.$markerId++;
- marker.id = id;
- marker.inFront = !!inFront;
-
- if (inFront) {
- this.$frontMarkers[id] = marker;
- this._emit("changeFrontMarker")
- } else {
- this.$backMarkers[id] = marker;
- this._emit("changeBackMarker")
- }
-
- return marker;
- };
- this.removeMarker = function(markerId) {
- var marker = this.$frontMarkers[markerId] || this.$backMarkers[markerId];
- if (!marker)
- return;
-
- var markers = marker.inFront ? this.$frontMarkers : this.$backMarkers;
- if (marker) {
- delete (markers[markerId]);
- this._emit(marker.inFront ? "changeFrontMarker" : "changeBackMarker");
- }
- };
- this.getMarkers = function(inFront) {
- return inFront ? this.$frontMarkers : this.$backMarkers;
- };
-
- this.highlight = function(re) {
- if (!this.$searchHighlight) {
- var highlight = new SearchHighlight(null, "ace_selected-word", "text");
- this.$searchHighlight = this.addDynamicMarker(highlight);
- }
- this.$searchHighlight.setRegexp(re);
- }
- this.highlightLines = function(startRow, endRow, clazz, inFront) {
- if (typeof endRow != "number") {
- clazz = endRow;
- endRow = startRow;
- }
- if (!clazz)
- clazz = "ace_step";
-
- var range = new Range(startRow, 0, endRow, Infinity);
- range.id = this.addMarker(range, clazz, "fullLine", inFront);
- return range;
- };
- this.setAnnotations = function(annotations) {
- this.$annotations = annotations;
- this._emit("changeAnnotation", {});
- };
- this.getAnnotations = function() {
- return this.$annotations || [];
- };
- this.clearAnnotations = function() {
- this.setAnnotations([]);
- };
- this.$detectNewLine = function(text) {
- var match = text.match(/^.*?(\r?\n)/m);
- if (match) {
- this.$autoNewLine = match[1];
- } else {
- this.$autoNewLine = "\n";
- }
- };
- this.getWordRange = function(row, column) {
- var line = this.getLine(row);
-
- var inToken = false;
- if (column > 0)
- inToken = !!line.charAt(column - 1).match(this.tokenRe);
-
- if (!inToken)
- inToken = !!line.charAt(column).match(this.tokenRe);
-
- if (inToken)
- var re = this.tokenRe;
- else if (/^\s+$/.test(line.slice(column-1, column+1)))
- var re = /\s/;
- else
- var re = this.nonTokenRe;
-
- var start = column;
- if (start > 0) {
- do {
- start--;
- }
- while (start >= 0 && line.charAt(start).match(re));
- start++;
- }
-
- var end = column;
- while (end < line.length && line.charAt(end).match(re)) {
- end++;
- }
-
- return new Range(row, start, row, end);
- };
- this.getAWordRange = function(row, column) {
- var wordRange = this.getWordRange(row, column);
- var line = this.getLine(wordRange.end.row);
-
- while (line.charAt(wordRange.end.column).match(/[ \t]/)) {
- wordRange.end.column += 1;
- }
- return wordRange;
- };
- this.setNewLineMode = function(newLineMode) {
- this.doc.setNewLineMode(newLineMode);
- };
- this.getNewLineMode = function() {
- return this.doc.getNewLineMode();
- };
- this.setUseWorker = function(useWorker) { this.setOption("useWorker", useWorker); };
- this.getUseWorker = function() { return this.$useWorker; };
- this.onReloadTokenizer = function(e) {
- var rows = e.data;
- this.bgTokenizer.start(rows.first);
- this._emit("tokenizerUpdate", e);
- };
-
- this.$modes = {};
- this.$mode = null;
- this.$modeId = null;
- this.setMode = function(mode, cb) {
- if (mode && typeof mode === "object") {
- if (mode.getTokenizer)
- return this.$onChangeMode(mode);
- var options = mode;
- var path = options.path;
- } else {
- path = mode || "ace/mode/text";
- }
- if (!this.$modes["ace/mode/text"])
- this.$modes["ace/mode/text"] = new TextMode();
-
- if (this.$modes[path] && !options)
- return this.$onChangeMode(this.$modes[path]);
- this.$modeId = path;
- config.loadModule(["mode", path], function(m) {
- if (this.$modeId !== path)
- return cb && cb();
- if (this.$modes[path] && !options)
- return this.$onChangeMode(this.$modes[path]);
- if (m && m.Mode) {
- m = new m.Mode(options);
- if (!options) {
- this.$modes[path] = m;
- m.$id = path;
- }
- this.$onChangeMode(m);
- cb && cb(this.mode);
- }
- }.bind(this));
- if (!this.$mode)
- this.$onChangeMode(this.$modes["ace/mode/text"], true);
- };
-
- this.$onChangeMode = function(mode, $isPlaceholder) {
- if (!$isPlaceholder)
- this.$modeId = mode.$id;
- if (this.$mode === mode)
- return;
-
- this.$mode = mode;
-
- this.$stopWorker();
-
- if (this.$useWorker)
- this.$startWorker();
-
- var tokenizer = mode.getTokenizer();
-
- if(tokenizer.addEventListener !== undefined) {
- var onReloadTokenizer = this.onReloadTokenizer.bind(this);
- tokenizer.addEventListener("update", onReloadTokenizer);
- }
-
- if (!this.bgTokenizer) {
- this.bgTokenizer = new BackgroundTokenizer(tokenizer);
- var _self = this;
- this.bgTokenizer.addEventListener("update", function(e) {
- _self._emit("tokenizerUpdate", e);
- });
- } else {
- this.bgTokenizer.setTokenizer(tokenizer);
- }
-
- this.bgTokenizer.setDocument(this.getDocument());
-
- this.tokenRe = mode.tokenRe;
- this.nonTokenRe = mode.nonTokenRe;
-
-
- if (!$isPlaceholder) {
- this.$setFolding(mode.foldingRules);
- this._emit("changeMode");
- this.bgTokenizer.start(0);
- }
- };
-
-
- this.$stopWorker = function() {
- if (this.$worker)
- this.$worker.terminate();
-
- this.$worker = null;
- };
-
- this.$startWorker = function() {
- if (typeof Worker !== "undefined" && !require.noWorker) {
- try {
- this.$worker = this.$mode.createWorker(this);
- } catch (e) {
- console.log("Could not load worker");
- console.log(e);
- this.$worker = null;
- }
- }
- else
- this.$worker = null;
- };
- this.getMode = function() {
- return this.$mode;
- };
-
- this.$scrollTop = 0;
- this.setScrollTop = function(scrollTop) {
- scrollTop = Math.round(scrollTop);
- if (this.$scrollTop === scrollTop || isNaN(scrollTop))
- return;
-
- this.$scrollTop = scrollTop;
- this._signal("changeScrollTop", scrollTop);
- };
- this.getScrollTop = function() {
- return this.$scrollTop;
- };
-
- this.$scrollLeft = 0;
- this.setScrollLeft = function(scrollLeft) {
- scrollLeft = Math.round(scrollLeft);
- if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft))
- return;
-
- this.$scrollLeft = scrollLeft;
- this._signal("changeScrollLeft", scrollLeft);
- };
- this.getScrollLeft = function() {
- return this.$scrollLeft;
- };
- this.getScreenWidth = function() {
- this.$computeWidth();
- return this.screenWidth;
+ return ("Range: [" + this.start.row + "/" + this.start.column +
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
};
- this.$computeWidth = function(force) {
- if (this.$modified || force) {
- this.$modified = false;
-
- if (this.$useWrapMode)
- return this.screenWidth = this.$wrapLimit;
-
- var lines = this.doc.getAllLines();
- var cache = this.$rowLengthCache;
- var longestScreenLine = 0;
- var foldIndex = 0;
- var foldLine = this.$foldData[foldIndex];
- var foldStart = foldLine ? foldLine.start.row : Infinity;
- var len = lines.length;
-
- for (var i = 0; i < len; i++) {
- if (i > foldStart) {
- i = foldLine.end.row + 1;
- if (i >= len)
- break;
- foldLine = this.$foldData[foldIndex++];
- foldStart = foldLine ? foldLine.start.row : Infinity;
- }
-
- if (cache[i] == null)
- cache[i] = this.$getStringScreenWidth(lines[i])[0];
-
- if (cache[i] > longestScreenLine)
- longestScreenLine = cache[i];
- }
- this.screenWidth = longestScreenLine;
- }
- };
- this.getLine = function(row) {
- return this.doc.getLine(row);
- };
- this.getLines = function(firstRow, lastRow) {
- return this.doc.getLines(firstRow, lastRow);
- };
- this.getLength = function() {
- return this.doc.getLength();
- };
- this.getTextRange = function(range) {
- return this.doc.getTextRange(range || this.selection.getRange());
- };
- this.insert = function(position, text) {
- return this.doc.insert(position, text);
- };
- this.remove = function(range) {
- return this.doc.remove(range);
+ this.contains = function(row, column) {
+ return this.compare(row, column) == 0;
};
- this.undoChanges = function(deltas, dontSelect) {
- if (!deltas.length)
- return;
+ this.compareRange = function(range) {
+ var cmp,
+ end = range.end,
+ start = range.start;
- this.$fromUndo = true;
- var lastUndoRange = null;
- for (var i = deltas.length - 1; i != -1; i--) {
- var delta = deltas[i];
- if (delta.group == "doc") {
- this.doc.revertDeltas(delta.deltas);
- lastUndoRange =
- this.$getUndoSelection(delta.deltas, true, lastUndoRange);
+ cmp = this.compare(end.row, end.column);
+ if (cmp == 1) {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == 1) {
+ return 2;
+ } else if (cmp == 0) {
+ return 1;
} else {
- delta.deltas.forEach(function(foldDelta) {
- this.addFolds(foldDelta.folds);
- }, this);
- }
- }
- this.$fromUndo = false;
- lastUndoRange &&
- this.$undoSelect &&
- !dontSelect &&
- this.selection.setSelectionRange(lastUndoRange);
- return lastUndoRange;
- };
- this.redoChanges = function(deltas, dontSelect) {
- if (!deltas.length)
- return;
-
- this.$fromUndo = true;
- var lastUndoRange = null;
- for (var i = 0; i < deltas.length; i++) {
- var delta = deltas[i];
- if (delta.group == "doc") {
- this.doc.applyDeltas(delta.deltas);
- lastUndoRange =
- this.$getUndoSelection(delta.deltas, false, lastUndoRange);
+ return 0;
}
- }
- this.$fromUndo = false;
- lastUndoRange &&
- this.$undoSelect &&
- !dontSelect &&
- this.selection.setSelectionRange(lastUndoRange);
- return lastUndoRange;
- };
- this.setUndoSelect = function(enable) {
- this.$undoSelect = enable;
- };
-
- this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) {
- function isInsert(delta) {
- var insert =
- delta.action === "insertText" || delta.action === "insertLines";
- return isUndo ? !insert : insert;
- }
-
- var delta = deltas[0];
- var range, point;
- var lastDeltaIsInsert = false;
- if (isInsert(delta)) {
- range = Range.fromPoints(delta.range.start, delta.range.end);
- lastDeltaIsInsert = true;
+ } else if (cmp == -1) {
+ return -2;
} else {
- range = Range.fromPoints(delta.range.start, delta.range.start);
- lastDeltaIsInsert = false;
- }
-
- for (var i = 1; i < deltas.length; i++) {
- delta = deltas[i];
- if (isInsert(delta)) {
- point = delta.range.start;
- if (range.compare(point.row, point.column) == -1) {
- range.setStart(delta.range.start);
- }
- point = delta.range.end;
- if (range.compare(point.row, point.column) == 1) {
- range.setEnd(delta.range.end);
- }
- lastDeltaIsInsert = true;
- } else {
- point = delta.range.start;
- if (range.compare(point.row, point.column) == -1) {
- range =
- Range.fromPoints(delta.range.start, delta.range.start);
- }
- lastDeltaIsInsert = false;
- }
- }
- if (lastUndoRange != null) {
- if (Range.comparePoints(lastUndoRange.start, range.start) == 0) {
- lastUndoRange.start.column += range.end.column - range.start.column;
- lastUndoRange.end.column += range.end.column - range.start.column;
- }
-
- var cmp = lastUndoRange.compareRange(range);
- if (cmp == 1) {
- range.setStart(lastUndoRange.start);
- } else if (cmp == -1) {
- range.setEnd(lastUndoRange.end);
- }
- }
-
- return range;
- };
- this.replace = function(range, text) {
- return this.doc.replace(range, text);
- };
- this.moveText = function(fromRange, toPosition, copy) {
- var text = this.getTextRange(fromRange);
- var folds = this.getFoldsInRange(fromRange);
-
- var toRange = Range.fromPoints(toPosition, toPosition);
- if (!copy) {
- this.remove(fromRange);
- var rowDiff = fromRange.start.row - fromRange.end.row;
- var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column;
- if (collDiff) {
- if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column)
- toRange.start.column += collDiff;
- if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column)
- toRange.end.column += collDiff;
- }
- if (rowDiff && toRange.start.row >= fromRange.end.row) {
- toRange.start.row += rowDiff;
- toRange.end.row += rowDiff;
- }
- }
-
- this.insert(toRange.start, text);
- if (folds.length) {
- var oldStart = fromRange.start;
- var newStart = toRange.start;
- var rowDiff = newStart.row - oldStart.row;
- var collDiff = newStart.column - oldStart.column;
- this.addFolds(folds.map(function(x) {
- x = x.clone();
- if (x.start.row == oldStart.row)
- x.start.column += collDiff;
- if (x.end.row == oldStart.row)
- x.end.column += collDiff;
- x.start.row += rowDiff;
- x.end.row += rowDiff;
- return x;
- }));
- }
-
- return toRange;
- };
- this.indentRows = function(startRow, endRow, indentString) {
- indentString = indentString.replace(/\t/g, this.getTabString());
- for (var row=startRow; row<=endRow; row++)
- this.insert({row: row, column:0}, indentString);
- };
- this.outdentRows = function (range) {
- var rowRange = range.collapseRows();
- var deleteRange = new Range(0, 0, 0, 0);
- var size = this.getTabSize();
-
- for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {
- var line = this.getLine(i);
-
- deleteRange.start.row = i;
- deleteRange.end.row = i;
- for (var j = 0; j < size; ++j)
- if (line.charAt(j) != ' ')
- break;
- if (j < size && line.charAt(j) == '\t') {
- deleteRange.start.column = j;
- deleteRange.end.column = j + 1;
+ cmp = this.compare(start.row, start.column);
+ if (cmp == -1) {
+ return -1;
+ } else if (cmp == 1) {
+ return 42;
} else {
- deleteRange.start.column = 0;
- deleteRange.end.column = j;
+ return 0;
}
- this.remove(deleteRange);
}
};
-
- this.$moveLines = function(firstRow, lastRow, dir) {
- firstRow = this.getRowFoldStart(firstRow);
- lastRow = this.getRowFoldEnd(lastRow);
- if (dir < 0) {
- var row = this.getRowFoldStart(firstRow + dir);
- if (row < 0) return 0;
- var diff = row-firstRow;
- } else if (dir > 0) {
- var row = this.getRowFoldEnd(lastRow + dir);
- if (row > this.doc.getLength()-1) return 0;
- var diff = row-lastRow;
- } else {
- firstRow = this.$clipRowToDocument(firstRow);
- lastRow = this.$clipRowToDocument(lastRow);
- var diff = lastRow - firstRow + 1;
- }
-
- var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE);
- var folds = this.getFoldsInRange(range).map(function(x){
- x = x.clone();
- x.start.row += diff;
- x.end.row += diff;
- return x;
- });
-
- var lines = dir == 0
- ? this.doc.getLines(firstRow, lastRow)
- : this.doc.removeLines(firstRow, lastRow);
- this.doc.insertLines(firstRow+diff, lines);
- folds.length && this.addFolds(folds);
- return diff;
- };
- this.moveLinesUp = function(firstRow, lastRow) {
- return this.$moveLines(firstRow, lastRow, -1);
+ this.comparePoint = function(p) {
+ return this.compare(p.row, p.column);
};
- this.moveLinesDown = function(firstRow, lastRow) {
- return this.$moveLines(firstRow, lastRow, 1);
+ this.containsRange = function(range) {
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
};
- this.duplicateLines = function(firstRow, lastRow) {
- return this.$moveLines(firstRow, lastRow, 0);
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
};
-
-
- this.$clipRowToDocument = function(row) {
- return Math.max(0, Math.min(row, this.doc.getLength()-1));
+ this.isEnd = function(row, column) {
+ return this.end.row == row && this.end.column == column;
};
-
- this.$clipColumnToRow = function(row, column) {
- if (column < 0)
- return 0;
- return Math.min(this.doc.getLine(row).length, column);
+ this.isStart = function(row, column) {
+ return this.start.row == row && this.start.column == column;
};
-
-
- this.$clipPositionToDocument = function(row, column) {
- column = Math.max(0, column);
-
- if (row < 0) {
- row = 0;
- column = 0;
+ this.setStart = function(row, column) {
+ if (typeof row == "object") {
+ this.start.column = row.column;
+ this.start.row = row.row;
} else {
- var len = this.doc.getLength();
- if (row >= len) {
- row = len - 1;
- column = this.doc.getLine(len-1).length;
- } else {
- column = Math.min(this.doc.getLine(row).length, column);
- }
+ this.start.row = row;
+ this.start.column = column;
}
-
- return {
- row: row,
- column: column
- };
};
-
- this.$clipRangeToDocument = function(range) {
- if (range.start.row < 0) {
- range.start.row = 0;
- range.start.column = 0;
- } else {
- range.start.column = this.$clipColumnToRow(
- range.start.row,
- range.start.column
- );
- }
-
- var len = this.doc.getLength() - 1;
- if (range.end.row > len) {
- range.end.row = len;
- range.end.column = this.doc.getLine(len).length;
+ this.setEnd = function(row, column) {
+ if (typeof row == "object") {
+ this.end.column = row.column;
+ this.end.row = row.row;
} else {
- range.end.column = this.$clipColumnToRow(
- range.end.row,
- range.end.column
- );
- }
- return range;
- };
- this.$wrapLimit = 80;
- this.$useWrapMode = false;
- this.$wrapLimitRange = {
- min : null,
- max : null
- };
- this.setUseWrapMode = function(useWrapMode) {
- if (useWrapMode != this.$useWrapMode) {
- this.$useWrapMode = useWrapMode;
- this.$modified = true;
- this.$resetRowCache(0);
- if (useWrapMode) {
- var len = this.getLength();
- this.$wrapData = [];
- for (var i = 0; i < len; i++) {
- this.$wrapData.push([]);
- }
- this.$updateWrapData(0, len - 1);
- }
-
- this._emit("changeWrapMode");
- }
- };
- this.getUseWrapMode = function() {
- return this.$useWrapMode;
- };
- this.setWrapLimitRange = function(min, max) {
- if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {
- this.$wrapLimitRange.min = min;
- this.$wrapLimitRange.max = max;
- this.$modified = true;
- this._emit("changeWrapMode");
+ this.end.row = row;
+ this.end.column = column;
}
};
- this.adjustWrapLimit = function(desiredLimit, $printMargin) {
- var limits = this.$wrapLimitRange
- if (limits.max < 0)
- limits = {min: $printMargin, max: $printMargin};
- var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max);
- if (wrapLimit != this.$wrapLimit && wrapLimit > 1) {
- this.$wrapLimit = wrapLimit;
- this.$modified = true;
- if (this.$useWrapMode) {
- this.$updateWrapData(0, this.getLength() - 1);
- this.$resetRowCache(0);
- this._emit("changeWrapLimit");
+ this.inside = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
}
- return true;
}
return false;
};
-
- this.$constrainWrapLimit = function(wrapLimit, min, max) {
- if (min)
- wrapLimit = Math.max(min, wrapLimit);
-
- if (max)
- wrapLimit = Math.min(max, wrapLimit);
-
- return wrapLimit;
- };
- this.getWrapLimit = function() {
- return this.$wrapLimit;
- };
- this.setWrapLimit = function (limit) {
- this.setWrapLimitRange(limit, limit);
- };
- this.getWrapLimitRange = function() {
- return {
- min : this.$wrapLimitRange.min,
- max : this.$wrapLimitRange.max
- };
- };
-
- this.$updateInternalDataOnChange = function(e) {
- var useWrapMode = this.$useWrapMode;
- var len;
- var action = e.data.action;
- var firstRow = e.data.range.start.row;
- var lastRow = e.data.range.end.row;
- var start = e.data.range.start;
- var end = e.data.range.end;
- var removedFolds = null;
-
- if (action.indexOf("Lines") != -1) {
- if (action == "insertLines") {
- lastRow = firstRow + (e.data.lines.length);
- } else {
- lastRow = firstRow;
- }
- len = e.data.lines ? e.data.lines.length : lastRow - firstRow;
- } else {
- len = lastRow - firstRow;
- }
-
- this.$updating = true;
- if (len != 0) {
- if (action.indexOf("remove") != -1) {
- this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len);
-
- var foldLines = this.$foldData;
- removedFolds = this.getFoldsInRange(e.data.range);
- this.removeFolds(removedFolds);
-
- var foldLine = this.getFoldLine(end.row);
- var idx = 0;
- if (foldLine) {
- foldLine.addRemoveChars(end.row, end.column, start.column - end.column);
- foldLine.shiftRow(-len);
-
- var foldLineBefore = this.getFoldLine(firstRow);
- if (foldLineBefore && foldLineBefore !== foldLine) {
- foldLineBefore.merge(foldLine);
- foldLine = foldLineBefore;
- }
- idx = foldLines.indexOf(foldLine) + 1;
- }
-
- for (idx; idx < foldLines.length; idx++) {
- var foldLine = foldLines[idx];
- if (foldLine.start.row >= end.row) {
- foldLine.shiftRow(-len);
- }
- }
-
- lastRow = firstRow;
+ this.insideStart = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column)) {
+ return false;
} else {
- var args;
- if (useWrapMode) {
- args = [firstRow, 0];
- for (var i = 0; i < len; i++) args.push([]);
- this.$wrapData.splice.apply(this.$wrapData, args);
- } else {
- args = Array(len);
- args.unshift(firstRow, 0);
- this.$rowLengthCache.splice.apply(this.$rowLengthCache, args);
- }
- var foldLines = this.$foldData;
- var foldLine = this.getFoldLine(firstRow);
- var idx = 0;
- if (foldLine) {
- var cmp = foldLine.range.compareInside(start.row, start.column)
- if (cmp == 0) {
- foldLine = foldLine.split(start.row, start.column);
- foldLine.shiftRow(len);
- foldLine.addRemoveChars(
- lastRow, 0, end.column - start.column);
- } else
- if (cmp == -1) {
- foldLine.addRemoveChars(firstRow, 0, end.column - start.column);
- foldLine.shiftRow(len);
- }
- idx = foldLines.indexOf(foldLine) + 1;
- }
-
- for (idx; idx < foldLines.length; idx++) {
- var foldLine = foldLines[idx];
- if (foldLine.start.row >= firstRow) {
- foldLine.shiftRow(len);
- }
- }
- }
- } else {
- len = Math.abs(e.data.range.start.column - e.data.range.end.column);
- if (action.indexOf("remove") != -1) {
- removedFolds = this.getFoldsInRange(e.data.range);
- this.removeFolds(removedFolds);
-
- len = -len;
- }
- var foldLine = this.getFoldLine(firstRow);
- if (foldLine) {
- foldLine.addRemoveChars(firstRow, start.column, len);
+ return true;
}
}
-
- if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {
- console.error("doc.getLength() and $wrapData.length have to be the same!");
- }
- this.$updating = false;
-
- if (useWrapMode)
- this.$updateWrapData(firstRow, lastRow);
- else
- this.$updateRowLengthCache(firstRow, lastRow);
-
- return removedFolds;
- };
-
- this.$updateRowLengthCache = function(firstRow, lastRow, b) {
- this.$rowLengthCache[firstRow] = null;
- this.$rowLengthCache[lastRow] = null;
+ return false;
};
-
- this.$updateWrapData = function(firstRow, lastRow) {
- var lines = this.doc.getAllLines();
- var tabSize = this.getTabSize();
- var wrapData = this.$wrapData;
- var wrapLimit = this.$wrapLimit;
- var tokens;
- var foldLine;
-
- var row = firstRow;
- lastRow = Math.min(lastRow, lines.length - 1);
- while (row <= lastRow) {
- foldLine = this.getFoldLine(row, foldLine);
- if (!foldLine) {
- tokens = this.$getDisplayTokens(lang.stringTrimRight(lines[row]));
- wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
- row ++;
+ this.insideEnd = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isStart(row, column)) {
+ return false;
} else {
- tokens = [];
- foldLine.walk(function(placeholder, row, column, lastColumn) {
- var walkTokens;
- if (placeholder != null) {
- walkTokens = this.$getDisplayTokens(
- placeholder, tokens.length);
- walkTokens[0] = PLACEHOLDER_START;
- for (var i = 1; i < walkTokens.length; i++) {
- walkTokens[i] = PLACEHOLDER_BODY;
- }
- } else {
- walkTokens = this.$getDisplayTokens(
- lines[row].substring(lastColumn, column),
- tokens.length);
- }
- tokens = tokens.concat(walkTokens);
- }.bind(this),
- foldLine.end.row,
- lines[foldLine.end.row].length + 1
- );
- while (tokens.length != 0 && tokens[tokens.length - 1] >= SPACE)
- tokens.pop();
-
- wrapData[foldLine.start.row]
- = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
- row = foldLine.end.row + 1;
+ return true;
}
}
+ return false;
};
- var CHAR = 1,
- CHAR_EXT = 2,
- PLACEHOLDER_START = 3,
- PLACEHOLDER_BODY = 4,
- PUNCTUATION = 9,
- SPACE = 10,
- TAB = 11,
- TAB_SPACE = 12;
-
-
- this.$computeWrapSplits = function(tokens, wrapLimit) {
- if (tokens.length == 0) {
- return [];
+ this.compare = function(row, column) {
+ if (!this.isMultiLine()) {
+ if (row === this.start.row) {
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+ };
}
- var splits = [];
- var displayLength = tokens.length;
- var lastSplit = 0, lastDocSplit = 0;
+ if (row < this.start.row)
+ return -1;
- function addSplit(screenPos) {
- var displayed = tokens.slice(lastSplit, screenPos);
- var len = displayed.length;
- displayed.join("").
- replace(/12/g, function() {
- len -= 1;
- }).
- replace(/2/g, function() {
- len -= 1;
- });
+ if (row > this.end.row)
+ return 1;
- lastDocSplit += len;
- splits.push(lastDocSplit);
- lastSplit = screenPos;
- }
+ if (this.start.row === row)
+ return column >= this.start.column ? 0 : -1;
- while (displayLength - lastSplit > wrapLimit) {
- var split = lastSplit + wrapLimit;
- if (tokens[split] >= SPACE) {
- while (tokens[split] >= SPACE) {
- split ++;
- }
- addSplit(split);
- continue;
- }
- if (tokens[split] == PLACEHOLDER_START
- || tokens[split] == PLACEHOLDER_BODY)
- {
- for (split; split != lastSplit - 1; split--) {
- if (tokens[split] == PLACEHOLDER_START) {
- break;
- }
- }
- if (split > lastSplit) {
- addSplit(split);
- continue;
- }
- split = lastSplit + wrapLimit;
- for (split; split < tokens.length; split++) {
- if (tokens[split] != PLACEHOLDER_BODY)
- {
- break;
- }
- }
- if (split == tokens.length) {
- break; // Breaks the while-loop.
- }
- addSplit(split);
- continue;
- }
- var minSplit = Math.max(split - 10, lastSplit - 1);
- while (split > minSplit && tokens[split] < PLACEHOLDER_START) {
- split --;
- }
- while (split > minSplit && tokens[split] == PUNCTUATION) {
- split --;
- }
- if (split > minSplit) {
- addSplit(++split);
- continue;
- }
- split = lastSplit + wrapLimit;
- addSplit(split);
- }
- return splits;
- };
- this.$getDisplayTokens = function(str, offset) {
- var arr = [];
- var tabSize;
- offset = offset || 0;
+ if (this.end.row === row)
+ return column <= this.end.column ? 0 : 1;
- for (var i = 0; i < str.length; i++) {
- var c = str.charCodeAt(i);
- if (c == 9) {
- tabSize = this.getScreenTabSize(arr.length + offset);
- arr.push(TAB);
- for (var n = 1; n < tabSize; n++) {
- arr.push(TAB_SPACE);
- }
- }
- else if (c == 32) {
- arr.push(SPACE);
- } else if((c > 39 && c < 48) || (c > 57 && c < 64)) {
- arr.push(PUNCTUATION);
- }
- else if (c >= 0x1100 && isFullWidth(c)) {
- arr.push(CHAR, CHAR_EXT);
- } else {
- arr.push(CHAR);
- }
- }
- return arr;
+ return 0;
};
- this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {
- if (maxScreenColumn == 0)
- return [0, 0];
- if (maxScreenColumn == null)
- maxScreenColumn = Infinity;
- screenColumn = screenColumn || 0;
-
- var c, column;
- for (column = 0; column < str.length; column++) {
- c = str.charCodeAt(column);
- if (c == 9) {
- screenColumn += this.getScreenTabSize(screenColumn);
- }
- else if (c >= 0x1100 && isFullWidth(c)) {
- screenColumn += 2;
- } else {
- screenColumn += 1;
- }
- if (screenColumn > maxScreenColumn) {
- break;
- }
+ this.compareStart = function(row, column) {
+ if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
}
-
- return [screenColumn, column];
};
- this.getRowLength = function(row) {
- if (!this.$useWrapMode || !this.$wrapData[row]) {
+ this.compareEnd = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
return 1;
} else {
- return this.$wrapData[row].length + 1;
+ return this.compare(row, column);
}
};
- this.getScreenLastRowColumn = function(screenRow) {
- var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);
- return this.documentToScreenColumn(pos.row, pos.column);
- };
- this.getDocumentLastRowColumn = function(docRow, docColumn) {
- var screenRow = this.documentToScreenRow(docRow, docColumn);
- return this.getScreenLastRowColumn(screenRow);
- };
- this.getDocumentLastRowColumnPosition = function(docRow, docColumn) {
- var screenRow = this.documentToScreenRow(docRow, docColumn);
- return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);
- };
- this.getRowSplitData = function(row) {
- if (!this.$useWrapMode) {
- return undefined;
+ this.compareInside = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else if (this.start.row == row && this.start.column == column) {
+ return -1;
} else {
- return this.$wrapData[row];
+ return this.compare(row, column);
}
};
- this.getScreenTabSize = function(screenColumn) {
- return this.$tabSize - screenColumn % this.$tabSize;
- };
+ this.clipRows = function(firstRow, lastRow) {
+ if (this.end.row > lastRow)
+ var end = {row: lastRow + 1, column: 0};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {row: firstRow, column: 0};
- this.screenToDocumentRow = function(screenRow, screenColumn) {
- return this.screenToDocumentPosition(screenRow, screenColumn).row;
+ return Range.fromPoints(start || this.start, end || this.end);
};
+ this.extend = function(row, column) {
+ var cmp = this.compare(row, column);
+ if (cmp == 0)
+ return this;
+ else if (cmp == -1)
+ var start = {row: row, column: column};
+ else
+ var end = {row: row, column: column};
- this.screenToDocumentColumn = function(screenRow, screenColumn) {
- return this.screenToDocumentPosition(screenRow, screenColumn).column;
+ return Range.fromPoints(start || this.start, end || this.end);
};
- this.screenToDocumentPosition = function(screenRow, screenColumn) {
- if (screenRow < 0)
- return {row: 0, column: 0};
-
- var line;
- var docRow = 0;
- var docColumn = 0;
- var column;
- var row = 0;
- var rowLength = 0;
-
- var rowCache = this.$screenRowCache;
- var i = this.$getRowCacheIndex(rowCache, screenRow);
- var l = rowCache.length;
- if (l && i >= 0) {
- var row = rowCache[i];
- var docRow = this.$docRowCache[i];
- var doCache = screenRow > rowCache[l - 1];
- } else {
- var doCache = !l;
- }
-
- var maxRow = this.getLength() - 1;
- var foldLine = this.getNextFoldLine(docRow);
- var foldStart = foldLine ? foldLine.start.row : Infinity;
-
- while (row <= screenRow) {
- rowLength = this.getRowLength(docRow);
- if (row + rowLength - 1 >= screenRow || docRow >= maxRow) {
- break;
- } else {
- row += rowLength;
- docRow++;
- if (docRow > foldStart) {
- docRow = foldLine.end.row+1;
- foldLine = this.getNextFoldLine(docRow, foldLine);
- foldStart = foldLine ? foldLine.start.row : Infinity;
- }
- }
-
- if (doCache) {
- this.$docRowCache.push(docRow);
- this.$screenRowCache.push(row);
- }
- }
-
- if (foldLine && foldLine.start.row <= docRow) {
- line = this.getFoldDisplayLine(foldLine);
- docRow = foldLine.start.row;
- } else if (row + rowLength <= screenRow || docRow > maxRow) {
- return {
- row: maxRow,
- column: this.getLine(maxRow).length
- }
- } else {
- line = this.getLine(docRow);
- foldLine = null;
- }
- if (this.$useWrapMode) {
- var splits = this.$wrapData[docRow];
- if (splits) {
- column = splits[screenRow - row];
- if(screenRow > row && splits.length) {
- docColumn = splits[screenRow - row - 1] || splits[splits.length - 1];
- line = line.substring(docColumn);
- }
- }
- }
-
- docColumn += this.$getStringScreenWidth(line, screenColumn)[1];
- if (this.$useWrapMode && docColumn >= column)
- docColumn = column - 1;
-
- if (foldLine)
- return foldLine.idxToPosition(docColumn);
-
- return {row: docRow, column: docColumn};
+ this.isEmpty = function() {
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
};
- this.documentToScreenPosition = function(docRow, docColumn) {
- if (typeof docColumn === "undefined")
- var pos = this.$clipPositionToDocument(docRow.row, docRow.column);
- else
- pos = this.$clipPositionToDocument(docRow, docColumn);
-
- docRow = pos.row;
- docColumn = pos.column;
-
- var screenRow = 0;
- var foldStartRow = null;
- var fold = null;
- fold = this.getFoldAt(docRow, docColumn, 1);
- if (fold) {
- docRow = fold.start.row;
- docColumn = fold.start.column;
- }
-
- var rowEnd, row = 0;
-
-
- var rowCache = this.$docRowCache;
- var i = this.$getRowCacheIndex(rowCache, docRow);
- var l = rowCache.length;
- if (l && i >= 0) {
- var row = rowCache[i];
- var screenRow = this.$screenRowCache[i];
- var doCache = docRow > rowCache[l - 1];
- } else {
- var doCache = !l;
- }
-
- var foldLine = this.getNextFoldLine(row);
- var foldStart = foldLine ?foldLine.start.row :Infinity;
-
- while (row < docRow) {
- if (row >= foldStart) {
- rowEnd = foldLine.end.row + 1;
- if (rowEnd > docRow)
- break;
- foldLine = this.getNextFoldLine(rowEnd, foldLine);
- foldStart = foldLine ?foldLine.start.row :Infinity;
- }
- else {
- rowEnd = row + 1;
- }
-
- screenRow += this.getRowLength(row);
- row = rowEnd;
-
- if (doCache) {
- this.$docRowCache.push(row);
- this.$screenRowCache.push(screenRow);
- }
- }
- var textLine = "";
- if (foldLine && row >= foldStart) {
- textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);
- foldStartRow = foldLine.start.row;
- } else {
- textLine = this.getLine(docRow).substring(0, docColumn);
- foldStartRow = docRow;
- }
- if (this.$useWrapMode) {
- var wrapRow = this.$wrapData[foldStartRow];
- var screenRowOffset = 0;
- while (textLine.length >= wrapRow[screenRowOffset]) {
- screenRow ++;
- screenRowOffset++;
- }
- textLine = textLine.substring(
- wrapRow[screenRowOffset - 1] || 0, textLine.length
- );
- }
-
- return {
- row: screenRow,
- column: this.$getStringScreenWidth(textLine)[0]
- };
+ this.isMultiLine = function() {
+ return (this.start.row !== this.end.row);
};
- this.documentToScreenColumn = function(row, docColumn) {
- return this.documentToScreenPosition(row, docColumn).column;
+ this.clone = function() {
+ return Range.fromPoints(this.start, this.end);
};
- this.documentToScreenRow = function(docRow, docColumn) {
- return this.documentToScreenPosition(docRow, docColumn).row;
+ this.collapseRows = function() {
+ if (this.end.column == 0)
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+ else
+ return new Range(this.start.row, 0, this.end.row, 0)
};
- this.getScreenLength = function() {
- var screenRows = 0;
- var fold = null;
- if (!this.$useWrapMode) {
- screenRows = this.getLength();
- var foldData = this.$foldData;
- for (var i = 0; i < foldData.length; i++) {
- fold = foldData[i];
- screenRows -= fold.end.row - fold.start.row;
- }
- } else {
- var lastRow = this.$wrapData.length;
- var row = 0, i = 0;
- var fold = this.$foldData[i++];
- var foldStart = fold ? fold.start.row :Infinity;
-
- while (row < lastRow) {
- screenRows += this.$wrapData[row].length + 1;
- row ++;
- if (row > foldStart) {
- row = fold.end.row+1;
- fold = this.$foldData[i++];
- foldStart = fold ?fold.start.row :Infinity;
- }
- }
- }
+ this.toScreenRange = function(session) {
+ var screenPosStart = session.documentToScreenPosition(this.start);
+ var screenPosEnd = session.documentToScreenPosition(this.end);
- return screenRows;
+ return new Range(
+ screenPosStart.row, screenPosStart.column,
+ screenPosEnd.row, screenPosEnd.column
+ );
};
- function isFullWidth(c) {
- if (c < 0x1100)
- return false;
- return c >= 0x1100 && c <= 0x115F ||
- c >= 0x11A3 && c <= 0x11A7 ||
- c >= 0x11FA && c <= 0x11FF ||
- c >= 0x2329 && c <= 0x232A ||
- c >= 0x2E80 && c <= 0x2E99 ||
- c >= 0x2E9B && c <= 0x2EF3 ||
- c >= 0x2F00 && c <= 0x2FD5 ||
- c >= 0x2FF0 && c <= 0x2FFB ||
- c >= 0x3000 && c <= 0x303E ||
- c >= 0x3041 && c <= 0x3096 ||
- c >= 0x3099 && c <= 0x30FF ||
- c >= 0x3105 && c <= 0x312D ||
- c >= 0x3131 && c <= 0x318E ||
- c >= 0x3190 && c <= 0x31BA ||
- c >= 0x31C0 && c <= 0x31E3 ||
- c >= 0x31F0 && c <= 0x321E ||
- c >= 0x3220 && c <= 0x3247 ||
- c >= 0x3250 && c <= 0x32FE ||
- c >= 0x3300 && c <= 0x4DBF ||
- c >= 0x4E00 && c <= 0xA48C ||
- c >= 0xA490 && c <= 0xA4C6 ||
- c >= 0xA960 && c <= 0xA97C ||
- c >= 0xAC00 && c <= 0xD7A3 ||
- c >= 0xD7B0 && c <= 0xD7C6 ||
- c >= 0xD7CB && c <= 0xD7FB ||
- c >= 0xF900 && c <= 0xFAFF ||
- c >= 0xFE10 && c <= 0xFE19 ||
- c >= 0xFE30 && c <= 0xFE52 ||
- c >= 0xFE54 && c <= 0xFE66 ||
- c >= 0xFE68 && c <= 0xFE6B ||
- c >= 0xFF01 && c <= 0xFF60 ||
- c >= 0xFFE0 && c <= 0xFFE6;
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
};
-}).call(EditSession.prototype);
-
-require("./edit_session/folding").Folding.call(EditSession.prototype);
-require("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype);
-
-
-config.defineOptions(EditSession.prototype, "session", {
- wrap: {
- set: function(value) {
- if (!value || value == "off")
- value = false;
- else if (value == "free")
- value = true;
- else if (value == "printMargin")
- value = -1;
- else if (typeof value == "string")
- value = parseInt(value, 10) || false;
-
- if (this.$wrap == value)
- return;
- if (!value) {
- this.setUseWrapMode(false);
- } else {
- var col = typeof value == "number" ? value : null;
- this.setWrapLimitRange(col, col);
- this.setUseWrapMode(true);
- }
- this.$wrap = value;
- },
- get: function() {
- return this.getUseWrapMode() ? this.getWrapLimitRange().min || "free" : "off";
- },
- handlesSet: true
- },
- firstLineNumber: {
- set: function() {this._emit("changeBreakpoint");},
- initialValue: 1
- },
- useWorker: {
- set: function(useWorker) {
- this.$useWorker = useWorker;
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
- this.$stopWorker();
- if (useWorker)
- this.$startWorker();
- },
- initialValue: true
- },
- useSoftTabs: {initialValue: true},
- tabSize: {
- set: function(tabSize) {
- if (isNaN(tabSize) || this.$tabSize === tabSize) return;
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
- this.$modified = true;
- this.$rowLengthCache = [];
- this.$tabSize = tabSize;
- this._emit("changeTabSize");
- },
- initialValue: 4,
- handlesSet: true
- },
- overwrite: {
- set: function(val) {this._emit("changeOverwrite");},
- initialValue: false
- },
- newLineMode: {
- set: function(val) {this.doc.setNewLineMode(val)},
- get: function() {return this.doc.getNewLineMode()},
- handlesSet: true
- }
-});
-exports.EditSession = EditSession;
+exports.Range = Range;
});
-ace.define('ace/selection', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/event_emitter', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("./lib/oop");
var lang = require("./lib/lang");
@@ -6890,7 +4338,7 @@ var Selection = function(session) {
};
this.getSelectionAnchor = function() {
if (this.$isEmpty)
- return this.getSelectionLead()
+ return this.getSelectionLead();
else
return this.anchor.getPosition();
};
@@ -6901,7 +4349,7 @@ var Selection = function(session) {
if (this.$isEmpty) {
this.moveCursorTo(this.lead.row, this.lead.column + columns);
return;
- };
+ }
var anchor = this.getSelectionAnchor();
var lead = this.getSelectionLead();
@@ -6978,6 +4426,14 @@ var Selection = function(session) {
this.moveCursorToPosition(pos);
});
};
+ this.moveTo = function(row, column) {
+ this.clearSelection();
+ this.moveCursorTo(row, column);
+ };
+ this.moveToPosition = function(pos) {
+ this.clearSelection();
+ this.moveCursorToPosition(pos);
+ };
this.selectUp = function() {
this.$moveSelection(this.moveCursorUp);
};
@@ -7036,7 +4492,7 @@ var Selection = function(session) {
} else {
rowEnd = rowStart;
}
- if (excludeLastChar)
+ if (excludeLastChar === true)
return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length);
else
return new Range(rowStart, 0, rowEnd + 1, 0);
@@ -7056,7 +4512,7 @@ var Selection = function(session) {
if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) {
this.moveCursorTo(fold.start.row, fold.start.column);
- } else if (cursor.column == 0) {
+ } else if (cursor.column === 0) {
if (cursor.row > 0) {
this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length);
}
@@ -7170,7 +4626,7 @@ var Selection = function(session) {
var str = this.session.getFoldStringAt(row, column, -1);
if (str == null) {
- str = this.doc.getLine(row).substring(0, column)
+ str = this.doc.getLine(row).substring(0, column);
}
var leftOfCursor = lang.stringReverse(str);
@@ -7216,13 +4672,13 @@ var Selection = function(session) {
index ++;
if (whitespaceRe.test(ch)) {
if (index > 2) {
- index--
+ index--;
break;
} else {
while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))
index ++;
if (index > 2)
- break
+ break;
}
}
}
@@ -7247,11 +4703,11 @@ var Selection = function(session) {
var l = this.doc.getLength();
do {
row++;
- rightOfCursor = this.doc.getLine(row)
- } while (row < l && /^\s*$/.test(rightOfCursor))
+ rightOfCursor = this.doc.getLine(row);
+ } while (row < l && /^\s*$/.test(rightOfCursor));
if (!/^\s+/.test(rightOfCursor))
- rightOfCursor = ""
+ rightOfCursor = "";
column = 0;
}
@@ -7269,15 +4725,15 @@ var Selection = function(session) {
return this.moveCursorTo(fold.start.row, fold.start.column);
var line = this.session.getLine(row).substring(0, column);
- if (column == 0) {
+ if (column === 0) {
do {
row--;
line = this.doc.getLine(row);
- } while (row > 0 && /^\s*$/.test(line))
+ } while (row > 0 && /^\s*$/.test(line));
column = line.length;
if (!/\s+$/.test(line))
- line = ""
+ line = "";
}
var leftOfCursor = lang.stringReverse(line);
@@ -7313,6 +4769,11 @@ var Selection = function(session) {
}
var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column);
+
+ if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) {
+ if (this.session.lineWidgets && this.session.lineWidgets[docPos.row])
+ docPos.row++;
+ }
this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);
};
this.moveCursorToPosition = function(position) {
@@ -7340,12 +4801,12 @@ var Selection = function(session) {
this.lead.detach();
this.anchor.detach();
this.session = this.doc = null;
- }
+ };
this.fromOrientedRange = function(range) {
this.setSelectionRange(range, range.cursor == range.start);
this.$desiredColumn = range.desiredColumn || this.$desiredColumn;
- }
+ };
this.toOrientedRange = function(range) {
var r = this.getRange();
@@ -7361,7 +4822,19 @@ var Selection = function(session) {
range.cursor = this.isBackwards() ? range.start : range.end;
range.desiredColumn = this.$desiredColumn;
return range;
- }
+ };
+ this.getRangeOfMovements = function(func) {
+ var start = this.getCursor();
+ try {
+ func.call(null, this);
+ var end = this.getCursor();
+ return Range.fromPoints(start,end);
+ } catch(e) {
+ return Range.fromPoints(start,start);
+ } finally {
+ this.moveCursorToPosition(start);
+ }
+ };
this.toJSON = function() {
if (this.rangeCount) {
@@ -7383,7 +4856,7 @@ var Selection = function(session) {
this.toSingleRange(data[0]);
for (var i = data.length; i--; ) {
var r = Range.fromPoints(data[i].start, data[i].end);
- if (data.isBackwards)
+ if (data[i].isBackwards)
r.cursor = r.start;
this.addRange(r, true);
}
@@ -7404,587 +4877,21 @@ var Selection = function(session) {
for (var i = this.ranges.length; i--; ) {
if (!this.ranges[i].isEqual(data[i]))
- return false
+ return false;
}
return true;
- }
+ };
}).call(Selection.prototype);
exports.Selection = Selection;
});
-ace.define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-var comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function(startRow, startColumn, endRow, endColumn) {
- this.start = {
- row: startRow,
- column: startColumn
- };
-
- this.end = {
- row: endRow,
- column: endColumn
- };
-};
-
-(function() {
- this.isEqual = function(range) {
- return this.start.row === range.start.row &&
- this.end.row === range.end.row &&
- this.start.column === range.start.column &&
- this.end.column === range.end.column;
- };
- this.toString = function() {
- return ("Range: [" + this.start.row + "/" + this.start.column +
- "] -> [" + this.end.row + "/" + this.end.column + "]");
- };
-
- this.contains = function(row, column) {
- return this.compare(row, column) == 0;
- };
- this.compareRange = function(range) {
- var cmp,
- end = range.end,
- start = range.start;
-
- cmp = this.compare(end.row, end.column);
- if (cmp == 1) {
- cmp = this.compare(start.row, start.column);
- if (cmp == 1) {
- return 2;
- } else if (cmp == 0) {
- return 1;
- } else {
- return 0;
- }
- } else if (cmp == -1) {
- return -2;
- } else {
- cmp = this.compare(start.row, start.column);
- if (cmp == -1) {
- return -1;
- } else if (cmp == 1) {
- return 42;
- } else {
- return 0;
- }
- }
- };
- this.comparePoint = function(p) {
- return this.compare(p.row, p.column);
- };
- this.containsRange = function(range) {
- return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- };
- this.intersects = function(range) {
- var cmp = this.compareRange(range);
- return (cmp == -1 || cmp == 0 || cmp == 1);
- };
- this.isEnd = function(row, column) {
- return this.end.row == row && this.end.column == column;
- };
- this.isStart = function(row, column) {
- return this.start.row == row && this.start.column == column;
- };
- this.setStart = function(row, column) {
- if (typeof row == "object") {
- this.start.column = row.column;
- this.start.row = row.row;
- } else {
- this.start.row = row;
- this.start.column = column;
- }
- };
- this.setEnd = function(row, column) {
- if (typeof row == "object") {
- this.end.column = row.column;
- this.end.row = row.row;
- } else {
- this.end.row = row;
- this.end.column = column;
- }
- };
- this.inside = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column) || this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideStart = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideEnd = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.compare = function(row, column) {
- if (!this.isMultiLine()) {
- if (row === this.start.row) {
- return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
- };
- }
-
- if (row < this.start.row)
- return -1;
-
- if (row > this.end.row)
- return 1;
-
- if (this.start.row === row)
- return column >= this.start.column ? 0 : -1;
-
- if (this.end.row === row)
- return column <= this.end.column ? 0 : 1;
-
- return 0;
- };
- this.compareStart = function(row, column) {
- if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareEnd = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareInside = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.clipRows = function(firstRow, lastRow) {
- if (this.end.row > lastRow)
- var end = {row: lastRow + 1, column: 0};
- else if (this.end.row < firstRow)
- var end = {row: firstRow, column: 0};
-
- if (this.start.row > lastRow)
- var start = {row: lastRow + 1, column: 0};
- else if (this.start.row < firstRow)
- var start = {row: firstRow, column: 0};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
- this.extend = function(row, column) {
- var cmp = this.compare(row, column);
-
- if (cmp == 0)
- return this;
- else if (cmp == -1)
- var start = {row: row, column: column};
- else
- var end = {row: row, column: column};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.isEmpty = function() {
- return (this.start.row === this.end.row && this.start.column === this.end.column);
- };
- this.isMultiLine = function() {
- return (this.start.row !== this.end.row);
- };
- this.clone = function() {
- return Range.fromPoints(this.start, this.end);
- };
- this.collapseRows = function() {
- if (this.end.column == 0)
- return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
- else
- return new Range(this.start.row, 0, this.end.row, 0)
- };
- this.toScreenRange = function(session) {
- var screenPosStart = session.documentToScreenPosition(this.start);
- var screenPosEnd = session.documentToScreenPosition(this.end);
-
- return new Range(
- screenPosStart.row, screenPosStart.column,
- screenPosEnd.row, screenPosEnd.column
- );
- };
- this.moveBy = function(row, column) {
- this.start.row += row;
- this.start.column += column;
- this.end.row += row;
- this.end.column += column;
- };
-
-}).call(Range.prototype);
-Range.fromPoints = function(start, end) {
- return new Range(start.row, start.column, end.row, end.column);
-};
-Range.comparePoints = comparePoints;
-
-Range.comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-
-
-exports.Range = Range;
-});
-
-ace.define('ace/mode/text', ['require', 'exports', 'module' , 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/behaviour', 'ace/unicode', 'ace/lib/lang', 'ace/token_iterator', 'ace/range'], function(require, exports, module) {
-
-
-var Tokenizer = require("../tokenizer").Tokenizer;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var Behaviour = require("./behaviour").Behaviour;
-var unicode = require("../unicode");
-var lang = require("../lib/lang");
-var TokenIterator = require("../token_iterator").TokenIterator;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new TextHighlightRules().getRules());
- this.$behaviour = new Behaviour();
-};
-
-(function() {
-
- this.tokenRe = new RegExp("^["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]+", "g"
- );
-
- this.nonTokenRe = new RegExp("^(?:[^"
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\\$_]|\s])+", "g"
- );
-
- this.getTokenizer = function() {
- return this.$tokenizer;
- };
-
- this.lineCommentStart = "";
- this.blockComment = "";
-
- this.toggleCommentLines = function(state, session, startRow, endRow) {
- var doc = session.doc;
-
- var ignoreBlankLines = true;
- var shouldRemove = true;
- var minIndent = Infinity;
- var tabSize = session.getTabSize();
- var insertAtTabStop = false;
-
- if (!this.lineCommentStart) {
- if (!this.blockComment)
- return false;
- var lineCommentStart = this.blockComment.start;
- var lineCommentEnd = this.blockComment.end;
- var regexpStart = new RegExp("^(\\s*)(?:" + lang.escapeRegExp(lineCommentStart) + ")");
- var regexpEnd = new RegExp("(?:" + lang.escapeRegExp(lineCommentEnd) + ")\\s*$");
-
- var comment = function(line, i) {
- if (testRemove(line, i))
- return;
- if (!ignoreBlankLines || /\S/.test(line)) {
- doc.insertInLine({row: i, column: line.length}, lineCommentEnd);
- doc.insertInLine({row: i, column: minIndent}, lineCommentStart);
- }
- };
-
- var uncomment = function(line, i) {
- var m;
- if (m = line.match(regexpEnd))
- doc.removeInLine(i, line.length - m[0].length, line.length);
- if (m = line.match(regexpStart))
- doc.removeInLine(i, m[1].length, m[0].length);
- };
-
- var testRemove = function(line, row) {
- if (regexpStart.test(line))
- return true;
- var tokens = session.getTokens(row);
- for (var i = 0; i < tokens.length; i++) {
- if (tokens[i].type === 'comment')
- return true;
- }
- };
- } else {
- if (Array.isArray(this.lineCommentStart)) {
- var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join("|");
- var lineCommentStart = this.lineCommentStart[0];
- } else {
- var regexpStart = lang.escapeRegExp(this.lineCommentStart);
- var lineCommentStart = this.lineCommentStart;
- }
- regexpStart = new RegExp("^(\\s*)(?:" + regexpStart + ") ?");
-
- insertAtTabStop = session.getUseSoftTabs();
-
- var uncomment = function(line, i) {
- var m = line.match(regexpStart);
- if (!m) return;
- var start = m[1].length, end = m[0].length;
- if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == " ")
- end--;
- doc.removeInLine(i, start, end);
- };
- var commentWithSpace = lineCommentStart + " ";
- var comment = function(line, i) {
- if (!ignoreBlankLines || /\S/.test(line)) {
- if (shouldInsertSpace(line, minIndent, minIndent))
- doc.insertInLine({row: i, column: minIndent}, commentWithSpace);
- else
- doc.insertInLine({row: i, column: minIndent}, lineCommentStart);
- }
- };
- var testRemove = function(line, i) {
- return regexpStart.test(line);
- };
-
- var shouldInsertSpace = function(line, before, after) {
- var spaces = 0;
- while (before-- && line.charAt(before) == " ")
- spaces++;
- if (spaces % tabSize != 0)
- return false;
- var spaces = 0;
- while (line.charAt(after++) == " ")
- spaces++;
- if (tabSize > 2)
- return spaces % tabSize != tabSize - 1;
- else
- return spaces % tabSize == 0;
- return true;
- };
- }
-
- function iter(fun) {
- for (var i = startRow; i <= endRow; i++)
- fun(doc.getLine(i), i);
- }
-
-
- var minEmptyLength = Infinity;
- iter(function(line, i) {
- var indent = line.search(/\S/);
- if (indent !== -1) {
- if (indent < minIndent)
- minIndent = indent;
- if (shouldRemove && !testRemove(line, i))
- shouldRemove = false;
- } else if (minEmptyLength > line.length) {
- minEmptyLength = line.length;
- }
- });
-
- if (minIndent == Infinity) {
- minIndent = minEmptyLength;
- ignoreBlankLines = false;
- shouldRemove = false;
- }
-
- if (insertAtTabStop && minIndent % tabSize != 0)
- minIndent = Math.floor(minIndent / tabSize) * tabSize;
-
- iter(shouldRemove ? uncomment : comment);
- };
-
- this.toggleBlockComment = function(state, session, range, cursor) {
- var comment = this.blockComment;
- if (!comment)
- return;
- if (!comment.start && comment[0])
- comment = comment[0];
-
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- var token = iterator.getCurrentToken();
-
- var sel = session.selection;
- var initialRange = session.selection.toOrientedRange();
- var startRow, colDiff;
-
- if (token && /comment/.test(token.type)) {
- var startRange, endRange;
- while (token && /comment/.test(token.type)) {
- var i = token.value.indexOf(comment.start);
- if (i != -1) {
- var row = iterator.getCurrentTokenRow();
- var column = iterator.getCurrentTokenColumn() + i;
- startRange = new Range(row, column, row, column + comment.start.length);
- break
- }
- token = iterator.stepBackward();
- };
-
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- var token = iterator.getCurrentToken();
- while (token && /comment/.test(token.type)) {
- var i = token.value.indexOf(comment.end);
- if (i != -1) {
- var row = iterator.getCurrentTokenRow();
- var column = iterator.getCurrentTokenColumn() + i;
- endRange = new Range(row, column, row, column + comment.end.length);
- break;
- }
- token = iterator.stepForward();
- }
- if (endRange)
- session.remove(endRange);
- if (startRange) {
- session.remove(startRange);
- startRow = startRange.start.row;
- colDiff = -comment.start.length
- }
- } else {
- colDiff = comment.start.length
- startRow = range.start.row;
- session.insert(range.end, comment.end);
- session.insert(range.start, comment.start);
- }
- if (initialRange.start.row == startRow)
- initialRange.start.column += colDiff;
- if (initialRange.end.row == startRow)
- initialRange.end.column += colDiff;
- session.selection.fromOrientedRange(initialRange);
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
- this.checkOutdent = function(state, line, input) {
- return false;
- };
-
- this.autoOutdent = function(state, doc, row) {
- };
-
- this.$getIndent = function(line) {
- return line.match(/^\s*/)[0];
- };
-
- this.createWorker = function(session) {
- return null;
- };
-
- this.createModeDelegates = function (mapping) {
- if (!this.$embeds) {
- return;
- }
- this.$modes = {};
- for (var i = 0; i < this.$embeds.length; i++) {
- if (mapping[this.$embeds[i]]) {
- this.$modes[this.$embeds[i]] = new mapping[this.$embeds[i]]();
- }
- }
-
- var delegations = ['toggleCommentLines', 'getNextLineIndent', 'checkOutdent', 'autoOutdent', 'transformAction'];
-
- for (var i = 0; i < delegations.length; i++) {
- (function(scope) {
- var functionName = delegations[i];
- var defaultHandler = scope[functionName];
- scope[delegations[i]] = function() {
- return this.$delegator(functionName, arguments, defaultHandler);
- }
- } (this));
- }
- };
-
- this.$delegator = function(method, args, defaultHandler) {
- var state = args[0];
- if (typeof state != "string")
- state = state[0];
- for (var i = 0; i < this.$embeds.length; i++) {
- if (!this.$modes[this.$embeds[i]]) continue;
-
- var split = state.split(this.$embeds[i]);
- if (!split[0] && split[1]) {
- args[0] = split[1];
- var mode = this.$modes[this.$embeds[i]];
- return mode[method].apply(mode, args);
- }
- }
- var ret = defaultHandler.apply(this, args);
- return defaultHandler ? ret : undefined;
- };
-
- this.transformAction = function(state, action, editor, session, param) {
- if (this.$behaviour) {
- var behaviours = this.$behaviour.getBehaviours();
- for (var key in behaviours) {
- if (behaviours[key][action]) {
- var ret = behaviours[key][action].apply(this, arguments);
- if (ret) {
- return ret;
- }
- }
- }
- }
- };
-
- this.getKeywords = function(append) {
- if (!this.completionKeywords) {
- var rules = this.$tokenizer.rules;
- var completionKeywords = [];
- for (var rule in rules) {
- var ruleItr = rules[rule];
- for (var r = 0, l = ruleItr.length; r < l; r++) {
- if (typeof ruleItr[r].token === "string") {
- if (/keyword|support|storage/.test(ruleItr[r].token))
- completionKeywords.push(ruleItr[r].regex);
- }
- else if (typeof ruleItr[r].token === "object") {
- for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) {
- if (/keyword|support|storage/.test(ruleItr[r].token[a])) {
- var rule = ruleItr[r].regex.match(/\(.+?\)/g)[a];
- completionKeywords.push(rule.substr(1, rule.length - 2));
- }
- }
- }
- }
- }
- this.completionKeywords = completionKeywords;
- }
- if (!append)
- return this.$keywordList;
- return completionKeywords.concat(this.$keywordList || []);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
+ace.define("ace/tokenizer",["require","exports","module","ace/config"], function(require, exports, module) {
+"use strict";
-ace.define('ace/tokenizer', ['require', 'exports', 'module' ], function(require, exports, module) {
-var MAX_TOKEN_COUNT = 1000;
+var config = require("./config");
+var MAX_TOKEN_COUNT = 2000;
var Tokenizer = function(rules) {
this.states = rules;
@@ -8015,9 +4922,11 @@ var Tokenizer = function(rules) {
if (rule.token.length == 1 || matchcount == 1) {
rule.token = rule.token[0];
} else if (matchcount - 1 != rule.token.length) {
- throw new Error("number of classes and regexp groups in '" +
- rule.token + "'\n'" + rule.regex + "' doesn't match\n"
- + (matchcount - 1) + "!=" + rule.token.length);
+ this.reportError("number of classes and regexp groups doesn't match", {
+ rule: rule,
+ groupCount: matchcount - 1
+ });
+ rule.token = rule.token[0];
} else {
rule.tokenArray = rule.token;
rule.token = null;
@@ -8032,7 +4941,7 @@ var Tokenizer = function(rules) {
if (matchcount > 1) {
if (/\\\d/.test(rule.regex)) {
- adjustedregex = rule.regex.replace(/\\([0-9]+)/g, function (match, digit) {
+ adjustedregex = rule.regex.replace(/\\([0-9]+)/g, function(match, digit) {
return "\\" + (parseInt(digit, 10) + matchTotal + 1);
});
} else {
@@ -8049,7 +4958,11 @@ var Tokenizer = function(rules) {
ruleRegExps.push(adjustedregex);
if (!rule.onMatch)
rule.onMatch = null;
- rule.__proto__ = null;
+ }
+
+ if (!ruleRegExps.length) {
+ mapping[0] = 0;
+ ruleRegExps.push("$");
}
splitterRurles.forEach(function(rule) {
@@ -8061,6 +4974,10 @@ var Tokenizer = function(rules) {
};
(function() {
+ this.$setMaxTokenCount = function(m) {
+ MAX_TOKEN_COUNT = m | 0;
+ };
+
this.$applyToken = function(str) {
var values = this.splitRegex.exec(str).slice(1);
var types = this.token.apply(this, values);
@@ -8141,17 +5058,26 @@ var Tokenizer = function(rules) {
if (startState && typeof startState != "string") {
var stack = startState.slice(0);
startState = stack[0];
+ if (startState === "#tmp") {
+ stack.shift()
+ startState = stack.shift()
+ }
} else
var stack = [];
var currentState = startState || "start";
var state = this.states[currentState];
+ if (!state) {
+ currentState = "start";
+ state = this.states[currentState];
+ }
var mapping = this.matchMappings[currentState];
var re = this.regExps[currentState];
re.lastIndex = 0;
var match, tokens = [];
var lastIndex = 0;
+ var matchAttempts = 0;
var token = {type: null, value: ""};
@@ -8184,14 +5110,15 @@ var Tokenizer = function(rules) {
type = rule.token;
if (rule.next) {
- if (typeof rule.next == "string")
+ if (typeof rule.next == "string") {
currentState = rule.next;
- else
+ } else {
currentState = rule.next(currentState, stack);
-
+ }
+
state = this.states[currentState];
if (!state) {
- window.console && console.error && console.error(currentState, "doesn't exist");
+ this.reportError("state doesn't exist", currentState);
currentState = "start";
state = this.states[currentState];
}
@@ -8204,7 +5131,7 @@ var Tokenizer = function(rules) {
}
if (value) {
- if (typeof type == "string") {
+ if (typeof type === "string") {
if ((!rule || rule.merge !== false) && token.type === type) {
token.value += value;
} else {
@@ -8226,14 +5153,20 @@ var Tokenizer = function(rules) {
lastIndex = index;
- if (tokens.length > MAX_TOKEN_COUNT) {
+ if (matchAttempts++ > MAX_TOKEN_COUNT) {
+ if (matchAttempts > 2 * line.length) {
+ this.reportError("infinite loop with in ace tokenizer", {
+ startState: startState,
+ line: line
+ });
+ }
while (lastIndex < line.length) {
if (token.type)
tokens.push(token);
token = {
value: line.substring(lastIndex, lastIndex += 2000),
type: "overflow"
- }
+ };
}
currentState = "start";
stack = [];
@@ -8243,20 +5176,26 @@ var Tokenizer = function(rules) {
if (token.type)
tokens.push(token);
-
+
+ if (stack.length > 1) {
+ if (stack[0] !== currentState)
+ stack.unshift("#tmp", currentState);
+ }
return {
tokens : tokens,
state : stack.length ? stack : currentState
};
};
-
+
+ this.reportError = config.reportError;
+
}).call(Tokenizer.prototype);
exports.Tokenizer = Tokenizer;
});
-ace.define('ace/mode/text_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var lang = require("../lib/lang");
@@ -8284,7 +5223,7 @@ var TextHighlightRules = function() {
var state = rules[key];
for (var i = 0; i < state.length; i++) {
var rule = state[i];
- if (rule.next) {
+ if (rule.next || rule.onMatch) {
if (typeof rule.next != "string") {
if (rule.nextState && rule.nextState.indexOf(prefix) !== 0)
rule.nextState = prefix + rule.nextState;
@@ -8292,7 +5231,6 @@ var TextHighlightRules = function() {
if (rule.next.indexOf(prefix) !== 0)
rule.next = prefix + rule.next;
}
-
}
}
this.$rules[prefix + key] = state;
@@ -8304,7 +5242,9 @@ var TextHighlightRules = function() {
};
this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) {
- var embedRules = new HighlightRules().getRules();
+ var embedRules = typeof HighlightRules == "function"
+ ? new HighlightRules().getRules()
+ : HighlightRules;
if (states) {
for (var i = 0; i < states.length; i++)
states[i] = prefix + states[i];
@@ -8332,15 +5272,13 @@ var TextHighlightRules = function() {
};
var pushState = function(currentState, stack) {
- if (currentState != "start")
+ if (currentState != "start" || stack.length)
stack.unshift(this.nextState, currentState);
return this.nextState;
};
var popState = function(currentState, stack) {
- if (stack[0] !== currentState)
- return "start";
stack.shift();
- return stack.shift();
+ return stack.shift() || "start";
};
this.normalizeRules = function() {
@@ -8410,7 +5348,7 @@ var TextHighlightRules = function() {
args = args.filter(function(x) {return !x.next;});
state.splice.apply(state, args);
i--;
- toInsert = null
+ toInsert = null;
}
if (rule.keywordMap) {
@@ -8420,7 +5358,7 @@ var TextHighlightRules = function() {
delete rule.defaultToken;
}
}
- };
+ }
Object.keys(rules).forEach(processState, this);
};
@@ -8434,12 +5372,15 @@ var TextHighlightRules = function() {
for (var i = list.length; i--; )
keywords[list[i]] = className;
});
+ if (Object.getPrototypeOf(keywords)) {
+ keywords.__proto__ = null;
+ }
this.$keywordList = Object.keys(keywords);
map = null;
return ignoreCase
? function(value) {return keywords[value.toLowerCase()] || defaultToken }
: function(value) {return keywords[value] || defaultToken };
- }
+ };
this.getKeywords = function() {
return this.$keywords;
@@ -8450,8 +5391,8 @@ var TextHighlightRules = function() {
exports.TextHighlightRules = TextHighlightRules;
});
-ace.define('ace/mode/behaviour', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour",["require","exports","module"], function(require, exports, module) {
+"use strict";
var Behaviour = function() {
this.$behaviours = {};
@@ -8510,7 +5451,9 @@ var Behaviour = function() {
exports.Behaviour = Behaviour;
});
-ace.define('ace/unicode', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+ace.define("ace/unicode",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.packages = {};
addUnicodePackage({
@@ -8561,7 +5504,8 @@ function addUnicodePackage (pack) {
});
-ace.define('ace/token_iterator', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/token_iterator",["require","exports","module"], function(require, exports, module) {
+"use strict";
var TokenIterator = function(session, initialRow, initialColumn) {
this.$session = session;
this.$row = initialRow;
@@ -8633,8 +5577,510 @@ var TokenIterator = function(session, initialRow, initialColumn) {
exports.TokenIterator = TokenIterator;
});
-ace.define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
+ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var Behaviour = require("./behaviour").Behaviour;
+var unicode = require("../unicode");
+var lang = require("../lib/lang");
+var TokenIterator = require("../token_iterator").TokenIterator;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = TextHighlightRules;
+ this.$behaviour = new Behaviour();
+};
+
+(function() {
+
+ this.tokenRe = new RegExp("^["
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "\\$_]+", "g"
+ );
+
+ this.nonTokenRe = new RegExp("^(?:[^"
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "\\$_]|\\s])+", "g"
+ );
+
+ this.getTokenizer = function() {
+ if (!this.$tokenizer) {
+ this.$highlightRules = this.$highlightRules || new this.HighlightRules();
+ this.$tokenizer = new Tokenizer(this.$highlightRules.getRules());
+ }
+ return this.$tokenizer;
+ };
+
+ this.lineCommentStart = "";
+ this.blockComment = "";
+ this.toggleCommentLines = function(state, session, startRow, endRow) {
+ var doc = session.doc;
+
+ var ignoreBlankLines = true;
+ var shouldRemove = true;
+ var minIndent = Infinity;
+ var tabSize = session.getTabSize();
+ var insertAtTabStop = false;
+
+ if (!this.lineCommentStart) {
+ if (!this.blockComment)
+ return false;
+ var lineCommentStart = this.blockComment.start;
+ var lineCommentEnd = this.blockComment.end;
+ var regexpStart = new RegExp("^(\\s*)(?:" + lang.escapeRegExp(lineCommentStart) + ")");
+ var regexpEnd = new RegExp("(?:" + lang.escapeRegExp(lineCommentEnd) + ")\\s*$");
+
+ var comment = function(line, i) {
+ if (testRemove(line, i))
+ return;
+ if (!ignoreBlankLines || /\S/.test(line)) {
+ doc.insertInLine({row: i, column: line.length}, lineCommentEnd);
+ doc.insertInLine({row: i, column: minIndent}, lineCommentStart);
+ }
+ };
+
+ var uncomment = function(line, i) {
+ var m;
+ if (m = line.match(regexpEnd))
+ doc.removeInLine(i, line.length - m[0].length, line.length);
+ if (m = line.match(regexpStart))
+ doc.removeInLine(i, m[1].length, m[0].length);
+ };
+
+ var testRemove = function(line, row) {
+ if (regexpStart.test(line))
+ return true;
+ var tokens = session.getTokens(row);
+ for (var i = 0; i < tokens.length; i++) {
+ if (tokens[i].type === 'comment')
+ return true;
+ }
+ };
+ } else {
+ if (Array.isArray(this.lineCommentStart)) {
+ var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join("|");
+ var lineCommentStart = this.lineCommentStart[0];
+ } else {
+ var regexpStart = lang.escapeRegExp(this.lineCommentStart);
+ var lineCommentStart = this.lineCommentStart;
+ }
+ regexpStart = new RegExp("^(\\s*)(?:" + regexpStart + ") ?");
+
+ insertAtTabStop = session.getUseSoftTabs();
+
+ var uncomment = function(line, i) {
+ var m = line.match(regexpStart);
+ if (!m) return;
+ var start = m[1].length, end = m[0].length;
+ if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == " ")
+ end--;
+ doc.removeInLine(i, start, end);
+ };
+ var commentWithSpace = lineCommentStart + " ";
+ var comment = function(line, i) {
+ if (!ignoreBlankLines || /\S/.test(line)) {
+ if (shouldInsertSpace(line, minIndent, minIndent))
+ doc.insertInLine({row: i, column: minIndent}, commentWithSpace);
+ else
+ doc.insertInLine({row: i, column: minIndent}, lineCommentStart);
+ }
+ };
+ var testRemove = function(line, i) {
+ return regexpStart.test(line);
+ };
+
+ var shouldInsertSpace = function(line, before, after) {
+ var spaces = 0;
+ while (before-- && line.charAt(before) == " ")
+ spaces++;
+ if (spaces % tabSize != 0)
+ return false;
+ var spaces = 0;
+ while (line.charAt(after++) == " ")
+ spaces++;
+ if (tabSize > 2)
+ return spaces % tabSize != tabSize - 1;
+ else
+ return spaces % tabSize == 0;
+ return true;
+ };
+ }
+
+ function iter(fun) {
+ for (var i = startRow; i <= endRow; i++)
+ fun(doc.getLine(i), i);
+ }
+
+
+ var minEmptyLength = Infinity;
+ iter(function(line, i) {
+ var indent = line.search(/\S/);
+ if (indent !== -1) {
+ if (indent < minIndent)
+ minIndent = indent;
+ if (shouldRemove && !testRemove(line, i))
+ shouldRemove = false;
+ } else if (minEmptyLength > line.length) {
+ minEmptyLength = line.length;
+ }
+ });
+
+ if (minIndent == Infinity) {
+ minIndent = minEmptyLength;
+ ignoreBlankLines = false;
+ shouldRemove = false;
+ }
+
+ if (insertAtTabStop && minIndent % tabSize != 0)
+ minIndent = Math.floor(minIndent / tabSize) * tabSize;
+
+ iter(shouldRemove ? uncomment : comment);
+ };
+
+ this.toggleBlockComment = function(state, session, range, cursor) {
+ var comment = this.blockComment;
+ if (!comment)
+ return;
+ if (!comment.start && comment[0])
+ comment = comment[0];
+
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ var sel = session.selection;
+ var initialRange = session.selection.toOrientedRange();
+ var startRow, colDiff;
+
+ if (token && /comment/.test(token.type)) {
+ var startRange, endRange;
+ while (token && /comment/.test(token.type)) {
+ var i = token.value.indexOf(comment.start);
+ if (i != -1) {
+ var row = iterator.getCurrentTokenRow();
+ var column = iterator.getCurrentTokenColumn() + i;
+ startRange = new Range(row, column, row, column + comment.start.length);
+ break;
+ }
+ token = iterator.stepBackward();
+ }
+
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ while (token && /comment/.test(token.type)) {
+ var i = token.value.indexOf(comment.end);
+ if (i != -1) {
+ var row = iterator.getCurrentTokenRow();
+ var column = iterator.getCurrentTokenColumn() + i;
+ endRange = new Range(row, column, row, column + comment.end.length);
+ break;
+ }
+ token = iterator.stepForward();
+ }
+ if (endRange)
+ session.remove(endRange);
+ if (startRange) {
+ session.remove(startRange);
+ startRow = startRange.start.row;
+ colDiff = -comment.start.length;
+ }
+ } else {
+ colDiff = comment.start.length;
+ startRow = range.start.row;
+ session.insert(range.end, comment.end);
+ session.insert(range.start, comment.start);
+ }
+ if (initialRange.start.row == startRow)
+ initialRange.start.column += colDiff;
+ if (initialRange.end.row == startRow)
+ initialRange.end.column += colDiff;
+ session.selection.fromOrientedRange(initialRange);
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.createModeDelegates = function (mapping) {
+ this.$embeds = [];
+ this.$modes = {};
+ for (var i in mapping) {
+ if (mapping[i]) {
+ this.$embeds.push(i);
+ this.$modes[i] = new mapping[i]();
+ }
+ }
+
+ var delegations = ['toggleBlockComment', 'toggleCommentLines', 'getNextLineIndent',
+ 'checkOutdent', 'autoOutdent', 'transformAction', 'getCompletions'];
+
+ for (var i = 0; i < delegations.length; i++) {
+ (function(scope) {
+ var functionName = delegations[i];
+ var defaultHandler = scope[functionName];
+ scope[delegations[i]] = function() {
+ return this.$delegator(functionName, arguments, defaultHandler);
+ };
+ } (this));
+ }
+ };
+
+ this.$delegator = function(method, args, defaultHandler) {
+ var state = args[0];
+ if (typeof state != "string")
+ state = state[0];
+ for (var i = 0; i < this.$embeds.length; i++) {
+ if (!this.$modes[this.$embeds[i]]) continue;
+
+ var split = state.split(this.$embeds[i]);
+ if (!split[0] && split[1]) {
+ args[0] = split[1];
+ var mode = this.$modes[this.$embeds[i]];
+ return mode[method].apply(mode, args);
+ }
+ }
+ var ret = defaultHandler.apply(this, args);
+ return defaultHandler ? ret : undefined;
+ };
+
+ this.transformAction = function(state, action, editor, session, param) {
+ if (this.$behaviour) {
+ var behaviours = this.$behaviour.getBehaviours();
+ for (var key in behaviours) {
+ if (behaviours[key][action]) {
+ var ret = behaviours[key][action].apply(this, arguments);
+ if (ret) {
+ return ret;
+ }
+ }
+ }
+ }
+ };
+
+ this.getKeywords = function(append) {
+ if (!this.completionKeywords) {
+ var rules = this.$tokenizer.rules;
+ var completionKeywords = [];
+ for (var rule in rules) {
+ var ruleItr = rules[rule];
+ for (var r = 0, l = ruleItr.length; r < l; r++) {
+ if (typeof ruleItr[r].token === "string") {
+ if (/keyword|support|storage/.test(ruleItr[r].token))
+ completionKeywords.push(ruleItr[r].regex);
+ }
+ else if (typeof ruleItr[r].token === "object") {
+ for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) {
+ if (/keyword|support|storage/.test(ruleItr[r].token[a])) {
+ var rule = ruleItr[r].regex.match(/\(.+?\)/g)[a];
+ completionKeywords.push(rule.substr(1, rule.length - 2));
+ }
+ }
+ }
+ }
+ }
+ this.completionKeywords = completionKeywords;
+ }
+ if (!append)
+ return this.$keywordList;
+ return completionKeywords.concat(this.$keywordList || []);
+ };
+
+ this.$createKeywordList = function() {
+ if (!this.$highlightRules)
+ this.getTokenizer();
+ return this.$keywordList = this.$highlightRules.$keywordList || [];
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var keywords = this.$keywordList || this.$createKeywordList();
+ return keywords.map(function(word) {
+ return {
+ name: word,
+ value: word,
+ score: 0,
+ meta: "keyword"
+ };
+ });
+ };
+
+ this.$id = "ace/mode/text";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+
+ if (range.start.row == range.end.row && range.start.row != this.row)
+ return;
+
+ if (range.start.row > this.row)
+ return;
+
+ if (range.start.row == this.row && range.start.column > this.column)
+ return;
+
+ var row = this.row;
+ var column = this.column;
+ var start = range.start;
+ var end = range.end;
+
+ if (delta.action === "insertText") {
+ if (start.row === row && start.column <= column) {
+ if (start.column === column && this.$insertRight) {
+ } else if (start.row === end.row) {
+ column += end.column - start.column;
+ } else {
+ column -= start.column;
+ row += end.row - start.row;
+ }
+ } else if (start.row !== end.row && start.row < row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "insertLines") {
+ if (start.row === row && column === 0 && this.$insertRight) {
+ }
+ else if (start.row <= row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "removeText") {
+ if (start.row === row && start.column < column) {
+ if (end.column >= column)
+ column = start.column;
+ else
+ column = Math.max(0, column - (end.column - start.column));
+
+ } else if (start.row !== end.row && start.row < row) {
+ if (end.row === row)
+ column = Math.max(0, column - end.column) + start.column;
+ row -= (end.row - start.row);
+ } else if (end.row === row) {
+ row -= end.row - start.row;
+ column = Math.max(0, column - end.column) + start.column;
+ }
+ } else if (delta.action == "removeLines") {
+ if (start.row <= row) {
+ if (end.row <= row)
+ row -= end.row - start.row;
+ else {
+ row = start.row;
+ column = 0;
+ }
+ }
+ }
+
+ this.setPosition(row, column, true);
+ };
+ this.setPosition = function(row, column, noClip) {
+ var pos;
+ if (noClip) {
+ pos = {
+ row: row,
+ column: column
+ };
+ } else {
+ pos = this.$clipPositionToDocument(row, column);
+ }
+
+ if (this.row == pos.row && this.column == pos.column)
+ return;
+
+ var old = {
+ row: this.row,
+ column: this.column
+ };
+
+ this.row = pos.row;
+ this.column = pos.column;
+ this._signal("change", {
+ old: old,
+ value: pos
+ });
+ };
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("change", this.$onChange);
+ };
+ this.$clipPositionToDocument = function(row, column) {
+ var pos = {};
+
+ if (row >= this.document.getLength()) {
+ pos.row = Math.max(0, this.document.getLength() - 1);
+ pos.column = this.document.getLine(pos.row).length;
+ }
+ else if (row < 0) {
+ pos.row = 0;
+ pos.column = 0;
+ }
+ else {
+ pos.row = row;
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+ }
+
+ if (column < 0)
+ pos.column = 0;
+
+ return pos;
+ };
+
+}).call(Anchor.prototype);
+
+});
+
+ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
@@ -8643,7 +6089,7 @@ var Anchor = require("./anchor").Anchor;
var Document = function(text) {
this.$lines = [];
- if (text.length == 0) {
+ if (text.length === 0) {
this.$lines = [""];
} else if (Array.isArray(text)) {
this._insertLines(0, text);
@@ -8666,10 +6112,10 @@ var Document = function(text) {
this.createAnchor = function(row, column) {
return new Anchor(this, row, column);
};
- if ("aaa".split(/a/).length == 0)
+ if ("aaa".split(/a/).length === 0)
this.$split = function(text) {
return text.replace(/\r\n|\r/g, "\n").split("\n");
- }
+ };
else
this.$split = function(text) {
return text.split(/\r\n|\r|\n/);
@@ -8679,6 +6125,7 @@ var Document = function(text) {
this.$detectNewLine = function(text) {
var match = text.match(/^.*?(\r\n|\r|\n)/m);
this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
};
this.getNewLineCharacter = function() {
switch (this.$newLineMode) {
@@ -8687,17 +6134,18 @@ var Document = function(text) {
case "unix":
return "\n";
default:
- return this.$autoNewLine;
+ return this.$autoNewLine || "\n";
}
};
- this.$autoNewLine = "\n";
+ this.$autoNewLine = "";
this.$newLineMode = "auto";
this.setNewLineMode = function(newLineMode) {
if (this.$newLineMode === newLineMode)
return;
this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
};
this.getNewLineMode = function() {
return this.$newLineMode;
@@ -8767,9 +6215,10 @@ var Document = function(text) {
this._insertLines = function(row, lines) {
if (lines.length == 0)
return {row: row, column: 0};
- if (lines.length > 0xFFFF) {
- var end = this._insertLines(row, lines.slice(0xFFFF));
- lines = lines.slice(0, 0xFFFF);
+ while (lines.length > 20000) {
+ var end = this._insertLines(row, lines.slice(0, 20000));
+ lines = lines.slice(20000);
+ row = end.row;
}
var args = [row, 0];
@@ -8782,8 +6231,8 @@ var Document = function(text) {
range: range,
lines: lines
};
- this._emit("change", { data: delta });
- return end || range.end;
+ this._signal("change", { data: delta });
+ return range.end;
};
this.insertNewLine = function(position) {
position = this.$clipPosition(position);
@@ -8802,7 +6251,7 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
@@ -8825,11 +6274,13 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: text
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
this.remove = function(range) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
range.start = this.$clipPosition(range.start);
range.end = this.$clipPosition(range.end);
@@ -8874,7 +6325,7 @@ var Document = function(text) {
range: range,
text: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return range.start;
};
this.removeLines = function(firstRow, lastRow) {
@@ -8893,7 +6344,7 @@ var Document = function(text) {
nl: this.getNewLineCharacter(),
lines: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return removed;
};
this.removeNewLine = function(row) {
@@ -8910,9 +6361,11 @@ var Document = function(text) {
range: range,
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
};
this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
if (text.length == 0 && range.isEmpty())
return range.start;
if (text == this.getTextRange(range))
@@ -8985,153 +6438,8 @@ var Document = function(text) {
exports.Document = Document;
});
-ace.define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-
-var Anchor = exports.Anchor = function(doc, row, column) {
- this.$onChange = this.onChange.bind(this);
- this.attach(doc);
-
- if (typeof column == "undefined")
- this.setPosition(row.row, row.column);
- else
- this.setPosition(row, column);
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
- this.getPosition = function() {
- return this.$clipPositionToDocument(this.row, this.column);
- };
- this.getDocument = function() {
- return this.document;
- };
- this.onChange = function(e) {
- var delta = e.data;
- var range = delta.range;
-
- if (range.start.row == range.end.row && range.start.row != this.row)
- return;
-
- if (range.start.row > this.row)
- return;
-
- if (range.start.row == this.row && range.start.column > this.column)
- return;
-
- var row = this.row;
- var column = this.column;
- var start = range.start;
- var end = range.end;
-
- if (delta.action === "insertText") {
- if (start.row === row && start.column <= column) {
- if (start.row === end.row) {
- column += end.column - start.column;
- } else {
- column -= start.column;
- row += end.row - start.row;
- }
- } else if (start.row !== end.row && start.row < row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "insertLines") {
- if (start.row <= row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "removeText") {
- if (start.row === row && start.column < column) {
- if (end.column >= column)
- column = start.column;
- else
- column = Math.max(0, column - (end.column - start.column));
-
- } else if (start.row !== end.row && start.row < row) {
- if (end.row === row)
- column = Math.max(0, column - end.column) + start.column;
- row -= (end.row - start.row);
- } else if (end.row === row) {
- row -= end.row - start.row;
- column = Math.max(0, column - end.column) + start.column;
- }
- } else if (delta.action == "removeLines") {
- if (start.row <= row) {
- if (end.row <= row)
- row -= end.row - start.row;
- else {
- row = start.row;
- column = 0;
- }
- }
- }
-
- this.setPosition(row, column, true);
- };
- this.setPosition = function(row, column, noClip) {
- var pos;
- if (noClip) {
- pos = {
- row: row,
- column: column
- };
- } else {
- pos = this.$clipPositionToDocument(row, column);
- }
-
- if (this.row == pos.row && this.column == pos.column)
- return;
-
- var old = {
- row: this.row,
- column: this.column
- };
-
- this.row = pos.row;
- this.column = pos.column;
- this._emit("change", {
- old: old,
- value: pos
- });
- };
- this.detach = function() {
- this.document.removeEventListener("change", this.$onChange);
- };
- this.attach = function(doc) {
- this.document = doc || this.document;
- this.document.on("change", this.$onChange);
- };
- this.$clipPositionToDocument = function(row, column) {
- var pos = {};
-
- if (row >= this.document.getLength()) {
- pos.row = Math.max(0, this.document.getLength() - 1);
- pos.column = this.document.getLine(pos.row).length;
- }
- else if (row < 0) {
- pos.row = 0;
- pos.column = 0;
- }
- else {
- pos.row = row;
- pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
- }
-
- if (column < 0)
- pos.column = 0;
-
- return pos;
- };
-
-}).call(Anchor.prototype);
-
-});
-
-ace.define('ace/background_tokenizer', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-
+ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
@@ -9168,10 +6476,9 @@ var BackgroundTokenizer = function(tokenizer, editor) {
currentLine++;
} while (self.lines[currentLine]);
processedLines ++;
- if ((processedLines % 5 == 0) && (new Date() - workerStart) > 20) {
+ if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) {
self.running = setTimeout(self.$worker, 20);
- self.currentLine = currentLine;
- return;
+ break;
}
}
self.currentLine = currentLine;
@@ -9203,7 +6510,7 @@ var BackgroundTokenizer = function(tokenizer, editor) {
first: firstRow,
last: lastRow
};
- this._emit("update", {data: data});
+ this._signal("update", {data: data});
};
this.start = function(startRow) {
this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength());
@@ -9213,6 +6520,11 @@ var BackgroundTokenizer = function(tokenizer, editor) {
this.stop();
this.running = setTimeout(this.$worker, 700);
};
+
+ this.scheduleStart = function() {
+ if (!this.running)
+ this.running = setTimeout(this.$worker, 700);
+ }
this.$updateOnChange = function(delta) {
var range = delta.range;
@@ -9234,7 +6546,6 @@ var BackgroundTokenizer = function(tokenizer, editor) {
this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength());
this.stop();
- this.running = setTimeout(this.$worker, 700);
};
this.stop = function() {
if (this.running)
@@ -9273,8 +6584,8 @@ var BackgroundTokenizer = function(tokenizer, editor) {
exports.BackgroundTokenizer = BackgroundTokenizer;
});
-ace.define('ace/search_highlight', ['require', 'exports', 'module' , 'ace/lib/lang', 'ace/lib/oop', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) {
+"use strict";
var lang = require("./lib/lang");
var oop = require("./lib/oop");
@@ -9325,8 +6636,538 @@ var SearchHighlight = function(regExp, clazz, type) {
exports.SearchHighlight = SearchHighlight;
});
-ace.define('ace/edit_session/folding', ['require', 'exports', 'module' , 'ace/range', 'ace/edit_session/fold_line', 'ace/edit_session/fold', 'ace/token_iterator'], function(require, exports, module) {
+ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+function FoldLine(foldData, folds) {
+ this.foldData = foldData;
+ if (Array.isArray(folds)) {
+ this.folds = folds;
+ } else {
+ folds = this.folds = [ folds ];
+ }
+
+ var last = folds[folds.length - 1];
+ this.range = new Range(folds[0].start.row, folds[0].start.column,
+ last.end.row, last.end.column);
+ this.start = this.range.start;
+ this.end = this.range.end;
+
+ this.folds.forEach(function(fold) {
+ fold.setFoldLine(this);
+ }, this);
+}
+
+(function() {
+ this.shiftRow = function(shift) {
+ this.start.row += shift;
+ this.end.row += shift;
+ this.folds.forEach(function(fold) {
+ fold.start.row += shift;
+ fold.end.row += shift;
+ });
+ };
+
+ this.addFold = function(fold) {
+ if (fold.sameRow) {
+ if (fold.start.row < this.startRow || fold.endRow > this.endRow) {
+ throw new Error("Can't add a fold to this FoldLine as it has no connection");
+ }
+ this.folds.push(fold);
+ this.folds.sort(function(a, b) {
+ return -a.range.compareEnd(b.start.row, b.start.column);
+ });
+ if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {
+ this.end.row = fold.end.row;
+ this.end.column = fold.end.column;
+ } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {
+ this.start.row = fold.start.row;
+ this.start.column = fold.start.column;
+ }
+ } else if (fold.start.row == this.end.row) {
+ this.folds.push(fold);
+ this.end.row = fold.end.row;
+ this.end.column = fold.end.column;
+ } else if (fold.end.row == this.start.row) {
+ this.folds.unshift(fold);
+ this.start.row = fold.start.row;
+ this.start.column = fold.start.column;
+ } else {
+ throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");
+ }
+ fold.foldLine = this;
+ };
+
+ this.containsRow = function(row) {
+ return row >= this.start.row && row <= this.end.row;
+ };
+
+ this.walk = function(callback, endRow, endColumn) {
+ var lastEnd = 0,
+ folds = this.folds,
+ fold,
+ cmp, stop, isNewRow = true;
+
+ if (endRow == null) {
+ endRow = this.end.row;
+ endColumn = this.end.column;
+ }
+
+ for (var i = 0; i < folds.length; i++) {
+ fold = folds[i];
+
+ cmp = fold.range.compareStart(endRow, endColumn);
+ if (cmp == -1) {
+ callback(null, endRow, endColumn, lastEnd, isNewRow);
+ return;
+ }
+
+ stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);
+ stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);
+ if (stop || cmp === 0) {
+ return;
+ }
+ isNewRow = !fold.sameRow;
+ lastEnd = fold.end.column;
+ }
+ callback(null, endRow, endColumn, lastEnd, isNewRow);
+ };
+
+ this.getNextFoldTo = function(row, column) {
+ var fold, cmp;
+ for (var i = 0; i < this.folds.length; i++) {
+ fold = this.folds[i];
+ cmp = fold.range.compareEnd(row, column);
+ if (cmp == -1) {
+ return {
+ fold: fold,
+ kind: "after"
+ };
+ } else if (cmp === 0) {
+ return {
+ fold: fold,
+ kind: "inside"
+ };
+ }
+ }
+ return null;
+ };
+
+ this.addRemoveChars = function(row, column, len) {
+ var ret = this.getNextFoldTo(row, column),
+ fold, folds;
+ if (ret) {
+ fold = ret.fold;
+ if (ret.kind == "inside"
+ && fold.start.column != column
+ && fold.start.row != row)
+ {
+ window.console && window.console.log(row, column, fold);
+ } else if (fold.start.row == row) {
+ folds = this.folds;
+ var i = folds.indexOf(fold);
+ if (i === 0) {
+ this.start.column += len;
+ }
+ for (i; i < folds.length; i++) {
+ fold = folds[i];
+ fold.start.column += len;
+ if (!fold.sameRow) {
+ return;
+ }
+ fold.end.column += len;
+ }
+ this.end.column += len;
+ }
+ }
+ };
+
+ this.split = function(row, column) {
+ var pos = this.getNextFoldTo(row, column);
+
+ if (!pos || pos.kind == "inside")
+ return null;
+
+ var fold = pos.fold;
+ var folds = this.folds;
+ var foldData = this.foldData;
+
+ var i = folds.indexOf(fold);
+ var foldBefore = folds[i - 1];
+ this.end.row = foldBefore.end.row;
+ this.end.column = foldBefore.end.column;
+ folds = folds.splice(i, folds.length - i);
+
+ var newFoldLine = new FoldLine(foldData, folds);
+ foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);
+ return newFoldLine;
+ };
+
+ this.merge = function(foldLineNext) {
+ var folds = foldLineNext.folds;
+ for (var i = 0; i < folds.length; i++) {
+ this.addFold(folds[i]);
+ }
+ var foldData = this.foldData;
+ foldData.splice(foldData.indexOf(foldLineNext), 1);
+ };
+
+ this.toString = function() {
+ var ret = [this.range.toString() + ": [" ];
+
+ this.folds.forEach(function(fold) {
+ ret.push(" " + fold.toString());
+ });
+ ret.push("]");
+ return ret.join("\n");
+ };
+
+ this.idxToPosition = function(idx) {
+ var lastFoldEndColumn = 0;
+
+ for (var i = 0; i < this.folds.length; i++) {
+ var fold = this.folds[i];
+
+ idx -= fold.start.column - lastFoldEndColumn;
+ if (idx < 0) {
+ return {
+ row: fold.start.row,
+ column: fold.start.column + idx
+ };
+ }
+
+ idx -= fold.placeholder.length;
+ if (idx < 0) {
+ return fold.start;
+ }
+
+ lastFoldEndColumn = fold.end.column;
+ }
+
+ return {
+ row: this.end.row,
+ column: this.end.column + idx
+ };
+ };
+}).call(FoldLine.prototype);
+
+exports.FoldLine = FoldLine;
+});
+
+ace.define("ace/range_list",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+var Range = require("./range").Range;
+var comparePoints = Range.comparePoints;
+
+var RangeList = function() {
+ this.ranges = [];
+};
+
+(function() {
+ this.comparePoints = comparePoints;
+
+ this.pointIndex = function(pos, excludeEdges, startIndex) {
+ var list = this.ranges;
+
+ for (var i = startIndex || 0; i < list.length; i++) {
+ var range = list[i];
+ var cmpEnd = comparePoints(pos, range.end);
+ if (cmpEnd > 0)
+ continue;
+ var cmpStart = comparePoints(pos, range.start);
+ if (cmpEnd === 0)
+ return excludeEdges && cmpStart !== 0 ? -i-2 : i;
+ if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges))
+ return i;
+
+ return -i-1;
+ }
+ return -i - 1;
+ };
+
+ this.add = function(range) {
+ var excludeEdges = !range.isEmpty();
+ var startIndex = this.pointIndex(range.start, excludeEdges);
+ if (startIndex < 0)
+ startIndex = -startIndex - 1;
+
+ var endIndex = this.pointIndex(range.end, excludeEdges, startIndex);
+
+ if (endIndex < 0)
+ endIndex = -endIndex - 1;
+ else
+ endIndex++;
+ return this.ranges.splice(startIndex, endIndex - startIndex, range);
+ };
+
+ this.addList = function(list) {
+ var removed = [];
+ for (var i = list.length; i--; ) {
+ removed.push.call(removed, this.add(list[i]));
+ }
+ return removed;
+ };
+
+ this.substractPoint = function(pos) {
+ var i = this.pointIndex(pos);
+
+ if (i >= 0)
+ return this.ranges.splice(i, 1);
+ };
+ this.merge = function() {
+ var removed = [];
+ var list = this.ranges;
+
+ list = list.sort(function(a, b) {
+ return comparePoints(a.start, b.start);
+ });
+
+ var next = list[0], range;
+ for (var i = 1; i < list.length; i++) {
+ range = next;
+ next = list[i];
+ var cmp = comparePoints(range.end, next.start);
+ if (cmp < 0)
+ continue;
+ if (cmp == 0 && !range.isEmpty() && !next.isEmpty())
+ continue;
+
+ if (comparePoints(range.end, next.end) < 0) {
+ range.end.row = next.end.row;
+ range.end.column = next.end.column;
+ }
+
+ list.splice(i, 1);
+ removed.push(next);
+ next = range;
+ i--;
+ }
+
+ this.ranges = list;
+
+ return removed;
+ };
+
+ this.contains = function(row, column) {
+ return this.pointIndex({row: row, column: column}) >= 0;
+ };
+
+ this.containsPoint = function(pos) {
+ return this.pointIndex(pos) >= 0;
+ };
+
+ this.rangeAtPoint = function(pos) {
+ var i = this.pointIndex(pos);
+ if (i >= 0)
+ return this.ranges[i];
+ };
+
+
+ this.clipRows = function(startRow, endRow) {
+ var list = this.ranges;
+ if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow)
+ return [];
+
+ var startIndex = this.pointIndex({row: startRow, column: 0});
+ if (startIndex < 0)
+ startIndex = -startIndex - 1;
+ var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex);
+ if (endIndex < 0)
+ endIndex = -endIndex - 1;
+
+ var clipped = [];
+ for (var i = startIndex; i < endIndex; i++) {
+ clipped.push(list[i]);
+ }
+ return clipped;
+ };
+
+ this.removeAll = function() {
+ return this.ranges.splice(0, this.ranges.length);
+ };
+
+ this.attach = function(session) {
+ if (this.session)
+ this.detach();
+
+ this.session = session;
+ this.onChange = this.$onChange.bind(this);
+
+ this.session.on('change', this.onChange);
+ };
+
+ this.detach = function() {
+ if (!this.session)
+ return;
+ this.session.removeListener('change', this.onChange);
+ this.session = null;
+ };
+
+ this.$onChange = function(e) {
+ var changeRange = e.data.range;
+ if (e.data.action[0] == "i"){
+ var start = changeRange.start;
+ var end = changeRange.end;
+ } else {
+ var end = changeRange.start;
+ var start = changeRange.end;
+ }
+ var startRow = start.row;
+ var endRow = end.row;
+ var lineDif = endRow - startRow;
+
+ var colDiff = -start.column + end.column;
+ var ranges = this.ranges;
+
+ for (var i = 0, n = ranges.length; i < n; i++) {
+ var r = ranges[i];
+ if (r.end.row < startRow)
+ continue;
+ if (r.start.row > startRow)
+ break;
+
+ if (r.start.row == startRow && r.start.column >= start.column ) {
+ if (r.start.column == start.column && this.$insertRight) {
+ } else {
+ r.start.column += colDiff;
+ r.start.row += lineDif;
+ }
+ }
+ if (r.end.row == startRow && r.end.column >= start.column) {
+ if (r.end.column == start.column && this.$insertRight) {
+ continue;
+ }
+ if (r.end.column == start.column && colDiff > 0 && i < n - 1) {
+ if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column)
+ r.end.column -= colDiff;
+ }
+ r.end.column += colDiff;
+ r.end.row += lineDif;
+ }
+ }
+
+ if (lineDif != 0 && i < n) {
+ for (; i < n; i++) {
+ var r = ranges[i];
+ r.start.row += lineDif;
+ r.end.row += lineDif;
+ }
+ }
+ };
+
+}).call(RangeList.prototype);
+
+exports.RangeList = RangeList;
+});
+
+ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+var RangeList = require("../range_list").RangeList;
+var oop = require("../lib/oop")
+var Fold = exports.Fold = function(range, placeholder) {
+ this.foldLine = null;
+ this.placeholder = placeholder;
+ this.range = range;
+ this.start = range.start;
+ this.end = range.end;
+
+ this.sameRow = range.start.row == range.end.row;
+ this.subFolds = this.ranges = [];
+};
+
+oop.inherits(Fold, RangeList);
+
+(function() {
+
+ this.toString = function() {
+ return '"' + this.placeholder + '" ' + this.range.toString();
+ };
+
+ this.setFoldLine = function(foldLine) {
+ this.foldLine = foldLine;
+ this.subFolds.forEach(function(fold) {
+ fold.setFoldLine(foldLine);
+ });
+ };
+
+ this.clone = function() {
+ var range = this.range.clone();
+ var fold = new Fold(range, this.placeholder);
+ this.subFolds.forEach(function(subFold) {
+ fold.subFolds.push(subFold.clone());
+ });
+ fold.collapseChildren = this.collapseChildren;
+ return fold;
+ };
+
+ this.addSubFold = function(fold) {
+ if (this.range.isEqual(fold))
+ return;
+
+ if (!this.range.containsRange(fold))
+ throw new Error("A fold can't intersect already existing fold" + fold.range + this.range);
+ consumeRange(fold, this.start);
+
+ var row = fold.start.row, column = fold.start.column;
+ for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {
+ cmp = this.subFolds[i].range.compare(row, column);
+ if (cmp != 1)
+ break;
+ }
+ var afterStart = this.subFolds[i];
+
+ if (cmp == 0)
+ return afterStart.addSubFold(fold);
+ var row = fold.range.end.row, column = fold.range.end.column;
+ for (var j = i, cmp = -1; j < this.subFolds.length; j++) {
+ cmp = this.subFolds[j].range.compare(row, column);
+ if (cmp != 1)
+ break;
+ }
+ var afterEnd = this.subFolds[j];
+
+ if (cmp == 0)
+ throw new Error("A fold can't intersect already existing fold" + fold.range + this.range);
+
+ var consumedFolds = this.subFolds.splice(i, j - i, fold);
+ fold.setFoldLine(this.foldLine);
+
+ return fold;
+ };
+
+ this.restoreRange = function(range) {
+ return restoreRange(range, this.start);
+ };
+
+}).call(Fold.prototype);
+
+function consumePoint(point, anchor) {
+ point.row -= anchor.row;
+ if (point.row == 0)
+ point.column -= anchor.column;
+}
+function consumeRange(range, anchor) {
+ consumePoint(range.start, anchor);
+ consumePoint(range.end, anchor);
+}
+function restorePoint(point, anchor) {
+ if (point.row == 0)
+ point.column += anchor.column;
+ point.row += anchor.row;
+}
+function restoreRange(range, anchor) {
+ restorePoint(range.start, anchor);
+ restorePoint(range.end, anchor);
+}
+
+});
+
+ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
var FoldLine = require("./fold_line").FoldLine;
@@ -9390,17 +7231,25 @@ function Folding() {
return foundFolds;
};
+
+ this.getFoldsInRangeList = function(ranges) {
+ if (Array.isArray(ranges)) {
+ var folds = [];
+ ranges.forEach(function(range) {
+ folds = folds.concat(this.getFoldsInRange(range));
+ }, this);
+ } else {
+ var folds = this.getFoldsInRange(ranges);
+ }
+ return folds;
+ }
this.getAllFolds = function() {
var folds = [];
var foldLines = this.$foldData;
- function addFold(fold) {
- folds.push(fold);
- }
-
for (var i = 0; i < foldLines.length; i++)
for (var j = 0; j < foldLines[i].folds.length; j++)
- addFold(foldLines[i].folds[j]);
+ folds.push(foldLines[i].folds[j]);
return folds;
};
@@ -9519,20 +7368,20 @@ function Folding() {
var startColumn = fold.start.column;
var endRow = fold.end.row;
var endColumn = fold.end.column;
- if (startRow == endRow && endColumn - startColumn < 2)
- throw "The range has to be at least 2 characters width";
+ if (!(startRow < endRow ||
+ startRow == endRow && startColumn <= endColumn - 2))
+ throw new Error("The range has to be at least 2 characters width");
var startFold = this.getFoldAt(startRow, startColumn, 1);
var endFold = this.getFoldAt(endRow, endColumn, -1);
if (startFold && endFold == startFold)
return startFold.addSubFold(fold);
- if (
- (startFold && !startFold.range.isStart(startRow, startColumn))
- || (endFold && !endFold.range.isEnd(endRow, endColumn))
- ) {
- throw "A fold can't intersect already existing fold" + fold.range + startFold.range;
- }
+ if (startFold && !startFold.range.isStart(startRow, startColumn))
+ this.removeFold(startFold);
+
+ if (endFold && !endFold.range.isEnd(endRow, endColumn))
+ this.removeFold(endFold);
var folds = this.getFoldsInRange(fold.range);
if (folds.length > 0) {
this.removeFolds(folds);
@@ -9636,7 +7485,7 @@ function Folding() {
};
this.expandFold = function(fold) {
- this.removeFold(fold);
+ this.removeFold(fold);
fold.subFolds.forEach(function(subFold) {
fold.restoreRange(subFold);
this.addFold(subFold);
@@ -9664,16 +7513,19 @@ function Folding() {
range = Range.fromPoints(location, location);
else
range = location;
-
- folds = this.getFoldsInRange(range);
+
+ folds = this.getFoldsInRangeList(range);
if (expandInner) {
this.removeFolds(folds);
} else {
- while (folds.length) {
- this.expandFolds(folds);
- folds = this.getFoldsInRange(range);
+ var subFolds = folds;
+ while (subFolds.length) {
+ this.expandFolds(subFolds);
+ subFolds = this.getFoldsInRangeList(range);
}
}
+ if (folds.length)
+ return folds;
};
this.isRowFolded = function(docRow, startFoldRow) {
return !!this.getFoldLine(docRow, startFoldRow);
@@ -9690,15 +7542,14 @@ function Folding() {
};
this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) {
- if (startRow == null) {
+ if (startRow == null)
startRow = foldLine.start.row;
+ if (startColumn == null)
startColumn = 0;
- }
-
- if (endRow == null) {
+ if (endRow == null)
endRow = foldLine.end.row;
+ if (endColumn == null)
endColumn = this.getLine(endRow).length;
- }
var doc = this.doc;
var textLine = "";
@@ -9841,19 +7692,28 @@ function Folding() {
if (depth == undefined)
depth = 100000; // JSON.stringify doesn't hanle Infinity
var foldWidgets = this.foldWidgets;
+ if (!foldWidgets)
+ return; // mode doesn't support folding
endRow = endRow || this.getLength();
- for (var row = startRow || 0; row < endRow; row++) {
+ startRow = startRow || 0;
+ for (var row = startRow; row < endRow; row++) {
if (foldWidgets[row] == null)
foldWidgets[row] = this.getFoldWidget(row);
if (foldWidgets[row] != "start")
continue;
var range = this.getFoldWidgetRange(row);
- if (range && range.end.row <= endRow) try {
- var fold = this.addFold("...", range);
- fold.collapseChildren = depth;
+ if (range && range.isMultiLine()
+ && range.end.row <= endRow
+ && range.start.row >= startRow
+ ) {
row = range.end.row;
- } catch(e) {}
+ try {
+ var fold = this.addFold("...", range);
+ if (fold)
+ fold.collapseChildren = depth;
+ } catch(e) {}
+ }
}
};
this.$foldStyles = {
@@ -9884,7 +7744,8 @@ function Folding() {
this.$foldMode = foldMode;
- this.removeListener('change', this.$updateFoldWidgets);
+ this.off('change', this.$updateFoldWidgets);
+ this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);
this._emit("changeAnnotation");
if (!foldMode || this.$foldStyle == "manual") {
@@ -9897,8 +7758,9 @@ function Folding() {
this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle);
this.$updateFoldWidgets = this.updateFoldWidgets.bind(this);
+ this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this);
this.on('change', this.$updateFoldWidgets);
-
+ this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);
};
this.getParentFoldRangeData = function (row, ignoreCurrent) {
@@ -9929,25 +7791,39 @@ function Folding() {
}
this.onFoldWidgetClick = function(row, e) {
+ e = e.domEvent;
+ var options = {
+ children: e.shiftKey,
+ all: e.ctrlKey || e.metaKey,
+ siblings: e.altKey
+ };
+
+ var range = this.$toggleFoldWidget(row, options);
+ if (!range) {
+ var el = (e.target || e.srcElement)
+ if (el && /ace_fold-widget/.test(el.className))
+ el.className += " ace_invalid";
+ }
+ };
+
+ this.$toggleFoldWidget = function(row, options) {
+ if (!this.getFoldWidget)
+ return;
var type = this.getFoldWidget(row);
var line = this.getLine(row);
- e = e.domEvent;
- var children = e.shiftKey;
- var all = e.ctrlKey || e.metaKey;
- var siblings = e.altKey;
var dir = type === "end" ? -1 : 1;
var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir);
if (fold) {
- if (children || all)
+ if (options.children || options.all)
this.removeFold(fold);
else
this.expandFold(fold);
return;
}
- var range = this.getFoldWidgetRange(row);
+ var range = this.getFoldWidgetRange(row, true);
if (range && !range.isMultiLine()) {
fold = this.getFoldAt(range.start.row, range.start.column, 1);
if (fold && range.isEqual(fold.range)) {
@@ -9956,24 +7832,47 @@ function Folding() {
}
}
- if (siblings) {
+ if (options.siblings) {
var data = this.getParentFoldRangeData(row);
if (data.range) {
var startRow = data.range.start.row + 1;
var endRow = data.range.end.row;
}
- this.foldAll(startRow, endRow, all ? 10000 : 0);
- } else if (children) {
- var endRow = range ? range.end.row : this.getLength();
- this.foldAll(row + 1, range.end.row, all ? 10000 : 0);
+ this.foldAll(startRow, endRow, options.all ? 10000 : 0);
+ } else if (options.children) {
+ endRow = range ? range.end.row : this.getLength();
+ this.foldAll(row + 1, endRow, options.all ? 10000 : 0);
} else if (range) {
- if (all)
+ if (options.all)
range.collapseChildren = 10000;
this.addFold("...", range);
}
- if (!range)
- (e.target || e.srcElement).className += " ace_invalid"
+ return range;
+ };
+
+
+
+ this.toggleFoldWidget = function(toggleParent) {
+ var row = this.selection.getCursor().row;
+ row = this.getRowFoldStart(row);
+ var range = this.$toggleFoldWidget(row, {});
+
+ if (range)
+ return;
+ var data = this.getParentFoldRangeData(row, true);
+ range = data.range || data.firstRange;
+
+ if (range) {
+ row = range.start.row;
+ var fold = this.getFoldAt(row, this.getLine(row).length, 1);
+
+ if (fold) {
+ this.removeFold(fold);
+ } else {
+ this.addFold("...", range);
+ }
+ }
};
this.updateFoldWidgets = function(e) {
@@ -9992,539 +7891,21 @@ function Folding() {
this.foldWidgets.splice.apply(this.foldWidgets, args);
}
};
-
-}
-
-exports.Folding = Folding;
-
-});
-
-ace.define('ace/edit_session/fold_line', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
-
-var Range = require("../range").Range;
-function FoldLine(foldData, folds) {
- this.foldData = foldData;
- if (Array.isArray(folds)) {
- this.folds = folds;
- } else {
- folds = this.folds = [ folds ];
- }
-
- var last = folds[folds.length - 1]
- this.range = new Range(folds[0].start.row, folds[0].start.column,
- last.end.row, last.end.column);
- this.start = this.range.start;
- this.end = this.range.end;
-
- this.folds.forEach(function(fold) {
- fold.setFoldLine(this);
- }, this);
-}
-
-(function() {
- this.shiftRow = function(shift) {
- this.start.row += shift;
- this.end.row += shift;
- this.folds.forEach(function(fold) {
- fold.start.row += shift;
- fold.end.row += shift;
- });
- }
-
- this.addFold = function(fold) {
- if (fold.sameRow) {
- if (fold.start.row < this.startRow || fold.endRow > this.endRow) {
- throw "Can't add a fold to this FoldLine as it has no connection";
- }
- this.folds.push(fold);
- this.folds.sort(function(a, b) {
- return -a.range.compareEnd(b.start.row, b.start.column);
- });
- if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {
- this.end.row = fold.end.row;
- this.end.column = fold.end.column;
- } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {
- this.start.row = fold.start.row;
- this.start.column = fold.start.column;
- }
- } else if (fold.start.row == this.end.row) {
- this.folds.push(fold);
- this.end.row = fold.end.row;
- this.end.column = fold.end.column;
- } else if (fold.end.row == this.start.row) {
- this.folds.unshift(fold);
- this.start.row = fold.start.row;
- this.start.column = fold.start.column;
- } else {
- throw "Trying to add fold to FoldRow that doesn't have a matching row";
- }
- fold.foldLine = this;
- }
-
- this.containsRow = function(row) {
- return row >= this.start.row && row <= this.end.row;
- }
-
- this.walk = function(callback, endRow, endColumn) {
- var lastEnd = 0,
- folds = this.folds,
- fold,
- comp, stop, isNewRow = true;
-
- if (endRow == null) {
- endRow = this.end.row;
- endColumn = this.end.column;
- }
-
- for (var i = 0; i < folds.length; i++) {
- fold = folds[i];
-
- comp = fold.range.compareStart(endRow, endColumn);
- if (comp == -1) {
- callback(null, endRow, endColumn, lastEnd, isNewRow);
- return;
- }
-
- stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);
- stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);
- if (stop || comp == 0) {
- return;
- }
- isNewRow = !fold.sameRow;
- lastEnd = fold.end.column;
- }
- callback(null, endRow, endColumn, lastEnd, isNewRow);
- }
-
- this.getNextFoldTo = function(row, column) {
- var fold, cmp;
- for (var i = 0; i < this.folds.length; i++) {
- fold = this.folds[i];
- cmp = fold.range.compareEnd(row, column);
- if (cmp == -1) {
- return {
- fold: fold,
- kind: "after"
- };
- } else if (cmp == 0) {
- return {
- fold: fold,
- kind: "inside"
- }
- }
- }
- return null;
- }
-
- this.addRemoveChars = function(row, column, len) {
- var ret = this.getNextFoldTo(row, column),
- fold, folds;
- if (ret) {
- fold = ret.fold;
- if (ret.kind == "inside"
- && fold.start.column != column
- && fold.start.row != row)
- {
- window.console && window.console.log(row, column, fold);
- } else if (fold.start.row == row) {
- folds = this.folds;
- var i = folds.indexOf(fold);
- if (i == 0) {
- this.start.column += len;
- }
- for (i; i < folds.length; i++) {
- fold = folds[i];
- fold.start.column += len;
- if (!fold.sameRow) {
- return;
- }
- fold.end.column += len;
- }
- this.end.column += len;
- }
- }
- }
-
- this.split = function(row, column) {
- var fold = this.getNextFoldTo(row, column).fold;
- var folds = this.folds;
- var foldData = this.foldData;
-
- if (!fold)
- return null;
-
- var i = folds.indexOf(fold);
- var foldBefore = folds[i - 1];
- this.end.row = foldBefore.end.row;
- this.end.column = foldBefore.end.column;
- folds = folds.splice(i, folds.length - i);
-
- var newFoldLine = new FoldLine(foldData, folds);
- foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);
- return newFoldLine;
- }
-
- this.merge = function(foldLineNext) {
- var folds = foldLineNext.folds;
- for (var i = 0; i < folds.length; i++) {
- this.addFold(folds[i]);
- }
- var foldData = this.foldData;
- foldData.splice(foldData.indexOf(foldLineNext), 1);
- }
-
- this.toString = function() {
- var ret = [this.range.toString() + ": [" ];
-
- this.folds.forEach(function(fold) {
- ret.push(" " + fold.toString());
- });
- ret.push("]")
- return ret.join("\n");
- }
-
- this.idxToPosition = function(idx) {
- var lastFoldEndColumn = 0;
- var fold;
-
- for (var i = 0; i < this.folds.length; i++) {
- var fold = this.folds[i];
-
- idx -= fold.start.column - lastFoldEndColumn;
- if (idx < 0) {
- return {
- row: fold.start.row,
- column: fold.start.column + idx
- };
- }
-
- idx -= fold.placeholder.length;
- if (idx < 0) {
- return fold.start;
- }
-
- lastFoldEndColumn = fold.end.column;
+ this.tokenizerUpdateFoldWidgets = function(e) {
+ var rows = e.data;
+ if (rows.first != rows.last) {
+ if (this.foldWidgets.length > rows.first)
+ this.foldWidgets.splice(rows.first, this.foldWidgets.length);
}
-
- return {
- row: this.end.row,
- column: this.end.column + idx
- };
}
-}).call(FoldLine.prototype);
-
-exports.FoldLine = FoldLine;
-});
-
-ace.define('ace/edit_session/fold', ['require', 'exports', 'module' , 'ace/range', 'ace/range_list', 'ace/lib/oop'], function(require, exports, module) {
-
-
-var Range = require("../range").Range;
-var RangeList = require("../range_list").RangeList;
-var oop = require("../lib/oop")
-var Fold = exports.Fold = function(range, placeholder) {
- this.foldLine = null;
- this.placeholder = placeholder;
- this.range = range;
- this.start = range.start;
- this.end = range.end;
-
- this.sameRow = range.start.row == range.end.row;
- this.subFolds = this.ranges = [];
-};
-
-oop.inherits(Fold, RangeList);
-
-(function() {
-
- this.toString = function() {
- return '"' + this.placeholder + '" ' + this.range.toString();
- };
-
- this.setFoldLine = function(foldLine) {
- this.foldLine = foldLine;
- this.subFolds.forEach(function(fold) {
- fold.setFoldLine(foldLine);
- });
- };
-
- this.clone = function() {
- var range = this.range.clone();
- var fold = new Fold(range, this.placeholder);
- this.subFolds.forEach(function(subFold) {
- fold.subFolds.push(subFold.clone());
- });
- fold.collapseChildren = this.collapseChildren;
- return fold;
- };
-
- this.addSubFold = function(fold) {
- if (this.range.isEqual(fold))
- return;
-
- if (!this.range.containsRange(fold))
- throw "A fold can't intersect already existing fold" + fold.range + this.range;
- consumeRange(fold, this.start);
-
- var row = fold.start.row, column = fold.start.column;
- for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {
- cmp = this.subFolds[i].range.compare(row, column);
- if (cmp != 1)
- break;
- }
- var afterStart = this.subFolds[i];
-
- if (cmp == 0)
- return afterStart.addSubFold(fold);
- var row = fold.range.end.row, column = fold.range.end.column;
- for (var j = i, cmp = -1; j < this.subFolds.length; j++) {
- cmp = this.subFolds[j].range.compare(row, column);
- if (cmp != 1)
- break;
- }
- var afterEnd = this.subFolds[j];
-
- if (cmp == 0)
- throw "A fold can't intersect already existing fold" + fold.range + this.range;
-
- var consumedFolds = this.subFolds.splice(i, j - i, fold);
- fold.setFoldLine(this.foldLine);
-
- return fold;
- };
-
- this.restoreRange = function(range) {
- return restoreRange(range, this.start);
- };
-
-}).call(Fold.prototype);
-
-function consumePoint(point, anchor) {
- point.row -= anchor.row;
- if (point.row == 0)
- point.column -= anchor.column;
-}
-function consumeRange(range, anchor) {
- consumePoint(range.start, anchor);
- consumePoint(range.end, anchor);
-}
-function restorePoint(point, anchor) {
- if (point.row == 0)
- point.column += anchor.column;
- point.row += anchor.row;
}
-function restoreRange(range, anchor) {
- restorePoint(range.start, anchor);
- restorePoint(range.end, anchor);
-}
-
-});
-
-ace.define('ace/range_list', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
-var Range = require("./range").Range;
-var comparePoints = Range.comparePoints;
-
-var RangeList = function() {
- this.ranges = [];
-};
-
-(function() {
- this.comparePoints = comparePoints;
-
- this.pointIndex = function(pos, excludeEdges, startIndex) {
- var list = this.ranges;
-
- for (var i = startIndex || 0; i < list.length; i++) {
- var range = list[i];
- var cmpEnd = comparePoints(pos, range.end);
- if (cmpEnd > 0)
- continue;
- var cmpStart = comparePoints(pos, range.start);
- if (cmpEnd === 0)
- return excludeEdges && cmpStart !== 0 ? -i-2 : i;
- if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges))
- return i;
-
- return -i-1;
- }
- return -i - 1;
- };
-
- this.add = function(range) {
- var excludeEdges = !range.isEmpty();
- var startIndex = this.pointIndex(range.start, excludeEdges);
- if (startIndex < 0)
- startIndex = -startIndex - 1;
- var endIndex = this.pointIndex(range.end, excludeEdges, startIndex);
-
- if (endIndex < 0)
- endIndex = -endIndex - 1;
- else
- endIndex++;
- return this.ranges.splice(startIndex, endIndex - startIndex, range);
- };
-
- this.addList = function(list) {
- var removed = [];
- for (var i = list.length; i--; ) {
- removed.push.call(removed, this.add(list[i]));
- }
- return removed;
- };
-
- this.substractPoint = function(pos) {
- var i = this.pointIndex(pos);
-
- if (i >= 0)
- return this.ranges.splice(i, 1);
- };
- this.merge = function() {
- var removed = [];
- var list = this.ranges;
-
- list = list.sort(function(a, b) {
- return comparePoints(a.start, b.start);
- });
-
- var next = list[0], range;
- for (var i = 1; i < list.length; i++) {
- range = next;
- next = list[i];
- var cmp = comparePoints(range.end, next.start);
- if (cmp < 0)
- continue;
-
- if (cmp == 0 && !range.isEmpty() && !next.isEmpty())
- continue;
-
- if (comparePoints(range.end, next.end) < 0) {
- range.end.row = next.end.row;
- range.end.column = next.end.column;
- }
-
- list.splice(i, 1);
- removed.push(next);
- next = range;
- i--;
- }
-
- this.ranges = list;
-
- return removed;
- };
-
- this.contains = function(row, column) {
- return this.pointIndex({row: row, column: column}) >= 0;
- };
-
- this.containsPoint = function(pos) {
- return this.pointIndex(pos) >= 0;
- };
-
- this.rangeAtPoint = function(pos) {
- var i = this.pointIndex(pos);
- if (i >= 0)
- return this.ranges[i];
- };
-
-
- this.clipRows = function(startRow, endRow) {
- var list = this.ranges;
- if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow)
- return [];
-
- var startIndex = this.pointIndex({row: startRow, column: 0});
- if (startIndex < 0)
- startIndex = -startIndex - 1;
- var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex);
- if (endIndex < 0)
- endIndex = -endIndex - 1;
-
- var clipped = [];
- for (var i = startIndex; i < endIndex; i++) {
- clipped.push(list[i]);
- }
- return clipped;
- };
-
- this.removeAll = function() {
- return this.ranges.splice(0, this.ranges.length);
- };
-
- this.attach = function(session) {
- if (this.session)
- this.detach();
-
- this.session = session;
- this.onChange = this.$onChange.bind(this);
-
- this.session.on('change', this.onChange);
- };
-
- this.detach = function() {
- if (!this.session)
- return;
- this.session.removeListener('change', this.onChange);
- this.session = null;
- };
-
- this.$onChange = function(e) {
- var changeRange = e.data.range;
- if (e.data.action[0] == "i"){
- var start = changeRange.start;
- var end = changeRange.end;
- } else {
- var end = changeRange.start;
- var start = changeRange.end;
- }
- var startRow = start.row;
- var endRow = end.row;
- var lineDif = endRow - startRow;
-
- var colDiff = -start.column + end.column;
- var ranges = this.ranges;
-
- for (var i = 0, n = ranges.length; i < n; i++) {
- var r = ranges[i];
- if (r.end.row < startRow)
- continue;
- if (r.start.row > startRow)
- break;
-
- if (r.start.row == startRow && r.start.column >= start.column ) {
-
- r.start.column += colDiff;
- r.start.row += lineDif;
- }
- if (r.end.row == startRow && r.end.column >= start.column) {
- if (r.end.column == start.column && colDiff > 0 && i < n - 1) {
- if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column)
- r.end.column -= colDiff;
- }
- r.end.column += colDiff;
- r.end.row += lineDif;
- }
- }
-
- if (lineDif != 0 && i < n) {
- for (; i < n; i++) {
- var r = ranges[i];
- r.start.row += lineDif;
- r.end.row += lineDif;
- }
- }
- };
-
-}).call(RangeList.prototype);
+exports.Folding = Folding;
-exports.RangeList = RangeList;
});
-ace.define('ace/edit_session/bracket_match', ['require', 'exports', 'module' , 'ace/token_iterator', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"], function(require, exports, module) {
+"use strict";
var TokenIterator = require("../token_iterator").TokenIterator;
var Range = require("../range").Range;
@@ -10612,6 +7993,7 @@ function BracketMatch() {
typeRe = new RegExp(
"(\\.?" +
token.type.replace(".", "\\.").replace("rparen", ".paren")
+ .replace(/\b(?:end)\b/, "(?:start|begin|end)")
+ ")+"
);
}
@@ -10663,6 +8045,7 @@ function BracketMatch() {
typeRe = new RegExp(
"(\\.?" +
token.type.replace(".", "\\.").replace("lparen", ".paren")
+ .replace(/\b(?:start|begin)\b/, "(?:start|begin|end)")
+ ")+"
);
}
@@ -10703,8 +8086,1744 @@ exports.BracketMatch = BracketMatch;
});
-ace.define('ace/search', ['require', 'exports', 'module' , 'ace/lib/lang', 'ace/lib/oop', 'ace/range'], function(require, exports, module) {
+ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var lang = require("./lib/lang");
+var config = require("./config");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Selection = require("./selection").Selection;
+var TextMode = require("./mode/text").Mode;
+var Range = require("./range").Range;
+var Document = require("./document").Document;
+var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer;
+var SearchHighlight = require("./search_highlight").SearchHighlight;
+
+var EditSession = function(text, mode) {
+ this.$breakpoints = [];
+ this.$decorations = [];
+ this.$frontMarkers = {};
+ this.$backMarkers = {};
+ this.$markerId = 1;
+ this.$undoSelect = true;
+
+ this.$foldData = [];
+ this.$foldData.toString = function() {
+ return this.join("\n");
+ }
+ this.on("changeFold", this.onChangeFold.bind(this));
+ this.$onChange = this.onChange.bind(this);
+
+ if (typeof text != "object" || !text.getLine)
+ text = new Document(text);
+
+ this.setDocument(text);
+ this.selection = new Selection(this);
+
+ config.resetOptions(this);
+ this.setMode(mode);
+ config._signal("session", this);
+};
+
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setDocument = function(doc) {
+ if (this.doc)
+ this.doc.removeListener("change", this.$onChange);
+
+ this.doc = doc;
+ doc.on("change", this.$onChange);
+
+ if (this.bgTokenizer)
+ this.bgTokenizer.setDocument(this.getDocument());
+
+ this.resetCaches();
+ };
+ this.getDocument = function() {
+ return this.doc;
+ };
+ this.$resetRowCache = function(docRow) {
+ if (!docRow) {
+ this.$docRowCache = [];
+ this.$screenRowCache = [];
+ return;
+ }
+ var l = this.$docRowCache.length;
+ var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;
+ if (l > i) {
+ this.$docRowCache.splice(i, l);
+ this.$screenRowCache.splice(i, l);
+ }
+ };
+
+ this.$getRowCacheIndex = function(cacheArray, val) {
+ var low = 0;
+ var hi = cacheArray.length - 1;
+
+ while (low <= hi) {
+ var mid = (low + hi) >> 1;
+ var c = cacheArray[mid];
+
+ if (val > c)
+ low = mid + 1;
+ else if (val < c)
+ hi = mid - 1;
+ else
+ return mid;
+ }
+
+ return low -1;
+ };
+
+ this.resetCaches = function() {
+ this.$modified = true;
+ this.$wrapData = [];
+ this.$rowLengthCache = [];
+ this.$resetRowCache(0);
+ if (this.bgTokenizer)
+ this.bgTokenizer.start(0);
+ };
+
+ this.onChangeFold = function(e) {
+ var fold = e.data;
+ this.$resetRowCache(fold.start.row);
+ };
+
+ this.onChange = function(e) {
+ var delta = e.data;
+ this.$modified = true;
+
+ this.$resetRowCache(delta.range.start.row);
+
+ var removedFolds = this.$updateInternalDataOnChange(e);
+ if (!this.$fromUndo && this.$undoManager && !delta.ignore) {
+ this.$deltasDoc.push(delta);
+ if (removedFolds && removedFolds.length != 0) {
+ this.$deltasFold.push({
+ action: "removeFolds",
+ folds: removedFolds
+ });
+ }
+
+ this.$informUndoManager.schedule();
+ }
+
+ this.bgTokenizer && this.bgTokenizer.$updateOnChange(delta);
+ this._signal("change", e);
+ };
+ this.setValue = function(text) {
+ this.doc.setValue(text);
+ this.selection.moveTo(0, 0);
+
+ this.$resetRowCache(0);
+ this.$deltas = [];
+ this.$deltasDoc = [];
+ this.$deltasFold = [];
+ this.setUndoManager(this.$undoManager);
+ this.getUndoManager().reset();
+ };
+ this.getValue =
+ this.toString = function() {
+ return this.doc.getValue();
+ };
+ this.getSelection = function() {
+ return this.selection;
+ };
+ this.getState = function(row) {
+ return this.bgTokenizer.getState(row);
+ };
+ this.getTokens = function(row) {
+ return this.bgTokenizer.getTokens(row);
+ };
+ this.getTokenAt = function(row, column) {
+ var tokens = this.bgTokenizer.getTokens(row);
+ var token, c = 0;
+ if (column == null) {
+ i = tokens.length - 1;
+ c = this.getLine(row).length;
+ } else {
+ for (var i = 0; i < tokens.length; i++) {
+ c += tokens[i].value.length;
+ if (c >= column)
+ break;
+ }
+ }
+ token = tokens[i];
+ if (!token)
+ return null;
+ token.index = i;
+ token.start = c - token.value.length;
+ return token;
+ };
+ this.setUndoManager = function(undoManager) {
+ this.$undoManager = undoManager;
+ this.$deltas = [];
+ this.$deltasDoc = [];
+ this.$deltasFold = [];
+
+ if (this.$informUndoManager)
+ this.$informUndoManager.cancel();
+
+ if (undoManager) {
+ var self = this;
+
+ this.$syncInformUndoManager = function() {
+ self.$informUndoManager.cancel();
+
+ if (self.$deltasFold.length) {
+ self.$deltas.push({
+ group: "fold",
+ deltas: self.$deltasFold
+ });
+ self.$deltasFold = [];
+ }
+
+ if (self.$deltasDoc.length) {
+ self.$deltas.push({
+ group: "doc",
+ deltas: self.$deltasDoc
+ });
+ self.$deltasDoc = [];
+ }
+
+ if (self.$deltas.length > 0) {
+ undoManager.execute({
+ action: "aceupdate",
+ args: [self.$deltas, self],
+ merge: self.mergeUndoDeltas
+ });
+ }
+ self.mergeUndoDeltas = false;
+ self.$deltas = [];
+ };
+ this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);
+ }
+ };
+ this.markUndoGroup = function() {
+ if (this.$syncInformUndoManager)
+ this.$syncInformUndoManager();
+ };
+
+ this.$defaultUndoManager = {
+ undo: function() {},
+ redo: function() {},
+ reset: function() {}
+ };
+ this.getUndoManager = function() {
+ return this.$undoManager || this.$defaultUndoManager;
+ };
+ this.getTabString = function() {
+ if (this.getUseSoftTabs()) {
+ return lang.stringRepeat(" ", this.getTabSize());
+ } else {
+ return "\t";
+ }
+ };
+ this.setUseSoftTabs = function(val) {
+ this.setOption("useSoftTabs", val);
+ };
+ this.getUseSoftTabs = function() {
+ return this.$useSoftTabs && !this.$mode.$indentWithTabs;
+ };
+ this.setTabSize = function(tabSize) {
+ this.setOption("tabSize", tabSize);
+ };
+ this.getTabSize = function() {
+ return this.$tabSize;
+ };
+ this.isTabStop = function(position) {
+ return this.$useSoftTabs && (position.column % this.$tabSize === 0);
+ };
+
+ this.$overwrite = false;
+ this.setOverwrite = function(overwrite) {
+ this.setOption("overwrite", overwrite);
+ };
+ this.getOverwrite = function() {
+ return this.$overwrite;
+ };
+ this.toggleOverwrite = function() {
+ this.setOverwrite(!this.$overwrite);
+ };
+ this.addGutterDecoration = function(row, className) {
+ if (!this.$decorations[row])
+ this.$decorations[row] = "";
+ this.$decorations[row] += " " + className;
+ this._signal("changeBreakpoint", {});
+ };
+ this.removeGutterDecoration = function(row, className) {
+ this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, "");
+ this._signal("changeBreakpoint", {});
+ };
+ this.getBreakpoints = function() {
+ return this.$breakpoints;
+ };
+ this.setBreakpoints = function(rows) {
+ this.$breakpoints = [];
+ for (var i=0; i<rows.length; i++) {
+ this.$breakpoints[rows[i]] = "ace_breakpoint";
+ }
+ this._signal("changeBreakpoint", {});
+ };
+ this.clearBreakpoints = function() {
+ this.$breakpoints = [];
+ this._signal("changeBreakpoint", {});
+ };
+ this.setBreakpoint = function(row, className) {
+ if (className === undefined)
+ className = "ace_breakpoint";
+ if (className)
+ this.$breakpoints[row] = className;
+ else
+ delete this.$breakpoints[row];
+ this._signal("changeBreakpoint", {});
+ };
+ this.clearBreakpoint = function(row) {
+ delete this.$breakpoints[row];
+ this._signal("changeBreakpoint", {});
+ };
+ this.addMarker = function(range, clazz, type, inFront) {
+ var id = this.$markerId++;
+
+ var marker = {
+ range : range,
+ type : type || "line",
+ renderer: typeof type == "function" ? type : null,
+ clazz : clazz,
+ inFront: !!inFront,
+ id: id
+ };
+
+ if (inFront) {
+ this.$frontMarkers[id] = marker;
+ this._signal("changeFrontMarker");
+ } else {
+ this.$backMarkers[id] = marker;
+ this._signal("changeBackMarker");
+ }
+
+ return id;
+ };
+ this.addDynamicMarker = function(marker, inFront) {
+ if (!marker.update)
+ return;
+ var id = this.$markerId++;
+ marker.id = id;
+ marker.inFront = !!inFront;
+
+ if (inFront) {
+ this.$frontMarkers[id] = marker;
+ this._signal("changeFrontMarker");
+ } else {
+ this.$backMarkers[id] = marker;
+ this._signal("changeBackMarker");
+ }
+
+ return marker;
+ };
+ this.removeMarker = function(markerId) {
+ var marker = this.$frontMarkers[markerId] || this.$backMarkers[markerId];
+ if (!marker)
+ return;
+
+ var markers = marker.inFront ? this.$frontMarkers : this.$backMarkers;
+ if (marker) {
+ delete (markers[markerId]);
+ this._signal(marker.inFront ? "changeFrontMarker" : "changeBackMarker");
+ }
+ };
+ this.getMarkers = function(inFront) {
+ return inFront ? this.$frontMarkers : this.$backMarkers;
+ };
+
+ this.highlight = function(re) {
+ if (!this.$searchHighlight) {
+ var highlight = new SearchHighlight(null, "ace_selected-word", "text");
+ this.$searchHighlight = this.addDynamicMarker(highlight);
+ }
+ this.$searchHighlight.setRegexp(re);
+ };
+ this.highlightLines = function(startRow, endRow, clazz, inFront) {
+ if (typeof endRow != "number") {
+ clazz = endRow;
+ endRow = startRow;
+ }
+ if (!clazz)
+ clazz = "ace_step";
+
+ var range = new Range(startRow, 0, endRow, Infinity);
+ range.id = this.addMarker(range, clazz, "fullLine", inFront);
+ return range;
+ };
+ this.setAnnotations = function(annotations) {
+ this.$annotations = annotations;
+ this._signal("changeAnnotation", {});
+ };
+ this.getAnnotations = function() {
+ return this.$annotations || [];
+ };
+ this.clearAnnotations = function() {
+ this.setAnnotations([]);
+ };
+ this.$detectNewLine = function(text) {
+ var match = text.match(/^.*?(\r?\n)/m);
+ if (match) {
+ this.$autoNewLine = match[1];
+ } else {
+ this.$autoNewLine = "\n";
+ }
+ };
+ this.getWordRange = function(row, column) {
+ var line = this.getLine(row);
+
+ var inToken = false;
+ if (column > 0)
+ inToken = !!line.charAt(column - 1).match(this.tokenRe);
+
+ if (!inToken)
+ inToken = !!line.charAt(column).match(this.tokenRe);
+
+ if (inToken)
+ var re = this.tokenRe;
+ else if (/^\s+$/.test(line.slice(column-1, column+1)))
+ var re = /\s/;
+ else
+ var re = this.nonTokenRe;
+
+ var start = column;
+ if (start > 0) {
+ do {
+ start--;
+ }
+ while (start >= 0 && line.charAt(start).match(re));
+ start++;
+ }
+
+ var end = column;
+ while (end < line.length && line.charAt(end).match(re)) {
+ end++;
+ }
+
+ return new Range(row, start, row, end);
+ };
+ this.getAWordRange = function(row, column) {
+ var wordRange = this.getWordRange(row, column);
+ var line = this.getLine(wordRange.end.row);
+
+ while (line.charAt(wordRange.end.column).match(/[ \t]/)) {
+ wordRange.end.column += 1;
+ }
+ return wordRange;
+ };
+ this.setNewLineMode = function(newLineMode) {
+ this.doc.setNewLineMode(newLineMode);
+ };
+ this.getNewLineMode = function() {
+ return this.doc.getNewLineMode();
+ };
+ this.setUseWorker = function(useWorker) { this.setOption("useWorker", useWorker); };
+ this.getUseWorker = function() { return this.$useWorker; };
+ this.onReloadTokenizer = function(e) {
+ var rows = e.data;
+ this.bgTokenizer.start(rows.first);
+ this._signal("tokenizerUpdate", e);
+ };
+
+ this.$modes = {};
+ this.$mode = null;
+ this.$modeId = null;
+ this.setMode = function(mode, cb) {
+ if (mode && typeof mode === "object") {
+ if (mode.getTokenizer)
+ return this.$onChangeMode(mode);
+ var options = mode;
+ var path = options.path;
+ } else {
+ path = mode || "ace/mode/text";
+ }
+ if (!this.$modes["ace/mode/text"])
+ this.$modes["ace/mode/text"] = new TextMode();
+
+ if (this.$modes[path] && !options) {
+ this.$onChangeMode(this.$modes[path]);
+ cb && cb();
+ return;
+ }
+ this.$modeId = path;
+ config.loadModule(["mode", path], function(m) {
+ if (this.$modeId !== path)
+ return cb && cb();
+ if (this.$modes[path] && !options) {
+ this.$onChangeMode(this.$modes[path]);
+ } else if (m && m.Mode) {
+ m = new m.Mode(options);
+ if (!options) {
+ this.$modes[path] = m;
+ m.$id = path;
+ }
+ this.$onChangeMode(m);
+ }
+ cb && cb();
+ }.bind(this));
+ if (!this.$mode)
+ this.$onChangeMode(this.$modes["ace/mode/text"], true);
+ };
+
+ this.$onChangeMode = function(mode, $isPlaceholder) {
+ if (!$isPlaceholder)
+ this.$modeId = mode.$id;
+ if (this.$mode === mode)
+ return;
+
+ this.$mode = mode;
+
+ this.$stopWorker();
+
+ if (this.$useWorker)
+ this.$startWorker();
+
+ var tokenizer = mode.getTokenizer();
+
+ if(tokenizer.addEventListener !== undefined) {
+ var onReloadTokenizer = this.onReloadTokenizer.bind(this);
+ tokenizer.addEventListener("update", onReloadTokenizer);
+ }
+
+ if (!this.bgTokenizer) {
+ this.bgTokenizer = new BackgroundTokenizer(tokenizer);
+ var _self = this;
+ this.bgTokenizer.addEventListener("update", function(e) {
+ _self._signal("tokenizerUpdate", e);
+ });
+ } else {
+ this.bgTokenizer.setTokenizer(tokenizer);
+ }
+
+ this.bgTokenizer.setDocument(this.getDocument());
+
+ this.tokenRe = mode.tokenRe;
+ this.nonTokenRe = mode.nonTokenRe;
+
+
+ if (!$isPlaceholder) {
+ if (mode.attachToSession)
+ mode.attachToSession(this);
+ this.$options.wrapMethod.set.call(this, this.$wrapMethod);
+ this.$setFolding(mode.foldingRules);
+ this.bgTokenizer.start(0);
+ this._emit("changeMode");
+ }
+ };
+
+ this.$stopWorker = function() {
+ if (this.$worker) {
+ this.$worker.terminate();
+ this.$worker = null;
+ }
+ };
+
+ this.$startWorker = function() {
+ try {
+ this.$worker = this.$mode.createWorker(this);
+ } catch (e) {
+ config.warn("Could not load worker", e);
+ this.$worker = null;
+ }
+ };
+ this.getMode = function() {
+ return this.$mode;
+ };
+
+ this.$scrollTop = 0;
+ this.setScrollTop = function(scrollTop) {
+ if (this.$scrollTop === scrollTop || isNaN(scrollTop))
+ return;
+
+ this.$scrollTop = scrollTop;
+ this._signal("changeScrollTop", scrollTop);
+ };
+ this.getScrollTop = function() {
+ return this.$scrollTop;
+ };
+
+ this.$scrollLeft = 0;
+ this.setScrollLeft = function(scrollLeft) {
+ if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft))
+ return;
+
+ this.$scrollLeft = scrollLeft;
+ this._signal("changeScrollLeft", scrollLeft);
+ };
+ this.getScrollLeft = function() {
+ return this.$scrollLeft;
+ };
+ this.getScreenWidth = function() {
+ this.$computeWidth();
+ if (this.lineWidgets)
+ return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth);
+ return this.screenWidth;
+ };
+
+ this.getLineWidgetMaxWidth = function() {
+ if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth;
+ var width = 0;
+ this.lineWidgets.forEach(function(w) {
+ if (w && w.screenWidth > width)
+ width = w.screenWidth;
+ });
+ return this.lineWidgetWidth = width;
+ };
+
+ this.$computeWidth = function(force) {
+ if (this.$modified || force) {
+ this.$modified = false;
+
+ if (this.$useWrapMode)
+ return this.screenWidth = this.$wrapLimit;
+
+ var lines = this.doc.getAllLines();
+ var cache = this.$rowLengthCache;
+ var longestScreenLine = 0;
+ var foldIndex = 0;
+ var foldLine = this.$foldData[foldIndex];
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+ var len = lines.length;
+
+ for (var i = 0; i < len; i++) {
+ if (i > foldStart) {
+ i = foldLine.end.row + 1;
+ if (i >= len)
+ break;
+ foldLine = this.$foldData[foldIndex++];
+ foldStart = foldLine ? foldLine.start.row : Infinity;
+ }
+
+ if (cache[i] == null)
+ cache[i] = this.$getStringScreenWidth(lines[i])[0];
+
+ if (cache[i] > longestScreenLine)
+ longestScreenLine = cache[i];
+ }
+ this.screenWidth = longestScreenLine;
+ }
+ };
+ this.getLine = function(row) {
+ return this.doc.getLine(row);
+ };
+ this.getLines = function(firstRow, lastRow) {
+ return this.doc.getLines(firstRow, lastRow);
+ };
+ this.getLength = function() {
+ return this.doc.getLength();
+ };
+ this.getTextRange = function(range) {
+ return this.doc.getTextRange(range || this.selection.getRange());
+ };
+ this.insert = function(position, text) {
+ return this.doc.insert(position, text);
+ };
+ this.remove = function(range) {
+ return this.doc.remove(range);
+ };
+ this.undoChanges = function(deltas, dontSelect) {
+ if (!deltas.length)
+ return;
+
+ this.$fromUndo = true;
+ var lastUndoRange = null;
+ for (var i = deltas.length - 1; i != -1; i--) {
+ var delta = deltas[i];
+ if (delta.group == "doc") {
+ this.doc.revertDeltas(delta.deltas);
+ lastUndoRange =
+ this.$getUndoSelection(delta.deltas, true, lastUndoRange);
+ } else {
+ delta.deltas.forEach(function(foldDelta) {
+ this.addFolds(foldDelta.folds);
+ }, this);
+ }
+ }
+ this.$fromUndo = false;
+ lastUndoRange &&
+ this.$undoSelect &&
+ !dontSelect &&
+ this.selection.setSelectionRange(lastUndoRange);
+ return lastUndoRange;
+ };
+ this.redoChanges = function(deltas, dontSelect) {
+ if (!deltas.length)
+ return;
+
+ this.$fromUndo = true;
+ var lastUndoRange = null;
+ for (var i = 0; i < deltas.length; i++) {
+ var delta = deltas[i];
+ if (delta.group == "doc") {
+ this.doc.applyDeltas(delta.deltas);
+ lastUndoRange =
+ this.$getUndoSelection(delta.deltas, false, lastUndoRange);
+ }
+ }
+ this.$fromUndo = false;
+ lastUndoRange &&
+ this.$undoSelect &&
+ !dontSelect &&
+ this.selection.setSelectionRange(lastUndoRange);
+ return lastUndoRange;
+ };
+ this.setUndoSelect = function(enable) {
+ this.$undoSelect = enable;
+ };
+
+ this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) {
+ function isInsert(delta) {
+ var insert =
+ delta.action === "insertText" || delta.action === "insertLines";
+ return isUndo ? !insert : insert;
+ }
+
+ var delta = deltas[0];
+ var range, point;
+ var lastDeltaIsInsert = false;
+ if (isInsert(delta)) {
+ range = Range.fromPoints(delta.range.start, delta.range.end);
+ lastDeltaIsInsert = true;
+ } else {
+ range = Range.fromPoints(delta.range.start, delta.range.start);
+ lastDeltaIsInsert = false;
+ }
+
+ for (var i = 1; i < deltas.length; i++) {
+ delta = deltas[i];
+ if (isInsert(delta)) {
+ point = delta.range.start;
+ if (range.compare(point.row, point.column) == -1) {
+ range.setStart(delta.range.start);
+ }
+ point = delta.range.end;
+ if (range.compare(point.row, point.column) == 1) {
+ range.setEnd(delta.range.end);
+ }
+ lastDeltaIsInsert = true;
+ } else {
+ point = delta.range.start;
+ if (range.compare(point.row, point.column) == -1) {
+ range =
+ Range.fromPoints(delta.range.start, delta.range.start);
+ }
+ lastDeltaIsInsert = false;
+ }
+ }
+ if (lastUndoRange != null) {
+ if (Range.comparePoints(lastUndoRange.start, range.start) === 0) {
+ lastUndoRange.start.column += range.end.column - range.start.column;
+ lastUndoRange.end.column += range.end.column - range.start.column;
+ }
+
+ var cmp = lastUndoRange.compareRange(range);
+ if (cmp == 1) {
+ range.setStart(lastUndoRange.start);
+ } else if (cmp == -1) {
+ range.setEnd(lastUndoRange.end);
+ }
+ }
+
+ return range;
+ };
+ this.replace = function(range, text) {
+ return this.doc.replace(range, text);
+ };
+ this.moveText = function(fromRange, toPosition, copy) {
+ var text = this.getTextRange(fromRange);
+ var folds = this.getFoldsInRange(fromRange);
+
+ var toRange = Range.fromPoints(toPosition, toPosition);
+ if (!copy) {
+ this.remove(fromRange);
+ var rowDiff = fromRange.start.row - fromRange.end.row;
+ var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column;
+ if (collDiff) {
+ if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column)
+ toRange.start.column += collDiff;
+ if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column)
+ toRange.end.column += collDiff;
+ }
+ if (rowDiff && toRange.start.row >= fromRange.end.row) {
+ toRange.start.row += rowDiff;
+ toRange.end.row += rowDiff;
+ }
+ }
+
+ toRange.end = this.insert(toRange.start, text);
+ if (folds.length) {
+ var oldStart = fromRange.start;
+ var newStart = toRange.start;
+ var rowDiff = newStart.row - oldStart.row;
+ var collDiff = newStart.column - oldStart.column;
+ this.addFolds(folds.map(function(x) {
+ x = x.clone();
+ if (x.start.row == oldStart.row)
+ x.start.column += collDiff;
+ if (x.end.row == oldStart.row)
+ x.end.column += collDiff;
+ x.start.row += rowDiff;
+ x.end.row += rowDiff;
+ return x;
+ }));
+ }
+
+ return toRange;
+ };
+ this.indentRows = function(startRow, endRow, indentString) {
+ indentString = indentString.replace(/\t/g, this.getTabString());
+ for (var row=startRow; row<=endRow; row++)
+ this.insert({row: row, column:0}, indentString);
+ };
+ this.outdentRows = function (range) {
+ var rowRange = range.collapseRows();
+ var deleteRange = new Range(0, 0, 0, 0);
+ var size = this.getTabSize();
+
+ for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {
+ var line = this.getLine(i);
+
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ for (var j = 0; j < size; ++j)
+ if (line.charAt(j) != ' ')
+ break;
+ if (j < size && line.charAt(j) == '\t') {
+ deleteRange.start.column = j;
+ deleteRange.end.column = j + 1;
+ } else {
+ deleteRange.start.column = 0;
+ deleteRange.end.column = j;
+ }
+ this.remove(deleteRange);
+ }
+ };
+
+ this.$moveLines = function(firstRow, lastRow, dir) {
+ firstRow = this.getRowFoldStart(firstRow);
+ lastRow = this.getRowFoldEnd(lastRow);
+ if (dir < 0) {
+ var row = this.getRowFoldStart(firstRow + dir);
+ if (row < 0) return 0;
+ var diff = row-firstRow;
+ } else if (dir > 0) {
+ var row = this.getRowFoldEnd(lastRow + dir);
+ if (row > this.doc.getLength()-1) return 0;
+ var diff = row-lastRow;
+ } else {
+ firstRow = this.$clipRowToDocument(firstRow);
+ lastRow = this.$clipRowToDocument(lastRow);
+ var diff = lastRow - firstRow + 1;
+ }
+
+ var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE);
+ var folds = this.getFoldsInRange(range).map(function(x){
+ x = x.clone();
+ x.start.row += diff;
+ x.end.row += diff;
+ return x;
+ });
+
+ var lines = dir == 0
+ ? this.doc.getLines(firstRow, lastRow)
+ : this.doc.removeLines(firstRow, lastRow);
+ this.doc.insertLines(firstRow+diff, lines);
+ folds.length && this.addFolds(folds);
+ return diff;
+ };
+ this.moveLinesUp = function(firstRow, lastRow) {
+ return this.$moveLines(firstRow, lastRow, -1);
+ };
+ this.moveLinesDown = function(firstRow, lastRow) {
+ return this.$moveLines(firstRow, lastRow, 1);
+ };
+ this.duplicateLines = function(firstRow, lastRow) {
+ return this.$moveLines(firstRow, lastRow, 0);
+ };
+
+
+ this.$clipRowToDocument = function(row) {
+ return Math.max(0, Math.min(row, this.doc.getLength()-1));
+ };
+
+ this.$clipColumnToRow = function(row, column) {
+ if (column < 0)
+ return 0;
+ return Math.min(this.doc.getLine(row).length, column);
+ };
+
+
+ this.$clipPositionToDocument = function(row, column) {
+ column = Math.max(0, column);
+
+ if (row < 0) {
+ row = 0;
+ column = 0;
+ } else {
+ var len = this.doc.getLength();
+ if (row >= len) {
+ row = len - 1;
+ column = this.doc.getLine(len-1).length;
+ } else {
+ column = Math.min(this.doc.getLine(row).length, column);
+ }
+ }
+
+ return {
+ row: row,
+ column: column
+ };
+ };
+
+ this.$clipRangeToDocument = function(range) {
+ if (range.start.row < 0) {
+ range.start.row = 0;
+ range.start.column = 0;
+ } else {
+ range.start.column = this.$clipColumnToRow(
+ range.start.row,
+ range.start.column
+ );
+ }
+
+ var len = this.doc.getLength() - 1;
+ if (range.end.row > len) {
+ range.end.row = len;
+ range.end.column = this.doc.getLine(len).length;
+ } else {
+ range.end.column = this.$clipColumnToRow(
+ range.end.row,
+ range.end.column
+ );
+ }
+ return range;
+ };
+ this.$wrapLimit = 80;
+ this.$useWrapMode = false;
+ this.$wrapLimitRange = {
+ min : null,
+ max : null
+ };
+ this.setUseWrapMode = function(useWrapMode) {
+ if (useWrapMode != this.$useWrapMode) {
+ this.$useWrapMode = useWrapMode;
+ this.$modified = true;
+ this.$resetRowCache(0);
+ if (useWrapMode) {
+ var len = this.getLength();
+ this.$wrapData = Array(len);
+ this.$updateWrapData(0, len - 1);
+ }
+
+ this._signal("changeWrapMode");
+ }
+ };
+ this.getUseWrapMode = function() {
+ return this.$useWrapMode;
+ };
+ this.setWrapLimitRange = function(min, max) {
+ if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {
+ this.$wrapLimitRange = { min: min, max: max };
+ this.$modified = true;
+ if (this.$useWrapMode)
+ this._signal("changeWrapMode");
+ }
+ };
+ this.adjustWrapLimit = function(desiredLimit, $printMargin) {
+ var limits = this.$wrapLimitRange;
+ if (limits.max < 0)
+ limits = {min: $printMargin, max: $printMargin};
+ var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max);
+ if (wrapLimit != this.$wrapLimit && wrapLimit > 1) {
+ this.$wrapLimit = wrapLimit;
+ this.$modified = true;
+ if (this.$useWrapMode) {
+ this.$updateWrapData(0, this.getLength() - 1);
+ this.$resetRowCache(0);
+ this._signal("changeWrapLimit");
+ }
+ return true;
+ }
+ return false;
+ };
+
+ this.$constrainWrapLimit = function(wrapLimit, min, max) {
+ if (min)
+ wrapLimit = Math.max(min, wrapLimit);
+
+ if (max)
+ wrapLimit = Math.min(max, wrapLimit);
+
+ return wrapLimit;
+ };
+ this.getWrapLimit = function() {
+ return this.$wrapLimit;
+ };
+ this.setWrapLimit = function (limit) {
+ this.setWrapLimitRange(limit, limit);
+ };
+ this.getWrapLimitRange = function() {
+ return {
+ min : this.$wrapLimitRange.min,
+ max : this.$wrapLimitRange.max
+ };
+ };
+
+ this.$updateInternalDataOnChange = function(e) {
+ var useWrapMode = this.$useWrapMode;
+ var len;
+ var action = e.data.action;
+ var firstRow = e.data.range.start.row;
+ var lastRow = e.data.range.end.row;
+ var start = e.data.range.start;
+ var end = e.data.range.end;
+ var removedFolds = null;
+
+ if (action.indexOf("Lines") != -1) {
+ if (action == "insertLines") {
+ lastRow = firstRow + (e.data.lines.length);
+ } else {
+ lastRow = firstRow;
+ }
+ len = e.data.lines ? e.data.lines.length : lastRow - firstRow;
+ } else {
+ len = lastRow - firstRow;
+ }
+
+ this.$updating = true;
+ if (len != 0) {
+ if (action.indexOf("remove") != -1) {
+ this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len);
+
+ var foldLines = this.$foldData;
+ removedFolds = this.getFoldsInRange(e.data.range);
+ this.removeFolds(removedFolds);
+
+ var foldLine = this.getFoldLine(end.row);
+ var idx = 0;
+ if (foldLine) {
+ foldLine.addRemoveChars(end.row, end.column, start.column - end.column);
+ foldLine.shiftRow(-len);
+
+ var foldLineBefore = this.getFoldLine(firstRow);
+ if (foldLineBefore && foldLineBefore !== foldLine) {
+ foldLineBefore.merge(foldLine);
+ foldLine = foldLineBefore;
+ }
+ idx = foldLines.indexOf(foldLine) + 1;
+ }
+
+ for (idx; idx < foldLines.length; idx++) {
+ var foldLine = foldLines[idx];
+ if (foldLine.start.row >= end.row) {
+ foldLine.shiftRow(-len);
+ }
+ }
+
+ lastRow = firstRow;
+ } else {
+ var args = Array(len);
+ args.unshift(firstRow, 0);
+ var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache
+ arr.splice.apply(arr, args);
+ var foldLines = this.$foldData;
+ var foldLine = this.getFoldLine(firstRow);
+ var idx = 0;
+ if (foldLine) {
+ var cmp = foldLine.range.compareInside(start.row, start.column);
+ if (cmp == 0) {
+ foldLine = foldLine.split(start.row, start.column);
+ if (foldLine) {
+ foldLine.shiftRow(len);
+ foldLine.addRemoveChars(lastRow, 0, end.column - start.column);
+ }
+ } else
+ if (cmp == -1) {
+ foldLine.addRemoveChars(firstRow, 0, end.column - start.column);
+ foldLine.shiftRow(len);
+ }
+ idx = foldLines.indexOf(foldLine) + 1;
+ }
+
+ for (idx; idx < foldLines.length; idx++) {
+ var foldLine = foldLines[idx];
+ if (foldLine.start.row >= firstRow) {
+ foldLine.shiftRow(len);
+ }
+ }
+ }
+ } else {
+ len = Math.abs(e.data.range.start.column - e.data.range.end.column);
+ if (action.indexOf("remove") != -1) {
+ removedFolds = this.getFoldsInRange(e.data.range);
+ this.removeFolds(removedFolds);
+
+ len = -len;
+ }
+ var foldLine = this.getFoldLine(firstRow);
+ if (foldLine) {
+ foldLine.addRemoveChars(firstRow, start.column, len);
+ }
+ }
+
+ if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {
+ console.error("doc.getLength() and $wrapData.length have to be the same!");
+ }
+ this.$updating = false;
+
+ if (useWrapMode)
+ this.$updateWrapData(firstRow, lastRow);
+ else
+ this.$updateRowLengthCache(firstRow, lastRow);
+
+ return removedFolds;
+ };
+
+ this.$updateRowLengthCache = function(firstRow, lastRow, b) {
+ this.$rowLengthCache[firstRow] = null;
+ this.$rowLengthCache[lastRow] = null;
+ };
+
+ this.$updateWrapData = function(firstRow, lastRow) {
+ var lines = this.doc.getAllLines();
+ var tabSize = this.getTabSize();
+ var wrapData = this.$wrapData;
+ var wrapLimit = this.$wrapLimit;
+ var tokens;
+ var foldLine;
+
+ var row = firstRow;
+ lastRow = Math.min(lastRow, lines.length - 1);
+ while (row <= lastRow) {
+ foldLine = this.getFoldLine(row, foldLine);
+ if (!foldLine) {
+ tokens = this.$getDisplayTokens(lines[row]);
+ wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
+ row ++;
+ } else {
+ tokens = [];
+ foldLine.walk(function(placeholder, row, column, lastColumn) {
+ var walkTokens;
+ if (placeholder != null) {
+ walkTokens = this.$getDisplayTokens(
+ placeholder, tokens.length);
+ walkTokens[0] = PLACEHOLDER_START;
+ for (var i = 1; i < walkTokens.length; i++) {
+ walkTokens[i] = PLACEHOLDER_BODY;
+ }
+ } else {
+ walkTokens = this.$getDisplayTokens(
+ lines[row].substring(lastColumn, column),
+ tokens.length);
+ }
+ tokens = tokens.concat(walkTokens);
+ }.bind(this),
+ foldLine.end.row,
+ lines[foldLine.end.row].length + 1
+ );
+
+ wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
+ row = foldLine.end.row + 1;
+ }
+ }
+ };
+ var CHAR = 1,
+ CHAR_EXT = 2,
+ PLACEHOLDER_START = 3,
+ PLACEHOLDER_BODY = 4,
+ PUNCTUATION = 9,
+ SPACE = 10,
+ TAB = 11,
+ TAB_SPACE = 12;
+
+
+ this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) {
+ if (tokens.length == 0) {
+ return [];
+ }
+
+ var splits = [];
+ var displayLength = tokens.length;
+ var lastSplit = 0, lastDocSplit = 0;
+
+ var isCode = this.$wrapAsCode;
+
+ var indentedSoftWrap = this.$indentedSoftWrap;
+ var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8)
+ || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2);
+
+ function getWrapIndent() {
+ var indentation = 0;
+ if (maxIndent === 0)
+ return indentation;
+ if (indentedSoftWrap) {
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token == SPACE)
+ indentation += 1;
+ else if (token == TAB)
+ indentation += tabSize;
+ else if (token == TAB_SPACE)
+ continue;
+ else
+ break;
+ }
+ }
+ if (isCode && indentedSoftWrap !== false)
+ indentation += tabSize;
+ return Math.min(indentation, maxIndent);
+ }
+ function addSplit(screenPos) {
+ var displayed = tokens.slice(lastSplit, screenPos);
+ var len = displayed.length;
+ displayed.join("").
+ replace(/12/g, function() {
+ len -= 1;
+ }).
+ replace(/2/g, function() {
+ len -= 1;
+ });
+
+ if (!splits.length) {
+ indent = getWrapIndent();
+ splits.indent = indent;
+ }
+ lastDocSplit += len;
+ splits.push(lastDocSplit);
+ lastSplit = screenPos;
+ }
+ var indent = 0;
+ while (displayLength - lastSplit > wrapLimit - indent) {
+ var split = lastSplit + wrapLimit - indent;
+ if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) {
+ addSplit(split);
+ continue;
+ }
+ if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) {
+ for (split; split != lastSplit - 1; split--) {
+ if (tokens[split] == PLACEHOLDER_START) {
+ break;
+ }
+ }
+ if (split > lastSplit) {
+ addSplit(split);
+ continue;
+ }
+ split = lastSplit + wrapLimit;
+ for (split; split < tokens.length; split++) {
+ if (tokens[split] != PLACEHOLDER_BODY) {
+ break;
+ }
+ }
+ if (split == tokens.length) {
+ break; // Breaks the while-loop.
+ }
+ addSplit(split);
+ continue;
+ }
+ var minSplit = Math.max(split - (wrapLimit -(wrapLimit>>2)), lastSplit - 1);
+ while (split > minSplit && tokens[split] < PLACEHOLDER_START) {
+ split --;
+ }
+ if (isCode) {
+ while (split > minSplit && tokens[split] < PLACEHOLDER_START) {
+ split --;
+ }
+ while (split > minSplit && tokens[split] == PUNCTUATION) {
+ split --;
+ }
+ } else {
+ while (split > minSplit && tokens[split] < SPACE) {
+ split --;
+ }
+ }
+ if (split > minSplit) {
+ addSplit(++split);
+ continue;
+ }
+ split = lastSplit + wrapLimit;
+ if (tokens[split] == CHAR_EXT)
+ split--;
+ addSplit(split - indent);
+ }
+ return splits;
+ };
+ this.$getDisplayTokens = function(str, offset) {
+ var arr = [];
+ var tabSize;
+ offset = offset || 0;
+
+ for (var i = 0; i < str.length; i++) {
+ var c = str.charCodeAt(i);
+ if (c == 9) {
+ tabSize = this.getScreenTabSize(arr.length + offset);
+ arr.push(TAB);
+ for (var n = 1; n < tabSize; n++) {
+ arr.push(TAB_SPACE);
+ }
+ }
+ else if (c == 32) {
+ arr.push(SPACE);
+ } else if((c > 39 && c < 48) || (c > 57 && c < 64)) {
+ arr.push(PUNCTUATION);
+ }
+ else if (c >= 0x1100 && isFullWidth(c)) {
+ arr.push(CHAR, CHAR_EXT);
+ } else {
+ arr.push(CHAR);
+ }
+ }
+ return arr;
+ };
+ this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {
+ if (maxScreenColumn == 0)
+ return [0, 0];
+ if (maxScreenColumn == null)
+ maxScreenColumn = Infinity;
+ screenColumn = screenColumn || 0;
+
+ var c, column;
+ for (column = 0; column < str.length; column++) {
+ c = str.charCodeAt(column);
+ if (c == 9) {
+ screenColumn += this.getScreenTabSize(screenColumn);
+ }
+ else if (c >= 0x1100 && isFullWidth(c)) {
+ screenColumn += 2;
+ } else {
+ screenColumn += 1;
+ }
+ if (screenColumn > maxScreenColumn) {
+ break;
+ }
+ }
+
+ return [screenColumn, column];
+ };
+
+ this.lineWidgets = null;
+ this.getRowLength = function(row) {
+ if (this.lineWidgets)
+ var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;
+ else
+ h = 0
+ if (!this.$useWrapMode || !this.$wrapData[row]) {
+ return 1 + h;
+ } else {
+ return this.$wrapData[row].length + 1 + h;
+ }
+ };
+ this.getRowLineCount = function(row) {
+ if (!this.$useWrapMode || !this.$wrapData[row]) {
+ return 1;
+ } else {
+ return this.$wrapData[row].length + 1;
+ }
+ };
+
+ this.getRowWrapIndent = function(screenRow) {
+ if (this.$useWrapMode) {
+ var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);
+ var splits = this.$wrapData[pos.row];
+ return splits.length && splits[0] < pos.column ? splits.indent : 0;
+ } else {
+ return 0;
+ }
+ }
+ this.getScreenLastRowColumn = function(screenRow) {
+ var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);
+ return this.documentToScreenColumn(pos.row, pos.column);
+ };
+ this.getDocumentLastRowColumn = function(docRow, docColumn) {
+ var screenRow = this.documentToScreenRow(docRow, docColumn);
+ return this.getScreenLastRowColumn(screenRow);
+ };
+ this.getDocumentLastRowColumnPosition = function(docRow, docColumn) {
+ var screenRow = this.documentToScreenRow(docRow, docColumn);
+ return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);
+ };
+ this.getRowSplitData = function(row) {
+ if (!this.$useWrapMode) {
+ return undefined;
+ } else {
+ return this.$wrapData[row];
+ }
+ };
+ this.getScreenTabSize = function(screenColumn) {
+ return this.$tabSize - screenColumn % this.$tabSize;
+ };
+
+
+ this.screenToDocumentRow = function(screenRow, screenColumn) {
+ return this.screenToDocumentPosition(screenRow, screenColumn).row;
+ };
+
+
+ this.screenToDocumentColumn = function(screenRow, screenColumn) {
+ return this.screenToDocumentPosition(screenRow, screenColumn).column;
+ };
+ this.screenToDocumentPosition = function(screenRow, screenColumn) {
+ if (screenRow < 0)
+ return {row: 0, column: 0};
+
+ var line;
+ var docRow = 0;
+ var docColumn = 0;
+ var column;
+ var row = 0;
+ var rowLength = 0;
+
+ var rowCache = this.$screenRowCache;
+ var i = this.$getRowCacheIndex(rowCache, screenRow);
+ var l = rowCache.length;
+ if (l && i >= 0) {
+ var row = rowCache[i];
+ var docRow = this.$docRowCache[i];
+ var doCache = screenRow > rowCache[l - 1];
+ } else {
+ var doCache = !l;
+ }
+
+ var maxRow = this.getLength() - 1;
+ var foldLine = this.getNextFoldLine(docRow);
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+ while (row <= screenRow) {
+ rowLength = this.getRowLength(docRow);
+ if (row + rowLength > screenRow || docRow >= maxRow) {
+ break;
+ } else {
+ row += rowLength;
+ docRow++;
+ if (docRow > foldStart) {
+ docRow = foldLine.end.row+1;
+ foldLine = this.getNextFoldLine(docRow, foldLine);
+ foldStart = foldLine ? foldLine.start.row : Infinity;
+ }
+ }
+
+ if (doCache) {
+ this.$docRowCache.push(docRow);
+ this.$screenRowCache.push(row);
+ }
+ }
+
+ if (foldLine && foldLine.start.row <= docRow) {
+ line = this.getFoldDisplayLine(foldLine);
+ docRow = foldLine.start.row;
+ } else if (row + rowLength <= screenRow || docRow > maxRow) {
+ return {
+ row: maxRow,
+ column: this.getLine(maxRow).length
+ };
+ } else {
+ line = this.getLine(docRow);
+ foldLine = null;
+ }
+ var wrapIndent = 0;
+ if (this.$useWrapMode) {
+ var splits = this.$wrapData[docRow];
+ if (splits) {
+ var splitIndex = Math.floor(screenRow - row);
+ column = splits[splitIndex];
+ if(splitIndex > 0 && splits.length) {
+ wrapIndent = splits.indent;
+ docColumn = splits[splitIndex - 1] || splits[splits.length - 1];
+ line = line.substring(docColumn);
+ }
+ }
+ }
+
+ docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1];
+ if (this.$useWrapMode && docColumn >= column)
+ docColumn = column - 1;
+
+ if (foldLine)
+ return foldLine.idxToPosition(docColumn);
+
+ return {row: docRow, column: docColumn};
+ };
+ this.documentToScreenPosition = function(docRow, docColumn) {
+ if (typeof docColumn === "undefined")
+ var pos = this.$clipPositionToDocument(docRow.row, docRow.column);
+ else
+ pos = this.$clipPositionToDocument(docRow, docColumn);
+
+ docRow = pos.row;
+ docColumn = pos.column;
+
+ var screenRow = 0;
+ var foldStartRow = null;
+ var fold = null;
+ fold = this.getFoldAt(docRow, docColumn, 1);
+ if (fold) {
+ docRow = fold.start.row;
+ docColumn = fold.start.column;
+ }
+
+ var rowEnd, row = 0;
+
+
+ var rowCache = this.$docRowCache;
+ var i = this.$getRowCacheIndex(rowCache, docRow);
+ var l = rowCache.length;
+ if (l && i >= 0) {
+ var row = rowCache[i];
+ var screenRow = this.$screenRowCache[i];
+ var doCache = docRow > rowCache[l - 1];
+ } else {
+ var doCache = !l;
+ }
+
+ var foldLine = this.getNextFoldLine(row);
+ var foldStart = foldLine ?foldLine.start.row :Infinity;
+
+ while (row < docRow) {
+ if (row >= foldStart) {
+ rowEnd = foldLine.end.row + 1;
+ if (rowEnd > docRow)
+ break;
+ foldLine = this.getNextFoldLine(rowEnd, foldLine);
+ foldStart = foldLine ?foldLine.start.row :Infinity;
+ }
+ else {
+ rowEnd = row + 1;
+ }
+
+ screenRow += this.getRowLength(row);
+ row = rowEnd;
+
+ if (doCache) {
+ this.$docRowCache.push(row);
+ this.$screenRowCache.push(screenRow);
+ }
+ }
+ var textLine = "";
+ if (foldLine && row >= foldStart) {
+ textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);
+ foldStartRow = foldLine.start.row;
+ } else {
+ textLine = this.getLine(docRow).substring(0, docColumn);
+ foldStartRow = docRow;
+ }
+ var wrapIndent = 0;
+ if (this.$useWrapMode) {
+ var wrapRow = this.$wrapData[foldStartRow];
+ if (wrapRow) {
+ var screenRowOffset = 0;
+ while (textLine.length >= wrapRow[screenRowOffset]) {
+ screenRow ++;
+ screenRowOffset++;
+ }
+ textLine = textLine.substring(
+ wrapRow[screenRowOffset - 1] || 0, textLine.length
+ );
+ wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0;
+ }
+ }
+
+ return {
+ row: screenRow,
+ column: wrapIndent + this.$getStringScreenWidth(textLine)[0]
+ };
+ };
+ this.documentToScreenColumn = function(row, docColumn) {
+ return this.documentToScreenPosition(row, docColumn).column;
+ };
+ this.documentToScreenRow = function(docRow, docColumn) {
+ return this.documentToScreenPosition(docRow, docColumn).row;
+ };
+ this.getScreenLength = function() {
+ var screenRows = 0;
+ var fold = null;
+ if (!this.$useWrapMode) {
+ screenRows = this.getLength();
+ var foldData = this.$foldData;
+ for (var i = 0; i < foldData.length; i++) {
+ fold = foldData[i];
+ screenRows -= fold.end.row - fold.start.row;
+ }
+ } else {
+ var lastRow = this.$wrapData.length;
+ var row = 0, i = 0;
+ var fold = this.$foldData[i++];
+ var foldStart = fold ? fold.start.row :Infinity;
+
+ while (row < lastRow) {
+ var splits = this.$wrapData[row];
+ screenRows += splits ? splits.length + 1 : 1;
+ row ++;
+ if (row > foldStart) {
+ row = fold.end.row+1;
+ fold = this.$foldData[i++];
+ foldStart = fold ?fold.start.row :Infinity;
+ }
+ }
+ }
+ if (this.lineWidgets)
+ screenRows += this.$getWidgetScreenLength();
+
+ return screenRows;
+ };
+ this.$setFontMetrics = function(fm) {
+ };
+
+ this.destroy = function() {
+ if (this.bgTokenizer) {
+ this.bgTokenizer.setDocument(null);
+ this.bgTokenizer = null;
+ }
+ this.$stopWorker();
+ };
+ function isFullWidth(c) {
+ if (c < 0x1100)
+ return false;
+ return c >= 0x1100 && c <= 0x115F ||
+ c >= 0x11A3 && c <= 0x11A7 ||
+ c >= 0x11FA && c <= 0x11FF ||
+ c >= 0x2329 && c <= 0x232A ||
+ c >= 0x2E80 && c <= 0x2E99 ||
+ c >= 0x2E9B && c <= 0x2EF3 ||
+ c >= 0x2F00 && c <= 0x2FD5 ||
+ c >= 0x2FF0 && c <= 0x2FFB ||
+ c >= 0x3000 && c <= 0x303E ||
+ c >= 0x3041 && c <= 0x3096 ||
+ c >= 0x3099 && c <= 0x30FF ||
+ c >= 0x3105 && c <= 0x312D ||
+ c >= 0x3131 && c <= 0x318E ||
+ c >= 0x3190 && c <= 0x31BA ||
+ c >= 0x31C0 && c <= 0x31E3 ||
+ c >= 0x31F0 && c <= 0x321E ||
+ c >= 0x3220 && c <= 0x3247 ||
+ c >= 0x3250 && c <= 0x32FE ||
+ c >= 0x3300 && c <= 0x4DBF ||
+ c >= 0x4E00 && c <= 0xA48C ||
+ c >= 0xA490 && c <= 0xA4C6 ||
+ c >= 0xA960 && c <= 0xA97C ||
+ c >= 0xAC00 && c <= 0xD7A3 ||
+ c >= 0xD7B0 && c <= 0xD7C6 ||
+ c >= 0xD7CB && c <= 0xD7FB ||
+ c >= 0xF900 && c <= 0xFAFF ||
+ c >= 0xFE10 && c <= 0xFE19 ||
+ c >= 0xFE30 && c <= 0xFE52 ||
+ c >= 0xFE54 && c <= 0xFE66 ||
+ c >= 0xFE68 && c <= 0xFE6B ||
+ c >= 0xFF01 && c <= 0xFF60 ||
+ c >= 0xFFE0 && c <= 0xFFE6;
+ };
+
+}).call(EditSession.prototype);
+
+require("./edit_session/folding").Folding.call(EditSession.prototype);
+require("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype);
+
+
+config.defineOptions(EditSession.prototype, "session", {
+ wrap: {
+ set: function(value) {
+ if (!value || value == "off")
+ value = false;
+ else if (value == "free")
+ value = true;
+ else if (value == "printMargin")
+ value = -1;
+ else if (typeof value == "string")
+ value = parseInt(value, 10) || false;
+
+ if (this.$wrap == value)
+ return;
+ this.$wrap = value;
+ if (!value) {
+ this.setUseWrapMode(false);
+ } else {
+ var col = typeof value == "number" ? value : null;
+ this.setWrapLimitRange(col, col);
+ this.setUseWrapMode(true);
+ }
+ },
+ get: function() {
+ if (this.getUseWrapMode()) {
+ if (this.$wrap == -1)
+ return "printMargin";
+ if (!this.getWrapLimitRange().min)
+ return "free";
+ return this.$wrap;
+ }
+ return "off";
+ },
+ handlesSet: true
+ },
+ wrapMethod: {
+ set: function(val) {
+ val = val == "auto"
+ ? this.$mode.type != "text"
+ : val != "text";
+ if (val != this.$wrapAsCode) {
+ this.$wrapAsCode = val;
+ if (this.$useWrapMode) {
+ this.$modified = true;
+ this.$resetRowCache(0);
+ this.$updateWrapData(0, this.getLength() - 1);
+ }
+ }
+ },
+ initialValue: "auto"
+ },
+ indentedSoftWrap: { initialValue: true },
+ firstLineNumber: {
+ set: function() {this._signal("changeBreakpoint");},
+ initialValue: 1
+ },
+ useWorker: {
+ set: function(useWorker) {
+ this.$useWorker = useWorker;
+
+ this.$stopWorker();
+ if (useWorker)
+ this.$startWorker();
+ },
+ initialValue: true
+ },
+ useSoftTabs: {initialValue: true},
+ tabSize: {
+ set: function(tabSize) {
+ if (isNaN(tabSize) || this.$tabSize === tabSize) return;
+
+ this.$modified = true;
+ this.$rowLengthCache = [];
+ this.$tabSize = tabSize;
+ this._signal("changeTabSize");
+ },
+ initialValue: 4,
+ handlesSet: true
+ },
+ overwrite: {
+ set: function(val) {this._signal("changeOverwrite");},
+ initialValue: false
+ },
+ newLineMode: {
+ set: function(val) {this.doc.setNewLineMode(val)},
+ get: function() {return this.doc.getNewLineMode()},
+ handlesSet: true
+ },
+ mode: {
+ set: function(val) { this.setMode(val) },
+ get: function() { return this.$modeId }
+ }
+});
+
+exports.EditSession = EditSession;
+});
+ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) {
+"use strict";
var lang = require("./lib/lang");
var oop = require("./lib/oop");
@@ -10726,8 +9845,8 @@ var Search = function() {
this.$options = options;
};
this.find = function(session) {
- var iterator = this.$matchIterator(session, this.$options);
-
+ var options = this.$options;
+ var iterator = this.$matchIterator(session, options);
if (!iterator)
return false;
@@ -10735,7 +9854,13 @@ var Search = function() {
iterator.forEach(function(range, row, offset) {
if (!range.start) {
var column = range.offset + (offset || 0);
- firstRange = new Range(row, column, row, column+range.length);
+ firstRange = new Range(row, column, row, column + range.length);
+ if (!range.length && options.start && options.start.start
+ && options.skipCurrent != false && firstRange.isEqual(options.start)
+ ) {
+ firstRange = null;
+ return false;
+ }
} else
firstRange = range;
return true;
@@ -10759,20 +9884,27 @@ var Search = function() {
if (options.$isMultiLine) {
var len = re.length;
var maxRow = lines.length - len;
- for (var row = re.offset || 0; row <= maxRow; row++) {
+ var prevRange;
+ outer: for (var row = re.offset || 0; row <= maxRow; row++) {
for (var j = 0; j < len; j++)
if (lines[row + j].search(re[j]) == -1)
- break;
+ continue outer;
var startLine = lines[row];
var line = lines[row + len - 1];
- var startIndex = startLine.match(re[0])[0].length;
+ var startIndex = startLine.length - startLine.match(re[0])[0].length;
var endIndex = line.match(re[len - 1])[0].length;
-
- ranges.push(new Range(
- row, startLine.length - startIndex,
- row + len - 1, endIndex
+
+ if (prevRange && prevRange.end.row === row &&
+ prevRange.end.column > startIndex
+ ) {
+ continue;
+ }
+ ranges.push(prevRange = new Range(
+ row, startIndex, row + len - 1, endIndex
));
+ if (len > 2)
+ row = row + len - 2;
}
} else {
for (var i = 0; i < lines.length; i++) {
@@ -10838,8 +9970,7 @@ var Search = function() {
if (!re)
return false;
- var self = this, callback, backwards = options.backwards;
-
+ var callback;
if (options.$isMultiLine) {
var len = re.length;
var matchIterator = function(line, row, offset) {
@@ -10864,7 +9995,7 @@ var Search = function() {
if (callback(range))
return true;
};
- } else if (backwards) {
+ } else if (options.backwards) {
var matchIterator = function(line, row, startIndex) {
var matches = lang.getMatchOffsets(line, re);
for (var i = matches.length-1; i >= 0; i--)
@@ -10879,11 +10010,13 @@ var Search = function() {
return true;
};
}
+
+ var lineIterator = this.$lineIterator(session, options);
return {
forEach: function(_callback) {
callback = _callback;
- self.$lineIterator(session, options).forEach(matchIterator);
+ lineIterator.forEach(matchIterator);
}
};
};
@@ -10903,7 +10036,7 @@ var Search = function() {
if (options.wholeWord)
needle = "\\b" + needle + "\\b";
- var modifier = options.caseSensitive ? "g" : "gi";
+ var modifier = options.caseSensitive ? "gm" : "gmi";
options.$isMultiLine = !$disableFakeMultiline && /[\n\r]/.test(needle);
if (options.$isMultiLine)
@@ -10992,125 +10125,31 @@ var Search = function() {
exports.Search = Search;
});
-ace.define('ace/commands/command_manager', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/keyboard/hash_handler', 'ace/lib/event_emitter'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var HashHandler = require("../keyboard/hash_handler").HashHandler;
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var CommandManager = function(platform, commands) {
- this.platform = platform;
- this.commands = this.byName = {};
- this.commmandKeyBinding = {};
-
- this.addCommands(commands);
-
- this.setDefaultHandler("exec", function(e) {
- return e.command.exec(e.editor, e.args || {});
- });
-};
-
-oop.inherits(CommandManager, HashHandler);
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.exec = function(command, editor, args) {
- if (typeof command === 'string')
- command = this.commands[command];
-
- if (!command)
- return false;
-
- if (editor && editor.$readOnly && !command.readOnly)
- return false;
-
- var e = {editor: editor, command: command, args: args};
- var retvalue = this._emit("exec", e);
- this._signal("afterExec", e);
-
- return retvalue === false ? false : true;
- };
-
- this.toggleRecording = function(editor) {
- if (this.$inReplay)
- return;
-
- editor && editor._emit("changeStatus");
- if (this.recording) {
- this.macro.pop();
- this.removeEventListener("exec", this.$addCommandToMacro);
-
- if (!this.macro.length)
- this.macro = this.oldMacro;
-
- return this.recording = false;
- }
- if (!this.$addCommandToMacro) {
- this.$addCommandToMacro = function(e) {
- this.macro.push([e.command, e.args]);
- }.bind(this);
- }
-
- this.oldMacro = this.macro;
- this.macro = [];
- this.on("exec", this.$addCommandToMacro);
- return this.recording = true;
- };
-
- this.replay = function(editor) {
- if (this.$inReplay || !this.macro)
- return;
-
- if (this.recording)
- return this.toggleRecording(editor);
-
- try {
- this.$inReplay = true;
- this.macro.forEach(function(x) {
- if (typeof x == "string")
- this.exec(x, editor);
- else
- this.exec(x[0], editor, x[1]);
- }, this);
- } finally {
- this.$inReplay = false;
- }
- };
-
- this.trimMacro = function(m) {
- return m.map(function(x){
- if (typeof x[0] != "string")
- x[0] = x[0].name;
- if (!x[1])
- x = x[0];
- return x;
- });
- };
-
-}).call(CommandManager.prototype);
-
-exports.CommandManager = CommandManager;
-
-});
-
-ace.define('ace/keyboard/hash_handler', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/useragent'], function(require, exports, module) {
+ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
var keyUtil = require("../lib/keys");
var useragent = require("../lib/useragent");
+var KEY_MODS = keyUtil.KEY_MODS;
function HashHandler(config, platform) {
this.platform = platform || (useragent.isMac ? "mac" : "win");
this.commands = {};
- this.commmandKeyBinding = {};
-
+ this.commandKeyBinding = {};
this.addCommands(config);
-};
+ this.$singleCommand = true;
+}
+
+function MultiHashHandler(config, platform) {
+ HashHandler.call(this, config, platform);
+ this.$singleCommand = false;
+}
+
+MultiHashHandler.prototype = HashHandler.prototype;
(function() {
+
this.addCommand = function(command) {
if (this.commands[command.name])
@@ -11122,44 +10161,106 @@ function HashHandler(config, platform) {
this._buildKeyHash(command);
};
- this.removeCommand = function(command) {
- var name = (typeof command === 'string' ? command : command.name);
+ this.removeCommand = function(command, keepCommand) {
+ var name = command && (typeof command === 'string' ? command : command.name);
command = this.commands[name];
- delete this.commands[name];
- var ckb = this.commmandKeyBinding;
- for (var hashId in ckb) {
- for (var key in ckb[hashId]) {
- if (ckb[hashId][key] == command)
- delete ckb[hashId][key];
+ if (!keepCommand)
+ delete this.commands[name];
+ var ckb = this.commandKeyBinding;
+ for (var keyId in ckb) {
+ var cmdGroup = ckb[keyId];
+ if (cmdGroup == command) {
+ delete ckb[keyId];
+ } else if (Array.isArray(cmdGroup)) {
+ var i = cmdGroup.indexOf(command);
+ if (i != -1) {
+ cmdGroup.splice(i, 1);
+ if (cmdGroup.length == 1)
+ ckb[keyId] = cmdGroup[0];
+ }
}
}
};
- this.bindKey = function(key, command) {
- if(!key)
- return;
- if (typeof command == "function") {
- this.addCommand({exec: command, bindKey: key, name: command.name || key});
- return;
+ this.bindKey = function(key, command, position) {
+ if (typeof key == "object") {
+ if (position == undefined)
+ position = key.position;
+ key = key[this.platform];
}
-
- var ckb = this.commmandKeyBinding;
+ if (!key)
+ return;
+ if (typeof command == "function")
+ return this.addCommand({exec: command, bindKey: key, name: command.name || key});
+
key.split("|").forEach(function(keyPart) {
- var binding = this.parseKeys(keyPart, command);
- var hashId = binding.hashId;
- (ckb[hashId] || (ckb[hashId] = {}))[binding.key] = command;
+ var chain = "";
+ if (keyPart.indexOf(" ") != -1) {
+ var parts = keyPart.split(/\s+/);
+ keyPart = parts.pop();
+ parts.forEach(function(keyPart) {
+ var binding = this.parseKeys(keyPart);
+ var id = KEY_MODS[binding.hashId] + binding.key;
+ chain += (chain ? " " : "") + id;
+ this._addCommandToBinding(chain, "chainKeys");
+ }, this);
+ chain += " ";
+ }
+ var binding = this.parseKeys(keyPart);
+ var id = KEY_MODS[binding.hashId] + binding.key;
+ this._addCommandToBinding(chain + id, command, position);
}, this);
};
+
+ function getPosition(command) {
+ return typeof command == "object" && command.bindKey
+ && command.bindKey.position || 0;
+ }
+ this._addCommandToBinding = function(keyId, command, position) {
+ var ckb = this.commandKeyBinding, i;
+ if (!command) {
+ delete ckb[keyId];
+ } else if (!ckb[keyId] || this.$singleCommand) {
+ ckb[keyId] = command;
+ } else {
+ if (!Array.isArray(ckb[keyId])) {
+ ckb[keyId] = [ckb[keyId]];
+ } else if ((i = ckb[keyId].indexOf(command)) != -1) {
+ ckb[keyId].splice(i, 1);
+ }
+
+ if (typeof position != "number") {
+ if (position || command.isDefault)
+ position = -100;
+ else
+ position = getPosition(command);
+ }
+ var commands = ckb[keyId];
+ for (i = 0; i < commands.length; i++) {
+ var other = commands[i];
+ var otherPos = getPosition(other);
+ if (otherPos > position)
+ break;
+ }
+ commands.splice(i, 0, command);
+ }
+ };
this.addCommands = function(commands) {
commands && Object.keys(commands).forEach(function(name) {
var command = commands[name];
+ if (!command)
+ return;
+
if (typeof command === "string")
return this.bindKey(command, name);
if (typeof command === "function")
command = { exec: command };
+ if (typeof command !== "object")
+ return;
+
if (!command.name)
command.name = name;
@@ -11180,17 +10281,9 @@ function HashHandler(config, platform) {
};
this._buildKeyHash = function(command) {
- var binding = command.bindKey;
- if (!binding)
- return;
-
- var key = typeof binding == "string" ? binding: binding[this.platform];
- this.bindKey(key, command);
+ this.bindKey(command.bindKey, command);
};
this.parseKeys = function(keys) {
- if (keys.indexOf(" ") != -1)
- keys = keys.split(/\s+/).pop();
-
var parts = keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x});
var key = parts.pop();
@@ -11207,7 +10300,7 @@ function HashHandler(config, platform) {
var modifier = keyUtil.KEY_MODS[parts[i]];
if (modifier == null) {
if (typeof console != "undefined")
- console.error("invalid modifier " + parts[i] + " in " + keys);
+ console.error("invalid modifier " + parts[i] + " in " + keys);
return false;
}
hashId |= modifier;
@@ -11216,34 +10309,161 @@ function HashHandler(config, platform) {
};
this.findKeyCommand = function findKeyCommand(hashId, keyString) {
- var ckbr = this.commmandKeyBinding;
- return ckbr[hashId] && ckbr[hashId][keyString];
+ var key = KEY_MODS[hashId] + keyString;
+ return this.commandKeyBinding[key];
};
this.handleKeyboard = function(data, hashId, keyString, keyCode) {
- return {
- command: this.findKeyCommand(hashId, keyString)
- };
+ var key = KEY_MODS[hashId] + keyString;
+ var command = this.commandKeyBinding[key];
+ if (data.$keyChain) {
+ data.$keyChain += " " + key;
+ command = this.commandKeyBinding[data.$keyChain] || command;
+ }
+
+ if (command) {
+ if (command == "chainKeys" || command[command.length - 1] == "chainKeys") {
+ data.$keyChain = data.$keyChain || key;
+ return {command: "null"};
+ }
+ }
+
+ if (data.$keyChain) {
+ if ((!hashId || hashId == 4) && keyString.length == 1)
+ data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input
+ else if (hashId == -1 || keyCode > 0)
+ data.$keyChain = ""; // reset keyChain
+ }
+ return {command: command};
+ };
+
+ this.getStatusText = function(editor, data) {
+ return data.$keyChain || "";
};
-}).call(HashHandler.prototype)
+}).call(HashHandler.prototype);
exports.HashHandler = HashHandler;
+exports.MultiHashHandler = MultiHashHandler;
});
-ace.define('ace/commands/default_commands', ['require', 'exports', 'module' , 'ace/lib/lang', 'ace/config'], function(require, exports, module) {
+ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var MultiHashHandler = require("../keyboard/hash_handler").MultiHashHandler;
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var CommandManager = function(platform, commands) {
+ MultiHashHandler.call(this, commands, platform);
+ this.byName = this.commands;
+ this.setDefaultHandler("exec", function(e) {
+ return e.command.exec(e.editor, e.args || {});
+ });
+};
+
+oop.inherits(CommandManager, MultiHashHandler);
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.exec = function(command, editor, args) {
+ if (Array.isArray(command)) {
+ for (var i = command.length; i--; ) {
+ if (this.exec(command[i], editor, args)) return true;
+ }
+ return false;
+ }
+
+ if (typeof command === "string")
+ command = this.commands[command];
+
+ if (!command)
+ return false;
+
+ if (editor && editor.$readOnly && !command.readOnly)
+ return false;
+
+ var e = {editor: editor, command: command, args: args};
+ e.returnValue = this._emit("exec", e);
+ this._signal("afterExec", e);
+
+ return e.returnValue === false ? false : true;
+ };
+
+ this.toggleRecording = function(editor) {
+ if (this.$inReplay)
+ return;
+
+ editor && editor._emit("changeStatus");
+ if (this.recording) {
+ this.macro.pop();
+ this.removeEventListener("exec", this.$addCommandToMacro);
+
+ if (!this.macro.length)
+ this.macro = this.oldMacro;
+
+ return this.recording = false;
+ }
+ if (!this.$addCommandToMacro) {
+ this.$addCommandToMacro = function(e) {
+ this.macro.push([e.command, e.args]);
+ }.bind(this);
+ }
+
+ this.oldMacro = this.macro;
+ this.macro = [];
+ this.on("exec", this.$addCommandToMacro);
+ return this.recording = true;
+ };
+
+ this.replay = function(editor) {
+ if (this.$inReplay || !this.macro)
+ return;
+
+ if (this.recording)
+ return this.toggleRecording(editor);
+
+ try {
+ this.$inReplay = true;
+ this.macro.forEach(function(x) {
+ if (typeof x == "string")
+ this.exec(x, editor);
+ else
+ this.exec(x[0], editor, x[1]);
+ }, this);
+ } finally {
+ this.$inReplay = false;
+ }
+ };
+
+ this.trimMacro = function(m) {
+ return m.map(function(x){
+ if (typeof x[0] != "string")
+ x[0] = x[0].name;
+ if (!x[1])
+ x = x[0];
+ return x;
+ });
+ };
+
+}).call(CommandManager.prototype);
+exports.CommandManager = CommandManager;
+
+});
+
+ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"], function(require, exports, module) {
+"use strict";
var lang = require("../lib/lang");
var config = require("../config");
+var Range = require("../range").Range;
function bindKey(win, mac) {
- return {
- win: win,
- mac: mac
- };
+ return {win: win, mac: mac};
}
-
exports.commands = [{
name: "showSettingsMenu",
bindKey: bindKey("Ctrl-,", "Command-,"),
@@ -11255,6 +10475,26 @@ exports.commands = [{
},
readOnly: true
}, {
+ name: "goToNextError",
+ bindKey: bindKey("Alt-E", "Ctrl-E"),
+ exec: function(editor) {
+ config.loadModule("ace/ext/error_marker", function(module) {
+ module.showErrorMarker(editor, 1);
+ });
+ },
+ scrollIntoView: "animate",
+ readOnly: true
+}, {
+ name: "goToPreviousError",
+ bindKey: bindKey("Alt-Shift-E", "Ctrl-Shift-E"),
+ exec: function(editor) {
+ config.loadModule("ace/ext/error_marker", function(module) {
+ module.showErrorMarker(editor, -1);
+ });
+ },
+ scrollIntoView: "animate",
+ readOnly: true
+}, {
name: "selectall",
bindKey: bindKey("Ctrl-A", "Command-A"),
exec: function(editor) { editor.selectAll(); },
@@ -11278,31 +10518,84 @@ exports.commands = [{
name: "fold",
bindKey: bindKey("Alt-L|Ctrl-F1", "Command-Alt-L|Command-F1"),
exec: function(editor) { editor.session.toggleFold(false); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "center",
readOnly: true
}, {
name: "unfold",
bindKey: bindKey("Alt-Shift-L|Ctrl-Shift-F1", "Command-Alt-Shift-L|Command-Shift-F1"),
exec: function(editor) { editor.session.toggleFold(true); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "center",
+ readOnly: true
+}, {
+ name: "toggleFoldWidget",
+ bindKey: bindKey("F2", "F2"),
+ exec: function(editor) { editor.session.toggleFoldWidget(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "center",
+ readOnly: true
+}, {
+ name: "toggleParentFoldWidget",
+ bindKey: bindKey("Alt-F2", "Alt-F2"),
+ exec: function(editor) { editor.session.toggleFoldWidget(true); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "center",
readOnly: true
}, {
name: "foldall",
- bindKey: bindKey("Alt-0", "Command-Option-0"),
+ bindKey: bindKey(null, "Ctrl-Command-Option-0"),
exec: function(editor) { editor.session.foldAll(); },
+ scrollIntoView: "center",
+ readOnly: true
+}, {
+ name: "foldOther",
+ bindKey: bindKey("Alt-0", "Command-Option-0"),
+ exec: function(editor) {
+ editor.session.foldAll();
+ editor.session.unfold(editor.selection.getAllRanges());
+ },
+ scrollIntoView: "center",
readOnly: true
}, {
name: "unfoldall",
bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"),
exec: function(editor) { editor.session.unfold(); },
+ scrollIntoView: "center",
readOnly: true
}, {
name: "findnext",
bindKey: bindKey("Ctrl-K", "Command-G"),
exec: function(editor) { editor.findNext(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "center",
readOnly: true
}, {
name: "findprevious",
bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"),
exec: function(editor) { editor.findPrevious(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "center",
+ readOnly: true
+}, {
+ name: "selectOrFindNext",
+ bindKey: bindKey("Alt-K", "Ctrl-G"),
+ exec: function(editor) {
+ if (editor.selection.isEmpty())
+ editor.selection.selectWord();
+ else
+ editor.findNext();
+ },
+ readOnly: true
+}, {
+ name: "selectOrFindPrevious",
+ bindKey: bindKey("Alt-Shift-K", "Ctrl-Shift-G"),
+ exec: function(editor) {
+ if (editor.selection.isEmpty())
+ editor.selection.selectWord();
+ else
+ editor.findPrevious();
+ },
readOnly: true
}, {
name: "find",
@@ -11322,25 +10615,29 @@ exports.commands = [{
exec: function(editor) { editor.getSelection().selectFileStart(); },
multiSelectAction: "forEach",
readOnly: true,
- group: "fileJump"
+ scrollIntoView: "animate",
+ aceCommandGroup: "fileJump"
}, {
name: "gotostart",
bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"),
exec: function(editor) { editor.navigateFileStart(); },
multiSelectAction: "forEach",
readOnly: true,
- group: "fileJump"
+ scrollIntoView: "animate",
+ aceCommandGroup: "fileJump"
}, {
name: "selectup",
bindKey: bindKey("Shift-Up", "Shift-Up"),
exec: function(editor) { editor.getSelection().selectUp(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "golineup",
bindKey: bindKey("Up", "Up|Ctrl-P"),
exec: function(editor, args) { editor.navigateUp(args.times); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "selecttoend",
@@ -11348,97 +10645,113 @@ exports.commands = [{
exec: function(editor) { editor.getSelection().selectFileEnd(); },
multiSelectAction: "forEach",
readOnly: true,
- group: "fileJump"
+ scrollIntoView: "animate",
+ aceCommandGroup: "fileJump"
}, {
name: "gotoend",
bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"),
exec: function(editor) { editor.navigateFileEnd(); },
multiSelectAction: "forEach",
readOnly: true,
- group: "fileJump"
+ scrollIntoView: "animate",
+ aceCommandGroup: "fileJump"
}, {
name: "selectdown",
bindKey: bindKey("Shift-Down", "Shift-Down"),
exec: function(editor) { editor.getSelection().selectDown(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "golinedown",
bindKey: bindKey("Down", "Down|Ctrl-N"),
exec: function(editor, args) { editor.navigateDown(args.times); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "selectwordleft",
bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"),
exec: function(editor) { editor.getSelection().selectWordLeft(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "gotowordleft",
bindKey: bindKey("Ctrl-Left", "Option-Left"),
exec: function(editor) { editor.navigateWordLeft(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "selecttolinestart",
bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"),
exec: function(editor) { editor.getSelection().selectLineStart(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "gotolinestart",
bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
exec: function(editor) { editor.navigateLineStart(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "selectleft",
bindKey: bindKey("Shift-Left", "Shift-Left"),
exec: function(editor) { editor.getSelection().selectLeft(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "gotoleft",
bindKey: bindKey("Left", "Left|Ctrl-B"),
exec: function(editor, args) { editor.navigateLeft(args.times); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "selectwordright",
bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"),
exec: function(editor) { editor.getSelection().selectWordRight(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "gotowordright",
bindKey: bindKey("Ctrl-Right", "Option-Right"),
exec: function(editor) { editor.navigateWordRight(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "selecttolineend",
bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"),
exec: function(editor) { editor.getSelection().selectLineEnd(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "gotolineend",
bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"),
exec: function(editor) { editor.navigateLineEnd(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "selectright",
bindKey: bindKey("Shift-Right", "Shift-Right"),
exec: function(editor) { editor.getSelection().selectRight(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "gotoright",
bindKey: bindKey("Right", "Right|Ctrl-F"),
exec: function(editor, args) { editor.navigateRight(args.times); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "selectpagedown",
@@ -11485,12 +10798,14 @@ exports.commands = [{
bindKey: "Shift-Home",
exec: function(editor) { editor.getSelection().selectLineStart(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "selectlineend",
bindKey: "Shift-End",
exec: function(editor) { editor.getSelection().selectLineEnd(); },
multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
readOnly: true
}, {
name: "togglerecording",
@@ -11504,17 +10819,32 @@ exports.commands = [{
readOnly: true
}, {
name: "jumptomatching",
- bindKey: bindKey("Ctrl-P", "Ctrl-Shift-P"),
+ bindKey: bindKey("Ctrl-P", "Ctrl-P"),
exec: function(editor) { editor.jumpToMatching(); },
multiSelectAction: "forEach",
+ scrollIntoView: "animate",
readOnly: true
}, {
name: "selecttomatching",
- bindKey: bindKey("Ctrl-Shift-P", null),
+ bindKey: bindKey("Ctrl-Shift-P", "Ctrl-Shift-P"),
exec: function(editor) { editor.jumpToMatching(true); },
multiSelectAction: "forEach",
+ scrollIntoView: "animate",
readOnly: true
-},
+}, {
+ name: "expandToMatching",
+ bindKey: bindKey("Ctrl-Shift-M", "Ctrl-Shift-M"),
+ exec: function(editor) { editor.jumpToMatching(true, true); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "animate",
+ readOnly: true
+}, {
+ name: "passKeysToBrowser",
+ bindKey: bindKey(null, null),
+ exec: function() {},
+ passEvent: true,
+ readOnly: true
+},
{
name: "cut",
exec: function(editor) {
@@ -11526,41 +10856,49 @@ exports.commands = [{
editor.clearSelection();
}
},
+ scrollIntoView: "cursor",
multiSelectAction: "forEach"
}, {
name: "removeline",
bindKey: bindKey("Ctrl-D", "Command-D"),
exec: function(editor) { editor.removeLines(); },
+ scrollIntoView: "cursor",
multiSelectAction: "forEachLine"
}, {
name: "duplicateSelection",
bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"),
exec: function(editor) { editor.duplicateSelection(); },
+ scrollIntoView: "cursor",
multiSelectAction: "forEach"
}, {
name: "sortlines",
bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"),
exec: function(editor) { editor.sortLines(); },
+ scrollIntoView: "selection",
multiSelectAction: "forEachLine"
}, {
name: "togglecomment",
bindKey: bindKey("Ctrl-/", "Command-/"),
exec: function(editor) { editor.toggleCommentLines(); },
- multiSelectAction: "forEachLine"
+ multiSelectAction: "forEachLine",
+ scrollIntoView: "selectionPart"
}, {
name: "toggleBlockComment",
bindKey: bindKey("Ctrl-Shift-/", "Command-Shift-/"),
exec: function(editor) { editor.toggleBlockComment(); },
- multiSelectAction: "forEach"
+ multiSelectAction: "forEach",
+ scrollIntoView: "selectionPart"
}, {
name: "modifyNumberUp",
bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"),
exec: function(editor) { editor.modifyNumber(1); },
+ scrollIntoView: "cursor",
multiSelectAction: "forEach"
}, {
name: "modifyNumberDown",
bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"),
exec: function(editor) { editor.modifyNumber(-1); },
+ scrollIntoView: "cursor",
multiSelectAction: "forEach"
}, {
name: "replace",
@@ -11579,24 +10917,29 @@ exports.commands = [{
}, {
name: "copylinesup",
bindKey: bindKey("Alt-Shift-Up", "Command-Option-Up"),
- exec: function(editor) { editor.copyLinesUp(); }
+ exec: function(editor) { editor.copyLinesUp(); },
+ scrollIntoView: "cursor"
}, {
name: "movelinesup",
bindKey: bindKey("Alt-Up", "Option-Up"),
- exec: function(editor) { editor.moveLinesUp(); }
+ exec: function(editor) { editor.moveLinesUp(); },
+ scrollIntoView: "cursor"
}, {
name: "copylinesdown",
bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"),
- exec: function(editor) { editor.copyLinesDown(); }
+ exec: function(editor) { editor.copyLinesDown(); },
+ scrollIntoView: "cursor"
}, {
name: "movelinesdown",
bindKey: bindKey("Alt-Down", "Option-Down"),
- exec: function(editor) { editor.moveLinesDown(); }
+ exec: function(editor) { editor.moveLinesDown(); },
+ scrollIntoView: "cursor"
}, {
name: "del",
- bindKey: bindKey("Delete", "Delete|Ctrl-D"),
+ bindKey: bindKey("Delete", "Delete|Ctrl-D|Shift-Delete"),
exec: function(editor) { editor.remove("right"); },
- multiSelectAction: "forEach"
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
}, {
name: "backspace",
bindKey: bindKey(
@@ -11604,82 +10947,2049 @@ exports.commands = [{
"Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"
),
exec: function(editor) { editor.remove("left"); },
- multiSelectAction: "forEach"
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "cut_or_delete",
+ bindKey: bindKey("Shift-Delete", null),
+ exec: function(editor) {
+ if (editor.selection.isEmpty()) {
+ editor.remove("left");
+ } else {
+ return false;
+ }
+ },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
}, {
name: "removetolinestart",
bindKey: bindKey("Alt-Backspace", "Command-Backspace"),
exec: function(editor) { editor.removeToLineStart(); },
- multiSelectAction: "forEach"
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
}, {
name: "removetolineend",
bindKey: bindKey("Alt-Delete", "Ctrl-K"),
exec: function(editor) { editor.removeToLineEnd(); },
- multiSelectAction: "forEach"
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
}, {
name: "removewordleft",
bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"),
exec: function(editor) { editor.removeWordLeft(); },
- multiSelectAction: "forEach"
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
}, {
name: "removewordright",
bindKey: bindKey("Ctrl-Delete", "Alt-Delete"),
exec: function(editor) { editor.removeWordRight(); },
- multiSelectAction: "forEach"
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
}, {
name: "outdent",
bindKey: bindKey("Shift-Tab", "Shift-Tab"),
exec: function(editor) { editor.blockOutdent(); },
- multiSelectAction: "forEach"
+ multiSelectAction: "forEach",
+ scrollIntoView: "selectionPart"
}, {
name: "indent",
bindKey: bindKey("Tab", "Tab"),
exec: function(editor) { editor.indent(); },
- multiSelectAction: "forEach"
-},{
+ multiSelectAction: "forEach",
+ scrollIntoView: "selectionPart"
+}, {
name: "blockoutdent",
bindKey: bindKey("Ctrl-[", "Ctrl-["),
exec: function(editor) { editor.blockOutdent(); },
- multiSelectAction: "forEachLine"
-},{
+ multiSelectAction: "forEachLine",
+ scrollIntoView: "selectionPart"
+}, {
name: "blockindent",
bindKey: bindKey("Ctrl-]", "Ctrl-]"),
exec: function(editor) { editor.blockIndent(); },
- multiSelectAction: "forEachLine"
+ multiSelectAction: "forEachLine",
+ scrollIntoView: "selectionPart"
}, {
name: "insertstring",
exec: function(editor, str) { editor.insert(str); },
- multiSelectAction: "forEach"
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
}, {
name: "inserttext",
exec: function(editor, args) {
editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
},
- multiSelectAction: "forEach"
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
}, {
name: "splitline",
bindKey: bindKey(null, "Ctrl-O"),
exec: function(editor) { editor.splitLine(); },
- multiSelectAction: "forEach"
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
}, {
name: "transposeletters",
bindKey: bindKey("Ctrl-T", "Ctrl-T"),
exec: function(editor) { editor.transposeLetters(); },
- multiSelectAction: function(editor) {editor.transposeSelections(1); }
+ multiSelectAction: function(editor) {editor.transposeSelections(1); },
+ scrollIntoView: "cursor"
}, {
name: "touppercase",
bindKey: bindKey("Ctrl-U", "Ctrl-U"),
exec: function(editor) { editor.toUpperCase(); },
- multiSelectAction: "forEach"
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
}, {
name: "tolowercase",
bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"),
exec: function(editor) { editor.toLowerCase(); },
- multiSelectAction: "forEach"
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "expandtoline",
+ bindKey: bindKey("Ctrl-Shift-L", "Command-Shift-L"),
+ exec: function(editor) {
+ var range = editor.selection.getRange();
+
+ range.start.column = range.end.column = 0;
+ range.end.row++;
+ editor.selection.setRange(range, false);
+ },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "joinlines",
+ bindKey: bindKey(null, null),
+ exec: function(editor) {
+ var isBackwards = editor.selection.isBackwards();
+ var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor();
+ var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead();
+ var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length;
+ var selectedText = editor.session.doc.getTextRange(editor.selection.getRange());
+ var selectedCount = selectedText.replace(/\n\s*/, " ").length;
+ var insertLine = editor.session.doc.getLine(selectionStart.row);
+
+ for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) {
+ var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i)));
+ if (curLine.length !== 0) {
+ curLine = " " + curLine;
+ }
+ insertLine += curLine;
+ }
+
+ if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) {
+ insertLine += editor.session.doc.getNewLineCharacter();
+ }
+
+ editor.clearSelection();
+ editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine);
+
+ if (selectedCount > 0) {
+ editor.selection.moveCursorTo(selectionStart.row, selectionStart.column);
+ editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount);
+ } else {
+ firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol;
+ editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol);
+ }
+ },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "invertSelection",
+ bindKey: bindKey(null, null),
+ exec: function(editor) {
+ var endRow = editor.session.doc.getLength() - 1;
+ var endCol = editor.session.doc.getLine(endRow).length;
+ var ranges = editor.selection.rangeList.ranges;
+ var newRanges = [];
+ if (ranges.length < 1) {
+ ranges = [editor.selection.getRange()];
+ }
+
+ for (var i = 0; i < ranges.length; i++) {
+ if (i == (ranges.length - 1)) {
+ if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) {
+ newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol));
+ }
+ }
+
+ if (i === 0) {
+ if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) {
+ newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column));
+ }
+ } else {
+ newRanges.push(new Range(ranges[i-1].end.row, ranges[i-1].end.column, ranges[i].start.row, ranges[i].start.column));
+ }
+ }
+
+ editor.exitMultiSelectMode();
+ editor.clearSelection();
+
+ for(var i = 0; i < newRanges.length; i++) {
+ editor.selection.addRange(newRanges[i], false);
+ }
+ },
+ readOnly: true,
+ scrollIntoView: "none"
}];
});
-ace.define('ace/undomanager', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+require("./lib/fixoldbrowsers");
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var lang = require("./lib/lang");
+var useragent = require("./lib/useragent");
+var TextInput = require("./keyboard/textinput").TextInput;
+var MouseHandler = require("./mouse/mouse_handler").MouseHandler;
+var FoldHandler = require("./mouse/fold_handler").FoldHandler;
+var KeyBinding = require("./keyboard/keybinding").KeyBinding;
+var EditSession = require("./edit_session").EditSession;
+var Search = require("./search").Search;
+var Range = require("./range").Range;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var CommandManager = require("./commands/command_manager").CommandManager;
+var defaultCommands = require("./commands/default_commands").commands;
+var config = require("./config");
+var TokenIterator = require("./token_iterator").TokenIterator;
+var Editor = function(renderer, session) {
+ var container = renderer.getContainerElement();
+ this.container = container;
+ this.renderer = renderer;
+
+ this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands);
+ this.textInput = new TextInput(renderer.getTextAreaContainer(), this);
+ this.renderer.textarea = this.textInput.getElement();
+ this.keyBinding = new KeyBinding(this);
+ this.$mouseHandler = new MouseHandler(this);
+ new FoldHandler(this);
+
+ this.$blockScrolling = 0;
+ this.$search = new Search().set({
+ wrap: true
+ });
+
+ this.$historyTracker = this.$historyTracker.bind(this);
+ this.commands.on("exec", this.$historyTracker);
+
+ this.$initOperationListeners();
+
+ this._$emitInputEvent = lang.delayedCall(function() {
+ this._signal("input", {});
+ if (this.session && this.session.bgTokenizer)
+ this.session.bgTokenizer.scheduleStart();
+ }.bind(this));
+
+ this.on("change", function(_, _self) {
+ _self._$emitInputEvent.schedule(31);
+ });
+
+ this.setSession(session || new EditSession(""));
+ config.resetOptions(this);
+ config._signal("editor", this);
+};
+
+(function(){
+
+ oop.implement(this, EventEmitter);
+
+ this.$initOperationListeners = function() {
+ function last(a) {return a[a.length - 1]}
+
+ this.selections = [];
+ this.commands.on("exec", this.startOperation.bind(this), true);
+ this.commands.on("afterExec", this.endOperation.bind(this), true);
+
+ this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this));
+
+ this.on("change", function() {
+ this.curOp || this.startOperation();
+ this.curOp.docChanged = true;
+ }.bind(this), true);
+
+ this.on("changeSelection", function() {
+ this.curOp || this.startOperation();
+ this.curOp.selectionChanged = true;
+ }.bind(this), true);
+ };
+
+ this.curOp = null;
+ this.prevOp = {};
+ this.startOperation = function(commadEvent) {
+ if (this.curOp) {
+ if (!commadEvent || this.curOp.command)
+ return;
+ this.prevOp = this.curOp;
+ }
+ if (!commadEvent) {
+ this.previousCommand = null;
+ commadEvent = {};
+ }
+
+ this.$opResetTimer.schedule();
+ this.curOp = {
+ command: commadEvent.command || {},
+ args: commadEvent.args,
+ scrollTop: this.renderer.scrollTop
+ };
+ if (this.curOp.command.name && this.curOp.command.scrollIntoView !== undefined)
+ this.$blockScrolling++;
+ };
+
+ this.endOperation = function(e) {
+ if (this.curOp) {
+ if (e && e.returnValue === false)
+ return this.curOp = null;
+ this._signal("beforeEndOperation");
+ var command = this.curOp.command;
+ if (command.name && this.$blockScrolling > 0)
+ this.$blockScrolling--;
+ var scrollIntoView = command && command.scrollIntoView;
+ if (scrollIntoView) {
+ switch (scrollIntoView) {
+ case "center-animate":
+ scrollIntoView = "animate";
+ case "center":
+ this.renderer.scrollCursorIntoView(null, 0.5);
+ break;
+ case "animate":
+ case "cursor":
+ this.renderer.scrollCursorIntoView();
+ break;
+ case "selectionPart":
+ var range = this.selection.getRange();
+ var config = this.renderer.layerConfig;
+ if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) {
+ this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead);
+ }
+ break;
+ default:
+ break;
+ }
+ if (scrollIntoView == "animate")
+ this.renderer.animateScrolling(this.curOp.scrollTop);
+ }
+
+ this.prevOp = this.curOp;
+ this.curOp = null;
+ }
+ };
+ this.$mergeableCommands = ["backspace", "del", "insertstring"];
+ this.$historyTracker = function(e) {
+ if (!this.$mergeUndoDeltas)
+ return;
+
+ var prev = this.prevOp;
+ var mergeableCommands = this.$mergeableCommands;
+ var shouldMerge = prev.command && (e.command.name == prev.command.name);
+ if (e.command.name == "insertstring") {
+ var text = e.args;
+ if (this.mergeNextCommand === undefined)
+ this.mergeNextCommand = true;
+
+ shouldMerge = shouldMerge
+ && this.mergeNextCommand // previous command allows to coalesce with
+ && (!/\s/.test(text) || /\s/.test(prev.args)); // previous insertion was of same type
+
+ this.mergeNextCommand = true;
+ } else {
+ shouldMerge = shouldMerge
+ && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable
+ }
+
+ if (
+ this.$mergeUndoDeltas != "always"
+ && Date.now() - this.sequenceStartTime > 2000
+ ) {
+ shouldMerge = false; // the sequence is too long
+ }
+
+ if (shouldMerge)
+ this.session.mergeUndoDeltas = true;
+ else if (mergeableCommands.indexOf(e.command.name) !== -1)
+ this.sequenceStartTime = Date.now();
+ };
+ this.setKeyboardHandler = function(keyboardHandler, cb) {
+ if (keyboardHandler && typeof keyboardHandler === "string") {
+ this.$keybindingId = keyboardHandler;
+ var _self = this;
+ config.loadModule(["keybinding", keyboardHandler], function(module) {
+ if (_self.$keybindingId == keyboardHandler)
+ _self.keyBinding.setKeyboardHandler(module && module.handler);
+ cb && cb();
+ });
+ } else {
+ this.$keybindingId = null;
+ this.keyBinding.setKeyboardHandler(keyboardHandler);
+ cb && cb();
+ }
+ };
+ this.getKeyboardHandler = function() {
+ return this.keyBinding.getKeyboardHandler();
+ };
+ this.setSession = function(session) {
+ if (this.session == session)
+ return;
+ if (this.curOp) this.endOperation();
+ this.curOp = {};
+
+ var oldSession = this.session;
+ if (oldSession) {
+ this.session.removeEventListener("change", this.$onDocumentChange);
+ this.session.removeEventListener("changeMode", this.$onChangeMode);
+ this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
+ this.session.removeEventListener("changeTabSize", this.$onChangeTabSize);
+ this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit);
+ this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode);
+ this.session.removeEventListener("onChangeFold", this.$onChangeFold);
+ this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker);
+ this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker);
+ this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint);
+ this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation);
+ this.session.removeEventListener("changeOverwrite", this.$onCursorChange);
+ this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange);
+ this.session.removeEventListener("changeScrollLeft", this.$onScrollLeftChange);
+
+ var selection = this.session.getSelection();
+ selection.removeEventListener("changeCursor", this.$onCursorChange);
+ selection.removeEventListener("changeSelection", this.$onSelectionChange);
+ }
+
+ this.session = session;
+ if (session) {
+ this.$onDocumentChange = this.onDocumentChange.bind(this);
+ session.addEventListener("change", this.$onDocumentChange);
+ this.renderer.setSession(session);
+
+ this.$onChangeMode = this.onChangeMode.bind(this);
+ session.addEventListener("changeMode", this.$onChangeMode);
+
+ this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
+ session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
+
+ this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);
+ session.addEventListener("changeTabSize", this.$onChangeTabSize);
+
+ this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
+ session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit);
+
+ this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
+ session.addEventListener("changeWrapMode", this.$onChangeWrapMode);
+
+ this.$onChangeFold = this.onChangeFold.bind(this);
+ session.addEventListener("changeFold", this.$onChangeFold);
+
+ this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
+ this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker);
+
+ this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
+ this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker);
+
+ this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
+ this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint);
+
+ this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
+ this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation);
+
+ this.$onCursorChange = this.onCursorChange.bind(this);
+ this.session.addEventListener("changeOverwrite", this.$onCursorChange);
+
+ this.$onScrollTopChange = this.onScrollTopChange.bind(this);
+ this.session.addEventListener("changeScrollTop", this.$onScrollTopChange);
+
+ this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
+ this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange);
+
+ this.selection = session.getSelection();
+ this.selection.addEventListener("changeCursor", this.$onCursorChange);
+
+ this.$onSelectionChange = this.onSelectionChange.bind(this);
+ this.selection.addEventListener("changeSelection", this.$onSelectionChange);
+
+ this.onChangeMode();
+
+ this.$blockScrolling += 1;
+ this.onCursorChange();
+ this.$blockScrolling -= 1;
+
+ this.onScrollTopChange();
+ this.onScrollLeftChange();
+ this.onSelectionChange();
+ this.onChangeFrontMarker();
+ this.onChangeBackMarker();
+ this.onChangeBreakpoint();
+ this.onChangeAnnotation();
+ this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();
+ this.renderer.updateFull();
+ } else {
+ this.selection = null;
+ this.renderer.setSession(session);
+ }
+
+ this._signal("changeSession", {
+ session: session,
+ oldSession: oldSession
+ });
+
+ this.curOp = null;
+
+ oldSession && oldSession._signal("changeEditor", {oldEditor: this});
+ session && session._signal("changeEditor", {editor: this});
+ };
+ this.getSession = function() {
+ return this.session;
+ };
+ this.setValue = function(val, cursorPos) {
+ this.session.doc.setValue(val);
+
+ if (!cursorPos)
+ this.selectAll();
+ else if (cursorPos == 1)
+ this.navigateFileEnd();
+ else if (cursorPos == -1)
+ this.navigateFileStart();
+
+ return val;
+ };
+ this.getValue = function() {
+ return this.session.getValue();
+ };
+ this.getSelection = function() {
+ return this.selection;
+ };
+ this.resize = function(force) {
+ this.renderer.onResize(force);
+ };
+ this.setTheme = function(theme, cb) {
+ this.renderer.setTheme(theme, cb);
+ };
+ this.getTheme = function() {
+ return this.renderer.getTheme();
+ };
+ this.setStyle = function(style) {
+ this.renderer.setStyle(style);
+ };
+ this.unsetStyle = function(style) {
+ this.renderer.unsetStyle(style);
+ };
+ this.getFontSize = function () {
+ return this.getOption("fontSize") ||
+ dom.computedStyle(this.container, "fontSize");
+ };
+ this.setFontSize = function(size) {
+ this.setOption("fontSize", size);
+ };
+
+ this.$highlightBrackets = function() {
+ if (this.session.$bracketHighlight) {
+ this.session.removeMarker(this.session.$bracketHighlight);
+ this.session.$bracketHighlight = null;
+ }
+
+ if (this.$highlightPending) {
+ return;
+ }
+ var self = this;
+ this.$highlightPending = true;
+ setTimeout(function() {
+ self.$highlightPending = false;
+ var session = self.session;
+ if (!session || !session.bgTokenizer) return;
+ var pos = session.findMatchingBracket(self.getCursorPosition());
+ if (pos) {
+ var range = new Range(pos.row, pos.column, pos.row, pos.column + 1);
+ } else if (session.$mode.getMatching) {
+ var range = session.$mode.getMatching(self.session);
+ }
+ if (range)
+ session.$bracketHighlight = session.addMarker(range, "ace_bracket", "text");
+ }, 50);
+ };
+ this.$highlightTags = function() {
+ if (this.$highlightTagPending)
+ return;
+ var self = this;
+ this.$highlightTagPending = true;
+ setTimeout(function() {
+ self.$highlightTagPending = false;
+
+ var session = self.session;
+ if (!session || !session.bgTokenizer) return;
+
+ var pos = self.getCursorPosition();
+ var iterator = new TokenIterator(self.session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+
+ if (!token || !/\b(?:tag-open|tag-name)/.test(token.type)) {
+ session.removeMarker(session.$tagHighlight);
+ session.$tagHighlight = null;
+ return;
+ }
+
+ if (token.type.indexOf("tag-open") != -1) {
+ token = iterator.stepForward();
+ if (!token)
+ return;
+ }
+
+ var tag = token.value;
+ var depth = 0;
+ var prevToken = iterator.stepBackward();
+
+ if (prevToken.value == '<'){
+ do {
+ prevToken = token;
+ token = iterator.stepForward();
+
+ if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {
+ if (prevToken.value === '<'){
+ depth++;
+ } else if (prevToken.value === '</'){
+ depth--;
+ }
+ }
+
+ } while (token && depth >= 0);
+ } else {
+ do {
+ token = prevToken;
+ prevToken = iterator.stepBackward();
+
+ if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {
+ if (prevToken.value === '<') {
+ depth++;
+ } else if (prevToken.value === '</') {
+ depth--;
+ }
+ }
+ } while (prevToken && depth <= 0);
+ iterator.stepForward();
+ }
+
+ if (!token) {
+ session.removeMarker(session.$tagHighlight);
+ session.$tagHighlight = null;
+ return;
+ }
+
+ var row = iterator.getCurrentTokenRow();
+ var column = iterator.getCurrentTokenColumn();
+ var range = new Range(row, column, row, column+token.value.length);
+ if (session.$tagHighlight && range.compareRange(session.$backMarkers[session.$tagHighlight].range)!==0) {
+ session.removeMarker(session.$tagHighlight);
+ session.$tagHighlight = null;
+ }
+
+ if (range && !session.$tagHighlight)
+ session.$tagHighlight = session.addMarker(range, "ace_bracket", "text");
+ }, 50);
+ };
+ this.focus = function() {
+ var _self = this;
+ setTimeout(function() {
+ _self.textInput.focus();
+ });
+ this.textInput.focus();
+ };
+ this.isFocused = function() {
+ return this.textInput.isFocused();
+ };
+ this.blur = function() {
+ this.textInput.blur();
+ };
+ this.onFocus = function(e) {
+ if (this.$isFocused)
+ return;
+ this.$isFocused = true;
+ this.renderer.showCursor();
+ this.renderer.visualizeFocus();
+ this._emit("focus", e);
+ };
+ this.onBlur = function(e) {
+ if (!this.$isFocused)
+ return;
+ this.$isFocused = false;
+ this.renderer.hideCursor();
+ this.renderer.visualizeBlur();
+ this._emit("blur", e);
+ };
+
+ this.$cursorChange = function() {
+ this.renderer.updateCursor();
+ };
+ this.onDocumentChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+ var lastRow;
+
+ if (range.start.row == range.end.row && delta.action != "insertLines" && delta.action != "removeLines")
+ lastRow = range.end.row;
+ else
+ lastRow = Infinity;
+ this.renderer.updateLines(range.start.row, lastRow, this.session.$useWrapMode);
+
+ this._signal("change", e);
+ this.$cursorChange();
+ this.$updateHighlightActiveLine();
+ };
+
+ this.onTokenizerUpdate = function(e) {
+ var rows = e.data;
+ this.renderer.updateLines(rows.first, rows.last);
+ };
+
+
+ this.onScrollTopChange = function() {
+ this.renderer.scrollToY(this.session.getScrollTop());
+ };
+
+ this.onScrollLeftChange = function() {
+ this.renderer.scrollToX(this.session.getScrollLeft());
+ };
+ this.onCursorChange = function() {
+ this.$cursorChange();
+
+ if (!this.$blockScrolling) {
+ config.warn("Automatically scrolling cursor into view after selection change",
+ "this will be disabled in the next version",
+ "set editor.$blockScrolling = Infinity to disable this message"
+ );
+ this.renderer.scrollCursorIntoView();
+ }
+
+ this.$highlightBrackets();
+ this.$highlightTags();
+ this.$updateHighlightActiveLine();
+ this._signal("changeSelection");
+ };
+
+ this.$updateHighlightActiveLine = function() {
+ var session = this.getSession();
+
+ var highlight;
+ if (this.$highlightActiveLine) {
+ if ((this.$selectionStyle != "line" || !this.selection.isMultiLine()))
+ highlight = this.getCursorPosition();
+ if (this.renderer.$maxLines && this.session.getLength() === 1 && !(this.renderer.$minLines > 1))
+ highlight = false;
+ }
+
+ if (session.$highlightLineMarker && !highlight) {
+ session.removeMarker(session.$highlightLineMarker.id);
+ session.$highlightLineMarker = null;
+ } else if (!session.$highlightLineMarker && highlight) {
+ var range = new Range(highlight.row, highlight.column, highlight.row, Infinity);
+ range.id = session.addMarker(range, "ace_active-line", "screenLine");
+ session.$highlightLineMarker = range;
+ } else if (highlight) {
+ session.$highlightLineMarker.start.row = highlight.row;
+ session.$highlightLineMarker.end.row = highlight.row;
+ session.$highlightLineMarker.start.column = highlight.column;
+ session._signal("changeBackMarker");
+ }
+ };
+
+ this.onSelectionChange = function(e) {
+ var session = this.session;
+
+ if (session.$selectionMarker) {
+ session.removeMarker(session.$selectionMarker);
+ }
+ session.$selectionMarker = null;
+
+ if (!this.selection.isEmpty()) {
+ var range = this.selection.getRange();
+ var style = this.getSelectionStyle();
+ session.$selectionMarker = session.addMarker(range, "ace_selection", style);
+ } else {
+ this.$updateHighlightActiveLine();
+ }
+
+ var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp();
+ this.session.highlight(re);
+
+ this._signal("changeSelection");
+ };
+
+ this.$getSelectionHighLightRegexp = function() {
+ var session = this.session;
+
+ var selection = this.getSelectionRange();
+ if (selection.isEmpty() || selection.isMultiLine())
+ return;
+
+ var startOuter = selection.start.column - 1;
+ var endOuter = selection.end.column + 1;
+ var line = session.getLine(selection.start.row);
+ var lineCols = line.length;
+ var needle = line.substring(Math.max(startOuter, 0),
+ Math.min(endOuter, lineCols));
+ if ((startOuter >= 0 && /^[\w\d]/.test(needle)) ||
+ (endOuter <= lineCols && /[\w\d]$/.test(needle)))
+ return;
+
+ needle = line.substring(selection.start.column, selection.end.column);
+ if (!/^[\w\d]+$/.test(needle))
+ return;
+
+ var re = this.$search.$assembleRegExp({
+ wholeWord: true,
+ caseSensitive: true,
+ needle: needle
+ });
+
+ return re;
+ };
+
+
+ this.onChangeFrontMarker = function() {
+ this.renderer.updateFrontMarkers();
+ };
+
+ this.onChangeBackMarker = function() {
+ this.renderer.updateBackMarkers();
+ };
+
+
+ this.onChangeBreakpoint = function() {
+ this.renderer.updateBreakpoints();
+ };
+
+ this.onChangeAnnotation = function() {
+ this.renderer.setAnnotations(this.session.getAnnotations());
+ };
+
+
+ this.onChangeMode = function(e) {
+ this.renderer.updateText();
+ this._emit("changeMode", e);
+ };
+
+
+ this.onChangeWrapLimit = function() {
+ this.renderer.updateFull();
+ };
+
+ this.onChangeWrapMode = function() {
+ this.renderer.onResize(true);
+ };
+
+
+ this.onChangeFold = function() {
+ this.$updateHighlightActiveLine();
+ this.renderer.updateFull();
+ };
+ this.getSelectedText = function() {
+ return this.session.getTextRange(this.getSelectionRange());
+ };
+ this.getCopyText = function() {
+ var text = this.getSelectedText();
+ this._signal("copy", text);
+ return text;
+ };
+ this.onCopy = function() {
+ this.commands.exec("copy", this);
+ };
+ this.onCut = function() {
+ this.commands.exec("cut", this);
+ };
+ this.onPaste = function(text) {
+ if (this.$readOnly)
+ return;
+
+ var e = {text: text};
+ this._signal("paste", e);
+ text = e.text;
+ if (!this.inMultiSelectMode || this.inVirtualSelectionMode) {
+ this.insert(text);
+ } else {
+ var lines = text.split(/\r\n|\r|\n/);
+ var ranges = this.selection.rangeList.ranges;
+
+ if (lines.length > ranges.length || lines.length < 2 || !lines[1])
+ return this.commands.exec("insertstring", this, text);
+
+ for (var i = ranges.length; i--;) {
+ var range = ranges[i];
+ if (!range.isEmpty())
+ this.session.remove(range);
+
+ this.session.insert(range.start, lines[i]);
+ }
+ }
+ this.renderer.scrollCursorIntoView();
+ };
+
+ this.execCommand = function(command, args) {
+ return this.commands.exec(command, this, args);
+ };
+ this.insert = function(text, pasted) {
+ var session = this.session;
+ var mode = session.getMode();
+ var cursor = this.getCursorPosition();
+
+ if (this.getBehavioursEnabled() && !pasted) {
+ var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);
+ if (transform) {
+ if (text !== transform.text) {
+ this.session.mergeUndoDeltas = false;
+ this.$mergeNextCommand = false;
+ }
+ text = transform.text;
+
+ }
+ }
+
+ if (text == "\t")
+ text = this.session.getTabString();
+ if (!this.selection.isEmpty()) {
+ var range = this.getSelectionRange();
+ cursor = this.session.remove(range);
+ this.clearSelection();
+ }
+ else if (this.session.getOverwrite()) {
+ var range = new Range.fromPoints(cursor, cursor);
+ range.end.column += text.length;
+ this.session.remove(range);
+ }
+
+ if (text == "\n" || text == "\r\n") {
+ var line = session.getLine(cursor.row);
+ if (cursor.column > line.search(/\S|$/)) {
+ var d = line.substr(cursor.column).search(/\S|$/);
+ session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d);
+ }
+ }
+ this.clearSelection();
+
+ var start = cursor.column;
+ var lineState = session.getState(cursor.row);
+ var line = session.getLine(cursor.row);
+ var shouldOutdent = mode.checkOutdent(lineState, line, text);
+ var end = session.insert(cursor, text);
+
+ if (transform && transform.selection) {
+ if (transform.selection.length == 2) { // Transform relative to the current column
+ this.selection.setSelectionRange(
+ new Range(cursor.row, start + transform.selection[0],
+ cursor.row, start + transform.selection[1]));
+ } else { // Transform relative to the current row.
+ this.selection.setSelectionRange(
+ new Range(cursor.row + transform.selection[0],
+ transform.selection[1],
+ cursor.row + transform.selection[2],
+ transform.selection[3]));
+ }
+ }
+
+ if (session.getDocument().isNewLine(text)) {
+ var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());
+
+ session.insert({row: cursor.row+1, column: 0}, lineIndent);
+ }
+ if (shouldOutdent)
+ mode.autoOutdent(lineState, session, cursor.row);
+ };
+
+ this.onTextInput = function(text) {
+ this.keyBinding.onTextInput(text);
+ };
+
+ this.onCommandKey = function(e, hashId, keyCode) {
+ this.keyBinding.onCommandKey(e, hashId, keyCode);
+ };
+ this.setOverwrite = function(overwrite) {
+ this.session.setOverwrite(overwrite);
+ };
+ this.getOverwrite = function() {
+ return this.session.getOverwrite();
+ };
+ this.toggleOverwrite = function() {
+ this.session.toggleOverwrite();
+ };
+ this.setScrollSpeed = function(speed) {
+ this.setOption("scrollSpeed", speed);
+ };
+ this.getScrollSpeed = function() {
+ return this.getOption("scrollSpeed");
+ };
+ this.setDragDelay = function(dragDelay) {
+ this.setOption("dragDelay", dragDelay);
+ };
+ this.getDragDelay = function() {
+ return this.getOption("dragDelay");
+ };
+ this.setSelectionStyle = function(val) {
+ this.setOption("selectionStyle", val);
+ };
+ this.getSelectionStyle = function() {
+ return this.getOption("selectionStyle");
+ };
+ this.setHighlightActiveLine = function(shouldHighlight) {
+ this.setOption("highlightActiveLine", shouldHighlight);
+ };
+ this.getHighlightActiveLine = function() {
+ return this.getOption("highlightActiveLine");
+ };
+ this.setHighlightGutterLine = function(shouldHighlight) {
+ this.setOption("highlightGutterLine", shouldHighlight);
+ };
+
+ this.getHighlightGutterLine = function() {
+ return this.getOption("highlightGutterLine");
+ };
+ this.setHighlightSelectedWord = function(shouldHighlight) {
+ this.setOption("highlightSelectedWord", shouldHighlight);
+ };
+ this.getHighlightSelectedWord = function() {
+ return this.$highlightSelectedWord;
+ };
+
+ this.setAnimatedScroll = function(shouldAnimate){
+ this.renderer.setAnimatedScroll(shouldAnimate);
+ };
+
+ this.getAnimatedScroll = function(){
+ return this.renderer.getAnimatedScroll();
+ };
+ this.setShowInvisibles = function(showInvisibles) {
+ this.renderer.setShowInvisibles(showInvisibles);
+ };
+ this.getShowInvisibles = function() {
+ return this.renderer.getShowInvisibles();
+ };
+
+ this.setDisplayIndentGuides = function(display) {
+ this.renderer.setDisplayIndentGuides(display);
+ };
+
+ this.getDisplayIndentGuides = function() {
+ return this.renderer.getDisplayIndentGuides();
+ };
+ this.setShowPrintMargin = function(showPrintMargin) {
+ this.renderer.setShowPrintMargin(showPrintMargin);
+ };
+ this.getShowPrintMargin = function() {
+ return this.renderer.getShowPrintMargin();
+ };
+ this.setPrintMarginColumn = function(showPrintMargin) {
+ this.renderer.setPrintMarginColumn(showPrintMargin);
+ };
+ this.getPrintMarginColumn = function() {
+ return this.renderer.getPrintMarginColumn();
+ };
+ this.setReadOnly = function(readOnly) {
+ this.setOption("readOnly", readOnly);
+ };
+ this.getReadOnly = function() {
+ return this.getOption("readOnly");
+ };
+ this.setBehavioursEnabled = function (enabled) {
+ this.setOption("behavioursEnabled", enabled);
+ };
+ this.getBehavioursEnabled = function () {
+ return this.getOption("behavioursEnabled");
+ };
+ this.setWrapBehavioursEnabled = function (enabled) {
+ this.setOption("wrapBehavioursEnabled", enabled);
+ };
+ this.getWrapBehavioursEnabled = function () {
+ return this.getOption("wrapBehavioursEnabled");
+ };
+ this.setShowFoldWidgets = function(show) {
+ this.setOption("showFoldWidgets", show);
+
+ };
+ this.getShowFoldWidgets = function() {
+ return this.getOption("showFoldWidgets");
+ };
+
+ this.setFadeFoldWidgets = function(fade) {
+ this.setOption("fadeFoldWidgets", fade);
+ };
+
+ this.getFadeFoldWidgets = function() {
+ return this.getOption("fadeFoldWidgets");
+ };
+ this.remove = function(dir) {
+ if (this.selection.isEmpty()){
+ if (dir == "left")
+ this.selection.selectLeft();
+ else
+ this.selection.selectRight();
+ }
+
+ var range = this.getSelectionRange();
+ if (this.getBehavioursEnabled()) {
+ var session = this.session;
+ var state = session.getState(range.start.row);
+ var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);
+
+ if (range.end.column === 0) {
+ var text = session.getTextRange(range);
+ if (text[text.length - 1] == "\n") {
+ var line = session.getLine(range.end.row);
+ if (/^\s+$/.test(line)) {
+ range.end.column = line.length;
+ }
+ }
+ }
+ if (new_range)
+ range = new_range;
+ }
+
+ this.session.remove(range);
+ this.clearSelection();
+ };
+ this.removeWordRight = function() {
+ if (this.selection.isEmpty())
+ this.selection.selectWordRight();
+
+ this.session.remove(this.getSelectionRange());
+ this.clearSelection();
+ };
+ this.removeWordLeft = function() {
+ if (this.selection.isEmpty())
+ this.selection.selectWordLeft();
+
+ this.session.remove(this.getSelectionRange());
+ this.clearSelection();
+ };
+ this.removeToLineStart = function() {
+ if (this.selection.isEmpty())
+ this.selection.selectLineStart();
+
+ this.session.remove(this.getSelectionRange());
+ this.clearSelection();
+ };
+ this.removeToLineEnd = function() {
+ if (this.selection.isEmpty())
+ this.selection.selectLineEnd();
+
+ var range = this.getSelectionRange();
+ if (range.start.column == range.end.column && range.start.row == range.end.row) {
+ range.end.column = 0;
+ range.end.row++;
+ }
+
+ this.session.remove(range);
+ this.clearSelection();
+ };
+ this.splitLine = function() {
+ if (!this.selection.isEmpty()) {
+ this.session.remove(this.getSelectionRange());
+ this.clearSelection();
+ }
+
+ var cursor = this.getCursorPosition();
+ this.insert("\n");
+ this.moveCursorToPosition(cursor);
+ };
+ this.transposeLetters = function() {
+ if (!this.selection.isEmpty()) {
+ return;
+ }
+
+ var cursor = this.getCursorPosition();
+ var column = cursor.column;
+ if (column === 0)
+ return;
+
+ var line = this.session.getLine(cursor.row);
+ var swap, range;
+ if (column < line.length) {
+ swap = line.charAt(column) + line.charAt(column-1);
+ range = new Range(cursor.row, column-1, cursor.row, column+1);
+ }
+ else {
+ swap = line.charAt(column-1) + line.charAt(column-2);
+ range = new Range(cursor.row, column-2, cursor.row, column);
+ }
+ this.session.replace(range, swap);
+ };
+ this.toLowerCase = function() {
+ var originalRange = this.getSelectionRange();
+ if (this.selection.isEmpty()) {
+ this.selection.selectWord();
+ }
+
+ var range = this.getSelectionRange();
+ var text = this.session.getTextRange(range);
+ this.session.replace(range, text.toLowerCase());
+ this.selection.setSelectionRange(originalRange);
+ };
+ this.toUpperCase = function() {
+ var originalRange = this.getSelectionRange();
+ if (this.selection.isEmpty()) {
+ this.selection.selectWord();
+ }
+
+ var range = this.getSelectionRange();
+ var text = this.session.getTextRange(range);
+ this.session.replace(range, text.toUpperCase());
+ this.selection.setSelectionRange(originalRange);
+ };
+ this.indent = function() {
+ var session = this.session;
+ var range = this.getSelectionRange();
+
+ if (range.start.row < range.end.row) {
+ var rows = this.$getSelectedRows();
+ session.indentRows(rows.first, rows.last, "\t");
+ return;
+ } else if (range.start.column < range.end.column) {
+ var text = session.getTextRange(range);
+ if (!/^\s+$/.test(text)) {
+ var rows = this.$getSelectedRows();
+ session.indentRows(rows.first, rows.last, "\t");
+ return;
+ }
+ }
+
+ var line = session.getLine(range.start.row);
+ var position = range.start;
+ var size = session.getTabSize();
+ var column = session.documentToScreenColumn(position.row, position.column);
+
+ if (this.session.getUseSoftTabs()) {
+ var count = (size - column % size);
+ var indentString = lang.stringRepeat(" ", count);
+ } else {
+ var count = column % size;
+ while (line[range.start.column] == " " && count) {
+ range.start.column--;
+ count--;
+ }
+ this.selection.setSelectionRange(range);
+ indentString = "\t";
+ }
+ return this.insert(indentString);
+ };
+ this.blockIndent = function() {
+ var rows = this.$getSelectedRows();
+ this.session.indentRows(rows.first, rows.last, "\t");
+ };
+ this.blockOutdent = function() {
+ var selection = this.session.getSelection();
+ this.session.outdentRows(selection.getRange());
+ };
+ this.sortLines = function() {
+ var rows = this.$getSelectedRows();
+ var session = this.session;
+
+ var lines = [];
+ for (i = rows.first; i <= rows.last; i++)
+ lines.push(session.getLine(i));
+
+ lines.sort(function(a, b) {
+ if (a.toLowerCase() < b.toLowerCase()) return -1;
+ if (a.toLowerCase() > b.toLowerCase()) return 1;
+ return 0;
+ });
+
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i = rows.first; i <= rows.last; i++) {
+ var line = session.getLine(i);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = line.length;
+ session.replace(deleteRange, lines[i-rows.first]);
+ }
+ };
+ this.toggleCommentLines = function() {
+ var state = this.session.getState(this.getCursorPosition().row);
+ var rows = this.$getSelectedRows();
+ this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);
+ };
+
+ this.toggleBlockComment = function() {
+ var cursor = this.getCursorPosition();
+ var state = this.session.getState(cursor.row);
+ var range = this.getSelectionRange();
+ this.session.getMode().toggleBlockComment(state, this.session, range, cursor);
+ };
+ this.getNumberAt = function(row, column) {
+ var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g;
+ _numberRx.lastIndex = 0;
+
+ var s = this.session.getLine(row);
+ while (_numberRx.lastIndex < column) {
+ var m = _numberRx.exec(s);
+ if(m.index <= column && m.index+m[0].length >= column){
+ var number = {
+ value: m[0],
+ start: m.index,
+ end: m.index+m[0].length
+ };
+ return number;
+ }
+ }
+ return null;
+ };
+ this.modifyNumber = function(amount) {
+ var row = this.selection.getCursor().row;
+ var column = this.selection.getCursor().column;
+ var charRange = new Range(row, column-1, row, column);
+
+ var c = this.session.getTextRange(charRange);
+ if (!isNaN(parseFloat(c)) && isFinite(c)) {
+ var nr = this.getNumberAt(row, column);
+ if (nr) {
+ var fp = nr.value.indexOf(".") >= 0 ? nr.start + nr.value.indexOf(".") + 1 : nr.end;
+ var decimals = nr.start + nr.value.length - fp;
+
+ var t = parseFloat(nr.value);
+ t *= Math.pow(10, decimals);
+
+
+ if(fp !== nr.end && column < fp){
+ amount *= Math.pow(10, nr.end - column - 1);
+ } else {
+ amount *= Math.pow(10, nr.end - column);
+ }
+
+ t += amount;
+ t /= Math.pow(10, decimals);
+ var nnr = t.toFixed(decimals);
+ var replaceRange = new Range(row, nr.start, row, nr.end);
+ this.session.replace(replaceRange, nnr);
+ this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length));
+
+ }
+ }
+ };
+ this.removeLines = function() {
+ var rows = this.$getSelectedRows();
+ var range;
+ if (rows.first === 0 || rows.last+1 < this.session.getLength())
+ range = new Range(rows.first, 0, rows.last+1, 0);
+ else
+ range = new Range(
+ rows.first-1, this.session.getLine(rows.first-1).length,
+ rows.last, this.session.getLine(rows.last).length
+ );
+ this.session.remove(range);
+ this.clearSelection();
+ };
+
+ this.duplicateSelection = function() {
+ var sel = this.selection;
+ var doc = this.session;
+ var range = sel.getRange();
+ var reverse = sel.isBackwards();
+ if (range.isEmpty()) {
+ var row = range.start.row;
+ doc.duplicateLines(row, row);
+ } else {
+ var point = reverse ? range.start : range.end;
+ var endPoint = doc.insert(point, doc.getTextRange(range), false);
+ range.start = point;
+ range.end = endPoint;
+
+ sel.setSelectionRange(range, reverse);
+ }
+ };
+ this.moveLinesDown = function() {
+ this.$moveLines(1, false);
+ };
+ this.moveLinesUp = function() {
+ this.$moveLines(-1, false);
+ };
+ this.moveText = function(range, toPosition, copy) {
+ return this.session.moveText(range, toPosition, copy);
+ };
+ this.copyLinesUp = function() {
+ this.$moveLines(-1, true);
+ };
+ this.copyLinesDown = function() {
+ this.$moveLines(1, true);
+ };
+ this.$moveLines = function(dir, copy) {
+ var rows, moved;
+ var selection = this.selection;
+ if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {
+ var range = selection.toOrientedRange();
+ rows = this.$getSelectedRows(range);
+ moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir);
+ if (copy && dir == -1) moved = 0;
+ range.moveBy(moved, 0);
+ selection.fromOrientedRange(range);
+ } else {
+ var ranges = selection.rangeList.ranges;
+ selection.rangeList.detach(this.session);
+ this.inVirtualSelectionMode = true;
+
+ var diff = 0;
+ var totalDiff = 0;
+ var l = ranges.length;
+ for (var i = 0; i < l; i++) {
+ var rangeIndex = i;
+ ranges[i].moveBy(diff, 0);
+ rows = this.$getSelectedRows(ranges[i]);
+ var first = rows.first;
+ var last = rows.last;
+ while (++i < l) {
+ if (totalDiff) ranges[i].moveBy(totalDiff, 0);
+ var subRows = this.$getSelectedRows(ranges[i]);
+ if (copy && subRows.first != last)
+ break;
+ else if (!copy && subRows.first > last + 1)
+ break;
+ last = subRows.last;
+ }
+ i--;
+ diff = this.session.$moveLines(first, last, copy ? 0 : dir);
+ if (copy && dir == -1) rangeIndex = i + 1;
+ while (rangeIndex <= i) {
+ ranges[rangeIndex].moveBy(diff, 0);
+ rangeIndex++;
+ }
+ if (!copy) diff = 0;
+ totalDiff += diff;
+ }
+
+ selection.fromOrientedRange(selection.ranges[0]);
+ selection.rangeList.attach(this.session);
+ this.inVirtualSelectionMode = false;
+ }
+ };
+ this.$getSelectedRows = function(range) {
+ range = (range || this.getSelectionRange()).collapseRows();
+
+ return {
+ first: this.session.getRowFoldStart(range.start.row),
+ last: this.session.getRowFoldEnd(range.end.row)
+ };
+ };
+
+ this.onCompositionStart = function(text) {
+ this.renderer.showComposition(this.getCursorPosition());
+ };
+
+ this.onCompositionUpdate = function(text) {
+ this.renderer.setCompositionText(text);
+ };
+
+ this.onCompositionEnd = function() {
+ this.renderer.hideComposition();
+ };
+ this.getFirstVisibleRow = function() {
+ return this.renderer.getFirstVisibleRow();
+ };
+ this.getLastVisibleRow = function() {
+ return this.renderer.getLastVisibleRow();
+ };
+ this.isRowVisible = function(row) {
+ return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());
+ };
+ this.isRowFullyVisible = function(row) {
+ return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());
+ };
+ this.$getVisibleRowCount = function() {
+ return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;
+ };
+
+ this.$moveByPage = function(dir, select) {
+ var renderer = this.renderer;
+ var config = this.renderer.layerConfig;
+ var rows = dir * Math.floor(config.height / config.lineHeight);
+
+ this.$blockScrolling++;
+ if (select === true) {
+ this.selection.$moveSelection(function(){
+ this.moveCursorBy(rows, 0);
+ });
+ } else if (select === false) {
+ this.selection.moveCursorBy(rows, 0);
+ this.selection.clearSelection();
+ }
+ this.$blockScrolling--;
+
+ var scrollTop = renderer.scrollTop;
+
+ renderer.scrollBy(0, rows * config.lineHeight);
+ if (select != null)
+ renderer.scrollCursorIntoView(null, 0.5);
+
+ renderer.animateScrolling(scrollTop);
+ };
+ this.selectPageDown = function() {
+ this.$moveByPage(1, true);
+ };
+ this.selectPageUp = function() {
+ this.$moveByPage(-1, true);
+ };
+ this.gotoPageDown = function() {
+ this.$moveByPage(1, false);
+ };
+ this.gotoPageUp = function() {
+ this.$moveByPage(-1, false);
+ };
+ this.scrollPageDown = function() {
+ this.$moveByPage(1);
+ };
+ this.scrollPageUp = function() {
+ this.$moveByPage(-1);
+ };
+ this.scrollToRow = function(row) {
+ this.renderer.scrollToRow(row);
+ };
+ this.scrollToLine = function(line, center, animate, callback) {
+ this.renderer.scrollToLine(line, center, animate, callback);
+ };
+ this.centerSelection = function() {
+ var range = this.getSelectionRange();
+ var pos = {
+ row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),
+ column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)
+ };
+ this.renderer.alignCursor(pos, 0.5);
+ };
+ this.getCursorPosition = function() {
+ return this.selection.getCursor();
+ };
+ this.getCursorPositionScreen = function() {
+ return this.session.documentToScreenPosition(this.getCursorPosition());
+ };
+ this.getSelectionRange = function() {
+ return this.selection.getRange();
+ };
+ this.selectAll = function() {
+ this.$blockScrolling += 1;
+ this.selection.selectAll();
+ this.$blockScrolling -= 1;
+ };
+ this.clearSelection = function() {
+ this.selection.clearSelection();
+ };
+ this.moveCursorTo = function(row, column) {
+ this.selection.moveCursorTo(row, column);
+ };
+ this.moveCursorToPosition = function(pos) {
+ this.selection.moveCursorToPosition(pos);
+ };
+ this.jumpToMatching = function(select, expand) {
+ var cursor = this.getCursorPosition();
+ var iterator = new TokenIterator(this.session, cursor.row, cursor.column);
+ var prevToken = iterator.getCurrentToken();
+ var token = prevToken || iterator.stepForward();
+
+ if (!token) return;
+ var matchType;
+ var found = false;
+ var depth = {};
+ var i = cursor.column - token.start;
+ var bracketType;
+ var brackets = {
+ ")": "(",
+ "(": "(",
+ "]": "[",
+ "[": "[",
+ "{": "{",
+ "}": "{"
+ };
+
+ do {
+ if (token.value.match(/[{}()\[\]]/g)) {
+ for (; i < token.value.length && !found; i++) {
+ if (!brackets[token.value[i]]) {
+ continue;
+ }
+
+ bracketType = brackets[token.value[i]] + '.' + token.type.replace("rparen", "lparen");
+
+ if (isNaN(depth[bracketType])) {
+ depth[bracketType] = 0;
+ }
+
+ switch (token.value[i]) {
+ case '(':
+ case '[':
+ case '{':
+ depth[bracketType]++;
+ break;
+ case ')':
+ case ']':
+ case '}':
+ depth[bracketType]--;
+
+ if (depth[bracketType] === -1) {
+ matchType = 'bracket';
+ found = true;
+ }
+ break;
+ }
+ }
+ }
+ else if (token && token.type.indexOf('tag-name') !== -1) {
+ if (isNaN(depth[token.value])) {
+ depth[token.value] = 0;
+ }
+
+ if (prevToken.value === '<') {
+ depth[token.value]++;
+ }
+ else if (prevToken.value === '</') {
+ depth[token.value]--;
+ }
+
+ if (depth[token.value] === -1) {
+ matchType = 'tag';
+ found = true;
+ }
+ }
+
+ if (!found) {
+ prevToken = token;
+ token = iterator.stepForward();
+ i = 0;
+ }
+ } while (token && !found);
+ if (!matchType)
+ return;
+
+ var range, pos;
+ if (matchType === 'bracket') {
+ range = this.session.getBracketRange(cursor);
+ if (!range) {
+ range = new Range(
+ iterator.getCurrentTokenRow(),
+ iterator.getCurrentTokenColumn() + i - 1,
+ iterator.getCurrentTokenRow(),
+ iterator.getCurrentTokenColumn() + i - 1
+ );
+ pos = range.start;
+ if (expand || pos.row === cursor.row && Math.abs(pos.column - cursor.column) < 2)
+ range = this.session.getBracketRange(pos);
+ }
+ }
+ else if (matchType === 'tag') {
+ if (token && token.type.indexOf('tag-name') !== -1)
+ var tag = token.value;
+ else
+ return;
+
+ range = new Range(
+ iterator.getCurrentTokenRow(),
+ iterator.getCurrentTokenColumn() - 2,
+ iterator.getCurrentTokenRow(),
+ iterator.getCurrentTokenColumn() - 2
+ );
+ if (range.compare(cursor.row, cursor.column) === 0) {
+ found = false;
+ do {
+ token = prevToken;
+ prevToken = iterator.stepBackward();
+
+ if (prevToken) {
+ if (prevToken.type.indexOf('tag-close') !== -1) {
+ range.setEnd(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1);
+ }
+
+ if (token.value === tag && token.type.indexOf('tag-name') !== -1) {
+ if (prevToken.value === '<') {
+ depth[tag]++;
+ }
+ else if (prevToken.value === '</') {
+ depth[tag]--;
+ }
+
+ if (depth[tag] === 0)
+ found = true;
+ }
+ }
+ } while (prevToken && !found);
+ }
+ if (token && token.type.indexOf('tag-name')) {
+ pos = range.start;
+ if (pos.row == cursor.row && Math.abs(pos.column - cursor.column) < 2)
+ pos = range.end;
+ }
+ }
+
+ pos = range && range.cursor || pos;
+ if (pos) {
+ if (select) {
+ if (range && expand) {
+ this.selection.setRange(range);
+ } else if (range && range.isEqual(this.getSelectionRange())) {
+ this.clearSelection();
+ } else {
+ this.selection.selectTo(pos.row, pos.column);
+ }
+ } else {
+ this.selection.moveTo(pos.row, pos.column);
+ }
+ }
+ };
+ this.gotoLine = function(lineNumber, column, animate) {
+ this.selection.clearSelection();
+ this.session.unfold({row: lineNumber - 1, column: column || 0});
+
+ this.$blockScrolling += 1;
+ this.exitMultiSelectMode && this.exitMultiSelectMode();
+ this.moveCursorTo(lineNumber - 1, column || 0);
+ this.$blockScrolling -= 1;
+
+ if (!this.isRowFullyVisible(lineNumber - 1))
+ this.scrollToLine(lineNumber - 1, true, animate);
+ };
+ this.navigateTo = function(row, column) {
+ this.selection.moveTo(row, column);
+ };
+ this.navigateUp = function(times) {
+ if (this.selection.isMultiLine() && !this.selection.isBackwards()) {
+ var selectionStart = this.selection.anchor.getPosition();
+ return this.moveCursorToPosition(selectionStart);
+ }
+ this.selection.clearSelection();
+ this.selection.moveCursorBy(-times || -1, 0);
+ };
+ this.navigateDown = function(times) {
+ if (this.selection.isMultiLine() && this.selection.isBackwards()) {
+ var selectionEnd = this.selection.anchor.getPosition();
+ return this.moveCursorToPosition(selectionEnd);
+ }
+ this.selection.clearSelection();
+ this.selection.moveCursorBy(times || 1, 0);
+ };
+ this.navigateLeft = function(times) {
+ if (!this.selection.isEmpty()) {
+ var selectionStart = this.getSelectionRange().start;
+ this.moveCursorToPosition(selectionStart);
+ }
+ else {
+ times = times || 1;
+ while (times--) {
+ this.selection.moveCursorLeft();
+ }
+ }
+ this.clearSelection();
+ };
+ this.navigateRight = function(times) {
+ if (!this.selection.isEmpty()) {
+ var selectionEnd = this.getSelectionRange().end;
+ this.moveCursorToPosition(selectionEnd);
+ }
+ else {
+ times = times || 1;
+ while (times--) {
+ this.selection.moveCursorRight();
+ }
+ }
+ this.clearSelection();
+ };
+ this.navigateLineStart = function() {
+ this.selection.moveCursorLineStart();
+ this.clearSelection();
+ };
+ this.navigateLineEnd = function() {
+ this.selection.moveCursorLineEnd();
+ this.clearSelection();
+ };
+ this.navigateFileEnd = function() {
+ this.selection.moveCursorFileEnd();
+ this.clearSelection();
+ };
+ this.navigateFileStart = function() {
+ this.selection.moveCursorFileStart();
+ this.clearSelection();
+ };
+ this.navigateWordRight = function() {
+ this.selection.moveCursorWordRight();
+ this.clearSelection();
+ };
+ this.navigateWordLeft = function() {
+ this.selection.moveCursorWordLeft();
+ this.clearSelection();
+ };
+ this.replace = function(replacement, options) {
+ if (options)
+ this.$search.set(options);
+
+ var range = this.$search.find(this.session);
+ var replaced = 0;
+ if (!range)
+ return replaced;
+
+ if (this.$tryReplace(range, replacement)) {
+ replaced = 1;
+ }
+ if (range !== null) {
+ this.selection.setSelectionRange(range);
+ this.renderer.scrollSelectionIntoView(range.start, range.end);
+ }
+
+ return replaced;
+ };
+ this.replaceAll = function(replacement, options) {
+ if (options) {
+ this.$search.set(options);
+ }
+
+ var ranges = this.$search.findAll(this.session);
+ var replaced = 0;
+ if (!ranges.length)
+ return replaced;
+
+ this.$blockScrolling += 1;
+
+ var selection = this.getSelectionRange();
+ this.selection.moveTo(0, 0);
+
+ for (var i = ranges.length - 1; i >= 0; --i) {
+ if(this.$tryReplace(ranges[i], replacement)) {
+ replaced++;
+ }
+ }
+
+ this.selection.setSelectionRange(selection);
+ this.$blockScrolling -= 1;
+
+ return replaced;
+ };
+
+ this.$tryReplace = function(range, replacement) {
+ var input = this.session.getTextRange(range);
+ replacement = this.$search.replace(input, replacement);
+ if (replacement !== null) {
+ range.end = this.session.replace(range, replacement);
+ return range;
+ } else {
+ return null;
+ }
+ };
+ this.getLastSearchOptions = function() {
+ return this.$search.getOptions();
+ };
+ this.find = function(needle, options, animate) {
+ if (!options)
+ options = {};
+
+ if (typeof needle == "string" || needle instanceof RegExp)
+ options.needle = needle;
+ else if (typeof needle == "object")
+ oop.mixin(options, needle);
+
+ var range = this.selection.getRange();
+ if (options.needle == null) {
+ needle = this.session.getTextRange(range)
+ || this.$search.$options.needle;
+ if (!needle) {
+ range = this.session.getWordRange(range.start.row, range.start.column);
+ needle = this.session.getTextRange(range);
+ }
+ this.$search.set({needle: needle});
+ }
+
+ this.$search.set(options);
+ if (!options.start)
+ this.$search.set({start: range});
+
+ var newRange = this.$search.find(this.session);
+ if (options.preventScroll)
+ return newRange;
+ if (newRange) {
+ this.revealRange(newRange, animate);
+ return newRange;
+ }
+ if (options.backwards)
+ range.start = range.end;
+ else
+ range.end = range.start;
+ this.selection.setRange(range);
+ };
+ this.findNext = function(options, animate) {
+ this.find({skipCurrent: true, backwards: false}, options, animate);
+ };
+ this.findPrevious = function(options, animate) {
+ this.find(options, {skipCurrent: true, backwards: true}, animate);
+ };
+
+ this.revealRange = function(range, animate) {
+ this.$blockScrolling += 1;
+ this.session.unfold(range);
+ this.selection.setSelectionRange(range);
+ this.$blockScrolling -= 1;
+
+ var scrollTop = this.renderer.scrollTop;
+ this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);
+ if (animate !== false)
+ this.renderer.animateScrolling(scrollTop);
+ };
+ this.undo = function() {
+ this.$blockScrolling++;
+ this.session.getUndoManager().undo();
+ this.$blockScrolling--;
+ this.renderer.scrollCursorIntoView(null, 0.5);
+ };
+ this.redo = function() {
+ this.$blockScrolling++;
+ this.session.getUndoManager().redo();
+ this.$blockScrolling--;
+ this.renderer.scrollCursorIntoView(null, 0.5);
+ };
+ this.destroy = function() {
+ this.renderer.destroy();
+ this._signal("destroy", this);
+ if (this.session) {
+ this.session.destroy();
+ }
+ };
+ this.setAutoScrollEditorIntoView = function(enable) {
+ if (!enable)
+ return;
+ var rect;
+ var self = this;
+ var shouldScroll = false;
+ if (!this.$scrollAnchor)
+ this.$scrollAnchor = document.createElement("div");
+ var scrollAnchor = this.$scrollAnchor;
+ scrollAnchor.style.cssText = "position:absolute";
+ this.container.insertBefore(scrollAnchor, this.container.firstChild);
+ var onChangeSelection = this.on("changeSelection", function() {
+ shouldScroll = true;
+ });
+ var onBeforeRender = this.renderer.on("beforeRender", function() {
+ if (shouldScroll)
+ rect = self.renderer.container.getBoundingClientRect();
+ });
+ var onAfterRender = this.renderer.on("afterRender", function() {
+ if (shouldScroll && rect && (self.isFocused()
+ || self.searchBox && self.searchBox.isFocused())
+ ) {
+ var renderer = self.renderer;
+ var pos = renderer.$cursorLayer.$pixelPos;
+ var config = renderer.layerConfig;
+ var top = pos.top - config.offset;
+ if (pos.top >= 0 && top + rect.top < 0) {
+ shouldScroll = true;
+ } else if (pos.top < config.height &&
+ pos.top + rect.top + config.lineHeight > window.innerHeight) {
+ shouldScroll = false;
+ } else {
+ shouldScroll = null;
+ }
+ if (shouldScroll != null) {
+ scrollAnchor.style.top = top + "px";
+ scrollAnchor.style.left = pos.left + "px";
+ scrollAnchor.style.height = config.lineHeight + "px";
+ scrollAnchor.scrollIntoView(shouldScroll);
+ }
+ shouldScroll = rect = null;
+ }
+ });
+ this.setAutoScrollEditorIntoView = function(enable) {
+ if (enable)
+ return;
+ delete this.setAutoScrollEditorIntoView;
+ this.removeEventListener("changeSelection", onChangeSelection);
+ this.renderer.removeEventListener("afterRender", onAfterRender);
+ this.renderer.removeEventListener("beforeRender", onBeforeRender);
+ };
+ };
+
+
+ this.$resetCursorStyle = function() {
+ var style = this.$cursorStyle || "ace";
+ var cursorLayer = this.renderer.$cursorLayer;
+ if (!cursorLayer)
+ return;
+ cursorLayer.setSmoothBlinking(/smooth/.test(style));
+ cursorLayer.isBlinking = !this.$readOnly && style != "wide";
+ dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style));
+ };
+
+}).call(Editor.prototype);
+
+
+
+config.defineOptions(Editor.prototype, "editor", {
+ selectionStyle: {
+ set: function(style) {
+ this.onSelectionChange();
+ this._signal("changeSelectionStyle", {data: style});
+ },
+ initialValue: "line"
+ },
+ highlightActiveLine: {
+ set: function() {this.$updateHighlightActiveLine();},
+ initialValue: true
+ },
+ highlightSelectedWord: {
+ set: function(shouldHighlight) {this.$onSelectionChange();},
+ initialValue: true
+ },
+ readOnly: {
+ set: function(readOnly) {
+ this.$resetCursorStyle();
+ },
+ initialValue: false
+ },
+ cursorStyle: {
+ set: function(val) { this.$resetCursorStyle(); },
+ values: ["ace", "slim", "smooth", "wide"],
+ initialValue: "ace"
+ },
+ mergeUndoDeltas: {
+ values: [false, true, "always"],
+ initialValue: true
+ },
+ behavioursEnabled: {initialValue: true},
+ wrapBehavioursEnabled: {initialValue: true},
+ autoScrollEditorIntoView: {
+ set: function(val) {this.setAutoScrollEditorIntoView(val)}
+ },
+
+ hScrollBarAlwaysVisible: "renderer",
+ vScrollBarAlwaysVisible: "renderer",
+ highlightGutterLine: "renderer",
+ animatedScroll: "renderer",
+ showInvisibles: "renderer",
+ showPrintMargin: "renderer",
+ printMarginColumn: "renderer",
+ printMargin: "renderer",
+ fadeFoldWidgets: "renderer",
+ showFoldWidgets: "renderer",
+ showLineNumbers: "renderer",
+ showGutter: "renderer",
+ displayIndentGuides: "renderer",
+ fontSize: "renderer",
+ fontFamily: "renderer",
+ maxLines: "renderer",
+ minLines: "renderer",
+ scrollPastEnd: "renderer",
+ fixedWidthGutter: "renderer",
+ theme: "renderer",
+
+ scrollSpeed: "$mouseHandler",
+ dragDelay: "$mouseHandler",
+ dragEnabled: "$mouseHandler",
+ focusTimout: "$mouseHandler",
+ tooltipFollowsMouse: "$mouseHandler",
+
+ firstLineNumber: "session",
+ overwrite: "session",
+ newLineMode: "session",
+ useWorker: "session",
+ useSoftTabs: "session",
+ tabSize: "session",
+ wrap: "session",
+ indentedSoftWrap: "session",
+ foldStyle: "session",
+ mode: "session"
+});
+
+exports.Editor = Editor;
+});
+
+ace.define("ace/undomanager",["require","exports","module"], function(require, exports, module) {
+"use strict";
var UndoManager = function() {
this.reset();
};
@@ -11689,6 +12999,7 @@ var UndoManager = function() {
var deltas = options.args[0];
this.$doc = options.args[1];
if (options.merge && this.hasUndo()){
+ this.dirtyCounter--;
deltas = this.$undoStack.pop().concat(deltas);
}
this.$undoStack.push(deltas);
@@ -11746,28 +13057,1506 @@ var UndoManager = function() {
exports.UndoManager = UndoManager;
});
-ace.define('ace/virtual_renderer', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/useragent', 'ace/config', 'ace/layer/gutter', 'ace/layer/marker', 'ace/layer/text', 'ace/layer/cursor', 'ace/scrollbar', 'ace/renderloop', 'ace/lib/event_emitter'], function(require, exports, module) {
+ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var Gutter = function(parentEl) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_layer ace_gutter-layer";
+ parentEl.appendChild(this.element);
+ this.setShowFoldWidgets(this.$showFoldWidgets);
+
+ this.gutterWidth = 0;
+
+ this.$annotations = [];
+ this.$updateAnnotations = this.$updateAnnotations.bind(this);
+
+ this.$cells = [];
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.setSession = function(session) {
+ if (this.session)
+ this.session.removeEventListener("change", this.$updateAnnotations);
+ this.session = session;
+ if (session)
+ session.on("change", this.$updateAnnotations);
+ };
+
+ this.addGutterDecoration = function(row, className){
+ if (window.console)
+ console.warn && console.warn("deprecated use session.addGutterDecoration");
+ this.session.addGutterDecoration(row, className);
+ };
+
+ this.removeGutterDecoration = function(row, className){
+ if (window.console)
+ console.warn && console.warn("deprecated use session.removeGutterDecoration");
+ this.session.removeGutterDecoration(row, className);
+ };
+ this.setAnnotations = function(annotations) {
+ this.$annotations = [];
+ for (var i = 0; i < annotations.length; i++) {
+ var annotation = annotations[i];
+ var row = annotation.row;
+ var rowInfo = this.$annotations[row];
+ if (!rowInfo)
+ rowInfo = this.$annotations[row] = {text: []};
+
+ var annoText = annotation.text;
+ annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || "";
+
+ if (rowInfo.text.indexOf(annoText) === -1)
+ rowInfo.text.push(annoText);
+
+ var type = annotation.type;
+ if (type == "error")
+ rowInfo.className = " ace_error";
+ else if (type == "warning" && rowInfo.className != " ace_error")
+ rowInfo.className = " ace_warning";
+ else if (type == "info" && (!rowInfo.className))
+ rowInfo.className = " ace_info";
+ }
+ };
+
+ this.$updateAnnotations = function (e) {
+ if (!this.$annotations.length)
+ return;
+ var delta = e.data;
+ var range = delta.range;
+ var firstRow = range.start.row;
+ var len = range.end.row - firstRow;
+ if (len === 0) {
+ } else if (delta.action == "removeText" || delta.action == "removeLines") {
+ this.$annotations.splice(firstRow, len + 1, null);
+ } else {
+ var args = new Array(len + 1);
+ args.unshift(firstRow, 1);
+ this.$annotations.splice.apply(this.$annotations, args);
+ }
+ };
+
+ this.update = function(config) {
+ var session = this.session;
+ var firstRow = config.firstRow;
+ var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar
+ session.getLength() - 1);
+ var fold = session.getNextFoldLine(firstRow);
+ var foldStart = fold ? fold.start.row : Infinity;
+ var foldWidgets = this.$showFoldWidgets && session.foldWidgets;
+ var breakpoints = session.$breakpoints;
+ var decorations = session.$decorations;
+ var firstLineNumber = session.$firstLineNumber;
+ var lastLineNumber = 0;
+
+ var gutterRenderer = session.gutterRenderer || this.$renderer;
+
+ var cell = null;
+ var index = -1;
+ var row = firstRow;
+ while (true) {
+ if (row > foldStart) {
+ row = fold.end.row + 1;
+ fold = session.getNextFoldLine(row, fold);
+ foldStart = fold ? fold.start.row : Infinity;
+ }
+ if (row > lastRow) {
+ while (this.$cells.length > index + 1) {
+ cell = this.$cells.pop();
+ this.element.removeChild(cell.element);
+ }
+ break;
+ }
+
+ cell = this.$cells[++index];
+ if (!cell) {
+ cell = {element: null, textNode: null, foldWidget: null};
+ cell.element = dom.createElement("div");
+ cell.textNode = document.createTextNode('');
+ cell.element.appendChild(cell.textNode);
+ this.element.appendChild(cell.element);
+ this.$cells[index] = cell;
+ }
+
+ var className = "ace_gutter-cell ";
+ if (breakpoints[row])
+ className += breakpoints[row];
+ if (decorations[row])
+ className += decorations[row];
+ if (this.$annotations[row])
+ className += this.$annotations[row].className;
+ if (cell.element.className != className)
+ cell.element.className = className;
+
+ var height = session.getRowLength(row) * config.lineHeight + "px";
+ if (height != cell.element.style.height)
+ cell.element.style.height = height;
+
+ if (foldWidgets) {
+ var c = foldWidgets[row];
+ if (c == null)
+ c = foldWidgets[row] = session.getFoldWidget(row);
+ }
+
+ if (c) {
+ if (!cell.foldWidget) {
+ cell.foldWidget = dom.createElement("span");
+ cell.element.appendChild(cell.foldWidget);
+ }
+ var className = "ace_fold-widget ace_" + c;
+ if (c == "start" && row == foldStart && row < fold.end.row)
+ className += " ace_closed";
+ else
+ className += " ace_open";
+ if (cell.foldWidget.className != className)
+ cell.foldWidget.className = className;
+
+ var height = config.lineHeight + "px";
+ if (cell.foldWidget.style.height != height)
+ cell.foldWidget.style.height = height;
+ } else {
+ if (cell.foldWidget) {
+ cell.element.removeChild(cell.foldWidget);
+ cell.foldWidget = null;
+ }
+ }
+
+ var text = lastLineNumber = gutterRenderer
+ ? gutterRenderer.getText(session, row)
+ : row + firstLineNumber;
+ if (text != cell.textNode.data)
+ cell.textNode.data = text;
+
+ row++;
+ }
+
+ this.element.style.height = config.minHeight + "px";
+
+ if (this.$fixedWidth || session.$useWrapMode)
+ lastLineNumber = session.getLength() + firstLineNumber;
+
+ var gutterWidth = gutterRenderer
+ ? gutterRenderer.getWidth(session, lastLineNumber, config)
+ : lastLineNumber.toString().length * config.characterWidth;
+
+ var padding = this.$padding || this.$computePadding();
+ gutterWidth += padding.left + padding.right;
+ if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) {
+ this.gutterWidth = gutterWidth;
+ this.element.style.width = Math.ceil(this.gutterWidth) + "px";
+ this._emit("changeGutterWidth", gutterWidth);
+ }
+ };
+
+ this.$fixedWidth = false;
+
+ this.$showLineNumbers = true;
+ this.$renderer = "";
+ this.setShowLineNumbers = function(show) {
+ this.$renderer = !show && {
+ getWidth: function() {return ""},
+ getText: function() {return ""}
+ };
+ };
+
+ this.getShowLineNumbers = function() {
+ return this.$showLineNumbers;
+ };
+
+ this.$showFoldWidgets = true;
+ this.setShowFoldWidgets = function(show) {
+ if (show)
+ dom.addCssClass(this.element, "ace_folding-enabled");
+ else
+ dom.removeCssClass(this.element, "ace_folding-enabled");
+
+ this.$showFoldWidgets = show;
+ this.$padding = null;
+ };
+
+ this.getShowFoldWidgets = function() {
+ return this.$showFoldWidgets;
+ };
+
+ this.$computePadding = function() {
+ if (!this.element.firstChild)
+ return {left: 0, right: 0};
+ var style = dom.computedStyle(this.element.firstChild);
+ this.$padding = {};
+ this.$padding.left = parseInt(style.paddingLeft) + 1 || 0;
+ this.$padding.right = parseInt(style.paddingRight) || 0;
+ return this.$padding;
+ };
+
+ this.getRegion = function(point) {
+ var padding = this.$padding || this.$computePadding();
+ var rect = this.element.getBoundingClientRect();
+ if (point.x < padding.left + rect.left)
+ return "markers";
+ if (this.$showFoldWidgets && point.x > rect.right - padding.right)
+ return "foldWidgets";
+ };
+
+}).call(Gutter.prototype);
+
+exports.Gutter = Gutter;
+
+});
+
+ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+var dom = require("../lib/dom");
+
+var Marker = function(parentEl) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_layer ace_marker-layer";
+ parentEl.appendChild(this.element);
+};
+
+(function() {
+
+ this.$padding = 0;
+
+ this.setPadding = function(padding) {
+ this.$padding = padding;
+ };
+ this.setSession = function(session) {
+ this.session = session;
+ };
+
+ this.setMarkers = function(markers) {
+ this.markers = markers;
+ };
+
+ this.update = function(config) {
+ var config = config || this.config;
+ if (!config)
+ return;
+
+ this.config = config;
+
+
+ var html = [];
+ for (var key in this.markers) {
+ var marker = this.markers[key];
+
+ if (!marker.range) {
+ marker.update(html, this, this.session, config);
+ continue;
+ }
+
+ var range = marker.range.clipRows(config.firstRow, config.lastRow);
+ if (range.isEmpty()) continue;
+
+ range = range.toScreenRange(this.session);
+ if (marker.renderer) {
+ var top = this.$getTop(range.start.row, config);
+ var left = this.$padding + range.start.column * config.characterWidth;
+ marker.renderer(html, range, left, top, config);
+ } else if (marker.type == "fullLine") {
+ this.drawFullLineMarker(html, range, marker.clazz, config);
+ } else if (marker.type == "screenLine") {
+ this.drawScreenLineMarker(html, range, marker.clazz, config);
+ } else if (range.isMultiLine()) {
+ if (marker.type == "text")
+ this.drawTextMarker(html, range, marker.clazz, config);
+ else
+ this.drawMultiLineMarker(html, range, marker.clazz, config);
+ } else {
+ this.drawSingleLineMarker(html, range, marker.clazz + " ace_start", config);
+ }
+ }
+ this.element.innerHTML = html.join("");
+ };
+
+ this.$getTop = function(row, layerConfig) {
+ return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;
+ };
+ this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) {
+ var row = range.start.row;
+ var session = this.session;
+
+ var lineRange = new Range(
+ row, range.start.column,
+ row, session.getScreenLastRowColumn(row)
+ );
+ this.drawSingleLineMarker(stringBuilder, lineRange, clazz + " ace_start", layerConfig, 1, extraStyle);
+ row = range.end.row;
+ lineRange = new Range(row, session.getRowWrapIndent(row), row, range.end.column);
+ this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 0, extraStyle);
+
+ for (row = range.start.row + 1; row < range.end.row; row++) {
+ lineRange.start.row = row;
+ lineRange.start.column = session.getRowWrapIndent(row);
+ lineRange.end.row = row;
+ lineRange.end.column = session.getScreenLastRowColumn(row);
+ this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, extraStyle);
+ }
+ };
+ this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
+ var padding = this.$padding;
+ var height = config.lineHeight;
+ var top = this.$getTop(range.start.row, config);
+ var left = padding + range.start.column * config.characterWidth;
+ extraStyle = extraStyle || "";
+
+ stringBuilder.push(
+ "<div class='", clazz, " ace_start' style='",
+ "height:", height, "px;",
+ "right:0;",
+ "top:", top, "px;",
+ "left:", left, "px;", extraStyle, "'></div>"
+ );
+ top = this.$getTop(range.end.row, config);
+ var width = range.end.column * config.characterWidth;
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "width:", width, "px;",
+ "top:", top, "px;",
+ "left:", padding, "px;", extraStyle, "'></div>"
+ );
+ height = (range.end.row - range.start.row - 1) * config.lineHeight;
+ if (height <= 0)
+ return;
+ top = this.$getTop(range.start.row + 1, config);
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "right:0;",
+ "top:", top, "px;",
+ "left:", padding, "px;", extraStyle, "'></div>"
+ );
+ };
+ this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) {
+ var height = config.lineHeight;
+ var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth;
+
+ var top = this.$getTop(range.start.row, config);
+ var left = this.$padding + range.start.column * config.characterWidth;
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "width:", width, "px;",
+ "top:", top, "px;",
+ "left:", left, "px;", extraStyle || "", "'></div>"
+ );
+ };
+
+ this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
+ var top = this.$getTop(range.start.row, config);
+ var height = config.lineHeight;
+ if (range.start.row != range.end.row)
+ height += this.$getTop(range.end.row, config) - top;
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "top:", top, "px;",
+ "left:0;right:0;", extraStyle || "", "'></div>"
+ );
+ };
+
+ this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
+ var top = this.$getTop(range.start.row, config);
+ var height = config.lineHeight;
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "top:", top, "px;",
+ "left:0;right:0;", extraStyle || "", "'></div>"
+ );
+ };
+
+}).call(Marker.prototype);
+
+exports.Marker = Marker;
+
+});
+
+ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var useragent = require("../lib/useragent");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var Text = function(parentEl) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_layer ace_text-layer";
+ parentEl.appendChild(this.element);
+ this.$updateEolChar = this.$updateEolChar.bind(this);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.EOF_CHAR = "\xB6";
+ this.EOL_CHAR_LF = "\xAC";
+ this.EOL_CHAR_CRLF = "\xa4";
+ this.EOL_CHAR = this.EOL_CHAR_LF;
+ this.TAB_CHAR = "\u2192"; //"\u21E5";
+ this.SPACE_CHAR = "\xB7";
+ this.$padding = 0;
+
+ this.$updateEolChar = function() {
+ var EOL_CHAR = this.session.doc.getNewLineCharacter() == "\n"
+ ? this.EOL_CHAR_LF
+ : this.EOL_CHAR_CRLF;
+ if (this.EOL_CHAR != EOL_CHAR) {
+ this.EOL_CHAR = EOL_CHAR;
+ return true;
+ }
+ }
+
+ this.setPadding = function(padding) {
+ this.$padding = padding;
+ this.element.style.padding = "0 " + padding + "px";
+ };
+
+ this.getLineHeight = function() {
+ return this.$fontMetrics.$characterSize.height || 0;
+ };
+
+ this.getCharacterWidth = function() {
+ return this.$fontMetrics.$characterSize.width || 0;
+ };
+
+ this.$setFontMetrics = function(measure) {
+ this.$fontMetrics = measure;
+ this.$fontMetrics.on("changeCharacterSize", function(e) {
+ this._signal("changeCharacterSize", e);
+ }.bind(this));
+ this.$pollSizeChanges();
+ }
+
+ this.checkForSizeChanges = function() {
+ this.$fontMetrics.checkForSizeChanges();
+ };
+ this.$pollSizeChanges = function() {
+ return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges();
+ };
+ this.setSession = function(session) {
+ this.session = session;
+ if (session)
+ this.$computeTabString();
+ };
+
+ this.showInvisibles = false;
+ this.setShowInvisibles = function(showInvisibles) {
+ if (this.showInvisibles == showInvisibles)
+ return false;
+
+ this.showInvisibles = showInvisibles;
+ this.$computeTabString();
+ return true;
+ };
+
+ this.displayIndentGuides = true;
+ this.setDisplayIndentGuides = function(display) {
+ if (this.displayIndentGuides == display)
+ return false;
+
+ this.displayIndentGuides = display;
+ this.$computeTabString();
+ return true;
+ };
+
+ this.$tabStrings = [];
+ this.onChangeTabSize =
+ this.$computeTabString = function() {
+ var tabSize = this.session.getTabSize();
+ this.tabSize = tabSize;
+ var tabStr = this.$tabStrings = [0];
+ for (var i = 1; i < tabSize + 1; i++) {
+ if (this.showInvisibles) {
+ tabStr.push("<span class='ace_invisible ace_invisible_tab'>"
+ + this.TAB_CHAR
+ + lang.stringRepeat(" ", i - 1)
+ + "</span>");
+ } else {
+ tabStr.push(lang.stringRepeat(" ", i));
+ }
+ }
+ if (this.displayIndentGuides) {
+ this.$indentGuideRe = /\s\S| \t|\t |\s$/;
+ var className = "ace_indent-guide";
+ var spaceClass = "";
+ var tabClass = "";
+ if (this.showInvisibles) {
+ className += " ace_invisible";
+ spaceClass = " ace_invisible_space";
+ tabClass = " ace_invisible_tab";
+ var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize);
+ var tabContent = this.TAB_CHAR + lang.stringRepeat(" ", this.tabSize - 1);
+ } else{
+ var spaceContent = lang.stringRepeat(" ", this.tabSize);
+ var tabContent = spaceContent;
+ }
+
+ this.$tabStrings[" "] = "<span class='" + className + spaceClass + "'>" + spaceContent + "</span>";
+ this.$tabStrings["\t"] = "<span class='" + className + tabClass + "'>" + tabContent + "</span>";
+ }
+ };
+
+ this.updateLines = function(config, firstRow, lastRow) {
+ if (this.config.lastRow != config.lastRow ||
+ this.config.firstRow != config.firstRow) {
+ this.scrollLines(config);
+ }
+ this.config = config;
+
+ var first = Math.max(firstRow, config.firstRow);
+ var last = Math.min(lastRow, config.lastRow);
+
+ var lineElements = this.element.childNodes;
+ var lineElementsIdx = 0;
+
+ for (var row = config.firstRow; row < first; row++) {
+ var foldLine = this.session.getFoldLine(row);
+ if (foldLine) {
+ if (foldLine.containsRow(first)) {
+ first = foldLine.start.row;
+ break;
+ } else {
+ row = foldLine.end.row;
+ }
+ }
+ lineElementsIdx ++;
+ }
+
+ var row = first;
+ var foldLine = this.session.getNextFoldLine(row);
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+ while (true) {
+ if (row > foldStart) {
+ row = foldLine.end.row+1;
+ foldLine = this.session.getNextFoldLine(row, foldLine);
+ foldStart = foldLine ? foldLine.start.row :Infinity;
+ }
+ if (row > last)
+ break;
+
+ var lineElement = lineElements[lineElementsIdx++];
+ if (lineElement) {
+ var html = [];
+ this.$renderLine(
+ html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false
+ );
+ lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + "px";
+ lineElement.innerHTML = html.join("");
+ }
+ row++;
+ }
+ };
+
+ this.scrollLines = function(config) {
+ var oldConfig = this.config;
+ this.config = config;
+
+ if (!oldConfig || oldConfig.lastRow < config.firstRow)
+ return this.update(config);
+
+ if (config.lastRow < oldConfig.firstRow)
+ return this.update(config);
+
+ var el = this.element;
+ if (oldConfig.firstRow < config.firstRow)
+ for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--)
+ el.removeChild(el.firstChild);
+
+ if (oldConfig.lastRow > config.lastRow)
+ for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--)
+ el.removeChild(el.lastChild);
+
+ if (config.firstRow < oldConfig.firstRow) {
+ var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1);
+ if (el.firstChild)
+ el.insertBefore(fragment, el.firstChild);
+ else
+ el.appendChild(fragment);
+ }
+
+ if (config.lastRow > oldConfig.lastRow) {
+ var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow);
+ el.appendChild(fragment);
+ }
+ };
+
+ this.$renderLinesFragment = function(config, firstRow, lastRow) {
+ var fragment = this.element.ownerDocument.createDocumentFragment();
+ var row = firstRow;
+ var foldLine = this.session.getNextFoldLine(row);
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+ while (true) {
+ if (row > foldStart) {
+ row = foldLine.end.row+1;
+ foldLine = this.session.getNextFoldLine(row, foldLine);
+ foldStart = foldLine ? foldLine.start.row : Infinity;
+ }
+ if (row > lastRow)
+ break;
+
+ var container = dom.createElement("div");
+
+ var html = [];
+ this.$renderLine(html, row, false, row == foldStart ? foldLine : false);
+ container.innerHTML = html.join("");
+ if (this.$useLineGroups()) {
+ container.className = 'ace_line_group';
+ fragment.appendChild(container);
+ container.style.height = config.lineHeight * this.session.getRowLength(row) + "px";
+
+ } else {
+ while(container.firstChild)
+ fragment.appendChild(container.firstChild);
+ }
+
+ row++;
+ }
+ return fragment;
+ };
+
+ this.update = function(config) {
+ this.config = config;
+
+ var html = [];
+ var firstRow = config.firstRow, lastRow = config.lastRow;
+
+ var row = firstRow;
+ var foldLine = this.session.getNextFoldLine(row);
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+ while (true) {
+ if (row > foldStart) {
+ row = foldLine.end.row+1;
+ foldLine = this.session.getNextFoldLine(row, foldLine);
+ foldStart = foldLine ? foldLine.start.row :Infinity;
+ }
+ if (row > lastRow)
+ break;
+
+ if (this.$useLineGroups())
+ html.push("<div class='ace_line_group' style='height:", config.lineHeight*this.session.getRowLength(row), "px'>")
+
+ this.$renderLine(html, row, false, row == foldStart ? foldLine : false);
+
+ if (this.$useLineGroups())
+ html.push("</div>"); // end the line group
+
+ row++;
+ }
+ this.element.innerHTML = html.join("");
+ };
+
+ this.$textToken = {
+ "text": true,
+ "rparen": true,
+ "lparen": true
+ };
+
+ this.$renderToken = function(stringBuilder, screenColumn, token, value) {
+ var self = this;
+ var replaceReg = /\t|&|<|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g;
+ var replaceFunc = function(c, a, b, tabIdx, idx4) {
+ if (a) {
+ return self.showInvisibles
+ ? "<span class='ace_invisible ace_invisible_space'>" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "</span>"
+ : c;
+ } else if (c == "&") {
+ return "&#38;";
+ } else if (c == "<") {
+ return "&#60;";
+ } else if (c == "\t") {
+ var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx);
+ screenColumn += tabSize - 1;
+ return self.$tabStrings[tabSize];
+ } else if (c == "\u3000") {
+ var classToUse = self.showInvisibles ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk";
+ var space = self.showInvisibles ? self.SPACE_CHAR : "";
+ screenColumn += 1;
+ return "<span class='" + classToUse + "' style='width:" +
+ (self.config.characterWidth * 2) +
+ "px'>" + space + "</span>";
+ } else if (b) {
+ return "<span class='ace_invisible ace_invisible_space ace_invalid'>" + self.SPACE_CHAR + "</span>";
+ } else {
+ screenColumn += 1;
+ return "<span class='ace_cjk' style='width:" +
+ (self.config.characterWidth * 2) +
+ "px'>" + c + "</span>";
+ }
+ };
+
+ var output = value.replace(replaceReg, replaceFunc);
+
+ if (!this.$textToken[token.type]) {
+ var classes = "ace_" + token.type.replace(/\./g, " ace_");
+ var style = "";
+ if (token.type == "fold")
+ style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' ";
+ stringBuilder.push("<span class='", classes, "'", style, ">", output, "</span>");
+ }
+ else {
+ stringBuilder.push(output);
+ }
+ return screenColumn + value.length;
+ };
+
+ this.renderIndentGuide = function(stringBuilder, value, max) {
+ var cols = value.search(this.$indentGuideRe);
+ if (cols <= 0 || cols >= max)
+ return value;
+ if (value[0] == " ") {
+ cols -= cols % this.tabSize;
+ stringBuilder.push(lang.stringRepeat(this.$tabStrings[" "], cols/this.tabSize));
+ return value.substr(cols);
+ } else if (value[0] == "\t") {
+ stringBuilder.push(lang.stringRepeat(this.$tabStrings["\t"], cols));
+ return value.substr(cols);
+ }
+ return value;
+ };
+
+ this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) {
+ var chars = 0;
+ var split = 0;
+ var splitChars = splits[0];
+ var screenColumn = 0;
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ var value = token.value;
+ if (i == 0 && this.displayIndentGuides) {
+ chars = value.length;
+ value = this.renderIndentGuide(stringBuilder, value, splitChars);
+ if (!value)
+ continue;
+ chars -= value.length;
+ }
+
+ if (chars + value.length < splitChars) {
+ screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
+ chars += value.length;
+ } else {
+ while (chars + value.length >= splitChars) {
+ screenColumn = this.$renderToken(
+ stringBuilder, screenColumn,
+ token, value.substring(0, splitChars - chars)
+ );
+ value = value.substring(splitChars - chars);
+ chars = splitChars;
+
+ if (!onlyContents) {
+ stringBuilder.push("</div>",
+ "<div class='ace_line' style='height:",
+ this.config.lineHeight, "px'>"
+ );
+ }
+
+ stringBuilder.push(lang.stringRepeat("\xa0", splits.indent));
+
+ split ++;
+ screenColumn = 0;
+ splitChars = splits[split] || Number.MAX_VALUE;
+ }
+ if (value.length != 0) {
+ chars += value.length;
+ screenColumn = this.$renderToken(
+ stringBuilder, screenColumn, token, value
+ );
+ }
+ }
+ }
+ };
+
+ this.$renderSimpleLine = function(stringBuilder, tokens) {
+ var screenColumn = 0;
+ var token = tokens[0];
+ var value = token.value;
+ if (this.displayIndentGuides)
+ value = this.renderIndentGuide(stringBuilder, value);
+ if (value)
+ screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
+ for (var i = 1; i < tokens.length; i++) {
+ token = tokens[i];
+ value = token.value;
+ screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
+ }
+ };
+ this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) {
+ if (!foldLine && foldLine != false)
+ foldLine = this.session.getFoldLine(row);
+
+ if (foldLine)
+ var tokens = this.$getFoldLineTokens(row, foldLine);
+ else
+ var tokens = this.session.getTokens(row);
+
+
+ if (!onlyContents) {
+ stringBuilder.push(
+ "<div class='ace_line' style='height:",
+ this.config.lineHeight * (
+ this.$useLineGroups() ? 1 :this.session.getRowLength(row)
+ ), "px'>"
+ );
+ }
+
+ if (tokens.length) {
+ var splits = this.session.getRowSplitData(row);
+ if (splits && splits.length)
+ this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents);
+ else
+ this.$renderSimpleLine(stringBuilder, tokens);
+ }
+
+ if (this.showInvisibles) {
+ if (foldLine)
+ row = foldLine.end.row
+
+ stringBuilder.push(
+ "<span class='ace_invisible ace_invisible_eol'>",
+ row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR,
+ "</span>"
+ );
+ }
+ if (!onlyContents)
+ stringBuilder.push("</div>");
+ };
+
+ this.$getFoldLineTokens = function(row, foldLine) {
+ var session = this.session;
+ var renderTokens = [];
+
+ function addTokens(tokens, from, to) {
+ var idx = 0, col = 0;
+ while ((col + tokens[idx].value.length) < from) {
+ col += tokens[idx].value.length;
+ idx++;
+
+ if (idx == tokens.length)
+ return;
+ }
+ if (col != from) {
+ var value = tokens[idx].value.substring(from - col);
+ if (value.length > (to - from))
+ value = value.substring(0, to - from);
+
+ renderTokens.push({
+ type: tokens[idx].type,
+ value: value
+ });
+
+ col = from + value.length;
+ idx += 1;
+ }
+
+ while (col < to && idx < tokens.length) {
+ var value = tokens[idx].value;
+ if (value.length + col > to) {
+ renderTokens.push({
+ type: tokens[idx].type,
+ value: value.substring(0, to - col)
+ });
+ } else
+ renderTokens.push(tokens[idx]);
+ col += value.length;
+ idx += 1;
+ }
+ }
+
+ var tokens = session.getTokens(row);
+ foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) {
+ if (placeholder != null) {
+ renderTokens.push({
+ type: "fold",
+ value: placeholder
+ });
+ } else {
+ if (isNewRow)
+ tokens = session.getTokens(row);
+
+ if (tokens.length)
+ addTokens(tokens, lastColumn, column);
+ }
+ }, foldLine.end.row, this.session.getLine(foldLine.end.row).length);
+
+ return renderTokens;
+ };
+
+ this.$useLineGroups = function() {
+ return this.session.getUseWrapMode();
+ };
+
+ this.destroy = function() {
+ clearInterval(this.$pollSizeChangesTimer);
+ if (this.$measureNode)
+ this.$measureNode.parentNode.removeChild(this.$measureNode);
+ delete this.$measureNode;
+ };
+
+}).call(Text.prototype);
+
+exports.Text = Text;
+
+});
+
+ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var IE8;
+
+var Cursor = function(parentEl) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_layer ace_cursor-layer";
+ parentEl.appendChild(this.element);
+
+ if (IE8 === undefined)
+ IE8 = "opacity" in this.element;
+
+ this.isVisible = false;
+ this.isBlinking = true;
+ this.blinkInterval = 1000;
+ this.smoothBlinking = false;
+
+ this.cursors = [];
+ this.cursor = this.addCursor();
+ dom.addCssClass(this.element, "ace_hidden-cursors");
+ this.$updateCursors = this.$updateVisibility.bind(this);
+};
+
+(function() {
+
+ this.$updateVisibility = function(val) {
+ var cursors = this.cursors;
+ for (var i = cursors.length; i--; )
+ cursors[i].style.visibility = val ? "" : "hidden";
+ };
+ this.$updateOpacity = function(val) {
+ var cursors = this.cursors;
+ for (var i = cursors.length; i--; )
+ cursors[i].style.opacity = val ? "" : "0";
+ };
+
+
+ this.$padding = 0;
+ this.setPadding = function(padding) {
+ this.$padding = padding;
+ };
+
+ this.setSession = function(session) {
+ this.session = session;
+ };
+
+ this.setBlinking = function(blinking) {
+ if (blinking != this.isBlinking){
+ this.isBlinking = blinking;
+ this.restartTimer();
+ }
+ };
+
+ this.setBlinkInterval = function(blinkInterval) {
+ if (blinkInterval != this.blinkInterval){
+ this.blinkInterval = blinkInterval;
+ this.restartTimer();
+ }
+ };
+
+ this.setSmoothBlinking = function(smoothBlinking) {
+ if (smoothBlinking != this.smoothBlinking && !IE8) {
+ this.smoothBlinking = smoothBlinking;
+ dom.setCssClass(this.element, "ace_smooth-blinking", smoothBlinking);
+ this.$updateCursors(true);
+ this.$updateCursors = (smoothBlinking
+ ? this.$updateOpacity
+ : this.$updateVisibility).bind(this);
+ this.restartTimer();
+ }
+ };
+
+ this.addCursor = function() {
+ var el = dom.createElement("div");
+ el.className = "ace_cursor";
+ this.element.appendChild(el);
+ this.cursors.push(el);
+ return el;
+ };
+
+ this.removeCursor = function() {
+ if (this.cursors.length > 1) {
+ var el = this.cursors.pop();
+ el.parentNode.removeChild(el);
+ return el;
+ }
+ };
+
+ this.hideCursor = function() {
+ this.isVisible = false;
+ dom.addCssClass(this.element, "ace_hidden-cursors");
+ this.restartTimer();
+ };
+
+ this.showCursor = function() {
+ this.isVisible = true;
+ dom.removeCssClass(this.element, "ace_hidden-cursors");
+ this.restartTimer();
+ };
+
+ this.restartTimer = function() {
+ var update = this.$updateCursors;
+ clearInterval(this.intervalId);
+ clearTimeout(this.timeoutId);
+ if (this.smoothBlinking) {
+ dom.removeCssClass(this.element, "ace_smooth-blinking");
+ }
+
+ update(true);
+
+ if (!this.isBlinking || !this.blinkInterval || !this.isVisible)
+ return;
+
+ if (this.smoothBlinking) {
+ setTimeout(function(){
+ dom.addCssClass(this.element, "ace_smooth-blinking");
+ }.bind(this));
+ }
+
+ var blink = function(){
+ this.timeoutId = setTimeout(function() {
+ update(false);
+ }, 0.6 * this.blinkInterval);
+ }.bind(this);
+
+ this.intervalId = setInterval(function() {
+ update(true);
+ blink();
+ }, this.blinkInterval);
+
+ blink();
+ };
+
+ this.getPixelPosition = function(position, onScreen) {
+ if (!this.config || !this.session)
+ return {left : 0, top : 0};
+
+ if (!position)
+ position = this.session.selection.getCursor();
+ var pos = this.session.documentToScreenPosition(position);
+ var cursorLeft = this.$padding + pos.column * this.config.characterWidth;
+ var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *
+ this.config.lineHeight;
+
+ return {left : cursorLeft, top : cursorTop};
+ };
+
+ this.update = function(config) {
+ this.config = config;
+
+ var selections = this.session.$selectionMarkers;
+ var i = 0, cursorIndex = 0;
+
+ if (selections === undefined || selections.length === 0){
+ selections = [{cursor: null}];
+ }
+
+ for (var i = 0, n = selections.length; i < n; i++) {
+ var pixelPos = this.getPixelPosition(selections[i].cursor, true);
+ if ((pixelPos.top > config.height + config.offset ||
+ pixelPos.top < 0) && i > 1) {
+ continue;
+ }
+
+ var style = (this.cursors[cursorIndex++] || this.addCursor()).style;
+
+ if (!this.drawCursor) {
+ style.left = pixelPos.left + "px";
+ style.top = pixelPos.top + "px";
+ style.width = config.characterWidth + "px";
+ style.height = config.lineHeight + "px";
+ } else {
+ this.drawCursor(style, pixelPos, config, selections[i], this.session);
+ }
+ }
+ while (this.cursors.length > cursorIndex)
+ this.removeCursor();
+
+ var overwrite = this.session.getOverwrite();
+ this.$setOverwrite(overwrite);
+ this.$pixelPos = pixelPos;
+ this.restartTimer();
+ };
+
+ this.drawCursor = null;
+
+ this.$setOverwrite = function(overwrite) {
+ if (overwrite != this.overwrite) {
+ this.overwrite = overwrite;
+ if (overwrite)
+ dom.addCssClass(this.element, "ace_overwrite-cursors");
+ else
+ dom.removeCssClass(this.element, "ace_overwrite-cursors");
+ }
+ };
+
+ this.destroy = function() {
+ clearInterval(this.intervalId);
+ clearTimeout(this.timeoutId);
+ };
+
+}).call(Cursor.prototype);
+
+exports.Cursor = Cursor;
+
+});
+
+ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var event = require("./lib/event");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var ScrollBar = function(parent) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_scrollbar ace_scrollbar" + this.classSuffix;
+
+ this.inner = dom.createElement("div");
+ this.inner.className = "ace_scrollbar-inner";
+ this.element.appendChild(this.inner);
+
+ parent.appendChild(this.element);
+
+ this.setVisible(false);
+ this.skipEvent = false;
+
+ event.addListener(this.element, "scroll", this.onScroll.bind(this));
+ event.addListener(this.element, "mousedown", event.preventDefault);
+};
+
+(function() {
+ oop.implement(this, EventEmitter);
+
+ this.setVisible = function(isVisible) {
+ this.element.style.display = isVisible ? "" : "none";
+ this.isVisible = isVisible;
+ };
+}).call(ScrollBar.prototype);
+var VScrollBar = function(parent, renderer) {
+ ScrollBar.call(this, parent);
+ this.scrollTop = 0;
+ renderer.$scrollbarWidth =
+ this.width = dom.scrollbarWidth(parent.ownerDocument);
+ this.inner.style.width =
+ this.element.style.width = (this.width || 15) + 5 + "px";
+};
+
+oop.inherits(VScrollBar, ScrollBar);
+
+(function() {
+
+ this.classSuffix = '-v';
+ this.onScroll = function() {
+ if (!this.skipEvent) {
+ this.scrollTop = this.element.scrollTop;
+ this._emit("scroll", {data: this.scrollTop});
+ }
+ this.skipEvent = false;
+ };
+ this.getWidth = function() {
+ return this.isVisible ? this.width : 0;
+ };
+ this.setHeight = function(height) {
+ this.element.style.height = height + "px";
+ };
+ this.setInnerHeight = function(height) {
+ this.inner.style.height = height + "px";
+ };
+ this.setScrollHeight = function(height) {
+ this.inner.style.height = height + "px";
+ };
+ this.setScrollTop = function(scrollTop) {
+ if (this.scrollTop != scrollTop) {
+ this.skipEvent = true;
+ this.scrollTop = this.element.scrollTop = scrollTop;
+ }
+ };
+
+}).call(VScrollBar.prototype);
+var HScrollBar = function(parent, renderer) {
+ ScrollBar.call(this, parent);
+ this.scrollLeft = 0;
+ this.height = renderer.$scrollbarWidth;
+ this.inner.style.height =
+ this.element.style.height = (this.height || 15) + 5 + "px";
+};
+
+oop.inherits(HScrollBar, ScrollBar);
+
+(function() {
+
+ this.classSuffix = '-h';
+ this.onScroll = function() {
+ if (!this.skipEvent) {
+ this.scrollLeft = this.element.scrollLeft;
+ this._emit("scroll", {data: this.scrollLeft});
+ }
+ this.skipEvent = false;
+ };
+ this.getHeight = function() {
+ return this.isVisible ? this.height : 0;
+ };
+ this.setWidth = function(width) {
+ this.element.style.width = width + "px";
+ };
+ this.setInnerWidth = function(width) {
+ this.inner.style.width = width + "px";
+ };
+ this.setScrollWidth = function(width) {
+ this.inner.style.width = width + "px";
+ };
+ this.setScrollLeft = function(scrollLeft) {
+ if (this.scrollLeft != scrollLeft) {
+ this.skipEvent = true;
+ this.scrollLeft = this.element.scrollLeft = scrollLeft;
+ }
+ };
+
+}).call(HScrollBar.prototype);
+
+
+exports.ScrollBar = VScrollBar; // backward compatibility
+exports.ScrollBarV = VScrollBar; // backward compatibility
+exports.ScrollBarH = HScrollBar; // backward compatibility
+
+exports.VScrollBar = VScrollBar;
+exports.HScrollBar = HScrollBar;
+});
+
+ace.define("ace/renderloop",["require","exports","module","ace/lib/event"], function(require, exports, module) {
+"use strict";
+
+var event = require("./lib/event");
+
+
+var RenderLoop = function(onRender, win) {
+ this.onRender = onRender;
+ this.pending = false;
+ this.changes = 0;
+ this.window = win || window;
+};
+
+(function() {
+
+
+ this.schedule = function(change) {
+ this.changes = this.changes | change;
+ if (!this.pending && this.changes) {
+ this.pending = true;
+ var _self = this;
+ event.nextFrame(function() {
+ _self.pending = false;
+ var changes;
+ while (changes = _self.changes) {
+ _self.changes = 0;
+ _self.onRender(changes);
+ }
+ }, this.window);
+ }
+ };
+
+}).call(RenderLoop.prototype);
+
+exports.RenderLoop = RenderLoop;
+});
+
+ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var useragent = require("../lib/useragent");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var CHAR_COUNT = 0;
+
+var FontMetrics = exports.FontMetrics = function(parentEl, interval) {
+ this.el = dom.createElement("div");
+ this.$setMeasureNodeStyles(this.el.style, true);
+
+ this.$main = dom.createElement("div");
+ this.$setMeasureNodeStyles(this.$main.style);
+
+ this.$measureNode = dom.createElement("div");
+ this.$setMeasureNodeStyles(this.$measureNode.style);
+
+
+ this.el.appendChild(this.$main);
+ this.el.appendChild(this.$measureNode);
+ parentEl.appendChild(this.el);
+
+ if (!CHAR_COUNT)
+ this.$testFractionalRect();
+ this.$measureNode.innerHTML = lang.stringRepeat("X", CHAR_COUNT);
+
+ this.$characterSize = {width: 0, height: 0};
+ this.checkForSizeChanges();
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.$characterSize = {width: 0, height: 0};
+
+ this.$testFractionalRect = function() {
+ var el = dom.createElement("div");
+ this.$setMeasureNodeStyles(el.style);
+ el.style.width = "0.2px";
+ document.documentElement.appendChild(el);
+ var w = el.getBoundingClientRect().width;
+ if (w > 0 && w < 1)
+ CHAR_COUNT = 50;
+ else
+ CHAR_COUNT = 100;
+ el.parentNode.removeChild(el);
+ };
+
+ this.$setMeasureNodeStyles = function(style, isRoot) {
+ style.width = style.height = "auto";
+ style.left = style.top = "0px";
+ style.visibility = "hidden";
+ style.position = "absolute";
+ style.whiteSpace = "pre";
+
+ if (useragent.isIE < 8) {
+ style["font-family"] = "inherit";
+ } else {
+ style.font = "inherit";
+ }
+ style.overflow = isRoot ? "hidden" : "visible";
+ };
+
+ this.checkForSizeChanges = function() {
+ var size = this.$measureSizes();
+ if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {
+ this.$measureNode.style.fontWeight = "bold";
+ var boldSize = this.$measureSizes();
+ this.$measureNode.style.fontWeight = "";
+ this.$characterSize = size;
+ this.charSizes = Object.create(null);
+ this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;
+ this._emit("changeCharacterSize", {data: size});
+ }
+ };
+
+ this.$pollSizeChanges = function() {
+ if (this.$pollSizeChangesTimer)
+ return this.$pollSizeChangesTimer;
+ var self = this;
+ return this.$pollSizeChangesTimer = setInterval(function() {
+ self.checkForSizeChanges();
+ }, 500);
+ };
+
+ this.setPolling = function(val) {
+ if (val) {
+ this.$pollSizeChanges();
+ } else if (this.$pollSizeChangesTimer) {
+ clearInterval(this.$pollSizeChangesTimer);
+ this.$pollSizeChangesTimer = 0;
+ }
+ };
+
+ this.$measureSizes = function() {
+ if (CHAR_COUNT === 50) {
+ var rect = null;
+ try {
+ rect = this.$measureNode.getBoundingClientRect();
+ } catch(e) {
+ rect = {width: 0, height:0 };
+ };
+ var size = {
+ height: rect.height,
+ width: rect.width / CHAR_COUNT
+ };
+ } else {
+ var size = {
+ height: this.$measureNode.clientHeight,
+ width: this.$measureNode.clientWidth / CHAR_COUNT
+ };
+ }
+ if (size.width === 0 || size.height === 0)
+ return null;
+ return size;
+ };
+
+ this.$measureCharWidth = function(ch) {
+ this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT);
+ var rect = this.$main.getBoundingClientRect();
+ return rect.width / CHAR_COUNT;
+ };
+
+ this.getCharacterWidth = function(ch) {
+ var w = this.charSizes[ch];
+ if (w === undefined) {
+ this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;
+ }
+ return w;
+ };
+
+ this.destroy = function() {
+ clearInterval(this.$pollSizeChangesTimer);
+ if (this.el && this.el.parentNode)
+ this.el.parentNode.removeChild(this.el);
+ };
+
+}).call(FontMetrics.prototype);
+
+});
+
+ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
var oop = require("./lib/oop");
var dom = require("./lib/dom");
-var useragent = require("./lib/useragent");
var config = require("./config");
+var useragent = require("./lib/useragent");
var GutterLayer = require("./layer/gutter").Gutter;
var MarkerLayer = require("./layer/marker").Marker;
var TextLayer = require("./layer/text").Text;
var CursorLayer = require("./layer/cursor").Cursor;
-var ScrollBarH = require("./scrollbar").ScrollBarH;
-var ScrollBarV = require("./scrollbar").ScrollBarV;
+var HScrollBar = require("./scrollbar").HScrollBar;
+var VScrollBar = require("./scrollbar").VScrollBar;
var RenderLoop = require("./renderloop").RenderLoop;
+var FontMetrics = require("./layer/font_metrics").FontMetrics;
var EventEmitter = require("./lib/event_emitter").EventEmitter;
var editorCss = ".ace_editor {\
position: relative;\
overflow: hidden;\
-font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\
-font-size: 12px;\
-line-height: normal;\
-color: black;\
+font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\
+direction: ltr;\
}\
.ace_scroller {\
position: absolute;\
@@ -11775,13 +14564,34 @@ overflow: hidden;\
top: 0;\
bottom: 0;\
background-color: inherit;\
+-ms-user-select: none;\
+-moz-user-select: none;\
+-webkit-user-select: none;\
+user-select: none;\
+cursor: text;\
}\
.ace_content {\
position: absolute;\
-moz-box-sizing: border-box;\
-webkit-box-sizing: border-box;\
box-sizing: border-box;\
-cursor: text;\
+min-width: 100%;\
+}\
+.ace_dragging .ace_scroller:before{\
+position: absolute;\
+top: 0;\
+left: 0;\
+right: 0;\
+bottom: 0;\
+content: '';\
+background: rgba(250, 250, 250, 0.01);\
+z-index: 1000;\
+}\
+.ace_dragging.ace_dark .ace_scroller:before{\
+background: rgba(0, 0, 0, 0.01);\
+}\
+.ace_selecting, .ace_selecting * {\
+cursor: text !important;\
}\
.ace_gutter {\
position: absolute;\
@@ -11792,6 +14602,10 @@ bottom: 0;\
left: 0;\
cursor: default;\
z-index: 4;\
+-ms-user-select: none;\
+-moz-user-select: none;\
+-webkit-user-select: none;\
+user-select: none;\
}\
.ace_gutter-active-line {\
position: absolute;\
@@ -11807,45 +14621,41 @@ padding-right: 6px;\
background-repeat: no-repeat;\
}\
.ace_gutter-cell.ace_error {\
-background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTQ4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTU4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBMjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBMzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkgXxbAAAAJbSURBVHjapFNNaBNBFH4zs5vdZLP5sQmNpT82QY209heh1ioWisaDRcSKF0WKJ0GQnrzrxasHsR6EnlrwD0TagxJabaVEpFYxLWlLSS822tr87m66ccfd2GKyVhA6MMybgfe97/vmPUQphd0sZjto9XIn9OOsvlu2nkqRzVU+6vvlzPf8W6bk8dxQ0NPbxAALgCgg2JkaQuhzQau/El0zbmUA7U0Es8v2CiYmKQJHGO1QICCLoqilMhkmurDAyapKgqItezi/USRdJqEYY4D5jCy03ht2yMkkvL91jTTX10qzyyu2hruPRN7jgbH+EOsXcMLgYiThEgAMhABW85oqy1DXdRIdvP1AHJ2acQXvDIrVHcdQNrEKNYSVMSZGMjEzIIAwDXIo+6G/FxcGnzkC3T2oMhLjre49sBB+RRcHLqdafK6sYdE/GGBwU1VpFNj0aN8pJbe+BkZyevUrvLl6Xmm0W9IuTc0DxrDNAJd5oEvI/KRsNC3bQyNjPO9yQ1YHcfj2QvfQc/5TUhJTBc2iM0U7AWDQtc1nJHvD/cfO2s7jaGkiTEfa/Ep8coLu7zmNmh8+dc5lZDuUeFAGUNA/OY6JVaypQ0vjr7XYjUvJM37vt+j1vuTK5DgVfVUoTjVe+y3/LxMxY2GgU+CSLy4cpfsYorRXuXIOi0Vt40h67uZFTdIo6nLaZcwUJWAzwNS0tBnqqKzQDnjdG/iPyZxo46HaKUpbvYkj8qYRTZsBhge+JHhZyh0x9b95JqjVJkT084kZIPwu/mPWqPgfQ5jXh2+92Ay7HedfAgwA6KDWafb4w3cAAAAASUVORK5CYII=\");\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==\");\
background-repeat: no-repeat;\
background-position: 2px center;\
}\
.ace_gutter-cell.ace_warning {\
-background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTg4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTk4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBNjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBNzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pgd7PfIAAAGmSURBVHjaYvr//z8DJZiJgUIANoCRkREb9gLiSVAaQx4OQM7AAkwd7XU2/v++/rOttdYGEB9dASEvOMydGKfH8Gv/p4XTkvRBfLxeQAP+1cUhXopyvzhP7P/IoSj7g7Mw09cNKO6J1QQ0L4gICPIv/veg/8W+JdFvQNLHVsW9/nmn9zk7B+cCkDwhL7gt6knSZnx9/LuCEOcvkIAMP+cvto9nfqyZmmUAksfnBUtbM60gX/3/kgyv3/xSFOL5DZT+L8vP+Yfh5cvfPvp/xUHyQHXGyAYwgpwBjZYFT3Y1OEl/OfCH4ffv3wzc4iwMvNIsDJ+f/mH4+vIPAxsb631WW0Yln6ZpQLXdMK/DXGDflh+sIv37EivD5x//Gb7+YWT4y86sl7BCCkSD+Z++/1dkvsFRl+HnD1Rvje4F8whjMXmGj58YGf5zsDMwcnAwfPvKcml62DsQDeaDxN+/Y0qwlpEHqrdB94IRNIDUgfgfKJChGK4OikEW3gTiXUB950ASLFAF54AC94A0G9QAfOnmF9DCDzABFqS08IHYDIScdijOjQABBgC+/9awBH96jwAAAABJRU5ErkJggg==\");\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==\");\
background-position: 2px center;\
}\
.ace_gutter-cell.ace_info {\
-background-image: url(\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\");\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\");\
background-position: 2px center;\
}\
.ace_dark .ace_gutter-cell.ace_info {\
-background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGRTk5MTVGREIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGRTk5MTVGRUIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZFOTkxNUZCQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFOTkxNUZDQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+SIDkjAAAAJ1JREFUeNpi/P//PwMlgImBQkB7A6qrq/+DMC55FkIGKCoq4pVnpFkgTp069f/+/fv/r1u37r+tre1/kg0A+ptn9uzZYLaRkRHpLvjw4cNXWVlZhufPnzOcO3eOdAO0tbVPAjHDmzdvGA4fPsxIsgGSkpJmv379Ynj37h2DjIyMCMkG3LhxQ/T27dsMampqDHZ2dq/pH41DxwCAAAMAFdc68dUsFZgAAAAASUVORK5CYII=\");\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\");\
}\
.ace_scrollbar {\
position: absolute;\
-overflow: hidden;\
-overflow-y: auto;\
right: 0;\
-top: 0;\
bottom: 0;\
+z-index: 6;\
}\
.ace_scrollbar-inner {\
position: absolute;\
-width: 1px;\
+cursor: text;\
left: 0;\
+top: 0;\
+}\
+.ace_scrollbar-v{\
+overflow-x: hidden;\
+overflow-y: scroll;\
+top: 0;\
}\
.ace_scrollbar-h {\
-position: absolute;\
-overflow-x: auto;\
+overflow-x: scroll;\
overflow-y: hidden;\
-right: 0;\
-left: 0;\
-bottom: 0;\
-}\
-.ace_scrollbar-inner {\
-position: absolute;\
-height: 1px;\
left: 0;\
}\
.ace_print-margin {\
@@ -11868,25 +14678,30 @@ overflow: hidden;\
font: inherit;\
padding: 0 1px;\
margin: 0 -1px;\
+text-indent: -1em;\
+-ms-user-select: text;\
+-moz-user-select: text;\
+-webkit-user-select: text;\
+user-select: text;\
}\
.ace_text-input.ace_composition {\
-background: #f8f8f8;\
-color: #111;\
+background: inherit;\
+color: inherit;\
z-index: 1000;\
opacity: 1;\
+text-indent: 0;\
}\
.ace_layer {\
z-index: 1;\
position: absolute;\
overflow: hidden;\
-white-space: nowrap;\
+word-wrap: normal;\
+white-space: pre;\
height: 100%;\
width: 100%;\
-moz-box-sizing: border-box;\
-webkit-box-sizing: border-box;\
box-sizing: border-box;\
-/* setting pointer-events: auto; on node under the mouse, which changes\
-during scroll, will break mouse wheel scrolling in Safari */\
pointer-events: none;\
}\
.ace_gutter-layer {\
@@ -11911,26 +14726,25 @@ position: absolute;\
-moz-box-sizing: border-box;\
-webkit-box-sizing: border-box;\
box-sizing: border-box;\
+border-left: 2px solid\
+}\
+.ace_slim-cursors .ace_cursor {\
+border-left-width: 1px;\
+}\
+.ace_overwrite-cursors .ace_cursor {\
+border-left-width: 0;\
+border-bottom: 1px solid;\
}\
.ace_hidden-cursors .ace_cursor {\
opacity: 0.2;\
}\
.ace_smooth-blinking .ace_cursor {\
--moz-transition: opacity 0.18s;\
-webkit-transition: opacity 0.18s;\
--o-transition: opacity 0.18s;\
--ms-transition: opacity 0.18s;\
transition: opacity 0.18s;\
}\
-.ace_cursor[style*=\"opacity: 0\"]{\
--ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\
-}\
.ace_editor.ace_multiselect .ace_cursor {\
border-left-width: 1px;\
}\
-.ace_line {\
-white-space: nowrap;\
-}\
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\
position: absolute;\
z-index: 3;\
@@ -11963,14 +14777,12 @@ height: 11px;\
margin-top: -2px;\
vertical-align: middle;\
background-image:\
-url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),\
-url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\");\
+url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\
+url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\");\
background-repeat: no-repeat, repeat-x;\
background-position: center center, top left;\
color: transparent;\
border: 1px solid black;\
--moz-border-radius: 2px;\
--webkit-border-radius: 2px;\
border-radius: 2px;\
cursor: pointer;\
pointer-events: auto;\
@@ -11979,15 +14791,10 @@ pointer-events: auto;\
}\
.ace_fold:hover{\
background-image:\
-url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),\
-url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\");\
-background-repeat: no-repeat, repeat-x;\
-background-position: center center, top left;\
+url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\
+url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\");\
}\
-.ace_editor.ace_dragging .ace_content {\
-cursor: move;\
-}\
-.ace_gutter-tooltip {\
+.ace_tooltip {\
background-color: #FFF;\
background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\
background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\
@@ -11995,21 +14802,21 @@ border: 1px solid gray;\
border-radius: 1px;\
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\
color: black;\
-display: inline-block;\
-max-width: 500px;\
-padding: 4px;\
+max-width: 100%;\
+padding: 3px 4px;\
position: fixed;\
-z-index: 300;\
+z-index: 999999;\
-moz-box-sizing: border-box;\
-webkit-box-sizing: border-box;\
box-sizing: border-box;\
cursor: default;\
-white-space: pre-line;\
+white-space: pre;\
word-wrap: break-word;\
line-height: normal;\
font-style: normal;\
font-weight: normal;\
letter-spacing: normal;\
+pointer-events: none;\
}\
.ace_folding-enabled > .ace_gutter-cell {\
padding-right: 13px;\
@@ -12022,7 +14829,7 @@ margin: 0 -12px 0 1px;\
display: none;\
width: 11px;\
vertical-align: top;\
-background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\");\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\");\
background-repeat: no-repeat;\
background-position: center;\
border-radius: 3px;\
@@ -12033,28 +14840,21 @@ cursor: pointer;\
display: inline-block; \
}\
.ace_fold-widget.ace_end {\
-background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\");\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\");\
}\
.ace_fold-widget.ace_closed {\
-background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\");\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\");\
}\
.ace_fold-widget:hover {\
border: 1px solid rgba(0, 0, 0, 0.3);\
background-color: rgba(255, 255, 255, 0.2);\
--moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\
--webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\
}\
.ace_fold-widget:active {\
border: 1px solid rgba(0, 0, 0, 0.4);\
background-color: rgba(0, 0, 0, 0.05);\
--moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\
--webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\
}\
-/**\
-* Dark version for fold widgets\
-*/\
.ace_dark .ace_fold-widget {\
background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");\
}\
@@ -12069,8 +14869,6 @@ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\
background-color: rgba(255, 255, 255, 0.1);\
}\
.ace_dark .ace_fold-widget:active {\
--moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\
--webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\
}\
.ace_fold-widget.ace_invalid {\
@@ -12078,18 +14876,12 @@ background-color: #FFB4B4;\
border-color: #DE5555;\
}\
.ace_fade-fold-widgets .ace_fold-widget {\
--moz-transition: opacity 0.4s ease 0.05s;\
-webkit-transition: opacity 0.4s ease 0.05s;\
--o-transition: opacity 0.4s ease 0.05s;\
--ms-transition: opacity 0.4s ease 0.05s;\
transition: opacity 0.4s ease 0.05s;\
opacity: 0;\
}\
.ace_fade-fold-widgets:hover .ace_fold-widget {\
--moz-transition: opacity 0.05s ease 0.05s;\
-webkit-transition: opacity 0.05s ease 0.05s;\
--o-transition: opacity 0.05s ease 0.05s;\
--ms-transition: opacity 0.05s ease 0.05s;\
transition: opacity 0.05s ease 0.05s;\
opacity:1;\
}\
@@ -12117,13 +14909,13 @@ z-index: 8;\
}\
";
-dom.importCssString(editorCss, "ace_editor");
+dom.importCssString(editorCss, "ace_editor.css");
var VirtualRenderer = function(container, theme) {
var _self = this;
this.container = container || dom.createElement("div");
- this.$keepTextAreaAtCursor = !useragent.isIE;
+ this.$keepTextAreaAtCursor = !useragent.isOldIE;
dom.addCssClass(this.container, "ace_editor");
@@ -12156,8 +14948,8 @@ var VirtualRenderer = function(container, theme) {
this.$vScroll = false;
this.scrollBar =
- this.scrollBarV = new ScrollBarV(this.container, this);
- this.scrollBarH = new ScrollBarH(this.container, this);
+ this.scrollBarV = new VScrollBar(this.container, this);
+ this.scrollBarH = new HScrollBar(this.container, this);
this.scrollBarV.addEventListener("scroll", function(e) {
if (!_self.$scrollAnimation)
_self.session.setScrollTop(e.data - _self.scrollMargin.top);
@@ -12175,17 +14967,20 @@ var VirtualRenderer = function(container, theme) {
column : 0
};
- this.$textLayer.addEventListener("changeCharacterSize", function() {
+ this.$fontMetrics = new FontMetrics(this.container, 500);
+ this.$textLayer.$setFontMetrics(this.$fontMetrics);
+ this.$textLayer.addEventListener("changeCharacterSize", function(e) {
_self.updateCharacterSize();
- _self.onResize(true);
- _self._signal("changeCharacterSize");
+ _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);
+ _self._signal("changeCharacterSize", e);
});
this.$size = {
width: 0,
height: 0,
scrollerHeight: 0,
- scrollerWidth: 0
+ scrollerWidth: 0,
+ $dirty: true
};
this.layerConfig = {
@@ -12194,12 +14989,13 @@ var VirtualRenderer = function(container, theme) {
firstRow : 0,
firstRowScreen: 0,
lastRow : 0,
- lineHeight : 1,
- characterWidth : 1,
+ lineHeight : 0,
+ characterWidth : 0,
minHeight : 1,
maxHeight : 1,
offset : 0,
- height : 1
+ height : 1,
+ gutterOffset: 1
};
this.scrollMargin = {
@@ -12252,19 +15048,29 @@ var VirtualRenderer = function(container, theme) {
this.$updatePrintMargin();
};
this.setSession = function(session) {
+ if (this.session)
+ this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode);
+
this.session = session;
-
- this.scroller.className = "ace_scroller";
+ if (session && this.scrollMargin.top && session.getScrollTop() <= 0)
+ session.setScrollTop(-this.scrollMargin.top);
this.$cursorLayer.setSession(session);
this.$markerBack.setSession(session);
this.$markerFront.setSession(session);
this.$gutterLayer.setSession(session);
this.$textLayer.setSession(session);
+ if (!session)
+ return;
+
this.$loop.schedule(this.CHANGE_FULL);
-
+ this.session.$setFontMetrics(this.$fontMetrics);
+
+ this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);
+ this.onChangeNewLineMode()
+ this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode);
};
- this.updateLines = function(firstRow, lastRow) {
+ this.updateLines = function(firstRow, lastRow, force) {
if (lastRow === undefined)
lastRow = Infinity;
@@ -12281,13 +15087,22 @@ var VirtualRenderer = function(container, theme) {
if (this.$changedLines.lastRow < lastRow)
this.$changedLines.lastRow = lastRow;
}
-
- if (this.$changedLines.firstRow > this.layerConfig.lastRow ||
- this.$changedLines.lastRow < this.layerConfig.firstRow)
+ if (this.$changedLines.lastRow < this.layerConfig.firstRow) {
+ if (force)
+ this.$changedLines.lastRow = this.layerConfig.lastRow;
+ else
+ return;
+ }
+ if (this.$changedLines.firstRow > this.layerConfig.lastRow)
return;
this.$loop.schedule(this.CHANGE_LINES);
};
+ this.onChangeNewLineMode = function() {
+ this.$loop.schedule(this.CHANGE_TEXT);
+ this.$textLayer.$updateEolChar();
+ };
+
this.onChangeTabSize = function() {
this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);
this.$textLayer.onChangeTabSize();
@@ -12306,6 +15121,12 @@ var VirtualRenderer = function(container, theme) {
};
this.$changes = 0;
+ this.$updateSizeAsync = function() {
+ if (this.$loop.pending)
+ this.$size.$dirty = true;
+ else
+ this.onResize();
+ };
this.onResize = function(force, gutterWidth, width, height) {
if (this.resizing > 2)
return;
@@ -12318,8 +15139,8 @@ var VirtualRenderer = function(container, theme) {
height = el.clientHeight || el.scrollHeight;
if (!width)
width = el.clientWidth || el.scrollWidth;
-
var changes = this.$updateCachedSize(force, gutterWidth, width, height);
+
if (!this.$size.scrollerHeight || (!width && !height))
return this.resizing = 0;
@@ -12328,34 +15149,39 @@ var VirtualRenderer = function(container, theme) {
this.$gutterLayer.$padding = null;
if (force)
- this.$renderChanges(changes, true);
+ this.$renderChanges(changes | this.$changes, true);
else
- this.$loop.schedule(changes || this.$changes);
+ this.$loop.schedule(changes | this.$changes);
if (this.resizing)
this.resizing = 0;
+ this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null;
};
this.$updateCachedSize = function(force, gutterWidth, width, height) {
+ height -= (this.$extraHeight || 0);
var changes = 0;
var size = this.$size;
+ var oldSize = {
+ width: size.width,
+ height: size.height,
+ scrollerHeight: size.scrollerHeight,
+ scrollerWidth: size.scrollerWidth
+ };
if (height && (force || size.height != height)) {
size.height = height;
- changes = this.CHANGE_SIZE;
+ changes |= this.CHANGE_SIZE;
size.scrollerHeight = size.height;
if (this.$horizScroll)
size.scrollerHeight -= this.scrollBarH.getHeight();
this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + "px";
- if (this.session) {
- this.session.setScrollTop(this.getScrollTop());
- changes = changes | this.CHANGE_SCROLL;
- }
+ changes = changes | this.CHANGE_SCROLL;
}
if (width && (force || size.width != width)) {
- changes = this.CHANGE_SIZE;
+ changes |= this.CHANGE_SIZE;
size.width = width;
if (gutterWidth == null)
@@ -12372,11 +15198,13 @@ var VirtualRenderer = function(container, theme) {
this.scroller.style.bottom = this.scrollBarH.getHeight() + "px";
if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force)
- changes = changes | this.CHANGE_FULL;
+ changes |= this.CHANGE_FULL;
}
+ size.$dirty = !width || !height;
+
if (changes)
- this._signal("resize");
+ this._signal("resize", oldSize);
return changes;
};
@@ -12384,11 +15212,13 @@ var VirtualRenderer = function(container, theme) {
this.onGutterResize = function() {
var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;
if (gutterWidth != this.gutterWidth)
- this.$changes != this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);
+ this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);
- if (this.session.getUseWrapMode() && this.adjustWrapLimit())
+ if (this.session.getUseWrapMode() && this.adjustWrapLimit()) {
this.$loop.schedule(this.CHANGE_FULL);
- else {
+ } else if (this.$size.$dirty) {
+ this.$loop.schedule(this.CHANGE_FULL);
+ } else {
this.$computeLayerConfig();
this.$loop.schedule(this.CHANGE_MARKER);
}
@@ -12502,27 +15332,28 @@ var VirtualRenderer = function(container, theme) {
var posLeft = this.$cursorLayer.$pixelPos.left;
posTop -= config.offset;
+ var style = this.textarea.style;
var h = this.lineHeight;
- if (posTop < 0 || posTop > config.height - h)
+ if (posTop < 0 || posTop > config.height - h) {
+ style.top = style.left = "0";
return;
+ }
var w = this.characterWidth;
if (this.$composition) {
var val = this.textarea.value.replace(/^\x01+/, "");
w *= (this.session.$getStringScreenWidth(val)[0]+2);
h += 2;
- posTop -= 1;
}
posLeft -= this.scrollLeft;
if (posLeft > this.$size.scrollerWidth - w)
posLeft = this.$size.scrollerWidth - w;
- posLeft -= this.scrollBar.width;
-
- this.textarea.style.height = h + "px";
- this.textarea.style.width = w + "px";
- this.textarea.style.right = Math.max(0, this.$size.scrollerWidth - posLeft - w) + "px";
- this.textarea.style.bottom = Math.max(0, this.$size.height - posTop - h) + "px";
+ posLeft += this.gutterWidth;
+ style.height = h + "px";
+ style.width = w + "px";
+ style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + "px";
+ style.top = Math.min(posTop, this.$size.height - h) + "px";
};
this.getFirstVisibleRow = function() {
return this.layerConfig.firstRow;
@@ -12557,6 +15388,8 @@ var VirtualRenderer = function(container, theme) {
sm.left = left|0;
sm.v = sm.top + sm.bottom;
sm.h = sm.left + sm.right;
+ if (sm.top && this.scrollTop <= 0 && this.session)
+ this.session.setScrollTop(-sm.top);
this.updateFull();
};
this.getHScrollBarAlwaysVisible = function() {
@@ -12566,74 +15399,110 @@ var VirtualRenderer = function(container, theme) {
this.setOption("hScrollBarAlwaysVisible", alwaysVisible);
};
this.getVScrollBarAlwaysVisible = function() {
- return this.$hScrollBarAlwaysVisible;
+ return this.$vScrollBarAlwaysVisible;
};
this.setVScrollBarAlwaysVisible = function(alwaysVisible) {
this.setOption("vScrollBarAlwaysVisible", alwaysVisible);
};
this.$updateScrollBarV = function() {
- this.scrollBarV.setInnerHeight(this.layerConfig.maxHeight + this.scrollMargin.v);
+ var scrollHeight = this.layerConfig.maxHeight;
+ var scrollerHeight = this.$size.scrollerHeight;
+ if (!this.$maxLines && this.$scrollPastEnd) {
+ scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd;
+ if (this.scrollTop > scrollHeight - scrollerHeight) {
+ scrollHeight = this.scrollTop + scrollerHeight;
+ this.scrollBarV.scrollTop = null;
+ }
+ }
+ this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v);
this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top);
};
this.$updateScrollBarH = function() {
- this.scrollBarH.setInnerWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h);
+ this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h);
this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left);
};
+
+ this.$frozen = false;
+ this.freeze = function() {
+ this.$frozen = true;
+ };
+
+ this.unfreeze = function() {
+ this.$frozen = false;
+ };
this.$renderChanges = function(changes, force) {
if (this.$changes) {
changes |= this.$changes;
this.$changes = 0;
}
- if ((!this.session || !this.container.offsetWidth) || (!changes && !force)) {
+ if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) {
this.$changes |= changes;
return;
}
- if (!this.$size.width)
+ if (this.$size.$dirty) {
+ this.$changes |= changes;
return this.onResize(true);
+ }
+ if (!this.lineHeight) {
+ this.$textLayer.checkForSizeChanges();
+ }
this._signal("beforeRender");
+ var config = this.layerConfig;
if (changes & this.CHANGE_FULL ||
changes & this.CHANGE_SIZE ||
changes & this.CHANGE_TEXT ||
changes & this.CHANGE_LINES ||
changes & this.CHANGE_SCROLL ||
changes & this.CHANGE_H_SCROLL
- )
+ ) {
changes |= this.$computeLayerConfig();
+ if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) {
+ var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight;
+ if (st > 0) {
+ this.scrollTop = st;
+ changes = changes | this.CHANGE_SCROLL;
+ changes |= this.$computeLayerConfig();
+ }
+ }
+ config = this.layerConfig;
+ this.$updateScrollBarV();
+ if (changes & this.CHANGE_H_SCROLL)
+ this.$updateScrollBarH();
+ this.$gutterLayer.element.style.marginTop = (-config.offset) + "px";
+ this.content.style.marginTop = (-config.offset) + "px";
+ this.content.style.width = config.width + 2 * this.$padding + "px";
+ this.content.style.height = config.minHeight + "px";
+ }
if (changes & this.CHANGE_H_SCROLL) {
- this.$updateScrollBarH();
this.content.style.marginLeft = -this.scrollLeft + "px";
this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left";
}
if (changes & this.CHANGE_FULL) {
- this.$textLayer.checkForSizeChanges();
- this.$updateScrollBarV();
- this.$updateScrollBarH();
- this.$textLayer.update(this.layerConfig);
+ this.$textLayer.update(config);
if (this.$showGutter)
- this.$gutterLayer.update(this.layerConfig);
- this.$markerBack.update(this.layerConfig);
- this.$markerFront.update(this.layerConfig);
- this.$cursorLayer.update(this.layerConfig);
+ this.$gutterLayer.update(config);
+ this.$markerBack.update(config);
+ this.$markerFront.update(config);
+ this.$cursorLayer.update(config);
this.$moveTextAreaToCursor();
this.$highlightGutterLine && this.$updateGutterLineHighlight();
this._signal("afterRender");
return;
}
if (changes & this.CHANGE_SCROLL) {
- this.$updateScrollBarV();
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
- this.$textLayer.update(this.layerConfig);
+ this.$textLayer.update(config);
else
- this.$textLayer.scrollLines(this.layerConfig);
+ this.$textLayer.scrollLines(config);
if (this.$showGutter)
- this.$gutterLayer.update(this.layerConfig);
- this.$markerBack.update(this.layerConfig);
- this.$markerFront.update(this.layerConfig);
- this.$cursorLayer.update(this.layerConfig);
+ this.$gutterLayer.update(config);
+ this.$markerBack.update(config);
+ this.$markerFront.update(config);
+ this.$cursorLayer.update(config);
this.$highlightGutterLine && this.$updateGutterLineHighlight();
this.$moveTextAreaToCursor();
this._signal("afterRender");
@@ -12641,49 +15510,44 @@ var VirtualRenderer = function(container, theme) {
}
if (changes & this.CHANGE_TEXT) {
- this.$textLayer.update(this.layerConfig);
+ this.$textLayer.update(config);
if (this.$showGutter)
- this.$gutterLayer.update(this.layerConfig);
+ this.$gutterLayer.update(config);
}
else if (changes & this.CHANGE_LINES) {
if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter)
- this.$gutterLayer.update(this.layerConfig);
+ this.$gutterLayer.update(config);
}
else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {
if (this.$showGutter)
- this.$gutterLayer.update(this.layerConfig);
+ this.$gutterLayer.update(config);
}
if (changes & this.CHANGE_CURSOR) {
- this.$cursorLayer.update(this.layerConfig);
+ this.$cursorLayer.update(config);
this.$moveTextAreaToCursor();
this.$highlightGutterLine && this.$updateGutterLineHighlight();
}
if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {
- this.$markerFront.update(this.layerConfig);
+ this.$markerFront.update(config);
}
if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {
- this.$markerBack.update(this.layerConfig);
- }
-
- if (changes & this.CHANGE_SIZE || changes & this.CHANGE_LINES) {
- this.$updateScrollBarV();
- this.$updateScrollBarH();
+ this.$markerBack.update(config);
}
this._signal("afterRender");
};
- this.$autosize = function(height, width) {
+ this.$autosize = function() {
var height = this.session.getScreenLength() * this.lineHeight;
var maxHeight = this.$maxLines * this.lineHeight;
var desiredHeight = Math.max(
(this.$minLines||1) * this.lineHeight,
Math.min(maxHeight, height)
- );
+ ) + this.scrollMargin.v + (this.$extraHeight || 0);
var vScroll = height > maxHeight;
if (desiredHeight != this.desiredHeight ||
@@ -12697,6 +15561,8 @@ var VirtualRenderer = function(container, theme) {
this.container.style.height = desiredHeight + "px";
this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight);
this.desiredHeight = desiredHeight;
+
+ this._signal("autosize");
}
};
@@ -12705,18 +15571,19 @@ var VirtualRenderer = function(container, theme) {
this.$autosize();
var session = this.session;
+ var size = this.$size;
- var hideScrollbars = this.$size.height <= 2 * this.lineHeight;
- var screenLines = this.session.getScreenLength()
+ var hideScrollbars = size.height <= 2 * this.lineHeight;
+ var screenLines = this.session.getScreenLength();
var maxHeight = screenLines * this.lineHeight;
var offset = this.scrollTop % this.lineHeight;
- var minHeight = this.$size.scrollerHeight + this.lineHeight;
+ var minHeight = size.scrollerHeight + this.lineHeight;
var longestLine = this.$getLongestLine();
var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible ||
- this.$size.scrollerWidth - longestLine - 2 * this.$padding < 0);
+ size.scrollerWidth - longestLine - 2 * this.$padding < 0);
var hScrollChanged = this.$horizScroll !== horizScroll;
if (hScrollChanged) {
@@ -12724,27 +15591,24 @@ var VirtualRenderer = function(container, theme) {
this.scrollBarH.setVisible(horizScroll);
}
- if (!this.$maxLines && this.$scrollPastEnd) {
- if (this.scrollTop > maxHeight - this.$size.scrollerHeight)
- maxHeight += Math.min(
- (this.$size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd,
- this.scrollTop - maxHeight + this.$size.scrollerHeight
- );
- }
+ var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd
+ ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd
+ : 0;
+ maxHeight += scrollPastEnd;
+
+ this.session.setScrollTop(Math.max(-this.scrollMargin.top,
+ Math.min(this.scrollTop, maxHeight - size.scrollerHeight + this.scrollMargin.bottom)));
+
+ this.session.setScrollLeft(Math.max(-this.scrollMargin.left, Math.min(this.scrollLeft,
+ longestLine + 2 * this.$padding - size.scrollerWidth + this.scrollMargin.right)));
var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||
- this.$size.scrollerHeight - maxHeight < 0);
+ size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop);
var vScrollChanged = this.$vScroll !== vScroll;
if (vScrollChanged) {
this.$vScroll = vScroll;
this.scrollBarV.setVisible(vScroll);
}
-
- this.session.setScrollTop(Math.max(-this.scrollMargin.top,
- Math.min(this.scrollTop, maxHeight - this.$size.scrollerHeight + this.scrollMargin.v)));
-
- this.session.setScrollLeft(Math.max(-this.scrollMargin.left, Math.min(this.scrollLeft,
- longestLine + 2 * this.$padding - this.$size.scrollerWidth + this.scrollMargin.h)));
var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;
var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));
@@ -12761,14 +15625,16 @@ var VirtualRenderer = function(container, theme) {
firstRowHeight = session.getRowLength(firstRow) * lineHeight;
lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);
- minHeight = this.$size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +
+ minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +
firstRowHeight;
offset = this.scrollTop - firstRowScreen * lineHeight;
var changes = 0;
+ if (this.layerConfig.width != longestLine)
+ changes = this.CHANGE_H_SCROLL;
if (hScrollChanged || vScrollChanged) {
- changes = this.$updateCachedSize(true, this.gutterWidth, this.$size.width, this.$size.height);
+ changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height);
this._signal("scrollbarVisibilityChanged");
if (vScrollChanged)
longestLine = this.$getLongestLine();
@@ -12785,14 +15651,10 @@ var VirtualRenderer = function(container, theme) {
minHeight : minHeight,
maxHeight : maxHeight,
offset : offset,
+ gutterOffset : Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)),
height : this.$size.scrollerHeight
};
- this.$gutterLayer.element.style.marginTop = (-offset) + "px";
- this.content.style.marginTop = (-offset) + "px";
- this.content.style.width = longestLine + 2 * this.$padding + "px";
- this.content.style.height = minHeight + "px";
-
return changes;
};
@@ -12817,7 +15679,7 @@ var VirtualRenderer = function(container, theme) {
this.$getLongestLine = function() {
var charCount = this.session.getScreenWidth();
- if (this.$textLayer.showInvisibles)
+ if (this.showInvisibles && !this.session.$useWrapMode)
charCount += 1;
return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));
@@ -12857,7 +15719,7 @@ var VirtualRenderer = function(container, theme) {
this.scrollCursorIntoView(anchor, offset);
this.scrollCursorIntoView(lead, offset);
};
- this.scrollCursorIntoView = function(cursor, offset) {
+ this.scrollCursorIntoView = function(cursor, offset, $viewMargin) {
if (this.$size.scrollerHeight === 0)
return;
@@ -12866,17 +15728,18 @@ var VirtualRenderer = function(container, theme) {
var left = pos.left;
var top = pos.top;
+ var topMargin = $viewMargin && $viewMargin.top || 0;
+ var bottomMargin = $viewMargin && $viewMargin.bottom || 0;
+
var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;
-
- if (scrollTop > top) {
+
+ if (scrollTop + topMargin > top) {
if (offset)
top -= offset * this.$size.scrollerHeight;
- if (top == 0)
- top = - this.scrollMargin.top;
- else if (top == 0)
- top = + this.scrollMargin.bottom;
+ if (top === 0)
+ top = -this.scrollMargin.top;
this.session.setScrollTop(top);
- } else if (scrollTop + this.$size.scrollerHeight < top + this.lineHeight) {
+ } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) {
if (offset)
top += offset * this.$size.scrollerHeight;
this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight);
@@ -12973,6 +15836,7 @@ var VirtualRenderer = function(container, theme) {
clearInterval(this.$timer);
_self.session.setScrollTop(steps.shift());
+ _self.session.$scrollTop = toValue;
this.$timer = setInterval(function() {
if (steps.length) {
_self.session.setScrollTop(steps.shift());
@@ -12999,6 +15863,10 @@ var VirtualRenderer = function(container, theme) {
this.scrollLeft = scrollLeft;
this.$loop.schedule(this.CHANGE_H_SCROLL);
};
+ this.scrollTo = function(x, y) {
+ this.session.setScrollTop(y);
+ this.session.setScrollLeft(y);
+ };
this.scrollBy = function(deltaX, deltaY) {
deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);
deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);
@@ -13007,10 +15875,12 @@ var VirtualRenderer = function(container, theme) {
if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top)
return true;
if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight
- - this.layerConfig.maxHeight - (this.$size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd
- < -1 + this.scrollMargin.bottom)
+ - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom)
return true;
- if (deltaX)
+ if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)
+ return true;
+ if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth
+ - this.layerConfig.width < -1 + this.scrollMargin.right)
return true;
};
@@ -13030,9 +15900,8 @@ var VirtualRenderer = function(container, theme) {
var col = Math.round(
(x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth
);
- var row = Math.floor(
- (y + this.scrollTop - canvasPos.top) / this.lineHeight
- );
+
+ var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight;
return this.session.screenToDocumentPosition(row, Math.max(col, 0));
};
@@ -13080,18 +15949,18 @@ var VirtualRenderer = function(container, theme) {
};
this.setTheme = function(theme, cb) {
var _self = this;
- this.$themeValue = theme;
+ this.$themeId = theme;
_self._dispatchEvent('themeChange',{theme:theme});
if (!theme || typeof theme == "string") {
- var moduleName = theme || "ace/theme/textmate";
+ var moduleName = theme || this.$options.theme.initialValue;
config.loadModule(["theme", moduleName], afterLoad);
} else {
afterLoad(theme);
}
function afterLoad(module) {
- if (_self.$themeValue != theme)
+ if (_self.$themeId != theme)
return cb && cb();
if (!module.cssClass)
return;
@@ -13103,18 +15972,19 @@ var VirtualRenderer = function(container, theme) {
if (_self.theme)
dom.removeCssClass(_self.container, _self.theme.cssClass);
+
+ var padding = "padding" in module ? module.padding
+ : "padding" in (_self.theme || {}) ? 4 : _self.$padding;
+ if (_self.$padding && padding != _self.$padding)
+ _self.setPadding(padding);
_self.$theme = module.cssClass;
_self.theme = module;
dom.addCssClass(_self.container, module.cssClass);
dom.setCssClass(_self.container, "ace_dark", module.isDark);
-
- var padding = module.padding || 4;
- if (_self.$padding && padding != _self.$padding)
- _self.setPadding(padding);
if (_self.$size) {
_self.$size.width = 0;
- _self.onResize();
+ _self.$updateSizeAsync();
}
_self._dispatchEvent('themeLoaded', {theme:module});
@@ -13122,14 +15992,22 @@ var VirtualRenderer = function(container, theme) {
}
};
this.getTheme = function() {
- return this.$themeValue;
+ return this.$themeId;
};
- this.setStyle = function setStyle(style, include) {
- dom.setCssClass(this.container, style, include != false);
+ this.setStyle = function(style, include) {
+ dom.setCssClass(this.container, style, include !== false);
};
- this.unsetStyle = function unsetStyle(style) {
+ this.unsetStyle = function(style) {
dom.removeCssClass(this.container, style);
};
+
+ this.setCursorStyle = function(style) {
+ if (this.scroller.style.cursor != style)
+ this.scroller.style.cursor = style;
+ };
+ this.setMouseCursor = function(cursorStyle) {
+ this.scroller.style.cursor = cursorStyle;
+ };
this.destroy = function() {
this.$textLayer.destroy();
this.$cursorLayer.destroy();
@@ -13169,6 +16047,7 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", {
showGutter: {
set: function(show){
this.$gutter.style.display = show ? "block" : "none";
+ this.$loop.schedule(this.CHANGE_FULL);
this.onGutterResize();
},
initialValue: true
@@ -13183,6 +16062,13 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", {
set: function(show) {this.$gutterLayer.setShowFoldWidgets(show)},
initialValue: true
},
+ showLineNumbers: {
+ set: function(show) {
+ this.$gutterLayer.setShowLineNumbers(show);
+ this.$loop.schedule(this.CHANGE_GUTTER);
+ },
+ initialValue: true
+ },
displayIndentGuides: {
set: function(show) {
if (this.$textLayer.setDisplayIndentGuides(show))
@@ -13255,1321 +16141,683 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", {
},
initialValue: 0,
handlesSet: true
+ },
+ fixedWidthGutter: {
+ set: function(val) {
+ this.$gutterLayer.$fixedWidth = !!val;
+ this.$loop.schedule(this.CHANGE_GUTTER);
+ }
+ },
+ theme: {
+ set: function(val) { this.setTheme(val) },
+ get: function() { return this.$themeId || this.theme; },
+ initialValue: "./theme/textmate",
+ handlesSet: true
}
});
exports.VirtualRenderer = VirtualRenderer;
});
-ace.define('ace/layer/gutter', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/event_emitter'], function(require, exports, module) {
-
+ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"], function(require, exports, module) {
+"use strict";
-var dom = require("../lib/dom");
var oop = require("../lib/oop");
-var lang = require("../lib/lang");
+var net = require("../lib/net");
var EventEmitter = require("../lib/event_emitter").EventEmitter;
+var config = require("../config");
-var Gutter = function(parentEl) {
- this.element = dom.createElement("div");
- this.element.className = "ace_layer ace_gutter-layer";
- parentEl.appendChild(this.element);
- this.setShowFoldWidgets(this.$showFoldWidgets);
+var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) {
+ this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);
+ this.changeListener = this.changeListener.bind(this);
+ this.onMessage = this.onMessage.bind(this);
+ if (require.nameToUrl && !require.toUrl)
+ require.toUrl = require.nameToUrl;
- this.gutterWidth = 0;
-
- this.$annotations = [];
- this.$updateAnnotations = this.$updateAnnotations.bind(this);
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
-
- this.setSession = function(session) {
- if (this.session)
- this.session.removeEventListener("change", this.$updateAnnotations);
- this.session = session;
- session.on("change", this.$updateAnnotations);
- };
-
- this.addGutterDecoration = function(row, className){
- if (window.console)
- console.warn && console.warn("deprecated use session.addGutterDecoration");
- this.session.addGutterDecoration(row, className);
- };
-
- this.removeGutterDecoration = function(row, className){
- if (window.console)
- console.warn && console.warn("deprecated use session.removeGutterDecoration");
- this.session.removeGutterDecoration(row, className);
- };
-
- this.setAnnotations = function(annotations) {
- this.$annotations = []
- var rowInfo, row;
- for (var i = 0; i < annotations.length; i++) {
- var annotation = annotations[i];
- var row = annotation.row;
- var rowInfo = this.$annotations[row];
- if (!rowInfo)
- rowInfo = this.$annotations[row] = {text: []};
-
- var annoText = annotation.text;
- annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || "";
-
- if (rowInfo.text.indexOf(annoText) === -1)
- rowInfo.text.push(annoText);
+ if (config.get("packaged") || !require.toUrl) {
+ workerUrl = workerUrl || config.moduleUrl(mod, "worker");
+ } else {
+ var normalizePath = this.$normalizePath;
+ workerUrl = workerUrl || normalizePath(require.toUrl("ace/worker/worker.js", null, "_"));
- var type = annotation.type;
- if (type == "error")
- rowInfo.className = " ace_error";
- else if (type == "warning" && rowInfo.className != " ace_error")
- rowInfo.className = " ace_warning";
- else if (type == "info" && (!rowInfo.className))
- rowInfo.className = " ace_info";
- }
- };
+ var tlns = {};
+ topLevelNamespaces.forEach(function(ns) {
+ tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, ""));
+ });
+ }
- this.$updateAnnotations = function (e) {
- if (!this.$annotations.length)
- return;
- var delta = e.data;
- var range = delta.range;
- var firstRow = range.start.row;
- var len = range.end.row - firstRow;
- if (len === 0) {
- } else if (delta.action == "removeText" || delta.action == "removeLines") {
- this.$annotations.splice(firstRow, len + 1, null);
+ try {
+ this.$worker = new Worker(workerUrl);
+ } catch(e) {
+ if (e instanceof window.DOMException) {
+ var blob = this.$workerBlob(workerUrl);
+ var URL = window.URL || window.webkitURL;
+ var blobURL = URL.createObjectURL(blob);
+
+ this.$worker = new Worker(blobURL);
+ URL.revokeObjectURL(blobURL);
} else {
- var args = Array(len + 1);
- args.unshift(firstRow, 1);
- this.$annotations.splice.apply(this.$annotations, args);
+ throw e;
}
- };
-
- this.update = function(config) {
- var emptyAnno = {className: ""};
- var html = [];
- var i = config.firstRow;
- var lastRow = config.lastRow;
- var fold = this.session.getNextFoldLine(i);
- var foldStart = fold ? fold.start.row : Infinity;
- var foldWidgets = this.$showFoldWidgets && this.session.foldWidgets;
- var breakpoints = this.session.$breakpoints;
- var decorations = this.session.$decorations;
- var firstLineNumber = this.session.$firstLineNumber;
- var lastLineNumber = 0;
-
- while (true) {
- if(i > foldStart) {
- i = fold.end.row + 1;
- fold = this.session.getNextFoldLine(i, fold);
- foldStart = fold ?fold.start.row :Infinity;
- }
- if(i > lastRow)
- break;
+ }
+ this.$worker.postMessage({
+ init : true,
+ tlns : tlns,
+ module : mod,
+ classname : classname
+ });
- var annotation = this.$annotations[i] || emptyAnno;
- html.push(
- "<div class='ace_gutter-cell ",
- breakpoints[i] || "", decorations[i] || "", annotation.className,
- "' style='height:", this.session.getRowLength(i) * config.lineHeight, "px;'>",
- lastLineNumber = i + firstLineNumber
- );
+ this.callbackId = 1;
+ this.callbacks = {};
- if (foldWidgets) {
- var c = foldWidgets[i];
- if (c == null)
- c = foldWidgets[i] = this.session.getFoldWidget(i);
- if (c)
- html.push(
- "<span class='ace_fold-widget ace_", c,
- c == "start" && i == foldStart && i < fold.end.row ? " ace_closed" : " ace_open",
- "' style='height:", config.lineHeight, "px",
- "'></span>"
- );
- }
+ this.$worker.onmessage = this.onMessage;
+};
- html.push("</div>");
+(function(){
- i++;
- }
+ oop.implement(this, EventEmitter);
- this.element = dom.setInnerHtml(this.element, html.join(""));
- this.element.style.height = config.minHeight + "px";
-
- if (this.session.$useWrapMode)
- lastLineNumber = this.session.getLength();
-
- var gutterWidth = ("" + lastLineNumber).length * config.characterWidth;
- var padding = this.$padding || this.$computePadding();
- gutterWidth += padding.left + padding.right;
- if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) {
- this.gutterWidth = gutterWidth;
- this.element.style.width = Math.ceil(this.gutterWidth) + "px";
- this._emit("changeGutterWidth", gutterWidth);
+ this.onMessage = function(e) {
+ var msg = e.data;
+ switch(msg.type) {
+ case "event":
+ this._signal(msg.name, {data: msg.data});
+ break;
+ case "call":
+ var callback = this.callbacks[msg.id];
+ if (callback) {
+ callback(msg.data);
+ delete this.callbacks[msg.id];
+ }
+ break;
+ case "error":
+ this.reportError(msg.data);
+ break;
+ case "log":
+ window.console && console.log && console.log.apply(console, msg.data);
+ break;
}
};
-
- this.$showFoldWidgets = true;
- this.setShowFoldWidgets = function(show) {
- if (show)
- dom.addCssClass(this.element, "ace_folding-enabled");
- else
- dom.removeCssClass(this.element, "ace_folding-enabled");
-
- this.$showFoldWidgets = show;
- this.$padding = null;
- };
- this.getShowFoldWidgets = function() {
- return this.$showFoldWidgets;
+ this.reportError = function(err) {
+ window.console && console.error && console.error(err);
};
- this.$computePadding = function() {
- if (!this.element.firstChild)
- return {left: 0, right: 0};
- var style = dom.computedStyle(this.element.firstChild);
- this.$padding = {};
- this.$padding.left = parseInt(style.paddingLeft) + 1 || 0;
- this.$padding.right = parseInt(style.paddingRight) || 0;
- return this.$padding;
+ this.$normalizePath = function(path) {
+ return net.qualifyURL(path);
};
- this.getRegion = function(point) {
- var padding = this.$padding || this.$computePadding();
- var rect = this.element.getBoundingClientRect();
- if (point.x < padding.left + rect.left)
- return "markers";
- if (this.$showFoldWidgets && point.x > rect.right - padding.right)
- return "foldWidgets";
+ this.terminate = function() {
+ this._signal("terminate", {});
+ this.deltaQueue = null;
+ this.$worker.terminate();
+ this.$worker = null;
+ if (this.$doc)
+ this.$doc.off("change", this.changeListener);
+ this.$doc = null;
};
-}).call(Gutter.prototype);
-
-exports.Gutter = Gutter;
-
-});
-
-ace.define('ace/layer/marker', ['require', 'exports', 'module' , 'ace/range', 'ace/lib/dom'], function(require, exports, module) {
-
-
-var Range = require("../range").Range;
-var dom = require("../lib/dom");
-
-var Marker = function(parentEl) {
- this.element = dom.createElement("div");
- this.element.className = "ace_layer ace_marker-layer";
- parentEl.appendChild(this.element);
-};
-
-(function() {
-
- this.$padding = 0;
-
- this.setPadding = function(padding) {
- this.$padding = padding;
- };
- this.setSession = function(session) {
- this.session = session;
- };
-
- this.setMarkers = function(markers) {
- this.markers = markers;
+ this.send = function(cmd, args) {
+ this.$worker.postMessage({command: cmd, args: args});
};
- this.update = function(config) {
- var config = config || this.config;
- if (!config)
- return;
-
- this.config = config;
-
-
- var html = [];
- for (var key in this.markers) {
- var marker = this.markers[key];
-
- if (!marker.range) {
- marker.update(html, this, this.session, config);
- continue;
- }
-
- var range = marker.range.clipRows(config.firstRow, config.lastRow);
- if (range.isEmpty()) continue;
-
- range = range.toScreenRange(this.session);
- if (marker.renderer) {
- var top = this.$getTop(range.start.row, config);
- var left = this.$padding + range.start.column * config.characterWidth;
- marker.renderer(html, range, left, top, config);
- } else if (marker.type == "fullLine") {
- this.drawFullLineMarker(html, range, marker.clazz, config);
- } else if (marker.type == "screenLine") {
- this.drawScreenLineMarker(html, range, marker.clazz, config);
- } else if (range.isMultiLine()) {
- if (marker.type == "text")
- this.drawTextMarker(html, range, marker.clazz, config);
- else
- this.drawMultiLineMarker(html, range, marker.clazz, config);
- } else {
- this.drawSingleLineMarker(html, range, marker.clazz + " ace_start", config);
- }
+ this.call = function(cmd, args, callback) {
+ if (callback) {
+ var id = this.callbackId++;
+ this.callbacks[id] = callback;
+ args.push(id);
}
- this.element = dom.setInnerHtml(this.element, html.join(""));
- };
-
- this.$getTop = function(row, layerConfig) {
- return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;
+ this.send(cmd, args);
};
- this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) {
- var row = range.start.row;
-
- var lineRange = new Range(
- row, range.start.column,
- row, this.session.getScreenLastRowColumn(row)
- );
- this.drawSingleLineMarker(stringBuilder, lineRange, clazz + " ace_start", layerConfig, 1, extraStyle);
- row = range.end.row;
- lineRange = new Range(row, 0, row, range.end.column);
- this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 0, extraStyle);
- for (row = range.start.row + 1; row < range.end.row; row++) {
- lineRange.start.row = row;
- lineRange.end.row = row;
- lineRange.end.column = this.session.getScreenLastRowColumn(row);
- this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, extraStyle);
+ this.emit = function(event, data) {
+ try {
+ this.$worker.postMessage({event: event, data: {data: data.data}});
+ }
+ catch(ex) {
+ console.error(ex.stack);
}
};
- this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
- var padding = this.$padding;
- var height = config.lineHeight;
- var top = this.$getTop(range.start.row, config);
- var left = padding + range.start.column * config.characterWidth;
- extraStyle = extraStyle || "";
-
- stringBuilder.push(
- "<div class='", clazz, " ace_start' style='",
- "height:", height, "px;",
- "right:0;",
- "top:", top, "px;",
- "left:", left, "px;", extraStyle, "'></div>"
- );
- top = this.$getTop(range.end.row, config);
- var width = range.end.column * config.characterWidth;
-
- stringBuilder.push(
- "<div class='", clazz, "' style='",
- "height:", height, "px;",
- "width:", width, "px;",
- "top:", top, "px;",
- "left:", padding, "px;", extraStyle, "'></div>"
- );
- height = (range.end.row - range.start.row - 1) * config.lineHeight;
- if (height < 0)
- return;
- top = this.$getTop(range.start.row + 1, config);
-
- stringBuilder.push(
- "<div class='", clazz, "' style='",
- "height:", height, "px;",
- "right:0;",
- "top:", top, "px;",
- "left:", padding, "px;", extraStyle, "'></div>"
- );
- };
- this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) {
- var height = config.lineHeight;
- var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth;
-
- var top = this.$getTop(range.start.row, config);
- var left = this.$padding + range.start.column * config.characterWidth;
-
- stringBuilder.push(
- "<div class='", clazz, "' style='",
- "height:", height, "px;",
- "width:", width, "px;",
- "top:", top, "px;",
- "left:", left, "px;", extraStyle || "", "'></div>"
- );
- };
-
- this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
- var top = this.$getTop(range.start.row, config);
- var height = config.lineHeight;
- if (range.start.row != range.end.row)
- height += this.$getTop(range.end.row, config) - top;
-
- stringBuilder.push(
- "<div class='", clazz, "' style='",
- "height:", height, "px;",
- "top:", top, "px;",
- "left:0;right:0;", extraStyle || "", "'></div>"
- );
- };
-
- this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
- var top = this.$getTop(range.start.row, config);
- var height = config.lineHeight;
-
- stringBuilder.push(
- "<div class='", clazz, "' style='",
- "height:", height, "px;",
- "top:", top, "px;",
- "left:0;right:0;", extraStyle || "", "'></div>"
- );
- };
-
-}).call(Marker.prototype);
-
-exports.Marker = Marker;
-
-});
-
-ace.define('ace/layer/text', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/lang', 'ace/lib/useragent', 'ace/lib/event_emitter'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var dom = require("../lib/dom");
-var lang = require("../lib/lang");
-var useragent = require("../lib/useragent");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-
-var Text = function(parentEl) {
- this.element = dom.createElement("div");
- this.element.className = "ace_layer ace_text-layer";
- parentEl.appendChild(this.element);
-
- this.$characterSize = {width: 0, height: 0};
- this.checkForSizeChanges();
- this.$pollSizeChanges();
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
- this.EOF_CHAR = "\xB6"; //"&para;";
- this.EOL_CHAR = "\xAC"; //"&not;";
- this.TAB_CHAR = "\u2192"; //"&rarr;" "\u21E5";
- this.SPACE_CHAR = "\xB7"; //"&middot;";
- this.$padding = 0;
+ this.attachToDocument = function(doc) {
+ if(this.$doc)
+ this.terminate();
- this.setPadding = function(padding) {
- this.$padding = padding;
- this.element.style.padding = "0 " + padding + "px";
+ this.$doc = doc;
+ this.call("setValue", [doc.getValue()]);
+ doc.on("change", this.changeListener);
};
- this.getLineHeight = function() {
- return this.$characterSize.height || 1;
+ this.changeListener = function(e) {
+ if (!this.deltaQueue) {
+ this.deltaQueue = [e.data];
+ setTimeout(this.$sendDeltaQueue, 0);
+ } else
+ this.deltaQueue.push(e.data);
};
- this.getCharacterWidth = function() {
- return this.$characterSize.width || 1;
+ this.$sendDeltaQueue = function() {
+ var q = this.deltaQueue;
+ if (!q) return;
+ this.deltaQueue = null;
+ if (q.length > 20 && q.length > this.$doc.getLength() >> 1) {
+ this.call("setValue", [this.$doc.getValue()]);
+ } else
+ this.emit("change", {data: q});
};
- this.checkForSizeChanges = function() {
- var size = this.$measureSizes();
- if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {
- this.$measureNode.style.fontWeight = "bold";
- var boldSize = this.$measureSizes();
- this.$measureNode.style.fontWeight = "";
- this.$characterSize = size;
- this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;
- this._emit("changeCharacterSize", {data: size});
+ this.$workerBlob = function(workerUrl) {
+ var script = "importScripts('" + net.qualifyURL(workerUrl) + "');";
+ try {
+ return new Blob([script], {"type": "application/javascript"});
+ } catch (e) { // Backwards-compatibility
+ var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;
+ var blobBuilder = new BlobBuilder();
+ blobBuilder.append(script);
+ return blobBuilder.getBlob("application/javascript");
}
};
- this.$pollSizeChanges = function() {
- var self = this;
- this.$pollSizeChangesTimer = setInterval(function() {
- self.checkForSizeChanges();
- }, 500);
- };
-
- this.$fontStyles = {
- fontFamily : 1,
- fontSize : 1,
- fontWeight : 1,
- fontStyle : 1,
- lineHeight : 1
- };
-
- this.$measureSizes = useragent.isIE || useragent.isOldGecko ? function() {
- var n = 1000;
- if (!this.$measureNode) {
- var measureNode = this.$measureNode = dom.createElement("div");
- var style = measureNode.style;
-
- style.width = style.height = "auto";
- style.left = style.top = (-n * 40) + "px";
-
- style.visibility = "hidden";
- style.position = "fixed";
- style.overflow = "visible";
- style.whiteSpace = "nowrap";
- measureNode.innerHTML = lang.stringRepeat("Xy", n);
-
- if (this.element.ownerDocument.body) {
- this.element.ownerDocument.body.appendChild(measureNode);
- } else {
- var container = this.element.parentNode;
- while (!dom.hasCssClass(container, "ace_editor"))
- container = container.parentNode;
- container.appendChild(measureNode);
- }
- }
- if (!this.element.offsetWidth)
- return null;
-
- var style = this.$measureNode.style;
- var computedStyle = dom.computedStyle(this.element);
- for (var prop in this.$fontStyles)
- style[prop] = computedStyle[prop];
-
- var size = {
- height: this.$measureNode.offsetHeight,
- width: this.$measureNode.offsetWidth / (n * 2)
- };
- if (size.width == 0 || size.height == 0)
- return null;
-
- return size;
- }
- : function() {
- if (!this.$measureNode) {
- var measureNode = this.$measureNode = dom.createElement("div");
- var style = measureNode.style;
-
- style.width = style.height = "auto";
- style.left = style.top = -100 + "px";
-
- style.visibility = "hidden";
- style.position = "fixed";
- style.overflow = "visible";
- style.whiteSpace = "nowrap";
+}).call(WorkerClient.prototype);
- measureNode.innerHTML = "X";
- var container = this.element.parentNode;
- while (container && !dom.hasCssClass(container, "ace_editor"))
- container = container.parentNode;
+var UIWorkerClient = function(topLevelNamespaces, mod, classname) {
+ this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);
+ this.changeListener = this.changeListener.bind(this);
+ this.callbackId = 1;
+ this.callbacks = {};
+ this.messageBuffer = [];
- if (!container)
- return this.$measureNode = null;
+ var main = null;
+ var emitSync = false;
+ var sender = Object.create(EventEmitter);
+ var _self = this;
- container.appendChild(measureNode);
+ this.$worker = {};
+ this.$worker.terminate = function() {};
+ this.$worker.postMessage = function(e) {
+ _self.messageBuffer.push(e);
+ if (main) {
+ if (emitSync)
+ setTimeout(processNext);
+ else
+ processNext();
}
-
- var rect = this.$measureNode.getBoundingClientRect();
-
- var size = {
- height: rect.height,
- width: rect.width
- };
- if (size.width == 0 || size.height == 0)
- return null;
-
- return size;
- };
-
- this.setSession = function(session) {
- this.session = session;
- this.$computeTabString();
};
+ this.setEmitSync = function(val) { emitSync = val };
- this.showInvisibles = false;
- this.setShowInvisibles = function(showInvisibles) {
- if (this.showInvisibles == showInvisibles)
- return false;
-
- this.showInvisibles = showInvisibles;
- this.$computeTabString();
- return true;
+ var processNext = function() {
+ var msg = _self.messageBuffer.shift();
+ if (msg.command)
+ main[msg.command].apply(main, msg.args);
+ else if (msg.event)
+ sender._signal(msg.event, msg.data);
};
- this.displayIndentGuides = true;
- this.setDisplayIndentGuides = function(display) {
- if (this.displayIndentGuides == display)
- return false;
-
- this.displayIndentGuides = display;
- this.$computeTabString();
- return true;
+ sender.postMessage = function(msg) {
+ _self.onMessage({data: msg});
};
-
- this.$tabStrings = [];
- this.onChangeTabSize =
- this.$computeTabString = function() {
- var tabSize = this.session.getTabSize();
- this.tabSize = tabSize;
- var tabStr = this.$tabStrings = [0];
- for (var i = 1; i < tabSize + 1; i++) {
- if (this.showInvisibles) {
- tabStr.push("<span class='ace_invisible'>"
- + this.TAB_CHAR
- + lang.stringRepeat("\xa0", i - 1)
- + "</span>");
- } else {
- tabStr.push(lang.stringRepeat("\xa0", i));
- }
- }
- if (this.displayIndentGuides) {
- this.$indentGuideRe = /\s\S| \t|\t |\s$/;
- var className = "ace_indent-guide";
- if (this.showInvisibles) {
- className += " ace_invisible";
- var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize);
- var tabContent = this.TAB_CHAR + lang.stringRepeat("\xa0", this.tabSize - 1);
- } else{
- var spaceContent = lang.stringRepeat("\xa0", this.tabSize);
- var tabContent = spaceContent;
- }
-
- this.$tabStrings[" "] = "<span class='" + className + "'>" + spaceContent + "</span>";
- this.$tabStrings["\t"] = "<span class='" + className + "'>" + tabContent + "</span>";
- }
+ sender.callback = function(data, callbackId) {
+ this.postMessage({type: "call", id: callbackId, data: data});
};
-
- this.updateLines = function(config, firstRow, lastRow) {
- if (this.config.lastRow != config.lastRow ||
- this.config.firstRow != config.firstRow) {
- this.scrollLines(config);
- }
- this.config = config;
-
- var first = Math.max(firstRow, config.firstRow);
- var last = Math.min(lastRow, config.lastRow);
-
- var lineElements = this.element.childNodes;
- var lineElementsIdx = 0;
-
- for (var row = config.firstRow; row < first; row++) {
- var foldLine = this.session.getFoldLine(row);
- if (foldLine) {
- if (foldLine.containsRow(first)) {
- first = foldLine.start.row;
- break;
- } else {
- row = foldLine.end.row;
- }
- }
- lineElementsIdx ++;
- }
-
- var row = first;
- var foldLine = this.session.getNextFoldLine(row);
- var foldStart = foldLine ? foldLine.start.row : Infinity;
-
- while (true) {
- if (row > foldStart) {
- row = foldLine.end.row+1;
- foldLine = this.session.getNextFoldLine(row, foldLine);
- foldStart = foldLine ? foldLine.start.row :Infinity;
- }
- if (row > last)
- break;
-
- var lineElement = lineElements[lineElementsIdx++];
- if (lineElement) {
- var html = [];
- this.$renderLine(
- html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false
- );
- dom.setInnerHtml(lineElement, html.join(""));
- }
- row++;
- }
+ sender.emit = function(name, data) {
+ this.postMessage({type: "event", name: name, data: data});
};
- this.scrollLines = function(config) {
- var oldConfig = this.config;
- this.config = config;
-
- if (!oldConfig || oldConfig.lastRow < config.firstRow)
- return this.update(config);
-
- if (config.lastRow < oldConfig.firstRow)
- return this.update(config);
-
- var el = this.element;
- if (oldConfig.firstRow < config.firstRow)
- for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--)
- el.removeChild(el.firstChild);
-
- if (oldConfig.lastRow > config.lastRow)
- for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--)
- el.removeChild(el.lastChild);
-
- if (config.firstRow < oldConfig.firstRow) {
- var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1);
- if (el.firstChild)
- el.insertBefore(fragment, el.firstChild);
- else
- el.appendChild(fragment);
- }
+ config.loadModule(["worker", mod], function(Main) {
+ main = new Main[classname](sender);
+ while (_self.messageBuffer.length)
+ processNext();
+ });
+};
- if (config.lastRow > oldConfig.lastRow) {
- var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow);
- el.appendChild(fragment);
- }
- };
+UIWorkerClient.prototype = WorkerClient.prototype;
- this.$renderLinesFragment = function(config, firstRow, lastRow) {
- var fragment = this.element.ownerDocument.createDocumentFragment();
- var row = firstRow;
- var foldLine = this.session.getNextFoldLine(row);
- var foldStart = foldLine ? foldLine.start.row : Infinity;
+exports.UIWorkerClient = UIWorkerClient;
+exports.WorkerClient = WorkerClient;
- while (true) {
- if (row > foldStart) {
- row = foldLine.end.row+1;
- foldLine = this.session.getNextFoldLine(row, foldLine);
- foldStart = foldLine ? foldLine.start.row : Infinity;
- }
- if (row > lastRow)
- break;
+});
- var container = dom.createElement("div");
+ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"], function(require, exports, module) {
+"use strict";
- var html = [];
- this.$renderLine(html, row, false, row == foldStart ? foldLine : false);
- container.innerHTML = html.join("");
- if (this.$useLineGroups()) {
- container.className = 'ace_line_group';
- fragment.appendChild(container);
- } else {
- var lines = container.childNodes
- while(lines.length)
- fragment.appendChild(lines[0]);
- }
+var Range = require("./range").Range;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var oop = require("./lib/oop");
- row++;
- }
- return fragment;
+var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) {
+ var _self = this;
+ this.length = length;
+ this.session = session;
+ this.doc = session.getDocument();
+ this.mainClass = mainClass;
+ this.othersClass = othersClass;
+ this.$onUpdate = this.onUpdate.bind(this);
+ this.doc.on("change", this.$onUpdate);
+ this.$others = others;
+
+ this.$onCursorChange = function() {
+ setTimeout(function() {
+ _self.onCursorChange();
+ });
};
+
+ this.$pos = pos;
+ var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1};
+ this.$undoStackDepth = undoStack.length;
+ this.setup();
- this.update = function(config) {
- this.config = config;
-
- var html = [];
- var firstRow = config.firstRow, lastRow = config.lastRow;
-
- var row = firstRow;
- var foldLine = this.session.getNextFoldLine(row);
- var foldStart = foldLine ? foldLine.start.row : Infinity;
-
- while (true) {
- if (row > foldStart) {
- row = foldLine.end.row+1;
- foldLine = this.session.getNextFoldLine(row, foldLine);
- foldStart = foldLine ? foldLine.start.row :Infinity;
- }
- if (row > lastRow)
- break;
-
- if (this.$useLineGroups())
- html.push("<div class='ace_line_group'>")
-
- this.$renderLine(html, row, false, row == foldStart ? foldLine : false);
+ session.selection.on("changeCursor", this.$onCursorChange);
+};
- if (this.$useLineGroups())
- html.push("</div>"); // end the line group
+(function() {
- row++;
- }
- this.element = dom.setInnerHtml(this.element, html.join(""));
- };
+ oop.implement(this, EventEmitter);
+ this.setup = function() {
+ var _self = this;
+ var doc = this.doc;
+ var session = this.session;
+ var pos = this.$pos;
+
+ this.selectionBefore = session.selection.toJSON();
+ if (session.selection.inMultiSelectMode)
+ session.selection.toSingleRange();
- this.$textToken = {
- "text": true,
- "rparen": true,
- "lparen": true
+ this.pos = doc.createAnchor(pos.row, pos.column);
+ this.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);
+ this.pos.on("change", function(event) {
+ session.removeMarker(_self.markerId);
+ _self.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.mainClass, null, false);
+ });
+ this.others = [];
+ this.$others.forEach(function(other) {
+ var anchor = doc.createAnchor(other.row, other.column);
+ _self.others.push(anchor);
+ });
+ session.setUndoSelect(false);
};
-
- this.$renderToken = function(stringBuilder, screenColumn, token, value) {
- var self = this;
- var replaceReg = /\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g;
- var replaceFunc = function(c, a, b, tabIdx, idx4) {
- if (a) {
- return self.showInvisibles ?
- "<span class='ace_invisible'>" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "</span>" :
- lang.stringRepeat("\xa0", c.length);
- } else if (c == "&") {
- return "&#38;";
- } else if (c == "<") {
- return "&#60;";
- } else if (c == "\t") {
- var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx);
- screenColumn += tabSize - 1;
- return self.$tabStrings[tabSize];
- } else if (c == "\u3000") {
- var classToUse = self.showInvisibles ? "ace_cjk ace_invisible" : "ace_cjk";
- var space = self.showInvisibles ? self.SPACE_CHAR : "";
- screenColumn += 1;
- return "<span class='" + classToUse + "' style='width:" +
- (self.config.characterWidth * 2) +
- "px'>" + space + "</span>";
- } else if (b) {
- return "<span class='ace_invisible ace_invalid'>" + self.SPACE_CHAR + "</span>";
- } else {
- screenColumn += 1;
- return "<span class='ace_cjk' style='width:" +
- (self.config.characterWidth * 2) +
- "px'>" + c + "</span>";
- }
- };
-
- var output = value.replace(replaceReg, replaceFunc);
-
- if (!this.$textToken[token.type]) {
- var classes = "ace_" + token.type.replace(/\./g, " ace_");
- var style = "";
- if (token.type == "fold")
- style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' ";
- stringBuilder.push("<span class='", classes, "'", style, ">", output, "</span>");
- }
- else {
- stringBuilder.push(output);
- }
- return screenColumn + value.length;
+ this.showOtherMarkers = function() {
+ if(this.othersActive) return;
+ var session = this.session;
+ var _self = this;
+ this.othersActive = true;
+ this.others.forEach(function(anchor) {
+ anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false);
+ anchor.on("change", function(event) {
+ session.removeMarker(anchor.markerId);
+ anchor.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.othersClass, null, false);
+ });
+ });
};
-
- this.renderIndentGuide = function(stringBuilder, value) {
- var cols = value.search(this.$indentGuideRe);
- if (cols <= 0)
- return value;
- if (value[0] == " ") {
- cols -= cols % this.tabSize;
- stringBuilder.push(lang.stringRepeat(this.$tabStrings[" "], cols/this.tabSize));
- return value.substr(cols);
- } else if (value[0] == "\t") {
- stringBuilder.push(lang.stringRepeat(this.$tabStrings["\t"], cols));
- return value.substr(cols);
+ this.hideOtherMarkers = function() {
+ if(!this.othersActive) return;
+ this.othersActive = false;
+ for (var i = 0; i < this.others.length; i++) {
+ this.session.removeMarker(this.others[i].markerId);
}
- return value;
};
-
- this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) {
- var chars = 0;
- var split = 0;
- var splitChars = splits[0];
- var screenColumn = 0;
-
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- var value = token.value;
- if (i == 0 && this.displayIndentGuides) {
- chars = value.length;
- value = this.renderIndentGuide(stringBuilder, value);
- if (!value)
- continue;
- chars -= value.length;
- }
-
- if (chars + value.length < splitChars) {
- screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
- chars += value.length;
- } else {
- while (chars + value.length >= splitChars) {
- screenColumn = this.$renderToken(
- stringBuilder, screenColumn,
- token, value.substring(0, splitChars - chars)
- );
- value = value.substring(splitChars - chars);
- chars = splitChars;
-
- if (!onlyContents) {
- stringBuilder.push("</div>",
- "<div class='ace_line' style='height:",
- this.config.lineHeight, "px'>"
- );
+ this.onUpdate = function(event) {
+ var delta = event.data;
+ var range = delta.range;
+ if(range.start.row !== range.end.row) return;
+ if(range.start.row !== this.pos.row) return;
+ if (this.$updating) return;
+ this.$updating = true;
+ var lengthDiff = delta.action === "insertText" ? range.end.column - range.start.column : range.start.column - range.end.column;
+
+ if(range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1) {
+ var distanceFromStart = range.start.column - this.pos.column;
+ this.length += lengthDiff;
+ if(!this.session.$fromUndo) {
+ if(delta.action === "insertText") {
+ for (var i = this.others.length - 1; i >= 0; i--) {
+ var otherPos = this.others[i];
+ var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
+ if(otherPos.row === range.start.row && range.start.column < otherPos.column)
+ newPos.column += lengthDiff;
+ this.doc.insert(newPos, delta.text);
+ }
+ } else if(delta.action === "removeText") {
+ for (var i = this.others.length - 1; i >= 0; i--) {
+ var otherPos = this.others[i];
+ var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
+ if(otherPos.row === range.start.row && range.start.column < otherPos.column)
+ newPos.column += lengthDiff;
+ this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));
}
-
- split ++;
- screenColumn = 0;
- splitChars = splits[split] || Number.MAX_VALUE;
}
- if (value.length != 0) {
- chars += value.length;
- screenColumn = this.$renderToken(
- stringBuilder, screenColumn, token, value
- );
+ if(range.start.column === this.pos.column && delta.action === "insertText") {
+ setTimeout(function() {
+ this.pos.setPosition(this.pos.row, this.pos.column - lengthDiff);
+ for (var i = 0; i < this.others.length; i++) {
+ var other = this.others[i];
+ var newPos = {row: other.row, column: other.column - lengthDiff};
+ if(other.row === range.start.row && range.start.column < other.column)
+ newPos.column += lengthDiff;
+ other.setPosition(newPos.row, newPos.column);
+ }
+ }.bind(this), 0);
+ }
+ else if(range.start.column === this.pos.column && delta.action === "removeText") {
+ setTimeout(function() {
+ for (var i = 0; i < this.others.length; i++) {
+ var other = this.others[i];
+ if(other.row === range.start.row && range.start.column < other.column) {
+ other.setPosition(other.row, other.column - lengthDiff);
+ }
+ }
+ }.bind(this), 0);
}
}
+ this.pos._emit("change", {value: this.pos});
+ for (var i = 0; i < this.others.length; i++) {
+ this.others[i]._emit("change", {value: this.others[i]});
+ }
}
+ this.$updating = false;
};
- this.$renderSimpleLine = function(stringBuilder, tokens) {
- var screenColumn = 0;
- var token = tokens[0];
- var value = token.value;
- if (this.displayIndentGuides)
- value = this.renderIndentGuide(stringBuilder, value);
- if (value)
- screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
- for (var i = 1; i < tokens.length; i++) {
- token = tokens[i];
- value = token.value;
- screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
- }
- };
- this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) {
- if (!foldLine && foldLine != false)
- foldLine = this.session.getFoldLine(row);
-
- if (foldLine)
- var tokens = this.$getFoldLineTokens(row, foldLine);
- else
- var tokens = this.session.getTokens(row);
-
-
- if (!onlyContents) {
- stringBuilder.push(
- "<div class='ace_line' style='height:", this.config.lineHeight, "px'>"
- );
- }
-
- if (tokens.length) {
- var splits = this.session.getRowSplitData(row);
- if (splits && splits.length)
- this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents);
- else
- this.$renderSimpleLine(stringBuilder, tokens);
+ this.onCursorChange = function(event) {
+ if (this.$updating || !this.session) return;
+ var pos = this.session.selection.getCursor();
+ if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) {
+ this.showOtherMarkers();
+ this._emit("cursorEnter", event);
+ } else {
+ this.hideOtherMarkers();
+ this._emit("cursorLeave", event);
}
-
- if (this.showInvisibles) {
- if (foldLine)
- row = foldLine.end.row
-
- stringBuilder.push(
- "<span class='ace_invisible'>",
- row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR,
- "</span>"
- );
+ };
+ this.detach = function() {
+ this.session.removeMarker(this.markerId);
+ this.hideOtherMarkers();
+ this.doc.removeEventListener("change", this.$onUpdate);
+ this.session.selection.removeEventListener("changeCursor", this.$onCursorChange);
+ this.pos.detach();
+ for (var i = 0; i < this.others.length; i++) {
+ this.others[i].detach();
}
- if (!onlyContents)
- stringBuilder.push("</div>");
+ this.session.setUndoSelect(true);
+ this.session = null;
};
-
- this.$getFoldLineTokens = function(row, foldLine) {
- var session = this.session;
- var renderTokens = [];
-
- function addTokens(tokens, from, to) {
- var idx = 0, col = 0;
- while ((col + tokens[idx].value.length) < from) {
- col += tokens[idx].value.length;
- idx++;
-
- if (idx == tokens.length)
- return;
- }
- if (col != from) {
- var value = tokens[idx].value.substring(from - col);
- if (value.length > (to - from))
- value = value.substring(0, to - from);
-
- renderTokens.push({
- type: tokens[idx].type,
- value: value
- });
-
- col = from + value.length;
- idx += 1;
- }
-
- while (col < to && idx < tokens.length) {
- var value = tokens[idx].value;
- if (value.length + col > to) {
- renderTokens.push({
- type: tokens[idx].type,
- value: value.substring(0, to - col)
- });
- } else
- renderTokens.push(tokens[idx]);
- col += value.length;
- idx += 1;
- }
+ this.cancel = function() {
+ if(this.$undoStackDepth === -1)
+ throw Error("Canceling placeholders only supported with undo manager attached to session.");
+ var undoManager = this.session.getUndoManager();
+ var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth;
+ for (var i = 0; i < undosRequired; i++) {
+ undoManager.undo(true);
}
-
- var tokens = session.getTokens(row);
- foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) {
- if (placeholder != null) {
- renderTokens.push({
- type: "fold",
- value: placeholder
- });
- } else {
- if (isNewRow)
- tokens = session.getTokens(row);
-
- if (tokens.length)
- addTokens(tokens, lastColumn, column);
- }
- }, foldLine.end.row, this.session.getLine(foldLine.end.row).length);
-
- return renderTokens;
- };
-
- this.$useLineGroups = function() {
- return this.session.getUseWrapMode();
- };
-
- this.destroy = function() {
- clearInterval(this.$pollSizeChangesTimer);
- if (this.$measureNode)
- this.$measureNode.parentNode.removeChild(this.$measureNode);
- delete this.$measureNode;
+ if (this.selectionBefore)
+ this.session.selection.fromJSON(this.selectionBefore);
};
+}).call(PlaceHolder.prototype);
-}).call(Text.prototype);
-
-exports.Text = Text;
+exports.PlaceHolder = PlaceHolder;
});
-ace.define('ace/layer/cursor', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) {
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+function isSamePoint(p1, p2) {
+ return p1.row == p2.row && p1.column == p2.column;
+}
-var dom = require("../lib/dom");
-
-var Cursor = function(parentEl) {
- this.element = dom.createElement("div");
- this.element.className = "ace_layer ace_cursor-layer";
- parentEl.appendChild(this.element);
-
- this.isVisible = false;
- this.isBlinking = true;
- this.blinkInterval = 1000;
- this.smoothBlinking = false;
-
- this.cursors = [];
- this.cursor = this.addCursor();
- dom.addCssClass(this.element, "ace_hidden-cursors");
-};
+function onMouseDown(e) {
+ var ev = e.domEvent;
+ var alt = ev.altKey;
+ var shift = ev.shiftKey;
+ var ctrl = ev.ctrlKey;
+ var accel = e.getAccelKey();
+ var button = e.getButton();
+
+ if (ctrl && useragent.isMac)
+ button = ev.button;
-(function() {
+ if (e.editor.inMultiSelectMode && button == 2) {
+ e.editor.textInput.onContextMenu(e.domEvent);
+ return;
+ }
+
+ if (!ctrl && !alt && !accel) {
+ if (button === 0 && e.editor.inMultiSelectMode)
+ e.editor.exitMultiSelectMode();
+ return;
+ }
+
+ if (button !== 0)
+ return;
- this.$padding = 0;
- this.setPadding = function(padding) {
- this.$padding = padding;
- };
+ var editor = e.editor;
+ var selection = editor.selection;
+ var isMultiSelect = editor.inMultiSelectMode;
+ var pos = e.getDocumentPosition();
+ var cursor = selection.getCursor();
+ var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor));
- this.setSession = function(session) {
- this.session = session;
+ var mouseX = e.x, mouseY = e.y;
+ var onMouseSelection = function(e) {
+ mouseX = e.clientX;
+ mouseY = e.clientY;
};
-
- this.setBlinking = function(blinking) {
- if (blinking != this.isBlinking){
- this.isBlinking = blinking;
- this.restartTimer();
+
+ var session = editor.session;
+ var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
+ var screenCursor = screenAnchor;
+
+ var selectionMode;
+ if (editor.$mouseHandler.$enableJumpToDef) {
+ if (ctrl && alt || accel && alt)
+ selectionMode = "add";
+ else if (alt && editor.$blockSelectEnabled)
+ selectionMode = "block";
+ } else {
+ if (accel && !alt) {
+ selectionMode = "add";
+ if (!isMultiSelect && shift)
+ return;
+ } else if (alt && editor.$blockSelectEnabled) {
+ selectionMode = "block";
}
- };
+ }
+
+ if (selectionMode && useragent.isMac && ev.ctrlKey) {
+ editor.$mouseHandler.cancelContextMenu();
+ }
- this.setBlinkInterval = function(blinkInterval) {
- if (blinkInterval != this.blinkInterval){
- this.blinkInterval = blinkInterval;
- this.restartTimer();
- }
- };
+ if (selectionMode == "add") {
+ if (!isMultiSelect && inSelection)
+ return; // dragging
- this.setSmoothBlinking = function(smoothBlinking) {
- if (smoothBlinking != this.smoothBlinking) {
- this.smoothBlinking = smoothBlinking;
- if (smoothBlinking)
- dom.addCssClass(this.element, "ace_smooth-blinking");
- else
- dom.removeCssClass(this.element, "ace_smooth-blinking");
- this.restartTimer();
+ if (!isMultiSelect) {
+ var range = selection.toOrientedRange();
+ editor.addSelectionMarker(range);
}
- };
-
- this.addCursor = function() {
- var el = dom.createElement("div");
- el.className = "ace_cursor";
- this.element.appendChild(el);
- this.cursors.push(el);
- return el;
- };
- this.removeCursor = function() {
- if (this.cursors.length > 1) {
- var el = this.cursors.pop();
- el.parentNode.removeChild(el);
- return el;
+ var oldRange = selection.rangeList.rangeAtPoint(pos);
+
+
+ editor.$blockScrolling++;
+ editor.inVirtualSelectionMode = true;
+
+ if (shift) {
+ oldRange = null;
+ range = selection.ranges[0];
+ editor.removeSelectionMarker(range);
}
- };
-
- this.hideCursor = function() {
- this.isVisible = false;
- dom.addCssClass(this.element, "ace_hidden-cursors");
- this.restartTimer();
- };
-
- this.showCursor = function() {
- this.isVisible = true;
- dom.removeCssClass(this.element, "ace_hidden-cursors");
- this.restartTimer();
- };
-
- this.restartTimer = function() {
- clearInterval(this.intervalId);
- clearTimeout(this.timeoutId);
- if (this.smoothBlinking)
- dom.removeCssClass(this.element, "ace_smooth-blinking");
- for (var i = this.cursors.length; i--; )
- this.cursors[i].style.opacity = "";
-
- if (!this.isBlinking || !this.blinkInterval || !this.isVisible)
- return;
-
- if (this.smoothBlinking)
- setTimeout(function(){
- dom.addCssClass(this.element, "ace_smooth-blinking");
- }.bind(this));
+ editor.once("mouseup", function() {
+ var tmpSel = selection.toOrientedRange();
- var blink = function(){
- this.timeoutId = setTimeout(function() {
- for (var i = this.cursors.length; i--; ) {
- this.cursors[i].style.opacity = 0;
+ if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor))
+ selection.substractPoint(tmpSel.cursor);
+ else {
+ if (shift) {
+ selection.substractPoint(range.cursor);
+ } else if (range) {
+ editor.removeSelectionMarker(range);
+ selection.addRange(range);
}
- }.bind(this), 0.6 * this.blinkInterval);
- }.bind(this);
-
- this.intervalId = setInterval(function() {
- for (var i = this.cursors.length; i--; ) {
- this.cursors[i].style.opacity = "";
+ selection.addRange(tmpSel);
}
- blink();
- }.bind(this), this.blinkInterval);
-
- blink();
- };
-
- this.getPixelPosition = function(position, onScreen) {
- if (!this.config || !this.session)
- return {left : 0, top : 0};
-
- if (!position)
- position = this.session.selection.getCursor();
- var pos = this.session.documentToScreenPosition(position);
- var cursorLeft = this.$padding + pos.column * this.config.characterWidth;
- var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *
- this.config.lineHeight;
-
- return {left : cursorLeft, top : cursorTop};
- };
+ editor.$blockScrolling--;
+ editor.inVirtualSelectionMode = false;
+ });
- this.update = function(config) {
- this.config = config;
+ } else if (selectionMode == "block") {
+ e.stop();
+ editor.inVirtualSelectionMode = true;
+ var initialRange;
+ var rectSel = [];
+ var blockSelect = function() {
+ var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
+ var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column);
- var selections = this.session.$selectionMarkers;
- var i = 0, cursorIndex = 0;
+ if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead))
+ return;
+ screenCursor = newCursor;
+
+ editor.$blockScrolling++;
+ editor.selection.moveToPosition(cursor);
+ editor.renderer.scrollCursorIntoView();
- if (selections === undefined || selections.length === 0){
- selections = [{cursor: null}];
+ editor.removeSelectionMarkers(rectSel);
+ rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);
+ if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty())
+ rectSel[0] = editor.$mouseHandler.$clickSelection.clone();
+ rectSel.forEach(editor.addSelectionMarker, editor);
+ editor.updateSelectionMarkers();
+ editor.$blockScrolling--;
+ };
+ editor.$blockScrolling++;
+ if (isMultiSelect && !accel) {
+ selection.toSingleRange();
+ } else if (!isMultiSelect && accel) {
+ initialRange = selection.toOrientedRange();
+ editor.addSelectionMarker(initialRange);
}
+
+ if (shift)
+ screenAnchor = session.documentToScreenPosition(selection.lead);
+ else
+ selection.moveToPosition(pos);
+ editor.$blockScrolling--;
+
+ screenCursor = {row: -1, column: -1};
- for (var i = 0, n = selections.length; i < n; i++) {
- var pixelPos = this.getPixelPosition(selections[i].cursor, true);
- if ((pixelPos.top > config.height + config.offset ||
- pixelPos.top < -config.offset) && i > 1) {
- continue;
+ var onMouseSelectionEnd = function(e) {
+ clearInterval(timerId);
+ editor.removeSelectionMarkers(rectSel);
+ if (!rectSel.length)
+ rectSel = [selection.toOrientedRange()];
+ editor.$blockScrolling++;
+ if (initialRange) {
+ editor.removeSelectionMarker(initialRange);
+ selection.toSingleRange(initialRange);
}
+ for (var i = 0; i < rectSel.length; i++)
+ selection.addRange(rectSel[i]);
+ editor.inVirtualSelectionMode = false;
+ editor.$mouseHandler.$clickSelection = null;
+ editor.$blockScrolling--;
+ };
- var style = (this.cursors[cursorIndex++] || this.addCursor()).style;
-
- style.left = pixelPos.left + "px";
- style.top = pixelPos.top + "px";
- style.width = config.characterWidth + "px";
- style.height = config.lineHeight + "px";
- }
- while (this.cursors.length > cursorIndex)
- this.removeCursor();
-
- var overwrite = this.session.getOverwrite();
- this.$setOverwrite(overwrite);
- this.$pixelPos = pixelPos;
- this.restartTimer();
- };
-
- this.$setOverwrite = function(overwrite) {
- if (overwrite != this.overwrite) {
- this.overwrite = overwrite;
- if (overwrite)
- dom.addCssClass(this.element, "ace_overwrite-cursors");
- else
- dom.removeCssClass(this.element, "ace_overwrite-cursors");
- }
- };
-
- this.destroy = function() {
- clearInterval(this.intervalId);
- clearTimeout(this.timeoutId);
- };
-
-}).call(Cursor.prototype);
-
-exports.Cursor = Cursor;
-
-});
-
-ace.define('ace/scrollbar', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/event', 'ace/lib/event_emitter'], function(require, exports, module) {
-
-
-var oop = require("./lib/oop");
-var dom = require("./lib/dom");
-var event = require("./lib/event");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var ScrollBarV = function(parent, renderer) {
- this.element = dom.createElement("div");
- this.element.className = "ace_scrollbar";
-
- this.inner = dom.createElement("div");
- this.inner.className = "ace_scrollbar-inner";
- this.element.appendChild(this.inner);
-
- parent.appendChild(this.element);
- renderer.$scrollbarWidth =
- this.width = dom.scrollbarWidth(parent.ownerDocument);
- this.fullWidth = this.width;
- this.element.style.width = (this.width || 15) + 5 + "px";
- this.setVisible(false);
- this.element.style.overflowY = "scroll";
-
- event.addListener(this.element, "scroll", this.onScrollV.bind(this));
-};
-
-var ScrollBarH = function(parent, renderer) {
- this.element = dom.createElement("div");
- this.element.className = "ace_scrollbar-h";
-
- this.inner = dom.createElement("div");
- this.inner.className = "ace_scrollbar-inner";
- this.element.appendChild(this.inner);
-
- parent.appendChild(this.element);
- this.height = renderer.$scrollbarWidth;
- this.fullHeight = this.height;
- this.element.style.height = (this.height || 15) + 5 + "px";
- this.setVisible(false);
- this.element.style.overflowX = "scroll";
-
- event.addListener(this.element, "scroll", this.onScrollH.bind(this));
-};
-
-(function() {
- oop.implement(this, EventEmitter);
-
- this.setVisible = function(show) {
- if (show) {
- this.element.style.display = "";
- if (this.fullWidth)
- this.width = this.fullWidth;
- if (this.fullHeight)
- this.height = this.fullHeight;
- } else {
- this.element.style.display = "none";
- this.height = this.width = 0;
- }
- };
- this.onScrollV = function() {
- if (!this.skipEvent) {
- this.scrollTop = this.element.scrollTop;
- this._emit("scroll", {data: this.scrollTop});
- }
- this.skipEvent = false;
- };
- this.onScrollH = function() {
- if (!this.skipEvent) {
- this.scrollLeft = this.element.scrollLeft;
- this._emit("scroll", {data: this.scrollLeft});
- }
- this.skipEvent = false;
- };
- this.getWidth = function() {
- return this.width;
- };
+ var onSelectionInterval = blockSelect;
- this.getHeight = function() {
- return this.height;
- };
- this.setHeight = function(height) {
- this.element.style.height = height + "px";
- };
-
- this.setWidth = function(width) {
- this.element.style.width = width + "px";
- };
- this.setInnerHeight = function(height) {
- this.inner.style.height = height + "px";
- };
-
- this.setInnerWidth = function(width) {
- this.inner.style.width = width + "px";
- };
- this.setScrollTop = function(scrollTop) {
- if (this.scrollTop != scrollTop) {
- this.skipEvent = true;
- this.scrollTop = this.element.scrollTop = scrollTop;
- }
- };
- this.setScrollLeft = function(scrollLeft) {
- if (this.scrollLeft != scrollLeft) {
- this.skipEvent = true;
- this.scrollLeft = this.element.scrollLeft = scrollLeft;
- }
- };
+ event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);
+ var timerId = setInterval(function() {onSelectionInterval();}, 20);
-}).call(ScrollBarV.prototype);
-ScrollBarH.prototype = ScrollBarV.prototype;
+ return e.preventDefault();
+ }
+}
+exports.onMouseDown = onMouseDown;
-exports.ScrollBar = ScrollBarV; // backward compatibility
-exports.ScrollBarV = ScrollBarV;
-exports.ScrollBarH = ScrollBarH;
});
-ace.define('ace/renderloop', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
-
-
-var event = require("./lib/event");
-
-
-var RenderLoop = function(onRender, win) {
- this.onRender = onRender;
- this.pending = false;
- this.changes = 0;
- this.window = win || window;
-};
-
-(function() {
-
-
- this.schedule = function(change) {
- this.changes = this.changes | change;
- if (!this.pending) {
- this.pending = true;
- var _self = this;
- event.nextFrame(function() {
- _self.pending = false;
- var changes;
- while (changes = _self.changes) {
- _self.changes = 0;
- _self.onRender(changes);
- }
- }, this.window);
- }
- };
+ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"], function(require, exports, module) {
+exports.defaultCommands = [{
+ name: "addCursorAbove",
+ exec: function(editor) { editor.selectMoreLines(-1); },
+ bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"},
+ scrollIntoView: "cursor",
+ readonly: true
+}, {
+ name: "addCursorBelow",
+ exec: function(editor) { editor.selectMoreLines(1); },
+ bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"},
+ scrollIntoView: "cursor",
+ readonly: true
+}, {
+ name: "addCursorAboveSkipCurrent",
+ exec: function(editor) { editor.selectMoreLines(-1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"},
+ scrollIntoView: "cursor",
+ readonly: true
+}, {
+ name: "addCursorBelowSkipCurrent",
+ exec: function(editor) { editor.selectMoreLines(1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"},
+ scrollIntoView: "cursor",
+ readonly: true
+}, {
+ name: "selectMoreBefore",
+ exec: function(editor) { editor.selectMore(-1); },
+ bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"},
+ scrollIntoView: "cursor",
+ readonly: true
+}, {
+ name: "selectMoreAfter",
+ exec: function(editor) { editor.selectMore(1); },
+ bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"},
+ scrollIntoView: "cursor",
+ readonly: true
+}, {
+ name: "selectNextBefore",
+ exec: function(editor) { editor.selectMore(-1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"},
+ scrollIntoView: "cursor",
+ readonly: true
+}, {
+ name: "selectNextAfter",
+ exec: function(editor) { editor.selectMore(1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"},
+ scrollIntoView: "cursor",
+ readonly: true
+}, {
+ name: "splitIntoLines",
+ exec: function(editor) { editor.multiSelect.splitIntoLines(); },
+ bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"},
+ readonly: true
+}, {
+ name: "alignCursors",
+ exec: function(editor) { editor.alignCursors(); },
+ bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"},
+ scrollIntoView: "cursor"
+}, {
+ name: "findAll",
+ exec: function(editor) { editor.findAll(); },
+ bindKey: {win: "Ctrl-Alt-K", mac: "Ctrl-Alt-G"},
+ scrollIntoView: "cursor",
+ readonly: true
+}];
+exports.multiSelectCommands = [{
+ name: "singleSelection",
+ bindKey: "esc",
+ exec: function(editor) { editor.exitMultiSelectMode(); },
+ scrollIntoView: "cursor",
+ readonly: true,
+ isAvailable: function(editor) {return editor && editor.inMultiSelectMode}
+}];
-}).call(RenderLoop.prototype);
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+exports.keyboardHandler = new HashHandler(exports.multiSelectCommands);
-exports.RenderLoop = RenderLoop;
});
-ace.define('ace/multi_select', ['require', 'exports', 'module' , 'ace/range_list', 'ace/range', 'ace/selection', 'ace/mouse/multi_select_handler', 'ace/lib/event', 'ace/lib/lang', 'ace/commands/multi_select_commands', 'ace/search', 'ace/edit_session', 'ace/editor', 'ace/config'], function(require, exports, module) {
+ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"], function(require, exports, module) {
var RangeList = require("./range_list").RangeList;
var Range = require("./range").Range;
@@ -14601,7 +16849,7 @@ var EditSession = require("./edit_session").EditSession;
if (!range)
return;
- if (!this.inMultiSelectMode && this.rangeCount == 0) {
+ if (!this.inMultiSelectMode && this.rangeCount === 0) {
var oldRange = this.toOrientedRange();
this.rangeList.add(oldRange);
this.rangeList.add(range);
@@ -14625,7 +16873,7 @@ var EditSession = require("./edit_session").EditSession;
this.$onRemoveRange(removed);
if (this.rangeCount > 1 && !this.inMultiSelectMode) {
- this._emit("multiSelect");
+ this._signal("multiSelect");
this.inMultiSelectMode = true;
this.session.$undoSelect = false;
this.rangeList.attach(this.session);
@@ -14660,7 +16908,7 @@ var EditSession = require("./edit_session").EditSession;
this.$onAddRange = function(range) {
this.rangeCount = this.rangeList.ranges.length;
this.ranges.unshift(range);
- this._emit("addRange", {range: range});
+ this._signal("addRange", {range: range});
};
this.$onRemoveRange = function(removed) {
@@ -14676,11 +16924,11 @@ var EditSession = require("./edit_session").EditSession;
this.ranges.splice(index, 1);
}
- this._emit("removeRange", {ranges: removed});
+ this._signal("removeRange", {ranges: removed});
- if (this.rangeCount == 0 && this.inMultiSelectMode) {
+ if (this.rangeCount === 0 && this.inMultiSelectMode) {
this.inMultiSelectMode = false;
- this._emit("singleSelect");
+ this._signal("singleSelect");
this.session.$undoSelect = true;
this.rangeList.detach(this.session);
}
@@ -14698,7 +16946,7 @@ var EditSession = require("./edit_session").EditSession;
this.rangeCount = 0;
};
this.getAllRanges = function() {
- return this.rangeList.ranges.concat();
+ return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()];
};
this.splitIntoLines = function () {
@@ -14897,6 +17145,7 @@ var Editor = require("./editor").Editor;
this.commands.removeDefaultHandler("exec", this.$onMultiSelectExec);
this.renderer.updateCursor();
this.renderer.updateBackMarkers();
+ this._emit("changeSelection");
};
this.$onMultiSelectExec = function(e) {
@@ -14920,31 +17169,37 @@ var Editor = require("./editor").Editor;
}
return result;
};
- this.forEachSelection = function(cmd, args, $byLines) {
+ this.forEachSelection = function(cmd, args, options) {
if (this.inVirtualSelectionMode)
return;
-
+ var keepOrder = options && options.keepOrder;
+ var $byLines = options == true || options && options.$byLines
var session = this.session;
var selection = this.selection;
var rangeList = selection.rangeList;
+ var ranges = (keepOrder ? selection : rangeList).ranges;
var result;
+ if (!ranges.length)
+ return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});
+
var reg = selection._eventRegistry;
selection._eventRegistry = {};
var tmpSel = new Selection(session);
this.inVirtualSelectionMode = true;
- for (var i = rangeList.ranges.length; i--;) {
+ for (var i = ranges.length; i--;) {
if ($byLines) {
- while (i > 0 && rangeList.ranges[i].start.row == rangeList.ranges[i - 1].end.row)
+ while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row)
i--;
}
- tmpSel.fromOrientedRange(rangeList.ranges[i]);
+ tmpSel.fromOrientedRange(ranges[i]);
+ tmpSel.index = i;
this.selection = session.selection = tmpSel;
- var cmdResult = cmd.exec(this, args || {});
- if (!result == undefined)
+ var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});
+ if (!result && cmdResult !== undefined)
result = cmdResult;
- tmpSel.toOrientedRange(rangeList.ranges[i]);
+ tmpSel.toOrientedRange(ranges[i]);
}
tmpSel.detach();
@@ -14967,7 +17222,7 @@ var Editor = require("./editor").Editor;
this.multiSelect.toSingleRange();
};
- this.getCopyText = function() {
+ this.getSelectedText = function() {
var text = "";
if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {
var ranges = this.multiSelect.rangeList.ranges;
@@ -14982,36 +17237,33 @@ var Editor = require("./editor").Editor;
} else if (!this.selection.isEmpty()) {
text = this.session.getTextRange(this.getSelectionRange());
}
- this._signal("copy", text);
return text;
};
- this.onPaste = function(text) {
- if (this.$readOnly)
- return;
-
- this._signal("paste", text);
- if (!this.inMultiSelectMode || this.inVirtualSelectionMode)
- return this.insert(text);
-
- var lines = text.split(/\r\n|\r|\n/);
- var ranges = this.selection.rangeList.ranges;
-
- if (lines.length > ranges.length || lines.length < 2 || !lines[1])
- return this.commands.exec("insertstring", this, text);
-
- for (var i = ranges.length; i--;) {
- var range = ranges[i];
- if (!range.isEmpty())
- this.session.remove(range);
-
- this.session.insert(range.start, lines[i]);
+
+ this.$checkMultiselectChange = function(e, anchor) {
+ if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {
+ var range = this.multiSelect.ranges[0];
+ if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor)
+ return;
+ var pos = anchor == this.multiSelect.anchor
+ ? range.cursor == range.start ? range.end : range.start
+ : range.cursor;
+ if (pos.row != anchor.row
+ || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column)
+ this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange());
}
};
this.findAll = function(needle, options, additive) {
options = options || {};
options.needle = needle || options.needle;
+ if (options.needle == undefined) {
+ var range = this.selection.isEmpty()
+ ? this.selection.getWordRange()
+ : this.selection.getRange();
+ options.needle = this.session.getTextRange(range);
+ }
this.$search.set(options);
-
+
var ranges = this.$search.findAll(this.session);
if (!ranges.length)
return 0;
@@ -15024,7 +17276,9 @@ var Editor = require("./editor").Editor;
for (var i = ranges.length; i--; )
selection.addRange(ranges[i], true);
-
+ if (range && selection.rangeList.rangeAtPoint(range.start))
+ selection.addRange(range, true);
+
this.$blockScrolling -= 1;
return ranges.length;
@@ -15102,22 +17356,28 @@ var Editor = require("./editor").Editor;
range.start.column = tmp.start.column;
}
};
- this.selectMore = function(dir, skip) {
+ this.selectMore = function(dir, skip, stopAtFirst) {
var session = this.session;
var sel = session.multiSelect;
var range = sel.toOrientedRange();
if (range.isEmpty()) {
- var range = session.getWordRange(range.start.row, range.start.column);
- range.cursor = range.end;
+ range = session.getWordRange(range.start.row, range.start.column);
+ range.cursor = dir == -1 ? range.start : range.end;
this.multiSelect.addRange(range);
+ if (stopAtFirst)
+ return;
}
var needle = session.getTextRange(range);
var newRange = find(session, needle, dir);
if (newRange) {
newRange.cursor = dir == -1 ? newRange.start : newRange.end;
+ this.$blockScrolling += 1;
+ this.session.unfold(newRange);
this.multiSelect.addRange(newRange);
+ this.$blockScrolling -= 1;
+ this.renderer.scrollCursorIntoView(null, 0.5);
}
if (skip)
this.multiSelect.substractPoint(range.cursor);
@@ -15126,24 +17386,42 @@ var Editor = require("./editor").Editor;
var session = this.session;
var sel = session.multiSelect;
var ranges = sel.ranges;
-
- if (!ranges.length) {
+ var row = -1;
+ var sameRowRanges = ranges.filter(function(r) {
+ if (r.cursor.row == row)
+ return true;
+ row = r.cursor.row;
+ });
+
+ if (!ranges.length || sameRowRanges.length == ranges.length - 1) {
var range = this.selection.getRange();
var fr = range.start.row, lr = range.end.row;
+ var guessRange = fr == lr;
+ if (guessRange) {
+ var max = this.session.getLength();
+ var line;
+ do {
+ line = this.session.getLine(lr);
+ } while (/[=:]/.test(line) && ++lr < max);
+ do {
+ line = this.session.getLine(fr);
+ } while (/[=:]/.test(line) && --fr > 0);
+
+ if (fr < 0) fr = 0;
+ if (lr >= max) lr = max - 1;
+ }
var lines = this.session.doc.removeLines(fr, lr);
- lines = this.$reAlignText(lines);
- this.session.doc.insertLines(fr, lines);
- range.start.column = 0;
- range.end.column = lines[lines.length - 1].length;
+ lines = this.$reAlignText(lines, guessRange);
+ this.session.doc.insert({row: fr, column: 0}, lines.join("\n") + "\n");
+ if (!guessRange) {
+ range.start.column = 0;
+ range.end.column = lines[lines.length - 1].length;
+ }
this.selection.setRange(range);
} else {
- var row = -1;
- var sameRowRanges = ranges.filter(function(r) {
- if (r.cursor.row == row)
- return true;
- row = r.cursor.row;
+ sameRowRanges.forEach(function(r) {
+ sel.substractPoint(r.cursor);
});
- sel.$onRemoveRange(sameRowRanges);
var maxCol = 0;
var minSpace = Infinity;
@@ -15179,7 +17457,7 @@ var Editor = require("./editor").Editor;
}
};
- this.$reAlignText = function(lines) {
+ this.$reAlignText = function(lines, forceLeft) {
var isLeftAligned = true, isRightAligned = true;
var startW, textW, endW;
@@ -15208,7 +17486,8 @@ var Editor = require("./editor").Editor;
endW = m[3].length;
return m;
- }).map(isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);
+ }).map(forceLeft ? alignLeft :
+ isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);
function spaces(n) {
return lang.stringRepeat(" ", n);
@@ -15217,19 +17496,19 @@ var Editor = require("./editor").Editor;
function alignLeft(m) {
return !m[2] ? m[0] : spaces(startW) + m[2]
+ spaces(textW - m[2].length + endW)
- + m[4].replace(/^([=:])\s+/, "$1 ")
+ + m[4].replace(/^([=:])\s+/, "$1 ");
}
function alignRight(m) {
return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2]
+ spaces(endW, " ")
- + m[4].replace(/^([=:])\s+/, "$1 ")
+ + m[4].replace(/^([=:])\s+/, "$1 ");
}
function unAlign(m) {
return !m[2] ? m[0] : spaces(startW) + m[2]
+ spaces(endW)
- + m[4].replace(/^([=:])\s+/, "$1 ")
+ + m[4].replace(/^([=:])\s+/, "$1 ");
}
- }
+ };
}).call(Editor.prototype);
@@ -15238,27 +17517,33 @@ function isSamePoint(p1, p2) {
}
exports.onSessionChange = function(e) {
var session = e.session;
- if (!session.multiSelect) {
+ if (session && !session.multiSelect) {
session.$selectionMarkers = [];
session.selection.$initRangeList();
session.multiSelect = session.selection;
}
- this.multiSelect = session.multiSelect;
+ this.multiSelect = session && session.multiSelect;
var oldSession = e.oldSession;
if (oldSession) {
- oldSession.multiSelect.removeEventListener("addRange", this.$onAddRange);
- oldSession.multiSelect.removeEventListener("removeRange", this.$onRemoveRange);
- oldSession.multiSelect.removeEventListener("multiSelect", this.$onMultiSelect);
- oldSession.multiSelect.removeEventListener("singleSelect", this.$onSingleSelect);
+ oldSession.multiSelect.off("addRange", this.$onAddRange);
+ oldSession.multiSelect.off("removeRange", this.$onRemoveRange);
+ oldSession.multiSelect.off("multiSelect", this.$onMultiSelect);
+ oldSession.multiSelect.off("singleSelect", this.$onSingleSelect);
+ oldSession.multiSelect.lead.off("change", this.$checkMultiselectChange);
+ oldSession.multiSelect.anchor.off("change", this.$checkMultiselectChange);
}
- session.multiSelect.on("addRange", this.$onAddRange);
- session.multiSelect.on("removeRange", this.$onRemoveRange);
- session.multiSelect.on("multiSelect", this.$onMultiSelect);
- session.multiSelect.on("singleSelect", this.$onSingleSelect);
+ if (session) {
+ session.multiSelect.on("addRange", this.$onAddRange);
+ session.multiSelect.on("removeRange", this.$onRemoveRange);
+ session.multiSelect.on("multiSelect", this.$onMultiSelect);
+ session.multiSelect.on("singleSelect", this.$onSingleSelect);
+ session.multiSelect.lead.on("change", this.$checkMultiselectChange);
+ session.multiSelect.anchor.on("change", this.$checkMultiselectChange);
+ }
- if (this.inMultiSelectMode != session.selection.inMultiSelectMode) {
+ if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) {
if (session.selection.inMultiSelectMode)
this.$onMultiSelect();
else
@@ -15273,6 +17558,7 @@ function MultiSelect(editor) {
editor.$onMultiSelect = editor.$onMultiSelect.bind(editor);
editor.$onSingleSelect = editor.$onSingleSelect.bind(editor);
editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor);
+ editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor);
editor.$multiselectOnSessionChange(editor);
editor.on("changeSession", editor.$multiselectOnSessionChange);
@@ -15286,23 +17572,23 @@ function MultiSelect(editor) {
function addAltCursorListeners(editor){
var el = editor.textInput.getElement();
var altCursor = false;
- var contentEl = editor.renderer.content;
event.addListener(el, "keydown", function(e) {
- if (e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey)) {
+ var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey);
+ if (editor.$blockSelectEnabled && altDown) {
if (!altCursor) {
- contentEl.style.cursor = "crosshair";
+ editor.renderer.setMouseCursor("crosshair");
altCursor = true;
}
} else if (altCursor) {
- contentEl.style.cursor = "";
+ reset();
}
});
event.addListener(el, "keyup", reset);
event.addListener(el, "blur", reset);
- function reset() {
+ function reset(e) {
if (altCursor) {
- contentEl.style.cursor = "";
+ editor.renderer.setMouseCursor("");
altCursor = false;
}
}
@@ -15324,570 +17610,21 @@ require("./config").defineOptions(Editor.prototype, "editor", {
}
},
value: true
+ },
+ enableBlockSelect: {
+ set: function(val) {
+ this.$blockSelectEnabled = val;
+ },
+ value: true
}
-})
-
-
-
-});
-
-ace.define('ace/mouse/multi_select_handler', ['require', 'exports', 'module' , 'ace/lib/event'], function(require, exports, module) {
-
-var event = require("../lib/event");
-function isSamePoint(p1, p2) {
- return p1.row == p2.row && p1.column == p2.column;
-}
-
-function onMouseDown(e) {
- var ev = e.domEvent;
- var alt = ev.altKey;
- var shift = ev.shiftKey;
- var ctrl = e.getAccelKey();
- var button = e.getButton();
-
- if (e.editor.inMultiSelectMode && button == 2) {
- e.editor.textInput.onContextMenu(e.domEvent);
- return;
- }
-
- if (!ctrl && !alt) {
- if (button == 0 && e.editor.inMultiSelectMode)
- e.editor.exitMultiSelectMode();
- return;
- }
-
- var editor = e.editor;
- var selection = editor.selection;
- var isMultiSelect = editor.inMultiSelectMode;
- var pos = e.getDocumentPosition();
- var cursor = selection.getCursor();
- var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor));
-
-
- var mouseX = e.x, mouseY = e.y;
- var onMouseSelection = function(e) {
- mouseX = e.clientX;
- mouseY = e.clientY;
- };
-
- var blockSelect = function() {
- var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
- var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column);
-
- if (isSamePoint(screenCursor, newCursor)
- && isSamePoint(cursor, selection.selectionLead))
- return;
- screenCursor = newCursor;
-
- editor.selection.moveCursorToPosition(cursor);
- editor.selection.clearSelection();
- editor.renderer.scrollCursorIntoView();
-
- editor.removeSelectionMarkers(rectSel);
- rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);
- rectSel.forEach(editor.addSelectionMarker, editor);
- editor.updateSelectionMarkers();
- };
-
- var session = editor.session;
- var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
- var screenCursor = screenAnchor;
-
-
-
- if (ctrl && !shift && !alt && button == 0) {
- if (!isMultiSelect && inSelection)
- return; // dragging
-
- if (!isMultiSelect) {
- var range = selection.toOrientedRange();
- editor.addSelectionMarker(range);
- }
-
- var oldRange = selection.rangeList.rangeAtPoint(pos);
-
- editor.once("mouseup", function() {
- var tmpSel = selection.toOrientedRange();
-
- if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor))
- selection.substractPoint(tmpSel.cursor);
- else {
- if (range) {
- editor.removeSelectionMarker(range);
- selection.addRange(range);
- }
- selection.addRange(tmpSel);
- }
- });
-
- } else if (alt && button == 0) {
- e.stop();
-
- if (isMultiSelect && !ctrl)
- selection.toSingleRange();
- else if (!isMultiSelect && ctrl)
- selection.addRange();
-
- var rectSel = [];
- if (shift) {
- screenAnchor = session.documentToScreenPosition(selection.lead);
- blockSelect();
- } else {
- selection.moveCursorToPosition(pos);
- selection.clearSelection();
- }
-
-
- var onMouseSelectionEnd = function(e) {
- clearInterval(timerId);
- editor.removeSelectionMarkers(rectSel);
- for (var i = 0; i < rectSel.length; i++)
- selection.addRange(rectSel[i]);
- };
-
- var onSelectionInterval = blockSelect;
-
- event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);
- var timerId = setInterval(function() {onSelectionInterval();}, 20);
-
- return e.preventDefault();
- }
-}
-
-
-exports.onMouseDown = onMouseDown;
-
});
-ace.define('ace/commands/multi_select_commands', ['require', 'exports', 'module' , 'ace/keyboard/hash_handler'], function(require, exports, module) {
-exports.defaultCommands = [{
- name: "addCursorAbove",
- exec: function(editor) { editor.selectMoreLines(-1); },
- bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"},
- readonly: true
-}, {
- name: "addCursorBelow",
- exec: function(editor) { editor.selectMoreLines(1); },
- bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"},
- readonly: true
-}, {
- name: "addCursorAboveSkipCurrent",
- exec: function(editor) { editor.selectMoreLines(-1, true); },
- bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"},
- readonly: true
-}, {
- name: "addCursorBelowSkipCurrent",
- exec: function(editor) { editor.selectMoreLines(1, true); },
- bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"},
- readonly: true
-}, {
- name: "selectMoreBefore",
- exec: function(editor) { editor.selectMore(-1); },
- bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"},
- readonly: true
-}, {
- name: "selectMoreAfter",
- exec: function(editor) { editor.selectMore(1); },
- bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"},
- readonly: true
-}, {
- name: "selectNextBefore",
- exec: function(editor) { editor.selectMore(-1, true); },
- bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"},
- readonly: true
-}, {
- name: "selectNextAfter",
- exec: function(editor) { editor.selectMore(1, true); },
- bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"},
- readonly: true
-}, {
- name: "splitIntoLines",
- exec: function(editor) { editor.multiSelect.splitIntoLines(); },
- bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"},
- readonly: true
-}, {
- name: "alignCursors",
- exec: function(editor) { editor.alignCursors(); },
- bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"}
-}];
-exports.multiSelectCommands = [{
- name: "singleSelection",
- bindKey: "esc",
- exec: function(editor) { editor.exitMultiSelectMode(); },
- readonly: true,
- isAvailable: function(editor) {return editor && editor.inMultiSelectMode}
-}];
-var HashHandler = require("../keyboard/hash_handler").HashHandler;
-exports.keyboardHandler = new HashHandler(exports.multiSelectCommands);
});
-ace.define('ace/worker/worker_client', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/config'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var EventEmitter = require("../lib/event_emitter").EventEmitter;
-var config = require("../config");
-
-var WorkerClient = function(topLevelNamespaces, mod, classname) {
- this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);
- this.changeListener = this.changeListener.bind(this);
- this.onMessage = this.onMessage.bind(this);
- this.onError = this.onError.bind(this);
- if (require.nameToUrl && !require.toUrl)
- require.toUrl = require.nameToUrl;
-
- var workerUrl;
- if (config.get("packaged") || !require.toUrl) {
- workerUrl = config.moduleUrl(mod, "worker");
- } else {
- var normalizePath = this.$normalizePath;
- workerUrl = normalizePath(require.toUrl("ace/worker/worker.js", null, "_"));
-
- var tlns = {};
- topLevelNamespaces.forEach(function(ns) {
- tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, ""));
- });
- }
-
- this.$worker = new Worker(workerUrl);
- this.$worker.postMessage({
- init : true,
- tlns: tlns,
- module: mod,
- classname: classname
- });
-
- this.callbackId = 1;
- this.callbacks = {};
-
- this.$worker.onerror = this.onError;
- this.$worker.onmessage = this.onMessage;
-};
-
-(function(){
-
- oop.implement(this, EventEmitter);
-
- this.onError = function(e) {
- window.console && console.log && console.log(e);
- throw e;
- };
-
- this.onMessage = function(e) {
- var msg = e.data;
- switch(msg.type) {
- case "log":
- window.console && console.log && console.log.apply(console, msg.data);
- break;
-
- case "event":
- this._emit(msg.name, {data: msg.data});
- break;
-
- case "call":
- var callback = this.callbacks[msg.id];
- if (callback) {
- callback(msg.data);
- delete this.callbacks[msg.id];
- }
- break;
- }
- };
-
- this.$normalizePath = function(path) {
- if (!location.host) // needed for file:// protocol
- return path;
- path = path.replace(/^[a-z]+:\/\/[^\/]+/, ""); // Remove domain name and rebuild it
- path = location.protocol + "//" + location.host
- + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
- + "/" + path.replace(/^[\/]+/, "");
- return path;
- };
-
- this.terminate = function() {
- this._emit("terminate", {});
- this.deltaQueue = null;
- this.$worker.terminate();
- this.$worker = null;
- this.$doc.removeEventListener("change", this.changeListener);
- this.$doc = null;
- };
-
- this.send = function(cmd, args) {
- this.$worker.postMessage({command: cmd, args: args});
- };
-
- this.call = function(cmd, args, callback) {
- if (callback) {
- var id = this.callbackId++;
- this.callbacks[id] = callback;
- args.push(id);
- }
- this.send(cmd, args);
- };
-
- this.emit = function(event, data) {
- try {
- this.$worker.postMessage({event: event, data: {data: data.data}});
- }
- catch(ex) {}
- };
-
- this.attachToDocument = function(doc) {
- if(this.$doc)
- this.terminate();
-
- this.$doc = doc;
- this.call("setValue", [doc.getValue()]);
- doc.on("change", this.changeListener);
- };
-
- this.changeListener = function(e) {
- if (!this.deltaQueue) {
- this.deltaQueue = [e.data];
- setTimeout(this.$sendDeltaQueue, 1);
- } else
- this.deltaQueue.push(e.data);
- };
-
- this.$sendDeltaQueue = function() {
- var q = this.deltaQueue;
- if (!q) return;
- this.deltaQueue = null;
- if (q.length > 20 && q.length > this.$doc.getLength() >> 1) {
- this.call("setValue", [this.$doc.getValue()]);
- } else
- this.emit("change", {data: q});
- }
-
-}).call(WorkerClient.prototype);
-
-
-var UIWorkerClient = function(topLevelNamespaces, mod, classname) {
- this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);
- this.changeListener = this.changeListener.bind(this);
- this.callbackId = 1;
- this.callbacks = {};
- this.messageBuffer = [];
-
- var main = null;
- var sender = Object.create(EventEmitter);
- var _self = this;
-
- this.$worker = {};
- this.$worker.terminate = function() {};
- this.$worker.postMessage = function(e) {
- _self.messageBuffer.push(e);
- main && setTimeout(processNext);
- };
-
- var processNext = function() {
- var msg = _self.messageBuffer.shift();
- if (msg.command)
- main[msg.command].apply(main, msg.args);
- else if (msg.event)
- sender._emit(msg.event, msg.data);
- };
-
- sender.postMessage = function(msg) {
- _self.onMessage({data: msg});
- };
- sender.callback = function(data, callbackId) {
- this.postMessage({type: "call", id: callbackId, data: data});
- };
- sender.emit = function(name, data) {
- this.postMessage({type: "event", name: name, data: data});
- };
-
- config.loadModule(["worker", mod], function(Main) {
- main = new Main[classname](sender);
- while (_self.messageBuffer.length)
- processNext();
- });
-};
-
-UIWorkerClient.prototype = WorkerClient.prototype;
-
-exports.UIWorkerClient = UIWorkerClient;
-exports.WorkerClient = WorkerClient;
-
-});
-ace.define('ace/placeholder', ['require', 'exports', 'module' , 'ace/range', 'ace/lib/event_emitter', 'ace/lib/oop'], function(require, exports, module) {
-
-
-var Range = require("./range").Range;
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var oop = require("./lib/oop");
-
-var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) {
- var _self = this;
- this.length = length;
- this.session = session;
- this.doc = session.getDocument();
- this.mainClass = mainClass;
- this.othersClass = othersClass;
- this.$onUpdate = this.onUpdate.bind(this);
- this.doc.on("change", this.$onUpdate);
- this.$others = others;
-
- this.$onCursorChange = function() {
- setTimeout(function() {
- _self.onCursorChange();
- });
- };
-
- this.$pos = pos;
- var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1};
- this.$undoStackDepth = undoStack.length;
- this.setup();
-
- session.selection.on("changeCursor", this.$onCursorChange);
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
- this.setup = function() {
- var _self = this;
- var doc = this.doc;
- var session = this.session;
- var pos = this.$pos;
-
- this.pos = doc.createAnchor(pos.row, pos.column);
- this.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);
- this.pos.on("change", function(event) {
- session.removeMarker(_self.markerId);
- _self.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.mainClass, null, false);
- });
- this.others = [];
- this.$others.forEach(function(other) {
- var anchor = doc.createAnchor(other.row, other.column);
- _self.others.push(anchor);
- });
- session.setUndoSelect(false);
- };
- this.showOtherMarkers = function() {
- if(this.othersActive) return;
- var session = this.session;
- var _self = this;
- this.othersActive = true;
- this.others.forEach(function(anchor) {
- anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false);
- anchor.on("change", function(event) {
- session.removeMarker(anchor.markerId);
- anchor.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.othersClass, null, false);
- });
- });
- };
- this.hideOtherMarkers = function() {
- if(!this.othersActive) return;
- this.othersActive = false;
- for (var i = 0; i < this.others.length; i++) {
- this.session.removeMarker(this.others[i].markerId);
- }
- };
- this.onUpdate = function(event) {
- var delta = event.data;
- var range = delta.range;
- if(range.start.row !== range.end.row) return;
- if(range.start.row !== this.pos.row) return;
- if (this.$updating) return;
- this.$updating = true;
- var lengthDiff = delta.action === "insertText" ? range.end.column - range.start.column : range.start.column - range.end.column;
-
- if(range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1) {
- var distanceFromStart = range.start.column - this.pos.column;
- this.length += lengthDiff;
- if(!this.session.$fromUndo) {
- if(delta.action === "insertText") {
- for (var i = this.others.length - 1; i >= 0; i--) {
- var otherPos = this.others[i];
- var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
- if(otherPos.row === range.start.row && range.start.column < otherPos.column)
- newPos.column += lengthDiff;
- this.doc.insert(newPos, delta.text);
- }
- } else if(delta.action === "removeText") {
- for (var i = this.others.length - 1; i >= 0; i--) {
- var otherPos = this.others[i];
- var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
- if(otherPos.row === range.start.row && range.start.column < otherPos.column)
- newPos.column += lengthDiff;
- this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));
- }
- }
- if(range.start.column === this.pos.column && delta.action === "insertText") {
- setTimeout(function() {
- this.pos.setPosition(this.pos.row, this.pos.column - lengthDiff);
- for (var i = 0; i < this.others.length; i++) {
- var other = this.others[i];
- var newPos = {row: other.row, column: other.column - lengthDiff};
- if(other.row === range.start.row && range.start.column < other.column)
- newPos.column += lengthDiff;
- other.setPosition(newPos.row, newPos.column);
- }
- }.bind(this), 0);
- }
- else if(range.start.column === this.pos.column && delta.action === "removeText") {
- setTimeout(function() {
- for (var i = 0; i < this.others.length; i++) {
- var other = this.others[i];
- if(other.row === range.start.row && range.start.column < other.column) {
- other.setPosition(other.row, other.column - lengthDiff);
- }
- }
- }.bind(this), 0);
- }
- }
- this.pos._emit("change", {value: this.pos});
- for (var i = 0; i < this.others.length; i++) {
- this.others[i]._emit("change", {value: this.others[i]});
- }
- }
- this.$updating = false;
- };
-
- this.onCursorChange = function(event) {
- if (this.$updating) return;
- var pos = this.session.selection.getCursor();
- if(pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) {
- this.showOtherMarkers();
- this._emit("cursorEnter", event);
- } else {
- this.hideOtherMarkers();
- this._emit("cursorLeave", event);
- }
- };
- this.detach = function() {
- this.session.removeMarker(this.markerId);
- this.hideOtherMarkers();
- this.doc.removeEventListener("change", this.$onUpdate);
- this.session.selection.removeEventListener("changeCursor", this.$onCursorChange);
- this.pos.detach();
- for (var i = 0; i < this.others.length; i++) {
- this.others[i].detach();
- }
- this.session.setUndoSelect(true);
- };
- this.cancel = function() {
- if(this.$undoStackDepth === -1)
- throw Error("Canceling placeholders only supported with undo manager attached to session.");
- var undoManager = this.session.getUndoManager();
- var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth;
- for (var i = 0; i < undosRequired; i++) {
- undoManager.undo(true);
- }
- };
-}).call(PlaceHolder.prototype);
-
-
-exports.PlaceHolder = PlaceHolder;
-});
-
-ace.define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../../range").Range;
@@ -15950,7 +17687,7 @@ var FoldMode = exports.FoldMode = function() {};
var fw = session.foldWidgets[end.row];
if (fw == null)
- fw = this.getFoldWidget(session, end.row);
+ fw = session.getFoldWidget(end.row);
if (fw == "start" && end.row > start.row) {
end.row --;
@@ -15975,8 +17712,8 @@ var FoldMode = exports.FoldMode = function() {};
});
-ace.define('ace/theme/textmate', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
-
+ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+"use strict";
exports.isDark = false;
exports.cssClass = "ace-tm";
@@ -15993,13 +17730,10 @@ background-color: #6B72E6;\
}\
.ace-tm {\
background-color: #FFFFFF;\
+color: black;\
}\
.ace-tm .ace_cursor {\
-border-left: 2px solid black;\
-}\
-.ace-tm .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid black;\
+color: black;\
}\
.ace-tm .ace_invisible {\
color: rgb(191, 191, 191);\
@@ -16108,14 +17842,531 @@ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZ
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});
-;
+
+ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var Range = require("./range").Range;
+
+
+function LineWidgets(session) {
+ this.session = session;
+ this.session.widgetManager = this;
+ this.session.getRowLength = this.getRowLength;
+ this.session.$getWidgetScreenLength = this.$getWidgetScreenLength;
+ this.updateOnChange = this.updateOnChange.bind(this);
+ this.renderWidgets = this.renderWidgets.bind(this);
+ this.measureWidgets = this.measureWidgets.bind(this);
+ this.session._changedWidgets = [];
+ this.$onChangeEditor = this.$onChangeEditor.bind(this);
+
+ this.session.on("change", this.updateOnChange);
+ this.session.on("changeEditor", this.$onChangeEditor);
+}
+
+(function() {
+ this.getRowLength = function(row) {
+ var h;
+ if (this.lineWidgets)
+ h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;
+ else
+ h = 0;
+ if (!this.$useWrapMode || !this.$wrapData[row]) {
+ return 1 + h;
+ } else {
+ return this.$wrapData[row].length + 1 + h;
+ }
+ };
+
+ this.$getWidgetScreenLength = function() {
+ var screenRows = 0;
+ this.lineWidgets.forEach(function(w){
+ if (w && w.rowCount)
+ screenRows +=w.rowCount;
+ });
+ return screenRows;
+ };
+
+ this.$onChangeEditor = function(e) {
+ this.attach(e.editor);
+ };
+
+ this.attach = function(editor) {
+ if (editor && editor.widgetManager && editor.widgetManager != this)
+ editor.widgetManager.detach();
+
+ if (this.editor == editor)
+ return;
+
+ this.detach();
+ this.editor = editor;
+
+ if (editor) {
+ editor.widgetManager = this;
+ editor.renderer.on("beforeRender", this.measureWidgets);
+ editor.renderer.on("afterRender", this.renderWidgets);
+ }
+ };
+ this.detach = function(e) {
+ var editor = this.editor;
+ if (!editor)
+ return;
+
+ this.editor = null;
+ editor.widgetManager = null;
+
+ editor.renderer.off("beforeRender", this.measureWidgets);
+ editor.renderer.off("afterRender", this.renderWidgets);
+ var lineWidgets = this.session.lineWidgets;
+ lineWidgets && lineWidgets.forEach(function(w) {
+ if (w && w.el && w.el.parentNode) {
+ w._inDocument = false;
+ w.el.parentNode.removeChild(w.el);
+ }
+ });
+ };
+
+ this.updateOnChange = function(e) {
+ var lineWidgets = this.session.lineWidgets;
+ if (!lineWidgets) return;
+
+ var delta = e.data;
+ var range = delta.range;
+ var startRow = range.start.row;
+ var len = range.end.row - startRow;
+
+ if (len === 0) {
+ } else if (delta.action == "removeText" || delta.action == "removeLines") {
+ var removed = lineWidgets.splice(startRow + 1, len);
+ removed.forEach(function(w) {
+ w && this.removeLineWidget(w);
+ }, this);
+ this.$updateRows();
+ } else {
+ var args = new Array(len);
+ args.unshift(startRow, 0);
+ lineWidgets.splice.apply(lineWidgets, args);
+ this.$updateRows();
+ }
+ };
+
+ this.$updateRows = function() {
+ var lineWidgets = this.session.lineWidgets;
+ if (!lineWidgets) return;
+ var noWidgets = true;
+ lineWidgets.forEach(function(w, i) {
+ if (w) {
+ noWidgets = false;
+ w.row = i;
+ }
+ });
+ if (noWidgets)
+ this.session.lineWidgets = null;
+ };
+
+ this.addLineWidget = function(w) {
+ if (!this.session.lineWidgets)
+ this.session.lineWidgets = new Array(this.session.getLength());
+
+ this.session.lineWidgets[w.row] = w;
+
+ var renderer = this.editor.renderer;
+ if (w.html && !w.el) {
+ w.el = dom.createElement("div");
+ w.el.innerHTML = w.html;
+ }
+ if (w.el) {
+ dom.addCssClass(w.el, "ace_lineWidgetContainer");
+ w.el.style.position = "absolute";
+ w.el.style.zIndex = 5;
+ renderer.container.appendChild(w.el);
+ w._inDocument = true;
+ }
+
+ if (!w.coverGutter) {
+ w.el.style.zIndex = 3;
+ }
+ if (!w.pixelHeight) {
+ w.pixelHeight = w.el.offsetHeight;
+ }
+ if (w.rowCount == null)
+ w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight;
+
+ this.session._emit("changeFold", {data:{start:{row: w.row}}});
+
+ this.$updateRows();
+ this.renderWidgets(null, renderer);
+ return w;
+ };
+
+ this.removeLineWidget = function(w) {
+ w._inDocument = false;
+ if (w.el && w.el.parentNode)
+ w.el.parentNode.removeChild(w.el);
+ if (w.editor && w.editor.destroy) try {
+ w.editor.destroy();
+ } catch(e){}
+ if (this.session.lineWidgets)
+ this.session.lineWidgets[w.row] = undefined;
+ this.session._emit("changeFold", {data:{start:{row: w.row}}});
+ this.$updateRows();
+ };
+
+ this.onWidgetChanged = function(w) {
+ this.session._changedWidgets.push(w);
+ this.editor && this.editor.renderer.updateFull();
+ };
+
+ this.measureWidgets = function(e, renderer) {
+ var changedWidgets = this.session._changedWidgets;
+ var config = renderer.layerConfig;
+
+ if (!changedWidgets || !changedWidgets.length) return;
+ var min = Infinity;
+ for (var i = 0; i < changedWidgets.length; i++) {
+ var w = changedWidgets[i];
+ if (!w._inDocument) {
+ w._inDocument = true;
+ renderer.container.appendChild(w.el);
+ }
+
+ w.h = w.el.offsetHeight;
+
+ if (!w.fixedWidth) {
+ w.w = w.el.offsetWidth;
+ w.screenWidth = Math.ceil(w.w / config.characterWidth);
+ }
+
+ var rowCount = w.h / config.lineHeight;
+ if (w.coverLine) {
+ rowCount -= this.session.getRowLineCount(w.row);
+ if (rowCount < 0)
+ rowCount = 0;
+ }
+ if (w.rowCount != rowCount) {
+ w.rowCount = rowCount;
+ if (w.row < min)
+ min = w.row;
+ }
+ }
+ if (min != Infinity) {
+ this.session._emit("changeFold", {data:{start:{row: min}}});
+ this.session.lineWidgetWidth = null;
+ }
+ this.session._changedWidgets = [];
+ };
+
+ this.renderWidgets = function(e, renderer) {
+ var config = renderer.layerConfig;
+ var lineWidgets = this.session.lineWidgets;
+ if (!lineWidgets)
+ return;
+ var first = Math.min(this.firstRow, config.firstRow);
+ var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length);
+
+ while (first > 0 && !lineWidgets[first])
+ first--;
+
+ this.firstRow = config.firstRow;
+ this.lastRow = config.lastRow;
+
+ renderer.$cursorLayer.config = config;
+ for (var i = first; i <= last; i++) {
+ var w = lineWidgets[i];
+ if (!w || !w.el) continue;
+
+ if (!w._inDocument) {
+ w._inDocument = true;
+ renderer.container.appendChild(w.el);
+ }
+ var top = renderer.$cursorLayer.getPixelPosition({row: i, column:0}, true).top;
+ if (!w.coverLine)
+ top += config.lineHeight * this.session.getRowLineCount(w.row);
+ w.el.style.top = top - config.offset + "px";
+
+ var left = w.coverGutter ? 0 : renderer.gutterWidth;
+ if (!w.fixedWidth)
+ left -= renderer.scrollLeft;
+ w.el.style.left = left + "px";
+
+ if (w.fixedWidth) {
+ w.el.style.right = renderer.scrollBar.getWidth() + "px";
+ } else {
+ w.el.style.right = "";
+ }
+ }
+ };
+
+}).call(LineWidgets.prototype);
+
+
+exports.LineWidgets = LineWidgets;
+
+});
+
+ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"], function(require, exports, module) {
+"use strict";
+var LineWidgets = require("../line_widgets").LineWidgets;
+var dom = require("../lib/dom");
+var Range = require("../range").Range;
+
+function binarySearch(array, needle, comparator) {
+ var first = 0;
+ var last = array.length - 1;
+
+ while (first <= last) {
+ var mid = (first + last) >> 1;
+ var c = comparator(needle, array[mid]);
+ if (c > 0)
+ first = mid + 1;
+ else if (c < 0)
+ last = mid - 1;
+ else
+ return mid;
+ }
+ return -(first + 1);
+}
+
+function findAnnotations(session, row, dir) {
+ var annotations = session.getAnnotations().sort(Range.comparePoints);
+ if (!annotations.length)
+ return;
+
+ var i = binarySearch(annotations, {row: row, column: -1}, Range.comparePoints);
+ if (i < 0)
+ i = -i - 1;
+
+ if (i >= annotations.length)
+ i = dir > 0 ? 0 : annotations.length - 1;
+ else if (i === 0 && dir < 0)
+ i = annotations.length - 1;
+
+ var annotation = annotations[i];
+ if (!annotation || !dir)
+ return;
+
+ if (annotation.row === row) {
+ do {
+ annotation = annotations[i += dir];
+ } while (annotation && annotation.row === row);
+ if (!annotation)
+ return annotations.slice();
+ }
+
+
+ var matched = [];
+ row = annotation.row;
+ do {
+ matched[dir < 0 ? "unshift" : "push"](annotation);
+ annotation = annotations[i += dir];
+ } while (annotation && annotation.row == row);
+ return matched.length && matched;
+}
+
+exports.showErrorMarker = function(editor, dir) {
+ var session = editor.session;
+ if (!session.widgetManager) {
+ session.widgetManager = new LineWidgets(session);
+ session.widgetManager.attach(editor);
+ }
+
+ var pos = editor.getCursorPosition();
+ var row = pos.row;
+ var oldWidget = session.lineWidgets && session.lineWidgets[row];
+ if (oldWidget) {
+ oldWidget.destroy();
+ } else {
+ row -= dir;
+ }
+ var annotations = findAnnotations(session, row, dir);
+ var gutterAnno;
+ if (annotations) {
+ var annotation = annotations[0];
+ pos.column = (annotation.pos && typeof annotation.column != "number"
+ ? annotation.pos.sc
+ : annotation.column) || 0;
+ pos.row = annotation.row;
+ gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row];
+ } else if (oldWidget) {
+ return;
+ } else {
+ gutterAnno = {
+ text: ["Looks good!"],
+ className: "ace_ok"
+ };
+ }
+ editor.session.unfold(pos.row);
+ editor.selection.moveToPosition(pos);
+
+ var w = {
+ row: pos.row,
+ fixedWidth: true,
+ coverGutter: true,
+ el: dom.createElement("div")
+ };
+ var el = w.el.appendChild(dom.createElement("div"));
+ var arrow = w.el.appendChild(dom.createElement("div"));
+ arrow.className = "error_widget_arrow " + gutterAnno.className;
+
+ var left = editor.renderer.$cursorLayer
+ .getPixelPosition(pos).left;
+ arrow.style.left = left + editor.renderer.gutterWidth - 5 + "px";
+
+ w.el.className = "error_widget_wrapper";
+ el.className = "error_widget " + gutterAnno.className;
+ el.innerHTML = gutterAnno.text.join("<br>");
+
+ el.appendChild(dom.createElement("div"));
+
+ var kb = function(_, hashId, keyString) {
+ if (hashId === 0 && (keyString === "esc" || keyString === "return")) {
+ w.destroy();
+ return {command: "null"};
+ }
+ };
+
+ w.destroy = function() {
+ if (editor.$mouseHandler.isMousePressed)
+ return;
+ editor.keyBinding.removeKeyboardHandler(kb);
+ session.widgetManager.removeLineWidget(w);
+ editor.off("changeSelection", w.destroy);
+ editor.off("changeSession", w.destroy);
+ editor.off("mouseup", w.destroy);
+ editor.off("change", w.destroy);
+ };
+
+ editor.keyBinding.addKeyboardHandler(kb);
+ editor.on("changeSelection", w.destroy);
+ editor.on("changeSession", w.destroy);
+ editor.on("mouseup", w.destroy);
+ editor.on("change", w.destroy);
+
+ editor.session.widgetManager.addLineWidget(w);
+
+ w.el.onmousedown = editor.focus.bind(editor);
+
+ editor.renderer.scrollCursorIntoView(null, 0.5, {bottom: w.el.offsetHeight});
+};
+
+
+dom.importCssString("\
+ .error_widget_wrapper {\
+ background: inherit;\
+ color: inherit;\
+ border:none\
+ }\
+ .error_widget {\
+ border-top: solid 2px;\
+ border-bottom: solid 2px;\
+ margin: 5px 0;\
+ padding: 10px 40px;\
+ white-space: pre-wrap;\
+ }\
+ .error_widget.ace_error, .error_widget_arrow.ace_error{\
+ border-color: #ff5a5a\
+ }\
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{\
+ border-color: #F1D817\
+ }\
+ .error_widget.ace_info, .error_widget_arrow.ace_info{\
+ border-color: #5a5a5a\
+ }\
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{\
+ border-color: #5aaa5a\
+ }\
+ .error_widget_arrow {\
+ position: absolute;\
+ border: solid 5px;\
+ border-top-color: transparent!important;\
+ border-right-color: transparent!important;\
+ border-left-color: transparent!important;\
+ top: -5px;\
+ }\
+", "");
+
+});
+
+ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], function(require, exports, module) {
+"use strict";
+
+require("./lib/fixoldbrowsers");
+
+var dom = require("./lib/dom");
+var event = require("./lib/event");
+
+var Editor = require("./editor").Editor;
+var EditSession = require("./edit_session").EditSession;
+var UndoManager = require("./undomanager").UndoManager;
+var Renderer = require("./virtual_renderer").VirtualRenderer;
+require("./worker/worker_client");
+require("./keyboard/hash_handler");
+require("./placeholder");
+require("./multi_select");
+require("./mode/folding/fold_mode");
+require("./theme/textmate");
+require("./ext/error_marker");
+
+exports.config = require("./config");
+exports.require = require;
+exports.edit = function(el) {
+ if (typeof(el) == "string") {
+ var _id = el;
+ el = document.getElementById(_id);
+ if (!el)
+ throw new Error("ace.edit can't find div #" + _id);
+ }
+
+ if (el && el.env && el.env.editor instanceof Editor)
+ return el.env.editor;
+
+ var value = "";
+ if (el && /input|textarea/i.test(el.tagName)) {
+ var oldNode = el;
+ value = oldNode.value;
+ el = dom.createElement("pre");
+ oldNode.parentNode.replaceChild(el, oldNode);
+ } else {
+ value = dom.getInnerText(el);
+ el.innerHTML = '';
+ }
+
+ var doc = exports.createEditSession(value);
+
+ var editor = new Editor(new Renderer(el));
+ editor.setSession(doc);
+
+ var env = {
+ document: doc,
+ editor: editor,
+ onResize: editor.resize.bind(editor, null)
+ };
+ if (oldNode) env.textarea = oldNode;
+ event.addListener(window, "resize", env.onResize);
+ editor.on("destroy", function() {
+ event.removeListener(window, "resize", env.onResize);
+ env.editor.container.env = null; // prevent memory leak on old ie
+ });
+ editor.container.env = editor.env = env;
+ return editor;
+};
+exports.createEditSession = function(text, mode) {
+ var doc = new EditSession(text, mode);
+ doc.setUndoManager(new UndoManager());
+ return doc;
+}
+exports.EditSession = EditSession;
+exports.UndoManager = UndoManager;
+});
(function() {
ace.require(["ace/ace"], function(a) {
- a && a.config.init();
+ a && a.config.init(true);
if (!window.ace)
- window.ace = {};
+ window.ace = a;
for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
+ window.ace[key] = a[key];
});
})();
\ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-beautify.js b/js/vendor/ace/src-noconflict/ext-beautify.js
new file mode 100755
index 0000000..ba499b7
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/ext-beautify.js
@@ -0,0 +1,334 @@
+ace.define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+var TokenIterator = require("ace/token_iterator").TokenIterator;
+exports.newLines = [{
+ type: 'support.php_tag',
+ value: '<?php'
+}, {
+ type: 'support.php_tag',
+ value: '<?'
+}, {
+ type: 'support.php_tag',
+ value: '?>'
+}, {
+ type: 'paren.lparen',
+ value: '{',
+ indent: true
+}, {
+ type: 'paren.rparen',
+ breakBefore: true,
+ value: '}',
+ indent: false
+}, {
+ type: 'paren.rparen',
+ breakBefore: true,
+ value: '})',
+ indent: false,
+ dontBreak: true
+}, {
+ type: 'comment'
+}, {
+ type: 'text',
+ value: ';'
+}, {
+ type: 'text',
+ value: ':',
+ context: 'php'
+}, {
+ type: 'keyword',
+ value: 'case',
+ indent: true,
+ dontBreak: true
+}, {
+ type: 'keyword',
+ value: 'default',
+ indent: true,
+ dontBreak: true
+}, {
+ type: 'keyword',
+ value: 'break',
+ indent: false,
+ dontBreak: true
+}, {
+ type: 'punctuation.doctype.end',
+ value: '>'
+}, {
+ type: 'meta.tag.punctuation.end',
+ value: '>'
+}, {
+ type: 'meta.tag.punctuation.begin',
+ value: '<',
+ blockTag: true,
+ indent: true,
+ dontBreak: true
+}, {
+ type: 'meta.tag.punctuation.begin',
+ value: '</',
+ indent: false,
+ breakBefore: true,
+ dontBreak: true
+}, {
+ type: 'punctuation.operator',
+ value: ';'
+}];
+
+exports.spaces = [{
+ type: 'xml-pe',
+ prepend: true
+},{
+ type: 'entity.other.attribute-name',
+ prepend: true
+}, {
+ type: 'storage.type',
+ value: 'var',
+ append: true
+}, {
+ type: 'storage.type',
+ value: 'function',
+ append: true
+}, {
+ type: 'keyword.operator',
+ value: '='
+}, {
+ type: 'keyword',
+ value: 'as',
+ prepend: true,
+ append: true
+}, {
+ type: 'keyword',
+ value: 'function',
+ append: true
+}, {
+ type: 'support.function',
+ next: /[^\(]/,
+ append: true
+}, {
+ type: 'keyword',
+ value: 'or',
+ append: true,
+ prepend: true
+}, {
+ type: 'keyword',
+ value: 'and',
+ append: true,
+ prepend: true
+}, {
+ type: 'keyword',
+ value: 'case',
+ append: true
+}, {
+ type: 'keyword.operator',
+ value: '||',
+ append: true,
+ prepend: true
+}, {
+ type: 'keyword.operator',
+ value: '&&',
+ append: true,
+ prepend: true
+}];
+exports.singleTags = ['!doctype','area','base','br','hr','input','img','link','meta'];
+
+exports.transform = function(iterator, maxPos, context) {
+ var token = iterator.getCurrentToken();
+
+ var newLines = exports.newLines;
+ var spaces = exports.spaces;
+ var singleTags = exports.singleTags;
+
+ var code = '';
+
+ var indentation = 0;
+ var dontBreak = false;
+ var tag;
+ var lastTag;
+ var lastToken = {};
+ var nextTag;
+ var nextToken = {};
+ var breakAdded = false;
+ var value = '';
+
+ while (token!==null) {
+ console.log(token);
+
+ if( !token ){
+ token = iterator.stepForward();
+ continue;
+ }
+ if( token.type == 'support.php_tag' && token.value != '?>' ){
+ context = 'php';
+ }
+ else if( token.type == 'support.php_tag' && token.value == '?>' ){
+ context = 'html';
+ }
+ else if( token.type == 'meta.tag.name.style' && context != 'css' ){
+ context = 'css';
+ }
+ else if( token.type == 'meta.tag.name.style' && context == 'css' ){
+ context = 'html';
+ }
+ else if( token.type == 'meta.tag.name.script' && context != 'js' ){
+ context = 'js';
+ }
+ else if( token.type == 'meta.tag.name.script' && context == 'js' ){
+ context = 'html';
+ }
+
+ nextToken = iterator.stepForward();
+ if (nextToken && nextToken.type.indexOf('meta.tag.name') == 0) {
+ nextTag = nextToken.value;
+ }
+ if ( lastToken.type == 'support.php_tag' && lastToken.value == '<?=') {
+ dontBreak = true;
+ }
+ if (token.type == 'meta.tag.name') {
+ token.value = token.value.toLowerCase();
+ }
+ if (token.type == 'text') {
+ token.value = token.value.trim();
+ }
+ if (!token.value) {
+ token = nextToken;
+ continue;
+ }
+ value = token.value;
+ for (var i in spaces) {
+ if (
+ token.type == spaces[i].type &&
+ (!spaces[i].value || token.value == spaces[i].value) &&
+ (
+ nextToken &&
+ (!spaces[i].next || spaces[i].next.test(nextToken.value))
+ )
+ ) {
+ if (spaces[i].prepend) {
+ value = ' ' + token.value;
+ }
+
+ if (spaces[i].append) {
+ value += ' ';
+ }
+ }
+ }
+ if (token.type.indexOf('meta.tag.name') == 0) {
+ tag = token.value;
+ }
+ breakAdded = false;
+ for (i in newLines) {
+ if (
+ token.type == newLines[i].type &&
+ (
+ !newLines[i].value ||
+ token.value == newLines[i].value
+ ) &&
+ (
+ !newLines[i].blockTag ||
+ singleTags.indexOf(nextTag) === -1
+ ) &&
+ (
+ !newLines[i].context ||
+ newLines[i].context === context
+ )
+ ) {
+ if (newLines[i].indent === false) {
+ indentation--;
+ }
+
+ if (
+ newLines[i].breakBefore &&
+ ( !newLines[i].prev || newLines[i].prev.test(lastToken.value) )
+ ) {
+ code += "\n";
+ breakAdded = true;
+ for (i = 0; i < indentation; i++) {
+ code += "\t";
+ }
+ }
+
+ break;
+ }
+ }
+
+ if (dontBreak===false) {
+ for (i in newLines) {
+ if (
+ lastToken.type == newLines[i].type &&
+ (
+ !newLines[i].value || lastToken.value == newLines[i].value
+ ) &&
+ (
+ !newLines[i].blockTag ||
+ singleTags.indexOf(tag) === -1
+ ) &&
+ (
+ !newLines[i].context ||
+ newLines[i].context === context
+ )
+ ) {
+ if (newLines[i].indent === true) {
+ indentation++;
+ }
+
+ if (!newLines[i].dontBreak && !breakAdded) {
+ code += "\n";
+ for (i = 0; i < indentation; i++) {
+ code += "\t";
+ }
+ }
+
+ break;
+ }
+ }
+ }
+
+ code += value;
+ if ( lastToken.type == 'support.php_tag' && lastToken.value == '?>' ) {
+ dontBreak = false;
+ }
+ lastTag = tag;
+
+ lastToken = token;
+
+ token = nextToken;
+
+ if (token===null) {
+ break;
+ }
+ }
+
+ return code;
+};
+
+
+
+});
+
+ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"], function(require, exports, module) {
+"use strict";
+var TokenIterator = require("ace/token_iterator").TokenIterator;
+
+var phpTransform = require("./beautify/php_rules").transform;
+
+exports.beautify = function(session) {
+ var iterator = new TokenIterator(session, 0, 0);
+ var token = iterator.getCurrentToken();
+
+ var context = session.$modeId.split("/").pop();
+
+ var code = phpTransform(iterator, context);
+ session.doc.setValue(code);
+};
+
+exports.commands = [{
+ name: "beautify",
+ exec: function(editor) {
+ exports.beautify(editor.session);
+ },
+ bindKey: "Ctrl-Shift-B"
+}]
+
+});
+ (function() {
+ ace.require(["ace/ext/beautify"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-chromevox.js b/js/vendor/ace/src-noconflict/ext-chromevox.js
new file mode 100755
index 0000000..0e07bab
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/ext-chromevox.js
@@ -0,0 +1,541 @@
+ace.define("ace/ext/chromevox",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) {
+var cvoxAce = {};
+cvoxAce.SpeechProperty;
+cvoxAce.Cursor;
+cvoxAce.Token;
+cvoxAce.Annotation;
+var CONSTANT_PROP = {
+ 'rate': 0.8,
+ 'pitch': 0.4,
+ 'volume': 0.9
+};
+var DEFAULT_PROP = {
+ 'rate': 1,
+ 'pitch': 0.5,
+ 'volume': 0.9
+};
+var ENTITY_PROP = {
+ 'rate': 0.8,
+ 'pitch': 0.8,
+ 'volume': 0.9
+};
+var KEYWORD_PROP = {
+ 'rate': 0.8,
+ 'pitch': 0.3,
+ 'volume': 0.9
+};
+var STORAGE_PROP = {
+ 'rate': 0.8,
+ 'pitch': 0.7,
+ 'volume': 0.9
+};
+var VARIABLE_PROP = {
+ 'rate': 0.8,
+ 'pitch': 0.8,
+ 'volume': 0.9
+};
+var DELETED_PROP = {
+ 'punctuationEcho': 'none',
+ 'relativePitch': -0.6
+};
+var ERROR_EARCON = 'ALERT_NONMODAL';
+var MODE_SWITCH_EARCON = 'ALERT_MODAL';
+var NO_MATCH_EARCON = 'INVALID_KEYPRESS';
+var INSERT_MODE_STATE = 'insertMode';
+var COMMAND_MODE_STATE = 'start';
+
+var REPLACE_LIST = [
+ {
+ substr: ';',
+ newSubstr: ' semicolon '
+ },
+ {
+ substr: ':',
+ newSubstr: ' colon '
+ }
+];
+var Command = {
+ SPEAK_ANNOT: 'annots',
+ SPEAK_ALL_ANNOTS: 'all_annots',
+ TOGGLE_LOCATION: 'toggle_location',
+ SPEAK_MODE: 'mode',
+ SPEAK_ROW_COL: 'row_col',
+ TOGGLE_DISPLACEMENT: 'toggle_displacement',
+ FOCUS_TEXT: 'focus_text'
+};
+var KEY_PREFIX = 'CONTROL + SHIFT ';
+cvoxAce.editor = null;
+var lastCursor = null;
+var annotTable = {};
+var shouldSpeakRowLocation = false;
+var shouldSpeakDisplacement = false;
+var changed = false;
+var vimState = null;
+var keyCodeToShortcutMap = {};
+var cmdToShortcutMap = {};
+var getKeyShortcutString = function(keyCode) {
+ return KEY_PREFIX + String.fromCharCode(keyCode);
+};
+var isVimMode = function() {
+ var keyboardHandler = cvoxAce.editor.keyBinding.getKeyboardHandler();
+ return keyboardHandler.$id === 'ace/keyboard/vim';
+};
+var getCurrentToken = function(cursor) {
+ return cvoxAce.editor.getSession().getTokenAt(cursor.row, cursor.column + 1);
+};
+var getCurrentLine = function(cursor) {
+ return cvoxAce.editor.getSession().getLine(cursor.row);
+};
+var onRowChange = function(currCursor) {
+ if (annotTable[currCursor.row]) {
+ cvox.Api.playEarcon(ERROR_EARCON);
+ }
+ if (shouldSpeakRowLocation) {
+ cvox.Api.stop();
+ speakChar(currCursor);
+ speakTokenQueue(getCurrentToken(currCursor));
+ speakLine(currCursor.row, 1);
+ } else {
+ speakLine(currCursor.row, 0);
+ }
+};
+var isWord = function(cursor) {
+ var line = getCurrentLine(cursor);
+ var lineSuffix = line.substr(cursor.column - 1);
+ if (cursor.column === 0) {
+ lineSuffix = ' ' + line;
+ }
+ var firstWordRegExp = /^\W(\w+)/;
+ var words = firstWordRegExp.exec(lineSuffix);
+ return words !== null;
+};
+var rules = {
+ 'constant': {
+ prop: CONSTANT_PROP
+ },
+ 'entity': {
+ prop: ENTITY_PROP
+ },
+ 'keyword': {
+ prop: KEYWORD_PROP
+ },
+ 'storage': {
+ prop: STORAGE_PROP
+ },
+ 'variable': {
+ prop: VARIABLE_PROP
+ },
+ 'meta': {
+ prop: DEFAULT_PROP,
+ replace: [
+ {
+ substr: '</',
+ newSubstr: ' closing tag '
+ },
+ {
+ substr: '/>',
+ newSubstr: ' close tag '
+ },
+ {
+ substr: '<',
+ newSubstr: ' tag start '
+ },
+ {
+ substr: '>',
+ newSubstr: ' tag end '
+ }
+ ]
+ }
+};
+var DEFAULT_RULE = {
+ prop: DEFAULT_RULE
+};
+var expand = function(value, replaceRules) {
+ var newValue = value;
+ for (var i = 0; i < replaceRules.length; i++) {
+ var replaceRule = replaceRules[i];
+ var regexp = new RegExp(replaceRule.substr, 'g');
+ newValue = newValue.replace(regexp, replaceRule.newSubstr);
+ }
+ return newValue;
+};
+var mergeTokens = function(tokens, start, end) {
+ var newToken = {};
+ newToken.value = '';
+ newToken.type = tokens[start].type;
+ for (var j = start; j < end; j++) {
+ newToken.value += tokens[j].value;
+ }
+ return newToken;
+};
+var mergeLikeTokens = function(tokens) {
+ if (tokens.length <= 1) {
+ return tokens;
+ }
+ var newTokens = [];
+ var lastLikeIndex = 0;
+ for (var i = 1; i < tokens.length; i++) {
+ var lastLikeToken = tokens[lastLikeIndex];
+ var currToken = tokens[i];
+ if (getTokenRule(lastLikeToken) !== getTokenRule(currToken)) {
+ newTokens.push(mergeTokens(tokens, lastLikeIndex, i));
+ lastLikeIndex = i;
+ }
+ }
+ newTokens.push(mergeTokens(tokens, lastLikeIndex, tokens.length));
+ return newTokens;
+};
+var isRowWhiteSpace = function(row) {
+ var line = cvoxAce.editor.getSession().getLine(row);
+ var whiteSpaceRegexp = /^\s*$/;
+ return whiteSpaceRegexp.exec(line) !== null;
+};
+var speakLine = function(row, queue) {
+ var tokens = cvoxAce.editor.getSession().getTokens(row);
+ if (tokens.length === 0 || isRowWhiteSpace(row)) {
+ cvox.Api.playEarcon('EDITABLE_TEXT');
+ return;
+ }
+ tokens = mergeLikeTokens(tokens);
+ var firstToken = tokens[0];
+ tokens = tokens.filter(function(token) {
+ return token !== firstToken;
+ });
+ speakToken_(firstToken, queue);
+ tokens.forEach(speakTokenQueue);
+};
+var speakTokenFlush = function(token) {
+ speakToken_(token, 0);
+};
+var speakTokenQueue = function(token) {
+ speakToken_(token, 1);
+};
+var getTokenRule = function(token) {
+ if (!token || !token.type) {
+ return;
+ }
+ var split = token.type.split('.');
+ if (split.length === 0) {
+ return;
+ }
+ var type = split[0];
+ var rule = rules[type];
+ if (!rule) {
+ return DEFAULT_RULE;
+ }
+ return rule;
+};
+var speakToken_ = function(token, queue) {
+ var rule = getTokenRule(token);
+ var value = expand(token.value, REPLACE_LIST);
+ if (rule.replace) {
+ value = expand(value, rule.replace);
+ }
+ cvox.Api.speak(value, queue, rule.prop);
+};
+var speakChar = function(cursor) {
+ var line = getCurrentLine(cursor);
+ cvox.Api.speak(line[cursor.column], 1);
+};
+var speakDisplacement = function(lastCursor, currCursor) {
+ var line = getCurrentLine(currCursor);
+ var displace = line.substring(lastCursor.column, currCursor.column);
+ displace = displace.replace(/ /g, ' space ');
+ cvox.Api.speak(displace);
+};
+var speakCharOrWordOrLine = function(lastCursor, currCursor) {
+ if (Math.abs(lastCursor.column - currCursor.column) !== 1) {
+ var currLineLength = getCurrentLine(currCursor).length;
+ if (currCursor.column === 0 || currCursor.column === currLineLength) {
+ speakLine(currCursor.row, 0);
+ return;
+ }
+ if (isWord(currCursor)) {
+ cvox.Api.stop();
+ speakTokenQueue(getCurrentToken(currCursor));
+ return;
+ }
+ }
+ speakChar(currCursor);
+};
+var onColumnChange = function(lastCursor, currCursor) {
+ if (!cvoxAce.editor.selection.isEmpty()) {
+ speakDisplacement(lastCursor, currCursor);
+ cvox.Api.speak('selected', 1);
+ }
+ else if (shouldSpeakDisplacement) {
+ speakDisplacement(lastCursor, currCursor);
+ } else {
+ speakCharOrWordOrLine(lastCursor, currCursor);
+ }
+};
+var onCursorChange = function(evt) {
+ if (changed) {
+ changed = false;
+ return;
+ }
+ var currCursor = cvoxAce.editor.selection.getCursor();
+ if (currCursor.row !== lastCursor.row) {
+ onRowChange(currCursor);
+ } else {
+ onColumnChange(lastCursor, currCursor);
+ }
+ lastCursor = currCursor;
+};
+var onSelectionChange = function(evt) {
+ if (cvoxAce.editor.selection.isEmpty()) {
+ cvox.Api.speak('unselected');
+ }
+};
+var onChange = function(evt) {
+ var data = evt.data;
+ switch (data.action) {
+ case 'removeText':
+ cvox.Api.speak(data.text, 0, DELETED_PROP);
+ changed = true;
+ break;
+ case 'insertText':
+ cvox.Api.speak(data.text, 0);
+ changed = true;
+ break;
+ }
+};
+var isNewAnnotation = function(annot) {
+ var row = annot.row;
+ var col = annot.column;
+ return !annotTable[row] || !annotTable[row][col];
+};
+var populateAnnotations = function(annotations) {
+ annotTable = {};
+ for (var i = 0; i < annotations.length; i++) {
+ var annotation = annotations[i];
+ var row = annotation.row;
+ var col = annotation.column;
+ if (!annotTable[row]) {
+ annotTable[row] = {};
+ }
+ annotTable[row][col] = annotation;
+ }
+};
+var onAnnotationChange = function(evt) {
+ var annotations = cvoxAce.editor.getSession().getAnnotations();
+ var newAnnotations = annotations.filter(isNewAnnotation);
+ if (newAnnotations.length > 0) {
+ cvox.Api.playEarcon(ERROR_EARCON);
+ }
+ populateAnnotations(annotations);
+};
+var speakAnnot = function(annot) {
+ var annotText = annot.type + ' ' + annot.text + ' on ' +
+ rowColToString(annot.row, annot.column);
+ annotText = annotText.replace(';', 'semicolon');
+ cvox.Api.speak(annotText, 1);
+};
+var speakAnnotsByRow = function(row) {
+ var annots = annotTable[row];
+ for (var col in annots) {
+ speakAnnot(annots[col]);
+ }
+};
+var rowColToString = function(row, col) {
+ return 'row ' + (row + 1) + ' column ' + (col + 1);
+};
+var speakCurrRowAndCol = function() {
+ cvox.Api.speak(rowColToString(lastCursor.row, lastCursor.column));
+};
+var speakAllAnnots = function() {
+ for (var row in annotTable) {
+ speakAnnotsByRow(row);
+ }
+};
+var speakMode = function() {
+ if (!isVimMode()) {
+ return;
+ }
+ switch (cvoxAce.editor.keyBinding.$data.state) {
+ case INSERT_MODE_STATE:
+ cvox.Api.speak('Insert mode');
+ break;
+ case COMMAND_MODE_STATE:
+ cvox.Api.speak('Command mode');
+ break;
+ }
+};
+var toggleSpeakRowLocation = function() {
+ shouldSpeakRowLocation = !shouldSpeakRowLocation;
+ if (shouldSpeakRowLocation) {
+ cvox.Api.speak('Speak location on row change enabled.');
+ } else {
+ cvox.Api.speak('Speak location on row change disabled.');
+ }
+};
+var toggleSpeakDisplacement = function() {
+ shouldSpeakDisplacement = !shouldSpeakDisplacement;
+ if (shouldSpeakDisplacement) {
+ cvox.Api.speak('Speak displacement on column changes.');
+ } else {
+ cvox.Api.speak('Speak current character or word on column changes.');
+ }
+};
+var onKeyDown = function(evt) {
+ if (evt.ctrlKey && evt.shiftKey) {
+ var shortcut = keyCodeToShortcutMap[evt.keyCode];
+ if (shortcut) {
+ shortcut.func();
+ }
+ }
+};
+var onChangeStatus = function(evt, editor) {
+ if (!isVimMode()) {
+ return;
+ }
+ var state = editor.keyBinding.$data.state;
+ if (state === vimState) {
+ return;
+ }
+ switch (state) {
+ case INSERT_MODE_STATE:
+ cvox.Api.playEarcon(MODE_SWITCH_EARCON);
+ cvox.Api.setKeyEcho(true);
+ break;
+ case COMMAND_MODE_STATE:
+ cvox.Api.playEarcon(MODE_SWITCH_EARCON);
+ cvox.Api.setKeyEcho(false);
+ break;
+ }
+ vimState = state;
+};
+var contextMenuHandler = function(evt) {
+ var cmd = evt.detail['customCommand'];
+ var shortcut = cmdToShortcutMap[cmd];
+ if (shortcut) {
+ shortcut.func();
+ cvoxAce.editor.focus();
+ }
+};
+var initContextMenu = function() {
+ var ACTIONS = SHORTCUTS.map(function(shortcut) {
+ return {
+ desc: shortcut.desc + getKeyShortcutString(shortcut.keyCode),
+ cmd: shortcut.cmd
+ };
+ });
+ var body = document.querySelector('body');
+ body.setAttribute('contextMenuActions', JSON.stringify(ACTIONS));
+ body.addEventListener('ATCustomEvent', contextMenuHandler, true);
+};
+var onFindSearchbox = function(evt) {
+ if (evt.match) {
+ speakLine(lastCursor.row, 0);
+ } else {
+ cvox.Api.playEarcon(NO_MATCH_EARCON);
+ }
+};
+var focus = function() {
+ cvoxAce.editor.focus();
+};
+var SHORTCUTS = [
+ {
+ keyCode: 49,
+ func: function() {
+ speakAnnotsByRow(lastCursor.row);
+ },
+ cmd: Command.SPEAK_ANNOT,
+ desc: 'Speak annotations on line'
+ },
+ {
+ keyCode: 50,
+ func: speakAllAnnots,
+ cmd: Command.SPEAK_ALL_ANNOTS,
+ desc: 'Speak all annotations'
+ },
+ {
+ keyCode: 51,
+ func: speakMode,
+ cmd: Command.SPEAK_MODE,
+ desc: 'Speak Vim mode'
+ },
+ {
+ keyCode: 52,
+ func: toggleSpeakRowLocation,
+ cmd: Command.TOGGLE_LOCATION,
+ desc: 'Toggle speak row location'
+ },
+ {
+ keyCode: 53,
+ func: speakCurrRowAndCol,
+ cmd: Command.SPEAK_ROW_COL,
+ desc: 'Speak row and column'
+ },
+ {
+ keyCode: 54,
+ func: toggleSpeakDisplacement,
+ cmd: Command.TOGGLE_DISPLACEMENT,
+ desc: 'Toggle speak displacement'
+ },
+ {
+ keyCode: 55,
+ func: focus,
+ cmd: Command.FOCUS_TEXT,
+ desc: 'Focus text'
+ }
+];
+var onFocus = function() {
+ cvoxAce.editor = editor;
+ editor.getSession().selection.on('changeCursor', onCursorChange);
+ editor.getSession().selection.on('changeSelection', onSelectionChange);
+ editor.getSession().on('change', onChange);
+ editor.getSession().on('changeAnnotation', onAnnotationChange);
+ editor.on('changeStatus', onChangeStatus);
+ editor.on('findSearchBox', onFindSearchbox);
+ editor.container.addEventListener('keydown', onKeyDown);
+
+ lastCursor = editor.selection.getCursor();
+};
+var init = function(editor) {
+ onFocus();
+ SHORTCUTS.forEach(function(shortcut) {
+ keyCodeToShortcutMap[shortcut.keyCode] = shortcut;
+ cmdToShortcutMap[shortcut.cmd] = shortcut;
+ });
+
+ editor.on('focus', onFocus);
+ if (isVimMode()) {
+ cvox.Api.setKeyEcho(false);
+ }
+ initContextMenu();
+};
+function cvoxApiExists() {
+ return (typeof(cvox) !== 'undefined') && cvox && cvox.Api;
+}
+var tries = 0;
+var MAX_TRIES = 15;
+function watchForCvoxLoad(editor) {
+ if (cvoxApiExists()) {
+ init(editor);
+ } else {
+ tries++;
+ if (tries >= MAX_TRIES) {
+ return;
+ }
+ window.setTimeout(watchForCvoxLoad, 500, editor);
+ }
+}
+
+var Editor = require('../editor').Editor;
+require('../config').defineOptions(Editor.prototype, 'editor', {
+ enableChromevoxEnhancements: {
+ set: function(val) {
+ if (val) {
+ watchForCvoxLoad(this);
+ }
+ },
+ value: true // turn it on by default or check for window.cvox
+ }
+});
+
+});
+ (function() {
+ ace.require(["ace/ext/chromevox"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-elastic_tabstops_lite.js b/js/vendor/ace/src-noconflict/ext-elastic_tabstops_lite.js
index bbdb2d3..00fe84a 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-elastic_tabstops_lite.js
+++ b/js/vendor/ace/src-noconflict/ext-elastic_tabstops_lite.js
@@ -1,35 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/ext/elastic_tabstops_lite', ['require', 'exports', 'module' , 'ace/editor', 'ace/config'], function(require, exports, module) {
-
+ace.define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) {
+"use strict";
var ElasticTabstopsLite = function(editor) {
this.$editor = editor;
@@ -298,4 +268,8 @@ require("../config").defineOptions(Editor.prototype, "editor", {
}
});
-}); \ No newline at end of file
+});
+ (function() {
+ ace.require(["ace/ext/elastic_tabstops_lite"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-emmet.js b/js/vendor/ace/src-noconflict/ext-emmet.js
index b80d579..aa8e133 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-emmet.js
+++ b/js/vendor/ace/src-noconflict/ext-emmet.js
@@ -1,302 +1,10 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/ext/emmet', ['require', 'exports', 'module' , 'ace/keyboard/hash_handler', 'ace/editor', 'ace/snippets', 'ace/range', 'ace/config'], function(require, exports, module) {
-
-var HashHandler = require("ace/keyboard/hash_handler").HashHandler;
-var Editor = require("ace/editor").Editor;
-var snippetManager = require("ace/snippets").snippetManager;
-var Range = require("ace/range").Range;
-var emmet;
-
-Editor.prototype.indexToPosition = function(index) {
- return this.session.doc.indexToPosition(index);
-};
-
-Editor.prototype.positionToIndex = function(pos) {
- return this.session.doc.positionToIndex(pos);
-};
-function AceEmmetEditor() {}
-
-AceEmmetEditor.prototype = {
- setupContext: function(editor) {
- this.ace = editor;
- this.indentation = editor.session.getTabString();
- if (!emmet)
- emmet = window.emmet;
- emmet.require("resources").setVariable("indentation", this.indentation);
- this.$syntax = null;
- this.$syntax = this.getSyntax();
- },
- getSelectionRange: function() {
- var range = this.ace.getSelectionRange();
- return {
- start: this.ace.positionToIndex(range.start),
- end: this.ace.positionToIndex(range.end)
- };
- },
- createSelection: function(start, end) {
- this.ace.selection.setRange({
- start: this.ace.indexToPosition(start),
- end: this.ace.indexToPosition(end)
- });
- },
- getCurrentLineRange: function() {
- var row = this.ace.getCursorPosition().row;
- var lineLength = this.ace.session.getLine(row).length;
- var index = this.ace.positionToIndex({row: row, column: 0});
- return {
- start: index,
- end: index + lineLength
- };
- },
- getCaretPos: function(){
- var pos = this.ace.getCursorPosition();
- return this.ace.positionToIndex(pos);
- },
- setCaretPos: function(index){
- var pos = this.ace.indexToPosition(index);
- this.ace.clearSelection();
- this.ace.selection.moveCursorToPosition(pos);
- },
- getCurrentLine: function() {
- var row = this.ace.getCursorPosition().row;
- return this.ace.session.getLine(row);
- },
- replaceContent: function(value, start, end, noIndent) {
- if (end == null)
- end = start == null ? this.getContent().length : start;
- if (start == null)
- start = 0;
-
- var editor = this.ace;
- var range = Range.fromPoints(editor.indexToPosition(start), editor.indexToPosition(end));
- editor.session.remove(range);
-
- range.end = range.start;
-
- value = this.$updateTabstops(value);
- snippetManager.insertSnippet(editor, value)
- },
- getContent: function(){
- return this.ace.getValue();
- },
- getSyntax: function() {
- if (this.$syntax)
- return this.$syntax;
- var syntax = this.ace.session.$modeId.split("/").pop();
- if (syntax == "html" || syntax == "php") {
- var cursor = this.ace.getCursorPosition();
- var state = this.ace.session.getState(cursor.row);
- if (typeof state != "string")
- state = state[0];
- if (state) {
- state = state.split("-");
- if (state.length > 1)
- syntax = state[0];
- else if (syntax == "php")
- syntax = "html";
- }
- }
- return syntax;
- },
- getProfileName: function() {
- switch(this.getSyntax()) {
- case "css": return "css";
- case "xml":
- case "xsl":
- return "xml";
- case "html":
- var profile = emmet.require("resources").getVariable("profile");
- if (!profile)
- profile = this.ace.session.getLines(0,2).join("").search(/<!DOCTYPE[^>]+XHTML/i) != -1 ? "xhtml": "html";
- return profile;
- }
- return "xhtml";
- },
- prompt: function(title) {
- return prompt(title);
- },
- getSelection: function() {
- return this.ace.session.getTextRange();
- },
- getFilePath: function() {
- return "";
- },
- $updateTabstops: function(value) {
- var base = 1000;
- var zeroBase = 0;
- var lastZero = null;
- var range = emmet.require('range');
- var ts = emmet.require('tabStops');
- var settings = emmet.require('resources').getVocabulary("user");
- var tabstopOptions = {
- tabstop: function(data) {
- var group = parseInt(data.group, 10);
- var isZero = group === 0;
- if (isZero)
- group = ++zeroBase;
- else
- group += base;
-
- var placeholder = data.placeholder;
- if (placeholder) {
- placeholder = ts.processText(placeholder, tabstopOptions);
- }
-
- var result = '${' + group + (placeholder ? ':' + placeholder : '') + '}';
-
- if (isZero) {
- lastZero = range.create(data.start, result);
- }
-
- return result
- },
- escape: function(ch) {
- if (ch == '$') return '\\$';
- if (ch == '\\') return '\\\\';
- return ch;
- }
- };
-
- value = ts.processText(value, tabstopOptions);
-
- if (settings.variables['insert_final_tabstop'] && !/\$\{0\}$/.test(value)) {
- value += '${0}';
- } else if (lastZero) {
- value = emmet.require('utils').replaceSubstring(value, '${0}', lastZero);
- }
-
- return value;
- }
-};
-
-
-var keymap = {
- expand_abbreviation: {"mac": "ctrl+alt+e", "win": "alt+e"},
- match_pair_outward: {"mac": "ctrl+d", "win": "ctrl+,"},
- match_pair_inward: {"mac": "ctrl+j", "win": "ctrl+shift+0"},
- matching_pair: {"mac": "ctrl+alt+j", "win": "alt+j"},
- next_edit_point: "alt+right",
- prev_edit_point: "alt+left",
- toggle_comment: {"mac": "command+/", "win": "ctrl+/"},
- split_join_tag: {"mac": "shift+command+'", "win": "shift+ctrl+`"},
- remove_tag: {"mac": "command+'", "win": "shift+ctrl+;"},
- evaluate_math_expression: {"mac": "shift+command+y", "win": "shift+ctrl+y"},
- increment_number_by_1: "ctrl+up",
- decrement_number_by_1: "ctrl+down",
- increment_number_by_01: "alt+up",
- decrement_number_by_01: "alt+down",
- increment_number_by_10: {"mac": "alt+command+up", "win": "shift+alt+up"},
- decrement_number_by_10: {"mac": "alt+command+down", "win": "shift+alt+down"},
- select_next_item: {"mac": "shift+command+.", "win": "shift+ctrl+."},
- select_previous_item: {"mac": "shift+command+,", "win": "shift+ctrl+,"},
- reflect_css_value: {"mac": "shift+command+r", "win": "shift+ctrl+r"},
-
- encode_decode_data_url: {"mac": "shift+ctrl+d", "win": "ctrl+'"},
- expand_abbreviation_with_tab: "Tab",
- wrap_with_abbreviation: {"mac": "shift+ctrl+a", "win": "shift+ctrl+a"}
-};
-
-var editorProxy = new AceEmmetEditor();
-exports.commands = new HashHandler();
-exports.runEmmetCommand = function(editor) {
- editorProxy.setupContext(editor);
- if (editorProxy.getSyntax() == "php")
- return false;
- var actions = emmet.require("actions");
-
- if (this.action == "expand_abbreviation_with_tab") {
- if (!editor.selection.isEmpty())
- return false;
- }
-
- if (this.action == "wrap_with_abbreviation") {
- return setTimeout(function() {
- actions.run("wrap_with_abbreviation", editorProxy);
- }, 0);
- }
-
- try {
- var result = actions.run(this.action, editorProxy);
- } catch(e) {
- editor._signal("changeStatus", typeof e == "string" ? e : e.message);
- console.log(e);
- }
- return result;
-};
-
-for (var command in keymap) {
- exports.commands.addCommand({
- name: "emmet:" + command,
- action: command,
- bindKey: keymap[command],
- exec: exports.runEmmetCommand,
- multiSelectAction: "forEach"
- });
-}
-
-var onChangeMode = function(e, target) {
- var editor = target;
- if (!editor)
- return;
- var modeId = editor.session.$modeId;
- var enabled = modeId && /css|less|scss|sass|stylus|html|php/.test(modeId);
- if (e.enableEmmet === false)
- enabled = false;
- if (enabled)
- editor.keyBinding.addKeyboardHandler(exports.commands);
- else
- editor.keyBinding.removeKeyboardHandler(exports.commands);
-};
-
-
-exports.AceEmmetEditor = AceEmmetEditor;
-require("ace/config").defineOptions(Editor.prototype, "editor", {
- enableEmmet: {
- set: function(val) {
- this[val ? "on" : "removeListener"]("changeMode", onChangeMode);
- onChangeMode({enableEmmet: !!val}, this);
- },
- value: true
- }
-});
-
-
-exports.setCore = function(e) {emmet = e;};
-});
-
-ace.define('ace/snippets', ['require', 'exports', 'module' , 'ace/lib/lang', 'ace/range', 'ace/keyboard/hash_handler', 'ace/tokenizer', 'ace/lib/dom'], function(require, exports, module) {
-
-var lang = require("./lib/lang")
-var Range = require("./range").Range
+ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"], function(require, exports, module) {
+"use strict";
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var lang = require("./lib/lang");
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
var HashHandler = require("./keyboard/hash_handler").HashHandler;
var Tokenizer = require("./tokenizer").Tokenizer;
var comparePoints = Range.comparePoints;
@@ -307,12 +15,14 @@ var SnippetManager = function() {
};
(function() {
+ oop.implement(this, EventEmitter);
+
this.getTokenizer = function() {
function TabstopToken(str, _, stack) {
str = str.substr(1);
if (/^\d+$/.test(str) && !stack.inFormatString)
return [{tabstopId: parseInt(str, 10)}];
- return [{text: str}]
+ return [{text: str}];
}
function escape(ch) {
return "(?:[^\\\\" + ch + "]|\\\\.)";
@@ -390,7 +100,7 @@ var SnippetManager = function() {
});
SnippetManager.prototype.getTokenizer = function() {
return SnippetManager.$tokenizer;
- }
+ };
return SnippetManager.$tokenizer;
};
@@ -420,18 +130,20 @@ var SnippetManager = function() {
case "SELECTED_TEXT":
return s.getTextRange(r);
case "CURRENT_LINE":
- return s.getLine(e.getCursorPosition().row);
+ return s.getLine(editor.getCursorPosition().row);
+ case "PREV_LINE": // not possible in textmate
+ return s.getLine(editor.getCursorPosition().row - 1);
case "LINE_INDEX":
- return e.getCursorPosition().column;
+ return editor.getCursorPosition().column;
case "LINE_NUMBER":
- return e.getCursorPosition().row + 1;
+ return editor.getCursorPosition().row + 1;
case "SOFT_TABS":
return s.getUseSoftTabs() ? "YES" : "NO";
case "TAB_SIZE":
return s.getTabSize();
case "FILENAME":
case "FILEPATH":
- return "ace.ajax.org";
+ return "";
case "FULLNAME":
return "Ace";
}
@@ -522,11 +234,14 @@ var SnippetManager = function() {
return result;
};
- this.insertSnippet = function(editor, snippetText) {
+ this.insertSnippetForSelection = function(editor, snippetText) {
var cursor = editor.getCursorPosition();
var line = editor.session.getLine(cursor.row);
- var indentString = line.match(/^\s*/)[0];
var tabString = editor.session.getTabString();
+ var indentString = line.match(/^\s*/)[0];
+
+ if (cursor.column < indentString.length)
+ indentString = indentString.slice(0, cursor.column);
var tokens = this.tokenizeTmSnippet(snippetText);
tokens = this.resolveVariables(tokens, editor);
@@ -542,37 +257,70 @@ var SnippetManager = function() {
if (typeof p != "object")
return;
var id = p.tabstopId;
- if (!tabstops[id]) {
- tabstops[id] = [];
- tabstops[id].index = id;
- tabstops[id].value = "";
+ var ts = tabstops[id];
+ if (!ts) {
+ ts = tabstops[id] = [];
+ ts.index = id;
+ ts.value = "";
}
- if (tabstops[id].indexOf(p) != -1)
+ if (ts.indexOf(p) !== -1)
return;
- tabstops[id].push(p);
+ ts.push(p);
var i1 = tokens.indexOf(p, i + 1);
- if (i1 == -1)
+ if (i1 === -1)
return;
- var value = tokens.slice(i + 1, i1).join("");
- if (value)
- tabstops[id].value = value;
- });
- tabstops.forEach(function(ts) {
- ts.value && ts.forEach(function(p) {
- var i = tokens.indexOf(p);
- var i1 = tokens.indexOf(p, i + 1);
- if (i1 == -1)
- tokens.splice(i + 1, 0, ts.value, p);
- else if (i1 == i + 1)
- tokens.splice(i + 1, 0, ts.value);
- });
+ var value = tokens.slice(i + 1, i1);
+ var isNested = value.some(function(t) {return typeof t === "object"});
+ if (isNested && !ts.value) {
+ ts.value = value;
+ } else if (value.length && (!ts.value || typeof ts.value !== "string")) {
+ ts.value = value.join("");
+ }
});
+ tabstops.forEach(function(ts) {ts.length = 0});
+ var expanding = {};
+ function copyValue(val) {
+ var copy = [];
+ for (var i = 0; i < val.length; i++) {
+ var p = val[i];
+ if (typeof p == "object") {
+ if (expanding[p.tabstopId])
+ continue;
+ var j = val.lastIndexOf(p, i - 1);
+ p = copy[j] || {tabstopId: p.tabstopId};
+ }
+ copy[i] = p;
+ }
+ return copy;
+ }
+ for (var i = 0; i < tokens.length; i++) {
+ var p = tokens[i];
+ if (typeof p != "object")
+ continue;
+ var id = p.tabstopId;
+ var i1 = tokens.indexOf(p, i + 1);
+ if (expanding[id]) {
+ if (expanding[id] === p)
+ expanding[id] = null;
+ continue;
+ }
+
+ var ts = tabstops[id];
+ var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value);
+ arg.unshift(i + 1, Math.max(0, i1 - i));
+ arg.push(p);
+ expanding[id] = p;
+ tokens.splice.apply(tokens, arg);
+
+ if (ts.indexOf(p) === -1)
+ ts.push(p);
+ }
var row = 0, column = 0;
var text = "";
tokens.forEach(function(t) {
- if (typeof t == "string") {
- if (t[0] == "\n"){
+ if (typeof t === "string") {
+ if (t[0] === "\n"){
column = t.length - 1;
row ++;
} else
@@ -589,16 +337,34 @@ var SnippetManager = function() {
var end = editor.session.replace(range, text);
var tabstopManager = new TabstopManager(editor);
- tabstopManager.addTabstops(tabstops, range.start, end);
- tabstopManager.tabNext();
+ var selectionId = editor.inVirtualSelectionMode && editor.selection.index;
+ tabstopManager.addTabstops(tabstops, range.start, end, selectionId);
+ };
+
+ this.insertSnippet = function(editor, snippetText) {
+ var self = this;
+ if (editor.inVirtualSelectionMode)
+ return self.insertSnippetForSelection(editor, snippetText);
+
+ editor.forEachSelection(function() {
+ self.insertSnippetForSelection(editor, snippetText);
+ }, null, {keepOrder: true});
+
+ if (editor.tabstopManager)
+ editor.tabstopManager.tabNext();
};
this.$getScope = function(editor) {
var scope = editor.session.$mode.$id || "";
scope = scope.split("/").pop();
- if (editor.session.$mode.$modes) {
- var c = editor.getCursorPosition()
+ if (scope === "html" || scope === "php") {
+ if (scope === "php" && !editor.session.$mode.inlinePhp)
+ scope = "html";
+ var c = editor.getCursorPosition();
var state = editor.session.getState(c.row);
+ if (typeof state === "object") {
+ state = state[0];
+ }
if (state.substring) {
if (state.substring(0, 3) == "js-")
scope = "javascript";
@@ -608,19 +374,40 @@ var SnippetManager = function() {
scope = "php";
}
}
+
return scope;
};
- this.expandWithTab = function(editor) {
+ this.getActiveScopes = function(editor) {
+ var scope = this.$getScope(editor);
+ var scopes = [scope];
+ var snippetMap = this.snippetMap;
+ if (snippetMap[scope] && snippetMap[scope].includeScopes) {
+ scopes.push.apply(scopes, snippetMap[scope].includeScopes);
+ }
+ scopes.push("_");
+ return scopes;
+ };
+
+ this.expandWithTab = function(editor, options) {
+ var self = this;
+ var result = editor.forEachSelection(function() {
+ return self.expandSnippetForSelection(editor, options);
+ }, null, {keepOrder: true});
+ if (result && editor.tabstopManager)
+ editor.tabstopManager.tabNext();
+ return result;
+ };
+
+ this.expandSnippetForSelection = function(editor, options) {
var cursor = editor.getCursorPosition();
var line = editor.session.getLine(cursor.row);
var before = line.substring(0, cursor.column);
var after = line.substr(cursor.column);
- var scope = this.$getScope(editor);
var snippetMap = this.snippetMap;
var snippet;
- [scope, "_"].some(function(scope) {
+ this.getActiveScopes(editor).some(function(scope) {
var snippets = snippetMap[scope];
if (snippets)
snippet = this.findMatchingSnippet(snippets, before, after);
@@ -628,7 +415,8 @@ var SnippetManager = function() {
}, this);
if (!snippet)
return false;
-
+ if (options && options.dryRun)
+ return true;
editor.session.doc.removeInLine(cursor.row,
cursor.column - snippet.replaceBefore.length,
cursor.column + snippet.replaceAfter.length
@@ -636,7 +424,7 @@ var SnippetManager = function() {
this.variables.M__ = snippet.matchBefore;
this.variables.T__ = snippet.matchAfter;
- this.insertSnippet(editor, snippet.content);
+ this.insertSnippetForSelection(editor, snippet.content);
this.variables.M__ = this.variables.T__ = null;
return true;
@@ -666,9 +454,13 @@ var SnippetManager = function() {
var snippetMap = this.snippetMap;
var snippetNameMap = this.snippetNameMap;
var self = this;
+
+ if (!snippets)
+ snippets = [];
+
function wrapRegexp(src) {
if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src))
- src = "(?:" + src + ")"
+ src = "(?:" + src + ")";
return src || "";
}
@@ -690,7 +482,7 @@ var SnippetManager = function() {
function addSnippet(s) {
if (!s.scope)
s.scope = scope || "_";
- scope = s.scope
+ scope = s.scope;
if (!snippetMap[scope]) {
snippetMap[scope] = [];
snippetNameMap[scope] = {};
@@ -716,12 +508,14 @@ var SnippetManager = function() {
s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true);
s.endTriggerRe = new RegExp(s.endTrigger, "", true);
- };
+ }
- if (snippets.content)
+ if (snippets && snippets.content)
addSnippet(snippets);
else if (Array.isArray(snippets))
snippets.forEach(addSnippet);
+
+ this._signal("registerSnippets", {scope: scope});
};
this.unregister = function(snippets, scope) {
var snippetMap = this.snippetMap;
@@ -743,14 +537,14 @@ var SnippetManager = function() {
snippets.forEach(removeSnippet);
};
this.parseSnippetFile = function(str) {
- str = str.replace(/\r/, "");
+ str = str.replace(/\r/g, "");
var list = [], snippet = {};
var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;
var m;
while (m = re.exec(str)) {
if (m[1]) {
try {
- snippet = JSON.parse(m[1])
+ snippet = JSON.parse(m[1]);
list.push(snippet);
} catch (e) {}
} if (m[4]) {
@@ -777,10 +571,9 @@ var SnippetManager = function() {
return list;
};
this.getSnippetByName = function(name, editor) {
- var scope = editor && this.$getScope(editor);
var snippetMap = this.snippetNameMap;
var snippet;
- [scope, "_"].some(function(scope) {
+ this.getActiveScopes(editor).some(function(scope) {
var snippets = snippetMap[scope];
if (snippets)
snippet = snippets[name];
@@ -804,9 +597,10 @@ var TabstopManager = function(editor) {
};
(function() {
this.attach = function(editor) {
- this.index = -1;
+ this.index = 0;
this.ranges = [];
this.tabstops = [];
+ this.$openTabstops = null;
this.selectedTabstop = null;
this.editor = editor;
@@ -846,7 +640,7 @@ var TabstopManager = function(editor) {
}
if (!this.$inChange && isRemove) {
var ts = this.selectedTabstop;
- var changedOutside = !ts.some(function(r) {
+ var changedOutside = ts && !ts.some(function(r) {
return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0;
});
if (changedOutside)
@@ -858,7 +652,7 @@ var TabstopManager = function(editor) {
if (r.end.row < start.row)
continue;
- if (comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) {
+ if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) {
this.removeRange(r);
i--;
continue;
@@ -881,7 +675,7 @@ var TabstopManager = function(editor) {
};
this.updateLinkedFields = function() {
var ts = this.selectedTabstop;
- if (!ts.hasLinkedRanges)
+ if (!ts || !ts.hasLinkedRanges)
return;
this.$inChange = true;
var session = this.editor.session;
@@ -890,7 +684,7 @@ var TabstopManager = function(editor) {
var range = ts[i];
if (!range.linked)
continue;
- var fmt = exports.snippetManager.tmStrFormat(text, range.original)
+ var fmt = exports.snippetManager.tmStrFormat(text, range.original);
session.replace(range, fmt);
}
this.$inChange = false;
@@ -901,7 +695,7 @@ var TabstopManager = function(editor) {
};
this.onChangeSelection = function() {
if (!this.editor)
- return
+ return;
var lead = this.editor.selection.lead;
var anchor = this.editor.selection.anchor;
var isEmpty = this.editor.selection.isEmpty();
@@ -919,14 +713,17 @@ var TabstopManager = function(editor) {
this.detach();
};
this.tabNext = function(dir) {
- var max = this.tabstops.length - 1;
+ var max = this.tabstops.length;
var index = this.index + (dir || 1);
- index = Math.min(Math.max(index, 0), max);
- this.selectTabstop(index);
+ index = Math.min(Math.max(index, 1), max);
if (index == max)
+ index = 0;
+ this.selectTabstop(index);
+ if (index === 0)
this.detach();
};
this.selectTabstop = function(index) {
+ this.$openTabstops = null;
var ts = this.tabstops[this.index];
if (ts)
this.addTabstopMarkers(ts);
@@ -944,6 +741,8 @@ var TabstopManager = function(editor) {
continue;
sel.addRange(ts[i].clone(), true);
}
+ if (sel.ranges[0])
+ sel.addRange(sel.ranges[0].clone());
} else {
this.editor.selection.setRange(ts.firstNonLinked);
}
@@ -951,6 +750,8 @@ var TabstopManager = function(editor) {
this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
};
this.addTabstops = function(tabstops, start, end) {
+ if (!this.$openTabstops)
+ this.$openTabstops = [];
if (!tabstops[0]) {
var p = Range.fromPoints(end, end);
moveRelative(p.start, start);
@@ -960,32 +761,43 @@ var TabstopManager = function(editor) {
}
var i = this.index;
- var arg = [i, 0];
+ var arg = [i + 1, 0];
var ranges = this.ranges;
- var editor = this.editor;
- tabstops.forEach(function(ts) {
+ tabstops.forEach(function(ts, index) {
+ var dest = this.$openTabstops[index] || ts;
+
for (var i = ts.length; i--;) {
var p = ts[i];
var range = Range.fromPoints(p.start, p.end || p.start);
movePoint(range.start, start);
movePoint(range.end, start);
range.original = p;
- range.tabstop = ts;
+ range.tabstop = dest;
ranges.push(range);
- ts[i] = range;
+ if (dest != ts)
+ dest.unshift(range);
+ else
+ dest[i] = range;
if (p.fmtString) {
range.linked = true;
- ts.hasLinkedRanges = true;
- } else if (!ts.firstNonLinked)
- ts.firstNonLinked = range;
+ dest.hasLinkedRanges = true;
+ } else if (!dest.firstNonLinked)
+ dest.firstNonLinked = range;
}
- if (!ts.firstNonLinked)
- ts.hasLinkedRanges = false;
- arg.push(ts);
- this.addTabstopMarkers(ts);
+ if (!dest.firstNonLinked)
+ dest.hasLinkedRanges = false;
+ if (dest === ts) {
+ arg.push(dest);
+ this.$openTabstops[index] = dest;
+ }
+ this.addTabstopMarkers(dest);
}, this);
- arg.push(arg.splice(2, 1)[0]);
- this.tabstops.splice.apply(this.tabstops, arg);
+
+ if (arg.length > 2) {
+ if (this.tabstops.length)
+ arg.push(arg.splice(2, 1)[0]);
+ this.tabstops.splice.apply(this.tabstops, arg);
+ }
};
this.addTabstopMarkers = function(ts) {
@@ -1008,11 +820,22 @@ var TabstopManager = function(editor) {
i = this.ranges.indexOf(range);
this.ranges.splice(i, 1);
this.editor.session.removeMarker(range.markerId);
+ if (!range.tabstop.length) {
+ i = this.tabstops.indexOf(range.tabstop);
+ if (i != -1)
+ this.tabstops.splice(i, 1);
+ if (!this.tabstops.length)
+ this.detach();
+ }
};
this.keyboardHandler = new HashHandler();
this.keyboardHandler.bindKeys({
"Tab": function(ed) {
+ if (exports.snippetManager && exports.snippetManager.expandWithTab(ed)) {
+ return;
+ }
+
ed.tabstopManager.tabNext(1);
},
"Shift-Tab": function(ed) {
@@ -1028,6 +851,19 @@ var TabstopManager = function(editor) {
}).call(TabstopManager.prototype);
+
+var changeTracker = {};
+changeTracker.onChange = Anchor.prototype.onChange;
+changeTracker.setPosition = function(row, column) {
+ this.pos.row = row;
+ this.pos.column = column;
+};
+changeTracker.update = function(pos, delta, $insertRight) {
+ this.$insertRight = $insertRight;
+ this.pos = pos;
+ this.onChange(delta);
+};
+
var movePoint = function(point, diff) {
if (point.row == 0)
point.column += diff.column;
@@ -1053,4 +889,302 @@ require("./lib/dom").importCssString("\
exports.snippetManager = new SnippetManager();
+var Editor = require("./editor").Editor;
+(function() {
+ this.insertSnippet = function(content, options) {
+ return exports.snippetManager.insertSnippet(this, content, options);
+ };
+ this.expandSnippet = function(options) {
+ return exports.snippetManager.expandWithTab(this, options);
+ };
+}).call(Editor.prototype);
+
+});
+
+ace.define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","resources","resources","range","tabStops","resources","utils","actions","ace/config","ace/config"], function(require, exports, module) {
+"use strict";
+var HashHandler = require("ace/keyboard/hash_handler").HashHandler;
+var Editor = require("ace/editor").Editor;
+var snippetManager = require("ace/snippets").snippetManager;
+var Range = require("ace/range").Range;
+var emmet, emmetPath;
+function AceEmmetEditor() {}
+
+AceEmmetEditor.prototype = {
+ setupContext: function(editor) {
+ this.ace = editor;
+ this.indentation = editor.session.getTabString();
+ if (!emmet)
+ emmet = window.emmet;
+ emmet.require("resources").setVariable("indentation", this.indentation);
+ this.$syntax = null;
+ this.$syntax = this.getSyntax();
+ },
+ getSelectionRange: function() {
+ var range = this.ace.getSelectionRange();
+ var doc = this.ace.session.doc;
+ return {
+ start: doc.positionToIndex(range.start),
+ end: doc.positionToIndex(range.end)
+ };
+ },
+ createSelection: function(start, end) {
+ var doc = this.ace.session.doc;
+ this.ace.selection.setRange({
+ start: doc.indexToPosition(start),
+ end: doc.indexToPosition(end)
+ });
+ },
+ getCurrentLineRange: function() {
+ var ace = this.ace;
+ var row = ace.getCursorPosition().row;
+ var lineLength = ace.session.getLine(row).length;
+ var index = ace.session.doc.positionToIndex({row: row, column: 0});
+ return {
+ start: index,
+ end: index + lineLength
+ };
+ },
+ getCaretPos: function(){
+ var pos = this.ace.getCursorPosition();
+ return this.ace.session.doc.positionToIndex(pos);
+ },
+ setCaretPos: function(index){
+ var pos = this.ace.session.doc.indexToPosition(index);
+ this.ace.selection.moveToPosition(pos);
+ },
+ getCurrentLine: function() {
+ var row = this.ace.getCursorPosition().row;
+ return this.ace.session.getLine(row);
+ },
+ replaceContent: function(value, start, end, noIndent) {
+ if (end == null)
+ end = start == null ? this.getContent().length : start;
+ if (start == null)
+ start = 0;
+
+ var editor = this.ace;
+ var doc = editor.session.doc;
+ var range = Range.fromPoints(doc.indexToPosition(start), doc.indexToPosition(end));
+ editor.session.remove(range);
+
+ range.end = range.start;
+
+ value = this.$updateTabstops(value);
+ snippetManager.insertSnippet(editor, value);
+ },
+ getContent: function(){
+ return this.ace.getValue();
+ },
+ getSyntax: function() {
+ if (this.$syntax)
+ return this.$syntax;
+ var syntax = this.ace.session.$modeId.split("/").pop();
+ if (syntax == "html" || syntax == "php") {
+ var cursor = this.ace.getCursorPosition();
+ var state = this.ace.session.getState(cursor.row);
+ if (typeof state != "string")
+ state = state[0];
+ if (state) {
+ state = state.split("-");
+ if (state.length > 1)
+ syntax = state[0];
+ else if (syntax == "php")
+ syntax = "html";
+ }
+ }
+ return syntax;
+ },
+ getProfileName: function() {
+ switch(this.getSyntax()) {
+ case "css": return "css";
+ case "xml":
+ case "xsl":
+ return "xml";
+ case "html":
+ var profile = emmet.require("resources").getVariable("profile");
+ if (!profile)
+ profile = this.ace.session.getLines(0,2).join("").search(/<!DOCTYPE[^>]+XHTML/i) != -1 ? "xhtml": "html";
+ return profile;
+ }
+ return "xhtml";
+ },
+ prompt: function(title) {
+ return prompt(title);
+ },
+ getSelection: function() {
+ return this.ace.session.getTextRange();
+ },
+ getFilePath: function() {
+ return "";
+ },
+ $updateTabstops: function(value) {
+ var base = 1000;
+ var zeroBase = 0;
+ var lastZero = null;
+ var range = emmet.require('range');
+ var ts = emmet.require('tabStops');
+ var settings = emmet.require('resources').getVocabulary("user");
+ var tabstopOptions = {
+ tabstop: function(data) {
+ var group = parseInt(data.group, 10);
+ var isZero = group === 0;
+ if (isZero)
+ group = ++zeroBase;
+ else
+ group += base;
+
+ var placeholder = data.placeholder;
+ if (placeholder) {
+ placeholder = ts.processText(placeholder, tabstopOptions);
+ }
+
+ var result = '${' + group + (placeholder ? ':' + placeholder : '') + '}';
+
+ if (isZero) {
+ lastZero = range.create(data.start, result);
+ }
+
+ return result;
+ },
+ escape: function(ch) {
+ if (ch == '$') return '\\$';
+ if (ch == '\\') return '\\\\';
+ return ch;
+ }
+ };
+
+ value = ts.processText(value, tabstopOptions);
+
+ if (settings.variables['insert_final_tabstop'] && !/\$\{0\}$/.test(value)) {
+ value += '${0}';
+ } else if (lastZero) {
+ value = emmet.require('utils').replaceSubstring(value, '${0}', lastZero);
+ }
+
+ return value;
+ }
+};
+
+
+var keymap = {
+ expand_abbreviation: {"mac": "ctrl+alt+e", "win": "alt+e"},
+ match_pair_outward: {"mac": "ctrl+d", "win": "ctrl+,"},
+ match_pair_inward: {"mac": "ctrl+j", "win": "ctrl+shift+0"},
+ matching_pair: {"mac": "ctrl+alt+j", "win": "alt+j"},
+ next_edit_point: "alt+right",
+ prev_edit_point: "alt+left",
+ toggle_comment: {"mac": "command+/", "win": "ctrl+/"},
+ split_join_tag: {"mac": "shift+command+'", "win": "shift+ctrl+`"},
+ remove_tag: {"mac": "command+'", "win": "shift+ctrl+;"},
+ evaluate_math_expression: {"mac": "shift+command+y", "win": "shift+ctrl+y"},
+ increment_number_by_1: "ctrl+up",
+ decrement_number_by_1: "ctrl+down",
+ increment_number_by_01: "alt+up",
+ decrement_number_by_01: "alt+down",
+ increment_number_by_10: {"mac": "alt+command+up", "win": "shift+alt+up"},
+ decrement_number_by_10: {"mac": "alt+command+down", "win": "shift+alt+down"},
+ select_next_item: {"mac": "shift+command+.", "win": "shift+ctrl+."},
+ select_previous_item: {"mac": "shift+command+,", "win": "shift+ctrl+,"},
+ reflect_css_value: {"mac": "shift+command+r", "win": "shift+ctrl+r"},
+
+ encode_decode_data_url: {"mac": "shift+ctrl+d", "win": "ctrl+'"},
+ expand_abbreviation_with_tab: "Tab",
+ wrap_with_abbreviation: {"mac": "shift+ctrl+a", "win": "shift+ctrl+a"}
+};
+
+var editorProxy = new AceEmmetEditor();
+exports.commands = new HashHandler();
+exports.runEmmetCommand = function(editor) {
+ try {
+ editorProxy.setupContext(editor);
+ if (editorProxy.getSyntax() == "php")
+ return false;
+ var actions = emmet.require("actions");
+
+ if (this.action == "expand_abbreviation_with_tab") {
+ if (!editor.selection.isEmpty())
+ return false;
+ }
+
+ if (this.action == "wrap_with_abbreviation") {
+ return setTimeout(function() {
+ actions.run("wrap_with_abbreviation", editorProxy);
+ }, 0);
+ }
+
+ var pos = editor.selection.lead;
+ var token = editor.session.getTokenAt(pos.row, pos.column);
+ if (token && /\btag\b/.test(token.type))
+ return false;
+
+ var result = actions.run(this.action, editorProxy);
+ } catch(e) {
+ editor._signal("changeStatus", typeof e == "string" ? e : e.message);
+ console.log(e);
+ result = false;
+ }
+ return result;
+};
+
+for (var command in keymap) {
+ exports.commands.addCommand({
+ name: "emmet:" + command,
+ action: command,
+ bindKey: keymap[command],
+ exec: exports.runEmmetCommand,
+ multiSelectAction: "forEach"
+ });
+}
+
+exports.updateCommands = function(editor, enabled) {
+ if (enabled) {
+ editor.keyBinding.addKeyboardHandler(exports.commands);
+ } else {
+ editor.keyBinding.removeKeyboardHandler(exports.commands);
+ }
+};
+
+exports.isSupportedMode = function(modeId) {
+ return modeId && /css|less|scss|sass|stylus|html|php|twig|ejs|handlebars/.test(modeId);
+};
+
+var onChangeMode = function(e, target) {
+ var editor = target;
+ if (!editor)
+ return;
+ var enabled = exports.isSupportedMode(editor.session.$modeId);
+ if (e.enableEmmet === false)
+ enabled = false;
+ if (enabled) {
+ if (typeof emmetPath == "string") {
+ require("ace/config").loadModule(emmetPath, function() {
+ emmetPath = null;
+ });
+ }
+ }
+ exports.updateCommands(editor, enabled);
+};
+
+exports.AceEmmetEditor = AceEmmetEditor;
+require("ace/config").defineOptions(Editor.prototype, "editor", {
+ enableEmmet: {
+ set: function(val) {
+ this[val ? "on" : "removeListener"]("changeMode", onChangeMode);
+ onChangeMode({enableEmmet: !!val}, this);
+ },
+ value: true
+ }
+});
+
+exports.setCore = function(e) {
+ if (typeof e == "string")
+ emmetPath = e;
+ else
+ emmet = e;
+};
});
+ (function() {
+ ace.require(["ace/ext/emmet"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-error_marker.js b/js/vendor/ace/src-noconflict/ext-error_marker.js
new file mode 100755
index 0000000..d4c9eb9
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/ext-error_marker.js
@@ -0,0 +1,6 @@
+
+;
+ (function() {
+ ace.require(["ace/ext/error_marker"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-keybinding_menu.js b/js/vendor/ace/src-noconflict/ext-keybinding_menu.js
index b6aaec6..b6cfd2b 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-keybinding_menu.js
+++ b/js/vendor/ace/src-noconflict/ext-keybinding_menu.js
@@ -1,72 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl
- * All rights reserved.
- *
- * Contributed to Ajax.org under the BSD license.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/ext/keybinding_menu', ['require', 'exports', 'module' , 'ace/editor', 'ace/ext/menu_tools/overlay_page', 'ace/ext/menu_tools/get_editor_keyboard_shortcuts'], function(require, exports, module) {
-
- var Editor = require("ace/editor").Editor;
- function showKeyboardShortcuts (editor) {
- if(!document.getElementById('kbshortcutmenu')) {
- var overlayPage = require('./menu_tools/overlay_page').overlayPage;
- var getEditorKeybordShortcuts = require('./menu_tools/get_editor_keyboard_shortcuts').getEditorKeybordShortcuts;
- var kb = getEditorKeybordShortcuts(editor);
- var el = document.createElement('div');
- var commands = kb.reduce(function(previous, current) {
- return previous + '<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'
- + current.command + '</span> : '
- + '<span class="ace_optionsMenuKey">' + current.key + '</span></div>';
- }, '');
-
- el.id = 'kbshortcutmenu';
- el.innerHTML = '<h1>Keyboard Shortcuts</h1>' + commands + '</div>';
- overlayPage(editor, el, '0', '0', '0', null);
- }
- };
- module.exports.init = function(editor) {
- Editor.prototype.showKeyboardShortcuts = function() {
- showKeyboardShortcuts(this);
- };
- editor.commands.addCommands([{
- name: "showKeyboardShortcuts",
- bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
- exec: function(editor, line) {
- editor.showKeyboardShortcuts();
- }
- }]);
- };
-
-});
-
-ace.define('ace/ext/menu_tools/overlay_page', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
-
+ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+'use strict';
var dom = require("../../lib/dom");
var cssText = "#ace_settingsmenu, #kbshortcutmenu {\
background-color: #F7F7F7;\
@@ -166,42 +99,72 @@ module.exports.overlayPage = function overlayPage(editor, contentElement, top, r
});
-ace.define('ace/ext/menu_tools/get_editor_keyboard_shortcuts', ['require', 'exports', 'module' , 'ace/lib/keys'], function(require, exports, module) {
-
+ace.define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"], function(require, exports, module) {
+"use strict";
var keys = require("../../lib/keys");
module.exports.getEditorKeybordShortcuts = function(editor) {
var KEY_MODS = keys.KEY_MODS;
var keybindings = [];
var commandMap = {};
editor.keyBinding.$handlers.forEach(function(handler) {
- var ckb = handler.commmandKeyBinding;
+ var ckb = handler.commandKeyBinding;
for (var i in ckb) {
- var modifier = parseInt(i);
- if (modifier == -1) {
- modifier = "";
- } else if(isNaN(modifier)) {
- modifier = i;
- } else {
- modifier = "" +
- (modifier & KEY_MODS.command ? "Cmd-" : "") +
- (modifier & KEY_MODS.ctrl ? "Ctrl-" : "") +
- (modifier & KEY_MODS.alt ? "Alt-" : "") +
- (modifier & KEY_MODS.shift ? "Shift-" : "");
- }
- for (var key in ckb[i]) {
- var command = ckb[i][key]
+ var key = i.replace(/(^|-)\w/g, function(x) { return x.toUpperCase(); });
+ var commands = ckb[i];
+ if (!Array.isArray(commands))
+ commands = [commands];
+ commands.forEach(function(command) {
if (typeof command != "string")
command = command.name
if (commandMap[command]) {
- commandMap[command].key += "|" + modifier + key;
+ commandMap[command].key += "|" + key;
} else {
- commandMap[command] = {key: modifier+key, command: command};
+ commandMap[command] = {key: key, command: command};
keybindings.push(commandMap[command]);
- }
- }
+ }
+ });
}
});
return keybindings;
};
-}); \ No newline at end of file
+});
+
+ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"], function(require, exports, module) {
+ "use strict";
+ var Editor = require("ace/editor").Editor;
+ function showKeyboardShortcuts (editor) {
+ if(!document.getElementById('kbshortcutmenu')) {
+ var overlayPage = require('./menu_tools/overlay_page').overlayPage;
+ var getEditorKeybordShortcuts = require('./menu_tools/get_editor_keyboard_shortcuts').getEditorKeybordShortcuts;
+ var kb = getEditorKeybordShortcuts(editor);
+ var el = document.createElement('div');
+ var commands = kb.reduce(function(previous, current) {
+ return previous + '<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'
+ + current.command + '</span> : '
+ + '<span class="ace_optionsMenuKey">' + current.key + '</span></div>';
+ }, '');
+
+ el.id = 'kbshortcutmenu';
+ el.innerHTML = '<h1>Keyboard Shortcuts</h1>' + commands + '</div>';
+ overlayPage(editor, el, '0', '0', '0', null);
+ }
+ };
+ module.exports.init = function(editor) {
+ Editor.prototype.showKeyboardShortcuts = function() {
+ showKeyboardShortcuts(this);
+ };
+ editor.commands.addCommands([{
+ name: "showKeyboardShortcuts",
+ bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
+ exec: function(editor, line) {
+ editor.showKeyboardShortcuts();
+ }
+ }]);
+ };
+
+});
+ (function() {
+ ace.require(["ace/ext/keybinding_menu"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-language_tools.js b/js/vendor/ace/src-noconflict/ext-language_tools.js
index 1679e3a..4e23d47 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-language_tools.js
+++ b/js/vendor/ace/src-noconflict/ext-language_tools.js
@@ -1,144 +1,10 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/ext/language_tools', ['require', 'exports', 'module' , 'ace/snippets', 'ace/autocomplete', 'ace/config', 'ace/autocomplete/text_completer', 'ace/editor'], function(require, exports, module) {
-
-
-var snippetManager = require("../snippets").snippetManager;
-var Autocomplete = require("../autocomplete").Autocomplete;
-var config = require("../config");
-
-var textCompleter = require("../autocomplete/text_completer");
-var keyWordCompleter = {
- getCompletions: function(editor, session, pos, prefix, callback) {
- var keywords = session.$mode.$keywordList || [];
- keywords = keywords.filter(function(w) {
- return w.lastIndexOf(prefix, 0) == 0;
- });
- callback(null, keywords.map(function(word) {
- return {
- name: word,
- value: word,
- score: 0,
- meta: "keyword"
- };
- }));
- }
-};
-
-var snippetCompleter = {
- getCompletions: function(editor, session, pos, prefix, callback) {
- var scope = snippetManager.$getScope(editor);
- var snippetMap = snippetManager.snippetMap;
- var completions = [];
- [scope, "_"].forEach(function(scope) {
- var snippets = snippetMap[scope] || [];
- for (var i = snippets.length; i--;) {
- var s = snippets[i];
- if (s.tabTrigger && s.tabTrigger.indexOf(prefix) === 0)
- completions.push({
- caption: s.tabTrigger,
- snippet: s.content,
- meta: "snippet"
- });
- }
- }, this);
- callback(null, completions);
- }
-};
-
-var completers = [snippetCompleter, textCompleter, keyWordCompleter];
-exports.addCompleter = function(completer) {
- completers.push(completer);
-};
-
-var expandSnippet = {
- name: "expandSnippet",
- exec: function(editor) {
- var success = snippetManager.expandWithTab(editor);
- if (!success)
- editor.execCommand("indent");
- },
- bindKey: "tab"
-}
-
-var onChangeMode = function(e, editor) {
- var mode = editor.session.$mode;
- var id = mode.$id
- if (!snippetManager.files) snippetManager.files = {};
- if (id && !snippetManager.files[id]) {
- var snippetFilePath = id.replace("mode", "snippets");
- config.loadModule(snippetFilePath, function(m) {
- if (m) {
- snippetManager.files[id] = m;
- m.snippets = snippetManager.parseSnippetFile(m.snippetText);
- snippetManager.register(m.snippets, m.scope);
- }
- });
- }
-};
-
-var Editor = require("../editor").Editor;
-require("../config").defineOptions(Editor.prototype, "editor", {
- enableBasicAutocompletion: {
- set: function(val) {
- if (val) {
- this.completers = completers
- this.commands.addCommand(Autocomplete.startCommand);
- } else {
- this.commands.removeCommand(Autocomplete.startCommand);
- }
- },
- value: false
- },
- enableSnippets: {
- set: function(val) {
- if (val) {
- this.commands.addCommand(expandSnippet);
- this.on("changeMode", onChangeMode);
- onChangeMode(null, this)
- } else {
- this.commands.removeCommand(expandSnippet);
- this.off("changeMode", onChangeMode);
- }
- },
- value: false
- }
-});
-
-});
-
-ace.define('ace/snippets', ['require', 'exports', 'module' , 'ace/lib/lang', 'ace/range', 'ace/keyboard/hash_handler', 'ace/tokenizer', 'ace/lib/dom'], function(require, exports, module) {
-
-var lang = require("./lib/lang")
-var Range = require("./range").Range
+ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"], function(require, exports, module) {
+"use strict";
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var lang = require("./lib/lang");
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
var HashHandler = require("./keyboard/hash_handler").HashHandler;
var Tokenizer = require("./tokenizer").Tokenizer;
var comparePoints = Range.comparePoints;
@@ -149,12 +15,14 @@ var SnippetManager = function() {
};
(function() {
+ oop.implement(this, EventEmitter);
+
this.getTokenizer = function() {
function TabstopToken(str, _, stack) {
str = str.substr(1);
if (/^\d+$/.test(str) && !stack.inFormatString)
return [{tabstopId: parseInt(str, 10)}];
- return [{text: str}]
+ return [{text: str}];
}
function escape(ch) {
return "(?:[^\\\\" + ch + "]|\\\\.)";
@@ -232,7 +100,7 @@ var SnippetManager = function() {
});
SnippetManager.prototype.getTokenizer = function() {
return SnippetManager.$tokenizer;
- }
+ };
return SnippetManager.$tokenizer;
};
@@ -262,18 +130,20 @@ var SnippetManager = function() {
case "SELECTED_TEXT":
return s.getTextRange(r);
case "CURRENT_LINE":
- return s.getLine(e.getCursorPosition().row);
+ return s.getLine(editor.getCursorPosition().row);
+ case "PREV_LINE": // not possible in textmate
+ return s.getLine(editor.getCursorPosition().row - 1);
case "LINE_INDEX":
- return e.getCursorPosition().column;
+ return editor.getCursorPosition().column;
case "LINE_NUMBER":
- return e.getCursorPosition().row + 1;
+ return editor.getCursorPosition().row + 1;
case "SOFT_TABS":
return s.getUseSoftTabs() ? "YES" : "NO";
case "TAB_SIZE":
return s.getTabSize();
case "FILENAME":
case "FILEPATH":
- return "ace.ajax.org";
+ return "";
case "FULLNAME":
return "Ace";
}
@@ -364,11 +234,14 @@ var SnippetManager = function() {
return result;
};
- this.insertSnippet = function(editor, snippetText) {
+ this.insertSnippetForSelection = function(editor, snippetText) {
var cursor = editor.getCursorPosition();
var line = editor.session.getLine(cursor.row);
- var indentString = line.match(/^\s*/)[0];
var tabString = editor.session.getTabString();
+ var indentString = line.match(/^\s*/)[0];
+
+ if (cursor.column < indentString.length)
+ indentString = indentString.slice(0, cursor.column);
var tokens = this.tokenizeTmSnippet(snippetText);
tokens = this.resolveVariables(tokens, editor);
@@ -384,37 +257,70 @@ var SnippetManager = function() {
if (typeof p != "object")
return;
var id = p.tabstopId;
- if (!tabstops[id]) {
- tabstops[id] = [];
- tabstops[id].index = id;
- tabstops[id].value = "";
+ var ts = tabstops[id];
+ if (!ts) {
+ ts = tabstops[id] = [];
+ ts.index = id;
+ ts.value = "";
}
- if (tabstops[id].indexOf(p) != -1)
+ if (ts.indexOf(p) !== -1)
return;
- tabstops[id].push(p);
+ ts.push(p);
var i1 = tokens.indexOf(p, i + 1);
- if (i1 == -1)
+ if (i1 === -1)
return;
- var value = tokens.slice(i + 1, i1).join("");
- if (value)
- tabstops[id].value = value;
- });
- tabstops.forEach(function(ts) {
- ts.value && ts.forEach(function(p) {
- var i = tokens.indexOf(p);
- var i1 = tokens.indexOf(p, i + 1);
- if (i1 == -1)
- tokens.splice(i + 1, 0, ts.value, p);
- else if (i1 == i + 1)
- tokens.splice(i + 1, 0, ts.value);
- });
+ var value = tokens.slice(i + 1, i1);
+ var isNested = value.some(function(t) {return typeof t === "object"});
+ if (isNested && !ts.value) {
+ ts.value = value;
+ } else if (value.length && (!ts.value || typeof ts.value !== "string")) {
+ ts.value = value.join("");
+ }
});
+ tabstops.forEach(function(ts) {ts.length = 0});
+ var expanding = {};
+ function copyValue(val) {
+ var copy = [];
+ for (var i = 0; i < val.length; i++) {
+ var p = val[i];
+ if (typeof p == "object") {
+ if (expanding[p.tabstopId])
+ continue;
+ var j = val.lastIndexOf(p, i - 1);
+ p = copy[j] || {tabstopId: p.tabstopId};
+ }
+ copy[i] = p;
+ }
+ return copy;
+ }
+ for (var i = 0; i < tokens.length; i++) {
+ var p = tokens[i];
+ if (typeof p != "object")
+ continue;
+ var id = p.tabstopId;
+ var i1 = tokens.indexOf(p, i + 1);
+ if (expanding[id]) {
+ if (expanding[id] === p)
+ expanding[id] = null;
+ continue;
+ }
+
+ var ts = tabstops[id];
+ var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value);
+ arg.unshift(i + 1, Math.max(0, i1 - i));
+ arg.push(p);
+ expanding[id] = p;
+ tokens.splice.apply(tokens, arg);
+
+ if (ts.indexOf(p) === -1)
+ ts.push(p);
+ }
var row = 0, column = 0;
var text = "";
tokens.forEach(function(t) {
- if (typeof t == "string") {
- if (t[0] == "\n"){
+ if (typeof t === "string") {
+ if (t[0] === "\n"){
column = t.length - 1;
row ++;
} else
@@ -431,16 +337,34 @@ var SnippetManager = function() {
var end = editor.session.replace(range, text);
var tabstopManager = new TabstopManager(editor);
- tabstopManager.addTabstops(tabstops, range.start, end);
- tabstopManager.tabNext();
+ var selectionId = editor.inVirtualSelectionMode && editor.selection.index;
+ tabstopManager.addTabstops(tabstops, range.start, end, selectionId);
+ };
+
+ this.insertSnippet = function(editor, snippetText) {
+ var self = this;
+ if (editor.inVirtualSelectionMode)
+ return self.insertSnippetForSelection(editor, snippetText);
+
+ editor.forEachSelection(function() {
+ self.insertSnippetForSelection(editor, snippetText);
+ }, null, {keepOrder: true});
+
+ if (editor.tabstopManager)
+ editor.tabstopManager.tabNext();
};
this.$getScope = function(editor) {
var scope = editor.session.$mode.$id || "";
scope = scope.split("/").pop();
- if (editor.session.$mode.$modes) {
- var c = editor.getCursorPosition()
+ if (scope === "html" || scope === "php") {
+ if (scope === "php" && !editor.session.$mode.inlinePhp)
+ scope = "html";
+ var c = editor.getCursorPosition();
var state = editor.session.getState(c.row);
+ if (typeof state === "object") {
+ state = state[0];
+ }
if (state.substring) {
if (state.substring(0, 3) == "js-")
scope = "javascript";
@@ -450,19 +374,40 @@ var SnippetManager = function() {
scope = "php";
}
}
+
return scope;
};
- this.expandWithTab = function(editor) {
+ this.getActiveScopes = function(editor) {
+ var scope = this.$getScope(editor);
+ var scopes = [scope];
+ var snippetMap = this.snippetMap;
+ if (snippetMap[scope] && snippetMap[scope].includeScopes) {
+ scopes.push.apply(scopes, snippetMap[scope].includeScopes);
+ }
+ scopes.push("_");
+ return scopes;
+ };
+
+ this.expandWithTab = function(editor, options) {
+ var self = this;
+ var result = editor.forEachSelection(function() {
+ return self.expandSnippetForSelection(editor, options);
+ }, null, {keepOrder: true});
+ if (result && editor.tabstopManager)
+ editor.tabstopManager.tabNext();
+ return result;
+ };
+
+ this.expandSnippetForSelection = function(editor, options) {
var cursor = editor.getCursorPosition();
var line = editor.session.getLine(cursor.row);
var before = line.substring(0, cursor.column);
var after = line.substr(cursor.column);
- var scope = this.$getScope(editor);
var snippetMap = this.snippetMap;
var snippet;
- [scope, "_"].some(function(scope) {
+ this.getActiveScopes(editor).some(function(scope) {
var snippets = snippetMap[scope];
if (snippets)
snippet = this.findMatchingSnippet(snippets, before, after);
@@ -470,7 +415,8 @@ var SnippetManager = function() {
}, this);
if (!snippet)
return false;
-
+ if (options && options.dryRun)
+ return true;
editor.session.doc.removeInLine(cursor.row,
cursor.column - snippet.replaceBefore.length,
cursor.column + snippet.replaceAfter.length
@@ -478,7 +424,7 @@ var SnippetManager = function() {
this.variables.M__ = snippet.matchBefore;
this.variables.T__ = snippet.matchAfter;
- this.insertSnippet(editor, snippet.content);
+ this.insertSnippetForSelection(editor, snippet.content);
this.variables.M__ = this.variables.T__ = null;
return true;
@@ -508,9 +454,13 @@ var SnippetManager = function() {
var snippetMap = this.snippetMap;
var snippetNameMap = this.snippetNameMap;
var self = this;
+
+ if (!snippets)
+ snippets = [];
+
function wrapRegexp(src) {
if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src))
- src = "(?:" + src + ")"
+ src = "(?:" + src + ")";
return src || "";
}
@@ -532,7 +482,7 @@ var SnippetManager = function() {
function addSnippet(s) {
if (!s.scope)
s.scope = scope || "_";
- scope = s.scope
+ scope = s.scope;
if (!snippetMap[scope]) {
snippetMap[scope] = [];
snippetNameMap[scope] = {};
@@ -558,12 +508,14 @@ var SnippetManager = function() {
s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true);
s.endTriggerRe = new RegExp(s.endTrigger, "", true);
- };
+ }
- if (snippets.content)
+ if (snippets && snippets.content)
addSnippet(snippets);
else if (Array.isArray(snippets))
snippets.forEach(addSnippet);
+
+ this._signal("registerSnippets", {scope: scope});
};
this.unregister = function(snippets, scope) {
var snippetMap = this.snippetMap;
@@ -585,14 +537,14 @@ var SnippetManager = function() {
snippets.forEach(removeSnippet);
};
this.parseSnippetFile = function(str) {
- str = str.replace(/\r/, "");
+ str = str.replace(/\r/g, "");
var list = [], snippet = {};
var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;
var m;
while (m = re.exec(str)) {
if (m[1]) {
try {
- snippet = JSON.parse(m[1])
+ snippet = JSON.parse(m[1]);
list.push(snippet);
} catch (e) {}
} if (m[4]) {
@@ -619,10 +571,9 @@ var SnippetManager = function() {
return list;
};
this.getSnippetByName = function(name, editor) {
- var scope = editor && this.$getScope(editor);
var snippetMap = this.snippetNameMap;
var snippet;
- [scope, "_"].some(function(scope) {
+ this.getActiveScopes(editor).some(function(scope) {
var snippets = snippetMap[scope];
if (snippets)
snippet = snippets[name];
@@ -646,9 +597,10 @@ var TabstopManager = function(editor) {
};
(function() {
this.attach = function(editor) {
- this.index = -1;
+ this.index = 0;
this.ranges = [];
this.tabstops = [];
+ this.$openTabstops = null;
this.selectedTabstop = null;
this.editor = editor;
@@ -688,7 +640,7 @@ var TabstopManager = function(editor) {
}
if (!this.$inChange && isRemove) {
var ts = this.selectedTabstop;
- var changedOutside = !ts.some(function(r) {
+ var changedOutside = ts && !ts.some(function(r) {
return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0;
});
if (changedOutside)
@@ -700,7 +652,7 @@ var TabstopManager = function(editor) {
if (r.end.row < start.row)
continue;
- if (comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) {
+ if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) {
this.removeRange(r);
i--;
continue;
@@ -723,7 +675,7 @@ var TabstopManager = function(editor) {
};
this.updateLinkedFields = function() {
var ts = this.selectedTabstop;
- if (!ts.hasLinkedRanges)
+ if (!ts || !ts.hasLinkedRanges)
return;
this.$inChange = true;
var session = this.editor.session;
@@ -732,7 +684,7 @@ var TabstopManager = function(editor) {
var range = ts[i];
if (!range.linked)
continue;
- var fmt = exports.snippetManager.tmStrFormat(text, range.original)
+ var fmt = exports.snippetManager.tmStrFormat(text, range.original);
session.replace(range, fmt);
}
this.$inChange = false;
@@ -743,7 +695,7 @@ var TabstopManager = function(editor) {
};
this.onChangeSelection = function() {
if (!this.editor)
- return
+ return;
var lead = this.editor.selection.lead;
var anchor = this.editor.selection.anchor;
var isEmpty = this.editor.selection.isEmpty();
@@ -761,14 +713,17 @@ var TabstopManager = function(editor) {
this.detach();
};
this.tabNext = function(dir) {
- var max = this.tabstops.length - 1;
+ var max = this.tabstops.length;
var index = this.index + (dir || 1);
- index = Math.min(Math.max(index, 0), max);
- this.selectTabstop(index);
+ index = Math.min(Math.max(index, 1), max);
if (index == max)
+ index = 0;
+ this.selectTabstop(index);
+ if (index === 0)
this.detach();
};
this.selectTabstop = function(index) {
+ this.$openTabstops = null;
var ts = this.tabstops[this.index];
if (ts)
this.addTabstopMarkers(ts);
@@ -786,6 +741,8 @@ var TabstopManager = function(editor) {
continue;
sel.addRange(ts[i].clone(), true);
}
+ if (sel.ranges[0])
+ sel.addRange(sel.ranges[0].clone());
} else {
this.editor.selection.setRange(ts.firstNonLinked);
}
@@ -793,6 +750,8 @@ var TabstopManager = function(editor) {
this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
};
this.addTabstops = function(tabstops, start, end) {
+ if (!this.$openTabstops)
+ this.$openTabstops = [];
if (!tabstops[0]) {
var p = Range.fromPoints(end, end);
moveRelative(p.start, start);
@@ -802,32 +761,43 @@ var TabstopManager = function(editor) {
}
var i = this.index;
- var arg = [i, 0];
+ var arg = [i + 1, 0];
var ranges = this.ranges;
- var editor = this.editor;
- tabstops.forEach(function(ts) {
+ tabstops.forEach(function(ts, index) {
+ var dest = this.$openTabstops[index] || ts;
+
for (var i = ts.length; i--;) {
var p = ts[i];
var range = Range.fromPoints(p.start, p.end || p.start);
movePoint(range.start, start);
movePoint(range.end, start);
range.original = p;
- range.tabstop = ts;
+ range.tabstop = dest;
ranges.push(range);
- ts[i] = range;
+ if (dest != ts)
+ dest.unshift(range);
+ else
+ dest[i] = range;
if (p.fmtString) {
range.linked = true;
- ts.hasLinkedRanges = true;
- } else if (!ts.firstNonLinked)
- ts.firstNonLinked = range;
+ dest.hasLinkedRanges = true;
+ } else if (!dest.firstNonLinked)
+ dest.firstNonLinked = range;
}
- if (!ts.firstNonLinked)
- ts.hasLinkedRanges = false;
- arg.push(ts);
- this.addTabstopMarkers(ts);
+ if (!dest.firstNonLinked)
+ dest.hasLinkedRanges = false;
+ if (dest === ts) {
+ arg.push(dest);
+ this.$openTabstops[index] = dest;
+ }
+ this.addTabstopMarkers(dest);
}, this);
- arg.push(arg.splice(2, 1)[0]);
- this.tabstops.splice.apply(this.tabstops, arg);
+
+ if (arg.length > 2) {
+ if (this.tabstops.length)
+ arg.push(arg.splice(2, 1)[0]);
+ this.tabstops.splice.apply(this.tabstops, arg);
+ }
};
this.addTabstopMarkers = function(ts) {
@@ -850,11 +820,22 @@ var TabstopManager = function(editor) {
i = this.ranges.indexOf(range);
this.ranges.splice(i, 1);
this.editor.session.removeMarker(range.markerId);
+ if (!range.tabstop.length) {
+ i = this.tabstops.indexOf(range.tabstop);
+ if (i != -1)
+ this.tabstops.splice(i, 1);
+ if (!this.tabstops.length)
+ this.detach();
+ }
};
this.keyboardHandler = new HashHandler();
this.keyboardHandler.bindKeys({
"Tab": function(ed) {
+ if (exports.snippetManager && exports.snippetManager.expandWithTab(ed)) {
+ return;
+ }
+
ed.tabstopManager.tabNext(1);
},
"Shift-Tab": function(ed) {
@@ -870,6 +851,19 @@ var TabstopManager = function(editor) {
}).call(TabstopManager.prototype);
+
+var changeTracker = {};
+changeTracker.onChange = Anchor.prototype.onChange;
+changeTracker.setPosition = function(row, column) {
+ this.pos.row = row;
+ this.pos.column = column;
+};
+changeTracker.update = function(pos, delta, $insertRight) {
+ this.$insertRight = $insertRight;
+ this.pos = pos;
+ this.onChange(delta);
+};
+
var movePoint = function(point, diff) {
if (point.row == 0)
point.column += diff.column;
@@ -895,246 +889,20 @@ require("./lib/dom").importCssString("\
exports.snippetManager = new SnippetManager();
-});
-
-ace.define('ace/autocomplete', ['require', 'exports', 'module' , 'ace/keyboard/hash_handler', 'ace/autocomplete/popup', 'ace/autocomplete/util', 'ace/lib/event', 'ace/lib/lang', 'ace/snippets'], function(require, exports, module) {
-
-
-var HashHandler = require("./keyboard/hash_handler").HashHandler;
-var AcePopup = require("./autocomplete/popup").AcePopup;
-var util = require("./autocomplete/util");
-var event = require("./lib/event");
-var lang = require("./lib/lang");
-var snippetManager = require("./snippets").snippetManager;
-
-var Autocomplete = function() {
- this.keyboardHandler = new HashHandler();
- this.keyboardHandler.bindKeys(this.commands);
-
- this.blurListener = this.blurListener.bind(this);
- this.changeListener = this.changeListener.bind(this);
- this.mousedownListener = this.mousedownListener.bind(this);
- this.mousewheelListener = this.mousewheelListener.bind(this);
-
- this.changeTimer = lang.delayedCall(function() {
- this.updateCompletions(true);
- }.bind(this))
-};
-
+var Editor = require("./editor").Editor;
(function() {
- this.$init = function() {
- this.popup = new AcePopup(document.body || document.documentElement);
- this.popup.on("click", function(e) {
- this.insertMatch();
- e.stop();
- }.bind(this));
- };
-
- this.openPopup = function(editor, keepPopupPosition) {
- if (!this.popup)
- this.$init();
-
- this.popup.setData(this.completions.filtered);
-
- var renderer = editor.renderer;
- if (!keepPopupPosition) {
- var lineHeight = renderer.layerConfig.lineHeight;
- var pos = renderer.$cursorLayer.getPixelPosition(null, true);
- var rect = editor.container.getBoundingClientRect();
- pos.top += rect.top - renderer.layerConfig.offset;
- pos.left += rect.left;
- pos.left += renderer.$gutterLayer.gutterWidth;
-
- this.popup.show(pos, lineHeight);
- }
- renderer.updateText();
- };
-
- this.detach = function() {
- this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
- this.editor.removeEventListener("changeSelection", this.changeListener);
- this.editor.removeEventListener("blur", this.changeListener);
- this.editor.removeEventListener("mousedown", this.changeListener);
- this.changeTimer.cancel();
-
- if (this.popup)
- this.popup.hide();
-
- this.activated = false;
- };
-
- this.changeListener = function(e) {
- if (this.activated)
- this.changeTimer.schedule();
- else
- this.detach();
- };
-
- this.blurListener = function() {
- if (document.activeElement != this.editor.textInput.getElement())
- this.detach();
- };
-
- this.mousedownListener = function(e) {
- this.detach();
- };
-
- this.mousewheelListener = function(e) {
- this.detach();
- };
-
- this.goTo = function(where) {
- var row = this.popup.getRow();
- var max = this.popup.session.getLength() - 1;
-
- switch(where) {
- case "up": row = row <= 0 ? max : row - 1; break;
- case "down": row = row >= max ? 0 : row + 1; break;
- case "start": row = 0; break;
- case "end": row = max; break;
- }
-
- this.popup.setRow(row);
- };
-
- this.insertMatch = function(data) {
- this.detach();
- if (!data)
- data = this.popup.getData(this.popup.getRow());
- if (!data)
- return false;
- if (data.completer && data.completer.insertMatch) {
- data.completer.insertMatch(this.editor);
- } else {
- if (this.completions.filterText) {
- var range = this.editor.selection.getRange();
- range.start.column -= this.completions.filterText.length;
- this.editor.session.remove(range);
- }
- if (data.snippet)
- snippetManager.insertSnippet(this.editor, data.snippet);
- else
- this.editor.insert(data.value || data);
- }
- };
-
- this.commands = {
- "Up": function(editor) { editor.completer.goTo("up"); },
- "Down": function(editor) { editor.completer.goTo("down"); },
- "Ctrl-Up|Ctrl-Home": function(editor) { editor.completer.goTo("start"); },
- "Ctrl-Down|Ctrl-End": function(editor) { editor.completer.goTo("end"); },
-
- "Esc": function(editor) { editor.completer.detach(); },
- "Space": function(editor) { editor.completer.detach(); editor.insert(" ");},
- "Return": function(editor) { editor.completer.insertMatch(); },
- "Shift-Return": function(editor) { editor.completer.insertMatch(true); },
- "Tab": function(editor) { editor.completer.insertMatch(); },
-
- "PageUp": function(editor) { editor.completer.popup.gotoPageDown(); },
- "PageDown": function(editor) { editor.completer.popup.gotoPageUp(); }
+ this.insertSnippet = function(content, options) {
+ return exports.snippetManager.insertSnippet(this, content, options);
};
-
- this.gatherCompletions = function(editor, callback) {
- var session = editor.getSession();
- var pos = editor.getCursorPosition();
-
- var line = session.getLine(pos.row);
- var prefix = util.retrievePrecedingIdentifier(line, pos.column);
-
- var matches = [];
- util.parForEach(editor.completers, function(completer, next) {
- completer.getCompletions(editor, session, pos, prefix, function(err, results) {
- if (!err)
- matches = matches.concat(results);
- next();
- });
- }, function() {
- matches.sort(function(a, b) {
- return b.score - a.score;
- });
- callback(null, {
- prefix: prefix,
- matches: matches
- });
- });
- return true;
+ this.expandSnippet = function(options) {
+ return exports.snippetManager.expandWithTab(this, options);
};
-
- this.showPopup = function(editor) {
- if (this.editor)
- this.detach();
-
- this.activated = true;
-
- this.editor = editor;
- if (editor.completer != this) {
- if (editor.completer)
- editor.completer.detach();
- editor.completer = this;
- }
-
- editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
- editor.on("changeSelection", this.changeListener);
- editor.on("blur", this.blurListener);
- editor.on("mousedown", this.mousedownListener);
- this.updateCompletions();
- }
-
- this.updateCompletions = function(keepPopupPosition) {
- this.gatherCompletions(this.editor, function(err, results) {
- var matches = results && results.matches;
- if (!matches || !matches.length)
- return this.detach();
-
- this.completions = new FilteredList(matches);
- this.completions.setFilter(results.prefix);
- this.openPopup(this.editor, keepPopupPosition);
- this.popup.setHighlight(results.prefix);
- }.bind(this));
- };
-
- this.cancelContextMenu = function() {
- var stop = function(e) {
- this.editor.off("nativecontextmenu", stop);
- if (e && e.domEvent)
- event.stopEvent(e.domEvent);
- }.bind(this);
- setTimeout(stop, 10);
- this.editor.on("nativecontextmenu", stop);
- };
-
-}).call(Autocomplete.prototype);
-
-Autocomplete.startCommand = {
- name: "startAutocomplete",
- exec: function(editor) {
- if (!editor.completer)
- editor.completer = new Autocomplete();
- editor.completer.showPopup(editor);
- editor.completer.cancelContextMenu();
- },
- bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space"
-};
-
-var FilteredList = function(array, mutateData) {
- this.all = array;
- this.filtered = array.concat();
- this.filterText = "";
-};
-(function(){
- this.setFilter = function(str) {
- this.filterText = str;
- };
-
-}).call(FilteredList.prototype);
-
-exports.Autocomplete = Autocomplete;
-exports.FilteredList = FilteredList;
+}).call(Editor.prototype);
});
-ace.define('ace/autocomplete/popup', ['require', 'exports', 'module' , 'ace/edit_session', 'ace/virtual_renderer', 'ace/editor', 'ace/range', 'ace/lib/event', 'ace/lib/lang', 'ace/lib/dom'], function(require, exports, module) {
-
+ace.define("ace/autocomplete/popup",["require","exports","module","ace/edit_session","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"], function(require, exports, module) {
+"use strict";
var EditSession = require("../edit_session").EditSession;
var Renderer = require("../virtual_renderer").VirtualRenderer;
@@ -1148,7 +916,7 @@ var $singleLineEditor = function(el) {
var renderer = new Renderer(el);
renderer.$maxLines = 4;
-
+
var editor = new Editor(renderer);
editor.setHighlightActiveLine(false);
@@ -1157,6 +925,7 @@ var $singleLineEditor = function(el) {
editor.renderer.setHighlightGutterLine(false);
editor.$mouseHandler.$focusWaitTimout = 0;
+ editor.$highlightTagPending = true;
return editor;
};
@@ -1164,13 +933,16 @@ var $singleLineEditor = function(el) {
var AcePopup = function(parentNode) {
var el = dom.createElement("div");
var popup = new $singleLineEditor(el);
-
+
if (parentNode)
parentNode.appendChild(el);
el.style.display = "none";
popup.renderer.content.style.cursor = "default";
popup.renderer.setStyle("ace_autocomplete");
+ popup.setOption("displayIndentGuides", false);
+ popup.setOption("dragDelay", 150);
+
var noop = function(){};
popup.focus = noop;
@@ -1182,36 +954,84 @@ var AcePopup = function(parentNode) {
popup.renderer.$maxLines = 8;
popup.renderer.$keepTextAreaAtCursor = false;
- popup.setHighlightActiveLine(true);
+ popup.setHighlightActiveLine(false);
popup.session.highlight("");
popup.session.$searchHighlight.clazz = "ace_highlight-marker";
popup.on("mousedown", function(e) {
var pos = e.getDocumentPosition();
- popup.moveCursorToPosition(pos);
- popup.selection.clearSelection();
+ popup.selection.moveToPosition(pos);
+ selectionMarker.start.row = selectionMarker.end.row = pos.row;
e.stop();
});
+ var lastMouseEvent;
var hoverMarker = new Range(-1,0,-1,Infinity);
- hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine");
+ var selectionMarker = new Range(-1,0,-1,Infinity);
+ selectionMarker.id = popup.session.addMarker(selectionMarker, "ace_active-line", "fullLine");
+ popup.setSelectOnHover = function(val) {
+ if (!val) {
+ hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine");
+ } else if (hoverMarker.id) {
+ popup.session.removeMarker(hoverMarker.id);
+ hoverMarker.id = null;
+ }
+ };
+ popup.setSelectOnHover(false);
popup.on("mousemove", function(e) {
- var row = e.getDocumentPosition().row;
- hoverMarker.start.row = hoverMarker.end.row = row;
- popup.session._emit("changeBackMarker");
+ if (!lastMouseEvent) {
+ lastMouseEvent = e;
+ return;
+ }
+ if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) {
+ return;
+ }
+ lastMouseEvent = e;
+ lastMouseEvent.scrollTop = popup.renderer.scrollTop;
+ var row = lastMouseEvent.getDocumentPosition().row;
+ if (hoverMarker.start.row != row) {
+ if (!hoverMarker.id)
+ popup.setRow(row);
+ setHoverMarker(row);
+ }
+ });
+ popup.renderer.on("beforeRender", function() {
+ if (lastMouseEvent && hoverMarker.start.row != -1) {
+ lastMouseEvent.$pos = null;
+ var row = lastMouseEvent.getDocumentPosition().row;
+ if (!hoverMarker.id)
+ popup.setRow(row);
+ setHoverMarker(row, true);
+ }
+ });
+ popup.renderer.on("afterRender", function() {
+ var row = popup.getRow();
+ var t = popup.renderer.$textLayer;
+ var selected = t.element.childNodes[row - t.config.firstRow];
+ if (selected == t.selectedNode)
+ return;
+ if (t.selectedNode)
+ dom.removeCssClass(t.selectedNode, "ace_selected");
+ t.selectedNode = selected;
+ if (selected)
+ dom.addCssClass(selected, "ace_selected");
});
- var hideHoverMarker = function() {
- hoverMarker.start.row = hoverMarker.end.row = -1;
- popup.session._emit("changeBackMarker");
+ var hideHoverMarker = function() { setHoverMarker(-1) };
+ var setHoverMarker = function(row, suppressRedraw) {
+ if (row !== hoverMarker.start.row) {
+ hoverMarker.start.row = hoverMarker.end.row = row;
+ if (!suppressRedraw)
+ popup.session._emit("changeBackMarker");
+ popup._emit("changeHoverMarker");
+ }
+ };
+ popup.getHoveredRow = function() {
+ return hoverMarker.start.row;
};
+
event.addListener(popup.container, "mouseout", hideHoverMarker);
popup.on("hide", hideHoverMarker);
popup.on("changeSelection", hideHoverMarker);
- popup.on("mousewheel", function(e) {
- setTimeout(function() {
- popup._signal("mousemove", e);
- });
- });
popup.session.doc.getLength = function() {
return popup.data.length;
@@ -1224,90 +1044,146 @@ var AcePopup = function(parentNode) {
};
var bgTokenizer = popup.session.bgTokenizer;
- bgTokenizer.$tokenizeRow = function(i) {
- var data = popup.data[i];
+ bgTokenizer.$tokenizeRow = function(row) {
+ var data = popup.data[row];
var tokens = [];
if (!data)
return tokens;
if (typeof data == "string")
data = {value: data};
if (!data.caption)
- data.caption = data.value;
+ data.caption = data.value || data.name;
+
+ var last = -1;
+ var flag, c;
+ for (var i = 0; i < data.caption.length; i++) {
+ c = data.caption[i];
+ flag = data.matchMask & (1 << i) ? 1 : 0;
+ if (last !== flag) {
+ tokens.push({type: data.className || "" + ( flag ? "completion-highlight" : ""), value: c});
+ last = flag;
+ } else {
+ tokens[tokens.length - 1].value += c;
+ }
+ }
- tokens.push({type: data.className || "", value: data.caption});
if (data.meta) {
var maxW = popup.renderer.$size.scrollerWidth / popup.renderer.layerConfig.characterWidth;
- if (data.meta.length + data.caption.length < maxW - 2)
- tokens.push({type: "rightAlignedText", value: data.meta});
+ var metaData = data.meta;
+ if (metaData.length + data.caption.length > maxW - 2) {
+ metaData = metaData.substr(0, maxW - data.caption.length - 3) + "\u2026"
+ }
+ tokens.push({type: "rightAlignedText", value: metaData});
}
return tokens;
};
bgTokenizer.$updateOnChange = noop;
-
+ bgTokenizer.start = noop;
+
popup.session.$computeWidth = function() {
return this.screenWidth = 0;
- }
+ };
+
+ popup.$blockScrolling = Infinity;
+ popup.isOpen = false;
+ popup.isTopdown = false;
+
popup.data = [];
popup.setData = function(list) {
popup.data = list || [];
popup.setValue(lang.stringRepeat("\n", list.length), -1);
+ popup.setRow(0);
};
popup.getData = function(row) {
return popup.data[row];
};
-
- popup.getRow = function() {
- var line = this.getCursorPosition().row;
- if (line == 0 && !this.getHighlightActiveLine())
- line = -1;
- return line;
+
+ popup.getRow = function() {
+ return selectionMarker.start.row;
};
popup.setRow = function(line) {
- popup.setHighlightActiveLine(line != -1);
- popup.selection.clearSelection();
- popup.moveCursorTo(line, 0 || 0);
+ line = Math.max(-1, Math.min(this.data.length, line));
+ if (selectionMarker.start.row != line) {
+ popup.selection.clearSelection();
+ selectionMarker.start.row = selectionMarker.end.row = line || 0;
+ popup.session._emit("changeBackMarker");
+ popup.moveCursorTo(line || 0, 0);
+ if (popup.isOpen)
+ popup._signal("select");
+ }
};
- popup.setHighlight = function(re) {
- popup.session.highlight(re);
- popup.session._emit("changeFrontMarker");
- };
+ popup.on("changeSelection", function() {
+ if (popup.isOpen)
+ popup.setRow(popup.selection.lead.row);
+ popup.renderer.scrollCursorIntoView();
+ });
popup.hide = function() {
this.container.style.display = "none";
this._signal("hide");
+ popup.isOpen = false;
};
- popup.show = function(pos, lineHeight) {
+ popup.show = function(pos, lineHeight, topdownOnly) {
var el = this.container;
- if (pos.top > window.innerHeight / 2 + lineHeight) {
+ var screenHeight = window.innerHeight;
+ var screenWidth = window.innerWidth;
+ var renderer = this.renderer;
+ var maxH = renderer.$maxLines * lineHeight * 1.4;
+ var top = pos.top + this.$borderSize;
+ if (top + maxH > screenHeight - lineHeight && !topdownOnly) {
el.style.top = "";
- el.style.bottom = window.innerHeight - pos.top + "px";
+ el.style.bottom = screenHeight - top + "px";
+ popup.isTopdown = false;
} else {
- pos.top += lineHeight;
- el.style.top = pos.top + "px";
+ top += lineHeight;
+ el.style.top = top + "px";
el.style.bottom = "";
+ popup.isTopdown = true;
}
- el.style.left = pos.left + "px";
el.style.display = "";
this.renderer.$textLayer.checkForSizeChanges();
+ var left = pos.left;
+ if (left + el.offsetWidth > screenWidth)
+ left = screenWidth - el.offsetWidth;
+
+ el.style.left = left + "px";
+
this._signal("show");
+ lastMouseEvent = null;
+ popup.isOpen = true;
};
+ popup.getTextLeftOffset = function() {
+ return this.$borderSize + this.renderer.$padding + this.$imageSize;
+ };
+
+ popup.$imageSize = 0;
+ popup.$borderSize = 1;
+
return popup;
};
dom.importCssString("\
-.ace_autocomplete.ace-tm .ace_marker-layer .ace_active-line {\
- background-color: #abbffe;\
+.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\
+ background-color: #CAD6FA;\
+ z-index: 1;\
}\
-.ace_autocomplete.ace-tm .ace_line-hover {\
+.ace_editor.ace_autocomplete .ace_line-hover {\
border: 1px solid #abbffe;\
- position: absolute;\
+ margin-top: -1px;\
background: rgba(233,233,253,0.4);\
+}\
+.ace_editor.ace_autocomplete .ace_line-hover {\
+ position: absolute;\
z-index: 2;\
- margin-top: -1px;\
+}\
+.ace_editor.ace_autocomplete .ace_scroller {\
+ background: none;\
+ border: none;\
+ box-shadow: none;\
}\
.ace_rightAlignedText {\
color: gray;\
@@ -1317,21 +1193,27 @@ dom.importCssString("\
text-align: right;\
z-index: -1;\
}\
-.ace_autocomplete {\
- width: 200px;\
+.ace_editor.ace_autocomplete .ace_completion-highlight{\
+ color: #000;\
+ text-shadow: 0 0 0.01em;\
+}\
+.ace_editor.ace_autocomplete {\
+ width: 280px;\
z-index: 200000;\
- background: #f8f8f8;\
+ background: #fbfbfb;\
+ color: #444;\
border: 1px lightgray solid;\
position: fixed;\
box-shadow: 2px 3px 5px rgba(0,0,0,.2);\
+ line-height: 1.4;\
}");
exports.AcePopup = AcePopup;
});
-ace.define('ace/autocomplete/util', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/autocomplete/util",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.parForEach = function(array, fn, callback) {
var completed = 0;
@@ -1345,9 +1227,9 @@ exports.parForEach = function(array, fn, callback) {
callback(result, err);
});
}
-}
+};
-var ID_REGEX = /[a-zA-Z_0-9\$-]/;
+var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;
exports.retrievePrecedingIdentifier = function(text, pos, regex) {
regex = regex || ID_REGEX;
@@ -1359,7 +1241,7 @@ exports.retrievePrecedingIdentifier = function(text, pos, regex) {
break;
}
return buf.reverse().join("");
-}
+};
exports.retrieveFollowingIdentifier = function(text, pos, regex) {
regex = regex || ID_REGEX;
@@ -1371,27 +1253,465 @@ exports.retrieveFollowingIdentifier = function(text, pos, regex) {
break;
}
return buf;
-}
+};
});
-ace.define('ace/autocomplete/text_completer', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
- var Range = require("ace/range").Range;
-
- var splitRegex = /[^a-zA-Z_0-9\$\-]+/;
+ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/snippets"], function(require, exports, module) {
+"use strict";
- function getWordIndex(doc, pos) {
- var textBefore = doc.getTextRange(Range.fromPoints({row: 0, column:0}, pos));
- return textBefore.split(splitRegex).length - 1;
- }
- function filterPrefix(prefix, words) {
+var HashHandler = require("./keyboard/hash_handler").HashHandler;
+var AcePopup = require("./autocomplete/popup").AcePopup;
+var util = require("./autocomplete/util");
+var event = require("./lib/event");
+var lang = require("./lib/lang");
+var dom = require("./lib/dom");
+var snippetManager = require("./snippets").snippetManager;
+
+var Autocomplete = function() {
+ this.autoInsert = false;
+ this.autoSelect = true;
+ this.exactMatch = false;
+ this.gatherCompletionsId = 0;
+ this.keyboardHandler = new HashHandler();
+ this.keyboardHandler.bindKeys(this.commands);
+
+ this.blurListener = this.blurListener.bind(this);
+ this.changeListener = this.changeListener.bind(this);
+ this.mousedownListener = this.mousedownListener.bind(this);
+ this.mousewheelListener = this.mousewheelListener.bind(this);
+
+ this.changeTimer = lang.delayedCall(function() {
+ this.updateCompletions(true);
+ }.bind(this));
+
+ this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50);
+};
+
+(function() {
+
+ this.$init = function() {
+ this.popup = new AcePopup(document.body || document.documentElement);
+ this.popup.on("click", function(e) {
+ this.insertMatch();
+ e.stop();
+ }.bind(this));
+ this.popup.focus = this.editor.focus.bind(this.editor);
+ this.popup.on("show", this.tooltipTimer.bind(null, null));
+ this.popup.on("select", this.tooltipTimer.bind(null, null));
+ this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null));
+ return this.popup;
+ };
+
+ this.getPopup = function() {
+ return this.popup || this.$init();
+ };
+
+ this.openPopup = function(editor, prefix, keepPopupPosition) {
+ if (!this.popup)
+ this.$init();
+
+ this.popup.setData(this.completions.filtered);
+
+ editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
+
+ var renderer = editor.renderer;
+ this.popup.setRow(this.autoSelect ? 0 : -1);
+ if (!keepPopupPosition) {
+ this.popup.setTheme(editor.getTheme());
+ this.popup.setFontSize(editor.getFontSize());
+
+ var lineHeight = renderer.layerConfig.lineHeight;
+
+ var pos = renderer.$cursorLayer.getPixelPosition(this.base, true);
+ pos.left -= this.popup.getTextLeftOffset();
+
+ var rect = editor.container.getBoundingClientRect();
+ pos.top += rect.top - renderer.layerConfig.offset;
+ pos.left += rect.left - editor.renderer.scrollLeft;
+ pos.left += renderer.$gutterLayer.gutterWidth;
+
+ this.popup.show(pos, lineHeight);
+ } else if (keepPopupPosition && !prefix) {
+ this.detach();
+ }
+ };
+
+ this.detach = function() {
+ this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
+ this.editor.off("changeSelection", this.changeListener);
+ this.editor.off("blur", this.blurListener);
+ this.editor.off("mousedown", this.mousedownListener);
+ this.editor.off("mousewheel", this.mousewheelListener);
+ this.changeTimer.cancel();
+ this.hideDocTooltip();
+
+ this.gatherCompletionsId += 1;
+ if (this.popup && this.popup.isOpen)
+ this.popup.hide();
+
+ if (this.base)
+ this.base.detach();
+ this.activated = false;
+ this.completions = this.base = null;
+ };
+
+ this.changeListener = function(e) {
+ var cursor = this.editor.selection.lead;
+ if (cursor.row != this.base.row || cursor.column < this.base.column) {
+ this.detach();
+ }
+ if (this.activated)
+ this.changeTimer.schedule();
+ else
+ this.detach();
+ };
+
+ this.blurListener = function(e) {
+ var el = document.activeElement;
+ var text = this.editor.textInput.getElement()
+ if (el != text && ( !this.popup || el.parentNode != this.popup.container )
+ && el != this.tooltipNode && e.relatedTarget != this.tooltipNode
+ && e.relatedTarget != text
+ ) {
+ this.detach();
+ }
+ };
+
+ this.mousedownListener = function(e) {
+ this.detach();
+ };
+
+ this.mousewheelListener = function(e) {
+ this.detach();
+ };
+
+ this.goTo = function(where) {
+ var row = this.popup.getRow();
+ var max = this.popup.session.getLength() - 1;
+
+ switch(where) {
+ case "up": row = row <= 0 ? max : row - 1; break;
+ case "down": row = row >= max ? -1 : row + 1; break;
+ case "start": row = 0; break;
+ case "end": row = max; break;
+ }
+
+ this.popup.setRow(row);
+ };
+
+ this.insertMatch = function(data) {
+ if (!data)
+ data = this.popup.getData(this.popup.getRow());
+ if (!data)
+ return false;
+
+ if (data.completer && data.completer.insertMatch) {
+ data.completer.insertMatch(this.editor, data);
+ } else {
+ if (this.completions.filterText) {
+ var ranges = this.editor.selection.getAllRanges();
+ for (var i = 0, range; range = ranges[i]; i++) {
+ range.start.column -= this.completions.filterText.length;
+ this.editor.session.remove(range);
+ }
+ }
+ if (data.snippet)
+ snippetManager.insertSnippet(this.editor, data.snippet);
+ else
+ this.editor.execCommand("insertstring", data.value || data);
+ }
+ this.detach();
+ };
+
+
+ this.commands = {
+ "Up": function(editor) { editor.completer.goTo("up"); },
+ "Down": function(editor) { editor.completer.goTo("down"); },
+ "Ctrl-Up|Ctrl-Home": function(editor) { editor.completer.goTo("start"); },
+ "Ctrl-Down|Ctrl-End": function(editor) { editor.completer.goTo("end"); },
+
+ "Esc": function(editor) { editor.completer.detach(); },
+ "Return": function(editor) { return editor.completer.insertMatch(); },
+ "Shift-Return": function(editor) { editor.completer.insertMatch(true); },
+ "Tab": function(editor) {
+ var result = editor.completer.insertMatch();
+ if (!result && !editor.tabstopManager)
+ editor.completer.goTo("down");
+ else
+ return result;
+ },
+
+ "PageUp": function(editor) { editor.completer.popup.gotoPageUp(); },
+ "PageDown": function(editor) { editor.completer.popup.gotoPageDown(); }
+ };
+
+ this.gatherCompletions = function(editor, callback) {
+ var session = editor.getSession();
+ var pos = editor.getCursorPosition();
+
+ var line = session.getLine(pos.row);
+ var prefix = util.retrievePrecedingIdentifier(line, pos.column);
+
+ this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length);
+ this.base.$insertRight = true;
+
+ var matches = [];
+ var total = editor.completers.length;
+ editor.completers.forEach(function(completer, i) {
+ completer.getCompletions(editor, session, pos, prefix, function(err, results) {
+ if (!err)
+ matches = matches.concat(results);
+ var pos = editor.getCursorPosition();
+ var line = session.getLine(pos.row);
+ callback(null, {
+ prefix: util.retrievePrecedingIdentifier(line, pos.column, results[0] && results[0].identifierRegex),
+ matches: matches,
+ finished: (--total === 0)
+ });
+ });
+ });
+ return true;
+ };
+
+ this.showPopup = function(editor) {
+ if (this.editor)
+ this.detach();
+
+ this.activated = true;
+
+ this.editor = editor;
+ if (editor.completer != this) {
+ if (editor.completer)
+ editor.completer.detach();
+ editor.completer = this;
+ }
+
+ editor.on("changeSelection", this.changeListener);
+ editor.on("blur", this.blurListener);
+ editor.on("mousedown", this.mousedownListener);
+ editor.on("mousewheel", this.mousewheelListener);
+
+ this.updateCompletions();
+ };
+
+ this.updateCompletions = function(keepPopupPosition) {
+ if (keepPopupPosition && this.base && this.completions) {
+ var pos = this.editor.getCursorPosition();
+ var prefix = this.editor.session.getTextRange({start: this.base, end: pos});
+ if (prefix == this.completions.filterText)
+ return;
+ this.completions.setFilter(prefix);
+ if (!this.completions.filtered.length)
+ return this.detach();
+ if (this.completions.filtered.length == 1
+ && this.completions.filtered[0].value == prefix
+ && !this.completions.filtered[0].snippet)
+ return this.detach();
+ this.openPopup(this.editor, prefix, keepPopupPosition);
+ return;
+ }
+ var _id = this.gatherCompletionsId;
+ this.gatherCompletions(this.editor, function(err, results) {
+ var detachIfFinished = function() {
+ if (!results.finished) return;
+ return this.detach();
+ }.bind(this);
+
+ var prefix = results.prefix;
+ var matches = results && results.matches;
+
+ if (!matches || !matches.length)
+ return detachIfFinished();
+ if (prefix.indexOf(results.prefix) !== 0 || _id != this.gatherCompletionsId)
+ return;
+
+ this.completions = new FilteredList(matches);
+
+ if (this.exactMatch)
+ this.completions.exactMatch = true;
+
+ this.completions.setFilter(prefix);
+ var filtered = this.completions.filtered;
+ if (!filtered.length)
+ return detachIfFinished();
+ if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet)
+ return detachIfFinished();
+ if (this.autoInsert && filtered.length == 1 && results.finished)
+ return this.insertMatch(filtered[0]);
+
+ this.openPopup(this.editor, prefix, keepPopupPosition);
+ }.bind(this));
+ };
+
+ this.cancelContextMenu = function() {
+ this.editor.$mouseHandler.cancelContextMenu();
+ };
+
+ this.updateDocTooltip = function() {
+ var popup = this.popup;
+ var all = popup.data;
+ var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]);
+ var doc = null;
+ if (!selected || !this.editor || !this.popup.isOpen)
+ return this.hideDocTooltip();
+ this.editor.completers.some(function(completer) {
+ if (completer.getDocTooltip)
+ doc = completer.getDocTooltip(selected);
+ return doc;
+ });
+ if (!doc)
+ doc = selected;
+
+ if (typeof doc == "string")
+ doc = {docText: doc}
+ if (!doc || !(doc.docHTML || doc.docText))
+ return this.hideDocTooltip();
+ this.showDocTooltip(doc);
+ };
+
+ this.showDocTooltip = function(item) {
+ if (!this.tooltipNode) {
+ this.tooltipNode = dom.createElement("div");
+ this.tooltipNode.className = "ace_tooltip ace_doc-tooltip";
+ this.tooltipNode.style.margin = 0;
+ this.tooltipNode.style.pointerEvents = "auto";
+ this.tooltipNode.tabIndex = -1;
+ this.tooltipNode.onblur = this.blurListener.bind(this);
+ }
+
+ var tooltipNode = this.tooltipNode;
+ if (item.docHTML) {
+ tooltipNode.innerHTML = item.docHTML;
+ } else if (item.docText) {
+ tooltipNode.textContent = item.docText;
+ }
+
+ if (!tooltipNode.parentNode)
+ document.body.appendChild(tooltipNode);
+ var popup = this.popup;
+ var rect = popup.container.getBoundingClientRect();
+ tooltipNode.style.top = popup.container.style.top;
+ tooltipNode.style.bottom = popup.container.style.bottom;
+
+ if (window.innerWidth - rect.right < 320) {
+ tooltipNode.style.right = window.innerWidth - rect.left + "px";
+ tooltipNode.style.left = "";
+ } else {
+ tooltipNode.style.left = (rect.right + 1) + "px";
+ tooltipNode.style.right = "";
+ }
+ tooltipNode.style.display = "block";
+ };
+
+ this.hideDocTooltip = function() {
+ this.tooltipTimer.cancel();
+ if (!this.tooltipNode) return;
+ var el = this.tooltipNode;
+ if (!this.editor.isFocused() && document.activeElement == el)
+ this.editor.focus();
+ this.tooltipNode = null;
+ if (el.parentNode)
+ el.parentNode.removeChild(el);
+ };
+
+}).call(Autocomplete.prototype);
+
+Autocomplete.startCommand = {
+ name: "startAutocomplete",
+ exec: function(editor) {
+ if (!editor.completer)
+ editor.completer = new Autocomplete();
+ editor.completer.autoInsert = false;
+ editor.completer.autoSelect = true;
+ editor.completer.showPopup(editor);
+ editor.completer.cancelContextMenu();
+ },
+ bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space"
+};
+
+var FilteredList = function(array, filterText, mutateData) {
+ this.all = array;
+ this.filtered = array;
+ this.filterText = filterText || "";
+ this.exactMatch = false;
+};
+(function(){
+ this.setFilter = function(str) {
+ if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0)
+ var matches = this.filtered;
+ else
+ var matches = this.all;
+
+ this.filterText = str;
+ matches = this.filterCompletions(matches, this.filterText);
+ matches = matches.sort(function(a, b) {
+ return b.exactMatch - a.exactMatch || b.score - a.score;
+ });
+ var prev = null;
+ matches = matches.filter(function(item){
+ var caption = item.snippet || item.caption || item.value;
+ if (caption === prev) return false;
+ prev = caption;
+ return true;
+ });
+
+ this.filtered = matches;
+ };
+ this.filterCompletions = function(items, needle) {
var results = [];
- for (var i = 0; i < words.length; i++) {
- if (words[i].lastIndexOf(prefix, 0) === 0) {
- results.push(words[i]);
+ var upper = needle.toUpperCase();
+ var lower = needle.toLowerCase();
+ loop: for (var i = 0, item; item = items[i]; i++) {
+ var caption = item.value || item.caption || item.snippet;
+ if (!caption) continue;
+ var lastIndex = -1;
+ var matchMask = 0;
+ var penalty = 0;
+ var index, distance;
+
+ if (this.exactMatch) {
+ if (needle !== caption.substr(0, needle.length))
+ continue loop;
+ }else{
+ for (var j = 0; j < needle.length; j++) {
+ var i1 = caption.indexOf(lower[j], lastIndex + 1);
+ var i2 = caption.indexOf(upper[j], lastIndex + 1);
+ index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2;
+ if (index < 0)
+ continue loop;
+ distance = index - lastIndex - 1;
+ if (distance > 0) {
+ if (lastIndex === -1)
+ penalty += 10;
+ penalty += distance;
+ }
+ matchMask = matchMask | (1 << index);
+ lastIndex = index;
+ }
}
+ item.matchMask = matchMask;
+ item.exactMatch = penalty ? 0 : 1;
+ item.score = (item.score || 0) - penalty;
+ results.push(item);
}
return results;
+ };
+}).call(FilteredList.prototype);
+
+exports.Autocomplete = Autocomplete;
+exports.FilteredList = FilteredList;
+
+});
+
+ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"], function(require, exports, module) {
+ var Range = require("../range").Range;
+
+ var splitRegex = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;
+
+ function getWordIndex(doc, pos) {
+ var textBefore = doc.getTextRange(Range.fromPoints({row: 0, column:0}, pos));
+ return textBefore.split(splitRegex).length - 1;
}
function wordDistance(doc, pos) {
var prefixPos = getWordIndex(doc, pos);
@@ -1416,14 +1736,199 @@ ace.define('ace/autocomplete/text_completer', ['require', 'exports', 'module' ,
exports.getCompletions = function(editor, session, pos, prefix, callback) {
var wordScore = wordDistance(session, pos, prefix);
- var wordList = filterPrefix(prefix, Object.keys(wordScore));
+ var wordList = Object.keys(wordScore);
callback(null, wordList.map(function(word) {
return {
- name: word,
+ caption: word,
value: word,
score: wordScore[word],
meta: "local"
};
}));
};
-}); \ No newline at end of file
+});
+
+ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"], function(require, exports, module) {
+"use strict";
+
+var snippetManager = require("../snippets").snippetManager;
+var Autocomplete = require("../autocomplete").Autocomplete;
+var config = require("../config");
+var lang = require("../lib/lang");
+var util = require("../autocomplete/util");
+
+var textCompleter = require("../autocomplete/text_completer");
+var keyWordCompleter = {
+ getCompletions: function(editor, session, pos, prefix, callback) {
+ if (session.$mode.completer) {
+ return session.$mode.completer.getCompletions(editor, session, pos, prefix, callback);
+ }
+ var state = editor.session.getState(pos.row);
+ var completions = session.$mode.getCompletions(state, session, pos, prefix);
+ callback(null, completions);
+ }
+};
+
+var snippetCompleter = {
+ getCompletions: function(editor, session, pos, prefix, callback) {
+ var snippetMap = snippetManager.snippetMap;
+ var completions = [];
+ snippetManager.getActiveScopes(editor).forEach(function(scope) {
+ var snippets = snippetMap[scope] || [];
+ for (var i = snippets.length; i--;) {
+ var s = snippets[i];
+ var caption = s.name || s.tabTrigger;
+ if (!caption)
+ continue;
+ completions.push({
+ caption: caption,
+ snippet: s.content,
+ meta: s.tabTrigger && !s.name ? s.tabTrigger + "\u21E5 " : "snippet",
+ type: "snippet"
+ });
+ }
+ }, this);
+ callback(null, completions);
+ },
+ getDocTooltip: function(item) {
+ if (item.type == "snippet" && !item.docHTML) {
+ item.docHTML = [
+ "<b>", lang.escapeHTML(item.caption), "</b>", "<hr></hr>",
+ lang.escapeHTML(item.snippet)
+ ].join("");
+ }
+ }
+};
+
+var completers = [snippetCompleter, textCompleter, keyWordCompleter];
+exports.setCompleters = function(val) {
+ completers = val || [];
+};
+exports.addCompleter = function(completer) {
+ completers.push(completer);
+};
+exports.textCompleter = textCompleter;
+exports.keyWordCompleter = keyWordCompleter;
+exports.snippetCompleter = snippetCompleter;
+
+var expandSnippet = {
+ name: "expandSnippet",
+ exec: function(editor) {
+ return snippetManager.expandWithTab(editor);
+ },
+ bindKey: "Tab"
+};
+
+var onChangeMode = function(e, editor) {
+ loadSnippetsForMode(editor.session.$mode);
+};
+
+var loadSnippetsForMode = function(mode) {
+ var id = mode.$id;
+ if (!snippetManager.files)
+ snippetManager.files = {};
+ loadSnippetFile(id);
+ if (mode.modes)
+ mode.modes.forEach(loadSnippetsForMode);
+};
+
+var loadSnippetFile = function(id) {
+ if (!id || snippetManager.files[id])
+ return;
+ var snippetFilePath = id.replace("mode", "snippets");
+ snippetManager.files[id] = {};
+ config.loadModule(snippetFilePath, function(m) {
+ if (m) {
+ snippetManager.files[id] = m;
+ if (!m.snippets && m.snippetText)
+ m.snippets = snippetManager.parseSnippetFile(m.snippetText);
+ snippetManager.register(m.snippets || [], m.scope);
+ if (m.includeScopes) {
+ snippetManager.snippetMap[m.scope].includeScopes = m.includeScopes;
+ m.includeScopes.forEach(function(x) {
+ loadSnippetFile("ace/mode/" + x);
+ });
+ }
+ }
+ });
+};
+
+function getCompletionPrefix(editor) {
+ var pos = editor.getCursorPosition();
+ var line = editor.session.getLine(pos.row);
+ var prefix;
+ editor.completers.forEach(function(completer) {
+ if (completer.identifierRegexps) {
+ completer.identifierRegexps.forEach(function(identifierRegex) {
+ if (!prefix && identifierRegex)
+ prefix = util.retrievePrecedingIdentifier(line, pos.column, identifierRegex);
+ });
+ }
+ });
+ return prefix || util.retrievePrecedingIdentifier(line, pos.column);
+}
+
+var doLiveAutocomplete = function(e) {
+ var editor = e.editor;
+ var hasCompleter = editor.completer && editor.completer.activated;
+ if (e.command.name === "backspace") {
+ if (hasCompleter && !getCompletionPrefix(editor))
+ editor.completer.detach();
+ }
+ else if (e.command.name === "insertstring") {
+ var prefix = getCompletionPrefix(editor);
+ if (prefix && !hasCompleter) {
+ if (!editor.completer) {
+ editor.completer = new Autocomplete();
+ }
+ editor.completer.autoInsert = false;
+ editor.completer.showPopup(editor);
+ }
+ }
+};
+
+var Editor = require("../editor").Editor;
+require("../config").defineOptions(Editor.prototype, "editor", {
+ enableBasicAutocompletion: {
+ set: function(val) {
+ if (val) {
+ if (!this.completers)
+ this.completers = Array.isArray(val)? val: completers;
+ this.commands.addCommand(Autocomplete.startCommand);
+ } else {
+ this.commands.removeCommand(Autocomplete.startCommand);
+ }
+ },
+ value: false
+ },
+ enableLiveAutocompletion: {
+ set: function(val) {
+ if (val) {
+ if (!this.completers)
+ this.completers = Array.isArray(val)? val: completers;
+ this.commands.on('afterExec', doLiveAutocomplete);
+ } else {
+ this.commands.removeListener('afterExec', doLiveAutocomplete);
+ }
+ },
+ value: false
+ },
+ enableSnippets: {
+ set: function(val) {
+ if (val) {
+ this.commands.addCommand(expandSnippet);
+ this.on("changeMode", onChangeMode);
+ onChangeMode(null, this);
+ } else {
+ this.commands.removeCommand(expandSnippet);
+ this.off("changeMode", onChangeMode);
+ }
+ },
+ value: false
+ }
+});
+});
+ (function() {
+ ace.require(["ace/ext/language_tools"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-linking.js b/js/vendor/ace/src-noconflict/ext-linking.js
new file mode 100755
index 0000000..c6ad15d
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/ext-linking.js
@@ -0,0 +1,52 @@
+ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) {
+
+var Editor = require("ace/editor").Editor;
+
+require("../config").defineOptions(Editor.prototype, "editor", {
+ enableLinking: {
+ set: function(val) {
+ if (val) {
+ this.on("click", onClick);
+ this.on("mousemove", onMouseMove);
+ } else {
+ this.off("click", onClick);
+ this.off("mousemove", onMouseMove);
+ }
+ },
+ value: false
+ }
+})
+
+function onMouseMove(e) {
+ var editor = e.editor;
+ var ctrl = e.getAccelKey();
+
+ if (ctrl) {
+ var editor = e.editor;
+ var docPos = e.getDocumentPosition();
+ var session = editor.session;
+ var token = session.getTokenAt(docPos.row, docPos.column);
+
+ editor._emit("linkHover", {position: docPos, token: token});
+ }
+}
+
+function onClick(e) {
+ var ctrl = e.getAccelKey();
+ var button = e.getButton();
+
+ if (button == 0 && ctrl) {
+ var editor = e.editor;
+ var docPos = e.getDocumentPosition();
+ var session = editor.session;
+ var token = session.getTokenAt(docPos.row, docPos.column);
+
+ editor._emit("linkClick", {position: docPos, token: token});
+ }
+}
+
+});
+ (function() {
+ ace.require(["ace/ext/linking"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-modelist.js b/js/vendor/ace/src-noconflict/ext-modelist.js
index 138d198..66c1c52 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-modelist.js
+++ b/js/vendor/ace/src-noconflict/ext-modelist.js
@@ -1,5 +1,5 @@
-ace.define('ace/ext/modelist', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) {
+"use strict";
var modes = [];
function getModeForPath(path) {
@@ -35,17 +35,20 @@ Mode.prototype.supportsFile = function(filename) {
};
var supportedModes = {
ABAP: ["abap"],
- ADA: ["ada|adb"],
+ ABC: ["abc"],
ActionScript:["as"],
- AsciiDoc: ["asciidoc"],
+ ADA: ["ada|adb"],
+ Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],
+ AsciiDoc: ["asciidoc|adoc"],
Assembly_x86:["asm"],
AutoHotKey: ["ahk"],
BatchFile: ["bat|cmd"],
C9Search: ["c9search_results"],
- C_Cpp: ["c|cc|cpp|cxx|h|hh|hpp"],
- Clojure: ["clj"],
- Cobol: ["^CBL|COB"],
- coffee: ["^Cakefile|coffee|cf|cson"],
+ C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp"],
+ Cirru: ["cirru|cr"],
+ Clojure: ["clj|cljs"],
+ Cobol: ["CBL|COB"],
+ coffee: ["coffee|cf|cson|^Cakefile"],
ColdFusion: ["cfm"],
CSharp: ["cs"],
CSS: ["css"],
@@ -53,29 +56,42 @@ var supportedModes = {
D: ["d|di"],
Dart: ["dart"],
Diff: ["diff|patch"],
+ Dockerfile: ["^Dockerfile"],
Dot: ["dot"],
- Erlang: ["erl|hrl"],
+ Dummy: ["dummy"],
+ DummySyntax: ["dummy"],
+ Eiffel: ["e"],
EJS: ["ejs"],
+ Elixir: ["ex|exs"],
+ Elm: ["elm"],
+ Erlang: ["erl|hrl"],
Forth: ["frt|fs|ldr"],
FTL: ["ftl"],
+ Gcode: ["gcode"],
+ Gherkin: ["feature"],
+ Gitignore: ["^.gitignore"],
Glsl: ["glsl|frag|vert"],
golang: ["go"],
Groovy: ["groovy"],
HAML: ["haml"],
+ Handlebars: ["hbs|handlebars|tpl|mustache"],
Haskell: ["hs"],
haXe: ["hx"],
- HTML: ["htm|html|xhtml"],
+ HTML: ["html|htm|xhtml"],
HTML_Ruby: ["erb|rhtml|html.erb"],
- Ini: ["Ini|conf"],
+ INI: ["ini|conf|cfg|prefs"],
+ Io: ["io"],
+ Jack: ["jack"],
Jade: ["jade"],
Java: ["java"],
- JavaScript: ["js"],
+ JavaScript: ["js|jsm"],
JSON: ["json"],
JSONiq: ["jq"],
JSP: ["jsp"],
JSX: ["jsx"],
Julia: ["jl"],
- LaTeX: ["latex|tex|ltx|bib"],
+ LaTeX: ["tex|latex|ltx|bib"],
+ Lean: ["lean|hlean"],
LESS: ["less"],
Liquid: ["liquid"],
Lisp: ["lisp"],
@@ -85,11 +101,14 @@ var supportedModes = {
Lua: ["lua"],
LuaPage: ["lp"],
Lucene: ["lucene"],
- Makefile: ["^GNUmakefile|^makefile|^Makefile|^OCamlMakefile|make"],
- MATLAB: ["matlab"],
+ Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],
Markdown: ["md|markdown"],
- MySQL: ["mysql"],
+ Mask: ["mask"],
+ MATLAB: ["matlab"],
+ MEL: ["mel"],
MUSHCode: ["mc|mush"],
+ MySQL: ["mysql"],
+ Nix: ["nix"],
ObjectiveC: ["m|mm"],
OCaml: ["ml|mli"],
Pascal: ["pas|p"],
@@ -97,22 +116,29 @@ var supportedModes = {
pgSQL: ["pgsql"],
PHP: ["php|phtml"],
Powershell: ["ps1"],
+ Praat: ["praat|praatscript|psc|proc"],
Prolog: ["plg|prolog"],
Properties: ["properties"],
+ Protobuf: ["proto"],
Python: ["py"],
R: ["r"],
RDoc: ["Rd"],
RHTML: ["Rhtml"],
- Ruby: ["ru|gemspec|rake|rb"],
+ Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],
Rust: ["rs"],
SASS: ["sass"],
SCAD: ["scad"],
Scala: ["scala"],
Scheme: ["scm|rkt"],
SCSS: ["scss"],
- SH: ["sh|bash"],
+ SH: ["sh|bash|^.bashrc"],
+ SJS: ["sjs"],
+ Smarty: ["smarty|tpl"],
snippets: ["snippets"],
+ Soy_Template:["soy"],
+ Space: ["space"],
SQL: ["sql"],
+ SQLServer: ["sqlserver"],
Stylus: ["styl|stylus"],
SVG: ["svg"],
Tcl: ["tcl"],
@@ -121,19 +147,23 @@ var supportedModes = {
Textile: ["textile"],
Toml: ["toml"],
Twig: ["twig"],
- Typescript: ["typescript|ts|str"],
- VBScript: ["vbs"],
+ Typescript: ["ts|typescript|str"],
+ Vala: ["vala"],
+ VBScript: ["vbs|vb"],
Velocity: ["vm"],
- XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],
+ Verilog: ["v|vh|sv|svh"],
+ VHDL: ["vhd|vhdl"],
+ XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],
XQuery: ["xq"],
- YAML: ["yaml"]
+ YAML: ["yaml|yml"],
+ Django: ["html"]
};
var nameOverrides = {
ObjectiveC: "Objective-C",
CSharp: "C#",
golang: "Go",
- C_Cpp: "C/C++",
+ C_Cpp: "C and C++",
coffee: "CoffeeScript",
HTML_Ruby: "HTML (Ruby)",
FTL: "FreeMarker"
@@ -141,7 +171,7 @@ var nameOverrides = {
var modesByName = {};
for (var name in supportedModes) {
var data = supportedModes[name];
- var displayName = nameOverrides[name] || name;
+ var displayName = (nameOverrides[name] || name).replace(/_/g, " ");
var filename = name.toLowerCase();
var mode = new Mode(filename, displayName, data[0]);
modesByName[filename] = mode;
@@ -155,4 +185,7 @@ module.exports = {
};
});
-
+ (function() {
+ ace.require(["ace/ext/modelist"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-old_ie.js b/js/vendor/ace/src-noconflict/ext-old_ie.js
new file mode 100755
index 0000000..d84d3ac
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/ext-old_ie.js
@@ -0,0 +1,494 @@
+ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var event = require("../lib/event");
+var searchboxCss = "\
+.ace_search {\
+background-color: #ddd;\
+border: 1px solid #cbcbcb;\
+border-top: 0 none;\
+max-width: 325px;\
+overflow: hidden;\
+margin: 0;\
+padding: 4px;\
+padding-right: 6px;\
+padding-bottom: 0;\
+position: absolute;\
+top: 0px;\
+z-index: 99;\
+white-space: normal;\
+}\
+.ace_search.left {\
+border-left: 0 none;\
+border-radius: 0px 0px 5px 0px;\
+left: 0;\
+}\
+.ace_search.right {\
+border-radius: 0px 0px 0px 5px;\
+border-right: 0 none;\
+right: 0;\
+}\
+.ace_search_form, .ace_replace_form {\
+border-radius: 3px;\
+border: 1px solid #cbcbcb;\
+float: left;\
+margin-bottom: 4px;\
+overflow: hidden;\
+}\
+.ace_search_form.ace_nomatch {\
+outline: 1px solid red;\
+}\
+.ace_search_field {\
+background-color: white;\
+border-right: 1px solid #cbcbcb;\
+border: 0 none;\
+-webkit-box-sizing: border-box;\
+-moz-box-sizing: border-box;\
+box-sizing: border-box;\
+float: left;\
+height: 22px;\
+outline: 0;\
+padding: 0 7px;\
+width: 214px;\
+margin: 0;\
+}\
+.ace_searchbtn,\
+.ace_replacebtn {\
+background: #fff;\
+border: 0 none;\
+border-left: 1px solid #dcdcdc;\
+cursor: pointer;\
+float: left;\
+height: 22px;\
+margin: 0;\
+padding: 0;\
+position: relative;\
+}\
+.ace_searchbtn:last-child,\
+.ace_replacebtn:last-child {\
+border-top-right-radius: 3px;\
+border-bottom-right-radius: 3px;\
+}\
+.ace_searchbtn:disabled {\
+background: none;\
+cursor: default;\
+}\
+.ace_searchbtn {\
+background-position: 50% 50%;\
+background-repeat: no-repeat;\
+width: 27px;\
+}\
+.ace_searchbtn.prev {\
+background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); \
+}\
+.ace_searchbtn.next {\
+background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); \
+}\
+.ace_searchbtn_close {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\
+border-radius: 50%;\
+border: 0 none;\
+color: #656565;\
+cursor: pointer;\
+float: right;\
+font: 16px/16px Arial;\
+height: 14px;\
+margin: 5px 1px 9px 5px;\
+padding: 0;\
+text-align: center;\
+width: 14px;\
+}\
+.ace_searchbtn_close:hover {\
+background-color: #656565;\
+background-position: 50% 100%;\
+color: white;\
+}\
+.ace_replacebtn.prev {\
+width: 54px\
+}\
+.ace_replacebtn.next {\
+width: 27px\
+}\
+.ace_button {\
+margin-left: 2px;\
+cursor: pointer;\
+-webkit-user-select: none;\
+-moz-user-select: none;\
+-o-user-select: none;\
+-ms-user-select: none;\
+user-select: none;\
+overflow: hidden;\
+opacity: 0.7;\
+border: 1px solid rgba(100,100,100,0.23);\
+padding: 1px;\
+-moz-box-sizing: border-box;\
+box-sizing: border-box;\
+color: black;\
+}\
+.ace_button:hover {\
+background-color: #eee;\
+opacity:1;\
+}\
+.ace_button:active {\
+background-color: #ddd;\
+}\
+.ace_button.checked {\
+border-color: #3399ff;\
+opacity:1;\
+}\
+.ace_search_options{\
+margin-bottom: 3px;\
+text-align: right;\
+-webkit-user-select: none;\
+-moz-user-select: none;\
+-o-user-select: none;\
+-ms-user-select: none;\
+user-select: none;\
+}";
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+var keyUtil = require("../lib/keys");
+
+dom.importCssString(searchboxCss, "ace_searchbox");
+
+var html = '<div class="ace_search right">\
+ <button type="button" action="hide" class="ace_searchbtn_close"></button>\
+ <div class="ace_search_form">\
+ <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>\
+ <button type="button" action="findNext" class="ace_searchbtn next"></button>\
+ <button type="button" action="findPrev" class="ace_searchbtn prev"></button>\
+ <button type="button" action="findAll" class="ace_searchbtn" title="Alt-Enter">All</button>\
+ </div>\
+ <div class="ace_replace_form">\
+ <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>\
+ <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>\
+ <button type="button" action="replaceAll" class="ace_replacebtn">All</button>\
+ </div>\
+ <div class="ace_search_options">\
+ <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>\
+ <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>\
+ <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>\
+ </div>\
+</div>'.replace(/>\s+/g, ">");
+
+var SearchBox = function(editor, range, showReplaceForm) {
+ var div = dom.createElement("div");
+ div.innerHTML = html;
+ this.element = div.firstChild;
+
+ this.$init();
+ this.setEditor(editor);
+};
+
+(function() {
+ this.setEditor = function(editor) {
+ editor.searchBox = this;
+ editor.container.appendChild(this.element);
+ this.editor = editor;
+ };
+
+ this.$initElements = function(sb) {
+ this.searchBox = sb.querySelector(".ace_search_form");
+ this.replaceBox = sb.querySelector(".ace_replace_form");
+ this.searchOptions = sb.querySelector(".ace_search_options");
+ this.regExpOption = sb.querySelector("[action=toggleRegexpMode]");
+ this.caseSensitiveOption = sb.querySelector("[action=toggleCaseSensitive]");
+ this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]");
+ this.searchInput = this.searchBox.querySelector(".ace_search_field");
+ this.replaceInput = this.replaceBox.querySelector(".ace_search_field");
+ };
+
+ this.$init = function() {
+ var sb = this.element;
+
+ this.$initElements(sb);
+
+ var _this = this;
+ event.addListener(sb, "mousedown", function(e) {
+ setTimeout(function(){
+ _this.activeInput.focus();
+ }, 0);
+ event.stopPropagation(e);
+ });
+ event.addListener(sb, "click", function(e) {
+ var t = e.target || e.srcElement;
+ var action = t.getAttribute("action");
+ if (action && _this[action])
+ _this[action]();
+ else if (_this.$searchBarKb.commands[action])
+ _this.$searchBarKb.commands[action].exec(_this);
+ event.stopPropagation(e);
+ });
+
+ event.addCommandKeyListener(sb, function(e, hashId, keyCode) {
+ var keyString = keyUtil.keyCodeToString(keyCode);
+ var command = _this.$searchBarKb.findKeyCommand(hashId, keyString);
+ if (command && command.exec) {
+ command.exec(_this);
+ event.stopEvent(e);
+ }
+ });
+
+ this.$onChange = lang.delayedCall(function() {
+ _this.find(false, false);
+ });
+
+ event.addListener(this.searchInput, "input", function() {
+ _this.$onChange.schedule(20);
+ });
+ event.addListener(this.searchInput, "focus", function() {
+ _this.activeInput = _this.searchInput;
+ _this.searchInput.value && _this.highlight();
+ });
+ event.addListener(this.replaceInput, "focus", function() {
+ _this.activeInput = _this.replaceInput;
+ _this.searchInput.value && _this.highlight();
+ });
+ };
+ this.$closeSearchBarKb = new HashHandler([{
+ bindKey: "Esc",
+ name: "closeSearchBar",
+ exec: function(editor) {
+ editor.searchBox.hide();
+ }
+ }]);
+ this.$searchBarKb = new HashHandler();
+ this.$searchBarKb.bindKeys({
+ "Ctrl-f|Command-f|Ctrl-H|Command-Option-F": function(sb) {
+ var isReplace = sb.isReplace = !sb.isReplace;
+ sb.replaceBox.style.display = isReplace ? "" : "none";
+ sb[isReplace ? "replaceInput" : "searchInput"].focus();
+ },
+ "Ctrl-G|Command-G": function(sb) {
+ sb.findNext();
+ },
+ "Ctrl-Shift-G|Command-Shift-G": function(sb) {
+ sb.findPrev();
+ },
+ "esc": function(sb) {
+ setTimeout(function() { sb.hide();});
+ },
+ "Return": function(sb) {
+ if (sb.activeInput == sb.replaceInput)
+ sb.replace();
+ sb.findNext();
+ },
+ "Shift-Return": function(sb) {
+ if (sb.activeInput == sb.replaceInput)
+ sb.replace();
+ sb.findPrev();
+ },
+ "Alt-Return": function(sb) {
+ if (sb.activeInput == sb.replaceInput)
+ sb.replaceAll();
+ sb.findAll();
+ },
+ "Tab": function(sb) {
+ (sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus();
+ }
+ });
+
+ this.$searchBarKb.addCommands([{
+ name: "toggleRegexpMode",
+ bindKey: {win: "Alt-R|Alt-/", mac: "Ctrl-Alt-R|Ctrl-Alt-/"},
+ exec: function(sb) {
+ sb.regExpOption.checked = !sb.regExpOption.checked;
+ sb.$syncOptions();
+ }
+ }, {
+ name: "toggleCaseSensitive",
+ bindKey: {win: "Alt-C|Alt-I", mac: "Ctrl-Alt-R|Ctrl-Alt-I"},
+ exec: function(sb) {
+ sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked;
+ sb.$syncOptions();
+ }
+ }, {
+ name: "toggleWholeWords",
+ bindKey: {win: "Alt-B|Alt-W", mac: "Ctrl-Alt-B|Ctrl-Alt-W"},
+ exec: function(sb) {
+ sb.wholeWordOption.checked = !sb.wholeWordOption.checked;
+ sb.$syncOptions();
+ }
+ }]);
+
+ this.$syncOptions = function() {
+ dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked);
+ dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked);
+ dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked);
+ this.find(false, false);
+ };
+
+ this.highlight = function(re) {
+ this.editor.session.highlight(re || this.editor.$search.$options.re);
+ this.editor.renderer.updateBackMarkers()
+ };
+ this.find = function(skipCurrent, backwards) {
+ var range = this.editor.find(this.searchInput.value, {
+ skipCurrent: skipCurrent,
+ backwards: backwards,
+ wrap: true,
+ regExp: this.regExpOption.checked,
+ caseSensitive: this.caseSensitiveOption.checked,
+ wholeWord: this.wholeWordOption.checked
+ });
+ var noMatch = !range && this.searchInput.value;
+ dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
+ this.editor._emit("findSearchBox", { match: !noMatch });
+ this.highlight();
+ };
+ this.findNext = function() {
+ this.find(true, false);
+ };
+ this.findPrev = function() {
+ this.find(true, true);
+ };
+ this.findAll = function(){
+ var range = this.editor.findAll(this.searchInput.value, {
+ regExp: this.regExpOption.checked,
+ caseSensitive: this.caseSensitiveOption.checked,
+ wholeWord: this.wholeWordOption.checked
+ });
+ var noMatch = !range && this.searchInput.value;
+ dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
+ this.editor._emit("findSearchBox", { match: !noMatch });
+ this.highlight();
+ this.hide();
+ };
+ this.replace = function() {
+ if (!this.editor.getReadOnly())
+ this.editor.replace(this.replaceInput.value);
+ };
+ this.replaceAndFindNext = function() {
+ if (!this.editor.getReadOnly()) {
+ this.editor.replace(this.replaceInput.value);
+ this.findNext()
+ }
+ };
+ this.replaceAll = function() {
+ if (!this.editor.getReadOnly())
+ this.editor.replaceAll(this.replaceInput.value);
+ };
+
+ this.hide = function() {
+ this.element.style.display = "none";
+ this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb);
+ this.editor.focus();
+ };
+ this.show = function(value, isReplace) {
+ this.element.style.display = "";
+ this.replaceBox.style.display = isReplace ? "" : "none";
+
+ this.isReplace = isReplace;
+
+ if (value)
+ this.searchInput.value = value;
+ this.searchInput.focus();
+ this.searchInput.select();
+
+ this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb);
+ };
+
+ this.isFocused = function() {
+ var el = document.activeElement;
+ return el == this.searchInput || el == this.replaceInput;
+ }
+}).call(SearchBox.prototype);
+
+exports.SearchBox = SearchBox;
+
+exports.Search = function(editor, isReplace) {
+ var sb = editor.searchBox || new SearchBox(editor);
+ sb.show(editor.session.getTextRange(), isReplace);
+};
+
+});
+
+ace.define("ace/ext/old_ie",["require","exports","module","ace/lib/useragent","ace/tokenizer","ace/ext/searchbox","ace/mode/text"], function(require, exports, module) {
+"use strict";
+var MAX_TOKEN_COUNT = 1000;
+var useragent = require("../lib/useragent");
+var TokenizerModule = require("../tokenizer");
+
+function patch(obj, name, regexp, replacement) {
+ eval("obj['" + name + "']=" + obj[name].toString().replace(
+ regexp, replacement
+ ));
+}
+
+if (useragent.isIE && useragent.isIE < 10 && window.top.document.compatMode === "BackCompat")
+ useragent.isOldIE = true;
+
+if (typeof document != "undefined" && !document.documentElement.querySelector) {
+ useragent.isOldIE = true;
+ var qs = function(el, selector) {
+ if (selector.charAt(0) == ".") {
+ var classNeme = selector.slice(1);
+ } else {
+ var m = selector.match(/(\w+)=(\w+)/);
+ var attr = m && m[1];
+ var attrVal = m && m[2];
+ }
+ for (var i = 0; i < el.all.length; i++) {
+ var ch = el.all[i];
+ if (classNeme) {
+ if (ch.className.indexOf(classNeme) != -1)
+ return ch;
+ } else if (attr) {
+ if (ch.getAttribute(attr) == attrVal)
+ return ch;
+ }
+ }
+ };
+ var sb = require("./searchbox").SearchBox.prototype;
+ patch(
+ sb, "$initElements",
+ /([^\s=]*).querySelector\((".*?")\)/g,
+ "qs($1, $2)"
+ );
+}
+
+var compliantExecNpcg = /()??/.exec("")[1] === undefined;
+if (compliantExecNpcg)
+ return;
+var proto = TokenizerModule.Tokenizer.prototype;
+TokenizerModule.Tokenizer_orig = TokenizerModule.Tokenizer;
+proto.getLineTokens_orig = proto.getLineTokens;
+
+patch(
+ TokenizerModule, "Tokenizer",
+ "ruleRegExps.push(adjustedregex);\n",
+ function(m) {
+ return m + '\
+ if (state[i].next && RegExp(adjustedregex).test(""))\n\
+ rule._qre = RegExp(adjustedregex, "g");\n\
+ ';
+ }
+);
+TokenizerModule.Tokenizer.prototype = proto;
+patch(
+ proto, "getLineTokens",
+ /if \(match\[i \+ 1\] === undefined\)\s*continue;/,
+ "if (!match[i + 1]) {\n\
+ if (value)continue;\n\
+ var qre = state[mapping[i]]._qre;\n\
+ if (!qre) continue;\n\
+ qre.lastIndex = lastIndex;\n\
+ if (!qre.exec(line) || qre.lastIndex != lastIndex)\n\
+ continue;\n\
+ }"
+);
+
+patch(
+ require("../mode/text").Mode.prototype, "getTokenizer",
+ /Tokenizer/,
+ "TokenizerModule.Tokenizer"
+);
+
+useragent.isOldIE = true;
+
+});
+ (function() {
+ ace.require(["ace/ext/old_ie"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-options.js b/js/vendor/ace/src-noconflict/ext-options.js
deleted file mode 100644
index 5a807fa..0000000
--- a/js/vendor/ace/src-noconflict/ext-options.js
+++ /dev/null
@@ -1,252 +0,0 @@
-ace.define('ace/ext/options', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-var modesByName = modelist.modesByName;
-
-var options = [
- ["Document", function(name) {
- doclist.loadDoc(name, function(session) {
- if (!session)
- return;
- session = env.split.setSession(session);
- updateUIEditorOptions();
- env.editor.focus();
- });
- }, doclist.all],
- ["Mode", function(value) {
- env.editor.session.setMode(modesByName[value].mode || modesByName.text.mode);
- env.editor.session.modeName = value;
- }, function(value) {
- return env.editor.session.modeName || "text"
- }, modelist.modes],
- ["Split", function(value) {
- var sp = env.split;
- if (value == "none") {
- if (sp.getSplits() == 2) {
- env.secondSession = sp.getEditor(1).session;
- }
- sp.setSplits(1);
- } else {
- var newEditor = (sp.getSplits() == 1);
- if (value == "below") {
- sp.setOrientation(sp.BELOW);
- } else {
- sp.setOrientation(sp.BESIDE);
- }
- sp.setSplits(2);
-
- if (newEditor) {
- var session = env.secondSession || sp.getEditor(0).session;
- var newSession = sp.setSession(session, 1);
- newSession.name = session.name;
- }
- }
- }, ["None", "Beside", "Below"]],
- ["Theme", function(value) {
- if (!value)
- return;
- env.editor.setTheme("ace/theme/" + value);
- themeEl.selectedValue = value;
- }, function() {
- return env.editor.getTheme();
- }, {
- "Bright": {
- chrome: "Chrome",
- clouds: "Clouds",
- crimson_editor: "Crimson Editor",
- dawn: "Dawn",
- dreamweaver: "Dreamweaver",
- eclipse: "Eclipse",
- github: "GitHub",
- solarized_light: "Solarized Light",
- textmate: "TextMate",
- tomorrow: "Tomorrow",
- xcode: "XCode"
- },
- "Dark": {
- ambiance: "Ambiance",
- chaos: "Chaos",
- clouds_midnight: "Clouds Midnight",
- cobalt: "Cobalt",
- idle_fingers: "idleFingers",
- kr_theme: "krTheme",
- merbivore: "Merbivore",
- merbivore_soft: "Merbivore Soft",
- mono_industrial: "Mono Industrial",
- monokai: "Monokai",
- pastel_on_dark: "Pastel on dark",
- solarized_dark: "Solarized Dark",
- twilight: "Twilight",
- tomorrow_night: "Tomorrow Night",
- tomorrow_night_blue: "Tomorrow Night Blue",
- tomorrow_night_bright: "Tomorrow Night Bright",
- tomorrow_night_eighties: "Tomorrow Night 80s",
- vibrant_ink: "Vibrant Ink",
- }
- }],
- ["Code Folding", function(value) {
- env.editor.getSession().setFoldStyle(value);
- env.editor.setShowFoldWidgets(value !== "manual");
- }, ["manual", "mark begin", "mark begin and end"]],
- ["Soft Wrap", function(value) {
- value = value.toLowerCase()
- var session = env.editor.getSession();
- var renderer = env.editor.renderer;
- session.setUseWrapMode(value == "off");
- var col = parseInt(value) || null;
- renderer.setPrintMarginColumn(col || 80);
- session.setWrapLimitRange(col, col);
- }, ["Off", "40 Chars", "80 Chars", "Free"]],
- ["Key Binding", function(value) {
- env.editor.setKeyboardHandler(keybindings[value]);
- }, ["Ace", "Vim", "Emacs", "Custom"]],
- ["Font Size", function(value) {
- env.split.setFontSize(value + "px");
- }, [10, 11, 12, 14, 16, 20, 24]],
- ["Full Line Selection", function(checked) {
- env.editor.setSelectionStyle(checked ? "line" : "text");
- }],
- ["Highlight Active Line", function(checked) {
- env.editor.setHighlightActiveLine(checked);
- }],
- ["Show Invisibles", function(checked) {
- env.editor.setShowInvisibles(checked);
- }],
- ["Show Gutter", function(checked) {
- env.editor.renderer.setShowGutter(checked);
- }],
- ["Show Indent Guides", function(checked) {
- env.editor.renderer.setDisplayIndentGuides(checked);
- }],
- ["Show Print Margin", function(checked) {
- env.editor.renderer.setShowPrintMargin(checked);
- }],
- ["Persistent HScroll", function(checked) {
- env.editor.renderer.setHScrollBarAlwaysVisible(checked);
- }],
- ["Animate Scrolling", function(checked) {
- env.editor.setAnimatedScroll(checked);
- }],
- ["Use Soft Tab", function(checked) {
- env.editor.getSession().setUseSoftTabs(checked);
- }],
- ["Highlight Selected Word", function(checked) {
- env.editor.setHighlightSelectedWord(checked);
- }],
- ["Enable Behaviours", function(checked) {
- env.editor.setBehavioursEnabled(checked);
- }],
- ["Fade Fold Widgets", function(checked) {
- env.editor.setFadeFoldWidgets(checked);
- }],
- ["Show Token info", function(checked) {
- env.editor.setFadeFoldWidgets(checked);
- }]
-]
-
-var createOptionsPanel = function(options) {
- var html = []
- var container = document.createElement("div");
- container.style.cssText = "position: absolute; overflow: hidden";
- var inner = document.createElement("div");
- inner.style.cssText = "width: 120%;height:100%;overflow: scroll";
- container.appendChild(inner);
- html.push("<table><tbody>");
-
- options.forEach(function(o) {
-
- });
-
- html.push(
- '<tr>',
- '<td>',
- '<label for="', s,'"></label>',
- '</td><td>',
- '<input type="', s,'" name="', s,'" id="',s ,'">',
- '</td>',
- '</tr>'
- )
- html.push("</tbody></table>");
- return container;
-}
-
-function bindCheckbox(id, callback) {
- var el = document.getElementById(id);
- if (localStorage && localStorage.getItem(id))
- el.checked = localStorage.getItem(id) == "1";
-
- var onCheck = function() {
- callback(!!el.checked);
- saveOption(el);
- };
- el.onclick = onCheck;
- onCheck();
-}
-
-function bindDropdown(id, callback) {
- var el = document.getElementById(id);
- if (localStorage && localStorage.getItem(id))
- el.value = localStorage.getItem(id);
-
- var onChange = function() {
- callback(el.value);
- saveOption(el);
- };
-
- el.onchange = onChange;
- onChange();
-}
-
-function fillOptgroup(list, el) {
- list.forEach(function(item) {
- var option = document.createElement("option");
- option.setAttribute("value", item.name);
- option.innerHTML = item.desc;
- el.appendChild(option);
- });
-}
-
-function fillDropdown(list, el) {
- if (Array.isArray(list)) {
- fillOptgroup(list, el);
- return;
- }
- for(var i in list) {
- var group = document.createElement("optgroup");
- group.setAttribute("label", i);
- fillOptgroup(list[i], group);
- el.appendChild(group);
- }
-}
-
-function createOptionControl(opt) {
- if (opt.values) {
- var el = dom.createElement("select");
- el.setAttribute("size", opt.visibleSize || 1);
- fillDropdown(opt.values, el)
- } else {
- var el = dom.createElement("checkbox");
- }
- el.setAttribute("name", "opt_" + opt.name)
- return el;
-}
-
-function createOptionCell(opt) {
- if (opt.values) {
- var el = dom.createElement("select");
- el.setAttribute("size", opt.visibleSize || 1);
- fillDropdown(opt.values, el)
- } else {
- var el = dom.createElement("checkbox");
- }
- el.setAttribute("name", "opt_" + opt.name)
- return el;
-}
-
-
-createOptionsPanel(options)
-
-
-
-});
-
diff --git a/js/vendor/ace/src-noconflict/ext-searchbox.js b/js/vendor/ace/src-noconflict/ext-searchbox.js
index f2990d5..b4e4c0e 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-searchbox.js
+++ b/js/vendor/ace/src-noconflict/ext-searchbox.js
@@ -1,48 +1,15 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/ext/searchbox', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/lang', 'ace/lib/event', 'ace/keyboard/hash_handler', 'ace/lib/keys'], function(require, exports, module) {
-
+ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) {
+"use strict";
var dom = require("../lib/dom");
var lang = require("../lib/lang");
var event = require("../lib/event");
var searchboxCss = "\
-/* ------------------------------------------------------------------------------------------\
-* Editor Search Form\
-* --------------------------------------------------------------------------------------- */\
.ace_search {\
background-color: #ddd;\
border: 1px solid #cbcbcb;\
border-top: 0 none;\
-max-width: 297px;\
+max-width: 325px;\
overflow: hidden;\
margin: 0;\
padding: 4px;\
@@ -51,6 +18,7 @@ padding-bottom: 0;\
position: absolute;\
top: 0px;\
z-index: 99;\
+white-space: normal;\
}\
.ace_search.left {\
border-left: 0 none;\
@@ -79,7 +47,6 @@ border: 0 none;\
-webkit-box-sizing: border-box;\
-moz-box-sizing: border-box;\
box-sizing: border-box;\
-display: block;\
float: left;\
height: 22px;\
outline: 0;\
@@ -93,7 +60,6 @@ background: #fff;\
border: 0 none;\
border-left: 1px solid #dcdcdc;\
cursor: pointer;\
-display: block;\
float: left;\
height: 22px;\
margin: 0;\
@@ -126,12 +92,9 @@ border-radius: 50%;\
border: 0 none;\
color: #656565;\
cursor: pointer;\
-display: block;\
float: right;\
-font-family: Arial;\
-font-size: 16px;\
+font: 16px/16px Arial;\
height: 14px;\
-line-height: 16px;\
margin: 5px 1px 9px 5px;\
padding: 0;\
text-align: center;\
@@ -195,6 +158,7 @@ var html = '<div class="ace_search right">\
<input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>\
<button type="button" action="findNext" class="ace_searchbtn next"></button>\
<button type="button" action="findPrev" class="ace_searchbtn prev"></button>\
+ <button type="button" action="findAll" class="ace_searchbtn" title="Alt-Enter">All</button>\
</div>\
<div class="ace_replace_form">\
<input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>\
@@ -224,9 +188,7 @@ var SearchBox = function(editor, range, showReplaceForm) {
this.editor = editor;
};
- this.$init = function() {
- var sb = this.element;
-
+ this.$initElements = function(sb) {
this.searchBox = sb.querySelector(".ace_search_form");
this.replaceBox = sb.querySelector(".ace_replace_form");
this.searchOptions = sb.querySelector(".ace_search_options");
@@ -235,7 +197,13 @@ var SearchBox = function(editor, range, showReplaceForm) {
this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]");
this.searchInput = this.searchBox.querySelector(".ace_search_field");
this.replaceInput = this.replaceBox.querySelector(".ace_search_field");
-
+ };
+
+ this.$init = function() {
+ var sb = this.element;
+
+ this.$initElements(sb);
+
var _this = this;
event.addListener(sb, "mousedown", function(e) {
setTimeout(function(){
@@ -311,6 +279,11 @@ var SearchBox = function(editor, range, showReplaceForm) {
sb.replace();
sb.findPrev();
},
+ "Alt-Return": function(sb) {
+ if (sb.activeInput == sb.replaceInput)
+ sb.replaceAll();
+ sb.findAll();
+ },
"Tab": function(sb) {
(sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus();
}
@@ -359,7 +332,9 @@ var SearchBox = function(editor, range, showReplaceForm) {
caseSensitive: this.caseSensitiveOption.checked,
wholeWord: this.wholeWordOption.checked
});
- dom.setCssClass(this.searchBox, "ace_nomatch", !range && this.searchInput.value);
+ var noMatch = !range && this.searchInput.value;
+ dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
+ this.editor._emit("findSearchBox", { match: !noMatch });
this.highlight();
};
this.findNext = function() {
@@ -368,6 +343,18 @@ var SearchBox = function(editor, range, showReplaceForm) {
this.findPrev = function() {
this.find(true, true);
};
+ this.findAll = function(){
+ var range = this.editor.findAll(this.searchInput.value, {
+ regExp: this.regExpOption.checked,
+ caseSensitive: this.caseSensitiveOption.checked,
+ wholeWord: this.wholeWordOption.checked
+ });
+ var noMatch = !range && this.searchInput.value;
+ dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
+ this.editor._emit("findSearchBox", { match: !noMatch });
+ this.highlight();
+ this.hide();
+ };
this.replace = function() {
if (!this.editor.getReadOnly())
this.editor.replace(this.replaceInput.value);
@@ -402,6 +389,10 @@ var SearchBox = function(editor, range, showReplaceForm) {
this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb);
};
+ this.isFocused = function() {
+ var el = document.activeElement;
+ return el == this.searchInput || el == this.replaceInput;
+ }
}).call(SearchBox.prototype);
exports.SearchBox = SearchBox;
@@ -412,3 +403,7 @@ exports.Search = function(editor, isReplace) {
};
});
+ (function() {
+ ace.require(["ace/ext/searchbox"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-settings_menu.js b/js/vendor/ace/src-noconflict/ext-settings_menu.js
index b2d01be..dc8cce8 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-settings_menu.js
+++ b/js/vendor/ace/src-noconflict/ext-settings_menu.js
@@ -1,172 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl
- * All rights reserved.
- *
- * Contributed to Ajax.org under the BSD license.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/ext/settings_menu', ['require', 'exports', 'module' , 'ace/ext/menu_tools/generate_settings_menu', 'ace/ext/menu_tools/overlay_page', 'ace/editor'], function(require, exports, module) {
-
-var generateSettingsMenu = require('./menu_tools/generate_settings_menu').generateSettingsMenu;
-var overlayPage = require('./menu_tools/overlay_page').overlayPage;
-function showSettingsMenu(editor) {
- var sm = document.getElementById('ace_settingsmenu');
- if (!sm)
- overlayPage(editor, generateSettingsMenu(editor), '0', '0', '0');
-}
-module.exports.init = function(editor) {
- var Editor = require("ace/editor").Editor;
- Editor.prototype.showSettingsMenu = function() {
- showSettingsMenu(this);
- };
-};
-});
-
-ace.define('ace/ext/menu_tools/generate_settings_menu', ['require', 'exports', 'module' , 'ace/ext/menu_tools/element_generator', 'ace/ext/menu_tools/add_editor_menu_options', 'ace/ext/menu_tools/get_set_functions'], function(require, exports, module) {
-
-var egen = require('./element_generator');
-var addEditorMenuOptions = require('./add_editor_menu_options').addEditorMenuOptions;
-var getSetFunctions = require('./get_set_functions').getSetFunctions;
-module.exports.generateSettingsMenu = function generateSettingsMenu (editor) {
- var elements = [];
- function cleanupElementsList() {
- elements.sort(function(a, b) {
- var x = a.getAttribute('contains');
- var y = b.getAttribute('contains');
- return x.localeCompare(y);
- });
- }
- function wrapElements() {
- var topmenu = document.createElement('div');
- topmenu.setAttribute('id', 'ace_settingsmenu');
- elements.forEach(function(element) {
- topmenu.appendChild(element);
- });
- return topmenu;
- }
- function createNewEntry(obj, clss, item, val) {
- var el;
- var div = document.createElement('div');
- div.setAttribute('contains', item);
- div.setAttribute('class', 'ace_optionsMenuEntry');
- div.setAttribute('style', 'clear: both;');
-
- div.appendChild(egen.createLabel(
- item.replace(/^set/, '').replace(/([A-Z])/g, ' $1').trim(),
- item
- ));
-
- if (Array.isArray(val)) {
- el = egen.createSelection(item, val, clss);
- el.addEventListener('change', function(e) {
- try{
- editor.menuOptions[e.target.id].forEach(function(x) {
- if(x.textContent !== e.target.textContent) {
- delete x.selected;
- }
- });
- obj[e.target.id](e.target.value);
- } catch (err) {
- throw new Error(err);
- }
- });
- } else if(typeof val === 'boolean') {
- el = egen.createCheckbox(item, val, clss);
- el.addEventListener('change', function(e) {
- try{
- obj[e.target.id](!!e.target.checked);
- } catch (err) {
- throw new Error(err);
- }
- });
- } else {
- el = egen.createInput(item, val, clss);
- el.addEventListener('change', function(e) {
- try{
- if(e.target.value === 'true') {
- obj[e.target.id](true);
- } else if(e.target.value === 'false') {
- obj[e.target.id](false);
- } else {
- obj[e.target.id](e.target.value);
- }
- } catch (err) {
- throw new Error(err);
- }
- });
- }
- el.style.cssText = 'float:right;';
- div.appendChild(el);
- return div;
- }
- function makeDropdown(item, esr, clss, fn) {
- var val = editor.menuOptions[item];
- var currentVal = esr[fn]();
- if (typeof currentVal == 'object')
- currentVal = currentVal.$id;
- val.forEach(function(valuex) {
- if (valuex.value === currentVal)
- valuex.selected = 'selected';
- });
- return createNewEntry(esr, clss, item, val);
- }
- function handleSet(setObj) {
- var item = setObj.functionName;
- var esr = setObj.parentObj;
- var clss = setObj.parentName;
- var val;
- var fn = item.replace(/^set/, 'get');
- if(editor.menuOptions[item] !== undefined) {
- elements.push(makeDropdown(item, esr, clss, fn));
- } else if(typeof esr[fn] === 'function') {
- try {
- val = esr[fn]();
- if(typeof val === 'object') {
- val = val.$id;
- }
- elements.push(
- createNewEntry(esr, clss, item, val)
- );
- } catch (e) {
- }
- }
- }
- addEditorMenuOptions(editor);
- getSetFunctions(editor).forEach(function(setObj) {
- handleSet(setObj);
- });
- cleanupElementsList();
- return wrapElements();
-};
-
-});
-
-ace.define('ace/ext/menu_tools/element_generator', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/ext/menu_tools/element_generator",["require","exports","module"], function(require, exports, module) {
+'use strict';
module.exports.createOption = function createOption (obj) {
var attribute;
var el = document.createElement('option');
@@ -221,53 +54,8 @@ module.exports.createSelection = function createSelection (id, values, clss) {
});
-ace.define('ace/ext/menu_tools/add_editor_menu_options', ['require', 'exports', 'module' , 'ace/ext/modelist', 'ace/ext/themelist'], function(require, exports, module) {
-module.exports.addEditorMenuOptions = function addEditorMenuOptions (editor) {
- var modelist = require('../modelist');
- var themelist = require('../themelist');
- editor.menuOptions = {
- "setNewLineMode" : [{
- "textContent" : "unix",
- "value" : "unix"
- }, {
- "textContent" : "windows",
- "value" : "windows"
- }, {
- "textContent" : "auto",
- "value" : "auto"
- }],
- "setTheme" : [],
- "setMode" : [],
- "setKeyboardHandler": [{
- "textContent" : "ace",
- "value" : ""
- }, {
- "textContent" : "vim",
- "value" : "ace/keyboard/vim"
- }, {
- "textContent" : "emacs",
- "value" : "ace/keyboard/emacs"
- }]
- };
-
- editor.menuOptions.setTheme = themelist.themes.map(function(theme) {
- return {
- 'textContent' : theme.desc,
- 'value' : theme.theme
- };
- });
-
- editor.menuOptions.setMode = modelist.modes.map(function(mode) {
- return {
- 'textContent' : mode.name,
- 'value' : mode.mode
- };
- });
-};
-
-
-});ace.define('ace/ext/modelist', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) {
+"use strict";
var modes = [];
function getModeForPath(path) {
@@ -303,17 +91,20 @@ Mode.prototype.supportsFile = function(filename) {
};
var supportedModes = {
ABAP: ["abap"],
- ADA: ["ada|adb"],
+ ABC: ["abc"],
ActionScript:["as"],
- AsciiDoc: ["asciidoc"],
+ ADA: ["ada|adb"],
+ Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],
+ AsciiDoc: ["asciidoc|adoc"],
Assembly_x86:["asm"],
AutoHotKey: ["ahk"],
BatchFile: ["bat|cmd"],
C9Search: ["c9search_results"],
- C_Cpp: ["c|cc|cpp|cxx|h|hh|hpp"],
- Clojure: ["clj"],
- Cobol: ["^CBL|COB"],
- coffee: ["^Cakefile|coffee|cf|cson"],
+ C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp"],
+ Cirru: ["cirru|cr"],
+ Clojure: ["clj|cljs"],
+ Cobol: ["CBL|COB"],
+ coffee: ["coffee|cf|cson|^Cakefile"],
ColdFusion: ["cfm"],
CSharp: ["cs"],
CSS: ["css"],
@@ -321,29 +112,42 @@ var supportedModes = {
D: ["d|di"],
Dart: ["dart"],
Diff: ["diff|patch"],
+ Dockerfile: ["^Dockerfile"],
Dot: ["dot"],
- Erlang: ["erl|hrl"],
+ Dummy: ["dummy"],
+ DummySyntax: ["dummy"],
+ Eiffel: ["e"],
EJS: ["ejs"],
+ Elixir: ["ex|exs"],
+ Elm: ["elm"],
+ Erlang: ["erl|hrl"],
Forth: ["frt|fs|ldr"],
FTL: ["ftl"],
+ Gcode: ["gcode"],
+ Gherkin: ["feature"],
+ Gitignore: ["^.gitignore"],
Glsl: ["glsl|frag|vert"],
golang: ["go"],
Groovy: ["groovy"],
HAML: ["haml"],
+ Handlebars: ["hbs|handlebars|tpl|mustache"],
Haskell: ["hs"],
haXe: ["hx"],
- HTML: ["htm|html|xhtml"],
+ HTML: ["html|htm|xhtml"],
HTML_Ruby: ["erb|rhtml|html.erb"],
- Ini: ["Ini|conf"],
+ INI: ["ini|conf|cfg|prefs"],
+ Io: ["io"],
+ Jack: ["jack"],
Jade: ["jade"],
Java: ["java"],
- JavaScript: ["js"],
+ JavaScript: ["js|jsm"],
JSON: ["json"],
JSONiq: ["jq"],
JSP: ["jsp"],
JSX: ["jsx"],
Julia: ["jl"],
- LaTeX: ["latex|tex|ltx|bib"],
+ LaTeX: ["tex|latex|ltx|bib"],
+ Lean: ["lean|hlean"],
LESS: ["less"],
Liquid: ["liquid"],
Lisp: ["lisp"],
@@ -353,11 +157,14 @@ var supportedModes = {
Lua: ["lua"],
LuaPage: ["lp"],
Lucene: ["lucene"],
- Makefile: ["^GNUmakefile|^makefile|^Makefile|^OCamlMakefile|make"],
- MATLAB: ["matlab"],
+ Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],
Markdown: ["md|markdown"],
- MySQL: ["mysql"],
+ Mask: ["mask"],
+ MATLAB: ["matlab"],
+ MEL: ["mel"],
MUSHCode: ["mc|mush"],
+ MySQL: ["mysql"],
+ Nix: ["nix"],
ObjectiveC: ["m|mm"],
OCaml: ["ml|mli"],
Pascal: ["pas|p"],
@@ -365,22 +172,29 @@ var supportedModes = {
pgSQL: ["pgsql"],
PHP: ["php|phtml"],
Powershell: ["ps1"],
+ Praat: ["praat|praatscript|psc|proc"],
Prolog: ["plg|prolog"],
Properties: ["properties"],
+ Protobuf: ["proto"],
Python: ["py"],
R: ["r"],
RDoc: ["Rd"],
RHTML: ["Rhtml"],
- Ruby: ["ru|gemspec|rake|rb"],
+ Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],
Rust: ["rs"],
SASS: ["sass"],
SCAD: ["scad"],
Scala: ["scala"],
Scheme: ["scm|rkt"],
SCSS: ["scss"],
- SH: ["sh|bash"],
+ SH: ["sh|bash|^.bashrc"],
+ SJS: ["sjs"],
+ Smarty: ["smarty|tpl"],
snippets: ["snippets"],
+ Soy_Template:["soy"],
+ Space: ["space"],
SQL: ["sql"],
+ SQLServer: ["sqlserver"],
Stylus: ["styl|stylus"],
SVG: ["svg"],
Tcl: ["tcl"],
@@ -389,19 +203,23 @@ var supportedModes = {
Textile: ["textile"],
Toml: ["toml"],
Twig: ["twig"],
- Typescript: ["typescript|ts|str"],
- VBScript: ["vbs"],
+ Typescript: ["ts|typescript|str"],
+ Vala: ["vala"],
+ VBScript: ["vbs|vb"],
Velocity: ["vm"],
- XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],
+ Verilog: ["v|vh|sv|svh"],
+ VHDL: ["vhd|vhdl"],
+ XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],
XQuery: ["xq"],
- YAML: ["yaml"]
+ YAML: ["yaml|yml"],
+ Django: ["html"]
};
var nameOverrides = {
ObjectiveC: "Objective-C",
CSharp: "C#",
golang: "Go",
- C_Cpp: "C/C++",
+ C_Cpp: "C and C++",
coffee: "CoffeeScript",
HTML_Ruby: "HTML (Ruby)",
FTL: "FreeMarker"
@@ -409,7 +227,7 @@ var nameOverrides = {
var modesByName = {};
for (var name in supportedModes) {
var data = supportedModes[name];
- var displayName = nameOverrides[name] || name;
+ var displayName = (nameOverrides[name] || name).replace(/_/g, " ");
var filename = name.toLowerCase();
var mode = new Mode(filename, displayName, data[0]);
modesByName[filename] = mode;
@@ -424,66 +242,119 @@ module.exports = {
});
-ace.define('ace/ext/themelist', ['require', 'exports', 'module' , 'ace/ext/themelist_utils/themes'], function(require, exports, module) {
-module.exports.themes = require('ace/ext/themelist_utils/themes').themes;
-module.exports.ThemeDescription = function(name) {
- this.name = name;
- this.desc = name.split('_'
- ).map(
- function(namePart) {
- return namePart[0].toUpperCase() + namePart.slice(1);
- }
- ).join(' ');
- this.theme = "ace/theme/" + name;
-};
+ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"], function(require, exports, module) {
+"use strict";
+require("ace/lib/fixoldbrowsers");
+
+var themeData = [
+ ["Chrome" ],
+ ["Clouds" ],
+ ["Crimson Editor" ],
+ ["Dawn" ],
+ ["Dreamweaver" ],
+ ["Eclipse" ],
+ ["GitHub" ],
+ ["IPlastic" ],
+ ["Solarized Light"],
+ ["TextMate" ],
+ ["Tomorrow" ],
+ ["XCode" ],
+ ["Kuroir"],
+ ["KatzenMilch"],
+ ["SQL Server" ,"sqlserver" , "light"],
+ ["Ambiance" ,"ambiance" , "dark"],
+ ["Chaos" ,"chaos" , "dark"],
+ ["Clouds Midnight" ,"clouds_midnight" , "dark"],
+ ["Cobalt" ,"cobalt" , "dark"],
+ ["idle Fingers" ,"idle_fingers" , "dark"],
+ ["krTheme" ,"kr_theme" , "dark"],
+ ["Merbivore" ,"merbivore" , "dark"],
+ ["Merbivore Soft" ,"merbivore_soft" , "dark"],
+ ["Mono Industrial" ,"mono_industrial" , "dark"],
+ ["Monokai" ,"monokai" , "dark"],
+ ["Pastel on dark" ,"pastel_on_dark" , "dark"],
+ ["Solarized Dark" ,"solarized_dark" , "dark"],
+ ["Terminal" ,"terminal" , "dark"],
+ ["Tomorrow Night" ,"tomorrow_night" , "dark"],
+ ["Tomorrow Night Blue" ,"tomorrow_night_blue" , "dark"],
+ ["Tomorrow Night Bright","tomorrow_night_bright" , "dark"],
+ ["Tomorrow Night 80s" ,"tomorrow_night_eighties" , "dark"],
+ ["Twilight" ,"twilight" , "dark"],
+ ["Vibrant Ink" ,"vibrant_ink" , "dark"]
+];
-module.exports.themesByName = {};
-module.exports.themes = module.exports.themes.map(function(name) {
- module.exports.themesByName[name] = new module.exports.ThemeDescription(name);
- return module.exports.themesByName[name];
+exports.themesByName = {};
+exports.themes = themeData.map(function(data) {
+ var name = data[1] || data[0].replace(/ /g, "_").toLowerCase();
+ var theme = {
+ caption: data[0],
+ theme: "ace/theme/" + name,
+ isDark: data[2] == "dark",
+ name: name
+ };
+ exports.themesByName[name] = theme;
+ return theme;
});
});
-ace.define('ace/ext/themelist_utils/themes', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-module.exports.themes = [
- "ambiance",
- "chaos",
- "chrome",
- "clouds",
- "clouds_midnight",
- "cobalt",
- "crimson_editor",
- "dawn",
- "dreamweaver",
- "eclipse",
- "github",
- "idle_fingers",
- "kr_theme",
- "merbivore",
- "merbivore_soft",
- "monokai",
- "mono_industrial",
- "pastel_on_dark",
- "solarized_dark",
- "solarized_light",
- "terminal",
- "textmate",
- "tomorrow",
- "tomorrow_night",
- "tomorrow_night_blue",
- "tomorrow_night_bright",
- "tomorrow_night_eighties",
- "twilight",
- "vibrant_ink",
- "xcode"
-];
+ace.define("ace/ext/menu_tools/add_editor_menu_options",["require","exports","module","ace/ext/modelist","ace/ext/themelist"], function(require, exports, module) {
+'use strict';
+module.exports.addEditorMenuOptions = function addEditorMenuOptions (editor) {
+ var modelist = require('../modelist');
+ var themelist = require('../themelist');
+ editor.menuOptions = {
+ setNewLineMode: [{
+ textContent: "unix",
+ value: "unix"
+ }, {
+ textContent: "windows",
+ value: "windows"
+ }, {
+ textContent: "auto",
+ value: "auto"
+ }],
+ setTheme: [],
+ setMode: [],
+ setKeyboardHandler: [{
+ textContent: "ace",
+ value: ""
+ }, {
+ textContent: "vim",
+ value: "ace/keyboard/vim"
+ }, {
+ textContent: "emacs",
+ value: "ace/keyboard/emacs"
+ }, {
+ textContent: "textarea",
+ value: "ace/keyboard/textarea"
+ }, {
+ textContent: "sublime",
+ value: "ace/keyboard/sublime"
+ }]
+ };
+
+ editor.menuOptions.setTheme = themelist.themes.map(function(theme) {
+ return {
+ textContent: theme.caption,
+ value: theme.theme
+ };
+ });
+
+ editor.menuOptions.setMode = modelist.modes.map(function(mode) {
+ return {
+ textContent: mode.name,
+ value: mode.mode
+ };
+ });
+};
+
});
-ace.define('ace/ext/menu_tools/get_set_functions', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/ext/menu_tools/get_set_functions",["require","exports","module"], function(require, exports, module) {
+'use strict';
module.exports.getSetFunctions = function getSetFunctions (editor) {
var out = [];
var my = {
@@ -524,8 +395,133 @@ module.exports.getSetFunctions = function getSetFunctions (editor) {
});
-ace.define('ace/ext/menu_tools/overlay_page', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/ext/menu_tools/generate_settings_menu",["require","exports","module","ace/ext/menu_tools/element_generator","ace/ext/menu_tools/add_editor_menu_options","ace/ext/menu_tools/get_set_functions"], function(require, exports, module) {
+'use strict';
+var egen = require('./element_generator');
+var addEditorMenuOptions = require('./add_editor_menu_options').addEditorMenuOptions;
+var getSetFunctions = require('./get_set_functions').getSetFunctions;
+module.exports.generateSettingsMenu = function generateSettingsMenu (editor) {
+ var elements = [];
+ function cleanupElementsList() {
+ elements.sort(function(a, b) {
+ var x = a.getAttribute('contains');
+ var y = b.getAttribute('contains');
+ return x.localeCompare(y);
+ });
+ }
+ function wrapElements() {
+ var topmenu = document.createElement('div');
+ topmenu.setAttribute('id', 'ace_settingsmenu');
+ elements.forEach(function(element) {
+ topmenu.appendChild(element);
+ });
+
+ var el = topmenu.appendChild(document.createElement('div'));
+ var version = "1.1.9";
+ el.style.padding = "1em";
+ el.textContent = "Ace version " + version;
+
+ return topmenu;
+ }
+ function createNewEntry(obj, clss, item, val) {
+ var el;
+ var div = document.createElement('div');
+ div.setAttribute('contains', item);
+ div.setAttribute('class', 'ace_optionsMenuEntry');
+ div.setAttribute('style', 'clear: both;');
+ div.appendChild(egen.createLabel(
+ item.replace(/^set/, '').replace(/([A-Z])/g, ' $1').trim(),
+ item
+ ));
+
+ if (Array.isArray(val)) {
+ el = egen.createSelection(item, val, clss);
+ el.addEventListener('change', function(e) {
+ try{
+ editor.menuOptions[e.target.id].forEach(function(x) {
+ if(x.textContent !== e.target.textContent) {
+ delete x.selected;
+ }
+ });
+ obj[e.target.id](e.target.value);
+ } catch (err) {
+ throw new Error(err);
+ }
+ });
+ } else if(typeof val === 'boolean') {
+ el = egen.createCheckbox(item, val, clss);
+ el.addEventListener('change', function(e) {
+ try{
+ obj[e.target.id](!!e.target.checked);
+ } catch (err) {
+ throw new Error(err);
+ }
+ });
+ } else {
+ el = egen.createInput(item, val, clss);
+ el.addEventListener('change', function(e) {
+ try{
+ if(e.target.value === 'true') {
+ obj[e.target.id](true);
+ } else if(e.target.value === 'false') {
+ obj[e.target.id](false);
+ } else {
+ obj[e.target.id](e.target.value);
+ }
+ } catch (err) {
+ throw new Error(err);
+ }
+ });
+ }
+ el.style.cssText = 'float:right;';
+ div.appendChild(el);
+ return div;
+ }
+ function makeDropdown(item, esr, clss, fn) {
+ var val = editor.menuOptions[item];
+ var currentVal = esr[fn]();
+ if (typeof currentVal == 'object')
+ currentVal = currentVal.$id;
+ val.forEach(function(valuex) {
+ if (valuex.value === currentVal)
+ valuex.selected = 'selected';
+ });
+ return createNewEntry(esr, clss, item, val);
+ }
+ function handleSet(setObj) {
+ var item = setObj.functionName;
+ var esr = setObj.parentObj;
+ var clss = setObj.parentName;
+ var val;
+ var fn = item.replace(/^set/, 'get');
+ if(editor.menuOptions[item] !== undefined) {
+ elements.push(makeDropdown(item, esr, clss, fn));
+ } else if(typeof esr[fn] === 'function') {
+ try {
+ val = esr[fn]();
+ if(typeof val === 'object') {
+ val = val.$id;
+ }
+ elements.push(
+ createNewEntry(esr, clss, item, val)
+ );
+ } catch (e) {
+ }
+ }
+ }
+ addEditorMenuOptions(editor);
+ getSetFunctions(editor).forEach(function(setObj) {
+ handleSet(setObj);
+ });
+ cleanupElementsList();
+ return wrapElements();
+};
+
+});
+
+ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+'use strict';
var dom = require("../../lib/dom");
var cssText = "#ace_settingsmenu, #kbshortcutmenu {\
background-color: #F7F7F7;\
@@ -623,4 +619,25 @@ module.exports.overlayPage = function overlayPage(editor, contentElement, top, r
editor.blur();
};
-}); \ No newline at end of file
+});
+
+ace.define("ace/ext/settings_menu",["require","exports","module","ace/ext/menu_tools/generate_settings_menu","ace/ext/menu_tools/overlay_page","ace/editor"], function(require, exports, module) {
+"use strict";
+var generateSettingsMenu = require('./menu_tools/generate_settings_menu').generateSettingsMenu;
+var overlayPage = require('./menu_tools/overlay_page').overlayPage;
+function showSettingsMenu(editor) {
+ var sm = document.getElementById('ace_settingsmenu');
+ if (!sm)
+ overlayPage(editor, generateSettingsMenu(editor), '0', '0', '0');
+}
+module.exports.init = function(editor) {
+ var Editor = require("ace/editor").Editor;
+ Editor.prototype.showSettingsMenu = function() {
+ showSettingsMenu(this);
+ };
+};
+});
+ (function() {
+ ace.require(["ace/ext/settings_menu"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-spellcheck.js b/js/vendor/ace/src-noconflict/ext-spellcheck.js
index 192c796..8d3b5f6 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-spellcheck.js
+++ b/js/vendor/ace/src-noconflict/ext-spellcheck.js
@@ -1,5 +1,5 @@
-ace.define('ace/ext/spellcheck', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/editor', 'ace/config'], function(require, exports, module) {
-
+ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"], function(require, exports, module) {
+"use strict";
var event = require("../lib/event");
exports.contextMenuHandler = function(e){
@@ -17,8 +17,9 @@ exports.contextMenuHandler = function(e){
var PLACEHOLDER = "\x01\x01";
var value = w + " " + PLACEHOLDER;
text.value = value;
- text.setSelectionRange(w.length + 1, w.length + 1);
+ text.setSelectionRange(w.length, w.length + 1);
text.setSelectionRange(0, 0);
+ text.setSelectionRange(0, w.length);
var afterKeydown = false;
event.addListener(text, "keydown", function onKeydown() {
@@ -64,4 +65,7 @@ require("../config").defineOptions(Editor.prototype, "editor", {
});
});
-
+ (function() {
+ ace.require(["ace/ext/spellcheck"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-split.js b/js/vendor/ace/src-noconflict/ext-split.js
index d983f9b..29dd20e 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-split.js
+++ b/js/vendor/ace/src-noconflict/ext-split.js
@@ -1,40 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/ext/split', ['require', 'exports', 'module' , 'ace/split'], function(require, exports, module) {
-module.exports = require("../split");
-
-});
-
-ace.define('ace/split', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/event_emitter', 'ace/editor', 'ace/virtual_renderer', 'ace/edit_session'], function(require, exports, module) {
-
+ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"], function(require, exports, module) {
+"use strict";
var oop = require("./lib/oop");
var lang = require("./lib/lang");
@@ -269,3 +234,13 @@ function UndoManagerProxy(undoManager, session) {
exports.Split = Split;
});
+
+ace.define("ace/ext/split",["require","exports","module","ace/split"], function(require, exports, module) {
+"use strict";
+module.exports = require("../split");
+
+});
+ (function() {
+ ace.require(["ace/ext/split"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-static_highlight.js b/js/vendor/ace/src-noconflict/ext-static_highlight.js
index 793faf8..c4b903f 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-static_highlight.js
+++ b/js/vendor/ace/src-noconflict/ext-static_highlight.js
@@ -1,62 +1,87 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/ext/static_highlight', ['require', 'exports', 'module' , 'ace/edit_session', 'ace/layer/text', 'ace/config'], function(require, exports, module) {
-
+ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"], function(require, exports, module) {
+"use strict";
var EditSession = require("../edit_session").EditSession;
var TextLayer = require("../layer/text").Text;
var baseStyles = ".ace_static_highlight {\
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;\
font-size: 12px;\
+white-space: pre-wrap\
}\
.ace_static_highlight .ace_gutter {\
-width: 25px !important;\
-display: block;\
-float: left;\
+width: 2em;\
text-align: right;\
padding: 0 3px 0 0;\
margin-right: 3px;\
-position: static !important;\
}\
-.ace_static_highlight .ace_line { clear: both; }\
+.ace_static_highlight.ace_show_gutter .ace_line {\
+padding-left: 2.6em;\
+}\
+.ace_static_highlight .ace_line { position: relative; }\
.ace_static_highlight .ace_gutter-cell {\
-moz-user-select: -moz-none;\
-khtml-user-select: none;\
-webkit-user-select: none;\
user-select: none;\
-}";
+top: 0;\
+bottom: 0;\
+left: 0;\
+position: absolute;\
+}\
+.ace_static_highlight .ace_gutter-cell:before {\
+content: counter(ace_line, decimal);\
+counter-increment: ace_line;\
+}\
+.ace_static_highlight {\
+counter-reset: ace_line;\
+}\
+";
var config = require("../config");
+var dom = require("../lib/dom");
+
-exports.render = function(input, mode, theme, lineStart, disableGutter, callback) {
- var waiting = 0;
+var highlight = function(el, opts, callback) {
+ var m = el.className.match(/lang-(\w+)/);
+ var mode = opts.mode || m && ("ace/mode/" + m[1]);
+ if (!mode)
+ return false;
+ var theme = opts.theme || "ace/theme/textmate";
+
+ var data = "";
+ var nodes = [];
+
+ if (el.firstElementChild) {
+ var textLen = 0;
+ for (var i = 0; i < el.childNodes.length; i++) {
+ var ch = el.childNodes[i];
+ if (ch.nodeType == 3) {
+ textLen += ch.data.length;
+ data += ch.data;
+ } else {
+ nodes.push(textLen, ch);
+ }
+ }
+ } else {
+ data = dom.getInnerText(el);
+ if (opts.trim)
+ data = data.trim();
+ }
+
+ highlight.render(data, mode, theme, opts.firstLineNumber, !opts.showGutter, function (highlighted) {
+ dom.importCssString(highlighted.css, "ace_highlight");
+ el.innerHTML = highlighted.html;
+ var container = el.firstChild.firstChild;
+ for (var i = 0; i < nodes.length; i += 2) {
+ var pos = highlighted.session.doc.indexToPosition(nodes[i]);
+ var node = nodes[i + 1];
+ var lineEl = container.children[pos.row];
+ lineEl && lineEl.appendChild(node);
+ }
+ callback && callback();
+ });
+};
+highlight.render = function(input, mode, theme, lineStart, disableGutter, callback) {
+ var waiting = 1;
var modeCache = EditSession.prototype.$modes;
if (typeof theme == "string") {
waiting++;
@@ -65,23 +90,27 @@ exports.render = function(input, mode, theme, lineStart, disableGutter, callback
--waiting || done();
});
}
-
+ var modeOptions;
+ if (mode && typeof mode === "object" && !mode.getTokenizer) {
+ modeOptions = mode;
+ mode = modeOptions.path;
+ }
if (typeof mode == "string") {
waiting++;
config.loadModule(['mode', mode], function(m) {
- if (!modeCache[mode]) modeCache[mode] = new m.Mode();
+ if (!modeCache[mode] || modeOptions)
+ modeCache[mode] = new m.Mode(modeOptions);
mode = modeCache[mode];
--waiting || done();
});
}
function done() {
- var result = exports.renderSync(input, mode, theme, lineStart, disableGutter);
+ var result = highlight.renderSync(input, mode, theme, lineStart, disableGutter);
return callback ? callback(result) : result;
}
- return waiting || done();
+ return --waiting || done();
};
-
-exports.renderSync = function(input, mode, theme, lineStart, disableGutter) {
+highlight.renderSync = function(input, mode, theme, lineStart, disableGutter) {
lineStart = parseInt(lineStart || 1, 10);
var session = new EditSession("");
@@ -103,12 +132,13 @@ exports.renderSync = function(input, mode, theme, lineStart, disableGutter) {
for(var ix = 0; ix < length; ix++) {
stringBuilder.push("<div class='ace_line'>");
if (!disableGutter)
- stringBuilder.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'>" + (ix + lineStart) + "</span>");
+ stringBuilder.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'>" + /*(ix + lineStart) + */ "</span>");
textLayer.$renderLine(stringBuilder, ix, true, false);
- stringBuilder.push("</div>");
+ stringBuilder.push("\n</div>");
}
var html = "<div class='" + theme.cssClass + "'>" +
- "<div class='ace_static_highlight'>" +
+ "<div class='ace_static_highlight" + (disableGutter ? "" : " ace_show_gutter") +
+ "' style='counter-reset:ace_line " + (lineStart - 1) + "'>" +
stringBuilder.join("") +
"</div>" +
"</div>";
@@ -117,8 +147,15 @@ exports.renderSync = function(input, mode, theme, lineStart, disableGutter) {
return {
css: baseStyles + theme.cssText,
- html: html
+ html: html,
+ session: session
};
};
+module.exports = highlight;
+module.exports.highlight =highlight;
});
+ (function() {
+ ace.require(["ace/ext/static_highlight"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-statusbar.js b/js/vendor/ace/src-noconflict/ext-statusbar.js
index 31cab37..d369b16 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-statusbar.js
+++ b/js/vendor/ace/src-noconflict/ext-statusbar.js
@@ -1,4 +1,5 @@
-ace.define('ace/ext/statusbar', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/lib/lang'], function(require, exports, module) {
+ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var dom = require("ace/lib/dom");
var lang = require("ace/lib/lang");
@@ -26,9 +27,8 @@ var StatusBar = function(editor, parentNode) {
str && status.push(str, separator || "|");
}
- if (editor.$vimModeHandler)
- add(editor.$vimModeHandler.getStatusText());
- else if (editor.commands.recording)
+ add(editor.keyBinding.getStatusText(editor));
+ if (editor.commands.recording)
add("REC");
var c = editor.selection.lead;
@@ -44,4 +44,8 @@ var StatusBar = function(editor, parentNode) {
exports.StatusBar = StatusBar;
-}); \ No newline at end of file
+});
+ (function() {
+ ace.require(["ace/ext/statusbar"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-textarea.js b/js/vendor/ace/src-noconflict/ext-textarea.js
index a9b7f4d..6309fbb 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-textarea.js
+++ b/js/vendor/ace/src-noconflict/ext-textarea.js
@@ -1,35 +1,208 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/ext/textarea', ['require', 'exports', 'module' , 'ace/lib/event', 'ace/lib/useragent', 'ace/lib/net', 'ace/ace', 'ace/theme/textmate', 'ace/mode/text'], function(require, exports, module) {
+ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+
+exports.isDark = false;
+exports.cssClass = "ace-tm";
+exports.cssText = ".ace-tm .ace_gutter {\
+background: #f0f0f0;\
+color: #333;\
+}\
+.ace-tm .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-tm .ace_fold {\
+background-color: #6B72E6;\
+}\
+.ace-tm {\
+background-color: #FFFFFF;\
+color: black;\
+}\
+.ace-tm .ace_cursor {\
+color: black;\
+}\
+.ace-tm .ace_invisible {\
+color: rgb(191, 191, 191);\
+}\
+.ace-tm .ace_storage,\
+.ace-tm .ace_keyword {\
+color: blue;\
+}\
+.ace-tm .ace_constant {\
+color: rgb(197, 6, 11);\
+}\
+.ace-tm .ace_constant.ace_buildin {\
+color: rgb(88, 72, 246);\
+}\
+.ace-tm .ace_constant.ace_language {\
+color: rgb(88, 92, 246);\
+}\
+.ace-tm .ace_constant.ace_library {\
+color: rgb(6, 150, 14);\
+}\
+.ace-tm .ace_invalid {\
+background-color: rgba(255, 0, 0, 0.1);\
+color: red;\
+}\
+.ace-tm .ace_support.ace_function {\
+color: rgb(60, 76, 114);\
+}\
+.ace-tm .ace_support.ace_constant {\
+color: rgb(6, 150, 14);\
+}\
+.ace-tm .ace_support.ace_type,\
+.ace-tm .ace_support.ace_class {\
+color: rgb(109, 121, 222);\
+}\
+.ace-tm .ace_keyword.ace_operator {\
+color: rgb(104, 118, 135);\
+}\
+.ace-tm .ace_string {\
+color: rgb(3, 106, 7);\
+}\
+.ace-tm .ace_comment {\
+color: rgb(76, 136, 107);\
+}\
+.ace-tm .ace_comment.ace_doc {\
+color: rgb(0, 102, 255);\
+}\
+.ace-tm .ace_comment.ace_doc.ace_tag {\
+color: rgb(128, 159, 191);\
+}\
+.ace-tm .ace_constant.ace_numeric {\
+color: rgb(0, 0, 205);\
+}\
+.ace-tm .ace_variable {\
+color: rgb(49, 132, 149);\
+}\
+.ace-tm .ace_xml-pe {\
+color: rgb(104, 104, 91);\
+}\
+.ace-tm .ace_entity.ace_name.ace_function {\
+color: #0000A2;\
+}\
+.ace-tm .ace_heading {\
+color: rgb(12, 7, 255);\
+}\
+.ace-tm .ace_list {\
+color:rgb(185, 6, 144);\
+}\
+.ace-tm .ace_meta.ace_tag {\
+color:rgb(0, 22, 142);\
+}\
+.ace-tm .ace_string.ace_regex {\
+color: rgb(255, 0, 0)\
+}\
+.ace-tm .ace_marker-layer .ace_selection {\
+background: rgb(181, 213, 255);\
+}\
+.ace-tm.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px white;\
+border-radius: 2px;\
+}\
+.ace-tm .ace_marker-layer .ace_step {\
+background: rgb(252, 255, 0);\
+}\
+.ace-tm .ace_marker-layer .ace_stack {\
+background: rgb(164, 229, 101);\
+}\
+.ace-tm .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgb(192, 192, 192);\
+}\
+.ace-tm .ace_marker-layer .ace_active-line {\
+background: rgba(0, 0, 0, 0.07);\
+}\
+.ace-tm .ace_gutter-active-line {\
+background-color : #dcdcdc;\
+}\
+.ace-tm .ace_marker-layer .ace_selected-word {\
+background: rgb(250, 250, 255);\
+border: 1px solid rgb(200, 200, 250);\
+}\
+.ace-tm .ace_indent-guide {\
+background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
+}\
+";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
+
+ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], function(require, exports, module) {
+"use strict";
+
+require("./lib/fixoldbrowsers");
+
+var dom = require("./lib/dom");
+var event = require("./lib/event");
+
+var Editor = require("./editor").Editor;
+var EditSession = require("./edit_session").EditSession;
+var UndoManager = require("./undomanager").UndoManager;
+var Renderer = require("./virtual_renderer").VirtualRenderer;
+require("./worker/worker_client");
+require("./keyboard/hash_handler");
+require("./placeholder");
+require("./multi_select");
+require("./mode/folding/fold_mode");
+require("./theme/textmate");
+require("./ext/error_marker");
+
+exports.config = require("./config");
+exports.require = require;
+exports.edit = function(el) {
+ if (typeof(el) == "string") {
+ var _id = el;
+ el = document.getElementById(_id);
+ if (!el)
+ throw new Error("ace.edit can't find div #" + _id);
+ }
+
+ if (el && el.env && el.env.editor instanceof Editor)
+ return el.env.editor;
+
+ var value = "";
+ if (el && /input|textarea/i.test(el.tagName)) {
+ var oldNode = el;
+ value = oldNode.value;
+ el = dom.createElement("pre");
+ oldNode.parentNode.replaceChild(el, oldNode);
+ } else {
+ value = dom.getInnerText(el);
+ el.innerHTML = '';
+ }
+
+ var doc = exports.createEditSession(value);
+
+ var editor = new Editor(new Renderer(el));
+ editor.setSession(doc);
+
+ var env = {
+ document: doc,
+ editor: editor,
+ onResize: editor.resize.bind(editor, null)
+ };
+ if (oldNode) env.textarea = oldNode;
+ event.addListener(window, "resize", env.onResize);
+ editor.on("destroy", function() {
+ event.removeListener(window, "resize", env.onResize);
+ env.editor.container.env = null; // prevent memory leak on old ie
+ });
+ editor.container.env = editor.env = env;
+ return editor;
+};
+exports.createEditSession = function(text, mode) {
+ var doc = new EditSession(text, mode);
+ doc.setUndoManager(new UndoManager());
+ return doc;
+}
+exports.EditSession = EditSession;
+exports.UndoManager = UndoManager;
+});
+ace.define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace","ace/theme/textmate"], function(require, exports, module) {
+"use strict";
var event = require("../lib/event");
var UA = require("../lib/useragent");
@@ -64,7 +237,7 @@ function applyStyles(elm, styles) {
function setupContainer(element, getValue) {
if (element.type != 'textarea') {
- throw "Textarea required!";
+ throw new Error("Textarea required!");
}
var parentNode = element.parentNode;
@@ -102,7 +275,7 @@ function setupContainer(element, getValue) {
return container;
}
-exports.transformTextarea = function(element, loader) {
+exports.transformTextarea = function(element, options) {
var session;
var container = setupContainer(element, function() {
return session.getValue();
@@ -157,16 +330,16 @@ exports.transformTextarea = function(element, loader) {
applyStyles(settingDiv, settingDivStyles);
container.appendChild(settingDiv);
- var options = {};
+ options = options || exports.defaultOptions;
var editor = ace.edit(editorDiv);
session = editor.getSession();
session.setValue(element.value || element.innerHTML);
editor.focus();
container.appendChild(settingOpener);
- setupApi(editor, editorDiv, settingDiv, ace, options, loader);
- setupSettingPanel(settingDiv, settingOpener, editor, options);
+ setupApi(editor, editorDiv, settingDiv, ace, options, load);
+ setupSettingPanel(settingDiv, settingOpener, editor);
var state = "";
event.addListener(settingOpener, "mousemove", function(e) {
@@ -231,35 +404,15 @@ function setupApi(editor, editorDiv, settingDiv, ace, options, loader) {
};
editor.$setOption = editor.setOption;
+ editor.$getOption = editor.getOption;
editor.setOption = function(key, value) {
- if (options[key] == value) return;
-
switch (key) {
case "mode":
- if (value != "text") {
- loader("mode-" + value + ".js", "ace/mode/" + value, function() {
- var aceMode = require("../mode/" + value).Mode;
- session.setMode(new aceMode());
- });
- } else {
- session.setMode(new (require("../mode/text").Mode));
- }
+ editor.$setOption("mode", "ace/mode/" + value)
break;
-
case "theme":
- if (value != "textmate") {
- loader("theme-" + value + ".js", "ace/theme/" + value, function() {
- editor.setTheme("ace/theme/" + value);
- });
- } else {
- editor.setTheme("ace/theme/textmate");
- }
+ editor.$setOption("theme", "ace/theme/" + value)
break;
-
- case "fontSize":
- editorDiv.style.fontSize = value;
- break;
-
case "keybindings":
switch (value) {
case "vim":
@@ -274,58 +427,55 @@ function setupApi(editor, editorDiv, settingDiv, ace, options, loader) {
break;
case "softWrap":
- switch (value) {
- case "off":
- session.setUseWrapMode(false);
- renderer.setPrintMarginColumn(80);
- break;
- case "40":
- session.setUseWrapMode(true);
- session.setWrapLimitRange(40, 40);
- renderer.setPrintMarginColumn(40);
- break;
- case "80":
- session.setUseWrapMode(true);
- session.setWrapLimitRange(80, 80);
- renderer.setPrintMarginColumn(80);
- break;
- case "free":
- session.setUseWrapMode(true);
- session.setWrapLimitRange(null, null);
- renderer.setPrintMarginColumn(80);
- break;
- }
+ case "fontSize":
+ editor.$setOption(key, value);
break;
default:
editor.$setOption(key, toBool(value));
}
-
- options[key] = value;
};
editor.getOption = function(key) {
- return options[key];
- };
+ switch (key) {
+ case "mode":
+ return editor.$getOption("mode").substr("ace/mode/".length)
+ break;
- editor.getOptions = function() {
- return options;
- };
+ case "theme":
+ return editor.$getOption("theme").substr("ace/theme/".length)
+ break;
+
+ case "keybindings":
+ var value = editor.getKeyboardHandler()
+ switch (value && value.$id) {
+ case "ace/keyboard/vim":
+ return "vim";
+ case "ace/keyboard/emacs":
+ return "emacs";
+ default:
+ return "ace";
+ }
+ break;
- editor.setOptions(exports.options);
+ default:
+ return editor.$getOption(key);
+ }
+ };
+ editor.setOptions(options);
return editor;
}
-function setupSettingPanel(settingDiv, settingOpener, editor, options) {
+function setupSettingPanel(settingDiv, settingOpener, editor) {
var BOOL = null;
var desc = {
mode: "Mode:",
- gutter: "Display Gutter:",
+ wrap: "Soft Wrap:",
theme: "Theme:",
fontSize: "Font Size:",
- softWrap: "Soft Wrap:",
+ showGutter: "Display Gutter:",
keybindings: "Keyboard",
showPrintMargin: "Show Print Margin:",
useSoftTabs: "Use Soft Tabs:",
@@ -378,7 +528,7 @@ function setupSettingPanel(settingDiv, settingOpener, editor, options) {
twilight: "Twilight",
vibrant_ink: "Vibrant Ink"
},
- gutter: BOOL,
+ showGutter: BOOL,
fontSize: {
"10px": "10px",
"11px": "11px",
@@ -386,7 +536,7 @@ function setupSettingPanel(settingDiv, settingOpener, editor, options) {
"14px": "14px",
"16px": "16px"
},
- softWrap: {
+ wrap: {
off: "Off",
40: "40",
80: "80",
@@ -409,7 +559,7 @@ function setupSettingPanel(settingDiv, settingOpener, editor, options) {
if (!obj) {
builder.push(
"<input type='checkbox' title='", option, "' ",
- cValue == "true" ? "checked='true'" : "",
+ cValue + "" == "true" ? "checked='true'" : "",
"'></input>"
);
return;
@@ -429,10 +579,10 @@ function setupSettingPanel(settingDiv, settingOpener, editor, options) {
builder.push("</select>");
}
- for (var option in options) {
+ for (var option in exports.defaultOptions) {
table.push("<tr><td>", desc[option], "</td>");
table.push("<td>");
- renderOption(table, option, optionValues[option], options[option]);
+ renderOption(table, option, optionValues[option], editor.getOption(option));
table.push("</td></tr>");
}
table.push("</table>");
@@ -463,12 +613,12 @@ function setupSettingPanel(settingDiv, settingOpener, editor, options) {
settingDiv.appendChild(button);
settingDiv.hideButton = button;
}
-exports.options = {
- mode: "text",
+exports.defaultOptions = {
+ mode: "javascript",
theme: "textmate",
- gutter: "false",
+ wrap: "off",
fontSize: "12px",
- softWrap: "off",
+ showGutter: "false",
keybindings: "ace",
showPrintMargin: "false",
useSoftTabs: "true",
@@ -476,3 +626,7 @@ exports.options = {
};
});
+ (function() {
+ ace.require(["ace/ext/textarea"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-themelist.js b/js/vendor/ace/src-noconflict/ext-themelist.js
index bd68156..0997956 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-themelist.js
+++ b/js/vendor/ace/src-noconflict/ext-themelist.js
@@ -1,90 +1,60 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl
- * All rights reserved.
- *
- * Contributed to Ajax.org under the BSD license.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
+ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"], function(require, exports, module) {
+"use strict";
+require("ace/lib/fixoldbrowsers");
-ace.define('ace/ext/themelist', ['require', 'exports', 'module' , 'ace/ext/themelist_utils/themes'], function(require, exports, module) {
-module.exports.themes = require('ace/ext/themelist_utils/themes').themes;
-module.exports.ThemeDescription = function(name) {
- this.name = name;
- this.desc = name.split('_'
- ).map(
- function(namePart) {
- return namePart[0].toUpperCase() + namePart.slice(1);
- }
- ).join(' ');
- this.theme = "ace/theme/" + name;
-};
+var themeData = [
+ ["Chrome" ],
+ ["Clouds" ],
+ ["Crimson Editor" ],
+ ["Dawn" ],
+ ["Dreamweaver" ],
+ ["Eclipse" ],
+ ["GitHub" ],
+ ["IPlastic" ],
+ ["Solarized Light"],
+ ["TextMate" ],
+ ["Tomorrow" ],
+ ["XCode" ],
+ ["Kuroir"],
+ ["KatzenMilch"],
+ ["SQL Server" ,"sqlserver" , "light"],
+ ["Ambiance" ,"ambiance" , "dark"],
+ ["Chaos" ,"chaos" , "dark"],
+ ["Clouds Midnight" ,"clouds_midnight" , "dark"],
+ ["Cobalt" ,"cobalt" , "dark"],
+ ["idle Fingers" ,"idle_fingers" , "dark"],
+ ["krTheme" ,"kr_theme" , "dark"],
+ ["Merbivore" ,"merbivore" , "dark"],
+ ["Merbivore Soft" ,"merbivore_soft" , "dark"],
+ ["Mono Industrial" ,"mono_industrial" , "dark"],
+ ["Monokai" ,"monokai" , "dark"],
+ ["Pastel on dark" ,"pastel_on_dark" , "dark"],
+ ["Solarized Dark" ,"solarized_dark" , "dark"],
+ ["Terminal" ,"terminal" , "dark"],
+ ["Tomorrow Night" ,"tomorrow_night" , "dark"],
+ ["Tomorrow Night Blue" ,"tomorrow_night_blue" , "dark"],
+ ["Tomorrow Night Bright","tomorrow_night_bright" , "dark"],
+ ["Tomorrow Night 80s" ,"tomorrow_night_eighties" , "dark"],
+ ["Twilight" ,"twilight" , "dark"],
+ ["Vibrant Ink" ,"vibrant_ink" , "dark"]
+];
-module.exports.themesByName = {};
-module.exports.themes = module.exports.themes.map(function(name) {
- module.exports.themesByName[name] = new module.exports.ThemeDescription(name);
- return module.exports.themesByName[name];
+exports.themesByName = {};
+exports.themes = themeData.map(function(data) {
+ var name = data[1] || data[0].replace(/ /g, "_").toLowerCase();
+ var theme = {
+ caption: data[0],
+ theme: "ace/theme/" + name,
+ isDark: data[2] == "dark",
+ name: name
+ };
+ exports.themesByName[name] = theme;
+ return theme;
});
});
-
-ace.define('ace/ext/themelist_utils/themes', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-module.exports.themes = [
- "ambiance",
- "chaos",
- "chrome",
- "clouds",
- "clouds_midnight",
- "cobalt",
- "crimson_editor",
- "dawn",
- "dreamweaver",
- "eclipse",
- "github",
- "idle_fingers",
- "kr_theme",
- "merbivore",
- "merbivore_soft",
- "monokai",
- "mono_industrial",
- "pastel_on_dark",
- "solarized_dark",
- "solarized_light",
- "terminal",
- "textmate",
- "tomorrow",
- "tomorrow_night",
- "tomorrow_night_blue",
- "tomorrow_night_bright",
- "tomorrow_night_eighties",
- "twilight",
- "vibrant_ink",
- "xcode"
-];
-
-}); \ No newline at end of file
+ (function() {
+ ace.require(["ace/ext/themelist"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/ext-whitespace.js b/js/vendor/ace/src-noconflict/ext-whitespace.js
index 3ca9dae..45561ff 100644..100755
--- a/js/vendor/ace/src-noconflict/ext-whitespace.js
+++ b/js/vendor/ace/src-noconflict/ext-whitespace.js
@@ -1,35 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/ext/whitespace', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var lang = require("../lib/lang");
exports.$detectIndentation = function(lines, fallback) {
@@ -43,7 +13,6 @@ exports.$detectIndentation = function(lines, fallback) {
if (!/^\s*[^*+\-\s]/.test(line))
continue;
- var tabs = line.match(/^\t*/)[0].length;
if (line[0] == "\t")
tabIndents++;
@@ -56,10 +25,10 @@ exports.$detectIndentation = function(lines, fallback) {
stats[spaces] = (stats[spaces] || 0) + 1;
}
prevSpaces = spaces;
- while (line[line.length - 1] == "\\")
+ while (i < max && line[line.length - 1] == "\\")
line = lines[i++];
- };
-
+ }
+
function getScore(indent) {
var score = 0;
for (var i = indent; i < stats.length; i += indent)
@@ -72,15 +41,17 @@ exports.$detectIndentation = function(lines, fallback) {
var first = {score: 0, length: 0};
var spaceIndents = 0;
for (var i = 1; i < 12; i++) {
+ var score = getScore(i);
if (i == 1) {
- spaceIndents = getScore(i);
- var score = 1;
+ spaceIndents = score;
+ score = stats[1] ? 0.9 : 0.8;
+ if (!stats.length)
+ score = 0
} else
- var score = getScore(i) / spaceIndents;
+ score /= spaceIndents;
- if (changes[i]) {
+ if (changes[i])
score += changes[i] / changesTotal;
- }
if (score > first.score)
first = {score: score, length: i};
@@ -92,7 +63,7 @@ exports.$detectIndentation = function(lines, fallback) {
if (tabIndents > spaceIndents + 1)
return {ch: "\t", length: tabLength};
- if (spaceIndents + 1 > tabIndents)
+ if (spaceIndents > tabIndents + 1)
return {ch: " ", length: tabLength};
};
@@ -108,15 +79,17 @@ exports.detectIndentation = function(session) {
return indent;
};
-exports.trimTrailingSpace = function(session) {
+exports.trimTrailingSpace = function(session, trimEmpty) {
var doc = session.getDocument();
var lines = doc.getAllLines();
+
+ var min = trimEmpty ? -1 : 0;
for (var i = 0, l=lines.length; i < l; i++) {
var line = lines[i];
var index = line.search(/\s+$/);
- if (index !== -1)
+ if (index > min)
doc.removeInLine(i, index, line.length);
}
};
@@ -155,14 +128,14 @@ exports.convertIndentation = function(session, ch, len) {
};
exports.$parseStringArg = function(text) {
- var indent = {}
+ var indent = {};
if (/t/.test(text))
indent.ch = "\t";
else if (/s/.test(text))
indent.ch = " ";
var m = text.match(/\d+/);
if (m)
- indent.length = parseInt(m[0]);
+ indent.length = parseInt(m[0], 10);
return indent;
};
@@ -174,7 +147,7 @@ exports.$parseArg = function(arg) {
if (typeof arg.text == "string")
return exports.$parseStringArg(arg.text);
return arg;
-}
+};
exports.commands = [{
name: "detectIndentation",
@@ -190,7 +163,7 @@ exports.commands = [{
name: "convertIndentation",
exec: function(editor, arg) {
var indent = exports.$parseArg(arg);
- exports.convertIndentation(editor.session, arg.ch, arg.length);
+ exports.convertIndentation(editor.session, indent.ch, indent.length);
}
}, {
name: "setIndentation",
@@ -199,6 +172,10 @@ exports.commands = [{
indent.length && editor.session.setTabSize(indent.length);
indent.ch && editor.session.setUseSoftTabs(indent.ch == " ");
}
-}]
+}];
});
+ (function() {
+ ace.require(["ace/ext/whitespace"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/js/vendor/ace/src-noconflict/keybinding-emacs.js b/js/vendor/ace/src-noconflict/keybinding-emacs.js
index 5494e0f..78b533f 100644..100755
--- a/js/vendor/ace/src-noconflict/keybinding-emacs.js
+++ b/js/vendor/ace/src-noconflict/keybinding-emacs.js
@@ -1,35 +1,610 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/keyboard/emacs', ['require', 'exports', 'module' , 'ace/lib/dom', 'ace/incremental_search', 'ace/commands/incremental_search_commands', 'ace/keyboard/hash_handler', 'ace/lib/keys'], function(require, exports, module) {
+ace.define("ace/occur",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+var oop = require("./lib/oop");
+var Range = require("./range").Range;
+var Search = require("./search").Search;
+var EditSession = require("./edit_session").EditSession;
+var SearchHighlight = require("./search_highlight").SearchHighlight;
+function Occur() {}
+
+oop.inherits(Occur, Search);
+
+(function() {
+ this.enter = function(editor, options) {
+ if (!options.needle) return false;
+ var pos = editor.getCursorPosition();
+ this.displayOccurContent(editor, options);
+ var translatedPos = this.originalToOccurPosition(editor.session, pos);
+ editor.moveCursorToPosition(translatedPos);
+ return true;
+ }
+ this.exit = function(editor, options) {
+ var pos = options.translatePosition && editor.getCursorPosition();
+ var translatedPos = pos && this.occurToOriginalPosition(editor.session, pos);
+ this.displayOriginalContent(editor);
+ if (translatedPos)
+ editor.moveCursorToPosition(translatedPos);
+ return true;
+ }
+
+ this.highlight = function(sess, regexp) {
+ var hl = sess.$occurHighlight = sess.$occurHighlight || sess.addDynamicMarker(
+ new SearchHighlight(null, "ace_occur-highlight", "text"));
+ hl.setRegexp(regexp);
+ sess._emit("changeBackMarker"); // force highlight layer redraw
+ }
+
+ this.displayOccurContent = function(editor, options) {
+ this.$originalSession = editor.session;
+ var found = this.matchingLines(editor.session, options);
+ var lines = found.map(function(foundLine) { return foundLine.content; });
+ var occurSession = new EditSession(lines.join('\n'));
+ occurSession.$occur = this;
+ occurSession.$occurMatchingLines = found;
+ editor.setSession(occurSession);
+ this.$useEmacsStyleLineStart = this.$originalSession.$useEmacsStyleLineStart;
+ occurSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart;
+ this.highlight(occurSession, options.re);
+ occurSession._emit('changeBackMarker');
+ }
+
+ this.displayOriginalContent = function(editor) {
+ editor.setSession(this.$originalSession);
+ this.$originalSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart;
+ }
+ this.originalToOccurPosition = function(session, pos) {
+ var lines = session.$occurMatchingLines;
+ var nullPos = {row: 0, column: 0};
+ if (!lines) return nullPos;
+ for (var i = 0; i < lines.length; i++) {
+ if (lines[i].row === pos.row)
+ return {row: i, column: pos.column};
+ }
+ return nullPos;
+ }
+ this.occurToOriginalPosition = function(session, pos) {
+ var lines = session.$occurMatchingLines;
+ if (!lines || !lines[pos.row])
+ return pos;
+ return {row: lines[pos.row].row, column: pos.column};
+ }
+
+ this.matchingLines = function(session, options) {
+ options = oop.mixin({}, options);
+ if (!session || !options.needle) return [];
+ var search = new Search();
+ search.set(options);
+ return search.findAll(session).reduce(function(lines, range) {
+ var row = range.start.row;
+ var last = lines[lines.length-1];
+ return last && last.row === row ?
+ lines :
+ lines.concat({row: row, content: session.getLine(row)});
+ }, []);
+ }
+
+}).call(Occur.prototype);
+
+var dom = require('./lib/dom');
+dom.importCssString(".ace_occur-highlight {\n\
+ border-radius: 4px;\n\
+ background-color: rgba(87, 255, 8, 0.25);\n\
+ position: absolute;\n\
+ z-index: 4;\n\
+ -moz-box-sizing: border-box;\n\
+ -webkit-box-sizing: border-box;\n\
+ box-sizing: border-box;\n\
+ box-shadow: 0 0 4px rgb(91, 255, 50);\n\
+}\n\
+.ace_dark .ace_occur-highlight {\n\
+ background-color: rgb(80, 140, 85);\n\
+ box-shadow: 0 0 4px rgb(60, 120, 70);\n\
+}\n", "incremental-occur-highlighting");
+
+exports.Occur = Occur;
+
+});
+
+ace.define("ace/commands/occur_commands",["require","exports","module","ace/config","ace/occur","ace/keyboard/hash_handler","ace/lib/oop"], function(require, exports, module) {
+
+var config = require("../config"),
+ Occur = require("../occur").Occur;
+var occurStartCommand = {
+ name: "occur",
+ exec: function(editor, options) {
+ var alreadyInOccur = !!editor.session.$occur;
+ var occurSessionActive = new Occur().enter(editor, options);
+ if (occurSessionActive && !alreadyInOccur)
+ OccurKeyboardHandler.installIn(editor);
+ },
+ readOnly: true
+};
+
+var occurCommands = [{
+ name: "occurexit",
+ bindKey: 'esc|Ctrl-G',
+ exec: function(editor) {
+ var occur = editor.session.$occur;
+ if (!occur) return;
+ occur.exit(editor, {});
+ if (!editor.session.$occur) OccurKeyboardHandler.uninstallFrom(editor);
+ },
+ readOnly: true
+}, {
+ name: "occuraccept",
+ bindKey: 'enter',
+ exec: function(editor) {
+ var occur = editor.session.$occur;
+ if (!occur) return;
+ occur.exit(editor, {translatePosition: true});
+ if (!editor.session.$occur) OccurKeyboardHandler.uninstallFrom(editor);
+ },
+ readOnly: true
+}];
+
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+var oop = require("../lib/oop");
+
+
+function OccurKeyboardHandler() {}
+
+oop.inherits(OccurKeyboardHandler, HashHandler);
+
+;(function() {
+
+ this.isOccurHandler = true;
+
+ this.attach = function(editor) {
+ HashHandler.call(this, occurCommands, editor.commands.platform);
+ this.$editor = editor;
+ }
+
+ var handleKeyboard$super = this.handleKeyboard;
+ this.handleKeyboard = function(data, hashId, key, keyCode) {
+ var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode);
+ return (cmd && cmd.command) ? cmd : undefined;
+ }
+
+}).call(OccurKeyboardHandler.prototype);
+
+OccurKeyboardHandler.installIn = function(editor) {
+ var handler = new this();
+ editor.keyBinding.addKeyboardHandler(handler);
+ editor.commands.addCommands(occurCommands);
+}
+
+OccurKeyboardHandler.uninstallFrom = function(editor) {
+ editor.commands.removeCommands(occurCommands);
+ var handler = editor.getKeyboardHandler();
+ if (handler.isOccurHandler)
+ editor.keyBinding.removeKeyboardHandler(handler);
+}
+
+exports.occurStartCommand = occurStartCommand;
+
+});
+
+ace.define("ace/commands/incremental_search_commands",["require","exports","module","ace/config","ace/lib/oop","ace/keyboard/hash_handler","ace/commands/occur_commands"], function(require, exports, module) {
+
+var config = require("../config");
+var oop = require("../lib/oop");
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+var occurStartCommand = require("./occur_commands").occurStartCommand;
+exports.iSearchStartCommands = [{
+ name: "iSearch",
+ bindKey: {win: "Ctrl-F", mac: "Command-F"},
+ exec: function(editor, options) {
+ config.loadModule(["core", "ace/incremental_search"], function(e) {
+ var iSearch = e.iSearch = e.iSearch || new e.IncrementalSearch();
+ iSearch.activate(editor, options.backwards);
+ if (options.jumpToFirstMatch) iSearch.next(options);
+ });
+ },
+ readOnly: true
+}, {
+ name: "iSearchBackwards",
+ exec: function(editor, jumpToNext) { editor.execCommand('iSearch', {backwards: true}); },
+ readOnly: true
+}, {
+ name: "iSearchAndGo",
+ bindKey: {win: "Ctrl-K", mac: "Command-G"},
+ exec: function(editor, jumpToNext) { editor.execCommand('iSearch', {jumpToFirstMatch: true, useCurrentOrPrevSearch: true}); },
+ readOnly: true
+}, {
+ name: "iSearchBackwardsAndGo",
+ bindKey: {win: "Ctrl-Shift-K", mac: "Command-Shift-G"},
+ exec: function(editor) { editor.execCommand('iSearch', {jumpToFirstMatch: true, backwards: true, useCurrentOrPrevSearch: true}); },
+ readOnly: true
+}];
+exports.iSearchCommands = [{
+ name: "restartSearch",
+ bindKey: {win: "Ctrl-F", mac: "Command-F"},
+ exec: function(iSearch) {
+ iSearch.cancelSearch(true);
+ }
+}, {
+ name: "searchForward",
+ bindKey: {win: "Ctrl-S|Ctrl-K", mac: "Ctrl-S|Command-G"},
+ exec: function(iSearch, options) {
+ options.useCurrentOrPrevSearch = true;
+ iSearch.next(options);
+ }
+}, {
+ name: "searchBackward",
+ bindKey: {win: "Ctrl-R|Ctrl-Shift-K", mac: "Ctrl-R|Command-Shift-G"},
+ exec: function(iSearch, options) {
+ options.useCurrentOrPrevSearch = true;
+ options.backwards = true;
+ iSearch.next(options);
+ }
+}, {
+ name: "extendSearchTerm",
+ exec: function(iSearch, string) {
+ iSearch.addString(string);
+ }
+}, {
+ name: "extendSearchTermSpace",
+ bindKey: "space",
+ exec: function(iSearch) { iSearch.addString(' '); }
+}, {
+ name: "shrinkSearchTerm",
+ bindKey: "backspace",
+ exec: function(iSearch) {
+ iSearch.removeChar();
+ }
+}, {
+ name: 'confirmSearch',
+ bindKey: 'return',
+ exec: function(iSearch) { iSearch.deactivate(); }
+}, {
+ name: 'cancelSearch',
+ bindKey: 'esc|Ctrl-G',
+ exec: function(iSearch) { iSearch.deactivate(true); }
+}, {
+ name: 'occurisearch',
+ bindKey: 'Ctrl-O',
+ exec: function(iSearch) {
+ var options = oop.mixin({}, iSearch.$options);
+ iSearch.deactivate();
+ occurStartCommand.exec(iSearch.$editor, options);
+ }
+}, {
+ name: "yankNextWord",
+ bindKey: "Ctrl-w",
+ exec: function(iSearch) {
+ var ed = iSearch.$editor,
+ range = ed.selection.getRangeOfMovements(function(sel) { sel.moveCursorWordRight(); }),
+ string = ed.session.getTextRange(range);
+ iSearch.addString(string);
+ }
+}, {
+ name: "yankNextChar",
+ bindKey: "Ctrl-Alt-y",
+ exec: function(iSearch) {
+ var ed = iSearch.$editor,
+ range = ed.selection.getRangeOfMovements(function(sel) { sel.moveCursorRight(); }),
+ string = ed.session.getTextRange(range);
+ iSearch.addString(string);
+ }
+}, {
+ name: 'recenterTopBottom',
+ bindKey: 'Ctrl-l',
+ exec: function(iSearch) { iSearch.$editor.execCommand('recenterTopBottom'); }
+}, {
+ name: 'selectAllMatches',
+ bindKey: 'Ctrl-space',
+ exec: function(iSearch) {
+ var ed = iSearch.$editor,
+ hl = ed.session.$isearchHighlight,
+ ranges = hl && hl.cache ? hl.cache
+ .reduce(function(ranges, ea) {
+ return ranges.concat(ea ? ea : []); }, []) : [];
+ iSearch.deactivate(false);
+ ranges.forEach(ed.selection.addRange.bind(ed.selection));
+ }
+}, {
+ name: 'searchAsRegExp',
+ bindKey: 'Alt-r',
+ exec: function(iSearch) {
+ iSearch.convertNeedleToRegExp();
+ }
+}].map(function(cmd) {
+ cmd.readOnly = true;
+ cmd.isIncrementalSearchCommand = true;
+ cmd.scrollIntoView = "animate-cursor";
+ return cmd;
+});
+
+function IncrementalSearchKeyboardHandler(iSearch) {
+ this.$iSearch = iSearch;
+}
+
+oop.inherits(IncrementalSearchKeyboardHandler, HashHandler);
+
+(function() {
+
+ this.attach = function(editor) {
+ var iSearch = this.$iSearch;
+ HashHandler.call(this, exports.iSearchCommands, editor.commands.platform);
+ this.$commandExecHandler = editor.commands.addEventListener('exec', function(e) {
+ if (!e.command.isIncrementalSearchCommand) return undefined;
+ e.stopPropagation();
+ e.preventDefault();
+ var scrollTop = editor.session.getScrollTop();
+ var result = e.command.exec(iSearch, e.args || {});
+ editor.renderer.scrollCursorIntoView(null, 0.5);
+ editor.renderer.animateScrolling(scrollTop);
+ return result;
+ });
+ };
+
+ this.detach = function(editor) {
+ if (!this.$commandExecHandler) return;
+ editor.commands.removeEventListener('exec', this.$commandExecHandler);
+ delete this.$commandExecHandler;
+ };
+
+ var handleKeyboard$super = this.handleKeyboard;
+ this.handleKeyboard = function(data, hashId, key, keyCode) {
+ if (((hashId === 1/*ctrl*/ || hashId === 8/*command*/) && key === 'v')
+ || (hashId === 1/*ctrl*/ && key === 'y')) return null;
+ var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode);
+ if (cmd.command) { return cmd; }
+ if (hashId == -1) {
+ var extendCmd = this.commands.extendSearchTerm;
+ if (extendCmd) { return {command: extendCmd, args: key}; }
+ }
+ return {command: "null", passEvent: hashId == 0 || hashId == 4};
+ };
+
+}).call(IncrementalSearchKeyboardHandler.prototype);
+
+
+exports.IncrementalSearchKeyboardHandler = IncrementalSearchKeyboardHandler;
+
+});
+
+ace.define("ace/incremental_search",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/search_highlight","ace/commands/incremental_search_commands","ace/lib/dom","ace/commands/command_manager","ace/editor","ace/config"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var Range = require("./range").Range;
+var Search = require("./search").Search;
+var SearchHighlight = require("./search_highlight").SearchHighlight;
+var iSearchCommandModule = require("./commands/incremental_search_commands");
+var ISearchKbd = iSearchCommandModule.IncrementalSearchKeyboardHandler;
+function IncrementalSearch() {
+ this.$options = {wrap: false, skipCurrent: false};
+ this.$keyboardHandler = new ISearchKbd(this);
+}
+
+oop.inherits(IncrementalSearch, Search);
+
+function isRegExp(obj) {
+ return obj instanceof RegExp;
+}
+
+function regExpToObject(re) {
+ var string = String(re),
+ start = string.indexOf('/'),
+ flagStart = string.lastIndexOf('/');
+ return {
+ expression: string.slice(start+1, flagStart),
+ flags: string.slice(flagStart+1)
+ }
+}
+
+function stringToRegExp(string, flags) {
+ try {
+ return new RegExp(string, flags);
+ } catch (e) { return string; }
+}
+
+function objectToRegExp(obj) {
+ return stringToRegExp(obj.expression, obj.flags);
+}
+
+;(function() {
+
+ this.activate = function(ed, backwards) {
+ this.$editor = ed;
+ this.$startPos = this.$currentPos = ed.getCursorPosition();
+ this.$options.needle = '';
+ this.$options.backwards = backwards;
+ ed.keyBinding.addKeyboardHandler(this.$keyboardHandler);
+ this.$originalEditorOnPaste = ed.onPaste; ed.onPaste = this.onPaste.bind(this);
+ this.$mousedownHandler = ed.addEventListener('mousedown', this.onMouseDown.bind(this));
+ this.selectionFix(ed);
+ this.statusMessage(true);
+ };
+
+ this.deactivate = function(reset) {
+ this.cancelSearch(reset);
+ var ed = this.$editor;
+ ed.keyBinding.removeKeyboardHandler(this.$keyboardHandler);
+ if (this.$mousedownHandler) {
+ ed.removeEventListener('mousedown', this.$mousedownHandler);
+ delete this.$mousedownHandler;
+ }
+ ed.onPaste = this.$originalEditorOnPaste;
+ this.message('');
+ };
+
+ this.selectionFix = function(editor) {
+ if (editor.selection.isEmpty() && !editor.session.$emacsMark) {
+ editor.clearSelection();
+ }
+ };
+
+ this.highlight = function(regexp) {
+ var sess = this.$editor.session,
+ hl = sess.$isearchHighlight = sess.$isearchHighlight || sess.addDynamicMarker(
+ new SearchHighlight(null, "ace_isearch-result", "text"));
+ hl.setRegexp(regexp);
+ sess._emit("changeBackMarker"); // force highlight layer redraw
+ };
+
+ this.cancelSearch = function(reset) {
+ var e = this.$editor;
+ this.$prevNeedle = this.$options.needle;
+ this.$options.needle = '';
+ if (reset) {
+ e.moveCursorToPosition(this.$startPos);
+ this.$currentPos = this.$startPos;
+ } else {
+ e.pushEmacsMark && e.pushEmacsMark(this.$startPos, false);
+ }
+ this.highlight(null);
+ return Range.fromPoints(this.$currentPos, this.$currentPos);
+ };
+
+ this.highlightAndFindWithNeedle = function(moveToNext, needleUpdateFunc) {
+ if (!this.$editor) return null;
+ var options = this.$options;
+ if (needleUpdateFunc) {
+ options.needle = needleUpdateFunc.call(this, options.needle || '') || '';
+ }
+ if (options.needle.length === 0) {
+ this.statusMessage(true);
+ return this.cancelSearch(true);
+ }
+ options.start = this.$currentPos;
+ var session = this.$editor.session,
+ found = this.find(session),
+ shouldSelect = this.$editor.emacsMark ?
+ !!this.$editor.emacsMark() : !this.$editor.selection.isEmpty();
+ if (found) {
+ if (options.backwards) found = Range.fromPoints(found.end, found.start);
+ this.$editor.selection.setRange(Range.fromPoints(shouldSelect ? this.$startPos : found.end, found.end));
+ if (moveToNext) this.$currentPos = found.end;
+ this.highlight(options.re);
+ }
+
+ this.statusMessage(found);
+
+ return found;
+ };
+
+ this.addString = function(s) {
+ return this.highlightAndFindWithNeedle(false, function(needle) {
+ if (!isRegExp(needle))
+ return needle + s;
+ var reObj = regExpToObject(needle);
+ reObj.expression += s;
+ return objectToRegExp(reObj);
+ });
+ };
+
+ this.removeChar = function(c) {
+ return this.highlightAndFindWithNeedle(false, function(needle) {
+ if (!isRegExp(needle))
+ return needle.substring(0, needle.length-1);
+ var reObj = regExpToObject(needle);
+ reObj.expression = reObj.expression.substring(0, reObj.expression.length-1);
+ return objectToRegExp(reObj);
+ });
+ };
+
+ this.next = function(options) {
+ options = options || {};
+ this.$options.backwards = !!options.backwards;
+ this.$currentPos = this.$editor.getCursorPosition();
+ return this.highlightAndFindWithNeedle(true, function(needle) {
+ return options.useCurrentOrPrevSearch && needle.length === 0 ?
+ this.$prevNeedle || '' : needle;
+ });
+ };
+
+ this.onMouseDown = function(evt) {
+ this.deactivate();
+ return true;
+ };
+
+ this.onPaste = function(text) {
+ this.addString(text);
+ };
+
+ this.convertNeedleToRegExp = function() {
+ return this.highlightAndFindWithNeedle(false, function(needle) {
+ return isRegExp(needle) ? needle : stringToRegExp(needle, 'ig');
+ });
+ };
+
+ this.convertNeedleToString = function() {
+ return this.highlightAndFindWithNeedle(false, function(needle) {
+ return isRegExp(needle) ? regExpToObject(needle).expression : needle;
+ });
+ };
+
+ this.statusMessage = function(found) {
+ var options = this.$options, msg = '';
+ msg += options.backwards ? 'reverse-' : '';
+ msg += 'isearch: ' + options.needle;
+ msg += found ? '' : ' (not found)';
+ this.message(msg);
+ };
+
+ this.message = function(msg) {
+ if (this.$editor.showCommandLine) {
+ this.$editor.showCommandLine(msg);
+ this.$editor.focus();
+ } else {
+ console.log(msg);
+ }
+ };
+
+}).call(IncrementalSearch.prototype);
+
+
+exports.IncrementalSearch = IncrementalSearch;
+
+var dom = require('./lib/dom');
+dom.importCssString && dom.importCssString("\
+.ace_marker-layer .ace_isearch-result {\
+ position: absolute;\
+ z-index: 6;\
+ -moz-box-sizing: border-box;\
+ -webkit-box-sizing: border-box;\
+ box-sizing: border-box;\
+}\
+div.ace_isearch-result {\
+ border-radius: 4px;\
+ background-color: rgba(255, 200, 0, 0.5);\
+ box-shadow: 0 0 4px rgb(255, 200, 0);\
+}\
+.ace_dark div.ace_isearch-result {\
+ background-color: rgb(100, 110, 160);\
+ box-shadow: 0 0 4px rgb(80, 90, 140);\
+}", "incremental-search-highlighting");
+var commands = require("./commands/command_manager");
+(function() {
+ this.setupIncrementalSearch = function(editor, val) {
+ if (this.usesIncrementalSearch == val) return;
+ this.usesIncrementalSearch = val;
+ var iSearchCommands = iSearchCommandModule.iSearchStartCommands;
+ var method = val ? 'addCommands' : 'removeCommands';
+ this[method](iSearchCommands);
+ };
+}).call(commands.CommandManager.prototype);
+var Editor = require("./editor").Editor;
+require("./config").defineOptions(Editor.prototype, "editor", {
+ useIncrementalSearch: {
+ set: function(val) {
+ this.keyBinding.$handlers.forEach(function(handler) {
+ if (handler.setupIncrementalSearch) {
+ handler.setupIncrementalSearch(this, val);
+ }
+ });
+ this._emit('incrementalSearchSettingChanged', {isEnabled: val});
+ }
+ }
+});
+
+});
+
+ace.define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) {
+"use strict";
var dom = require("../lib/dom");
require("../incremental_search");
@@ -64,14 +639,14 @@ exports.handler.attach = function(editor) {
initialized = true;
dom.importCssString('\
.emacs-mode .ace_cursor{\
- border: 2px rgba(50,250,50,0.8) solid!important;\
+ border: 1px rgba(50,250,50,0.8) solid!important;\
-moz-box-sizing: border-box!important;\
-webkit-box-sizing: border-box!important;\
box-sizing: border-box!important;\
background-color: rgba(0,250,0,0.9);\
opacity: 0.5;\
}\
- .emacs-mode .ace_cursor.ace_hidden{\
+ .emacs-mode .ace_hidden-cursors .ace_cursor{\
opacity: 1;\
background-color: transparent;\
}\
@@ -98,28 +673,44 @@ exports.handler.attach = function(editor) {
editor.emacsMark = function() {
return this.session.$emacsMark;
- }
+ };
editor.setEmacsMark = function(p) {
this.session.$emacsMark = p;
- }
+ };
editor.pushEmacsMark = function(p, activate) {
var prevMark = this.session.$emacsMark;
if (prevMark)
this.session.$emacsMarkRing.push(prevMark);
- if (!p || activate) this.setEmacsMark(p)
+ if (!p || activate) this.setEmacsMark(p);
else this.session.$emacsMarkRing.push(p);
- }
+ };
editor.popEmacsMark = function() {
var mark = this.emacsMark();
if (mark) { this.setEmacsMark(null); return mark; }
return this.session.$emacsMarkRing.pop();
- }
+ };
editor.getLastEmacsMark = function(p) {
return this.session.$emacsMark || this.session.$emacsMarkRing.slice(-1)[0];
+ };
+
+ editor.emacsMarkForSelection = function(replacement) {
+ var sel = this.selection,
+ multiRangeLength = this.multiSelect ?
+ this.multiSelect.getAllRanges().length : 1,
+ selIndex = sel.index || 0,
+ markRing = this.session.$emacsMarkRing,
+ markIndex = markRing.length - (multiRangeLength - selIndex),
+ lastMark = markRing[markIndex] || sel.anchor;
+ if (replacement) {
+ markRing.splice(markIndex, 1,
+ "row" in replacement && "column" in replacement ?
+ replacement : undefined);
+ }
+ return lastMark;
}
editor.on("click", $resetMarkMode);
@@ -143,6 +734,7 @@ exports.handler.detach = function(editor) {
editor.commands.removeCommands(commands);
editor.removeEventListener('copy', this.onCopy);
editor.removeEventListener('paste', this.onPaste);
+ editor.$emacsModeHandler = null;
};
var $kbSessionChange = function(e) {
@@ -160,15 +752,15 @@ var $kbSessionChange = function(e) {
e.session.$emacsMark = null;
if (!e.session.hasOwnProperty('$emacsMarkRing'))
e.session.$emacsMarkRing = [];
-}
+};
var $resetMarkMode = function(e) {
e.editor.session.$emacsMark = null;
-}
+};
-var keys = require("../lib/keys").KEY_MODS,
- eMods = {C: "ctrl", S: "shift", M: "alt", CMD: "command"},
- combinations = ["C-S-M-CMD",
+var keys = require("../lib/keys").KEY_MODS;
+var eMods = {C: "ctrl", S: "shift", M: "alt", CMD: "command"};
+var combinations = ["C-S-M-CMD",
"S-M-CMD", "C-M-CMD", "C-S-CMD", "C-S-M",
"M-CMD", "S-CMD", "S-M", "C-CMD", "C-M", "C-S",
"CMD", "M", "S", "C"];
@@ -184,18 +776,20 @@ exports.handler.onCopy = function(e, editor) {
if (editor.$handlesEmacsOnCopy) return;
editor.$handlesEmacsOnCopy = true;
exports.handler.commands.killRingSave.exec(editor);
- delete editor.$handlesEmacsOnCopy;
-}
+ editor.$handlesEmacsOnCopy = false;
+};
exports.handler.onPaste = function(e, editor) {
editor.pushEmacsMark(editor.getCursorPosition());
-}
+};
exports.handler.bindKey = function(key, command) {
+ if (typeof key == "object")
+ key = key[this.platform];
if (!key)
return;
- var ckb = this.commmandKeyBinding;
+ var ckb = this.commandKeyBinding;
key.split("|").forEach(function(keyPart) {
keyPart = keyPart.toLowerCase();
ckb[keyPart] = command;
@@ -207,42 +801,49 @@ exports.handler.bindKey = function(key, command) {
if (!ckb[keyPart]) ckb[keyPart] = "null";
});
}, this);
-}
+};
+
+exports.handler.getStatusText = function(editor, data) {
+ var str = "";
+ if (data.count)
+ str += data.count;
+ if (data.keyChain)
+ str += " " + data.keyChain
+ return str;
+};
exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
+ if (keyCode === -1) return undefined;
+
var editor = data.editor;
+ editor._signal("changeStatus");
if (hashId == -1) {
editor.pushEmacsMark();
if (data.count) {
- var str = Array(data.count + 1).join(key);
+ var str = new Array(data.count + 1).join(key);
data.count = null;
return {command: "insertstring", args: str};
}
}
- if (key == "\x00") return undefined;
-
var modifier = eMods[hashId];
- if (modifier == "c-" || data.universalArgument) {
- var prevCount = String(data.count || 0);
+ if (modifier == "c-" || data.count) {
var count = parseInt(key[key.length - 1]);
if (typeof count === 'number' && !isNaN(count)) {
- data.count = parseInt(prevCount + count);
+ data.count = Math.max(data.count, 0) || 0;
+ data.count = 10 * data.count + count;
return {command: "null"};
- } else if (data.universalArgument) {
- data.count = 4;
}
}
- data.universalArgument = false;
if (modifier) key = modifier + key;
if (data.keyChain) key = data.keyChain += " " + key;
- var command = this.commmandKeyBinding[key];
+ var command = this.commandKeyBinding[key];
data.keyChain = command == "null" ? key : "";
if (!command) return undefined;
if (command === "null") return {command: "null"};
if (command === "universalArgument") {
- data.universalArgument = true;
+ data.count = -4;
return {command: "null"};
}
var args;
@@ -265,9 +866,12 @@ exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
if (!command) return undefined;
}
- if (!command.readonly && !command.isYank)
+ if (!command.readOnly && !command.isYank)
data.lastCommand = null;
+ if (!command.readOnly && editor.emacsMark())
+ editor.setEmacsMark(null)
+
if (data.count) {
var count = data.count;
data.count = 0;
@@ -278,11 +882,12 @@ exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
exec: function(editor, args) {
for (var i = 0; i < count; i++)
command.exec(editor, args);
- }
+ },
+ multiSelectAction: command.multiSelectAction
}
};
} else {
- if (!args) args = {}
+ if (!args) args = {};
if (typeof args === 'object') args.count = count;
}
}
@@ -342,7 +947,7 @@ exports.emacsKeys = {
"M-y": "yankRotate",
"C-g": "keyboardQuit",
- "C-w": "killRegion",
+ "C-w|C-S-W": "killRegion",
"M-w": "killRingSave",
"C-Space": "setMark",
"C-x C-x": "exchangePointAndMark",
@@ -356,7 +961,7 @@ exports.emacsKeys = {
"M-;": "togglecomment",
"C-/|C-x u|S-C--|C-z": "undo",
- "S-C-/|S-C-x u|C--|S-C-z": "redo", //infinite undo?
+ "S-C-/|S-C-x u|C--|S-C-z": "redo", // infinite undo?
"C-x r": "selectRectangularRegion",
"M-x": {command: "focusCommandLine", args: "M-x "}
};
@@ -384,55 +989,58 @@ exports.handler.addCommands({
},
setMark: {
exec: function(editor, args) {
+
if (args && args.count) {
- var mark = editor.popEmacsMark();
- mark && editor.selection.moveCursorToPosition(mark);
+ if (editor.inMultiSelectMode) editor.forEachSelection(moveToMark);
+ else moveToMark();
+ moveToMark();
return;
}
var mark = editor.emacsMark(),
- transientMarkModeActive = true;
- if (transientMarkModeActive && (mark || !editor.selection.isEmpty())) {
- editor.pushEmacsMark();
- editor.clearSelection();
+ ranges = editor.selection.getAllRanges(),
+ rangePositions = ranges.map(function(r) { return {row: r.start.row, column: r.start.column}; }),
+ transientMarkModeActive = true,
+ hasNoSelection = ranges.every(function(range) { return range.isEmpty(); });
+ if (transientMarkModeActive && (mark || !hasNoSelection)) {
+ if (editor.inMultiSelectMode) editor.forEachSelection({exec: editor.clearSelection.bind(editor)});
+ else editor.clearSelection();
+ if (mark) editor.pushEmacsMark(null);
return;
}
- if (mark) {
- var cp = editor.getCursorPosition();
- if (editor.selection.isEmpty() &&
- mark.row == cp.row && mark.column == cp.column) {
- editor.pushEmacsMark();
- return;
- }
+ if (!mark) {
+ rangePositions.forEach(function(pos) { editor.pushEmacsMark(pos); });
+ editor.setEmacsMark(rangePositions[rangePositions.length-1]);
+ return;
+ }
+
+ function moveToMark() {
+ var mark = editor.popEmacsMark();
+ mark && editor.moveCursorToPosition(mark);
}
- mark = editor.getCursorPosition();
- editor.setEmacsMark(mark);
- editor.selection.setSelectionAnchor(mark.row, mark.column);
+
},
- readonly: true,
- handlesCount: true,
- multiSelectAction: "forEach"
+ readOnly: true,
+ handlesCount: true
},
exchangePointAndMark: {
- exec: function(editor, args) {
+ exec: function exchangePointAndMark$exec(editor, args) {
var sel = editor.selection;
- if (args.count) {
- var pos = editor.getCursorPosition();
- sel.clearSelection();
- sel.moveCursorToPosition(editor.popEmacsMark());
- editor.pushEmacsMark(pos);
+ if (!args.count && !sel.isEmpty()) { // just invert selection
+ sel.setSelectionRange(sel.getRange(), !sel.isBackwards());
return;
}
- var lastMark = editor.getLastEmacsMark();
- var range = sel.getRange();
- if (range.isEmpty()) {
- sel.selectToPosition(lastMark);
- return;
+
+ if (args.count) { // replace mark and point
+ var pos = {row: sel.lead.row, column: sel.lead.column};
+ sel.clearSelection();
+ sel.moveCursorToPosition(editor.emacsMarkForSelection(pos));
+ } else { // create selection to last mark
+ sel.selectToPosition(editor.emacsMarkForSelection());
}
- sel.setSelectionRange(range, !sel.isBackwards());
},
- readonly: true,
+ readOnly: true,
handlesCount: true,
multiSelectAction: "forEach"
},
@@ -456,8 +1064,8 @@ exports.handler.addCommands({
killLine: function(editor) {
editor.pushEmacsMark(null);
var pos = editor.getCursorPosition();
- if (pos.column == 0 &&
- editor.session.doc.getLine(pos.row).length == 0) {
+ if (pos.column === 0 &&
+ editor.session.doc.getLine(pos.row).length === 0) {
editor.selection.selectLine();
} else {
editor.clearSelection();
@@ -478,6 +1086,7 @@ exports.handler.addCommands({
if (editor.keyBinding.$data.lastCommand != "yank")
return;
editor.undo();
+ editor.session.$emacsMarkRing.pop(); // also undo recording mark
editor.onPaste(exports.killRing.rotate());
editor.keyBinding.$data.lastCommand = "yank";
},
@@ -486,24 +1095,36 @@ exports.handler.addCommands({
exports.killRing.add(editor.getCopyText());
editor.commands.byName.cut.exec(editor);
},
- readonly: true,
+ readOnly: true,
multiSelectAction: "forEach"
},
killRingSave: {
exec: function(editor) {
+
+ editor.$handlesEmacsOnCopy = true;
+ var marks = editor.session.$emacsMarkRing.slice(),
+ deselectedMarks = [];
exports.killRing.add(editor.getCopyText());
+
setTimeout(function() {
- var sel = editor.selection,
- range = sel.getRange();
- editor.pushEmacsMark(sel.isBackwards() ? range.end : range.start);
- sel.clearSelection();
+ function deselect() {
+ var sel = editor.selection, range = sel.getRange(),
+ pos = sel.isBackwards() ? range.end : range.start;
+ deselectedMarks.push({row: pos.row, column: pos.column});
+ sel.clearSelection();
+ }
+ editor.$handlesEmacsOnCopy = false;
+ if (editor.inMultiSelectMode) editor.forEachSelection({exec: deselect});
+ else deselect();
+ editor.session.$emacsMarkRing = marks.concat(deselectedMarks.reverse());
}, 0);
},
- readonly: true
+ readOnly: true
},
keyboardQuit: function(editor) {
editor.selection.clearSelection();
editor.setEmacsMark(null);
+ editor.keyBinding.$data.count = null;
},
focusCommandLine: function(editor, arg) {
if (editor.showCommandLine)
@@ -540,519 +1161,3 @@ exports.killRing = {
};
});
-
-ace.define('ace/incremental_search', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/search', 'ace/search_highlight', 'ace/commands/incremental_search_commands', 'ace/lib/dom', 'ace/commands/command_manager', 'ace/editor', 'ace/config'], function(require, exports, module) {
-
-
-var oop = require("./lib/oop");
-var Range = require("./range").Range;
-var Search = require("./search").Search;
-var SearchHighlight = require("./search_highlight").SearchHighlight;
-var iSearchCommandModule = require("./commands/incremental_search_commands");
-var ISearchKbd = iSearchCommandModule.IncrementalSearchKeyboardHandler;
-function IncrementalSearch() {
- this.$options = {wrap: false, skipCurrent: false};
- this.$keyboardHandler = new ISearchKbd(this);
-}
-
-oop.inherits(IncrementalSearch, Search);
-
-;(function() {
-
- this.activate = function(ed, backwards) {
- this.$editor = ed;
- this.$startPos = this.$currentPos = ed.getCursorPosition();
- this.$options.needle = '';
- this.$options.backwards = backwards;
- ed.keyBinding.addKeyboardHandler(this.$keyboardHandler);
- this.$mousedownHandler = ed.addEventListener('mousedown', this.onMouseDown.bind(this));
- this.selectionFix(ed);
- this.statusMessage(true);
- }
-
- this.deactivate = function(reset) {
- this.cancelSearch(reset);
- this.$editor.keyBinding.removeKeyboardHandler(this.$keyboardHandler);
- if (this.$mousedownHandler) {
- this.$editor.removeEventListener('mousedown', this.$mousedownHandler);
- delete this.$mousedownHandler;
- }
- this.message('');
- }
-
- this.selectionFix = function(editor) {
- if (editor.selection.isEmpty() && !editor.session.$emacsMark) {
- editor.clearSelection();
- }
- }
-
- this.highlight = function(regexp) {
- var sess = this.$editor.session,
- hl = sess.$isearchHighlight = sess.$isearchHighlight || sess.addDynamicMarker(
- new SearchHighlight(null, "ace_isearch-result", "text"));
- hl.setRegexp(regexp);
- sess._emit("changeBackMarker"); // force highlight layer redraw
- }
-
- this.cancelSearch = function(reset) {
- var e = this.$editor;
- this.$prevNeedle = this.$options.needle;
- this.$options.needle = '';
- if (reset) {
- e.moveCursorToPosition(this.$startPos);
- this.$currentPos = this.$startPos;
- } else {
- e.pushEmacsMark && e.pushEmacsMark(this.$startPos, false);
- }
- this.highlight(null);
- return Range.fromPoints(this.$currentPos, this.$currentPos);
- }
-
- this.highlightAndFindWithNeedle = function(moveToNext, needleUpdateFunc) {
- if (!this.$editor) return null;
- var options = this.$options;
- if (needleUpdateFunc) {
- options.needle = needleUpdateFunc.call(this, options.needle || '') || '';
- }
- if (options.needle.length === 0) {
- this.statusMessage(true);
- return this.cancelSearch(true);
- };
- options.start = this.$currentPos;
- var session = this.$editor.session,
- found = this.find(session);
- if (found) {
- if (options.backwards) found = Range.fromPoints(found.end, found.start);
- this.$editor.moveCursorToPosition(found.end);
- if (moveToNext) this.$currentPos = found.end;
- this.highlight(options.re)
- }
-
- this.statusMessage(found);
-
- return found;
- }
-
- this.addChar = function(c) {
- return this.highlightAndFindWithNeedle(false, function(needle) {
- return needle + c;
- });
- }
-
- this.removeChar = function(c) {
- return this.highlightAndFindWithNeedle(false, function(needle) {
- return needle.length > 0 ? needle.substring(0, needle.length-1) : needle;
- });
- }
-
- this.next = function(options) {
- options = options || {};
- this.$options.backwards = !!options.backwards;
- this.$currentPos = this.$editor.getCursorPosition();
- return this.highlightAndFindWithNeedle(true, function(needle) {
- return options.useCurrentOrPrevSearch && needle.length === 0 ?
- this.$prevNeedle || '' : needle;
- });
- }
-
- this.onMouseDown = function(evt) {
- this.deactivate();
- return true;
- }
-
- this.statusMessage = function(found) {
- var options = this.$options, msg = '';
- msg += options.backwards ? 'reverse-' : '';
- msg += 'isearch: ' + options.needle;
- msg += found ? '' : ' (not found)';
- this.message(msg);
- }
-
- this.message = function(msg) {
- if (this.$editor.showCommandLine) {
- this.$editor.showCommandLine(msg);
- this.$editor.focus();
- } else {
- console.log(msg);
- }
- }
-
-}).call(IncrementalSearch.prototype);
-
-
-exports.IncrementalSearch = IncrementalSearch;
-
-var dom = require('./lib/dom');
-dom.importCssString && dom.importCssString("\
-.ace_marker-layer .ace_isearch-result {\
- position: absolute;\
- z-index: 6;\
- -moz-box-sizing: border-box;\
- -webkit-box-sizing: border-box;\
- box-sizing: border-box;\
-}\
-div.ace_isearch-result {\
- border-radius: 4px;\
- background-color: rgba(255, 200, 0, 0.5);\
- box-shadow: 0 0 4px rgb(255, 200, 0);\
-}\
-.ace_dark div.ace_isearch-result {\
- background-color: rgb(100, 110, 160);\
- box-shadow: 0 0 4px rgb(80, 90, 140);\
-}", "incremental-search-highlighting");
-var commands = require("./commands/command_manager");
-(function() {
- this.setupIncrementalSearch = function(editor, val) {
- if (this.usesIncrementalSearch == val) return;
- this.usesIncrementalSearch = val;
- var iSearchCommands = iSearchCommandModule.iSearchStartCommands;
- var method = val ? 'addCommands' : 'removeCommands';
- this[method](iSearchCommands);
- };
-}).call(commands.CommandManager.prototype);
-var Editor = require("./editor").Editor;
-require("./config").defineOptions(Editor.prototype, "editor", {
- useIncrementalSearch: {
- set: function(val) {
- this.keyBinding.$handlers.forEach(function(handler) {
- if (handler.setupIncrementalSearch) {
- handler.setupIncrementalSearch(this, val);
- }
- });
- this._emit('incrementalSearchSettingChanged', {isEnabled: val});
- }
- }
-});
-
-});
-
-ace.define('ace/commands/incremental_search_commands', ['require', 'exports', 'module' , 'ace/config', 'ace/lib/oop', 'ace/keyboard/hash_handler', 'ace/commands/occur_commands'], function(require, exports, module) {
-
-var config = require("../config");
-var oop = require("../lib/oop");
-var HashHandler = require("../keyboard/hash_handler").HashHandler;
-var occurStartCommand = require("./occur_commands").occurStartCommand;
-exports.iSearchStartCommands = [{
- name: "iSearch",
- bindKey: {win: "Ctrl-F", mac: "Command-F"},
- exec: function(editor, options) {
- config.loadModule(["core", "ace/incremental_search"], function(e) {
- var iSearch = e.iSearch = e.iSearch || new e.IncrementalSearch();
- iSearch.activate(editor, options.backwards);
- if (options.jumpToFirstMatch) iSearch.next(options);
- });
- },
- readOnly: true
-}, {
- name: "iSearchBackwards",
- exec: function(editor, jumpToNext) { editor.execCommand('iSearch', {backwards: true}); },
- readOnly: true
-}, {
- name: "iSearchAndGo",
- bindKey: {win: "Ctrl-K", mac: "Command-G"},
- exec: function(editor, jumpToNext) { editor.execCommand('iSearch', {jumpToFirstMatch: true, useCurrentOrPrevSearch: true}); },
- readOnly: true
-}, {
- name: "iSearchBackwardsAndGo",
- bindKey: {win: "Ctrl-Shift-K", mac: "Command-Shift-G"},
- exec: function(editor) { editor.execCommand('iSearch', {jumpToFirstMatch: true, backwards: true, useCurrentOrPrevSearch: true}); },
- readOnly: true
-}];
-exports.iSearchCommands = [{
- name: "restartSearch",
- bindKey: {win: "Ctrl-F", mac: "Command-F"},
- exec: function(iSearch) {
- iSearch.cancelSearch(true);
- },
- readOnly: true,
- isIncrementalSearchCommand: true
-}, {
- name: "searchForward",
- bindKey: {win: "Ctrl-S|Ctrl-K", mac: "Ctrl-S|Command-G"},
- exec: function(iSearch, options) {
- options.useCurrentOrPrevSearch = true;
- iSearch.next(options);
- },
- readOnly: true,
- isIncrementalSearchCommand: true
-}, {
- name: "searchBackward",
- bindKey: {win: "Ctrl-R|Ctrl-Shift-K", mac: "Ctrl-R|Command-Shift-G"},
- exec: function(iSearch, options) {
- options.useCurrentOrPrevSearch = true;
- options.backwards = true;
- iSearch.next(options);
- },
- readOnly: true,
- isIncrementalSearchCommand: true
-}, {
- name: "extendSearchTerm",
- exec: function(iSearch, string) {
- iSearch.addChar(string);
- },
- readOnly: true,
- isIncrementalSearchCommand: true
-}, {
- name: "extendSearchTermSpace",
- bindKey: "space",
- exec: function(iSearch) { iSearch.addChar(' '); },
- readOnly: true,
- isIncrementalSearchCommand: true
-}, {
- name: "shrinkSearchTerm",
- bindKey: "backspace",
- exec: function(iSearch) {
- iSearch.removeChar();
- },
- readOnly: true,
- isIncrementalSearchCommand: true
-}, {
- name: 'confirmSearch',
- bindKey: 'return',
- exec: function(iSearch) { iSearch.deactivate(); },
- readOnly: true,
- isIncrementalSearchCommand: true
-}, {
- name: 'cancelSearch',
- bindKey: 'esc|Ctrl-G',
- exec: function(iSearch) { iSearch.deactivate(true); },
- readOnly: true,
- isIncrementalSearchCommand: true
-}, {
- name: 'occurisearch',
- bindKey: 'Ctrl-O',
- exec: function(iSearch) {
- var options = oop.mixin({}, iSearch.$options);
- iSearch.deactivate();
- occurStartCommand.exec(iSearch.$editor, options);
- },
- readOnly: true,
- isIncrementalSearchCommand: true
-}];
-
-function IncrementalSearchKeyboardHandler(iSearch) {
- this.$iSearch = iSearch;
-}
-
-oop.inherits(IncrementalSearchKeyboardHandler, HashHandler);
-
-;(function() {
-
- this.attach = function(editor) {
- var iSearch = this.$iSearch;
- HashHandler.call(this, exports.iSearchCommands, editor.commands.platform);
- this.$commandExecHandler = editor.commands.addEventListener('exec', function(e) {
- if (!e.command.isIncrementalSearchCommand) return undefined;
- e.stopPropagation();
- e.preventDefault();
- return e.command.exec(iSearch, e.args || {});
- });
- }
-
- this.detach = function(editor) {
- if (!this.$commandExecHandler) return;
- editor.commands.removeEventListener('exec', this.$commandExecHandler);
- delete this.$commandExecHandler;
- }
-
- var handleKeyboard$super = this.handleKeyboard;
- this.handleKeyboard = function(data, hashId, key, keyCode) {
- var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode);
- if (cmd.command) { return cmd; }
- if (hashId == -1) {
- var extendCmd = this.commands.extendSearchTerm;
- if (extendCmd) { return {command: extendCmd, args: key}; }
- }
- return {command: "null", passEvent: hashId == 0 || hashId == 4};
- }
-
-}).call(IncrementalSearchKeyboardHandler.prototype);
-
-
-exports.IncrementalSearchKeyboardHandler = IncrementalSearchKeyboardHandler;
-
-});
-
-ace.define('ace/commands/occur_commands', ['require', 'exports', 'module' , 'ace/config', 'ace/occur', 'ace/keyboard/hash_handler', 'ace/lib/oop'], function(require, exports, module) {
-
-var config = require("../config"),
- Occur = require("../occur").Occur;
-var occurStartCommand = {
- name: "occur",
- exec: function(editor, options) {
- var alreadyInOccur = !!editor.session.$occur;
- var occurSessionActive = new Occur().enter(editor, options);
- if (occurSessionActive && !alreadyInOccur)
- OccurKeyboardHandler.installIn(editor);
- },
- readOnly: true
-};
-
-var occurCommands = [{
- name: "occurexit",
- bindKey: 'esc|Ctrl-G',
- exec: function(editor) {
- var occur = editor.session.$occur;
- if (!occur) return;
- occur.exit(editor, {});
- if (!editor.session.$occur) OccurKeyboardHandler.uninstallFrom(editor);
- },
- readOnly: true
-}, {
- name: "occuraccept",
- bindKey: 'enter',
- exec: function(editor) {
- var occur = editor.session.$occur;
- if (!occur) return;
- occur.exit(editor, {translatePosition: true});
- if (!editor.session.$occur) OccurKeyboardHandler.uninstallFrom(editor);
- },
- readOnly: true
-}];
-
-var HashHandler = require("../keyboard/hash_handler").HashHandler;
-var oop = require("../lib/oop");
-
-
-function OccurKeyboardHandler() {}
-
-oop.inherits(OccurKeyboardHandler, HashHandler);
-
-;(function() {
-
- this.isOccurHandler = true;
-
- this.attach = function(editor) {
- HashHandler.call(this, occurCommands, editor.commands.platform);
- this.$editor = editor;
- }
-
- var handleKeyboard$super = this.handleKeyboard;
- this.handleKeyboard = function(data, hashId, key, keyCode) {
- var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode);
- return (cmd && cmd.command) ? cmd : undefined;
- }
-
-}).call(OccurKeyboardHandler.prototype);
-
-OccurKeyboardHandler.installIn = function(editor) {
- var handler = new this();
- editor.keyBinding.addKeyboardHandler(handler);
- editor.commands.addCommands(occurCommands);
-}
-
-OccurKeyboardHandler.uninstallFrom = function(editor) {
- editor.commands.removeCommands(occurCommands);
- var handler = editor.getKeyboardHandler();
- if (handler.isOccurHandler)
- editor.keyBinding.removeKeyboardHandler(handler);
-}
-
-exports.occurStartCommand = occurStartCommand;
-
-});
-
-ace.define('ace/occur', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/search', 'ace/edit_session', 'ace/search_highlight', 'ace/lib/dom'], function(require, exports, module) {
-
-
-var oop = require("./lib/oop");
-var Range = require("./range").Range;
-var Search = require("./search").Search;
-var EditSession = require("./edit_session").EditSession;
-var SearchHighlight = require("./search_highlight").SearchHighlight;
-function Occur() {}
-
-oop.inherits(Occur, Search);
-
-(function() {
- this.enter = function(editor, options) {
- if (!options.needle) return false;
- var pos = editor.getCursorPosition();
- this.displayOccurContent(editor, options);
- var translatedPos = this.originalToOccurPosition(editor.session, pos);
- editor.moveCursorToPosition(translatedPos);
- return true;
- }
- this.exit = function(editor, options) {
- var pos = options.translatePosition && editor.getCursorPosition();
- var translatedPos = pos && this.occurToOriginalPosition(editor.session, pos);
- this.displayOriginalContent(editor);
- if (translatedPos)
- editor.moveCursorToPosition(translatedPos);
- return true;
- }
-
- this.highlight = function(sess, regexp) {
- var hl = sess.$occurHighlight = sess.$occurHighlight || sess.addDynamicMarker(
- new SearchHighlight(null, "ace_occur-highlight", "text"));
- hl.setRegexp(regexp);
- sess._emit("changeBackMarker"); // force highlight layer redraw
- }
-
- this.displayOccurContent = function(editor, options) {
- this.$originalSession = editor.session;
- var found = this.matchingLines(editor.session, options);
- var lines = found.map(function(foundLine) { return foundLine.content; });
- var occurSession = new EditSession(lines.join('\n'));
- occurSession.$occur = this;
- occurSession.$occurMatchingLines = found;
- editor.setSession(occurSession);
- this.highlight(occurSession, options.re);
- occurSession._emit('changeBackMarker');
- }
-
- this.displayOriginalContent = function(editor) {
- editor.setSession(this.$originalSession);
- }
- this.originalToOccurPosition = function(session, pos) {
- var lines = session.$occurMatchingLines;
- var nullPos = {row: 0, column: 0};
- if (!lines) return nullPos;
- for (var i = 0; i < lines.length; i++) {
- if (lines[i].row === pos.row)
- return {row: i, column: pos.column};
- }
- return nullPos;
- }
- this.occurToOriginalPosition = function(session, pos) {
- var lines = session.$occurMatchingLines;
- if (!lines || !lines[pos.row])
- return pos;
- return {row: lines[pos.row].row, column: pos.column};
- }
-
- this.matchingLines = function(session, options) {
- options = oop.mixin({}, options);
- if (!session || !options.needle) return [];
- var search = new Search();
- search.set(options);
- return search.findAll(session).reduce(function(lines, range) {
- var row = range.start.row;
- var last = lines[lines.length-1];
- return last && last.row === row ?
- lines :
- lines.concat({row: row, content: session.getLine(row)});
- }, []);
- }
-
-}).call(Occur.prototype);
-
-var dom = require('./lib/dom');
-dom.importCssString(".ace_occur-highlight {\n\
- border-radius: 4px;\n\
- background-color: rgba(87, 255, 8, 0.25);\n\
- position: absolute;\n\
- z-index: 4;\n\
- -moz-box-sizing: border-box;\n\
- -webkit-box-sizing: border-box;\n\
- box-sizing: border-box;\n\
- box-shadow: 0 0 4px rgb(91, 255, 50);\n\
-}\n\
-.ace_dark .ace_occur-highlight {\n\
- background-color: rgb(80, 140, 85);\n\
- box-shadow: 0 0 4px rgb(60, 120, 70);\n\
-}\n", "incremental-occur-highlighting");
-
-exports.Occur = Occur;
-
-});
diff --git a/js/vendor/ace/src-noconflict/keybinding-vim.js b/js/vendor/ace/src-noconflict/keybinding-vim.js
index 9c665af..b4374cb 100644..100755
--- a/js/vendor/ace/src-noconflict/keybinding-vim.js
+++ b/js/vendor/ace/src-noconflict/keybinding-vim.js
@@ -1,1759 +1,5519 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/keyboard/vim', ['require', 'exports', 'module' , 'ace/keyboard/vim/commands', 'ace/keyboard/vim/maps/util', 'ace/lib/useragent'], function(require, exports, module) {
-
-
-var cmds = require("./vim/commands");
-var coreCommands = cmds.coreCommands;
-var util = require("./vim/maps/util");
-var useragent = require("../lib/useragent");
-
-var startCommands = {
- "i": {
- command: coreCommands.start
+ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/multi_select"], function(require, exports, module) {
+ 'use strict';
+
+ function log() {
+ var d = "";
+ function format(p) {
+ if (typeof p != "object")
+ return p + "";
+ if ("line" in p) {
+ return p.line + ":" + p.ch;
+ }
+ if ("anchor" in p) {
+ return format(p.anchor) + "->" + format(p.head);
+ }
+ if (Array.isArray(p))
+ return "[" + p.map(function(x) {
+ return format(x);
+ }) + "]";
+ return JSON.stringify(p);
+ }
+ for (var i = 0; i < arguments.length; i++) {
+ var p = arguments[i];
+ var f = format(p);
+ d += f + " ";
+ }
+ console.log(d);
+ }
+ var Range = require("../range").Range;
+ var EventEmitter = require("../lib/event_emitter").EventEmitter;
+ var dom = require("../lib/dom");
+ var oop = require("../lib/oop");
+ var KEYS = require("../lib/keys");
+ var event = require("../lib/event");
+ var Search = require("../search").Search;
+ var useragent = require("../lib/useragent");
+ var SearchHighlight = require("../search_highlight").SearchHighlight;
+ var multiSelectCommands = require("../commands/multi_select_commands");
+ var TextModeTokenRe = require("../mode/text").Mode.prototype.tokenRe;
+ require("../multi_select");
+
+ var CodeMirror = function(ace) {
+ this.ace = ace;
+ this.state = {};
+ this.marks = {};
+ this.$uid = 0;
+ this.onChange = this.onChange.bind(this);
+ this.onSelectionChange = this.onSelectionChange.bind(this);
+ this.onBeforeEndOperation = this.onBeforeEndOperation.bind(this);
+ this.ace.on('change', this.onChange);
+ this.ace.on('changeSelection', this.onSelectionChange);
+ this.ace.on('beforeEndOperation', this.onBeforeEndOperation);
+ };
+ CodeMirror.Pos = function(line, ch) {
+ if (!(this instanceof Pos)) return new Pos(line, ch);
+ this.line = line; this.ch = ch;
+ };
+ CodeMirror.defineOption = function(name, val, setter) {};
+ CodeMirror.commands = {
+ redo: function(cm) { cm.ace.redo(); },
+ undo: function(cm) { cm.ace.undo(); },
+ newlineAndIndent: function(cm) { cm.ace.insert("\n"); },
+ };
+ CodeMirror.keyMap = {};
+ CodeMirror.addClass = CodeMirror.rmClass =
+ CodeMirror.e_stop = function() {};
+ CodeMirror.keyName = function(e) {
+ if (e.key) return e.key;
+ var key = (KEYS[e.keyCode] || "");
+ if (key.length == 1) key = key.toUpperCase();
+ key = event.getModifierString(e).replace(/(^|-)\w/g, function(m) {
+ return m.toUpperCase();
+ }) + key;
+ return key;
+ };
+ CodeMirror.keyMap['default'] = function(key) {
+ return function(cm) {
+ var cmd = cm.ace.commands.commandKeyBinding[key.toLowerCase()];
+ return cmd && cm.ace.execCommand(cmd) !== false;
+ };
+ };
+ CodeMirror.lookupKey = function lookupKey(key, map, handle) {
+ if (typeof map == "string")
+ map = CodeMirror.keyMap[map];
+ var found = typeof map == "function" ? map(key) : map[key];
+ if (found === false) return "nothing";
+ if (found === "...") return "multi";
+ if (found != null && handle(found)) return "handled";
+
+ if (map.fallthrough) {
+ if (!Array.isArray(map.fallthrough))
+ return lookupKey(key, map.fallthrough, handle);
+ for (var i = 0; i < map.fallthrough.length; i++) {
+ var result = lookupKey(key, map.fallthrough[i], handle);
+ if (result) return result;
+ }
+ }
+ };
+
+ CodeMirror.signal = function(o, name, e) { return o._signal(name, e) };
+ CodeMirror.on = event.addListener;
+ CodeMirror.off = event.removeListener;
+ CodeMirror.isWordChar = function(ch) {
+ TextModeTokenRe.lastIndex = 0;
+ return TextModeTokenRe.test(ch);
+ };
+
+(function() {
+ oop.implement(CodeMirror.prototype, EventEmitter);
+
+ this.destroy = function() {
+ this.ace.off('change', this.onChange);
+ this.ace.off('changeSelection', this.onSelectionChange);
+ this.ace.off('beforeEndOperation', this.onBeforeEndOperation);
+ this.removeOverlay();
+ };
+ this.virtualSelectionMode = function() {
+ return this.ace.inVirtualSelectionMode && this.ace.selection.index;
+ };
+ this.onChange = function(delta) {
+ var oldDelta = delta.data;
+ delta = {
+ start: oldDelta.range.start,
+ end: oldDelta.range.end,
+ action: oldDelta.action,
+ lines: oldDelta.lines || [oldDelta.text]
+ };// v1.2 api compatibility
+ if (delta.action[0] == 'i') {
+ var change = { text: delta.lines };
+ var curOp = this.curOp = this.curOp || {};
+ if (!curOp.changeHandlers)
+ curOp.changeHandlers = this._eventRegistry["change"] && this._eventRegistry["change"].slice();
+ if (this.virtualSelectionMode()) return;
+ if (!curOp.lastChange) {
+ curOp.lastChange = curOp.change = change;
+ } else {
+ curOp.lastChange.next = curOp.lastChange = change;
+ }
+ }
+ this.$updateMarkers(delta);
+ };
+ this.onSelectionChange = function() {
+ var curOp = this.curOp = this.curOp || {};
+ if (!curOp.cursorActivityHandlers)
+ curOp.cursorActivityHandlers = this._eventRegistry["cursorActivity"] && this._eventRegistry["cursorActivity"].slice();
+ this.curOp.cursorActivity = true;
+ if (this.ace.inMultiSelectMode) {
+ this.ace.keyBinding.removeKeyboardHandler(multiSelectCommands.keyboardHandler);
+ }
+ };
+ this.operation = function(fn, force) {
+ if (!force && this.curOp || force && this.curOp && this.curOp.force) {
+ return fn();
+ }
+ if (force || !this.ace.curOp) {
+ if (this.curOp)
+ this.onBeforeEndOperation();
+ }
+ if (!this.ace.curOp) {
+ var prevOp = this.ace.prevOp;
+ this.ace.startOperation({
+ command: { name: "vim", scrollIntoView: "cursor" }
+ });
+ }
+ var curOp = this.curOp = this.curOp || {};
+ this.curOp.force = force;
+ var result = fn();
+ if (this.ace.curOp && this.ace.curOp.command.name == "vim") {
+ this.ace.endOperation();
+ if (!curOp.cursorActivity && !curOp.lastChange && prevOp)
+ this.ace.prevOp = prevOp;
+ }
+ if (force || !this.ace.curOp) {
+ if (this.curOp)
+ this.onBeforeEndOperation();
+ }
+ return result;
+ };
+ this.onBeforeEndOperation = function() {
+ var op = this.curOp;
+ if (op) {
+ if (op.change) { this.signal("change", op.change, op); }
+ if (op && op.cursorActivity) { this.signal("cursorActivity", null, op); }
+ this.curOp = null;
+ }
+ };
+
+ this.signal = function(eventName, e, handlers) {
+ var listeners = handlers ? handlers[eventName + "Handlers"]
+ : (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](this, e);
+ };
+ this.firstLine = function() { return 0; };
+ this.lastLine = function() { return this.ace.session.getLength() - 1; };
+ this.lineCount = function() { return this.ace.session.getLength(); };
+ this.setCursor = function(line, ch) {
+ if (typeof line === 'object') {
+ ch = line.ch;
+ line = line.line;
+ }
+ if (!this.ace.inVirtualSelectionMode)
+ this.ace.exitMultiSelectMode();
+ this.ace.session.unfold({row: line, column: ch});
+ this.ace.selection.moveTo(line, ch);
+ };
+ this.getCursor = function(p) {
+ var sel = this.ace.selection;
+ var pos = p == 'anchor' ? (sel.isEmpty() ? sel.lead : sel.anchor) :
+ p == 'head' || !p ? sel.lead : sel.getRange()[p];
+ return toCmPos(pos);
+ };
+ this.listSelections = function(p) {
+ var ranges = this.ace.multiSelect.rangeList.ranges;
+ if (!ranges.length || this.ace.inVirtualSelectionMode)
+ return [{anchor: this.getCursor('anchor'), head: this.getCursor('head')}];
+ return ranges.map(function(r) {
+ return {
+ anchor: this.clipPos(toCmPos(r.cursor == r.end ? r.start : r.end)),
+ head: this.clipPos(toCmPos(r.cursor))
+ };
+ }, this);
+ };
+ this.setSelections = function(p, primIndex) {
+ var sel = this.ace.multiSelect;
+ var ranges = p.map(function(x) {
+ var anchor = toAcePos(x.anchor);
+ var head = toAcePos(x.head);
+ var r = Range.comparePoints(anchor, head) < 0
+ ? new Range.fromPoints(anchor, head)
+ : new Range.fromPoints(head, anchor);
+ r.cursor = Range.comparePoints(r.start, head) ? r.end : r.start;
+ return r;
+ });
+
+ if (this.ace.inVirtualSelectionMode) {
+ this.ace.selection.fromOrientedRange(ranges[0]);
+ return;
+ }
+ if (!primIndex) {
+ ranges = ranges.reverse();
+ } else if (ranges[primIndex]) {
+ ranges.push(ranges.splice(primIndex, 1)[0]);
+ }
+ sel.toSingleRange(ranges[0].clone());
+ var session = this.ace.session;
+ for (var i = 0; i < ranges.length; i++) {
+ var range = session.$clipRangeToDocument(ranges[i]); // todo why ace doesn't do this?
+ sel.addRange(range);
+ }
+ };
+ this.setSelection = function(a, h, options) {
+ var sel = this.ace.selection;
+ sel.moveTo(a.line, a.ch);
+ sel.selectTo(h.line, h.ch);
+ if (options && options.origin == '*mouse') {
+ this.onBeforeEndOperation();
+ }
+ };
+ this.somethingSelected = function(p) {
+ return !this.ace.selection.isEmpty();
+ };
+ this.clipPos = function(p) {
+ var pos = this.ace.session.$clipPositionToDocument(p.line, p.ch);
+ return toCmPos(pos);
+ };
+ this.markText = function(cursor) {
+ return {clear: function() {}, find: function() {}};
+ };
+ this.$updateMarkers = function(delta) {
+ var isInsert = delta.action == "insert";
+ var start = delta.start;
+ var end = delta.end;
+ var rowShift = (end.row - start.row) * (isInsert ? 1 : -1);
+ var colShift = (end.column - start.column) * (isInsert ? 1 : -1);
+ if (isInsert) end = start;
+
+ for (var i in this.marks) {
+ var point = this.marks[i];
+ var cmp = Range.comparePoints(point, start);
+ if (cmp < 0) {
+ continue; // delta starts after the range
+ }
+ if (cmp === 0) {
+ if (isInsert) {
+ if (point.bias == 1) {
+ cmp = 1;
+ } else {
+ point.bias == -1;
+ continue;
+ }
+ }
+ }
+ var cmp2 = isInsert ? cmp : Range.comparePoints(point, end);
+ if (cmp2 > 0) {
+ point.row += rowShift;
+ point.column += point.row == end.row ? colShift : 0;
+ continue;
+ }
+ if (!isInsert && cmp2 <= 0) {
+ point.row = start.row;
+ point.column = start.column;
+ if (cmp2 === 0)
+ point.bias = 1;
+ }
+ }
+ };
+ var Marker = function(cm, id, row, column) {
+ this.cm = cm;
+ this.id = id;
+ this.row = row;
+ this.column = column;
+ cm.marks[this.id] = this;
+ };
+ Marker.prototype.clear = function() { delete this.cm.marks[this.id] };
+ Marker.prototype.find = function() { return toCmPos(this) };
+ this.setBookmark = function(cursor, options) {
+ var bm = new Marker(this, this.$uid++, cursor.line, cursor.ch);
+ if (!options || !options.insertLeft)
+ bm.$insertRight = true;
+ this.marks[bm.id] = bm;
+ return bm;
+ };
+ this.moveH = function(increment, unit) {
+ if (unit == 'char') {
+ var sel = this.ace.selection;
+ sel.clearSelection();
+ sel.moveCursorBy(0, increment);
+ }
+ };
+ this.findPosV = function(start, amount, unit, goalColumn) {
+ if (unit == 'page') {
+ var renderer = this.ace.renderer;
+ var config = renderer.layerConfig;
+ amount = amount * Math.floor(config.height / config.lineHeight);
+ unit = 'line';
+ }
+ if (unit == 'line') {
+ var screenPos = this.ace.session.documentToScreenPosition(start.line, start.ch);
+ if (goalColumn != null)
+ screenPos.column = goalColumn;
+ screenPos.row += amount;
+ screenPos.row = Math.min(Math.max(0, screenPos.row), this.ace.session.getScreenLength() - 1);
+ var pos = this.ace.session.screenToDocumentPosition(screenPos.row, screenPos.column);
+ return toCmPos(pos);
+ } else {
+ debugger;
+ }
+ };
+ this.charCoords = function(pos, mode) {
+ if (mode == 'div' || !mode) {
+ var sc = this.ace.session.documentToScreenPosition(pos.line, pos.ch);
+ return {left: sc.column, top: sc.row};
+ }if (mode == 'local') {
+ var renderer = this.ace.renderer;
+ var sc = this.ace.session.documentToScreenPosition(pos.line, pos.ch);
+ var lh = renderer.layerConfig.lineHeight;
+ var cw = renderer.layerConfig.characterWidth;
+ var top = lh * sc.row;
+ return {left: sc.column * cw, top: top, bottom: top + lh};
+ }
+ };
+ this.coordsChar = function(pos, mode) {
+ var renderer = this.ace.renderer;
+ if (mode == 'local') {
+ var row = Math.max(0, Math.floor(pos.top / renderer.lineHeight));
+ var col = Math.max(0, Math.floor(pos.left / renderer.characterWidth));
+ var ch = renderer.session.screenToDocumentPosition(row, col);
+ return toCmPos(ch);
+ } else if (mode == 'div') {
+ throw "not implemented";
+ }
+ };
+ this.getSearchCursor = function(query, pos, caseFold) {
+ var caseSensitive = false;
+ var isRegexp = false;
+ if (query instanceof RegExp && !query.global) {
+ caseSensitive = !query.ignoreCase;
+ query = query.source;
+ isRegexp = true;
+ }
+ var search = new Search();
+ if (pos.ch == undefined) pos.ch = Number.MAX_VALUE;
+ var acePos = {row: pos.line, column: pos.ch};
+ var cm = this;
+ var last = null;
+ return {
+ findNext: function() { return this.find(false) },
+ findPrevious: function() {return this.find(true) },
+ find: function(back) {
+ search.setOptions({
+ needle: query,
+ caseSensitive: caseSensitive,
+ wrap: false,
+ backwards: back,
+ regExp: isRegexp,
+ start: last || acePos
+ });
+ var range = search.find(cm.ace.session);
+ if (range && range.isEmpty()) {
+ if (cm.getLine(range.start.row).length == range.start.column) {
+ search.$options.start = range;
+ range = search.find(cm.ace.session);
+ }
+ }
+ last = range;
+ return last;
+ },
+ from: function() { return last && toCmPos(last.start) },
+ to: function() { return last && toCmPos(last.end) },
+ replace: function(text) {
+ if (last) {
+ last.end = cm.ace.session.doc.replace(last, text);
+ }
+ }
+ };
+ };
+ this.scrollTo = function(x, y) {
+ var renderer = this.ace.renderer;
+ var config = renderer.layerConfig;
+ var maxHeight = config.maxHeight;
+ maxHeight -= (renderer.$size.scrollerHeight - renderer.lineHeight) * renderer.$scrollPastEnd;
+ if (y != null) this.ace.session.setScrollTop(Math.max(0, Math.min(y, maxHeight)));
+ if (x != null) this.ace.session.setScrollLeft(Math.max(0, Math.min(x, config.width)));
+ };
+ this.scrollInfo = function() { return 0; };
+ this.scrollIntoView = function(pos, margin) {
+ if (pos) {
+ var renderer = this.ace.renderer;
+ var viewMargin = { "top": 0, "bottom": margin };
+ renderer.scrollCursorIntoView(toAcePos(pos),
+ (renderer.lineHeight * 2) / renderer.$size.scrollerHeight, viewMargin);
+ }
+ };
+ this.getLine = function(row) { return this.ace.session.getLine(row) };
+ this.getRange = function(s, e) {
+ return this.ace.session.getTextRange(new Range(s.line, s.ch, e.line, e.ch));
+ };
+ this.replaceRange = function(text, s, e) {
+ if (!e) e = s;
+ return this.ace.session.replace(new Range(s.line, s.ch, e.line, e.ch), text);
+ };
+ this.replaceSelections = function(p) {
+ var sel = this.ace.selection;
+ if (this.ace.inVirtualSelectionMode) {
+ this.ace.session.replace(sel.getRange(), p[0] || "");
+ return;
+ }
+ sel.inVirtualSelectionMode = true;
+ var ranges = sel.rangeList.ranges;
+ if (!ranges.length) ranges = [this.ace.multiSelect.getRange()];
+ for (var i = ranges.length; i--;)
+ this.ace.session.replace(ranges[i], p[i] || "");
+ sel.inVirtualSelectionMode = false;
+ };
+ this.getSelection = function() {
+ return this.ace.getSelectedText();
+ };
+ this.getSelections = function() {
+ return this.listSelections().map(function(x) {
+ return this.getRange(x.anchor, x.head);
+ }, this);
+ };
+ this.getInputField = function() {
+ return this.ace.textInput.getElement();
+ };
+ this.getWrapperElement = function() {
+ return this.ace.containter;
+ };
+ var optMap = {
+ indentWithTabs: "useSoftTabs",
+ indentUnit: "tabSize",
+ firstLineNumber: "firstLineNumber"
+ };
+ this.setOption = function(name, val) {
+ this.state[name] = val;
+ switch (name) {
+ case 'indentWithTabs':
+ name = optMap[name];
+ val = !val;
+ break;
+ default:
+ name = optMap[name];
+ }
+ if (name)
+ this.ace.setOption(name, val);
+ };
+ this.getOption = function(name, val) {
+ var aceOpt = optMap[name];
+ if (aceOpt)
+ val = this.ace.getOption(aceOpt);
+ switch (name) {
+ case 'indentWithTabs':
+ name = optMap[name];
+ return !val;
+ }
+ return aceOpt ? val : this.state[name];
+ };
+ this.toggleOverwrite = function(on) {
+ this.state.overwrite = on;
+ return this.ace.setOverwrite(on);
+ };
+ this.addOverlay = function(o) {
+ if (!this.$searchHighlight || !this.$searchHighlight.session) {
+ var highlight = new SearchHighlight(null, "ace_highlight-marker", "text");
+ var marker = this.ace.session.addDynamicMarker(highlight);
+ highlight.id = marker.id;
+ highlight.session = this.ace.session;
+ highlight.destroy = function(o) {
+ highlight.session.off("change", highlight.updateOnChange);
+ highlight.session.off("changeEditor", highlight.destroy);
+ highlight.session.removeMarker(highlight.id);
+ highlight.session = null;
+ };
+ highlight.updateOnChange = function(delta) {
+ delta = delta.data.range;// v1.2 api compatibility
+ var row = delta.start.row;
+ if (row == delta.end.row) highlight.cache[row] = undefined;
+ else highlight.cache.splice(row, highlight.cache.length);
+ };
+ highlight.session.on("changeEditor", highlight.destroy);
+ highlight.session.on("change", highlight.updateOnChange);
+ }
+ var re = new RegExp(o.query.source, "gmi");
+ this.$searchHighlight = o.highlight = highlight;
+ this.$searchHighlight.setRegexp(re);
+ this.ace.renderer.updateBackMarkers();
+ };
+ this.removeOverlay = function(o) {
+ if (this.$searchHighlight && this.$searchHighlight.session) {
+ this.$searchHighlight.destroy();
+ }
+ };
+ this.getScrollInfo = function() {
+ var renderer = this.ace.renderer;
+ var config = renderer.layerConfig;
+ return {
+ left: renderer.scrollLeft,
+ top: renderer.scrollTop,
+ height: config.maxHeight,
+ width: config.width,
+ clientHeight: config.height,
+ clientWidth: config.width
+ };
+ };
+ this.getValue = function() {
+ return this.ace.getValue();
+ };
+ this.setValue = function(v) {
+ return this.ace.setValue(v);
+ };
+ this.getTokenTypeAt = function(pos) {
+ var token = this.ace.session.getTokenAt(pos.line, pos.ch);
+ return token && /comment|string/.test(token.type) ? "string" : "";
+ };
+ this.findMatchingBracket = function(pos) {
+ var m = this.ace.session.findMatchingBracket(toAcePos(pos));
+ return {to: m && toCmPos(m)};
+ };
+ this.indentLine = function(line, method) {
+ if (method === true)
+ this.ace.session.indentRows(line, line, "\t");
+ else if (method === false)
+ this.ace.session.outdentRows(new Range(line, 0, line, 0));
+ };
+ this.indexFromPos = function(pos) {
+ return this.ace.session.doc.positionToIndex(toAcePos(pos));
+ };
+ this.posFromIndex = function(index) {
+ return toCmPos(this.ace.session.doc.indexToPosition(index));
+ };
+ this.focus = function(index) {
+ return this.ace.focus();
+ };
+ this.blur = function(index) {
+ return this.ace.blur();
+ };
+ this.defaultTextHeight = function(index) {
+ return this.ace.renderer.layerConfig.lineHeight;
+ };
+ this.scanForBracket = function(pos, dir, _, options) {
+ var re = options.bracketRegex.source;
+ if (dir == 1) {
+ var m = this.ace.session.$findClosingBracket(re.slice(1, 2), toAcePos(pos), /paren|text/);
+ } else {
+ var m = this.ace.session.$findOpeningBracket(re.slice(-2, -1), {row: pos.line, column: pos.ch + 1}, /paren|text/);
+ }
+ return m && {pos: toCmPos(m)};
+ };
+ this.refresh = function() {
+ return this.ace.resize(true);
+ };
+ this.getMode = function() {
+ return { name : this.getOption("mode") };
+ }
+}).call(CodeMirror.prototype);
+ function toAcePos(cmPos) {
+ return {row: cmPos.line, column: cmPos.ch};
+ }
+ function toCmPos(acePos) {
+ return new Pos(acePos.row, acePos.column);
+ }
+
+ var StringStream = CodeMirror.StringStream = function(string, tabSize) {
+ this.pos = this.start = 0;
+ this.string = string;
+ this.tabSize = tabSize || 8;
+ this.lastColumnPos = this.lastColumnValue = 0;
+ this.lineStart = 0;
+ };
+
+ StringStream.prototype = {
+ eol: function() {return this.pos >= this.string.length;},
+ sol: function() {return this.pos == this.lineStart;},
+ peek: function() {return this.string.charAt(this.pos) || undefined;},
+ next: function() {
+ if (this.pos < this.string.length)
+ return this.string.charAt(this.pos++);
},
- "I": {
- command: coreCommands.startBeginning
+ eat: function(match) {
+ var ch = this.string.charAt(this.pos);
+ if (typeof match == "string") var ok = ch == match;
+ else var ok = ch && (match.test ? match.test(ch) : match(ch));
+ if (ok) {++this.pos; return ch;}
},
- "a": {
- command: coreCommands.append
+ eatWhile: function(match) {
+ var start = this.pos;
+ while (this.eat(match)){}
+ return this.pos > start;
},
- "A": {
- command: coreCommands.appendEnd
+ eatSpace: function() {
+ var start = this.pos;
+ while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;
+ return this.pos > start;
},
- "ctrl-f": {
- command: "gotopagedown"
+ skipToEnd: function() {this.pos = this.string.length;},
+ skipTo: function(ch) {
+ var found = this.string.indexOf(ch, this.pos);
+ if (found > -1) {this.pos = found; return true;}
},
- "ctrl-b": {
- command: "gotopageup"
+ backUp: function(n) {this.pos -= n;},
+ column: function() {
+ throw "not implemented";
+ },
+ indentation: function() {
+ throw "not implemented";
+ },
+ match: function(pattern, consume, caseInsensitive) {
+ if (typeof pattern == "string") {
+ var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};
+ var substr = this.string.substr(this.pos, pattern.length);
+ if (cased(substr) == cased(pattern)) {
+ if (consume !== false) this.pos += pattern.length;
+ return true;
+ }
+ } else {
+ var match = this.string.slice(this.pos).match(pattern);
+ if (match && match.index > 0) return null;
+ if (match && consume !== false) this.pos += match[0].length;
+ return match;
+ }
+ },
+ current: function(){return this.string.slice(this.start, this.pos);},
+ hideFirstChars: function(n, inner) {
+ this.lineStart += n;
+ try { return inner(); }
+ finally { this.lineStart -= n; }
}
+ };
+CodeMirror.defineExtension = function(name, fn) {
+ CodeMirror.prototype[name] = fn;
};
+dom.importCssString(".normal-mode .ace_cursor{\
+ border: 1px solid red;\
+ background-color: red;\
+ opacity: 0.5;\
+}\
+.normal-mode .ace_hidden-cursors .ace_cursor{\
+ background-color: transparent;\
+}\
+.ace_dialog {\
+ position: absolute;\
+ left: 0; right: 0;\
+ background: white;\
+ z-index: 15;\
+ padding: .1em .8em;\
+ overflow: hidden;\
+ color: #333;\
+}\
+.ace_dialog-top {\
+ border-bottom: 1px solid #eee;\
+ top: 0;\
+}\
+.ace_dialog-bottom {\
+ border-top: 1px solid #eee;\
+ bottom: 0;\
+}\
+.ace_dialog input {\
+ border: none;\
+ outline: none;\
+ background: transparent;\
+ width: 20em;\
+ color: inherit;\
+ font-family: monospace;\
+}", "vimMode");
+(function() {
+ function closeNotification(cm, newVal) {
+ if (cm.state.currentNotificationClose)
+ cm.state.currentNotificationClose();
+ cm.state.currentNotificationClose = newVal;
+ }
-exports.handler = {
- $id: "ace/keyboard/vim",
- handleMacRepeat: function(data, hashId, key) {
- if (hashId == -1) {
- data.inputChar = key;
- data.lastEvent = "input";
- } else if (data.inputChar && data.$lastHash == hashId && data.$lastKey == key) {
- if (data.lastEvent == "input") {
- data.lastEvent = "input1";
- } else if (data.lastEvent == "input1") {
- return true;
- }
- } else {
- data.$lastHash = hashId;
- data.$lastKey = key;
- data.lastEvent = "keypress";
+ CodeMirror.defineExtension("openDialog", function(template, callback, options) {
+ if (this.virtualSelectionMode()) return;
+ if (!options) options = {};
+
+ closeNotification(this, null);
+
+ var dialog = dialogDiv(this, template, options.bottom);
+ var closed = false, me = this;
+ function close(newVal) {
+ if (typeof newVal == 'string') {
+ inp.value = newVal;
+ } else {
+ if (closed) return;
+ closed = true;
+ dialog.parentNode.removeChild(dialog);
+ me.focus();
+
+ if (options.onClose) options.onClose(dialog);
+ }
+ }
+
+ var inp = dialog.getElementsByTagName("input")[0], button;
+ if (inp) {
+ if (options.value) {
+ inp.value = options.value;
+ if (options.select !== false) inp.select();
+ }
+
+ if (options.onInput)
+ CodeMirror.on(inp, "input", function(e) { options.onInput(e, inp.value, close);});
+ if (options.onKeyUp)
+ CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});
+
+ CodeMirror.on(inp, "keydown", function(e) {
+ if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }
+ if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) {
+ inp.blur();
+ CodeMirror.e_stop(e);
+ close();
}
- },
- updateMacCompositionHandlers: function(editor, enable) {
- var onCompositionUpdateOverride = function(text) {
- if (util.currentMode !== "insert") {
- var el = this.textInput.getElement();
- el.blur();
- el.focus();
- el.value = text;
- } else {
- this.onCompositionUpdateOrig(text);
- }
+ if (e.keyCode == 13) callback(inp.value);
+ });
+
+ if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close);
+
+ inp.focus();
+ } else if (button = dialog.getElementsByTagName("button")[0]) {
+ CodeMirror.on(button, "click", function() {
+ close();
+ me.focus();
+ });
+
+ if (options.closeOnBlur !== false) CodeMirror.on(button, "blur", close);
+
+ button.focus();
+ }
+ return close;
+ });
+
+ CodeMirror.defineExtension("openNotification", function(template, options) {
+ if (this.virtualSelectionMode()) return;
+ closeNotification(this, close);
+ var dialog = dialogDiv(this, template, options && options.bottom);
+ var closed = false, doneTimer;
+ var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000;
+
+ function close() {
+ if (closed) return;
+ closed = true;
+ clearTimeout(doneTimer);
+ dialog.parentNode.removeChild(dialog);
+ }
+
+ CodeMirror.on(dialog, 'click', function(e) {
+ CodeMirror.e_preventDefault(e);
+ close();
+ });
+
+ if (duration)
+ doneTimer = setTimeout(close, duration);
+
+ return close;
+ });
+})();
+
+
+ var defaultKeymap = [
+ { keys: '<Left>', type: 'keyToKey', toKeys: 'h' },
+ { keys: '<Right>', type: 'keyToKey', toKeys: 'l' },
+ { keys: '<Up>', type: 'keyToKey', toKeys: 'k' },
+ { keys: '<Down>', type: 'keyToKey', toKeys: 'j' },
+ { keys: '<Space>', type: 'keyToKey', toKeys: 'l' },
+ { keys: '<BS>', type: 'keyToKey', toKeys: 'h', context: 'normal'},
+ { keys: '<C-Space>', type: 'keyToKey', toKeys: 'W' },
+ { keys: '<C-BS>', type: 'keyToKey', toKeys: 'B', context: 'normal' },
+ { keys: '<S-Space>', type: 'keyToKey', toKeys: 'w' },
+ { keys: '<S-BS>', type: 'keyToKey', toKeys: 'b', context: 'normal' },
+ { keys: '<C-n>', type: 'keyToKey', toKeys: 'j' },
+ { keys: '<C-p>', type: 'keyToKey', toKeys: 'k' },
+ { keys: '<C-[>', type: 'keyToKey', toKeys: '<Esc>' },
+ { keys: '<C-c>', type: 'keyToKey', toKeys: '<Esc>' },
+ { keys: '<C-[>', type: 'keyToKey', toKeys: '<Esc>', context: 'insert' },
+ { keys: '<C-c>', type: 'keyToKey', toKeys: '<Esc>', context: 'insert' },
+ { keys: 's', type: 'keyToKey', toKeys: 'cl', context: 'normal' },
+ { keys: 's', type: 'keyToKey', toKeys: 'xi', context: 'visual'},
+ { keys: 'S', type: 'keyToKey', toKeys: 'cc', context: 'normal' },
+ { keys: 'S', type: 'keyToKey', toKeys: 'dcc', context: 'visual' },
+ { keys: '<Home>', type: 'keyToKey', toKeys: '0' },
+ { keys: '<End>', type: 'keyToKey', toKeys: '$' },
+ { keys: '<PageUp>', type: 'keyToKey', toKeys: '<C-b>' },
+ { keys: '<PageDown>', type: 'keyToKey', toKeys: '<C-f>' },
+ { keys: '<CR>', type: 'keyToKey', toKeys: 'j^', context: 'normal' },
+ { keys: 'H', type: 'motion', motion: 'moveToTopLine', motionArgs: { linewise: true, toJumplist: true }},
+ { keys: 'M', type: 'motion', motion: 'moveToMiddleLine', motionArgs: { linewise: true, toJumplist: true }},
+ { keys: 'L', type: 'motion', motion: 'moveToBottomLine', motionArgs: { linewise: true, toJumplist: true }},
+ { keys: 'h', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: false }},
+ { keys: 'l', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: true }},
+ { keys: 'j', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, linewise: true }},
+ { keys: 'k', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, linewise: true }},
+ { keys: 'gj', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: true }},
+ { keys: 'gk', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: false }},
+ { keys: 'w', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false }},
+ { keys: 'W', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false, bigWord: true }},
+ { keys: 'e', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, inclusive: true }},
+ { keys: 'E', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, bigWord: true, inclusive: true }},
+ { keys: 'b', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }},
+ { keys: 'B', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false, bigWord: true }},
+ { keys: 'ge', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, inclusive: true }},
+ { keys: 'gE', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, bigWord: true, inclusive: true }},
+ { keys: '{', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: false, toJumplist: true }},
+ { keys: '}', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: true, toJumplist: true }},
+ { keys: '<C-f>', type: 'motion', motion: 'moveByPage', motionArgs: { forward: true }},
+ { keys: '<C-b>', type: 'motion', motion: 'moveByPage', motionArgs: { forward: false }},
+ { keys: '<C-d>', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: true, explicitRepeat: true }},
+ { keys: '<C-u>', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: false, explicitRepeat: true }},
+ { keys: 'gg', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: false, explicitRepeat: true, linewise: true, toJumplist: true }},
+ { keys: 'G', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: true, explicitRepeat: true, linewise: true, toJumplist: true }},
+ { keys: '0', type: 'motion', motion: 'moveToStartOfLine' },
+ { keys: '^', type: 'motion', motion: 'moveToFirstNonWhiteSpaceCharacter' },
+ { keys: '+', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true }},
+ { keys: '-', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, toFirstChar:true }},
+ { keys: '_', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true, repeatOffset:-1 }},
+ { keys: '$', type: 'motion', motion: 'moveToEol', motionArgs: { inclusive: true }},
+ { keys: '%', type: 'motion', motion: 'moveToMatchedSymbol', motionArgs: { inclusive: true, toJumplist: true }},
+ { keys: 'f<character>', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: true , inclusive: true }},
+ { keys: 'F<character>', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: false }},
+ { keys: 't<character>', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: true, inclusive: true }},
+ { keys: 'T<character>', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: false }},
+ { keys: ';', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: true }},
+ { keys: ',', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: false }},
+ { keys: '\'<character>', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true, linewise: true}},
+ { keys: '`<character>', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true}},
+ { keys: ']`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true } },
+ { keys: '[`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false } },
+ { keys: ']\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true, linewise: true } },
+ { keys: '[\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false, linewise: true } },
+ { keys: ']p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true, matchIndent: true}},
+ { keys: '[p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true, matchIndent: true}},
+ { keys: ']<character>', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: true, toJumplist: true}},
+ { keys: '[<character>', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: false, toJumplist: true}},
+ { keys: '|', type: 'motion', motion: 'moveToColumn'},
+ { keys: 'o', type: 'motion', motion: 'moveToOtherHighlightedEnd', context:'visual'},
+ { keys: 'O', type: 'motion', motion: 'moveToOtherHighlightedEnd', motionArgs: {sameLine: true}, context:'visual'},
+ { keys: 'd', type: 'operator', operator: 'delete' },
+ { keys: 'y', type: 'operator', operator: 'yank' },
+ { keys: 'c', type: 'operator', operator: 'change' },
+ { keys: '>', type: 'operator', operator: 'indent', operatorArgs: { indentRight: true }},
+ { keys: '<', type: 'operator', operator: 'indent', operatorArgs: { indentRight: false }},
+ { keys: 'g~', type: 'operator', operator: 'changeCase' },
+ { keys: 'gu', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, isEdit: true },
+ { keys: 'gU', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, isEdit: true },
+ { keys: 'n', type: 'motion', motion: 'findNext', motionArgs: { forward: true, toJumplist: true }},
+ { keys: 'N', type: 'motion', motion: 'findNext', motionArgs: { forward: false, toJumplist: true }},
+ { keys: 'x', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorMotionArgs: { visualLine: false }},
+ { keys: 'X', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: false }, operatorMotionArgs: { visualLine: true }},
+ { keys: 'D', type: 'operatorMotion', operator: 'delete', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'},
+ { keys: 'D', type: 'operator', operator: 'delete', operatorArgs: { linewise: true }, context: 'visual'},
+ { keys: 'Y', type: 'operatorMotion', operator: 'yank', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'},
+ { keys: 'Y', type: 'operator', operator: 'yank', operatorArgs: { linewise: true }, context: 'visual'},
+ { keys: 'C', type: 'operatorMotion', operator: 'change', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'},
+ { keys: 'C', type: 'operator', operator: 'change', operatorArgs: { linewise: true }, context: 'visual'},
+ { keys: '~', type: 'operatorMotion', operator: 'changeCase', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorArgs: { shouldMoveCursor: true }, context: 'normal'},
+ { keys: '~', type: 'operator', operator: 'changeCase', context: 'visual'},
+ { keys: '<C-w>', type: 'operatorMotion', operator: 'delete', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }, context: 'insert' },
+ { keys: '<C-i>', type: 'action', action: 'jumpListWalk', actionArgs: { forward: true }},
+ { keys: '<C-o>', type: 'action', action: 'jumpListWalk', actionArgs: { forward: false }},
+ { keys: '<C-e>', type: 'action', action: 'scroll', actionArgs: { forward: true, linewise: true }},
+ { keys: '<C-y>', type: 'action', action: 'scroll', actionArgs: { forward: false, linewise: true }},
+ { keys: 'a', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'charAfter' }, context: 'normal' },
+ { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'eol' }, context: 'normal' },
+ { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'endOfSelectedArea' }, context: 'visual' },
+ { keys: 'i', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'inplace' }, context: 'normal' },
+ { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'firstNonBlank'}, context: 'normal' },
+ { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'startOfSelectedArea' }, context: 'visual' },
+ { keys: 'o', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: true }, context: 'normal' },
+ { keys: 'O', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: false }, context: 'normal' },
+ { keys: 'v', type: 'action', action: 'toggleVisualMode' },
+ { keys: 'V', type: 'action', action: 'toggleVisualMode', actionArgs: { linewise: true }},
+ { keys: '<C-v>', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true }},
+ { keys: 'gv', type: 'action', action: 'reselectLastSelection' },
+ { keys: 'J', type: 'action', action: 'joinLines', isEdit: true },
+ { keys: 'p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true }},
+ { keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true }},
+ { keys: 'r<character>', type: 'action', action: 'replace', isEdit: true },
+ { keys: '@<character>', type: 'action', action: 'replayMacro' },
+ { keys: 'q<character>', type: 'action', action: 'enterMacroRecordMode' },
+ { keys: 'R', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { replace: true }},
+ { keys: 'u', type: 'action', action: 'undo', context: 'normal' },
+ { keys: 'u', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, context: 'visual', isEdit: true },
+ { keys: 'U', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, context: 'visual', isEdit: true },
+ { keys: '<C-r>', type: 'action', action: 'redo' },
+ { keys: 'm<character>', type: 'action', action: 'setMark' },
+ { keys: '"<character>', type: 'action', action: 'setRegister' },
+ { keys: 'zz', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }},
+ { keys: 'z.', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }, motion: 'moveToFirstNonWhiteSpaceCharacter' },
+ { keys: 'zt', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }},
+ { keys: 'z<CR>', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }, motion: 'moveToFirstNonWhiteSpaceCharacter' },
+ { keys: 'z-', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }},
+ { keys: 'zb', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }, motion: 'moveToFirstNonWhiteSpaceCharacter' },
+ { keys: '.', type: 'action', action: 'repeatLastEdit' },
+ { keys: '<C-a>', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: true, backtrack: false}},
+ { keys: '<C-x>', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: false, backtrack: false}},
+ { keys: 'a<character>', type: 'motion', motion: 'textObjectManipulation' },
+ { keys: 'i<character>', type: 'motion', motion: 'textObjectManipulation', motionArgs: { textObjectInner: true }},
+ { keys: '/', type: 'search', searchArgs: { forward: true, querySrc: 'prompt', toJumplist: true }},
+ { keys: '?', type: 'search', searchArgs: { forward: false, querySrc: 'prompt', toJumplist: true }},
+ { keys: '*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }},
+ { keys: '#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }},
+ { keys: 'g*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', toJumplist: true }},
+ { keys: 'g#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', toJumplist: true }},
+ { keys: ':', type: 'ex' }
+ ];
+
+ var Pos = CodeMirror.Pos;
+
+ var Vim = function() { return vimApi; } //{
+ function enterVimMode(cm) {
+ cm.setOption('disableInput', true);
+ cm.setOption('showCursorWhenSelecting', false);
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
+ cm.on('cursorActivity', onCursorActivity);
+ maybeInitVimState(cm);
+ CodeMirror.on(cm.getInputField(), 'paste', getOnPasteFn(cm));
+ }
+
+ function leaveVimMode(cm) {
+ cm.setOption('disableInput', false);
+ cm.off('cursorActivity', onCursorActivity);
+ CodeMirror.off(cm.getInputField(), 'paste', getOnPasteFn(cm));
+ cm.state.vim = null;
+ }
+
+ function detachVimMap(cm, next) {
+ if (this == CodeMirror.keyMap.vim)
+ CodeMirror.rmClass(cm.getWrapperElement(), "cm-fat-cursor");
+
+ if (!next || next.attach != attachVimMap)
+ leaveVimMode(cm, false);
+ }
+ function attachVimMap(cm, prev) {
+ if (this == CodeMirror.keyMap.vim)
+ CodeMirror.addClass(cm.getWrapperElement(), "cm-fat-cursor");
+
+ if (!prev || prev.attach != attachVimMap)
+ enterVimMode(cm);
+ }
+ CodeMirror.defineOption('vimMode', false, function(cm, val, prev) {
+ if (val && cm.getOption("keyMap") != "vim")
+ cm.setOption("keyMap", "vim");
+ else if (!val && prev != CodeMirror.Init && /^vim/.test(cm.getOption("keyMap")))
+ cm.setOption("keyMap", "default");
+ });
+
+ function cmKey(key, cm) {
+ if (!cm) { return undefined; }
+ var vimKey = cmKeyToVimKey(key);
+ if (!vimKey) {
+ return false;
+ }
+ var cmd = CodeMirror.Vim.findKey(cm, vimKey);
+ if (typeof cmd == 'function') {
+ CodeMirror.signal(cm, 'vim-keypress', vimKey);
+ }
+ return cmd;
+ }
+
+ var modifiers = {'Shift': 'S', 'Ctrl': 'C', 'Alt': 'A', 'Cmd': 'D', 'Mod': 'A'};
+ var specialKeys = {Enter:'CR',Backspace:'BS',Delete:'Del'};
+ function cmKeyToVimKey(key) {
+ if (key.charAt(0) == '\'') {
+ return key.charAt(1);
+ }
+ var pieces = key.split('-');
+ if (/-$/.test(key)) {
+ pieces.splice(-2, 2, '-');
+ }
+ var lastPiece = pieces[pieces.length - 1];
+ if (pieces.length == 1 && pieces[0].length == 1) {
+ return false;
+ } else if (pieces.length == 2 && pieces[0] == 'Shift' && lastPiece.length == 1) {
+ return false;
+ }
+ var hasCharacter = false;
+ for (var i = 0; i < pieces.length; i++) {
+ var piece = pieces[i];
+ if (piece in modifiers) { pieces[i] = modifiers[piece]; }
+ else { hasCharacter = true; }
+ if (piece in specialKeys) { pieces[i] = specialKeys[piece]; }
+ }
+ if (!hasCharacter) {
+ return false;
+ }
+ if (isUpperCase(lastPiece)) {
+ pieces[pieces.length - 1] = lastPiece.toLowerCase();
+ }
+ return '<' + pieces.join('-') + '>';
+ }
+
+ function getOnPasteFn(cm) {
+ var vim = cm.state.vim;
+ if (!vim.onPasteFn) {
+ vim.onPasteFn = function() {
+ if (!vim.insertMode) {
+ cm.setCursor(offsetCursor(cm.getCursor(), 0, 1));
+ actions.enterInsertMode(cm, {}, vim);
+ }
};
- var onCompositionStartOverride = function(text) {
- if (util.currentMode === "insert") {
- this.onCompositionStartOrig(text);
- }
+ }
+ return vim.onPasteFn;
+ }
+
+ var numberRegex = /[\d]/;
+ var wordCharTest = [CodeMirror.isWordChar, function(ch) {
+ return ch && !CodeMirror.isWordChar(ch) && !/\s/.test(ch);
+ }], bigWordCharTest = [function(ch) {
+ return /\S/.test(ch);
+ }];
+ function makeKeyRange(start, size) {
+ var keys = [];
+ for (var i = start; i < start + size; i++) {
+ keys.push(String.fromCharCode(i));
+ }
+ return keys;
+ }
+ var upperCaseAlphabet = makeKeyRange(65, 26);
+ var lowerCaseAlphabet = makeKeyRange(97, 26);
+ var numbers = makeKeyRange(48, 10);
+ var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['<', '>']);
+ var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['-', '"', '.', ':', '/']);
+
+ function isLine(cm, line) {
+ return line >= cm.firstLine() && line <= cm.lastLine();
+ }
+ function isLowerCase(k) {
+ return (/^[a-z]$/).test(k);
+ }
+ function isMatchableSymbol(k) {
+ return '()[]{}'.indexOf(k) != -1;
+ }
+ function isNumber(k) {
+ return numberRegex.test(k);
+ }
+ function isUpperCase(k) {
+ return (/^[A-Z]$/).test(k);
+ }
+ function isWhiteSpaceString(k) {
+ return (/^\s*$/).test(k);
+ }
+ function inArray(val, arr) {
+ for (var i = 0; i < arr.length; i++) {
+ if (arr[i] == val) {
+ return true;
}
- if (enable) {
- if (!editor.onCompositionUpdateOrig) {
- editor.onCompositionUpdateOrig = editor.onCompositionUpdate;
- editor.onCompositionUpdate = onCompositionUpdateOverride;
- editor.onCompositionStartOrig = editor.onCompositionStart;
- editor.onCompositionStart = onCompositionStartOverride;
- }
+ }
+ return false;
+ }
+
+ var options = {};
+ function defineOption(name, defaultValue, type, aliases, callback) {
+ if (defaultValue === undefined && !callback) {
+ throw Error('defaultValue is required unless callback is provided');
+ }
+ if (!type) { type = 'string'; }
+ options[name] = {
+ type: type,
+ defaultValue: defaultValue,
+ callback: callback
+ };
+ if (aliases) {
+ for (var i = 0; i < aliases.length; i++) {
+ options[aliases[i]] = options[name];
+ }
+ }
+ if (defaultValue) {
+ setOption(name, defaultValue);
+ }
+ }
+
+ function setOption(name, value, cm, cfg) {
+ var option = options[name];
+ cfg = cfg || {};
+ var scope = cfg.scope;
+ if (!option) {
+ throw Error('Unknown option: ' + name);
+ }
+ if (option.type == 'boolean') {
+ if (value && value !== true) {
+ throw Error('Invalid argument: ' + name + '=' + value);
+ } else if (value !== false) {
+ value = true;
+ }
+ }
+ if (option.callback) {
+ if (scope !== 'local') {
+ option.callback(value, undefined);
+ }
+ if (scope !== 'global' && cm) {
+ option.callback(value, cm);
+ }
+ } else {
+ if (scope !== 'local') {
+ option.value = option.type == 'boolean' ? !!value : value;
+ }
+ if (scope !== 'global' && cm) {
+ cm.state.vim.options[name] = {value: value};
+ }
+ }
+ }
+
+ function getOption(name, cm, cfg) {
+ var option = options[name];
+ cfg = cfg || {};
+ var scope = cfg.scope;
+ if (!option) {
+ throw Error('Unknown option: ' + name);
+ }
+ if (option.callback) {
+ var local = cm && option.callback(undefined, cm);
+ if (scope !== 'global' && local !== undefined) {
+ return local;
+ }
+ if (scope !== 'local') {
+ return option.callback();
+ }
+ return;
+ } else {
+ var local = (scope !== 'global') && (cm && cm.state.vim.options[name]);
+ return (local || (scope !== 'local') && option || {}).value;
+ }
+ }
+
+ defineOption('filetype', undefined, 'string', ['ft'], function(name, cm) {
+ if (cm === undefined) {
+ return;
+ }
+ if (name === undefined) {
+ var mode = cm.getMode().name;
+ return mode == 'null' ? '' : mode;
+ } else {
+ var mode = name == '' ? 'null' : name;
+ cm.setOption('mode', mode);
+ }
+ });
+
+ var createCircularJumpList = function() {
+ var size = 100;
+ var pointer = -1;
+ var head = 0;
+ var tail = 0;
+ var buffer = new Array(size);
+ function add(cm, oldCur, newCur) {
+ var current = pointer % size;
+ var curMark = buffer[current];
+ function useNextSlot(cursor) {
+ var next = ++pointer % size;
+ var trashMark = buffer[next];
+ if (trashMark) {
+ trashMark.clear();
+ }
+ buffer[next] = cm.setBookmark(cursor);
+ }
+ if (curMark) {
+ var markPos = curMark.find();
+ if (markPos && !cursorEqual(markPos, oldCur)) {
+ useNextSlot(oldCur);
+ }
} else {
- if (editor.onCompositionUpdateOrig) {
- editor.onCompositionUpdate = editor.onCompositionUpdateOrig;
- editor.onCompositionUpdateOrig = null;
- editor.onCompositionStart = editor.onCompositionStartOrig;
- editor.onCompositionStartOrig = null;
+ useNextSlot(oldCur);
+ }
+ useNextSlot(newCur);
+ head = pointer;
+ tail = pointer - size + 1;
+ if (tail < 0) {
+ tail = 0;
+ }
+ }
+ function move(cm, offset) {
+ pointer += offset;
+ if (pointer > head) {
+ pointer = head;
+ } else if (pointer < tail) {
+ pointer = tail;
+ }
+ var mark = buffer[(size + pointer) % size];
+ if (mark && !mark.find()) {
+ var inc = offset > 0 ? 1 : -1;
+ var newCur;
+ var oldCur = cm.getCursor();
+ do {
+ pointer += inc;
+ mark = buffer[(size + pointer) % size];
+ if (mark &&
+ (newCur = mark.find()) &&
+ !cursorEqual(oldCur, newCur)) {
+ break;
}
+ } while (pointer < head && pointer > tail);
}
- },
+ return mark;
+ }
+ return {
+ cachedCursor: undefined, //used for # and * jumps
+ add: add,
+ move: move
+ };
+ };
+ var createInsertModeChanges = function(c) {
+ if (c) {
+ return {
+ changes: c.changes,
+ expectCursorActivityForChange: c.expectCursorActivityForChange
+ };
+ }
+ return {
+ changes: [],
+ expectCursorActivityForChange: false
+ };
+ };
- handleKeyboard: function(data, hashId, key, keyCode, e) {
- if (hashId != 0 && (key == "" || key == "\x00"))
- return null;
-
- var editor = data.editor;
-
- if (hashId == 1)
- key = "ctrl-" + key;
- if (key == "ctrl-c") {
- if (!useragent.isMac && editor.getCopyText()) {
- editor.once("copy", function() {
- if (data.state == "start")
- coreCommands.stop.exec(editor);
- else
- editor.selection.clearSelection();
- });
- return {command: "null", passEvent: true};
- }
- return {command: coreCommands.stop};
- } else if ((key == "esc" && hashId == 0) || key == "ctrl-[") {
- return {command: coreCommands.stop};
- } else if (data.state == "start") {
- if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) {
- hashId = -1;
- key = data.inputChar;
+ function MacroModeState() {
+ this.latestRegister = undefined;
+ this.isPlaying = false;
+ this.isRecording = false;
+ this.replaySearchQueries = [];
+ this.onRecordingDone = undefined;
+ this.lastInsertModeChanges = createInsertModeChanges();
+ }
+ MacroModeState.prototype = {
+ exitMacroRecordMode: function() {
+ var macroModeState = vimGlobalState.macroModeState;
+ if (macroModeState.onRecordingDone) {
+ macroModeState.onRecordingDone(); // close dialog
+ }
+ macroModeState.onRecordingDone = undefined;
+ macroModeState.isRecording = false;
+ },
+ enterMacroRecordMode: function(cm, registerName) {
+ var register =
+ vimGlobalState.registerController.getRegister(registerName);
+ if (register) {
+ register.clear();
+ this.latestRegister = registerName;
+ if (cm.openDialog) {
+ this.onRecordingDone = cm.openDialog(
+ '(recording)['+registerName+']', null, {bottom:true});
+ }
+ this.isRecording = true;
+ }
+ }
+ };
+
+ function maybeInitVimState(cm) {
+ if (!cm.state.vim) {
+ cm.state.vim = {
+ inputState: new InputState(),
+ lastEditInputState: undefined,
+ lastEditActionCommand: undefined,
+ lastHPos: -1,
+ lastHSPos: -1,
+ lastMotion: null,
+ marks: {},
+ fakeCursor: null,
+ insertMode: false,
+ insertModeRepeat: undefined,
+ visualMode: false,
+ visualLine: false,
+ visualBlock: false,
+ lastSelection: null,
+ lastPastedText: null,
+ sel: {},
+ options: {}
+ };
+ }
+ return cm.state.vim;
+ }
+ var vimGlobalState;
+ function resetVimGlobalState() {
+ vimGlobalState = {
+ searchQuery: null,
+ searchIsReversed: false,
+ lastSubstituteReplacePart: undefined,
+ jumpList: createCircularJumpList(),
+ macroModeState: new MacroModeState,
+ lastChararacterSearch: {increment:0, forward:true, selectedCharacter:''},
+ registerController: new RegisterController({}),
+ searchHistoryController: new HistoryController({}),
+ exCommandHistoryController : new HistoryController({})
+ };
+ for (var optionName in options) {
+ var option = options[optionName];
+ option.value = option.defaultValue;
+ }
+ }
+
+ var lastInsertModeKeyTimer;
+ var vimApi= {
+ buildKeyMap: function() {
+ },
+ getRegisterController: function() {
+ return vimGlobalState.registerController;
+ },
+ resetVimGlobalState_: resetVimGlobalState,
+ getVimGlobalState_: function() {
+ return vimGlobalState;
+ },
+ maybeInitVimState_: maybeInitVimState,
+
+ suppressErrorLogging: false,
+
+ InsertModeKey: InsertModeKey,
+ map: function(lhs, rhs, ctx) {
+ exCommandDispatcher.map(lhs, rhs, ctx);
+ },
+ unmap: function(lhs, ctx) {
+ exCommandDispatcher.unmap(lhs, ctx);
+ },
+ setOption: setOption,
+ getOption: getOption,
+ defineOption: defineOption,
+ defineEx: function(name, prefix, func){
+ if (name.indexOf(prefix) !== 0) {
+ throw new Error('(Vim.defineEx) "'+prefix+'" is not a prefix of "'+name+'", command not registered');
+ }
+ exCommands[name]=func;
+ exCommandDispatcher.commandMap_[prefix]={name:name, shortName:prefix, type:'api'};
+ },
+ handleKey: function (cm, key, origin) {
+ var command = this.findKey(cm, key, origin);
+ if (typeof command === 'function') {
+ return command();
+ }
+ },
+ findKey: function(cm, key, origin) {
+ var vim = maybeInitVimState(cm);
+ function handleMacroRecording() {
+ var macroModeState = vimGlobalState.macroModeState;
+ if (macroModeState.isRecording) {
+ if (key == 'q') {
+ macroModeState.exitMacroRecordMode();
+ clearInputState(cm);
+ return true;
}
-
- if (hashId == -1 || hashId == 1 || hashId == 0 && key.length > 1) {
- if (cmds.inputBuffer.idle && startCommands[key])
- return startCommands[key];
- cmds.inputBuffer.push(editor, key);
- return {command: "null", passEvent: false};
- } // if no modifier || shift: wait for input.
- else if (key.length == 1 && (hashId == 0 || hashId == 4)) {
- return {command: "null", passEvent: true};
- } else if (key == "esc" && hashId == 0) {
- return {command: coreCommands.stop};
+ if (origin != 'mapping') {
+ logKey(macroModeState, key);
}
- } else {
- if (key == "ctrl-w") {
- return {command: "removewordleft"};
+ }
+ }
+ function handleEsc() {
+ if (key == '<Esc>') {
+ clearInputState(cm);
+ if (vim.visualMode) {
+ exitVisualMode(cm);
+ } else if (vim.insertMode) {
+ exitInsertMode(cm);
}
+ return true;
+ }
+ }
+ function doKeyToKey(keys) {
+ var match;
+ while (keys) {
+ match = (/<\w+-.+?>|<\w+>|./).exec(keys);
+ key = match[0];
+ keys = keys.substring(match.index + key.length);
+ CodeMirror.Vim.handleKey(cm, key, 'mapping');
+ }
}
- },
- attach: function(editor) {
- editor.on("click", exports.onCursorMove);
- if (util.currentMode !== "insert")
- cmds.coreCommands.stop.exec(editor);
- editor.$vimModeHandler = this;
-
- this.updateMacCompositionHandlers(editor, true);
- },
+ function handleKeyInsertMode() {
+ if (handleEsc()) { return true; }
+ var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key;
+ var keysAreChars = key.length == 1;
+ var match = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert');
+ while (keys.length > 1 && match.type != 'full') {
+ var keys = vim.inputState.keyBuffer = keys.slice(1);
+ var thisMatch = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert');
+ if (thisMatch.type != 'none') { match = thisMatch; }
+ }
+ if (match.type == 'none') { clearInputState(cm); return false; }
+ else if (match.type == 'partial') {
+ if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); }
+ lastInsertModeKeyTimer = window.setTimeout(
+ function() { if (vim.insertMode && vim.inputState.keyBuffer) { clearInputState(cm); } },
+ getOption('insertModeEscKeysTimeout'));
+ return !keysAreChars;
+ }
- detach: function(editor) {
- editor.removeListener("click", exports.onCursorMove);
- util.noMode(editor);
- util.currentMode = "normal";
- this.updateMacCompositionHandlers(editor, false);
- },
+ if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); }
+ if (keysAreChars) {
+ var here = cm.getCursor();
+ cm.replaceRange('', offsetCursor(here, 0, -(keys.length - 1)), here, '+input');
+ }
+ clearInputState(cm);
+ return match.command;
+ }
- actions: cmds.actions,
- getStatusText: function() {
- if (util.currentMode == "insert")
- return "INSERT";
- if (util.onVisualMode)
- return (util.onVisualLineMode ? "VISUAL LINE " : "VISUAL ") + cmds.inputBuffer.status;
- return cmds.inputBuffer.status;
- }
-};
+ function handleKeyNonInsertMode() {
+ if (handleMacroRecording() || handleEsc()) { return true; };
+ var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key;
+ if (/^[1-9]\d*$/.test(keys)) { return true; }
-exports.onCursorMove = function(e) {
- cmds.onCursorMove(e.editor, e);
- exports.onCursorMove.scheduled = false;
-};
+ var keysMatcher = /^(\d*)(.*)$/.exec(keys);
+ if (!keysMatcher) { clearInputState(cm); return false; }
+ var context = vim.visualMode ? 'visual' :
+ 'normal';
+ var match = commandDispatcher.matchCommand(keysMatcher[2] || keysMatcher[1], defaultKeymap, vim.inputState, context);
+ if (match.type == 'none') { clearInputState(cm); return false; }
+ else if (match.type == 'partial') { return true; }
-});
-
-ace.define('ace/keyboard/vim/commands', ['require', 'exports', 'module' , 'ace/lib/lang', 'ace/keyboard/vim/maps/util', 'ace/keyboard/vim/maps/motions', 'ace/keyboard/vim/maps/operators', 'ace/keyboard/vim/maps/aliases', 'ace/keyboard/vim/registers'], function(require, exports, module) {
-
-"never use strict";
-
-var lang = require("../../lib/lang");
-var util = require("./maps/util");
-var motions = require("./maps/motions");
-var operators = require("./maps/operators");
-var alias = require("./maps/aliases");
-var registers = require("./registers");
-
-var NUMBER = 1;
-var OPERATOR = 2;
-var MOTION = 3;
-var ACTION = 4;
-var HMARGIN = 8; // Minimum amount of line separation between margins;
-
-var repeat = function repeat(fn, count, args) {
- while (0 < count--)
- fn.apply(this, args);
-};
+ vim.inputState.keyBuffer = '';
+ var keysMatcher = /^(\d*)(.*)$/.exec(keys);
+ if (keysMatcher[1] && keysMatcher[1] != '0') {
+ vim.inputState.pushRepeatDigit(keysMatcher[1]);
+ }
+ return match.command;
+ }
-var ensureScrollMargin = function(editor) {
- var renderer = editor.renderer;
- var pos = renderer.$cursorLayer.getPixelPosition();
+ var command;
+ if (vim.insertMode) { command = handleKeyInsertMode(); }
+ else { command = handleKeyNonInsertMode(); }
+ if (command === false) {
+ return undefined;
+ } else if (command === true) {
+ return function() {};
+ } else {
+ return function() {
+ return cm.operation(function() {
+ cm.curOp.isVimOp = true;
+ try {
+ if (command.type == 'keyToKey') {
+ doKeyToKey(command.toKeys);
+ } else {
+ commandDispatcher.processCommand(cm, vim, command);
+ }
+ } catch (e) {
+ cm.state.vim = undefined;
+ maybeInitVimState(cm);
+ if (!CodeMirror.Vim.suppressErrorLogging) {
+ console['log'](e);
+ }
+ throw e;
+ }
+ return true;
+ });
+ };
+ }
+ },
+ handleEx: function(cm, input) {
+ exCommandDispatcher.processCommand(cm, input);
+ },
- var top = pos.top;
+ defineMotion: defineMotion,
+ defineAction: defineAction,
+ defineOperator: defineOperator,
+ mapCommand: mapCommand,
+ _mapCommand: _mapCommand,
- var margin = HMARGIN * renderer.layerConfig.lineHeight;
- if (2 * margin > renderer.$size.scrollerHeight)
- margin = renderer.$size.scrollerHeight / 2;
+ exitVisualMode: exitVisualMode,
+ exitInsertMode: exitInsertMode
+ };
+ function InputState() {
+ this.prefixRepeat = [];
+ this.motionRepeat = [];
- if (renderer.scrollTop > top - margin) {
- renderer.session.setScrollTop(top - margin);
+ this.operator = null;
+ this.operatorArgs = null;
+ this.motion = null;
+ this.motionArgs = null;
+ this.keyBuffer = []; // For matching multi-key commands.
+ this.registerName = null; // Defaults to the unnamed register.
}
+ InputState.prototype.pushRepeatDigit = function(n) {
+ if (!this.operator) {
+ this.prefixRepeat = this.prefixRepeat.concat(n);
+ } else {
+ this.motionRepeat = this.motionRepeat.concat(n);
+ }
+ };
+ InputState.prototype.getRepeat = function() {
+ var repeat = 0;
+ if (this.prefixRepeat.length > 0 || this.motionRepeat.length > 0) {
+ repeat = 1;
+ if (this.prefixRepeat.length > 0) {
+ repeat *= parseInt(this.prefixRepeat.join(''), 10);
+ }
+ if (this.motionRepeat.length > 0) {
+ repeat *= parseInt(this.motionRepeat.join(''), 10);
+ }
+ }
+ return repeat;
+ };
- if (renderer.scrollTop + renderer.$size.scrollerHeight < top + margin + renderer.lineHeight) {
- renderer.session.setScrollTop(top + margin + renderer.lineHeight - renderer.$size.scrollerHeight);
+ function clearInputState(cm, reason) {
+ cm.state.vim.inputState = new InputState();
+ CodeMirror.signal(cm, 'vim-command-done', reason);
}
-};
-
-var actions = exports.actions = {
- "z": {
- param: true,
- fn: function(editor, range, count, param) {
- switch (param) {
- case "z":
- editor.renderer.alignCursor(null, 0.5);
- break;
- case "t":
- editor.renderer.alignCursor(null, 0);
- break;
- case "b":
- editor.renderer.alignCursor(null, 1);
- break;
- case "c":
- editor.session.onFoldWidgetClick(range.start.row, {domEvent:{target :{}}});
- break;
- case "o":
- editor.session.onFoldWidgetClick(range.start.row, {domEvent:{target :{}}});
- break;
- case "C":
- editor.session.foldAll();
- break;
- case "O":
- editor.session.unfold();
- break;
- }
+ function Register(text, linewise, blockwise) {
+ this.clear();
+ this.keyBuffer = [text || ''];
+ this.insertModeChanges = [];
+ this.searchQueries = [];
+ this.linewise = !!linewise;
+ this.blockwise = !!blockwise;
+ }
+ Register.prototype = {
+ setText: function(text, linewise, blockwise) {
+ this.keyBuffer = [text || ''];
+ this.linewise = !!linewise;
+ this.blockwise = !!blockwise;
+ },
+ pushText: function(text, linewise) {
+ if (linewise) {
+ if (!this.linewise) {
+ this.keyBuffer.push('\n');
+ }
+ this.linewise = true;
}
- },
- "r": {
- param: true,
- fn: function(editor, range, count, param) {
- if (param && param.length) {
- if (param.length > 1)
- param = param == "return" ? "\n" : param == "tab" ? "\t" : param;
- repeat(function() { editor.insert(param); }, count || 1);
- editor.navigateLeft();
- }
+ this.keyBuffer.push(text);
+ },
+ pushInsertModeChanges: function(changes) {
+ this.insertModeChanges.push(createInsertModeChanges(changes));
+ },
+ pushSearchQuery: function(query) {
+ this.searchQueries.push(query);
+ },
+ clear: function() {
+ this.keyBuffer = [];
+ this.insertModeChanges = [];
+ this.searchQueries = [];
+ this.linewise = false;
+ },
+ toString: function() {
+ return this.keyBuffer.join('');
+ }
+ };
+ function RegisterController(registers) {
+ this.registers = registers;
+ this.unnamedRegister = registers['"'] = new Register();
+ registers['.'] = new Register();
+ registers[':'] = new Register();
+ registers['/'] = new Register();
+ }
+ RegisterController.prototype = {
+ pushText: function(registerName, operator, text, linewise, blockwise) {
+ if (linewise && text.charAt(0) == '\n') {
+ text = text.slice(1) + '\n';
}
- },
- "R": {
- fn: function(editor, range, count, param) {
- util.insertMode(editor);
- editor.setOverwrite(true);
+ if (linewise && text.charAt(text.length - 1) !== '\n'){
+ text += '\n';
}
- },
- "~": {
- fn: function(editor, range, count) {
- repeat(function() {
- var range = editor.selection.getRange();
- if (range.isEmpty())
- range.end.column++;
- var text = editor.session.getTextRange(range);
- var toggled = text.toUpperCase();
- if (toggled == text)
- editor.navigateRight();
- else
- editor.session.replace(range, toggled);
- }, count || 1);
+ var register = this.isValidRegister(registerName) ?
+ this.getRegister(registerName) : null;
+ if (!register) {
+ switch (operator) {
+ case 'yank':
+ this.registers['0'] = new Register(text, linewise, blockwise);
+ break;
+ case 'delete':
+ case 'change':
+ if (text.indexOf('\n') == -1) {
+ this.registers['-'] = new Register(text, linewise);
+ } else {
+ this.shiftNumericRegisters_();
+ this.registers['1'] = new Register(text, linewise);
+ }
+ break;
+ }
+ this.unnamedRegister.setText(text, linewise, blockwise);
+ return;
}
- },
- "*": {
- fn: function(editor, range, count, param) {
- editor.selection.selectWord();
- editor.findNext();
- ensureScrollMargin(editor);
- var r = editor.selection.getRange();
- editor.selection.setSelectionRange(r, true);
+ var append = isUpperCase(registerName);
+ if (append) {
+ register.pushText(text, linewise);
+ } else {
+ register.setText(text, linewise, blockwise);
}
- },
- "#": {
- fn: function(editor, range, count, param) {
- editor.selection.selectWord();
- editor.findPrevious();
- ensureScrollMargin(editor);
- var r = editor.selection.getRange();
- editor.selection.setSelectionRange(r, true);
+ this.unnamedRegister.setText(register.toString(), linewise);
+ },
+ getRegister: function(name) {
+ if (!this.isValidRegister(name)) {
+ return this.unnamedRegister;
}
- },
- "m": {
- param: true,
- fn: function(editor, range, count, param) {
- var s = editor.session;
- var markers = s.vimMarkers || (s.vimMarkers = {});
- var c = editor.getCursorPosition();
- if (!markers[param]) {
- markers[param] = editor.session.doc.createAnchor(c);
+ name = name.toLowerCase();
+ if (!this.registers[name]) {
+ this.registers[name] = new Register();
+ }
+ return this.registers[name];
+ },
+ isValidRegister: function(name) {
+ return name && inArray(name, validRegisters);
+ },
+ shiftNumericRegisters_: function() {
+ for (var i = 9; i >= 2; i--) {
+ this.registers[i] = this.getRegister('' + (i - 1));
+ }
+ }
+ };
+ function HistoryController() {
+ this.historyBuffer = [];
+ this.iterator;
+ this.initialPrefix = null;
+ }
+ HistoryController.prototype = {
+ nextMatch: function (input, up) {
+ var historyBuffer = this.historyBuffer;
+ var dir = up ? -1 : 1;
+ if (this.initialPrefix === null) this.initialPrefix = input;
+ for (var i = this.iterator + dir; up ? i >= 0 : i < historyBuffer.length; i+= dir) {
+ var element = historyBuffer[i];
+ for (var j = 0; j <= element.length; j++) {
+ if (this.initialPrefix == element.substring(0, j)) {
+ this.iterator = i;
+ return element;
}
- markers[param].setPosition(c.row, c.column, true);
+ }
}
- },
- "n": {
- fn: function(editor, range, count, param) {
- var options = editor.getLastSearchOptions();
- options.backwards = false;
-
- editor.selection.moveCursorRight();
- editor.selection.clearSelection();
- editor.findNext(options);
-
- ensureScrollMargin(editor);
- var r = editor.selection.getRange();
- r.end.row = r.start.row;
- r.end.column = r.start.column;
- editor.selection.setSelectionRange(r, true);
+ if (i >= historyBuffer.length) {
+ this.iterator = historyBuffer.length;
+ return this.initialPrefix;
}
- },
- "N": {
- fn: function(editor, range, count, param) {
- var options = editor.getLastSearchOptions();
- options.backwards = true;
-
- editor.findPrevious(options);
- ensureScrollMargin(editor);
- var r = editor.selection.getRange();
- r.end.row = r.start.row;
- r.end.column = r.start.column;
- editor.selection.setSelectionRange(r, true);
+ if (i < 0 ) return input;
+ },
+ pushInput: function(input) {
+ var index = this.historyBuffer.indexOf(input);
+ if (index > -1) this.historyBuffer.splice(index, 1);
+ if (input.length) this.historyBuffer.push(input);
+ },
+ reset: function() {
+ this.initialPrefix = null;
+ this.iterator = this.historyBuffer.length;
+ }
+ };
+ var commandDispatcher = {
+ matchCommand: function(keys, keyMap, inputState, context) {
+ var matches = commandMatches(keys, keyMap, context, inputState);
+ if (!matches.full && !matches.partial) {
+ return {type: 'none'};
+ } else if (!matches.full && matches.partial) {
+ return {type: 'partial'};
}
- },
- "v": {
- fn: function(editor, range, count, param) {
- editor.selection.selectRight();
- util.visualMode(editor, false);
- },
- acceptsMotion: true
- },
- "V": {
- fn: function(editor, range, count, param) {
- var row = editor.getCursorPosition().row;
- editor.selection.clearSelection();
- editor.selection.moveCursorTo(row, 0);
- editor.selection.selectLineEnd();
- editor.selection.visualLineStart = row;
- util.visualMode(editor, true);
- },
- acceptsMotion: true
- },
- "Y": {
- fn: function(editor, range, count, param) {
- util.copyLine(editor);
+ var bestMatch;
+ for (var i = 0; i < matches.full.length; i++) {
+ var match = matches.full[i];
+ if (!bestMatch) {
+ bestMatch = match;
+ }
}
- },
- "p": {
- fn: function(editor, range, count, param) {
- var defaultReg = registers._default;
-
- editor.setOverwrite(false);
- if (defaultReg.isLine) {
- var pos = editor.getCursorPosition();
- pos.column = editor.session.getLine(pos.row).length;
- var text = lang.stringRepeat("\n" + defaultReg.text, count || 1);
- editor.session.insert(pos, text);
- editor.moveCursorTo(pos.row + 1, 0);
- }
- else {
- editor.navigateRight();
- editor.insert(lang.stringRepeat(defaultReg.text, count || 1));
- editor.navigateLeft();
- }
- editor.setOverwrite(true);
- editor.selection.clearSelection();
+ if (bestMatch.keys.slice(-11) == '<character>') {
+ inputState.selectedCharacter = lastChar(keys);
}
- },
- "P": {
- fn: function(editor, range, count, param) {
- var defaultReg = registers._default;
- editor.setOverwrite(false);
-
- if (defaultReg.isLine) {
- var pos = editor.getCursorPosition();
- pos.column = 0;
- var text = lang.stringRepeat(defaultReg.text + "\n", count || 1);
- editor.session.insert(pos, text);
- editor.moveCursorToPosition(pos);
+ return {type: 'full', command: bestMatch};
+ },
+ processCommand: function(cm, vim, command) {
+ vim.inputState.repeatOverride = command.repeatOverride;
+ switch (command.type) {
+ case 'motion':
+ this.processMotion(cm, vim, command);
+ break;
+ case 'operator':
+ this.processOperator(cm, vim, command);
+ break;
+ case 'operatorMotion':
+ this.processOperatorMotion(cm, vim, command);
+ break;
+ case 'action':
+ this.processAction(cm, vim, command);
+ break;
+ case 'search':
+ this.processSearch(cm, vim, command);
+ break;
+ case 'ex':
+ case 'keyToEx':
+ this.processEx(cm, vim, command);
+ break;
+ default:
+ break;
+ }
+ },
+ processMotion: function(cm, vim, command) {
+ vim.inputState.motion = command.motion;
+ vim.inputState.motionArgs = copyArgs(command.motionArgs);
+ this.evalInput(cm, vim);
+ },
+ processOperator: function(cm, vim, command) {
+ var inputState = vim.inputState;
+ if (inputState.operator) {
+ if (inputState.operator == command.operator) {
+ inputState.motion = 'expandToLine';
+ inputState.motionArgs = { linewise: true };
+ this.evalInput(cm, vim);
+ return;
+ } else {
+ clearInputState(cm);
+ }
+ }
+ inputState.operator = command.operator;
+ inputState.operatorArgs = copyArgs(command.operatorArgs);
+ if (vim.visualMode) {
+ this.evalInput(cm, vim);
+ }
+ },
+ processOperatorMotion: function(cm, vim, command) {
+ var visualMode = vim.visualMode;
+ var operatorMotionArgs = copyArgs(command.operatorMotionArgs);
+ if (operatorMotionArgs) {
+ if (visualMode && operatorMotionArgs.visualLine) {
+ vim.visualLine = true;
+ }
+ }
+ this.processOperator(cm, vim, command);
+ if (!visualMode) {
+ this.processMotion(cm, vim, command);
+ }
+ },
+ processAction: function(cm, vim, command) {
+ var inputState = vim.inputState;
+ var repeat = inputState.getRepeat();
+ var repeatIsExplicit = !!repeat;
+ var actionArgs = copyArgs(command.actionArgs) || {};
+ if (inputState.selectedCharacter) {
+ actionArgs.selectedCharacter = inputState.selectedCharacter;
+ }
+ if (command.operator) {
+ this.processOperator(cm, vim, command);
+ }
+ if (command.motion) {
+ this.processMotion(cm, vim, command);
+ }
+ if (command.motion || command.operator) {
+ this.evalInput(cm, vim);
+ }
+ actionArgs.repeat = repeat || 1;
+ actionArgs.repeatIsExplicit = repeatIsExplicit;
+ actionArgs.registerName = inputState.registerName;
+ clearInputState(cm);
+ vim.lastMotion = null;
+ if (command.isEdit) {
+ this.recordLastEdit(vim, inputState, command);
+ }
+ actions[command.action](cm, actionArgs, vim);
+ },
+ processSearch: function(cm, vim, command) {
+ if (!cm.getSearchCursor) {
+ return;
+ }
+ var forward = command.searchArgs.forward;
+ var wholeWordOnly = command.searchArgs.wholeWordOnly;
+ getSearchState(cm).setReversed(!forward);
+ var promptPrefix = (forward) ? '/' : '?';
+ var originalQuery = getSearchState(cm).getQuery();
+ var originalScrollPos = cm.getScrollInfo();
+ function handleQuery(query, ignoreCase, smartCase) {
+ vimGlobalState.searchHistoryController.pushInput(query);
+ vimGlobalState.searchHistoryController.reset();
+ try {
+ updateSearchQuery(cm, query, ignoreCase, smartCase);
+ } catch (e) {
+ showConfirm(cm, 'Invalid regex: ' + query);
+ clearInputState(cm);
+ return;
+ }
+ commandDispatcher.processMotion(cm, vim, {
+ type: 'motion',
+ motion: 'findNext',
+ motionArgs: { forward: true, toJumplist: command.searchArgs.toJumplist }
+ });
+ }
+ function onPromptClose(query) {
+ cm.scrollTo(originalScrollPos.left, originalScrollPos.top);
+ handleQuery(query, true /** ignoreCase */, true /** smartCase */);
+ var macroModeState = vimGlobalState.macroModeState;
+ if (macroModeState.isRecording) {
+ logSearchQuery(macroModeState, query);
+ }
+ }
+ function onPromptKeyUp(e, query, close) {
+ var keyName = CodeMirror.keyName(e), up;
+ if (keyName == 'Up' || keyName == 'Down') {
+ up = keyName == 'Up' ? true : false;
+ query = vimGlobalState.searchHistoryController.nextMatch(query, up) || '';
+ close(query);
+ } else {
+ if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift')
+ vimGlobalState.searchHistoryController.reset();
+ }
+ var parsedQuery;
+ try {
+ parsedQuery = updateSearchQuery(cm, query,
+ true /** ignoreCase */, true /** smartCase */);
+ } catch (e) {
+ }
+ if (parsedQuery) {
+ cm.scrollIntoView(findNext(cm, !forward, parsedQuery), 30);
+ } else {
+ clearSearchHighlight(cm);
+ cm.scrollTo(originalScrollPos.left, originalScrollPos.top);
+ }
+ }
+ function onPromptKeyDown(e, query, close) {
+ var keyName = CodeMirror.keyName(e);
+ if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[' ||
+ (keyName == 'Backspace' && query == '')) {
+ vimGlobalState.searchHistoryController.pushInput(query);
+ vimGlobalState.searchHistoryController.reset();
+ updateSearchQuery(cm, originalQuery);
+ clearSearchHighlight(cm);
+ cm.scrollTo(originalScrollPos.left, originalScrollPos.top);
+ CodeMirror.e_stop(e);
+ clearInputState(cm);
+ close();
+ cm.focus();
+ } else if (keyName == 'Ctrl-U') {
+ CodeMirror.e_stop(e);
+ close('');
+ }
+ }
+ switch (command.searchArgs.querySrc) {
+ case 'prompt':
+ var macroModeState = vimGlobalState.macroModeState;
+ if (macroModeState.isPlaying) {
+ var query = macroModeState.replaySearchQueries.shift();
+ handleQuery(query, true /** ignoreCase */, false /** smartCase */);
+ } else {
+ showPrompt(cm, {
+ onClose: onPromptClose,
+ prefix: promptPrefix,
+ desc: searchPromptDesc,
+ onKeyUp: onPromptKeyUp,
+ onKeyDown: onPromptKeyDown
+ });
}
- else {
- editor.insert(lang.stringRepeat(defaultReg.text, count || 1));
+ break;
+ case 'wordUnderCursor':
+ var word = expandWordUnderCursor(cm, false /** inclusive */,
+ true /** forward */, false /** bigWord */,
+ true /** noSymbol */);
+ var isKeyword = true;
+ if (!word) {
+ word = expandWordUnderCursor(cm, false /** inclusive */,
+ true /** forward */, false /** bigWord */,
+ false /** noSymbol */);
+ isKeyword = false;
}
- editor.setOverwrite(true);
- editor.selection.clearSelection();
- }
- },
- "J": {
- fn: function(editor, range, count, param) {
- var session = editor.session;
- range = editor.getSelectionRange();
- var pos = {row: range.start.row, column: range.start.column};
- count = count || range.end.row - range.start.row;
- var maxRow = Math.min(pos.row + (count || 1), session.getLength() - 1);
-
- range.start.column = session.getLine(pos.row).length;
- range.end.column = session.getLine(maxRow).length;
- range.end.row = maxRow;
-
- var text = "";
- for (var i = pos.row; i < maxRow; i++) {
- var nextLine = session.getLine(i + 1);
- text += " " + /^\s*(.*)$/.exec(nextLine)[1] || "";
+ if (!word) {
+ return;
+ }
+ var query = cm.getLine(word.start.line).substring(word.start.ch,
+ word.end.ch);
+ if (isKeyword && wholeWordOnly) {
+ query = '\\b' + query + '\\b';
+ } else {
+ query = escapeRegex(query);
}
+ vimGlobalState.jumpList.cachedCursor = cm.getCursor();
+ cm.setCursor(word.start);
- session.replace(range, text);
- editor.moveCursorTo(pos.row, pos.column);
+ handleQuery(query, true /** ignoreCase */, false /** smartCase */);
+ break;
}
- },
- "u": {
- fn: function(editor, range, count, param) {
- count = parseInt(count || 1, 10);
- for (var i = 0; i < count; i++) {
- editor.undo();
- }
- editor.selection.clearSelection();
+ },
+ processEx: function(cm, vim, command) {
+ function onPromptClose(input) {
+ vimGlobalState.exCommandHistoryController.pushInput(input);
+ vimGlobalState.exCommandHistoryController.reset();
+ exCommandDispatcher.processCommand(cm, input);
}
- },
- "ctrl-r": {
- fn: function(editor, range, count, param) {
- count = parseInt(count || 1, 10);
- for (var i = 0; i < count; i++) {
- editor.redo();
- }
- editor.selection.clearSelection();
+ function onPromptKeyDown(e, input, close) {
+ var keyName = CodeMirror.keyName(e), up;
+ if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[' ||
+ (keyName == 'Backspace' && input == '')) {
+ vimGlobalState.exCommandHistoryController.pushInput(input);
+ vimGlobalState.exCommandHistoryController.reset();
+ CodeMirror.e_stop(e);
+ clearInputState(cm);
+ close();
+ cm.focus();
+ }
+ if (keyName == 'Up' || keyName == 'Down') {
+ up = keyName == 'Up' ? true : false;
+ input = vimGlobalState.exCommandHistoryController.nextMatch(input, up) || '';
+ close(input);
+ } else if (keyName == 'Ctrl-U') {
+ CodeMirror.e_stop(e);
+ close('');
+ } else {
+ if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift')
+ vimGlobalState.exCommandHistoryController.reset();
+ }
}
- },
- ":": {
- fn: function(editor, range, count, param) {
- var val = ":";
- if (count > 1)
- val = ".,.+" + count + val;
- if (editor.showCommandLine)
- editor.showCommandLine(val);
+ if (command.type == 'keyToEx') {
+ exCommandDispatcher.processCommand(cm, command.exArgs.input);
+ } else {
+ if (vim.visualMode) {
+ showPrompt(cm, { onClose: onPromptClose, prefix: ':', value: '\'<,\'>',
+ onKeyDown: onPromptKeyDown, select: false});
+ } else {
+ showPrompt(cm, { onClose: onPromptClose, prefix: ':',
+ onKeyDown: onPromptKeyDown});
+ }
}
- },
- "/": {
- fn: function(editor, range, count, param) {
- if (editor.showCommandLine)
- editor.showCommandLine("/");
+ },
+ evalInput: function(cm, vim) {
+ var inputState = vim.inputState;
+ var motion = inputState.motion;
+ var motionArgs = inputState.motionArgs || {};
+ var operator = inputState.operator;
+ var operatorArgs = inputState.operatorArgs || {};
+ var registerName = inputState.registerName;
+ var sel = vim.sel;
+ var origHead = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.head): cm.getCursor('head'));
+ var origAnchor = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.anchor) : cm.getCursor('anchor'));
+ var oldHead = copyCursor(origHead);
+ var oldAnchor = copyCursor(origAnchor);
+ var newHead, newAnchor;
+ var repeat;
+ if (operator) {
+ this.recordLastEdit(vim, inputState);
}
- },
- "?": {
- fn: function(editor, range, count, param) {
- if (editor.showCommandLine)
- editor.showCommandLine("?");
+ if (inputState.repeatOverride !== undefined) {
+ repeat = inputState.repeatOverride;
+ } else {
+ repeat = inputState.getRepeat();
}
- },
- ".": {
- fn: function(editor, range, count, param) {
- util.onInsertReplaySequence = inputBuffer.lastInsertCommands;
- var previous = inputBuffer.previous;
- if (previous) // If there is a previous action
- inputBuffer.exec(editor, previous.action, previous.param);
+ if (repeat > 0 && motionArgs.explicitRepeat) {
+ motionArgs.repeatIsExplicit = true;
+ } else if (motionArgs.noRepeat ||
+ (!motionArgs.explicitRepeat && repeat === 0)) {
+ repeat = 1;
+ motionArgs.repeatIsExplicit = false;
}
- },
- "ctrl-x": {
- fn: function(editor, range, count, param) {
- editor.modifyNumber(-(count || 1));
+ if (inputState.selectedCharacter) {
+ motionArgs.selectedCharacter = operatorArgs.selectedCharacter =
+ inputState.selectedCharacter;
}
- },
- "ctrl-a": {
- fn: function(editor, range, count, param) {
- editor.modifyNumber(count || 1);
+ motionArgs.repeat = repeat;
+ clearInputState(cm);
+ if (motion) {
+ var motionResult = motions[motion](cm, origHead, motionArgs, vim);
+ vim.lastMotion = motions[motion];
+ if (!motionResult) {
+ return;
+ }
+ if (motionArgs.toJumplist) {
+ if (!operator)
+ cm.ace.curOp.command.scrollIntoView = "center-animate"; // ace patch
+ var jumpList = vimGlobalState.jumpList;
+ var cachedCursor = jumpList.cachedCursor;
+ if (cachedCursor) {
+ recordJumpPosition(cm, cachedCursor, motionResult);
+ delete jumpList.cachedCursor;
+ } else {
+ recordJumpPosition(cm, origHead, motionResult);
+ }
+ }
+ if (motionResult instanceof Array) {
+ newAnchor = motionResult[0];
+ newHead = motionResult[1];
+ } else {
+ newHead = motionResult;
+ }
+ if (!newHead) {
+ newHead = copyCursor(origHead);
+ }
+ if (vim.visualMode) {
+ if (!(vim.visualBlock && newHead.ch === Infinity)) {
+ newHead = clipCursorToContent(cm, newHead, vim.visualBlock);
+ }
+ if (newAnchor) {
+ newAnchor = clipCursorToContent(cm, newAnchor, true);
+ }
+ newAnchor = newAnchor || oldAnchor;
+ sel.anchor = newAnchor;
+ sel.head = newHead;
+ updateCmSelection(cm);
+ updateMark(cm, vim, '<',
+ cursorIsBefore(newAnchor, newHead) ? newAnchor
+ : newHead);
+ updateMark(cm, vim, '>',
+ cursorIsBefore(newAnchor, newHead) ? newHead
+ : newAnchor);
+ } else if (!operator) {
+ newHead = clipCursorToContent(cm, newHead);
+ cm.setCursor(newHead.line, newHead.ch);
+ }
}
- }
-};
-
-var inputBuffer = exports.inputBuffer = {
- accepting: [NUMBER, OPERATOR, MOTION, ACTION],
- currentCmd: null,
- currentCount: "",
- status: "",
- operator: null,
- motion: null,
-
- lastInsertCommands: [],
-
- push: function(editor, ch, keyId) {
- var status = this.status;
- var isKeyHandled = true;
- this.idle = false;
- var wObj = this.waitingForParam;
- if (/^numpad\d+$/i.test(ch))
- ch = ch.substr(6);
-
- if (wObj) {
- this.exec(editor, wObj, ch);
- }
- else if (!(ch === "0" && !this.currentCount.length) &&
- (/^\d+$/.test(ch) && this.isAccepting(NUMBER))) {
- this.currentCount += ch;
- this.currentCmd = NUMBER;
- this.accepting = [NUMBER, OPERATOR, MOTION, ACTION];
- }
- else if (!this.operator && this.isAccepting(OPERATOR) && operators[ch]) {
- this.operator = {
- ch: ch,
- count: this.getCount()
+ if (operator) {
+ if (operatorArgs.lastSel) {
+ newAnchor = oldAnchor;
+ var lastSel = operatorArgs.lastSel;
+ var lineOffset = Math.abs(lastSel.head.line - lastSel.anchor.line);
+ var chOffset = Math.abs(lastSel.head.ch - lastSel.anchor.ch);
+ if (lastSel.visualLine) {
+ newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch);
+ } else if (lastSel.visualBlock) {
+ newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch + chOffset);
+ } else if (lastSel.head.line == lastSel.anchor.line) {
+ newHead = Pos(oldAnchor.line, oldAnchor.ch + chOffset);
+ } else {
+ newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch);
+ }
+ vim.visualMode = true;
+ vim.visualLine = lastSel.visualLine;
+ vim.visualBlock = lastSel.visualBlock;
+ sel = vim.sel = {
+ anchor: newAnchor,
+ head: newHead
};
- this.currentCmd = OPERATOR;
- this.accepting = [NUMBER, MOTION, ACTION];
- this.exec(editor, { operator: this.operator });
- }
- else if (motions[ch] && this.isAccepting(MOTION)) {
- this.currentCmd = MOTION;
-
- var ctx = {
- operator: this.operator,
- motion: {
- ch: ch,
- count: this.getCount()
- }
+ updateCmSelection(cm);
+ } else if (vim.visualMode) {
+ operatorArgs.lastSel = {
+ anchor: copyCursor(sel.anchor),
+ head: copyCursor(sel.head),
+ visualBlock: vim.visualBlock,
+ visualLine: vim.visualLine
};
-
- if (motions[ch].param)
- this.waitForParam(ctx);
- else
- this.exec(editor, ctx);
+ }
+ var curStart, curEnd, linewise, mode;
+ var cmSel;
+ if (vim.visualMode) {
+ curStart = cursorMin(sel.head, sel.anchor);
+ curEnd = cursorMax(sel.head, sel.anchor);
+ linewise = vim.visualLine || operatorArgs.linewise;
+ mode = vim.visualBlock ? 'block' :
+ linewise ? 'line' :
+ 'char';
+ cmSel = makeCmSelection(cm, {
+ anchor: curStart,
+ head: curEnd
+ }, mode);
+ if (linewise) {
+ var ranges = cmSel.ranges;
+ if (mode == 'block') {
+ for (var i = 0; i < ranges.length; i++) {
+ ranges[i].head.ch = lineLength(cm, ranges[i].head.line);
+ }
+ } else if (mode == 'line') {
+ ranges[0].head = Pos(ranges[0].head.line + 1, 0);
+ }
+ }
+ } else {
+ curStart = copyCursor(newAnchor || oldAnchor);
+ curEnd = copyCursor(newHead || oldHead);
+ if (cursorIsBefore(curEnd, curStart)) {
+ var tmp = curStart;
+ curStart = curEnd;
+ curEnd = tmp;
+ }
+ linewise = motionArgs.linewise || operatorArgs.linewise;
+ if (linewise) {
+ expandSelectionToLine(cm, curStart, curEnd);
+ } else if (motionArgs.forward) {
+ clipToLine(cm, curStart, curEnd);
+ }
+ mode = 'char';
+ var exclusive = !motionArgs.inclusive || linewise;
+ cmSel = makeCmSelection(cm, {
+ anchor: curStart,
+ head: curEnd
+ }, mode, exclusive);
+ }
+ cm.setSelections(cmSel.ranges, cmSel.primary);
+ vim.lastMotion = null;
+ operatorArgs.repeat = repeat; // For indent in visual mode.
+ operatorArgs.registerName = registerName;
+ operatorArgs.linewise = linewise;
+ var operatorMoveTo = operators[operator](
+ cm, operatorArgs, cmSel.ranges, oldAnchor, newHead);
+ if (vim.visualMode) {
+ exitVisualMode(cm, operatorMoveTo != null);
+ }
+ if (operatorMoveTo) {
+ cm.setCursor(operatorMoveTo);
+ }
+ }
+ },
+ recordLastEdit: function(vim, inputState, actionCommand) {
+ var macroModeState = vimGlobalState.macroModeState;
+ if (macroModeState.isPlaying) { return; }
+ vim.lastEditInputState = inputState;
+ vim.lastEditActionCommand = actionCommand;
+ macroModeState.lastInsertModeChanges.changes = [];
+ macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false;
+ }
+ };
+ var motions = {
+ moveToTopLine: function(cm, _head, motionArgs) {
+ var line = getUserVisibleLines(cm).top + motionArgs.repeat -1;
+ return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));
+ },
+ moveToMiddleLine: function(cm) {
+ var range = getUserVisibleLines(cm);
+ var line = Math.floor((range.top + range.bottom) * 0.5);
+ return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));
+ },
+ moveToBottomLine: function(cm, _head, motionArgs) {
+ var line = getUserVisibleLines(cm).bottom - motionArgs.repeat +1;
+ return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));
+ },
+ expandToLine: function(_cm, head, motionArgs) {
+ var cur = head;
+ return Pos(cur.line + motionArgs.repeat - 1, Infinity);
+ },
+ findNext: function(cm, _head, motionArgs) {
+ var state = getSearchState(cm);
+ var query = state.getQuery();
+ if (!query) {
+ return;
}
- else if (alias[ch] && this.isAccepting(MOTION)) {
- alias[ch].operator.count = this.getCount();
- this.exec(editor, alias[ch]);
+ var prev = !motionArgs.forward;
+ prev = (state.isReversed()) ? !prev : prev;
+ highlightSearchMatches(cm, query);
+ return findNext(cm, prev/** prev */, query, motionArgs.repeat);
+ },
+ goToMark: function(cm, _head, motionArgs, vim) {
+ var mark = vim.marks[motionArgs.selectedCharacter];
+ if (mark) {
+ var pos = mark.find();
+ return motionArgs.linewise ? { line: pos.line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(pos.line)) } : pos;
}
- else if (actions[ch] && this.isAccepting(ACTION)) {
- var actionObj = {
- action: {
- fn: actions[ch].fn,
- count: this.getCount()
- }
- };
+ return null;
+ },
+ moveToOtherHighlightedEnd: function(cm, _head, motionArgs, vim) {
+ if (vim.visualBlock && motionArgs.sameLine) {
+ var sel = vim.sel;
+ return [
+ clipCursorToContent(cm, Pos(sel.anchor.line, sel.head.ch)),
+ clipCursorToContent(cm, Pos(sel.head.line, sel.anchor.ch))
+ ];
+ } else {
+ return ([vim.sel.head, vim.sel.anchor]);
+ }
+ },
+ jumpToMark: function(cm, head, motionArgs, vim) {
+ var best = head;
+ for (var i = 0; i < motionArgs.repeat; i++) {
+ var cursor = best;
+ for (var key in vim.marks) {
+ if (!isLowerCase(key)) {
+ continue;
+ }
+ var mark = vim.marks[key].find();
+ var isWrongDirection = (motionArgs.forward) ?
+ cursorIsBefore(mark, cursor) : cursorIsBefore(cursor, mark);
- if (actions[ch].param) {
- this.waitForParam(actionObj);
+ if (isWrongDirection) {
+ continue;
}
- else {
- this.exec(editor, actionObj);
+ if (motionArgs.linewise && (mark.line == cursor.line)) {
+ continue;
+ }
+
+ var equal = cursorEqual(cursor, best);
+ var between = (motionArgs.forward) ?
+ cursorIsBetween(cursor, mark, best) :
+ cursorIsBetween(best, mark, cursor);
+
+ if (equal || between) {
+ best = mark;
}
+ }
+ }
- if (actions[ch].acceptsMotion)
- this.idle = false;
+ if (motionArgs.linewise) {
+ best = Pos(best.line, findFirstNonWhiteSpaceCharacter(cm.getLine(best.line)));
}
- else if (this.operator) {
- this.operator.count = this.getCount();
- this.exec(editor, { operator: this.operator }, ch);
+ return best;
+ },
+ moveByCharacters: function(_cm, head, motionArgs) {
+ var cur = head;
+ var repeat = motionArgs.repeat;
+ var ch = motionArgs.forward ? cur.ch + repeat : cur.ch - repeat;
+ return Pos(cur.line, ch);
+ },
+ moveByLines: function(cm, head, motionArgs, vim) {
+ var cur = head;
+ var endCh = cur.ch;
+ switch (vim.lastMotion) {
+ case this.moveByLines:
+ case this.moveByDisplayLines:
+ case this.moveByScroll:
+ case this.moveToColumn:
+ case this.moveToEol:
+ endCh = vim.lastHPos;
+ break;
+ default:
+ vim.lastHPos = endCh;
}
- else {
- isKeyHandled = ch.length == 1;
- this.reset();
+ var repeat = motionArgs.repeat+(motionArgs.repeatOffset||0);
+ var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat;
+ var first = cm.firstLine();
+ var last = cm.lastLine();
+ if ((line < first && cur.line == first) ||
+ (line > last && cur.line == last)) {
+ return;
}
-
- if (this.waitingForParam || this.motion || this.operator) {
- this.status += ch;
- } else if (this.currentCount) {
- this.status = this.currentCount;
- } else if (this.status) {
- this.status = "";
+ var fold = cm.ace.session.getFoldAt(line, endCh);
+ if (fold) {
+ if (motionArgs.forward)
+ line = fold.end.row + 1;
+ else
+ line = fold.start.row - 1;
}
- if (this.status != status)
- editor._emit("changeStatus");
- return isKeyHandled;
- },
-
- waitForParam: function(cmd) {
- this.waitingForParam = cmd;
- },
-
- getCount: function() {
- var count = this.currentCount;
- this.currentCount = "";
- return count && parseInt(count, 10);
- },
+ if (motionArgs.toFirstChar){
+ endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line));
+ vim.lastHPos = endCh;
+ }
+ vim.lastHSPos = cm.charCoords(Pos(line, endCh),'div').left;
+ return Pos(line, endCh);
+ },
+ moveByDisplayLines: function(cm, head, motionArgs, vim) {
+ var cur = head;
+ switch (vim.lastMotion) {
+ case this.moveByDisplayLines:
+ case this.moveByScroll:
+ case this.moveByLines:
+ case this.moveToColumn:
+ case this.moveToEol:
+ break;
+ default:
+ vim.lastHSPos = cm.charCoords(cur,'div').left;
+ }
+ var repeat = motionArgs.repeat;
+ var res=cm.findPosV(cur,(motionArgs.forward ? repeat : -repeat),'line',vim.lastHSPos);
+ if (res.hitSide) {
+ if (motionArgs.forward) {
+ var lastCharCoords = cm.charCoords(res, 'div');
+ var goalCoords = { top: lastCharCoords.top + 8, left: vim.lastHSPos };
+ var res = cm.coordsChar(goalCoords, 'div');
+ } else {
+ var resCoords = cm.charCoords(Pos(cm.firstLine(), 0), 'div');
+ resCoords.left = vim.lastHSPos;
+ res = cm.coordsChar(resCoords, 'div');
+ }
+ }
+ vim.lastHPos = res.ch;
+ return res;
+ },
+ moveByPage: function(cm, head, motionArgs) {
+ var curStart = head;
+ var repeat = motionArgs.repeat;
+ return cm.findPosV(curStart, (motionArgs.forward ? repeat : -repeat), 'page');
+ },
+ moveByParagraph: function(cm, head, motionArgs) {
+ var dir = motionArgs.forward ? 1 : -1;
+ return findParagraph(cm, head, motionArgs.repeat, dir);
+ },
+ moveByScroll: function(cm, head, motionArgs, vim) {
+ var scrollbox = cm.getScrollInfo();
+ var curEnd = null;
+ var repeat = motionArgs.repeat;
+ if (!repeat) {
+ repeat = scrollbox.clientHeight / (2 * cm.defaultTextHeight());
+ }
+ var orig = cm.charCoords(head, 'local');
+ motionArgs.repeat = repeat;
+ var curEnd = motions.moveByDisplayLines(cm, head, motionArgs, vim);
+ if (!curEnd) {
+ return null;
+ }
+ var dest = cm.charCoords(curEnd, 'local');
+ cm.scrollTo(null, scrollbox.top + dest.top - orig.top);
+ return curEnd;
+ },
+ moveByWords: function(cm, head, motionArgs) {
+ return moveToWord(cm, head, motionArgs.repeat, !!motionArgs.forward,
+ !!motionArgs.wordEnd, !!motionArgs.bigWord);
+ },
+ moveTillCharacter: function(cm, _head, motionArgs) {
+ var repeat = motionArgs.repeat;
+ var curEnd = moveToCharacter(cm, repeat, motionArgs.forward,
+ motionArgs.selectedCharacter);
+ var increment = motionArgs.forward ? -1 : 1;
+ recordLastCharacterSearch(increment, motionArgs);
+ if (!curEnd) return null;
+ curEnd.ch += increment;
+ return curEnd;
+ },
+ moveToCharacter: function(cm, head, motionArgs) {
+ var repeat = motionArgs.repeat;
+ recordLastCharacterSearch(0, motionArgs);
+ return moveToCharacter(cm, repeat, motionArgs.forward,
+ motionArgs.selectedCharacter) || head;
+ },
+ moveToSymbol: function(cm, head, motionArgs) {
+ var repeat = motionArgs.repeat;
+ return findSymbol(cm, repeat, motionArgs.forward,
+ motionArgs.selectedCharacter) || head;
+ },
+ moveToColumn: function(cm, head, motionArgs, vim) {
+ var repeat = motionArgs.repeat;
+ vim.lastHPos = repeat - 1;
+ vim.lastHSPos = cm.charCoords(head,'div').left;
+ return moveToColumn(cm, repeat);
+ },
+ moveToEol: function(cm, head, motionArgs, vim) {
+ var cur = head;
+ vim.lastHPos = Infinity;
+ var retval= Pos(cur.line + motionArgs.repeat - 1, Infinity);
+ var end=cm.clipPos(retval);
+ end.ch--;
+ vim.lastHSPos = cm.charCoords(end,'div').left;
+ return retval;
+ },
+ moveToFirstNonWhiteSpaceCharacter: function(cm, head) {
+ var cursor = head;
+ return Pos(cursor.line,
+ findFirstNonWhiteSpaceCharacter(cm.getLine(cursor.line)));
+ },
+ moveToMatchedSymbol: function(cm, head) {
+ var cursor = head;
+ var line = cursor.line;
+ var ch = cursor.ch;
+ var lineText = cm.getLine(line);
+ var symbol;
+ do {
+ symbol = lineText.charAt(ch++);
+ if (symbol && isMatchableSymbol(symbol)) {
+ var style = cm.getTokenTypeAt(Pos(line, ch));
+ if (style !== "string" && style !== "comment") {
+ break;
+ }
+ }
+ } while (symbol);
+ if (symbol) {
+ var matched = cm.findMatchingBracket(Pos(line, ch));
+ return matched.to;
+ } else {
+ return cursor;
+ }
+ },
+ moveToStartOfLine: function(_cm, head) {
+ return Pos(head.line, 0);
+ },
+ moveToLineOrEdgeOfDocument: function(cm, _head, motionArgs) {
+ var lineNum = motionArgs.forward ? cm.lastLine() : cm.firstLine();
+ if (motionArgs.repeatIsExplicit) {
+ lineNum = motionArgs.repeat - cm.getOption('firstLineNumber');
+ }
+ return Pos(lineNum,
+ findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum)));
+ },
+ textObjectManipulation: function(cm, head, motionArgs, vim) {
+ var mirroredPairs = {'(': ')', ')': '(',
+ '{': '}', '}': '{',
+ '[': ']', ']': '['};
+ var selfPaired = {'\'': true, '"': true};
- exec: function(editor, action, param) {
- var m = action.motion;
- var o = action.operator;
- var a = action.action;
+ var character = motionArgs.selectedCharacter;
+ if (character == 'b') {
+ character = '(';
+ } else if (character == 'B') {
+ character = '{';
+ }
+ var inclusive = !motionArgs.textObjectInner;
- if (!param)
- param = action.param;
+ var tmp;
+ if (mirroredPairs[character]) {
+ tmp = selectCompanionObject(cm, head, character, inclusive);
+ } else if (selfPaired[character]) {
+ tmp = findBeginningAndEnd(cm, head, character, inclusive);
+ } else if (character === 'W') {
+ tmp = expandWordUnderCursor(cm, inclusive, true /** forward */,
+ true /** bigWord */);
+ } else if (character === 'w') {
+ tmp = expandWordUnderCursor(cm, inclusive, true /** forward */,
+ false /** bigWord */);
+ } else if (character === 'p') {
+ tmp = findParagraph(cm, head, motionArgs.repeat, 0, inclusive);
+ motionArgs.linewise = true;
+ if (vim.visualMode) {
+ if (!vim.visualLine) { vim.visualLine = true; }
+ } else {
+ var operatorArgs = vim.inputState.operatorArgs;
+ if (operatorArgs) { operatorArgs.linewise = true; }
+ tmp.end.line--;
+ }
+ } else {
+ return null;
+ }
- if (o) {
- this.previous = {
- action: action,
- param: param
- };
+ if (!cm.state.vim.visualMode) {
+ return [tmp.start, tmp.end];
+ } else {
+ return expandSelection(cm, tmp.start, tmp.end);
}
+ },
- if (o && !editor.selection.isEmpty()) {
- if (operators[o.ch].selFn) {
- operators[o.ch].selFn(editor, editor.getSelectionRange(), o.count, param);
- this.reset();
- }
- return;
+ repeatLastCharacterSearch: function(cm, head, motionArgs) {
+ var lastSearch = vimGlobalState.lastChararacterSearch;
+ var repeat = motionArgs.repeat;
+ var forward = motionArgs.forward === lastSearch.forward;
+ var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1);
+ cm.moveH(-increment, 'char');
+ motionArgs.inclusive = forward ? true : false;
+ var curEnd = moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter);
+ if (!curEnd) {
+ cm.moveH(increment, 'char');
+ return head;
}
- else if (!m && !a && o && param) {
- operators[o.ch].fn(editor, null, o.count, param);
- this.reset();
- }
- else if (m) {
- var run = function(fn) {
- if (fn && typeof fn === "function") { // There should always be a motion
- if (m.count && !motionObj.handlesCount)
- repeat(fn, m.count, [editor, null, m.count, param]);
- else
- fn(editor, null, m.count, param);
- }
- };
+ curEnd.ch += increment;
+ return curEnd;
+ }
+ };
- var motionObj = motions[m.ch];
- var selectable = motionObj.sel;
+ function defineMotion(name, fn) {
+ motions[name] = fn;
+ }
- if (!o) {
- if ((util.onVisualMode || util.onVisualLineMode) && selectable)
- run(motionObj.sel);
- else
- run(motionObj.nav);
+ function fillArray(val, times) {
+ var arr = [];
+ for (var i = 0; i < times; i++) {
+ arr.push(val);
+ }
+ return arr;
+ }
+ var operators = {
+ change: function(cm, args, ranges) {
+ var finalHead, text;
+ var vim = cm.state.vim;
+ vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock = vim.visualBlock;
+ if (!vim.visualMode) {
+ var anchor = ranges[0].anchor,
+ head = ranges[0].head;
+ text = cm.getRange(anchor, head);
+ var lastState = vim.lastEditInputState || {};
+ if (lastState.motion == "moveByWords" && !isWhiteSpaceString(text)) {
+ var match = (/\s+$/).exec(text);
+ if (match && lastState.motionArgs && lastState.motionArgs.forward) {
+ head = offsetCursor(head, 0, - match[0].length);
+ text = text.slice(0, - match[0].length);
}
- else if (selectable) {
- repeat(function() {
- run(motionObj.sel);
- operators[o.ch].fn(editor, editor.getSelectionRange(), o.count, param);
- }, o.count || 1);
+ }
+ var wasLastLine = head.line - 1 == cm.lastLine();
+ cm.replaceRange('', anchor, head);
+ if (args.linewise && !wasLastLine) {
+ CodeMirror.commands.newlineAndIndent(cm);
+ anchor.ch = null;
+ }
+ finalHead = anchor;
+ } else {
+ text = cm.getSelection();
+ var replacement = fillArray('', ranges.length);
+ cm.replaceSelections(replacement);
+ finalHead = cursorMin(ranges[0].head, ranges[0].anchor);
+ }
+ vimGlobalState.registerController.pushText(
+ args.registerName, 'change', text,
+ args.linewise, ranges.length > 1);
+ actions.enterInsertMode(cm, {head: finalHead}, cm.state.vim);
+ },
+ 'delete': function(cm, args, ranges) {
+ var finalHead, text;
+ var vim = cm.state.vim;
+ if (!vim.visualBlock) {
+ var anchor = ranges[0].anchor,
+ head = ranges[0].head;
+ if (args.linewise &&
+ head.line != cm.firstLine() &&
+ anchor.line == cm.lastLine() &&
+ anchor.line == head.line - 1) {
+ if (anchor.line == cm.firstLine()) {
+ anchor.ch = 0;
+ } else {
+ anchor = Pos(anchor.line - 1, lineLength(cm, anchor.line - 1));
}
- this.reset();
+ }
+ text = cm.getRange(anchor, head);
+ cm.replaceRange('', anchor, head);
+ finalHead = anchor;
+ if (args.linewise) {
+ finalHead = motions.moveToFirstNonWhiteSpaceCharacter(cm, anchor);
+ }
+ } else {
+ text = cm.getSelection();
+ var replacement = fillArray('', ranges.length);
+ cm.replaceSelections(replacement);
+ finalHead = ranges[0].anchor;
}
- else if (a) {
- a.fn(editor, editor.getSelectionRange(), a.count, param);
- this.reset();
+ vimGlobalState.registerController.pushText(
+ args.registerName, 'delete', text,
+ args.linewise, vim.visualBlock);
+ return clipCursorToContent(cm, finalHead);
+ },
+ indent: function(cm, args, ranges) {
+ var vim = cm.state.vim;
+ var startLine = ranges[0].anchor.line;
+ var endLine = vim.visualBlock ?
+ ranges[ranges.length - 1].anchor.line :
+ ranges[0].head.line;
+ var repeat = (vim.visualMode) ? args.repeat : 1;
+ if (args.linewise) {
+ endLine--;
}
- handleCursorMove(editor);
- },
-
- isAccepting: function(type) {
- return this.accepting.indexOf(type) !== -1;
- },
+ for (var i = startLine; i <= endLine; i++) {
+ for (var j = 0; j < repeat; j++) {
+ cm.indentLine(i, args.indentRight);
+ }
+ }
+ return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor);
+ },
+ changeCase: function(cm, args, ranges, oldAnchor, newHead) {
+ var selections = cm.getSelections();
+ var swapped = [];
+ var toLower = args.toLower;
+ for (var j = 0; j < selections.length; j++) {
+ var toSwap = selections[j];
+ var text = '';
+ if (toLower === true) {
+ text = toSwap.toLowerCase();
+ } else if (toLower === false) {
+ text = toSwap.toUpperCase();
+ } else {
+ for (var i = 0; i < toSwap.length; i++) {
+ var character = toSwap.charAt(i);
+ text += isUpperCase(character) ? character.toLowerCase() :
+ character.toUpperCase();
+ }
+ }
+ swapped.push(text);
+ }
+ cm.replaceSelections(swapped);
+ if (args.shouldMoveCursor){
+ return newHead;
+ } else if (!cm.state.vim.visualMode && args.linewise && ranges[0].anchor.line + 1 == ranges[0].head.line) {
+ return motions.moveToFirstNonWhiteSpaceCharacter(cm, oldAnchor);
+ } else if (args.linewise){
+ return oldAnchor;
+ } else {
+ return cursorMin(ranges[0].anchor, ranges[0].head);
+ }
+ },
+ yank: function(cm, args, ranges, oldAnchor) {
+ var vim = cm.state.vim;
+ var text = cm.getSelection();
+ var endPos = vim.visualMode
+ ? cursorMin(vim.sel.anchor, vim.sel.head, ranges[0].head, ranges[0].anchor)
+ : oldAnchor;
+ vimGlobalState.registerController.pushText(
+ args.registerName, 'yank',
+ text, args.linewise, vim.visualBlock);
+ return endPos;
+ }
+ };
- reset: function() {
- this.operator = null;
- this.motion = null;
- this.currentCount = "";
- this.status = "";
- this.accepting = [NUMBER, OPERATOR, MOTION, ACTION];
- this.idle = true;
- this.waitingForParam = null;
+ function defineOperator(name, fn) {
+ operators[name] = fn;
}
-};
-function setPreviousCommand(fn) {
- inputBuffer.previous = { action: { action: { fn: fn } } };
-}
+ var actions = {
+ jumpListWalk: function(cm, actionArgs, vim) {
+ if (vim.visualMode) {
+ return;
+ }
+ var repeat = actionArgs.repeat;
+ var forward = actionArgs.forward;
+ var jumpList = vimGlobalState.jumpList;
-exports.coreCommands = {
- start: {
- exec: function start(editor) {
- util.insertMode(editor);
- setPreviousCommand(start);
+ var mark = jumpList.move(cm, forward ? repeat : -repeat);
+ var markPos = mark ? mark.find() : undefined;
+ markPos = markPos ? markPos : cm.getCursor();
+ cm.setCursor(markPos);
+ cm.ace.curOp.command.scrollIntoView = "center-animate"; // ace patch
+ },
+ scroll: function(cm, actionArgs, vim) {
+ if (vim.visualMode) {
+ return;
}
- },
- startBeginning: {
- exec: function startBeginning(editor) {
- editor.navigateLineStart();
- util.insertMode(editor);
- setPreviousCommand(startBeginning);
+ var repeat = actionArgs.repeat || 1;
+ var lineHeight = cm.defaultTextHeight();
+ var top = cm.getScrollInfo().top;
+ var delta = lineHeight * repeat;
+ var newPos = actionArgs.forward ? top + delta : top - delta;
+ var cursor = copyCursor(cm.getCursor());
+ var cursorCoords = cm.charCoords(cursor, 'local');
+ if (actionArgs.forward) {
+ if (newPos > cursorCoords.top) {
+ cursor.line += (newPos - cursorCoords.top) / lineHeight;
+ cursor.line = Math.ceil(cursor.line);
+ cm.setCursor(cursor);
+ cursorCoords = cm.charCoords(cursor, 'local');
+ cm.scrollTo(null, cursorCoords.top);
+ } else {
+ cm.scrollTo(null, newPos);
+ }
+ } else {
+ var newBottom = newPos + cm.getScrollInfo().clientHeight;
+ if (newBottom < cursorCoords.bottom) {
+ cursor.line -= (cursorCoords.bottom - newBottom) / lineHeight;
+ cursor.line = Math.floor(cursor.line);
+ cm.setCursor(cursor);
+ cursorCoords = cm.charCoords(cursor, 'local');
+ cm.scrollTo(
+ null, cursorCoords.bottom - cm.getScrollInfo().clientHeight);
+ } else {
+ cm.scrollTo(null, newPos);
+ }
}
- },
- stop: {
- exec: function stop(editor) {
- inputBuffer.reset();
- util.onVisualMode = false;
- util.onVisualLineMode = false;
- inputBuffer.lastInsertCommands = util.normalMode(editor);
+ },
+ scrollToCursor: function(cm, actionArgs) {
+ var lineNum = cm.getCursor().line;
+ var charCoords = cm.charCoords(Pos(lineNum, 0), 'local');
+ var height = cm.getScrollInfo().clientHeight;
+ var y = charCoords.top;
+ var lineHeight = charCoords.bottom - y;
+ switch (actionArgs.position) {
+ case 'center': y = y - (height / 2) + lineHeight;
+ break;
+ case 'bottom': y = y - height + lineHeight*1.4;
+ break;
+ case 'top': y = y + lineHeight*0.4;
+ break;
}
- },
- append: {
- exec: function append(editor) {
- var pos = editor.getCursorPosition();
- var lineLen = editor.session.getLine(pos.row).length;
- if (lineLen)
- editor.navigateRight();
- util.insertMode(editor);
- setPreviousCommand(append);
+ cm.scrollTo(null, y);
+ },
+ replayMacro: function(cm, actionArgs, vim) {
+ var registerName = actionArgs.selectedCharacter;
+ var repeat = actionArgs.repeat;
+ var macroModeState = vimGlobalState.macroModeState;
+ if (registerName == '@') {
+ registerName = macroModeState.latestRegister;
}
- },
- appendEnd: {
- exec: function appendEnd(editor) {
- editor.navigateLineEnd();
- util.insertMode(editor);
- setPreviousCommand(appendEnd);
+ while(repeat--){
+ executeMacroRegister(cm, vim, macroModeState, registerName);
}
- }
-};
-
-var handleCursorMove = exports.onCursorMove = function(editor, e) {
- if (util.currentMode === 'insert' || handleCursorMove.running)
- return;
- else if(!editor.selection.isEmpty()) {
- handleCursorMove.running = true;
- if (util.onVisualLineMode) {
- var originRow = editor.selection.visualLineStart;
- var cursorRow = editor.getCursorPosition().row;
- if(originRow <= cursorRow) {
- var endLine = editor.session.getLine(cursorRow);
- editor.selection.clearSelection();
- editor.selection.moveCursorTo(originRow, 0);
- editor.selection.selectTo(cursorRow, endLine.length);
+ },
+ enterMacroRecordMode: function(cm, actionArgs) {
+ var macroModeState = vimGlobalState.macroModeState;
+ var registerName = actionArgs.selectedCharacter;
+ macroModeState.enterMacroRecordMode(cm, registerName);
+ },
+ enterInsertMode: function(cm, actionArgs, vim) {
+ if (cm.getOption('readOnly')) { return; }
+ vim.insertMode = true;
+ vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1;
+ var insertAt = (actionArgs) ? actionArgs.insertAt : null;
+ var sel = vim.sel;
+ var head = actionArgs.head || cm.getCursor('head');
+ var height = cm.listSelections().length;
+ if (insertAt == 'eol') {
+ head = Pos(head.line, lineLength(cm, head.line));
+ } else if (insertAt == 'charAfter') {
+ head = offsetCursor(head, 0, 1);
+ } else if (insertAt == 'firstNonBlank') {
+ head = motions.moveToFirstNonWhiteSpaceCharacter(cm, head);
+ } else if (insertAt == 'startOfSelectedArea') {
+ if (!vim.visualBlock) {
+ if (sel.head.line < sel.anchor.line) {
+ head = sel.head;
+ } else {
+ head = Pos(sel.anchor.line, 0);
+ }
+ } else {
+ head = Pos(
+ Math.min(sel.head.line, sel.anchor.line),
+ Math.min(sel.head.ch, sel.anchor.ch));
+ height = Math.abs(sel.head.line - sel.anchor.line) + 1;
+ }
+ } else if (insertAt == 'endOfSelectedArea') {
+ if (!vim.visualBlock) {
+ if (sel.head.line >= sel.anchor.line) {
+ head = offsetCursor(sel.head, 0, 1);
} else {
- var endLine = editor.session.getLine(originRow);
- editor.selection.clearSelection();
- editor.selection.moveCursorTo(originRow, endLine.length);
- editor.selection.selectTo(cursorRow, 0);
+ head = Pos(sel.anchor.line, 0);
}
+ } else {
+ head = Pos(
+ Math.min(sel.head.line, sel.anchor.line),
+ Math.max(sel.head.ch + 1, sel.anchor.ch));
+ height = Math.abs(sel.head.line - sel.anchor.line) + 1;
+ }
+ } else if (insertAt == 'inplace') {
+ if (vim.visualMode){
+ return;
+ }
}
- handleCursorMove.running = false;
- return;
+ cm.setOption('keyMap', 'vim-insert');
+ cm.setOption('disableInput', false);
+ if (actionArgs && actionArgs.replace) {
+ cm.toggleOverwrite(true);
+ cm.setOption('keyMap', 'vim-replace');
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "replace"});
+ } else {
+ cm.setOption('keyMap', 'vim-insert');
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "insert"});
+ }
+ if (!vimGlobalState.macroModeState.isPlaying) {
+ cm.on('change', onChange);
+ CodeMirror.on(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown);
+ }
+ if (vim.visualMode) {
+ exitVisualMode(cm);
+ }
+ selectForInsert(cm, head, height);
+ },
+ toggleVisualMode: function(cm, actionArgs, vim) {
+ var repeat = actionArgs.repeat;
+ var anchor = cm.getCursor();
+ var head;
+ if (!vim.visualMode) {
+ vim.visualMode = true;
+ vim.visualLine = !!actionArgs.linewise;
+ vim.visualBlock = !!actionArgs.blockwise;
+ head = clipCursorToContent(
+ cm, Pos(anchor.line, anchor.ch + repeat - 1),
+ true /** includeLineBreak */);
+ vim.sel = {
+ anchor: anchor,
+ head: head
+ };
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : ""});
+ updateCmSelection(cm);
+ updateMark(cm, vim, '<', cursorMin(anchor, head));
+ updateMark(cm, vim, '>', cursorMax(anchor, head));
+ } else if (vim.visualLine ^ actionArgs.linewise ||
+ vim.visualBlock ^ actionArgs.blockwise) {
+ vim.visualLine = !!actionArgs.linewise;
+ vim.visualBlock = !!actionArgs.blockwise;
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : ""});
+ updateCmSelection(cm);
+ } else {
+ exitVisualMode(cm);
+ }
+ },
+ reselectLastSelection: function(cm, _actionArgs, vim) {
+ var lastSelection = vim.lastSelection;
+ if (vim.visualMode) {
+ updateLastSelection(cm, vim);
+ }
+ if (lastSelection) {
+ var anchor = lastSelection.anchorMark.find();
+ var head = lastSelection.headMark.find();
+ if (!anchor || !head) {
+ return;
+ }
+ vim.sel = {
+ anchor: anchor,
+ head: head
+ };
+ vim.visualMode = true;
+ vim.visualLine = lastSelection.visualLine;
+ vim.visualBlock = lastSelection.visualBlock;
+ updateCmSelection(cm);
+ updateMark(cm, vim, '<', cursorMin(anchor, head));
+ updateMark(cm, vim, '>', cursorMax(anchor, head));
+ CodeMirror.signal(cm, 'vim-mode-change', {
+ mode: 'visual',
+ subMode: vim.visualLine ? 'linewise' :
+ vim.visualBlock ? 'blockwise' : ''});
+ }
+ },
+ joinLines: function(cm, actionArgs, vim) {
+ var curStart, curEnd;
+ if (vim.visualMode) {
+ curStart = cm.getCursor('anchor');
+ curEnd = cm.getCursor('head');
+ if (cursorIsBefore(curEnd, curStart)) {
+ var tmp = curEnd;
+ curEnd = curStart;
+ curStart = tmp;
+ }
+ curEnd.ch = lineLength(cm, curEnd.line) - 1;
+ } else {
+ var repeat = Math.max(actionArgs.repeat, 2);
+ curStart = cm.getCursor();
+ curEnd = clipCursorToContent(cm, Pos(curStart.line + repeat - 1,
+ Infinity));
+ }
+ var finalCh = 0;
+ for (var i = curStart.line; i < curEnd.line; i++) {
+ finalCh = lineLength(cm, curStart.line);
+ var tmp = Pos(curStart.line + 1,
+ lineLength(cm, curStart.line + 1));
+ var text = cm.getRange(curStart, tmp);
+ text = text.replace(/\n\s*/g, ' ');
+ cm.replaceRange(text, curStart, tmp);
+ }
+ var curFinalPos = Pos(curStart.line, finalCh);
+ if (vim.visualMode) {
+ exitVisualMode(cm, false);
+ }
+ cm.setCursor(curFinalPos);
+ },
+ newLineAndEnterInsertMode: function(cm, actionArgs, vim) {
+ vim.insertMode = true;
+ var insertAt = copyCursor(cm.getCursor());
+ if (insertAt.line === cm.firstLine() && !actionArgs.after) {
+ cm.replaceRange('\n', Pos(cm.firstLine(), 0));
+ cm.setCursor(cm.firstLine(), 0);
+ } else {
+ insertAt.line = (actionArgs.after) ? insertAt.line :
+ insertAt.line - 1;
+ insertAt.ch = lineLength(cm, insertAt.line);
+ cm.setCursor(insertAt);
+ var newlineFn = CodeMirror.commands.newlineAndIndentContinueComment ||
+ CodeMirror.commands.newlineAndIndent;
+ newlineFn(cm);
+ }
+ this.enterInsertMode(cm, { repeat: actionArgs.repeat }, vim);
+ },
+ paste: function(cm, actionArgs, vim) {
+ var cur = copyCursor(cm.getCursor());
+ var register = vimGlobalState.registerController.getRegister(
+ actionArgs.registerName);
+ var text = register.toString();
+ if (!text) {
+ return;
+ }
+ if (actionArgs.matchIndent) {
+ var tabSize = cm.getOption("tabSize");
+ var whitespaceLength = function(str) {
+ var tabs = (str.split("\t").length - 1);
+ var spaces = (str.split(" ").length - 1);
+ return tabs * tabSize + spaces * 1;
+ };
+ var currentLine = cm.getLine(cm.getCursor().line);
+ var indent = whitespaceLength(currentLine.match(/^\s*/)[0]);
+ var chompedText = text.replace(/\n$/, '');
+ var wasChomped = text !== chompedText;
+ var firstIndent = whitespaceLength(text.match(/^\s*/)[0]);
+ var text = chompedText.replace(/^\s*/gm, function(wspace) {
+ var newIndent = indent + (whitespaceLength(wspace) - firstIndent);
+ if (newIndent < 0) {
+ return "";
+ }
+ else if (cm.getOption("indentWithTabs")) {
+ var quotient = Math.floor(newIndent / tabSize);
+ return Array(quotient + 1).join('\t');
+ }
+ else {
+ return Array(newIndent + 1).join(' ');
+ }
+ });
+ text += wasChomped ? "\n" : "";
+ }
+ if (actionArgs.repeat > 1) {
+ var text = Array(actionArgs.repeat + 1).join(text);
+ }
+ var linewise = register.linewise;
+ var blockwise = register.blockwise;
+ if (linewise) {
+ if(vim.visualMode) {
+ text = vim.visualLine ? text.slice(0, -1) : '\n' + text.slice(0, text.length - 1) + '\n';
+ } else if (actionArgs.after) {
+ text = '\n' + text.slice(0, text.length - 1);
+ cur.ch = lineLength(cm, cur.line);
+ } else {
+ cur.ch = 0;
+ }
+ } else {
+ if (blockwise) {
+ text = text.split('\n');
+ for (var i = 0; i < text.length; i++) {
+ text[i] = (text[i] == '') ? ' ' : text[i];
+ }
+ }
+ cur.ch += actionArgs.after ? 1 : 0;
+ }
+ var curPosFinal;
+ var idx;
+ if (vim.visualMode) {
+ vim.lastPastedText = text;
+ var lastSelectionCurEnd;
+ var selectedArea = getSelectedAreaRange(cm, vim);
+ var selectionStart = selectedArea[0];
+ var selectionEnd = selectedArea[1];
+ var selectedText = cm.getSelection();
+ var selections = cm.listSelections();
+ var emptyStrings = new Array(selections.length).join('1').split('1');
+ if (vim.lastSelection) {
+ lastSelectionCurEnd = vim.lastSelection.headMark.find();
+ }
+ vimGlobalState.registerController.unnamedRegister.setText(selectedText);
+ if (blockwise) {
+ cm.replaceSelections(emptyStrings);
+ selectionEnd = Pos(selectionStart.line + text.length-1, selectionStart.ch);
+ cm.setCursor(selectionStart);
+ selectBlock(cm, selectionEnd);
+ cm.replaceSelections(text);
+ curPosFinal = selectionStart;
+ } else if (vim.visualBlock) {
+ cm.replaceSelections(emptyStrings);
+ cm.setCursor(selectionStart);
+ cm.replaceRange(text, selectionStart, selectionStart);
+ curPosFinal = selectionStart;
+ } else {
+ cm.replaceRange(text, selectionStart, selectionEnd);
+ curPosFinal = cm.posFromIndex(cm.indexFromPos(selectionStart) + text.length - 1);
+ }
+ if(lastSelectionCurEnd) {
+ vim.lastSelection.headMark = cm.setBookmark(lastSelectionCurEnd);
+ }
+ if (linewise) {
+ curPosFinal.ch=0;
+ }
+ } else {
+ if (blockwise) {
+ cm.setCursor(cur);
+ for (var i = 0; i < text.length; i++) {
+ var line = cur.line+i;
+ if (line > cm.lastLine()) {
+ cm.replaceRange('\n', Pos(line, 0));
+ }
+ var lastCh = lineLength(cm, line);
+ if (lastCh < cur.ch) {
+ extendLineToColumn(cm, line, cur.ch);
+ }
+ }
+ cm.setCursor(cur);
+ selectBlock(cm, Pos(cur.line + text.length-1, cur.ch));
+ cm.replaceSelections(text);
+ curPosFinal = cur;
+ } else {
+ cm.replaceRange(text, cur);
+ if (linewise && actionArgs.after) {
+ curPosFinal = Pos(
+ cur.line + 1,
+ findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line + 1)));
+ } else if (linewise && !actionArgs.after) {
+ curPosFinal = Pos(
+ cur.line,
+ findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line)));
+ } else if (!linewise && actionArgs.after) {
+ idx = cm.indexFromPos(cur);
+ curPosFinal = cm.posFromIndex(idx + text.length - 1);
+ } else {
+ idx = cm.indexFromPos(cur);
+ curPosFinal = cm.posFromIndex(idx + text.length);
+ }
+ }
+ }
+ if (vim.visualMode) {
+ exitVisualMode(cm, false);
+ }
+ cm.setCursor(curPosFinal);
+ },
+ undo: function(cm, actionArgs) {
+ cm.operation(function() {
+ repeatFn(cm, CodeMirror.commands.undo, actionArgs.repeat)();
+ cm.setCursor(cm.getCursor('anchor'));
+ });
+ },
+ redo: function(cm, actionArgs) {
+ repeatFn(cm, CodeMirror.commands.redo, actionArgs.repeat)();
+ },
+ setRegister: function(_cm, actionArgs, vim) {
+ vim.inputState.registerName = actionArgs.selectedCharacter;
+ },
+ setMark: function(cm, actionArgs, vim) {
+ var markName = actionArgs.selectedCharacter;
+ updateMark(cm, vim, markName, cm.getCursor());
+ },
+ replace: function(cm, actionArgs, vim) {
+ var replaceWith = actionArgs.selectedCharacter;
+ var curStart = cm.getCursor();
+ var replaceTo;
+ var curEnd;
+ var selections = cm.listSelections();
+ if (vim.visualMode) {
+ curStart = cm.getCursor('start');
+ curEnd = cm.getCursor('end');
+ } else {
+ var line = cm.getLine(curStart.line);
+ replaceTo = curStart.ch + actionArgs.repeat;
+ if (replaceTo > line.length) {
+ replaceTo=line.length;
+ }
+ curEnd = Pos(curStart.line, replaceTo);
+ }
+ if (replaceWith=='\n') {
+ if (!vim.visualMode) cm.replaceRange('', curStart, curEnd);
+ (CodeMirror.commands.newlineAndIndentContinueComment || CodeMirror.commands.newlineAndIndent)(cm);
+ } else {
+ var replaceWithStr = cm.getRange(curStart, curEnd);
+ replaceWithStr = replaceWithStr.replace(/[^\n]/g, replaceWith);
+ if (vim.visualBlock) {
+ var spaces = new Array(cm.getOption("tabSize")+1).join(' ');
+ replaceWithStr = cm.getSelection();
+ replaceWithStr = replaceWithStr.replace(/\t/g, spaces).replace(/[^\n]/g, replaceWith).split('\n');
+ cm.replaceSelections(replaceWithStr);
+ } else {
+ cm.replaceRange(replaceWithStr, curStart, curEnd);
+ }
+ if (vim.visualMode) {
+ curStart = cursorIsBefore(selections[0].anchor, selections[0].head) ?
+ selections[0].anchor : selections[0].head;
+ cm.setCursor(curStart);
+ exitVisualMode(cm, false);
+ } else {
+ cm.setCursor(offsetCursor(curEnd, 0, -1));
+ }
+ }
+ },
+ incrementNumberToken: function(cm, actionArgs) {
+ var cur = cm.getCursor();
+ var lineStr = cm.getLine(cur.line);
+ var re = /-?\d+/g;
+ var match;
+ var start;
+ var end;
+ var numberStr;
+ var token;
+ while ((match = re.exec(lineStr)) !== null) {
+ token = match[0];
+ start = match.index;
+ end = start + token.length;
+ if (cur.ch < end)break;
+ }
+ if (!actionArgs.backtrack && (end <= cur.ch))return;
+ if (token) {
+ var increment = actionArgs.increase ? 1 : -1;
+ var number = parseInt(token) + (increment * actionArgs.repeat);
+ var from = Pos(cur.line, start);
+ var to = Pos(cur.line, end);
+ numberStr = number.toString();
+ cm.replaceRange(numberStr, from, to);
+ } else {
+ return;
+ }
+ cm.setCursor(Pos(cur.line, start + numberStr.length - 1));
+ },
+ repeatLastEdit: function(cm, actionArgs, vim) {
+ var lastEditInputState = vim.lastEditInputState;
+ if (!lastEditInputState) { return; }
+ var repeat = actionArgs.repeat;
+ if (repeat && actionArgs.repeatIsExplicit) {
+ vim.lastEditInputState.repeatOverride = repeat;
+ } else {
+ repeat = vim.lastEditInputState.repeatOverride || repeat;
+ }
+ repeatLastEdit(cm, vim, repeat, false /** repeatForInsert */);
+ },
+ exitInsertMode: exitInsertMode
+ };
+
+ function defineAction(name, fn) {
+ actions[name] = fn;
}
- else {
- if (e && (util.onVisualLineMode || util.onVisualMode)) {
- editor.selection.clearSelection();
- util.normalMode(editor);
+ function clipCursorToContent(cm, cur, includeLineBreak) {
+ var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine() );
+ var maxCh = lineLength(cm, line) - 1;
+ maxCh = (includeLineBreak) ? maxCh + 1 : maxCh;
+ var ch = Math.min(Math.max(0, cur.ch), maxCh);
+ return Pos(line, ch);
+ }
+ function copyArgs(args) {
+ var ret = {};
+ for (var prop in args) {
+ if (args.hasOwnProperty(prop)) {
+ ret[prop] = args[prop];
+ }
+ }
+ return ret;
+ }
+ function offsetCursor(cur, offsetLine, offsetCh) {
+ if (typeof offsetLine === 'object') {
+ offsetCh = offsetLine.ch;
+ offsetLine = offsetLine.line;
+ }
+ return Pos(cur.line + offsetLine, cur.ch + offsetCh);
+ }
+ function getOffset(anchor, head) {
+ return {
+ line: head.line - anchor.line,
+ ch: head.line - anchor.line
+ };
+ }
+ function commandMatches(keys, keyMap, context, inputState) {
+ var match, partial = [], full = [];
+ for (var i = 0; i < keyMap.length; i++) {
+ var command = keyMap[i];
+ if (context == 'insert' && command.context != 'insert' ||
+ command.context && command.context != context ||
+ inputState.operator && command.type == 'action' ||
+ !(match = commandMatch(keys, command.keys))) { continue; }
+ if (match == 'partial') { partial.push(command); }
+ if (match == 'full') { full.push(command); }
+ }
+ return {
+ partial: partial.length && partial,
+ full: full.length && full
+ };
+ }
+ function commandMatch(pressed, mapped) {
+ if (mapped.slice(-11) == '<character>') {
+ var prefixLen = mapped.length - 11;
+ var pressedPrefix = pressed.slice(0, prefixLen);
+ var mappedPrefix = mapped.slice(0, prefixLen);
+ return pressedPrefix == mappedPrefix && pressed.length > prefixLen ? 'full' :
+ mappedPrefix.indexOf(pressedPrefix) == 0 ? 'partial' : false;
+ } else {
+ return pressed == mapped ? 'full' :
+ mapped.indexOf(pressed) == 0 ? 'partial' : false;
+ }
+ }
+ function lastChar(keys) {
+ var match = /^.*(<[\w\-]+>)$/.exec(keys);
+ var selectedCharacter = match ? match[1] : keys.slice(-1);
+ if (selectedCharacter.length > 1){
+ switch(selectedCharacter){
+ case '<CR>':
+ selectedCharacter='\n';
+ break;
+ case '<Space>':
+ selectedCharacter=' ';
+ break;
+ default:
+ break;
+ }
+ }
+ return selectedCharacter;
+ }
+ function repeatFn(cm, fn, repeat) {
+ return function() {
+ for (var i = 0; i < repeat; i++) {
+ fn(cm);
}
+ };
+ }
+ function copyCursor(cur) {
+ return Pos(cur.line, cur.ch);
+ }
+ function cursorEqual(cur1, cur2) {
+ return cur1.ch == cur2.ch && cur1.line == cur2.line;
+ }
+ function cursorIsBefore(cur1, cur2) {
+ if (cur1.line < cur2.line) {
+ return true;
+ }
+ if (cur1.line == cur2.line && cur1.ch < cur2.ch) {
+ return true;
+ }
+ return false;
+ }
+ function cursorMin(cur1, cur2) {
+ if (arguments.length > 2) {
+ cur2 = cursorMin.apply(undefined, Array.prototype.slice.call(arguments, 1));
+ }
+ return cursorIsBefore(cur1, cur2) ? cur1 : cur2;
+ }
+ function cursorMax(cur1, cur2) {
+ if (arguments.length > 2) {
+ cur2 = cursorMax.apply(undefined, Array.prototype.slice.call(arguments, 1));
+ }
+ return cursorIsBefore(cur1, cur2) ? cur2 : cur1;
+ }
+ function cursorIsBetween(cur1, cur2, cur3) {
+ var cur1before2 = cursorIsBefore(cur1, cur2);
+ var cur2before3 = cursorIsBefore(cur2, cur3);
+ return cur1before2 && cur2before3;
+ }
+ function lineLength(cm, lineNum) {
+ return cm.getLine(lineNum).length;
+ }
+ function trim(s) {
+ if (s.trim) {
+ return s.trim();
+ }
+ return s.replace(/^\s+|\s+$/g, '');
+ }
+ function escapeRegex(s) {
+ return s.replace(/([.?*+$\[\]\/\\(){}|\-])/g, '\\$1');
+ }
+ function extendLineToColumn(cm, lineNum, column) {
+ var endCh = lineLength(cm, lineNum);
+ var spaces = new Array(column-endCh+1).join(' ');
+ cm.setCursor(Pos(lineNum, endCh));
+ cm.replaceRange(spaces, cm.getCursor());
+ }
+ function selectBlock(cm, selectionEnd) {
+ var selections = [], ranges = cm.listSelections();
+ var head = copyCursor(cm.clipPos(selectionEnd));
+ var isClipped = !cursorEqual(selectionEnd, head);
+ var curHead = cm.getCursor('head');
+ var primIndex = getIndex(ranges, curHead);
+ var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor);
+ var max = ranges.length - 1;
+ var index = max - primIndex > primIndex ? max : 0;
+ var base = ranges[index].anchor;
- handleCursorMove.running = true;
- var pos = editor.getCursorPosition();
- var lineLen = editor.session.getLine(pos.row).length;
+ var firstLine = Math.min(base.line, head.line);
+ var lastLine = Math.max(base.line, head.line);
+ var baseCh = base.ch, headCh = head.ch;
- if (lineLen && pos.column === lineLen)
- editor.navigateLeft();
- handleCursorMove.running = false;
+ var dir = ranges[index].head.ch - baseCh;
+ var newDir = headCh - baseCh;
+ if (dir > 0 && newDir <= 0) {
+ baseCh++;
+ if (!isClipped) { headCh--; }
+ } else if (dir < 0 && newDir >= 0) {
+ baseCh--;
+ if (!wasClipped) { headCh++; }
+ } else if (dir < 0 && newDir == -1) {
+ baseCh--;
+ headCh++;
+ }
+ for (var line = firstLine; line <= lastLine; line++) {
+ var range = {anchor: new Pos(line, baseCh), head: new Pos(line, headCh)};
+ selections.push(range);
+ }
+ primIndex = head.line == lastLine ? selections.length - 1 : 0;
+ cm.setSelections(selections);
+ selectionEnd.ch = headCh;
+ base.ch = baseCh;
+ return base;
}
-};
-});
-ace.define('ace/keyboard/vim/maps/util', ['require', 'exports', 'module' , 'ace/keyboard/vim/registers', 'ace/lib/dom'], function(require, exports, module) {
-var registers = require("../registers");
-
-var dom = require("../../../lib/dom");
-dom.importCssString('.insert-mode .ace_cursor{\
- border-left: 2px solid #333333;\
-}\
-.ace_dark.insert-mode .ace_cursor{\
- border-left: 2px solid #eeeeee;\
-}\
-.normal-mode .ace_cursor{\
- border: 0!important;\
- background-color: red;\
- opacity: 0.5;\
-}', 'vimMode');
-
-module.exports = {
- onVisualMode: false,
- onVisualLineMode: false,
- currentMode: 'normal',
- noMode: function(editor) {
- editor.unsetStyle('insert-mode');
- editor.unsetStyle('normal-mode');
- if (editor.commands.recording)
- editor.commands.toggleRecording(editor);
- editor.setOverwrite(false);
- },
- insertMode: function(editor) {
- this.currentMode = 'insert';
- editor.setStyle('insert-mode');
- editor.unsetStyle('normal-mode');
-
- editor.setOverwrite(false);
- editor.keyBinding.$data.buffer = "";
- editor.keyBinding.$data.state = "insertMode";
- this.onVisualMode = false;
- this.onVisualLineMode = false;
- if(this.onInsertReplaySequence) {
- editor.commands.macro = this.onInsertReplaySequence;
- editor.commands.replay(editor);
- this.onInsertReplaySequence = null;
- this.normalMode(editor);
+ function selectForInsert(cm, head, height) {
+ var sel = [];
+ for (var i = 0; i < height; i++) {
+ var lineHead = offsetCursor(head, i, 0);
+ sel.push({anchor: lineHead, head: lineHead});
+ }
+ cm.setSelections(sel, 0);
+ }
+ function getIndex(ranges, cursor, end) {
+ for (var i = 0; i < ranges.length; i++) {
+ var atAnchor = end != 'head' && cursorEqual(ranges[i].anchor, cursor);
+ var atHead = end != 'anchor' && cursorEqual(ranges[i].head, cursor);
+ if (atAnchor || atHead) {
+ return i;
+ }
+ }
+ return -1;
+ }
+ function getSelectedAreaRange(cm, vim) {
+ var lastSelection = vim.lastSelection;
+ var getCurrentSelectedAreaRange = function() {
+ var selections = cm.listSelections();
+ var start = selections[0];
+ var end = selections[selections.length-1];
+ var selectionStart = cursorIsBefore(start.anchor, start.head) ? start.anchor : start.head;
+ var selectionEnd = cursorIsBefore(end.anchor, end.head) ? end.head : end.anchor;
+ return [selectionStart, selectionEnd];
+ };
+ var getLastSelectedAreaRange = function() {
+ var selectionStart = cm.getCursor();
+ var selectionEnd = cm.getCursor();
+ var block = lastSelection.visualBlock;
+ if (block) {
+ var width = block.width;
+ var height = block.height;
+ selectionEnd = Pos(selectionStart.line + height, selectionStart.ch + width);
+ var selections = [];
+ for (var i = selectionStart.line; i < selectionEnd.line; i++) {
+ var anchor = Pos(i, selectionStart.ch);
+ var head = Pos(i, selectionEnd.ch);
+ var range = {anchor: anchor, head: head};
+ selections.push(range);
+ }
+ cm.setSelections(selections);
} else {
- editor._emit("changeStatus");
- if(!editor.commands.recording)
- editor.commands.toggleRecording(editor);
+ var start = lastSelection.anchorMark.find();
+ var end = lastSelection.headMark.find();
+ var line = end.line - start.line;
+ var ch = end.ch - start.ch;
+ selectionEnd = {line: selectionEnd.line + line, ch: line ? selectionEnd.ch : ch + selectionEnd.ch};
+ if (lastSelection.visualLine) {
+ selectionStart = Pos(selectionStart.line, 0);
+ selectionEnd = Pos(selectionEnd.line, lineLength(cm, selectionEnd.line));
+ }
+ cm.setSelection(selectionStart, selectionEnd);
}
- },
- normalMode: function(editor) {
- this.currentMode = 'normal';
-
- editor.unsetStyle('insert-mode');
- editor.setStyle('normal-mode');
- editor.clearSelection();
-
- var pos;
- if (!editor.getOverwrite()) {
- pos = editor.getCursorPosition();
- if (pos.column > 0)
- editor.navigateLeft();
+ return [selectionStart, selectionEnd];
+ };
+ if (!vim.visualMode) {
+ return getLastSelectedAreaRange();
+ } else {
+ return getCurrentSelectedAreaRange();
+ }
+ }
+ function updateLastSelection(cm, vim) {
+ var anchor = vim.sel.anchor;
+ var head = vim.sel.head;
+ if (vim.lastPastedText) {
+ head = cm.posFromIndex(cm.indexFromPos(anchor) + vim.lastPastedText.length);
+ vim.lastPastedText = null;
+ }
+ vim.lastSelection = {'anchorMark': cm.setBookmark(anchor),
+ 'headMark': cm.setBookmark(head),
+ 'anchor': copyCursor(anchor),
+ 'head': copyCursor(head),
+ 'visualMode': vim.visualMode,
+ 'visualLine': vim.visualLine,
+ 'visualBlock': vim.visualBlock};
+ }
+ function expandSelection(cm, start, end) {
+ var sel = cm.state.vim.sel;
+ var head = sel.head;
+ var anchor = sel.anchor;
+ var tmp;
+ if (cursorIsBefore(end, start)) {
+ tmp = end;
+ end = start;
+ start = tmp;
+ }
+ if (cursorIsBefore(head, anchor)) {
+ head = cursorMin(start, head);
+ anchor = cursorMax(anchor, end);
+ } else {
+ anchor = cursorMin(start, anchor);
+ head = cursorMax(head, end);
+ head = offsetCursor(head, 0, -1);
+ if (head.ch == -1 && head.line != cm.firstLine()) {
+ head = Pos(head.line - 1, lineLength(cm, head.line - 1));
}
+ }
+ return [anchor, head];
+ }
+ function updateCmSelection(cm, sel, mode) {
+ var vim = cm.state.vim;
+ sel = sel || vim.sel;
+ var mode = mode ||
+ vim.visualLine ? 'line' : vim.visualBlock ? 'block' : 'char';
+ var cmSel = makeCmSelection(cm, sel, mode);
+ cm.setSelections(cmSel.ranges, cmSel.primary);
+ updateFakeCursor(cm);
+ }
+ function makeCmSelection(cm, sel, mode, exclusive) {
+ var head = copyCursor(sel.head);
+ var anchor = copyCursor(sel.anchor);
+ if (mode == 'char') {
+ var headOffset = !exclusive && !cursorIsBefore(sel.head, sel.anchor) ? 1 : 0;
+ var anchorOffset = cursorIsBefore(sel.head, sel.anchor) ? 1 : 0;
+ head = offsetCursor(sel.head, 0, headOffset);
+ anchor = offsetCursor(sel.anchor, 0, anchorOffset);
+ return {
+ ranges: [{anchor: anchor, head: head}],
+ primary: 0
+ };
+ } else if (mode == 'line') {
+ if (!cursorIsBefore(sel.head, sel.anchor)) {
+ anchor.ch = 0;
- editor.setOverwrite(true);
- editor.keyBinding.$data.buffer = "";
- editor.keyBinding.$data.state = "start";
- this.onVisualMode = false;
- this.onVisualLineMode = false;
- editor._emit("changeStatus");
- if (editor.commands.recording) {
- editor.commands.toggleRecording(editor);
- return editor.commands.macro;
+ var lastLine = cm.lastLine();
+ if (head.line > lastLine) {
+ head.line = lastLine;
+ }
+ head.ch = lineLength(cm, head.line);
+ } else {
+ head.ch = 0;
+ anchor.ch = lineLength(cm, anchor.line);
}
- else {
- return [];
+ return {
+ ranges: [{anchor: anchor, head: head}],
+ primary: 0
+ };
+ } else if (mode == 'block') {
+ var top = Math.min(anchor.line, head.line),
+ left = Math.min(anchor.ch, head.ch),
+ bottom = Math.max(anchor.line, head.line),
+ right = Math.max(anchor.ch, head.ch) + 1;
+ var height = bottom - top + 1;
+ var primary = head.line == top ? 0 : height - 1;
+ var ranges = [];
+ for (var i = 0; i < height; i++) {
+ ranges.push({
+ anchor: Pos(top + i, left),
+ head: Pos(top + i, right)
+ });
}
- },
- visualMode: function(editor, lineMode) {
- if (
- (this.onVisualLineMode && lineMode)
- || (this.onVisualMode && !lineMode)
- ) {
- this.normalMode(editor);
- return;
+ return {
+ ranges: ranges,
+ primary: primary
+ };
+ }
+ }
+ function getHead(cm) {
+ var cur = cm.getCursor('head');
+ if (cm.getSelection().length == 1) {
+ cur = cursorMin(cur, cm.getCursor('anchor'));
+ }
+ return cur;
+ }
+ function exitVisualMode(cm, moveHead) {
+ var vim = cm.state.vim;
+ if (moveHead !== false) {
+ cm.setCursor(clipCursorToContent(cm, vim.sel.head));
+ }
+ updateLastSelection(cm, vim);
+ vim.visualMode = false;
+ vim.visualLine = false;
+ vim.visualBlock = false;
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
+ if (vim.fakeCursor) {
+ vim.fakeCursor.clear();
+ }
+ }
+ function clipToLine(cm, curStart, curEnd) {
+ var selection = cm.getRange(curStart, curEnd);
+ if (/\n\s*$/.test(selection)) {
+ var lines = selection.split('\n');
+ lines.pop();
+ var line;
+ for (var line = lines.pop(); lines.length > 0 && line && isWhiteSpaceString(line); line = lines.pop()) {
+ curEnd.line--;
+ curEnd.ch = 0;
+ }
+ if (line) {
+ curEnd.line--;
+ curEnd.ch = lineLength(cm, curEnd.line);
+ } else {
+ curEnd.ch = 0;
}
+ }
+ }
+ function expandSelectionToLine(_cm, curStart, curEnd) {
+ curStart.ch = 0;
+ curEnd.ch = 0;
+ curEnd.line++;
+ }
- editor.setStyle('insert-mode');
- editor.unsetStyle('normal-mode');
+ function findFirstNonWhiteSpaceCharacter(text) {
+ if (!text) {
+ return 0;
+ }
+ var firstNonWS = text.search(/\S/);
+ return firstNonWS == -1 ? text.length : firstNonWS;
+ }
- editor._emit("changeStatus");
- if (lineMode) {
- this.onVisualLineMode = true;
- } else {
- this.onVisualMode = true;
- this.onVisualLineMode = false;
+ function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol) {
+ var cur = getHead(cm);
+ var line = cm.getLine(cur.line);
+ var idx = cur.ch;
+ var test = noSymbol ? wordCharTest[0] : bigWordCharTest [0];
+ while (!test(line.charAt(idx))) {
+ idx++;
+ if (idx >= line.length) { return null; }
+ }
+
+ if (bigWord) {
+ test = bigWordCharTest[0];
+ } else {
+ test = wordCharTest[0];
+ if (!test(line.charAt(idx))) {
+ test = wordCharTest[1];
}
- },
- getRightNthChar: function(editor, cursor, ch, n) {
- var line = editor.getSession().getLine(cursor.row);
- var matches = line.substr(cursor.column + 1).split(ch);
+ }
- return n < matches.length ? matches.slice(0, n).join(ch).length : null;
- },
- getLeftNthChar: function(editor, cursor, ch, n) {
- var line = editor.getSession().getLine(cursor.row);
- var matches = line.substr(0, cursor.column).split(ch);
+ var end = idx, start = idx;
+ while (test(line.charAt(end)) && end < line.length) { end++; }
+ while (test(line.charAt(start)) && start >= 0) { start--; }
+ start++;
- return n < matches.length ? matches.slice(-1 * n).join(ch).length : null;
- },
- toRealChar: function(ch) {
- if (ch.length === 1)
- return ch;
-
- if (/^shift-./.test(ch))
- return ch[ch.length - 1].toUpperCase();
- else
- return "";
- },
- copyLine: function(editor) {
- var pos = editor.getCursorPosition();
- editor.selection.clearSelection();
- editor.moveCursorTo(pos.row, pos.column);
- editor.selection.selectLine();
- registers._default.isLine = true;
- registers._default.text = editor.getCopyText().replace(/\n$/, "");
- editor.selection.clearSelection();
- editor.moveCursorTo(pos.row, pos.column);
+ if (inclusive) {
+ var wordEnd = end;
+ while (/\s/.test(line.charAt(end)) && end < line.length) { end++; }
+ if (wordEnd == end) {
+ var wordStart = start;
+ while (/\s/.test(line.charAt(start - 1)) && start > 0) { start--; }
+ if (!start) { start = wordStart; }
+ }
+ }
+ return { start: Pos(cur.line, start), end: Pos(cur.line, end) };
}
-};
-});
-ace.define('ace/keyboard/vim/registers', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-"never use strict";
+ function recordJumpPosition(cm, oldCur, newCur) {
+ if (!cursorEqual(oldCur, newCur)) {
+ vimGlobalState.jumpList.add(cm, oldCur, newCur);
+ }
+ }
-module.exports = {
- _default: {
- text: "",
- isLine: false
+ function recordLastCharacterSearch(increment, args) {
+ vimGlobalState.lastChararacterSearch.increment = increment;
+ vimGlobalState.lastChararacterSearch.forward = args.forward;
+ vimGlobalState.lastChararacterSearch.selectedCharacter = args.selectedCharacter;
}
-};
-});
+ var symbolToMode = {
+ '(': 'bracket', ')': 'bracket', '{': 'bracket', '}': 'bracket',
+ '[': 'section', ']': 'section',
+ '*': 'comment', '/': 'comment',
+ 'm': 'method', 'M': 'method',
+ '#': 'preprocess'
+ };
+ var findSymbolModes = {
+ bracket: {
+ isComplete: function(state) {
+ if (state.nextCh === state.symb) {
+ state.depth++;
+ if (state.depth >= 1)return true;
+ } else if (state.nextCh === state.reverseSymb) {
+ state.depth--;
+ }
+ return false;
+ }
+ },
+ section: {
+ init: function(state) {
+ state.curMoveThrough = true;
+ state.symb = (state.forward ? ']' : '[') === state.symb ? '{' : '}';
+ },
+ isComplete: function(state) {
+ return state.index === 0 && state.nextCh === state.symb;
+ }
+ },
+ comment: {
+ isComplete: function(state) {
+ var found = state.lastCh === '*' && state.nextCh === '/';
+ state.lastCh = state.nextCh;
+ return found;
+ }
+ },
+ method: {
+ init: function(state) {
+ state.symb = (state.symb === 'm' ? '{' : '}');
+ state.reverseSymb = state.symb === '{' ? '}' : '{';
+ },
+ isComplete: function(state) {
+ if (state.nextCh === state.symb)return true;
+ return false;
+ }
+ },
+ preprocess: {
+ init: function(state) {
+ state.index = 0;
+ },
+ isComplete: function(state) {
+ if (state.nextCh === '#') {
+ var token = state.lineText.match(/#(\w+)/)[1];
+ if (token === 'endif') {
+ if (state.forward && state.depth === 0) {
+ return true;
+ }
+ state.depth++;
+ } else if (token === 'if') {
+ if (!state.forward && state.depth === 0) {
+ return true;
+ }
+ state.depth--;
+ }
+ if (token === 'else' && state.depth === 0)return true;
+ }
+ return false;
+ }
+ }
+ };
+ function findSymbol(cm, repeat, forward, symb) {
+ var cur = copyCursor(cm.getCursor());
+ var increment = forward ? 1 : -1;
+ var endLine = forward ? cm.lineCount() : -1;
+ var curCh = cur.ch;
+ var line = cur.line;
+ var lineText = cm.getLine(line);
+ var state = {
+ lineText: lineText,
+ nextCh: lineText.charAt(curCh),
+ lastCh: null,
+ index: curCh,
+ symb: symb,
+ reverseSymb: (forward ? { ')': '(', '}': '{' } : { '(': ')', '{': '}' })[symb],
+ forward: forward,
+ depth: 0,
+ curMoveThrough: false
+ };
+ var mode = symbolToMode[symb];
+ if (!mode)return cur;
+ var init = findSymbolModes[mode].init;
+ var isComplete = findSymbolModes[mode].isComplete;
+ if (init) { init(state); }
+ while (line !== endLine && repeat) {
+ state.index += increment;
+ state.nextCh = state.lineText.charAt(state.index);
+ if (!state.nextCh) {
+ line += increment;
+ state.lineText = cm.getLine(line) || '';
+ if (increment > 0) {
+ state.index = 0;
+ } else {
+ var lineLen = state.lineText.length;
+ state.index = (lineLen > 0) ? (lineLen-1) : 0;
+ }
+ state.nextCh = state.lineText.charAt(state.index);
+ }
+ if (isComplete(state)) {
+ cur.line = line;
+ cur.ch = state.index;
+ repeat--;
+ }
+ }
+ if (state.nextCh || state.curMoveThrough) {
+ return Pos(line, state.index);
+ }
+ return cur;
+ }
+ function findWord(cm, cur, forward, bigWord, emptyLineIsWord) {
+ var lineNum = cur.line;
+ var pos = cur.ch;
+ var line = cm.getLine(lineNum);
+ var dir = forward ? 1 : -1;
+ var charTests = bigWord ? bigWordCharTest: wordCharTest;
+ if (emptyLineIsWord && line == '') {
+ lineNum += dir;
+ line = cm.getLine(lineNum);
+ if (!isLine(cm, lineNum)) {
+ return null;
+ }
+ pos = (forward) ? 0 : line.length;
+ }
-ace.define('ace/keyboard/vim/maps/motions', ['require', 'exports', 'module' , 'ace/keyboard/vim/maps/util', 'ace/search', 'ace/range'], function(require, exports, module) {
+ while (true) {
+ if (emptyLineIsWord && line == '') {
+ return { from: 0, to: 0, line: lineNum };
+ }
+ var stop = (dir > 0) ? line.length : -1;
+ var wordStart = stop, wordEnd = stop;
+ while (pos != stop) {
+ var foundWord = false;
+ for (var i = 0; i < charTests.length && !foundWord; ++i) {
+ if (charTests[i](line.charAt(pos))) {
+ wordStart = pos;
+ while (pos != stop && charTests[i](line.charAt(pos))) {
+ pos += dir;
+ }
+ wordEnd = pos;
+ foundWord = wordStart != wordEnd;
+ if (wordStart == cur.ch && lineNum == cur.line &&
+ wordEnd == wordStart + dir) {
+ continue;
+ } else {
+ return {
+ from: Math.min(wordStart, wordEnd + 1),
+ to: Math.max(wordStart, wordEnd),
+ line: lineNum };
+ }
+ }
+ }
+ if (!foundWord) {
+ pos += dir;
+ }
+ }
+ lineNum += dir;
+ if (!isLine(cm, lineNum)) {
+ return null;
+ }
+ line = cm.getLine(lineNum);
+ pos = (dir > 0) ? 0 : line.length;
+ }
+ throw new Error('The impossible happened.');
+ }
+ function moveToWord(cm, cur, repeat, forward, wordEnd, bigWord) {
+ var curStart = copyCursor(cur);
+ var words = [];
+ if (forward && !wordEnd || !forward && wordEnd) {
+ repeat++;
+ }
+ var emptyLineIsWord = !(forward && wordEnd);
+ for (var i = 0; i < repeat; i++) {
+ var word = findWord(cm, cur, forward, bigWord, emptyLineIsWord);
+ if (!word) {
+ var eodCh = lineLength(cm, cm.lastLine());
+ words.push(forward
+ ? {line: cm.lastLine(), from: eodCh, to: eodCh}
+ : {line: 0, from: 0, to: 0});
+ break;
+ }
+ words.push(word);
+ cur = Pos(word.line, forward ? (word.to - 1) : word.from);
+ }
+ var shortCircuit = words.length != repeat;
+ var firstWord = words[0];
+ var lastWord = words.pop();
+ if (forward && !wordEnd) {
+ if (!shortCircuit && (firstWord.from != curStart.ch || firstWord.line != curStart.line)) {
+ lastWord = words.pop();
+ }
+ return Pos(lastWord.line, lastWord.from);
+ } else if (forward && wordEnd) {
+ return Pos(lastWord.line, lastWord.to - 1);
+ } else if (!forward && wordEnd) {
+ if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) {
+ lastWord = words.pop();
+ }
+ return Pos(lastWord.line, lastWord.to);
+ } else {
+ return Pos(lastWord.line, lastWord.from);
+ }
+ }
+ function moveToCharacter(cm, repeat, forward, character) {
+ var cur = cm.getCursor();
+ var start = cur.ch;
+ var idx;
+ for (var i = 0; i < repeat; i ++) {
+ var line = cm.getLine(cur.line);
+ idx = charIdxInLine(start, line, character, forward, true);
+ if (idx == -1) {
+ return null;
+ }
+ start = idx;
+ }
+ return Pos(cm.getCursor().line, idx);
+ }
-var util = require("./util");
+ function moveToColumn(cm, repeat) {
+ var line = cm.getCursor().line;
+ return clipCursorToContent(cm, Pos(line, repeat - 1));
+ }
-var keepScrollPosition = function(editor, fn) {
- var scrollTopRow = editor.renderer.getScrollTopRow();
- var initialRow = editor.getCursorPosition().row;
- var diff = initialRow - scrollTopRow;
- fn && fn.call(editor);
- editor.renderer.scrollToRow(editor.getCursorPosition().row - diff);
-};
+ function updateMark(cm, vim, markName, pos) {
+ if (!inArray(markName, validMarks)) {
+ return;
+ }
+ if (vim.marks[markName]) {
+ vim.marks[markName].clear();
+ }
+ vim.marks[markName] = cm.setBookmark(pos);
+ }
-function Motion(m) {
- if (typeof m == "function") {
- var getPos = m;
- m = this;
- } else {
- var getPos = m.getPos;
+ function charIdxInLine(start, line, character, forward, includeChar) {
+ var idx;
+ if (forward) {
+ idx = line.indexOf(character, start + 1);
+ if (idx != -1 && !includeChar) {
+ idx -= 1;
+ }
+ } else {
+ idx = line.lastIndexOf(character, start - 1);
+ if (idx != -1 && !includeChar) {
+ idx += 1;
+ }
+ }
+ return idx;
}
- m.nav = function(editor, range, count, param) {
- var a = getPos(editor, range, count, param, false);
- if (!a)
- return;
- editor.clearSelection();
- editor.moveCursorTo(a.row, a.column);
- };
- m.sel = function(editor, range, count, param) {
- var a = getPos(editor, range, count, param, true);
- if (!a)
- return;
- editor.selection.selectTo(a.row, a.column);
- };
- return m;
-}
-
-var nonWordRe = /[\s.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/;
-var wordSeparatorRe = /[.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/;
-var whiteRe = /\s/;
-var StringStream = function(editor, cursor) {
- var sel = editor.selection;
- this.range = sel.getRange();
- cursor = cursor || sel.selectionLead;
- this.row = cursor.row;
- this.col = cursor.column;
- var line = editor.session.getLine(this.row);
- var maxRow = editor.session.getLength();
- this.ch = line[this.col] || '\n';
- this.skippedLines = 0;
-
- this.next = function() {
- this.ch = line[++this.col] || this.handleNewLine(1);
- return this.ch;
- };
- this.prev = function() {
- this.ch = line[--this.col] || this.handleNewLine(-1);
- return this.ch;
- };
- this.peek = function(dir) {
- var ch = line[this.col + dir];
- if (ch)
- return ch;
- if (dir == -1)
- return '\n';
- if (this.col == line.length - 1)
- return '\n';
- return editor.session.getLine(this.row + 1)[0] || '\n';
- };
- this.handleNewLine = function(dir) {
- if (dir == 1){
- if (this.col == line.length)
- return '\n';
- if (this.row == maxRow - 1)
- return '';
- this.col = 0;
- this.row ++;
- line = editor.session.getLine(this.row);
- this.skippedLines++;
- return line[0] || '\n';
- }
- if (dir == -1) {
- if (this.row === 0)
- return '';
- this.row --;
- line = editor.session.getLine(this.row);
- this.col = line.length;
- this.skippedLines--;
- return '\n';
+ function findParagraph(cm, head, repeat, dir, inclusive) {
+ var line = head.line;
+ var min = cm.firstLine();
+ var max = cm.lastLine();
+ var start, end, i = line;
+ function isEmpty(i) { return !/\S/.test(cm.getLine(i)); }
+ function isBoundary(i, dir, any) {
+ if (any) { return isEmpty(i) != isEmpty(i + dir); }
+ return !isEmpty(i) && isEmpty(i + dir);
+ }
+ if (dir) {
+ while (min <= i && i <= max && repeat > 0) {
+ if (isBoundary(i, dir)) { repeat--; }
+ i += dir;
}
- };
- this.debug = function() {
- console.log(line.substring(0, this.col)+'|'+this.ch+'\''+this.col+'\''+line.substr(this.col+1));
- };
-};
+ return new Pos(i, 0);
+ }
+
+ var vim = cm.state.vim;
+ if (vim.visualLine && isBoundary(line, 1, true)) {
+ var anchor = vim.sel.anchor;
+ if (isBoundary(anchor.line, -1, true)) {
+ if (!inclusive || anchor.line != line) {
+ line += 1;
+ }
+ }
+ }
+ var startState = isEmpty(line);
+ for (i = line; i <= max && repeat; i++) {
+ if (isBoundary(i, 1, true)) {
+ if (!inclusive || isEmpty(i) != startState) {
+ repeat--;
+ }
+ }
+ }
+ end = new Pos(i, 0);
+ if (i > max && !startState) { startState = true; }
+ else { inclusive = false; }
+ for (i = line; i > min; i--) {
+ if (!inclusive || isEmpty(i) == startState || i == line) {
+ if (isBoundary(i, -1, true)) { break; }
+ }
+ }
+ start = new Pos(i, 0);
+ return { start: start, end: end };
+ }
+ function selectCompanionObject(cm, head, symb, inclusive) {
+ var cur = head, start, end;
-var Search = require("../../../search").Search;
-var search = new Search();
+ var bracketRegexp = ({
+ '(': /[()]/, ')': /[()]/,
+ '[': /[[\]]/, ']': /[[\]]/,
+ '{': /[{}]/, '}': /[{}]/})[symb];
+ var openSym = ({
+ '(': '(', ')': '(',
+ '[': '[', ']': '[',
+ '{': '{', '}': '{'})[symb];
+ var curChar = cm.getLine(cur.line).charAt(cur.ch);
+ var offset = curChar === openSym ? 1 : 0;
-function find(editor, needle, dir) {
- search.$options.needle = needle;
- search.$options.backwards = dir == -1;
- return search.find(editor.session);
-}
+ start = cm.scanForBracket(Pos(cur.line, cur.ch + offset), -1, null, {'bracketRegex': bracketRegexp});
+ end = cm.scanForBracket(Pos(cur.line, cur.ch + offset), 1, null, {'bracketRegex': bracketRegexp});
-var Range = require("../../../range").Range;
+ if (!start || !end) {
+ return { start: cur, end: cur };
+ }
-var LAST_SEARCH_MOTION = {};
+ start = start.pos;
+ end = end.pos;
-module.exports = {
- "w": new Motion(function(editor) {
- var str = new StringStream(editor);
+ if ((start.line == end.line && start.ch > end.ch)
+ || (start.line > end.line)) {
+ var tmp = start;
+ start = end;
+ end = tmp;
+ }
- if (str.ch && wordSeparatorRe.test(str.ch)) {
- while (str.ch && wordSeparatorRe.test(str.ch))
- str.next();
+ if (inclusive) {
+ end.ch += 1;
+ } else {
+ start.ch += 1;
+ }
+
+ return { start: start, end: end };
+ }
+ function findBeginningAndEnd(cm, head, symb, inclusive) {
+ var cur = copyCursor(head);
+ var line = cm.getLine(cur.line);
+ var chars = line.split('');
+ var start, end, i, len;
+ var firstIndex = chars.indexOf(symb);
+ if (cur.ch < firstIndex) {
+ cur.ch = firstIndex;
+ }
+ else if (firstIndex < cur.ch && chars[cur.ch] == symb) {
+ end = cur.ch; // assign end to the current cursor
+ --cur.ch; // make sure to look backwards
+ }
+ if (chars[cur.ch] == symb && !end) {
+ start = cur.ch + 1; // assign start to ahead of the cursor
+ } else {
+ for (i = cur.ch; i > -1 && !start; i--) {
+ if (chars[i] == symb) {
+ start = i + 1;
+ }
+ }
+ }
+ if (start && !end) {
+ for (i = start, len = chars.length; i < len && !end; i++) {
+ if (chars[i] == symb) {
+ end = i;
+ }
+ }
+ }
+ if (!start || !end) {
+ return { start: cur, end: cur };
+ }
+ if (inclusive) {
+ --start; ++end;
+ }
+
+ return {
+ start: Pos(cur.line, start),
+ end: Pos(cur.line, end)
+ };
+ }
+ defineOption('pcre', true, 'boolean');
+ function SearchState() {}
+ SearchState.prototype = {
+ getQuery: function() {
+ return vimGlobalState.query;
+ },
+ setQuery: function(query) {
+ vimGlobalState.query = query;
+ },
+ getOverlay: function() {
+ return this.searchOverlay;
+ },
+ setOverlay: function(overlay) {
+ this.searchOverlay = overlay;
+ },
+ isReversed: function() {
+ return vimGlobalState.isReversed;
+ },
+ setReversed: function(reversed) {
+ vimGlobalState.isReversed = reversed;
+ },
+ getScrollbarAnnotate: function() {
+ return this.annotate;
+ },
+ setScrollbarAnnotate: function(annotate) {
+ this.annotate = annotate;
+ }
+ };
+ function getSearchState(cm) {
+ var vim = cm.state.vim;
+ return vim.searchState_ || (vim.searchState_ = new SearchState());
+ }
+ function dialog(cm, template, shortText, onClose, options) {
+ if (cm.openDialog) {
+ cm.openDialog(template, onClose, { bottom: true, value: options.value,
+ onKeyDown: options.onKeyDown, onKeyUp: options.onKeyUp,
+ selectValueOnOpen: false});
+ }
+ else {
+ onClose(prompt(shortText, ''));
+ }
+ }
+ function splitBySlash(argString) {
+ var slashes = findUnescapedSlashes(argString) || [];
+ if (!slashes.length) return [];
+ var tokens = [];
+ if (slashes[0] !== 0) return;
+ for (var i = 0; i < slashes.length; i++) {
+ if (typeof slashes[i] == 'number')
+ tokens.push(argString.substring(slashes[i] + 1, slashes[i+1]));
+ }
+ return tokens;
+ }
+
+ function findUnescapedSlashes(str) {
+ var escapeNextChar = false;
+ var slashes = [];
+ for (var i = 0; i < str.length; i++) {
+ var c = str.charAt(i);
+ if (!escapeNextChar && c == '/') {
+ slashes.push(i);
+ }
+ escapeNextChar = !escapeNextChar && (c == '\\');
+ }
+ return slashes;
+ }
+ function translateRegex(str) {
+ var specials = '|(){';
+ var unescape = '}';
+ var escapeNextChar = false;
+ var out = [];
+ for (var i = -1; i < str.length; i++) {
+ var c = str.charAt(i) || '';
+ var n = str.charAt(i+1) || '';
+ var specialComesNext = (n && specials.indexOf(n) != -1);
+ if (escapeNextChar) {
+ if (c !== '\\' || !specialComesNext) {
+ out.push(c);
+ }
+ escapeNextChar = false;
} else {
- while (str.ch && !nonWordRe.test(str.ch))
- str.next();
- }
- while (str.ch && whiteRe.test(str.ch) && str.skippedLines < 2)
- str.next();
-
- str.skippedLines == 2 && str.prev();
- return {column: str.col, row: str.row};
- }),
- "W": new Motion(function(editor) {
- var str = new StringStream(editor);
- while(str.ch && !(whiteRe.test(str.ch) && !whiteRe.test(str.peek(1))) && str.skippedLines < 2)
- str.next();
- if (str.skippedLines == 2)
- str.prev();
- else
- str.next();
-
- return {column: str.col, row: str.row};
- }),
- "b": new Motion(function(editor) {
- var str = new StringStream(editor);
-
- str.prev();
- while (str.ch && whiteRe.test(str.ch) && str.skippedLines > -2)
- str.prev();
-
- if (str.ch && wordSeparatorRe.test(str.ch)) {
- while (str.ch && wordSeparatorRe.test(str.ch))
- str.prev();
+ if (c === '\\') {
+ escapeNextChar = true;
+ if (n && unescape.indexOf(n) != -1) {
+ specialComesNext = true;
+ }
+ if (!specialComesNext || n === '\\') {
+ out.push(c);
+ }
+ } else {
+ out.push(c);
+ if (specialComesNext && n !== '\\') {
+ out.push('\\');
+ }
+ }
+ }
+ }
+ return out.join('');
+ }
+ function translateRegexReplace(str) {
+ var escapeNextChar = false;
+ var out = [];
+ for (var i = -1; i < str.length; i++) {
+ var c = str.charAt(i) || '';
+ var n = str.charAt(i+1) || '';
+ if (escapeNextChar) {
+ out.push(c);
+ escapeNextChar = false;
} else {
- while (str.ch && !nonWordRe.test(str.ch))
- str.prev();
- }
- str.ch && str.next();
- return {column: str.col, row: str.row};
- }),
- "B": new Motion(function(editor) {
- var str = new StringStream(editor);
- str.prev();
- while(str.ch && !(!whiteRe.test(str.ch) && whiteRe.test(str.peek(-1))) && str.skippedLines > -2)
- str.prev();
-
- if (str.skippedLines == -2)
- str.next();
-
- return {column: str.col, row: str.row};
- }),
- "e": new Motion(function(editor) {
- var str = new StringStream(editor);
-
- str.next();
- while (str.ch && whiteRe.test(str.ch))
- str.next();
-
- if (str.ch && wordSeparatorRe.test(str.ch)) {
- while (str.ch && wordSeparatorRe.test(str.ch))
- str.next();
+ if (c === '\\') {
+ escapeNextChar = true;
+ if ((isNumber(n) || n === '$')) {
+ out.push('$');
+ } else if (n !== '/' && n !== '\\') {
+ out.push('\\');
+ }
+ } else {
+ if (c === '$') {
+ out.push('$');
+ }
+ out.push(c);
+ if (n === '/') {
+ out.push('\\');
+ }
+ }
+ }
+ }
+ return out.join('');
+ }
+ function unescapeRegexReplace(str) {
+ var stream = new CodeMirror.StringStream(str);
+ var output = [];
+ while (!stream.eol()) {
+ while (stream.peek() && stream.peek() != '\\') {
+ output.push(stream.next());
+ }
+ if (stream.match('\\/', true)) {
+ output.push('/');
+ } else if (stream.match('\\\\', true)) {
+ output.push('\\');
} else {
- while (str.ch && !nonWordRe.test(str.ch))
- str.next();
- }
- str.ch && str.prev();
- return {column: str.col, row: str.row};
- }),
- "E": new Motion(function(editor) {
- var str = new StringStream(editor);
- str.next();
- while(str.ch && !(!whiteRe.test(str.ch) && whiteRe.test(str.peek(1))))
- str.next();
-
- return {column: str.col, row: str.row};
- }),
-
- "l": {
- nav: function(editor) {
- var pos = editor.getCursorPosition();
- var col = pos.column;
- var lineLen = editor.session.getLine(pos.row).length;
- if (lineLen && col !== lineLen)
- editor.navigateRight();
- },
- sel: function(editor) {
- var pos = editor.getCursorPosition();
- var col = pos.column;
- var lineLen = editor.session.getLine(pos.row).length;
- if (lineLen && col !== lineLen) //In selection mode you can select the newline
- editor.selection.selectRight();
+ output.push(stream.next());
}
- },
- "h": {
- nav: function(editor) {
- var pos = editor.getCursorPosition();
- if (pos.column > 0)
- editor.navigateLeft();
+ }
+ return output.join('');
+ }
+ function parseQuery(query, ignoreCase, smartCase) {
+ var lastSearchRegister = vimGlobalState.registerController.getRegister('/');
+ lastSearchRegister.setText(query);
+ if (query instanceof RegExp) { return query; }
+ var slashes = findUnescapedSlashes(query);
+ var regexPart;
+ var forceIgnoreCase;
+ if (!slashes.length) {
+ regexPart = query;
+ } else {
+ regexPart = query.substring(0, slashes[0]);
+ var flagsPart = query.substring(slashes[0]);
+ forceIgnoreCase = (flagsPart.indexOf('i') != -1);
+ }
+ if (!regexPart) {
+ return null;
+ }
+ if (!getOption('pcre')) {
+ regexPart = translateRegex(regexPart);
+ }
+ if (smartCase) {
+ ignoreCase = (/^[^A-Z]*$/).test(regexPart);
+ }
+ var regexp = new RegExp(regexPart,
+ (ignoreCase || forceIgnoreCase) ? 'i' : undefined);
+ return regexp;
+ }
+ function showConfirm(cm, text) {
+ if (cm.openNotification) {
+ cm.openNotification('<span style="color: red">' + text + '</span>',
+ {bottom: true, duration: 5000});
+ } else {
+ alert(text);
+ }
+ }
+ function makePrompt(prefix, desc) {
+ var raw = '';
+ if (prefix) {
+ raw += '<span style="font-family: monospace">' + prefix + '</span>';
+ }
+ raw += '<input type="text"/> ' +
+ '<span style="color: #888">';
+ if (desc) {
+ raw += '<span style="color: #888">';
+ raw += desc;
+ raw += '</span>';
+ }
+ return raw;
+ }
+ var searchPromptDesc = '(Javascript regexp)';
+ function showPrompt(cm, options) {
+ var shortText = (options.prefix || '') + ' ' + (options.desc || '');
+ var prompt = makePrompt(options.prefix, options.desc);
+ dialog(cm, prompt, shortText, options.onClose, options);
+ }
+ function regexEqual(r1, r2) {
+ if (r1 instanceof RegExp && r2 instanceof RegExp) {
+ var props = ['global', 'multiline', 'ignoreCase', 'source'];
+ for (var i = 0; i < props.length; i++) {
+ var prop = props[i];
+ if (r1[prop] !== r2[prop]) {
+ return false;
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+ function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) {
+ if (!rawQuery) {
+ return;
+ }
+ var state = getSearchState(cm);
+ var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase);
+ if (!query) {
+ return;
+ }
+ highlightSearchMatches(cm, query);
+ if (regexEqual(query, state.getQuery())) {
+ return query;
+ }
+ state.setQuery(query);
+ return query;
+ }
+ function searchOverlay(query) {
+ if (query.source.charAt(0) == '^') {
+ var matchSol = true;
+ }
+ return {
+ token: function(stream) {
+ if (matchSol && !stream.sol()) {
+ stream.skipToEnd();
+ return;
+ }
+ var match = stream.match(query, false);
+ if (match) {
+ if (match[0].length == 0) {
+ stream.next();
+ return 'searching';
+ }
+ if (!stream.sol()) {
+ stream.backUp(1);
+ if (!query.exec(stream.next() + match[0])) {
+ stream.next();
+ return null;
+ }
+ }
+ stream.match(query);
+ return 'searching';
+ }
+ while (!stream.eol()) {
+ stream.next();
+ if (stream.match(query, false)) break;
+ }
},
- sel: function(editor) {
- var pos = editor.getCursorPosition();
- if (pos.column > 0)
- editor.selection.selectLeft();
+ query: query
+ };
+ }
+ function highlightSearchMatches(cm, query) {
+ var searchState = getSearchState(cm);
+ var overlay = searchState.getOverlay();
+ if (!overlay || query != overlay.query) {
+ if (overlay) {
+ cm.removeOverlay(overlay);
}
- },
- "H": {
- nav: function(editor) {
- var row = editor.renderer.getScrollTopRow();
- editor.moveCursorTo(row);
- },
- sel: function(editor) {
- var row = editor.renderer.getScrollTopRow();
- editor.selection.selectTo(row);
+ overlay = searchOverlay(query);
+ cm.addOverlay(overlay);
+ if (cm.showMatchesOnScrollbar) {
+ if (searchState.getScrollbarAnnotate()) {
+ searchState.getScrollbarAnnotate().clear();
+ }
+ searchState.setScrollbarAnnotate(cm.showMatchesOnScrollbar(query));
}
- },
- "M": {
- nav: function(editor) {
- var topRow = editor.renderer.getScrollTopRow();
- var bottomRow = editor.renderer.getScrollBottomRow();
- var row = topRow + ((bottomRow - topRow) / 2);
- editor.moveCursorTo(row);
- },
- sel: function(editor) {
- var topRow = editor.renderer.getScrollTopRow();
- var bottomRow = editor.renderer.getScrollBottomRow();
- var row = topRow + ((bottomRow - topRow) / 2);
- editor.selection.selectTo(row);
+ searchState.setOverlay(overlay);
+ }
+ }
+ function findNext(cm, prev, query, repeat) {
+ if (repeat === undefined) { repeat = 1; }
+ return cm.operation(function() {
+ var pos = cm.getCursor();
+ var cursor = cm.getSearchCursor(query, pos);
+ for (var i = 0; i < repeat; i++) {
+ var found = cursor.find(prev);
+ if (i == 0 && found && cursorEqual(cursor.from(), pos)) { found = cursor.find(prev); }
+ if (!found) {
+ cursor = cm.getSearchCursor(query,
+ (prev) ? Pos(cm.lastLine()) : Pos(cm.firstLine(), 0) );
+ if (!cursor.find(prev)) {
+ return;
+ }
+ }
}
- },
- "L": {
- nav: function(editor) {
- var row = editor.renderer.getScrollBottomRow();
- editor.moveCursorTo(row);
- },
- sel: function(editor) {
- var row = editor.renderer.getScrollBottomRow();
- editor.selection.selectTo(row);
+ return cursor.from();
+ });
+ }
+ function clearSearchHighlight(cm) {
+ var state = getSearchState(cm);
+ cm.removeOverlay(getSearchState(cm).getOverlay());
+ state.setOverlay(null);
+ if (state.getScrollbarAnnotate()) {
+ state.getScrollbarAnnotate().clear();
+ state.setScrollbarAnnotate(null);
+ }
+ }
+ function isInRange(pos, start, end) {
+ if (typeof pos != 'number') {
+ pos = pos.line;
+ }
+ if (start instanceof Array) {
+ return inArray(pos, start);
+ } else {
+ if (end) {
+ return (pos >= start && pos <= end);
+ } else {
+ return pos == start;
}
- },
- "k": {
- nav: function(editor) {
- editor.navigateUp();
- },
- sel: function(editor) {
- editor.selection.selectUp();
+ }
+ }
+ function getUserVisibleLines(cm) {
+ var renderer = cm.ace.renderer;
+ return {
+ top: renderer.getFirstFullyVisibleRow(),
+ bottom: renderer.getLastFullyVisibleRow()
+ }
+ }
+ var defaultExCommandMap = [
+ { name: 'colorscheme', shortName: 'colo' },
+ { name: 'map' },
+ { name: 'imap', shortName: 'im' },
+ { name: 'nmap', shortName: 'nm' },
+ { name: 'vmap', shortName: 'vm' },
+ { name: 'unmap' },
+ { name: 'write', shortName: 'w' },
+ { name: 'undo', shortName: 'u' },
+ { name: 'redo', shortName: 'red' },
+ { name: 'set', shortName: 'se' },
+ { name: 'set', shortName: 'se' },
+ { name: 'setlocal', shortName: 'setl' },
+ { name: 'setglobal', shortName: 'setg' },
+ { name: 'sort', shortName: 'sor' },
+ { name: 'substitute', shortName: 's', possiblyAsync: true },
+ { name: 'nohlsearch', shortName: 'noh' },
+ { name: 'delmarks', shortName: 'delm' },
+ { name: 'registers', shortName: 'reg', excludeFromCommandHistory: true },
+ { name: 'global', shortName: 'g' }
+ ];
+ var ExCommandDispatcher = function() {
+ this.buildCommandMap_();
+ };
+ ExCommandDispatcher.prototype = {
+ processCommand: function(cm, input, opt_params) {
+ var that = this;
+ cm.operation(function () {
+ cm.curOp.isVimOp = true;
+ that._processCommand(cm, input, opt_params);
+ });
+ },
+ _processCommand: function(cm, input, opt_params) {
+ var vim = cm.state.vim;
+ var commandHistoryRegister = vimGlobalState.registerController.getRegister(':');
+ var previousCommand = commandHistoryRegister.toString();
+ if (vim.visualMode) {
+ exitVisualMode(cm);
}
- },
- "j": {
- nav: function(editor) {
- editor.navigateDown();
- },
- sel: function(editor) {
- editor.selection.selectDown();
+ var inputStream = new CodeMirror.StringStream(input);
+ commandHistoryRegister.setText(input);
+ var params = opt_params || {};
+ params.input = input;
+ try {
+ this.parseInput_(cm, inputStream, params);
+ } catch(e) {
+ showConfirm(cm, e);
+ throw e;
}
- },
-
- "i": {
- param: true,
- sel: function(editor, range, count, param) {
- switch (param) {
- case "w":
- editor.selection.selectWord();
- break;
- case "W":
- editor.selection.selectAWord();
- break;
- case "(":
- case "{":
- case "[":
- var cursor = editor.getCursorPosition();
- var end = editor.session.$findClosingBracket(param, cursor, /paren/);
- if (!end)
- return;
- var start = editor.session.$findOpeningBracket(editor.session.$brackets[param], cursor, /paren/);
- if (!start)
- return;
- start.column ++;
- editor.selection.setSelectionRange(Range.fromPoints(start, end));
- break;
- case "'":
- case '"':
- case "/":
- var end = find(editor, param, 1);
- if (!end)
- return;
- var start = find(editor, param, -1);
- if (!start)
- return;
- editor.selection.setSelectionRange(Range.fromPoints(start.end, end.start));
- break;
+ var command;
+ var commandName;
+ if (!params.commandName) {
+ if (params.line !== undefined) {
+ commandName = 'move';
+ }
+ } else {
+ command = this.matchCommand_(params.commandName);
+ if (command) {
+ commandName = command.name;
+ if (command.excludeFromCommandHistory) {
+ commandHistoryRegister.setText(previousCommand);
}
- }
- },
- "a": {
- param: true,
- sel: function(editor, range, count, param) {
- switch (param) {
- case "w":
- editor.selection.selectAWord();
- break;
- case "W":
- editor.selection.selectAWord();
- break;
- case "(":
- case "{":
- case "[":
- var cursor = editor.getCursorPosition();
- var end = editor.session.$findClosingBracket(param, cursor, /paren/);
- if (!end)
- return;
- var start = editor.session.$findOpeningBracket(editor.session.$brackets[param], cursor, /paren/);
- if (!start)
- return;
- end.column ++;
- editor.selection.setSelectionRange(Range.fromPoints(start, end));
- break;
- case "'":
- case "\"":
- case "/":
- var end = find(editor, param, 1);
- if (!end)
- return;
- var start = find(editor, param, -1);
- if (!start)
- return;
- end.column ++;
- editor.selection.setSelectionRange(Range.fromPoints(start.start, end.end));
- break;
+ this.parseCommandArgs_(inputStream, params, command);
+ if (command.type == 'exToKey') {
+ for (var i = 0; i < command.toKeys.length; i++) {
+ CodeMirror.Vim.handleKey(cm, command.toKeys[i], 'mapping');
+ }
+ return;
+ } else if (command.type == 'exToEx') {
+ this.processCommand(cm, command.toInput);
+ return;
}
+ }
+ }
+ if (!commandName) {
+ showConfirm(cm, 'Not an editor command ":' + input + '"');
+ return;
+ }
+ try {
+ exCommands[commandName](cm, params);
+ if ((!command || !command.possiblyAsync) && params.callback) {
+ params.callback();
+ }
+ } catch(e) {
+ showConfirm(cm, e);
+ throw e;
+ }
+ },
+ parseInput_: function(cm, inputStream, result) {
+ inputStream.eatWhile(':');
+ if (inputStream.eat('%')) {
+ result.line = cm.firstLine();
+ result.lineEnd = cm.lastLine();
+ } else {
+ result.line = this.parseLineSpec_(cm, inputStream);
+ if (result.line !== undefined && inputStream.eat(',')) {
+ result.lineEnd = this.parseLineSpec_(cm, inputStream);
+ }
+ }
+ var commandMatch = inputStream.match(/^(\w+)/);
+ if (commandMatch) {
+ result.commandName = commandMatch[1];
+ } else {
+ result.commandName = inputStream.match(/.*/)[0];
}
- },
- "f": new Motion({
- param: true,
- handlesCount: true,
- getPos: function(editor, range, count, param, isSel, isRepeat) {
- if (!isRepeat)
- LAST_SEARCH_MOTION = {ch: "f", param: param};
- var cursor = editor.getCursorPosition();
- var column = util.getRightNthChar(editor, cursor, param, count || 1);
-
- if (typeof column === "number") {
- cursor.column += column + (isSel ? 2 : 1);
- return cursor;
- }
+ return result;
+ },
+ parseLineSpec_: function(cm, inputStream) {
+ var numberMatch = inputStream.match(/^(\d+)/);
+ if (numberMatch) {
+ return parseInt(numberMatch[1], 10) - 1;
}
- }),
- "F": new Motion({
- param: true,
- handlesCount: true,
- getPos: function(editor, range, count, param, isSel, isRepeat) {
- if (!isRepeat)
- LAST_SEARCH_MOTION = {ch: "F", param: param};
- var cursor = editor.getCursorPosition();
- var column = util.getLeftNthChar(editor, cursor, param, count || 1);
-
- if (typeof column === "number") {
- cursor.column -= column + 1;
- return cursor;
+ switch (inputStream.next()) {
+ case '.':
+ return cm.getCursor().line;
+ case '$':
+ return cm.lastLine();
+ case '\'':
+ var mark = cm.state.vim.marks[inputStream.next()];
+ if (mark && mark.find()) {
+ return mark.find().line;
}
+ throw new Error('Mark not set');
+ default:
+ inputStream.backUp(1);
+ return undefined;
+ }
+ },
+ parseCommandArgs_: function(inputStream, params, command) {
+ if (inputStream.eol()) {
+ return;
}
- }),
- "t": new Motion({
- param: true,
- handlesCount: true,
- getPos: function(editor, range, count, param, isSel, isRepeat) {
- if (!isRepeat)
- LAST_SEARCH_MOTION = {ch: "t", param: param};
- var cursor = editor.getCursorPosition();
- var column = util.getRightNthChar(editor, cursor, param, count || 1);
-
- if (isRepeat && column == 0 && !(count > 1))
- var column = util.getRightNthChar(editor, cursor, param, 2);
-
- if (typeof column === "number") {
- cursor.column += column + (isSel ? 1 : 0);
- return cursor;
+ params.argString = inputStream.match(/.*/)[0];
+ var delim = command.argDelimiter || /\s+/;
+ var args = trim(params.argString).split(delim);
+ if (args.length && args[0]) {
+ params.args = args;
+ }
+ },
+ matchCommand_: function(commandName) {
+ for (var i = commandName.length; i > 0; i--) {
+ var prefix = commandName.substring(0, i);
+ if (this.commandMap_[prefix]) {
+ var command = this.commandMap_[prefix];
+ if (command.name.indexOf(commandName) === 0) {
+ return command;
}
+ }
+ }
+ return null;
+ },
+ buildCommandMap_: function() {
+ this.commandMap_ = {};
+ for (var i = 0; i < defaultExCommandMap.length; i++) {
+ var command = defaultExCommandMap[i];
+ var key = command.shortName || command.name;
+ this.commandMap_[key] = command;
}
- }),
- "T": new Motion({
- param: true,
- handlesCount: true,
- getPos: function(editor, range, count, param, isSel, isRepeat) {
- if (!isRepeat)
- LAST_SEARCH_MOTION = {ch: "T", param: param};
- var cursor = editor.getCursorPosition();
- var column = util.getLeftNthChar(editor, cursor, param, count || 1);
-
- if (isRepeat && column == 0 && !(count > 1))
- var column = util.getLeftNthChar(editor, cursor, param, 2);
-
- if (typeof column === "number") {
- cursor.column -= column;
- return cursor;
+ },
+ map: function(lhs, rhs, ctx) {
+ if (lhs != ':' && lhs.charAt(0) == ':') {
+ if (ctx) { throw Error('Mode not supported for ex mappings'); }
+ var commandName = lhs.substring(1);
+ if (rhs != ':' && rhs.charAt(0) == ':') {
+ this.commandMap_[commandName] = {
+ name: commandName,
+ type: 'exToEx',
+ toInput: rhs.substring(1),
+ user: true
+ };
+ } else {
+ this.commandMap_[commandName] = {
+ name: commandName,
+ type: 'exToKey',
+ toKeys: rhs,
+ user: true
+ };
+ }
+ } else {
+ if (rhs != ':' && rhs.charAt(0) == ':') {
+ var mapping = {
+ keys: lhs,
+ type: 'keyToEx',
+ exArgs: { input: rhs.substring(1) },
+ user: true};
+ if (ctx) { mapping.context = ctx; }
+ defaultKeymap.unshift(mapping);
+ } else {
+ var mapping = {
+ keys: lhs,
+ type: 'keyToKey',
+ toKeys: rhs,
+ user: true
+ };
+ if (ctx) { mapping.context = ctx; }
+ defaultKeymap.unshift(mapping);
+ }
+ }
+ },
+ unmap: function(lhs, ctx) {
+ if (lhs != ':' && lhs.charAt(0) == ':') {
+ if (ctx) { throw Error('Mode not supported for ex mappings'); }
+ var commandName = lhs.substring(1);
+ if (this.commandMap_[commandName] && this.commandMap_[commandName].user) {
+ delete this.commandMap_[commandName];
+ return;
+ }
+ } else {
+ var keys = lhs;
+ for (var i = 0; i < defaultKeymap.length; i++) {
+ if (keys == defaultKeymap[i].keys
+ && defaultKeymap[i].context === ctx
+ && defaultKeymap[i].user) {
+ defaultKeymap.splice(i, 1);
+ return;
}
+ }
}
- }),
- ";": new Motion({
- handlesCount: true,
- getPos: function(editor, range, count, param, isSel) {
- var ch = LAST_SEARCH_MOTION.ch;
- if (!ch)
- return;
- return module.exports[ch].getPos(
- editor, range, count, LAST_SEARCH_MOTION.param, isSel, true
- );
- }
- }),
- ",": new Motion({
- handlesCount: true,
- getPos: function(editor, range, count, param, isSel) {
- var ch = LAST_SEARCH_MOTION.ch;
- if (!ch)
- return;
- var up = ch.toUpperCase();
- ch = ch === up ? ch.toLowerCase() : up;
-
- return module.exports[ch].getPos(
- editor, range, count, LAST_SEARCH_MOTION.param, isSel, true
- );
- }
- }),
-
- "^": {
- nav: function(editor) {
- editor.navigateLineStart();
- },
- sel: function(editor) {
- editor.selection.selectLineStart();
+ throw Error('No such mapping.');
+ }
+ };
+
+ var exCommands = {
+ colorscheme: function(cm, params) {
+ if (!params.args || params.args.length < 1) {
+ showConfirm(cm, cm.getOption('theme'));
+ return;
}
- },
- "$": {
- nav: function(editor) {
- editor.navigateLineEnd();
- },
- sel: function(editor) {
- editor.selection.selectLineEnd();
+ cm.setOption('theme', params.args[0]);
+ },
+ map: function(cm, params, ctx) {
+ var mapArgs = params.args;
+ if (!mapArgs || mapArgs.length < 2) {
+ if (cm) {
+ showConfirm(cm, 'Invalid mapping: ' + params.input);
+ }
+ return;
}
- },
- "0": new Motion(function(ed) {
- return {row: ed.selection.lead.row, column: 0};
- }),
- "G": {
- nav: function(editor, range, count, param) {
- if (!count && count !== 0) { // Stupid JS
- count = editor.session.getLength();
+ exCommandDispatcher.map(mapArgs[0], mapArgs[1], ctx);
+ },
+ imap: function(cm, params) { this.map(cm, params, 'insert'); },
+ nmap: function(cm, params) { this.map(cm, params, 'normal'); },
+ vmap: function(cm, params) { this.map(cm, params, 'visual'); },
+ unmap: function(cm, params, ctx) {
+ var mapArgs = params.args;
+ if (!mapArgs || mapArgs.length < 1) {
+ if (cm) {
+ showConfirm(cm, 'No such mapping: ' + params.input);
+ }
+ return;
+ }
+ exCommandDispatcher.unmap(mapArgs[0], ctx);
+ },
+ move: function(cm, params) {
+ commandDispatcher.processCommand(cm, cm.state.vim, {
+ type: 'motion',
+ motion: 'moveToLineOrEdgeOfDocument',
+ motionArgs: { forward: false, explicitRepeat: true,
+ linewise: true },
+ repeatOverride: params.line+1});
+ },
+ set: function(cm, params) {
+ var setArgs = params.args;
+ var setCfg = params.setCfg || {};
+ if (!setArgs || setArgs.length < 1) {
+ if (cm) {
+ showConfirm(cm, 'Invalid mapping: ' + params.input);
+ }
+ return;
+ }
+ var expr = setArgs[0].split('=');
+ var optionName = expr[0];
+ var value = expr[1];
+ var forceGet = false;
+
+ if (optionName.charAt(optionName.length - 1) == '?') {
+ if (value) { throw Error('Trailing characters: ' + params.argString); }
+ optionName = optionName.substring(0, optionName.length - 1);
+ forceGet = true;
+ }
+ if (value === undefined && optionName.substring(0, 2) == 'no') {
+ optionName = optionName.substring(2);
+ value = false;
+ }
+
+ var optionIsBoolean = options[optionName] && options[optionName].type == 'boolean';
+ if (optionIsBoolean && value == undefined) {
+ value = true;
+ }
+ if (!optionIsBoolean && value === undefined || forceGet) {
+ var oldValue = getOption(optionName, cm, setCfg);
+ if (oldValue === true || oldValue === false) {
+ showConfirm(cm, ' ' + (oldValue ? '' : 'no') + optionName);
+ } else {
+ showConfirm(cm, ' ' + optionName + '=' + oldValue);
+ }
+ } else {
+ setOption(optionName, value, cm, setCfg);
+ }
+ },
+ setlocal: function (cm, params) {
+ params.setCfg = {scope: 'local'};
+ this.set(cm, params);
+ },
+ setglobal: function (cm, params) {
+ params.setCfg = {scope: 'global'};
+ this.set(cm, params);
+ },
+ registers: function(cm, params) {
+ var regArgs = params.args;
+ var registers = vimGlobalState.registerController.registers;
+ var regInfo = '----------Registers----------<br><br>';
+ if (!regArgs) {
+ for (var registerName in registers) {
+ var text = registers[registerName].toString();
+ if (text.length) {
+ regInfo += '"' + registerName + ' ' + text + '<br>';
}
- editor.gotoLine(count);
- },
- sel: function(editor, range, count, param) {
- if (!count && count !== 0) { // Stupid JS
- count = editor.session.getLength();
+ }
+ } else {
+ var registerName;
+ regArgs = regArgs.join('');
+ for (var i = 0; i < regArgs.length; i++) {
+ registerName = regArgs.charAt(i);
+ if (!vimGlobalState.registerController.isValidRegister(registerName)) {
+ continue;
}
- editor.selection.selectTo(count, 0);
+ var register = registers[registerName] || new Register();
+ regInfo += '"' + registerName + ' ' + register.toString() + '<br>';
+ }
}
- },
- "g": {
- param: true,
- nav: function(editor, range, count, param) {
- switch(param) {
- case "m":
- console.log("Middle line");
- break;
- case "e":
- console.log("End of prev word");
- break;
- case "g":
- editor.gotoLine(count || 0);
- case "u":
- editor.gotoLine(count || 0);
- case "U":
- editor.gotoLine(count || 0);
+ showConfirm(cm, regInfo);
+ },
+ sort: function(cm, params) {
+ var reverse, ignoreCase, unique, number;
+ function parseArgs() {
+ if (params.argString) {
+ var args = new CodeMirror.StringStream(params.argString);
+ if (args.eat('!')) { reverse = true; }
+ if (args.eol()) { return; }
+ if (!args.eatSpace()) { return 'Invalid arguments'; }
+ var opts = args.match(/[a-z]+/);
+ if (opts) {
+ opts = opts[0];
+ ignoreCase = opts.indexOf('i') != -1;
+ unique = opts.indexOf('u') != -1;
+ var decimal = opts.indexOf('d') != -1 && 1;
+ var hex = opts.indexOf('x') != -1 && 1;
+ var octal = opts.indexOf('o') != -1 && 1;
+ if (decimal + hex + octal > 1) { return 'Invalid arguments'; }
+ number = decimal && 'decimal' || hex && 'hex' || octal && 'octal';
}
- },
- sel: function(editor, range, count, param) {
- switch(param) {
- case "m":
- console.log("Middle line");
- break;
- case "e":
- console.log("End of prev word");
- break;
- case "g":
- editor.selection.selectTo(count || 0, 0);
+ if (args.eatSpace() && args.match(/\/.*\//)) { 'patterns not supported'; }
+ }
+ }
+ var err = parseArgs();
+ if (err) {
+ showConfirm(cm, err + ': ' + params.argString);
+ return;
+ }
+ var lineStart = params.line || cm.firstLine();
+ var lineEnd = params.lineEnd || params.line || cm.lastLine();
+ if (lineStart == lineEnd) { return; }
+ var curStart = Pos(lineStart, 0);
+ var curEnd = Pos(lineEnd, lineLength(cm, lineEnd));
+ var text = cm.getRange(curStart, curEnd).split('\n');
+ var numberRegex = (number == 'decimal') ? /(-?)([\d]+)/ :
+ (number == 'hex') ? /(-?)(?:0x)?([0-9a-f]+)/i :
+ (number == 'octal') ? /([0-7]+)/ : null;
+ var radix = (number == 'decimal') ? 10 : (number == 'hex') ? 16 : (number == 'octal') ? 8 : null;
+ var numPart = [], textPart = [];
+ if (number) {
+ for (var i = 0; i < text.length; i++) {
+ if (numberRegex.exec(text[i])) {
+ numPart.push(text[i]);
+ } else {
+ textPart.push(text[i]);
}
+ }
+ } else {
+ textPart = text;
}
- },
- "o": {
- nav: function(editor, range, count, param) {
- count = count || 1;
- var content = "";
- while (0 < count--)
- content += "\n";
-
- if (content.length) {
- editor.navigateLineEnd()
- editor.insert(content);
- util.insertMode(editor);
+ function compareFn(a, b) {
+ if (reverse) { var tmp; tmp = a; a = b; b = tmp; }
+ if (ignoreCase) { a = a.toLowerCase(); b = b.toLowerCase(); }
+ var anum = number && numberRegex.exec(a);
+ var bnum = number && numberRegex.exec(b);
+ if (!anum) { return a < b ? -1 : 1; }
+ anum = parseInt((anum[1] + anum[2]).toLowerCase(), radix);
+ bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix);
+ return anum - bnum;
+ }
+ numPart.sort(compareFn);
+ textPart.sort(compareFn);
+ text = (!reverse) ? textPart.concat(numPart) : numPart.concat(textPart);
+ if (unique) { // Remove duplicate lines
+ var textOld = text;
+ var lastLine;
+ text = [];
+ for (var i = 0; i < textOld.length; i++) {
+ if (textOld[i] != lastLine) {
+ text.push(textOld[i]);
}
+ lastLine = textOld[i];
+ }
}
- },
- "O": {
- nav: function(editor, range, count, param) {
- var row = editor.getCursorPosition().row;
- count = count || 1;
- var content = "";
- while (0 < count--)
- content += "\n";
-
- if (content.length) {
- if(row > 0) {
- editor.navigateUp();
- editor.navigateLineEnd()
- editor.insert(content);
- } else {
- editor.session.insert({row: 0, column: 0}, content);
- editor.navigateUp();
- }
- util.insertMode(editor);
+ cm.replaceRange(text.join('\n'), curStart, curEnd);
+ },
+ global: function(cm, params) {
+ var argString = params.argString;
+ if (!argString) {
+ showConfirm(cm, 'Regular Expression missing from global');
+ return;
+ }
+ var lineStart = (params.line !== undefined) ? params.line : cm.firstLine();
+ var lineEnd = params.lineEnd || params.line || cm.lastLine();
+ var tokens = splitBySlash(argString);
+ var regexPart = argString, cmd;
+ if (tokens.length) {
+ regexPart = tokens[0];
+ cmd = tokens.slice(1, tokens.length).join('/');
+ }
+ if (regexPart) {
+ try {
+ updateSearchQuery(cm, regexPart, true /** ignoreCase */,
+ true /** smartCase */);
+ } catch (e) {
+ showConfirm(cm, 'Invalid regex: ' + regexPart);
+ return;
+ }
+ }
+ var query = getSearchState(cm).getQuery();
+ var matchedLines = [], content = '';
+ for (var i = lineStart; i <= lineEnd; i++) {
+ var matched = query.test(cm.getLine(i));
+ if (matched) {
+ matchedLines.push(i+1);
+ content+= cm.getLine(i) + '<br>';
+ }
+ }
+ if (!cmd) {
+ showConfirm(cm, content);
+ return;
+ }
+ var index = 0;
+ var nextCommand = function() {
+ if (index < matchedLines.length) {
+ var command = matchedLines[index] + cmd;
+ exCommandDispatcher.processCommand(cm, command, {
+ callback: nextCommand
+ });
+ }
+ index++;
+ };
+ nextCommand();
+ },
+ substitute: function(cm, params) {
+ if (!cm.getSearchCursor) {
+ throw new Error('Search feature not available. Requires searchcursor.js or ' +
+ 'any other getSearchCursor implementation.');
+ }
+ var argString = params.argString;
+ var tokens = argString ? splitBySlash(argString) : [];
+ var regexPart, replacePart = '', trailing, flagsPart, count;
+ var confirm = false; // Whether to confirm each replace.
+ var global = false; // True to replace all instances on a line, false to replace only 1.
+ if (tokens.length) {
+ regexPart = tokens[0];
+ replacePart = tokens[1];
+ if (replacePart !== undefined) {
+ if (getOption('pcre')) {
+ replacePart = unescapeRegexReplace(replacePart);
+ } else {
+ replacePart = translateRegexReplace(replacePart);
}
+ vimGlobalState.lastSubstituteReplacePart = replacePart;
+ }
+ trailing = tokens[2] ? tokens[2].split(' ') : [];
+ } else {
+ if (argString && argString.length) {
+ showConfirm(cm, 'Substitutions should be of the form ' +
+ ':s/pattern/replace/');
+ return;
+ }
}
- },
- "%": new Motion(function(editor){
- var brRe = /[\[\]{}()]/g;
- var cursor = editor.getCursorPosition();
- var ch = editor.session.getLine(cursor.row)[cursor.column];
- if (!brRe.test(ch)) {
- var range = find(editor, brRe);
- if (!range)
+ if (trailing) {
+ flagsPart = trailing[0];
+ count = parseInt(trailing[1]);
+ if (flagsPart) {
+ if (flagsPart.indexOf('c') != -1) {
+ confirm = true;
+ flagsPart.replace('c', '');
+ }
+ if (flagsPart.indexOf('g') != -1) {
+ global = true;
+ flagsPart.replace('g', '');
+ }
+ regexPart = regexPart + '/' + flagsPart;
+ }
+ }
+ if (regexPart) {
+ try {
+ updateSearchQuery(cm, regexPart, true /** ignoreCase */,
+ true /** smartCase */);
+ } catch (e) {
+ showConfirm(cm, 'Invalid regex: ' + regexPart);
+ return;
+ }
+ }
+ replacePart = replacePart || vimGlobalState.lastSubstituteReplacePart;
+ if (replacePart === undefined) {
+ showConfirm(cm, 'No previous substitute regular expression');
+ return;
+ }
+ var state = getSearchState(cm);
+ var query = state.getQuery();
+ var lineStart = (params.line !== undefined) ? params.line : cm.getCursor().line;
+ var lineEnd = params.lineEnd || lineStart;
+ if (count) {
+ lineStart = lineEnd;
+ lineEnd = lineStart + count - 1;
+ }
+ var startPos = clipCursorToContent(cm, Pos(lineStart, 0));
+ var cursor = cm.getSearchCursor(query, startPos);
+ doReplace(cm, confirm, global, lineStart, lineEnd, cursor, query, replacePart, params.callback);
+ },
+ redo: CodeMirror.commands.redo,
+ undo: CodeMirror.commands.undo,
+ write: function(cm) {
+ if (CodeMirror.commands.save) {
+ CodeMirror.commands.save(cm);
+ } else {
+ cm.save();
+ }
+ },
+ nohlsearch: function(cm) {
+ clearSearchHighlight(cm);
+ },
+ delmarks: function(cm, params) {
+ if (!params.argString || !trim(params.argString)) {
+ showConfirm(cm, 'Argument required');
+ return;
+ }
+
+ var state = cm.state.vim;
+ var stream = new CodeMirror.StringStream(trim(params.argString));
+ while (!stream.eol()) {
+ stream.eatSpace();
+ var count = stream.pos;
+
+ if (!stream.match(/[a-zA-Z]/, false)) {
+ showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));
+ return;
+ }
+
+ var sym = stream.next();
+ if (stream.match('-', true)) {
+ if (!stream.match(/[a-zA-Z]/, false)) {
+ showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));
+ return;
+ }
+
+ var startMark = sym;
+ var finishMark = stream.next();
+ if (isLowerCase(startMark) && isLowerCase(finishMark) ||
+ isUpperCase(startMark) && isUpperCase(finishMark)) {
+ var start = startMark.charCodeAt(0);
+ var finish = finishMark.charCodeAt(0);
+ if (start >= finish) {
+ showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));
return;
- cursor = range.start;
+ }
+ for (var j = 0; j <= finish - start; j++) {
+ var mark = String.fromCharCode(start + j);
+ delete state.marks[mark];
+ }
+ } else {
+ showConfirm(cm, 'Invalid argument: ' + startMark + '-');
+ return;
+ }
+ } else {
+ delete state.marks[sym];
+ }
}
- var match = editor.session.findMatchingBracket({
- row: cursor.row,
- column: cursor.column + 1
- });
+ }
+ };
- return match;
- }),
- "{": new Motion(function(ed) {
- var session = ed.session;
- var row = session.selection.lead.row;
- while(row > 0 && !/\S/.test(session.getLine(row)))
- row--;
- while(/\S/.test(session.getLine(row)))
- row--;
- return {column: 0, row: row};
- }),
- "}": new Motion(function(ed) {
- var session = ed.session;
- var l = session.getLength();
- var row = session.selection.lead.row;
- while(row < l && !/\S/.test(session.getLine(row)))
- row++;
- while(/\S/.test(session.getLine(row)))
- row++;
- return {column: 0, row: row};
- }),
- "ctrl-d": {
- nav: function(editor, range, count, param) {
- editor.selection.clearSelection();
- keepScrollPosition(editor, editor.gotoPageDown);
- },
- sel: function(editor, range, count, param) {
- keepScrollPosition(editor, editor.selectPageDown);
+ var exCommandDispatcher = new ExCommandDispatcher();
+ function doReplace(cm, confirm, global, lineStart, lineEnd, searchCursor, query,
+ replaceWith, callback) {
+ cm.state.vim.exMode = true;
+ var done = false;
+ var lastPos = searchCursor.from();
+ function replaceAll() {
+ cm.operation(function() {
+ while (!done) {
+ replace();
+ next();
+ }
+ stop();
+ });
+ }
+ function replace() {
+ var text = cm.getRange(searchCursor.from(), searchCursor.to());
+ var newText = text.replace(query, replaceWith);
+ searchCursor.replace(newText);
+ }
+ function next() {
+ var found;
+ while(found = searchCursor.findNext() &&
+ isInRange(searchCursor.from(), lineStart, lineEnd)) {
+ if (!global && lastPos && searchCursor.from().line == lastPos.line) {
+ continue;
+ }
+ cm.scrollIntoView(searchCursor.from(), 30);
+ cm.setSelection(searchCursor.from(), searchCursor.to());
+ lastPos = searchCursor.from();
+ done = false;
+ return;
}
- },
- "ctrl-u": {
- nav: function(editor, range, count, param) {
- editor.selection.clearSelection();
- keepScrollPosition(editor, editor.gotoPageUp);
- },
- sel: function(editor, range, count, param) {
- keepScrollPosition(editor, editor.selectPageUp);
+ done = true;
+ }
+ function stop(close) {
+ if (close) { close(); }
+ cm.focus();
+ if (lastPos) {
+ cm.setCursor(lastPos);
+ var vim = cm.state.vim;
+ vim.exMode = false;
+ vim.lastHPos = vim.lastHSPos = lastPos.ch;
}
- },
- "`": new Motion({
- param: true,
- handlesCount: true,
- getPos: function(editor, range, count, param, isSel) {
- var s = editor.session;
- var marker = s.vimMarkers && s.vimMarkers[param];
- if (marker) {
- return marker.getPosition();
- }
+ if (callback) { callback(); }
+ }
+ function onPromptKeyDown(e, _value, close) {
+ CodeMirror.e_stop(e);
+ var keyName = CodeMirror.keyName(e);
+ switch (keyName) {
+ case 'Y':
+ replace(); next(); break;
+ case 'N':
+ next(); break;
+ case 'A':
+ var savedCallback = callback;
+ callback = undefined;
+ cm.operation(replaceAll);
+ callback = savedCallback;
+ break;
+ case 'L':
+ replace();
+ case 'Q':
+ case 'Esc':
+ case 'Ctrl-C':
+ case 'Ctrl-[':
+ stop(close);
+ break;
}
- }),
- "'": new Motion({
- param: true,
- handlesCount: true,
- getPos: function(editor, range, count, param, isSel) {
- var s = editor.session;
- var marker = s.vimMarkers && s.vimMarkers[param];
- if (marker) {
- var pos = marker.getPosition();
- var line = editor.session.getLine(pos.row);
- pos.column = line.search(/\S/);
- if (pos.column == -1)
- pos.column = line.length;
- return pos;
- }
+ if (done) { stop(close); }
+ return true;
+ }
+ next();
+ if (done) {
+ showConfirm(cm, 'No matches for ' + query.source);
+ return;
+ }
+ if (!confirm) {
+ replaceAll();
+ if (callback) { callback(); };
+ return;
+ }
+ showPrompt(cm, {
+ prefix: 'replace with <strong>' + replaceWith + '</strong> (y/n/a/q/l)',
+ onKeyDown: onPromptKeyDown
+ });
+ }
+
+ CodeMirror.keyMap.vim = {
+ attach: attachVimMap,
+ detach: detachVimMap,
+ call: cmKey
+ };
+
+ function exitInsertMode(cm) {
+ var vim = cm.state.vim;
+ var macroModeState = vimGlobalState.macroModeState;
+ var insertModeChangeRegister = vimGlobalState.registerController.getRegister('.');
+ var isPlaying = macroModeState.isPlaying;
+ var lastChange = macroModeState.lastInsertModeChanges;
+ var text = [];
+ if (!isPlaying) {
+ var selLength = lastChange.inVisualBlock ? vim.lastSelection.visualBlock.height : 1;
+ var changes = lastChange.changes;
+ var text = [];
+ var i = 0;
+ while (i < changes.length) {
+ text.push(changes[i]);
+ if (changes[i] instanceof InsertModeKey) {
+ i++;
+ } else {
+ i+= selLength;
+ }
}
- })
-};
+ lastChange.changes = text;
+ cm.off('change', onChange);
+ CodeMirror.off(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown);
+ }
+ if (!isPlaying && vim.insertModeRepeat > 1) {
+ repeatLastEdit(cm, vim, vim.insertModeRepeat - 1,
+ true /** repeatForInsert */);
+ vim.lastEditInputState.repeatOverride = vim.insertModeRepeat;
+ }
+ delete vim.insertModeRepeat;
+ vim.insertMode = false;
+ cm.setCursor(cm.getCursor().line, cm.getCursor().ch-1);
+ cm.setOption('keyMap', 'vim');
+ cm.setOption('disableInput', true);
+ cm.toggleOverwrite(false); // exit replace mode if we were in it.
+ insertModeChangeRegister.setText(lastChange.changes.join(''));
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
+ if (macroModeState.isRecording) {
+ logInsertModeChange(macroModeState);
+ }
+ }
-module.exports.backspace = module.exports.left = module.exports.h;
-module.exports.space = module.exports['return'] = module.exports.right = module.exports.l;
-module.exports.up = module.exports.k;
-module.exports.down = module.exports.j;
-module.exports.pagedown = module.exports["ctrl-d"];
-module.exports.pageup = module.exports["ctrl-u"];
+ function _mapCommand(command) {
+ defaultKeymap.push(command);
+ }
-});
-
-ace.define('ace/keyboard/vim/maps/operators', ['require', 'exports', 'module' , 'ace/keyboard/vim/maps/util', 'ace/keyboard/vim/registers'], function(require, exports, module) {
+ function mapCommand(keys, type, name, args, extra) {
+ var command = {keys: keys, type: type};
+ command[type] = name;
+ command[type + "Args"] = args;
+ for (var key in extra)
+ command[key] = extra[key];
+ _mapCommand(command);
+ }
+ defineOption('insertModeEscKeysTimeout', 200, 'number');
+ CodeMirror.keyMap['vim-insert'] = {
+ 'Ctrl-N': 'autocomplete',
+ 'Ctrl-P': 'autocomplete',
+ 'Enter': function(cm) {
+ var fn = CodeMirror.commands.newlineAndIndentContinueComment ||
+ CodeMirror.commands.newlineAndIndent;
+ fn(cm);
+ },
+ fallthrough: ['default'],
+ attach: attachVimMap,
+ detach: detachVimMap,
+ call: cmKey
+ };
+ CodeMirror.keyMap['vim-replace'] = {
+ 'Backspace': 'goCharLeft',
+ fallthrough: ['vim-insert'],
+ attach: attachVimMap,
+ detach: detachVimMap,
+ call: cmKey
+ };
-var util = require("./util");
-var registers = require("../registers");
+ function executeMacroRegister(cm, vim, macroModeState, registerName) {
+ var register = vimGlobalState.registerController.getRegister(registerName);
+ var keyBuffer = register.keyBuffer;
+ var imc = 0;
+ macroModeState.isPlaying = true;
+ macroModeState.replaySearchQueries = register.searchQueries.slice(0);
+ for (var i = 0; i < keyBuffer.length; i++) {
+ var text = keyBuffer[i];
+ var match, key;
+ while (text) {
+ match = (/<\w+-.+?>|<\w+>|./).exec(text);
+ key = match[0];
+ text = text.substring(match.index + key.length);
+ CodeMirror.Vim.handleKey(cm, key, 'macro');
+ if (vim.insertMode) {
+ var changes = register.insertModeChanges[imc++].changes;
+ vimGlobalState.macroModeState.lastInsertModeChanges.changes =
+ changes;
+ repeatInsertModeChanges(cm, changes, 1);
+ exitInsertMode(cm);
+ }
+ }
+ };
+ macroModeState.isPlaying = false;
+ }
-module.exports = {
- "d": {
- selFn: function(editor, range, count, param) {
- registers._default.text = editor.getCopyText();
- registers._default.isLine = util.onVisualLineMode;
- if(util.onVisualLineMode)
- editor.removeLines();
- else
- editor.session.remove(range);
- util.normalMode(editor);
- },
- fn: function(editor, range, count, param) {
- count = count || 1;
- switch (param) {
- case "d":
- registers._default.text = "";
- registers._default.isLine = true;
- for (var i = 0; i < count; i++) {
- editor.selection.selectLine();
- registers._default.text += editor.getCopyText();
- var selRange = editor.getSelectionRange();
- if (!selRange.isMultiLine()) {
- var row = selRange.start.row - 1;
- var col = editor.session.getLine(row).length
- selRange.setStart(row, col);
- editor.session.remove(selRange);
- editor.selection.clearSelection();
- break;
- }
- editor.session.remove(selRange);
- editor.selection.clearSelection();
- }
- registers._default.text = registers._default.text.replace(/\n$/, "");
- break;
- default:
- if (range) {
- editor.selection.setSelectionRange(range);
- registers._default.text = editor.getCopyText();
- registers._default.isLine = false;
- editor.session.remove(range);
- editor.selection.clearSelection();
- }
- }
+ function logKey(macroModeState, key) {
+ if (macroModeState.isPlaying) { return; }
+ var registerName = macroModeState.latestRegister;
+ var register = vimGlobalState.registerController.getRegister(registerName);
+ if (register) {
+ register.pushText(key);
+ }
+ }
+
+ function logInsertModeChange(macroModeState) {
+ if (macroModeState.isPlaying) { return; }
+ var registerName = macroModeState.latestRegister;
+ var register = vimGlobalState.registerController.getRegister(registerName);
+ if (register) {
+ register.pushInsertModeChanges(macroModeState.lastInsertModeChanges);
+ }
+ }
+
+ function logSearchQuery(macroModeState, query) {
+ if (macroModeState.isPlaying) { return; }
+ var registerName = macroModeState.latestRegister;
+ var register = vimGlobalState.registerController.getRegister(registerName);
+ if (register) {
+ register.pushSearchQuery(query);
+ }
+ }
+ function onChange(_cm, changeObj) {
+ var macroModeState = vimGlobalState.macroModeState;
+ var lastChange = macroModeState.lastInsertModeChanges;
+ if (!macroModeState.isPlaying) {
+ while(changeObj) {
+ lastChange.expectCursorActivityForChange = true;
+ if (changeObj.origin == '+input' || changeObj.origin == 'paste'
+ || changeObj.origin === undefined /* only in testing */) {
+ var text = changeObj.text.join('\n');
+ lastChange.changes.push(text);
+ }
+ changeObj = changeObj.next;
}
- },
- "c": {
- selFn: function(editor, range, count, param) {
- editor.session.remove(range);
- util.insertMode(editor);
- },
- fn: function(editor, range, count, param) {
- count = count || 1;
- switch (param) {
- case "c":
- for (var i = 0; i < count; i++) {
- editor.removeLines();
- util.insertMode(editor);
- }
-
- break;
- default:
- if (range) {
- editor.session.remove(range);
- util.insertMode(editor);
- }
- }
+ }
+ }
+ function onCursorActivity(cm) {
+ var vim = cm.state.vim;
+ if (vim.insertMode) {
+ var macroModeState = vimGlobalState.macroModeState;
+ if (macroModeState.isPlaying) { return; }
+ var lastChange = macroModeState.lastInsertModeChanges;
+ if (lastChange.expectCursorActivityForChange) {
+ lastChange.expectCursorActivityForChange = false;
+ } else {
+ lastChange.changes = [];
+ }
+ } else if (!cm.curOp.isVimOp) {
+ handleExternalSelection(cm, vim);
+ }
+ if (vim.visualMode) {
+ updateFakeCursor(cm);
+ }
+ }
+ function updateFakeCursor(cm) {
+ var vim = cm.state.vim;
+ var from = clipCursorToContent(cm, copyCursor(vim.sel.head));
+ var to = offsetCursor(from, 0, 1);
+ if (vim.fakeCursor) {
+ vim.fakeCursor.clear();
+ }
+ vim.fakeCursor = cm.markText(from, to, {className: 'cm-animate-fat-cursor'});
+ }
+ function handleExternalSelection(cm, vim) {
+ var anchor = cm.getCursor('anchor');
+ var head = cm.getCursor('head');
+ if (vim.visualMode && !cm.somethingSelected()) {
+ exitVisualMode(cm, false);
+ } else if (!vim.visualMode && !vim.insertMode && cm.somethingSelected()) {
+ vim.visualMode = true;
+ vim.visualLine = false;
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "visual"});
+ }
+ if (vim.visualMode) {
+ var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0;
+ var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0;
+ head = offsetCursor(head, 0, headOffset);
+ anchor = offsetCursor(anchor, 0, anchorOffset);
+ vim.sel = {
+ anchor: anchor,
+ head: head
+ };
+ updateMark(cm, vim, '<', cursorMin(head, anchor));
+ updateMark(cm, vim, '>', cursorMax(head, anchor));
+ } else if (!vim.insertMode) {
+ vim.lastHPos = cm.getCursor().ch;
+ }
+ }
+ function InsertModeKey(keyName) {
+ this.keyName = keyName;
+ }
+ function onKeyEventTargetKeyDown(e) {
+ var macroModeState = vimGlobalState.macroModeState;
+ var lastChange = macroModeState.lastInsertModeChanges;
+ var keyName = CodeMirror.keyName(e);
+ if (!keyName) { return; }
+ function onKeyFound() {
+ lastChange.changes.push(new InsertModeKey(keyName));
+ return true;
+ }
+ if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) {
+ CodeMirror.lookupKey(keyName, 'vim-insert', onKeyFound);
+ }
+ }
+ function repeatLastEdit(cm, vim, repeat, repeatForInsert) {
+ var macroModeState = vimGlobalState.macroModeState;
+ macroModeState.isPlaying = true;
+ var isAction = !!vim.lastEditActionCommand;
+ var cachedInputState = vim.inputState;
+ function repeatCommand() {
+ if (isAction) {
+ commandDispatcher.processAction(cm, vim, vim.lastEditActionCommand);
+ } else {
+ commandDispatcher.evalInput(cm, vim);
+ }
+ }
+ function repeatInsert(repeat) {
+ if (macroModeState.lastInsertModeChanges.changes.length > 0) {
+ repeat = !vim.lastEditActionCommand ? 1 : repeat;
+ var changeObject = macroModeState.lastInsertModeChanges;
+ repeatInsertModeChanges(cm, changeObject.changes, repeat);
+ }
+ }
+ vim.inputState = vim.lastEditInputState;
+ if (isAction && vim.lastEditActionCommand.interlaceInsertRepeat) {
+ for (var i = 0; i < repeat; i++) {
+ repeatCommand();
+ repeatInsert(1);
+ }
+ } else {
+ if (!repeatForInsert) {
+ repeatCommand();
}
+ repeatInsert(repeat);
+ }
+ vim.inputState = cachedInputState;
+ if (vim.insertMode && !repeatForInsert) {
+ exitInsertMode(cm);
+ }
+ macroModeState.isPlaying = false;
+ };
+
+ function repeatInsertModeChanges(cm, changes, repeat) {
+ function keyHandler(binding) {
+ if (typeof binding == 'string') {
+ CodeMirror.commands[binding](cm);
+ } else {
+ binding(cm);
+ }
+ return true;
+ }
+ var head = cm.getCursor('head');
+ var inVisualBlock = vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock;
+ if (inVisualBlock) {
+ var vim = cm.state.vim;
+ var lastSel = vim.lastSelection;
+ var offset = getOffset(lastSel.anchor, lastSel.head);
+ selectForInsert(cm, head, offset.line + 1);
+ repeat = cm.listSelections().length;
+ cm.setCursor(head);
+ }
+ for (var i = 0; i < repeat; i++) {
+ if (inVisualBlock) {
+ cm.setCursor(offsetCursor(head, i, 0));
+ }
+ for (var j = 0; j < changes.length; j++) {
+ var change = changes[j];
+ if (change instanceof InsertModeKey) {
+ CodeMirror.lookupKey(change.keyName, 'vim-insert', keyHandler);
+ } else {
+ var cur = cm.getCursor();
+ cm.replaceRange(change, cur, cur);
+ }
+ }
+ }
+ if (inVisualBlock) {
+ cm.setCursor(offsetCursor(head, 0, 1));
+ }
+ }
+
+ resetVimGlobalState();
+ CodeMirror.Vim = Vim();
+
+ Vim = CodeMirror.Vim;
+
+ var specialKey = {'return':'CR',backspace:'BS','delete':'Del',esc:'Esc',
+ left:'Left',right:'Right',up:'Up',down:'Down',space: 'Space',
+ home:'Home',end:'End',pageup:'PageUp',pagedown:'PageDown', enter: 'CR'
+ };
+ function lookupKey(hashId, key, e) {
+ if (key.length > 1 && key[0] == "n") {
+ key = key.replace("numpad", "");
+ }
+ key = specialKey[key] || key;
+ var name = '';
+ if (e.ctrlKey) { name += 'C-'; }
+ if (e.altKey) { name += 'A-'; }
+ if (e.shiftKey) { name += 'S-'; }
+
+ name += key;
+ if (name.length > 1) { name = '<' + name + '>'; }
+ return name;
+ }
+ var handleKey = Vim.handleKey.bind(Vim);
+ Vim.handleKey = function(cm, key, origin) {
+ return cm.operation(function() {
+ return handleKey(cm, key, origin);
+ }, true);
+ }
+ function cloneVimState(state) {
+ var n = new state.constructor();
+ Object.keys(state).forEach(function(key) {
+ var o = state[key];
+ if (Array.isArray(o))
+ o = o.slice();
+ else if (o && typeof o == "object" && o.constructor != Object)
+ o = cloneVimState(o);
+ n[key] = o;
+ });
+ if (state.sel) {
+ n.sel = {
+ head: state.sel.head && copyCursor(state.sel.head),
+ anchor: state.sel.anchor && copyCursor(state.sel.anchor)
+ };
+ }
+ return n;
+ }
+ function multiSelectHandleKey(cm, key, origin) {
+ var isHandled = false;
+ var vim = Vim.maybeInitVimState_(cm);
+ var visualBlock = vim.visualBlock || vim.wasInVisualBlock;
+ if (vim.wasInVisualBlock && !cm.ace.inMultiSelectMode) {
+ vim.wasInVisualBlock = false;
+ } else if (cm.ace.inMultiSelectMode && vim.visualBlock) {
+ vim.wasInVisualBlock = true;
+ }
+
+ if (key == '<Esc>' && !vim.insertMode && !vim.visualMode && cm.ace.inMultiSelectMode) {
+ cm.ace.exitMultiSelectMode();
+ } else if (visualBlock || !cm.ace.inMultiSelectMode || cm.ace.inVirtualSelectionMode) {
+ isHandled = Vim.handleKey(cm, key, origin);
+ } else {
+ var old = cloneVimState(vim);
+ cm.operation(function() {
+ cm.ace.forEachSelection(function() {
+ var sel = cm.ace.selection;
+ cm.state.vim.lastHPos = sel.$desiredColumn == null ? sel.lead.column : sel.$desiredColumn;
+ var head = cm.getCursor("head");
+ var anchor = cm.getCursor("anchor");
+ var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0;
+ var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0;
+ head = offsetCursor(head, 0, headOffset);
+ anchor = offsetCursor(anchor, 0, anchorOffset);
+ cm.state.vim.sel.head = head;
+ cm.state.vim.sel.anchor = anchor;
+
+ isHandled = handleKey(cm, key, origin);
+ sel.$desiredColumn = cm.state.vim.lastHPos == -1 ? null : cm.state.vim.lastHPos;
+ if (cm.virtualSelectionMode()) {
+ cm.state.vim = cloneVimState(old);
+ }
+ });
+ if (cm.curOp.cursorActivity && !isHandled)
+ cm.curOp.cursorActivity = false;
+ }, true);
+ }
+ return isHandled;
+ }
+ exports.CodeMirror = CodeMirror;
+ var getVim = Vim.maybeInitVimState_;
+ exports.handler = {
+ $id: "ace/keyboard/vim",
+ drawCursor: function(style, pixelPos, config, sel, session) {
+ var vim = this.state.vim || {};
+ var w = config.characterWidth;
+ var h = config.lineHeight;
+ var top = pixelPos.top;
+ var left = pixelPos.left;
+ if (!vim.insertMode) {
+ var isbackwards = !sel.cursor
+ ? session.selection.isBackwards() || session.selection.isEmpty()
+ : Range.comparePoints(sel.cursor, sel.start) <= 0;
+ if (!isbackwards && left > w)
+ left -= w;
+ }
+ if (!vim.insertMode && vim.status) {
+ h = h / 2;
+ top += h;
+ }
+ style.left = left + "px";
+ style.top = top + "px";
+ style.width = w + "px";
+ style.height = h + "px";
},
- "y": {
- selFn: function(editor, range, count, param) {
- registers._default.text = editor.getCopyText();
- registers._default.isLine = util.onVisualLineMode;
+ handleKeyboard: function(data, hashId, key, keyCode, e) {
+ var editor = data.editor;
+ var cm = editor.state.cm;
+ var vim = getVim(cm);
+ if (keyCode == -1) return;
+
+ if (key == "c" && hashId == 1) { // key == "ctrl-c"
+ if (!useragent.isMac && editor.getCopyText()) {
+ editor.once("copy", function() {
editor.selection.clearSelection();
- util.normalMode(editor);
- },
- fn: function(editor, range, count, param) {
- count = count || 1;
- switch (param) {
- case "y":
- var pos = editor.getCursorPosition();
- editor.selection.selectLine();
- for (var i = 0; i < count - 1; i++) {
- editor.selection.moveCursorDown();
- }
- registers._default.text = editor.getCopyText().replace(/\n$/, "");
- editor.selection.clearSelection();
- registers._default.isLine = true;
- editor.moveCursorToPosition(pos);
- break;
- default:
- if (range) {
- var pos = editor.getCursorPosition();
- editor.selection.setSelectionRange(range);
- registers._default.text = editor.getCopyText();
- registers._default.isLine = false;
- editor.selection.clearSelection();
- editor.moveCursorTo(pos.row, pos.column);
- }
- }
+ });
+ return {command: "null", passEvent: true};
}
+ } else if (!vim.insertMode) {
+ if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) {
+ hashId = -1;
+ key = data.inputChar;
+ }
+ }
+
+ if (hashId == -1 || hashId & 1 || hashId === 0 && key.length > 1) {
+ var insertMode = vim.insertMode;
+ var name = lookupKey(hashId, key, e || {});
+ if (vim.status == null)
+ vim.status = "";
+ var isHandled = multiSelectHandleKey(cm, name, 'user');
+ vim = getVim(cm); // may be changed by multiSelectHandleKey
+ if (isHandled && vim.status != null)
+ vim.status += name;
+ else if (vim.status == null)
+ vim.status = "";
+ cm._signal("changeStatus");
+ if (!isHandled && (hashId != -1 || insertMode))
+ return;
+ return {command: "null", passEvent: !isHandled};
+ }
},
- ">": {
- selFn: function(editor, range, count, param) {
- count = count || 1;
- for (var i = 0; i < count; i++) {
- editor.indent();
- }
- util.normalMode(editor);
- },
- fn: function(editor, range, count, param) {
- count = parseInt(count || 1, 10);
- switch (param) {
- case ">":
- var pos = editor.getCursorPosition();
- editor.selection.selectLine();
- for (var i = 0; i < count - 1; i++) {
- editor.selection.moveCursorDown();
- }
- editor.indent();
- editor.selection.clearSelection();
- editor.moveCursorToPosition(pos);
- editor.navigateLineEnd();
- editor.navigateLineStart();
- break;
- }
+ attach: function(editor) {
+ if (!editor.state) editor.state = {};
+ var cm = new CodeMirror(editor);
+ editor.state.cm = cm;
+ editor.$vimModeHandler = this;
+ CodeMirror.keyMap.vim.attach(cm);
+ getVim(cm).status = null;
+ cm.on('vim-command-done', function() {
+ if (cm.virtualSelectionMode()) return;
+ getVim(cm).status = null;
+ cm.ace._signal("changeStatus");
+ cm.ace.session.markUndoGroup();
+ });
+ cm.on("changeStatus", function() {
+ cm.ace.renderer.updateCursor();
+ cm.ace._signal("changeStatus");
+ });
+ cm.on("vim-mode-change", function() {
+ if (cm.virtualSelectionMode()) return;
+ cm.ace.renderer.setStyle("normal-mode", !getVim(cm).insertMode);
+ cm._signal("changeStatus");
+ });
+ cm.ace.renderer.setStyle("normal-mode", !getVim(cm).insertMode);
+ editor.renderer.$cursorLayer.drawCursor = this.drawCursor.bind(cm);
+ this.updateMacCompositionHandlers(editor, true);
+ },
+ detach: function(editor) {
+ var cm = editor.state.cm;
+ CodeMirror.keyMap.vim.detach(cm);
+ cm.destroy();
+ editor.state.cm = null;
+ editor.$vimModeHandler = null;
+ editor.renderer.$cursorLayer.drawCursor = null;
+ editor.renderer.setStyle("normal-mode", false);
+ this.updateMacCompositionHandlers(editor, false);
+ },
+ getStatusText: function(editor) {
+ var cm = editor.state.cm;
+ var vim = getVim(cm);
+ if (vim.insertMode)
+ return "INSERT";
+ var status = "";
+ if (vim.visualMode) {
+ status += "VISUAL";
+ if (vim.visualLine)
+ status += " LINE";
+ if (vim.visualBlock)
+ status += " BLOCK";
+ }
+ if (vim.status)
+ status += (status ? " " : "") + vim.status;
+ return status;
+ },
+ handleMacRepeat: function(data, hashId, key) {
+ if (hashId == -1) {
+ data.inputChar = key;
+ data.lastEvent = "input";
+ } else if (data.inputChar && data.$lastHash == hashId && data.$lastKey == key) {
+ if (data.lastEvent == "input") {
+ data.lastEvent = "input1";
+ } else if (data.lastEvent == "input1") {
+ return true;
}
+ } else {
+ data.$lastHash = hashId;
+ data.$lastKey = key;
+ data.lastEvent = "keypress";
+ }
},
- "<": {
- selFn: function(editor, range, count, param) {
- count = count || 1;
- for (var i = 0; i < count; i++) {
- editor.blockOutdent();
- }
- util.normalMode(editor);
- },
- fn: function(editor, range, count, param) {
- count = count || 1;
- switch (param) {
- case "<":
- var pos = editor.getCursorPosition();
- editor.selection.selectLine();
- for (var i = 0; i < count - 1; i++) {
- editor.selection.moveCursorDown();
- }
- editor.blockOutdent();
- editor.selection.clearSelection();
- editor.moveCursorToPosition(pos);
- editor.navigateLineEnd();
- editor.navigateLineStart();
- break;
- }
+ updateMacCompositionHandlers: function(editor, enable) {
+ var onCompositionUpdateOverride = function(text) {
+ var cm = editor.state.cm;
+ var vim = getVim(cm);
+ if (!vim.insertMode) {
+ var el = this.textInput.getElement();
+ el.blur();
+ el.focus();
+ el.value = text;
+ } else {
+ this.onCompositionUpdateOrig(text);
}
- }
-};
-});
-
-"use strict"
-
-ace.define('ace/keyboard/vim/maps/aliases', ['require', 'exports', 'module' ], function(require, exports, module) {
-module.exports = {
- "x": {
- operator: {
- ch: "d",
- count: 1
- },
- motion: {
- ch: "l",
- count: 1
+ };
+ var onCompositionStartOverride = function(text) {
+ var cm = editor.state.cm;
+ var vim = getVim(cm);
+ if (!vim.insertMode) {
+ this.onCompositionStartOrig(text);
}
- },
- "X": {
- operator: {
- ch: "d",
- count: 1
- },
- motion: {
- ch: "h",
- count: 1
+ };
+ if (enable) {
+ if (!editor.onCompositionUpdateOrig) {
+ editor.onCompositionUpdateOrig = editor.onCompositionUpdate;
+ editor.onCompositionUpdate = onCompositionUpdateOverride;
+ editor.onCompositionStartOrig = editor.onCompositionStart;
+ editor.onCompositionStart = onCompositionStartOverride;
}
- },
- "D": {
- operator: {
- ch: "d",
- count: 1
- },
- motion: {
- ch: "$",
- count: 1
+ } else {
+ if (editor.onCompositionUpdateOrig) {
+ editor.onCompositionUpdate = editor.onCompositionUpdateOrig;
+ editor.onCompositionUpdateOrig = null;
+ editor.onCompositionStart = editor.onCompositionStartOrig;
+ editor.onCompositionStartOrig = null;
}
+ }
+ }
+ };
+ var renderVirtualNumbers = {
+ getText: function(session, row) {
+ return (Math.abs(session.selection.lead.row - row) || (row + 1 + (row < 9? "\xb7" : "" ))) + "";
},
- "C": {
- operator: {
- ch: "c",
- count: 1
- },
- motion: {
- ch: "$",
- count: 1
- }
+ getWidth: function(session, lastLineNumber, config) {
+ return session.getLength().toString().length * config.characterWidth;
},
- "s": {
- operator: {
- ch: "c",
- count: 1
- },
- motion: {
- ch: "l",
- count: 1
- }
+ update: function(e, editor) {
+ editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER);
},
- "S": {
- operator: {
- ch: "c",
- count: 1
- },
- param: "c"
+ attach: function(editor) {
+ editor.renderer.$gutterLayer.$renderer = this;
+ editor.on("changeSelection", this.update);
+ },
+ detach: function(editor) {
+ editor.renderer.$gutterLayer.$renderer = null;
+ editor.off("changeSelection", this.update);
}
-};
-});
+ };
+ Vim.defineOption({
+ name: "wrap",
+ set: function(value, cm) {
+ if (cm) {cm.ace.setOption("wrap", value)}
+ },
+ type: "boolean"
+ }, false);
+ Vim.defineEx('write', 'w', function() {
+ console.log(':write is not implemented')
+ });
+ defaultKeymap.push(
+ { keys: 'zc', type: 'action', action: 'fold', actionArgs: { open: false } },
+ { keys: 'zC', type: 'action', action: 'fold', actionArgs: { open: false, all: true } },
+ { keys: 'zo', type: 'action', action: 'fold', actionArgs: { open: true, } },
+ { keys: 'zO', type: 'action', action: 'fold', actionArgs: { open: true, all: true } },
+ { keys: 'za', type: 'action', action: 'fold', actionArgs: { toggle: true } },
+ { keys: 'zA', type: 'action', action: 'fold', actionArgs: { toggle: true, all: true } },
+ { keys: 'zf', type: 'action', action: 'fold', actionArgs: { open: true, all: true } },
+ { keys: 'zd', type: 'action', action: 'fold', actionArgs: { open: true, all: true } },
+
+ { keys: '<C-A-k>', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorAbove" } },
+ { keys: '<C-A-j>', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorBelow" } },
+ { keys: '<C-A-S-k>', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorAboveSkipCurrent" } },
+ { keys: '<C-A-S-j>', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorBelowSkipCurrent" } },
+ { keys: '<C-A-h>', type: 'action', action: 'aceCommand', actionArgs: { name: "selectMoreBefore" } },
+ { keys: '<C-A-l>', type: 'action', action: 'aceCommand', actionArgs: { name: "selectMoreAfter" } },
+ { keys: '<C-A-S-h>', type: 'action', action: 'aceCommand', actionArgs: { name: "selectNextBefore" } },
+ { keys: '<C-A-S-l>', type: 'action', action: 'aceCommand', actionArgs: { name: "selectNextAfter" } }
+ );
+ actions.aceCommand = function(cm, actionArgs, vim) {
+ cm.vimCmd = actionArgs;
+ if (cm.ace.inVirtualSelectionMode)
+ cm.ace.on("beforeEndOperation", delayedExecAceCommand);
+ else
+ delayedExecAceCommand(null, cm.ace);
+ };
+ function delayedExecAceCommand(op, ace) {
+ ace.off("beforeEndOperation", delayedExecAceCommand);
+ var cmd = ace.state.cm.vimCmd;
+ if (cmd) {
+ ace.execCommand(cmd.exec ? cmd : cmd.name, cmd.args);
+ }
+ ace.curOp = ace.prevOp;
+ }
+ actions.fold = function(cm, actionArgs, vim) {
+ cm.ace.execCommand(['toggleFoldWidget', 'toggleFoldWidget', 'foldOther', 'unfoldall'
+ ][(actionArgs.all ? 2 : 0) + (actionArgs.open ? 1 : 0)]);
+ },
+ exports.handler.defaultKeymap = defaultKeymap;
+ exports.handler.actions = actions;
+ exports.Vim = Vim;
+
+ Vim.map("Y", "yy", "normal");
+});
diff --git a/js/vendor/ace/src-noconflict/mode-abap.js b/js/vendor/ace/src-noconflict/mode-abap.js
index a817e7b..2ff736d 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-abap.js
+++ b/js/vendor/ace/src-noconflict/mode-abap.js
@@ -1,85 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/abap', ['require', 'exports', 'module' , 'ace/tokenizer', 'ace/mode/abap_highlight_rules', 'ace/mode/folding/coffee', 'ace/range', 'ace/mode/text', 'ace/lib/oop'], function(require, exports, module) {
-
-
-var Tokenizer = require("../tokenizer").Tokenizer;
-var Rules = require("./abap_highlight_rules").AbapHighlightRules;
-var FoldMode = require("./folding/coffee").FoldMode;
-var Range = require("../range").Range;
-var TextMode = require("./text").Mode;
-var oop = require("../lib/oop");
-
-function Mode() {
- var highlighter = new Rules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = new Rules(highlighter.$keywordList);
- this.foldingRules = new FoldMode();
-}
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- return indent;
- };
-
- this.toggleCommentLines = function(state, doc, startRow, endRow){
- var range = new Range(0, 0, 0, 0);
- for (var i = startRow; i <= endRow; ++i) {
- var line = doc.getLine(i);
- if (hereComment.test(line))
- continue;
-
- if (commentLine.test(line))
- line = line.replace(commentLine, '$1');
- else
- line = line.replace(indentation, '$&#');
-
- range.end.row = range.start.row = i;
- range.end.column = line.length + 1;
- doc.replace(range, line);
- }
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/abap_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/abap_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -167,15 +87,15 @@ var AbapHighlightRules = function() {
{token : "string", regex : "`", next : "start"},
{defaultToken : "string"}
]
- }
+ };
};
oop.inherits(AbapHighlightRules, TextHighlightRules);
exports.AbapHighlightRules = AbapHighlightRules;
});
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -260,3 +180,51 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/abap",["require","exports","module","ace/mode/abap_highlight_rules","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/lib/oop"], function(require, exports, module) {
+"use strict";
+
+var Rules = require("./abap_highlight_rules").AbapHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+var Range = require("../range").Range;
+var TextMode = require("./text").Mode;
+var oop = require("../lib/oop");
+
+function Mode() {
+ this.HighlightRules = Rules;
+ this.foldingRules = new FoldMode();
+}
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ return indent;
+ };
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow){
+ var range = new Range(0, 0, 0, 0);
+ for (var i = startRow; i <= endRow; ++i) {
+ var line = doc.getLine(i);
+ if (hereComment.test(line))
+ continue;
+
+ if (commentLine.test(line))
+ line = line.replace(commentLine, '$1');
+ else
+ line = line.replace(indentation, '$&#');
+
+ range.end.row = range.start.row = i;
+ range.end.column = line.length + 1;
+ doc.replace(range, line);
+ }
+ };
+
+ this.$id = "ace/mode/abap";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-abc.js b/js/vendor/ace/src-noconflict/mode-abc.js
new file mode 100755
index 0000000..41332e8
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-abc.js
@@ -0,0 +1,260 @@
+ace.define("ace/mode/abc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function (require, exports, module) {
+ "use strict";
+
+ var oop = require("../lib/oop");
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+ var ABCHighlightRules = function () {
+
+ this.$rules = {
+ start: [
+ {
+ token: ['zupfnoter.information.comment.line.percentage', 'information.keyword', 'in formation.keyword.embedded'],
+ regex: '(%%%%)(hn\\.[a-z]*)(.*)',
+ comment: 'Instruction Comment'
+ },
+ {
+ token: ['information.comment.line.percentage', 'information.keyword.embedded'],
+ regex: '(%%)(.*)',
+ comment: 'Instruction Comment'
+ },
+
+ {
+ token: 'comment.line.percentage',
+ regex: '%.*',
+ comment: 'Comments'
+ },
+
+ {
+ token: 'barline.keyword.operator',
+ regex: '[\\[:]*[|:][|\\]:]*(?:\\[?[0-9]+)?|\\[[0-9]+',
+ comment: 'Bar lines'
+ },
+ {
+ token: ['information.keyword.embedded', 'information.argument.string.unquoted'],
+ regex: '(\\[[A-Za-z]:)([^\\]]*\\])',
+ comment: 'embedded Header lines'
+ },
+ {
+ token: ['information.keyword', 'information.argument.string.unquoted'],
+ regex: '^([A-Za-z]:)([^%\\\\]*)',
+ comment: 'Header lines'
+ },
+ {
+ token: ['text', 'entity.name.function', 'string.unquoted', 'text'],
+ regex: '(\\[)([A-Z]:)(.*?)(\\])',
+ comment: 'Inline fields'
+ },
+ {
+ token: ['accent.constant.language', 'pitch.constant.numeric', 'duration.constant.numeric'],
+ regex: '([\\^=_]*)([A-Ga-gz][,\']*)([0-9]*/*[><0-9]*)',
+ comment: 'Notes'
+ },
+ {
+ token: 'zupfnoter.jumptarget.string.quoted',
+ regex: '[\\"!]\\^\\:.*?[\\"!]',
+ comment: 'Zupfnoter jumptarget'
+ }, {
+ token: 'zupfnoter.goto.string.quoted',
+ regex: '[\\"!]\\^\\@.*?[\\"!]',
+ comment: 'Zupfnoter goto'
+ },
+ {
+ token: 'zupfnoter.annotation.string.quoted',
+ regex: '[\\"!]\\^\\!.*?[\\"!]',
+ comment: 'Zupfnoter annoation'
+ },
+ {
+ token: 'zupfnoter.annotationref.string.quoted',
+ regex: '[\\"!]\\^\\#.*?[\\"!]',
+ comment: 'Zupfnoter annotation reference'
+ },
+ {
+ token: 'chordname.string.quoted',
+ regex: '[\\"!]\\^.*?[\\"!]',
+ comment: 'abc chord'
+ },
+ {
+ token: 'string.quoted',
+ regex: '[\\"!].*?[\\"!]',
+ comment: 'abc annotation'
+ }
+
+ ]
+ };
+
+ this.normalizeRules();
+ };
+
+ ABCHighlightRules.metaData = {
+ fileTypes: ['abc'],
+ name: 'ABC',
+ scopeName: 'text.abcnotation'
+ };
+
+
+ oop.inherits(ABCHighlightRules, TextHighlightRules);
+
+ exports.ABCHighlightRules = ABCHighlightRules;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"], function (require, exports, module) {
+ "use strict";
+
+ var oop = require("../lib/oop");
+ var TextMode = require("./text").Mode;
+ var ABCHighlightRules = require("./abc_highlight_rules").ABCHighlightRules;
+ var FoldMode = require("./folding/cstyle").FoldMode;
+
+ var Mode = function () {
+ this.HighlightRules = ABCHighlightRules;
+ this.foldingRules = new FoldMode();
+ };
+ oop.inherits(Mode, TextMode);
+
+ (function () {
+ this.$id = "ace/mode/abc"
+ }).call(Mode.prototype);
+
+ exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-actionscript.js b/js/vendor/ace/src-noconflict/mode-actionscript.js
index 68ff42e..ff7e7b9 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-actionscript.js
+++ b/js/vendor/ace/src-noconflict/mode-actionscript.js
@@ -1,64 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/actionscript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/actionscript_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ActionScriptHighlightRules = require("./actionscript_highlight_rules").ActionScriptHighlightRules;
-var FoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new ActionScriptHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/actionscript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/actionscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -161,8 +102,8 @@ oop.inherits(ActionScriptHighlightRules, TextHighlightRules);
exports.ActionScriptHighlightRules = ActionScriptHighlightRules;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -181,23 +122,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -210,7 +183,84 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/actionscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/actionscript_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ActionScriptHighlightRules = require("./actionscript_highlight_rules").ActionScriptHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ActionScriptHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/actionscript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-ada.js b/js/vendor/ace/src-noconflict/mode-ada.js
index 510e813..b4abcd5 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-ada.js
+++ b/js/vendor/ace/src-noconflict/mode-ada.js
@@ -1,59 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/ada', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ada_highlight_rules', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var AdaHighlightRules = require("./ada_highlight_rules").AdaHighlightRules;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new AdaHighlightRules().getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "--";
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/ada_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -114,4 +60,28 @@ var keywords = "abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|ac
oop.inherits(AdaHighlightRules, TextHighlightRules);
exports.AdaHighlightRules = AdaHighlightRules;
-}); \ No newline at end of file
+});
+
+ace.define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var AdaHighlightRules = require("./ada_highlight_rules").AdaHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = AdaHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+
+ this.$id = "ace/mode/ada";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-apache_conf.js b/js/vendor/ace/src-noconflict/mode-apache_conf.js
new file mode 100755
index 0000000..13636f6
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-apache_conf.js
@@ -0,0 +1,355 @@
+ace.define("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ApacheConfHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token:
+ [ 'punctuation.definition.comment.apacheconf',
+ 'comment.line.hash.ini',
+ 'comment.line.hash.ini' ],
+ regex: '^((?:\\s)*)(#)(.*$)' },
+ { token:
+ [ 'punctuation.definition.tag.apacheconf',
+ 'entity.tag.apacheconf',
+ 'text',
+ 'string.value.apacheconf',
+ 'punctuation.definition.tag.apacheconf' ],
+ regex: '(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(?:(\\s)(.+?))?(>)' },
+ { token:
+ [ 'punctuation.definition.tag.apacheconf',
+ 'entity.tag.apacheconf',
+ 'punctuation.definition.tag.apacheconf' ],
+ regex: '(</)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(>)' },
+ { token:
+ [ 'keyword.alias.apacheconf', 'text',
+ 'string.regexp.apacheconf', 'text',
+ 'string.replacement.apacheconf', 'text' ],
+ regex: '(Rewrite(?:Rule|Cond))(\\s+)(.+?)(\\s+)(.+?)($|\\s)' },
+ { token:
+ [ 'keyword.alias.apacheconf', 'text',
+ 'entity.status.apacheconf', 'text',
+ 'string.regexp.apacheconf', 'text',
+ 'string.path.apacheconf', 'text' ],
+ regex: '(RedirectMatch)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' },
+ { token:
+ [ 'keyword.alias.apacheconf', 'text',
+ 'entity.status.apacheconf', 'text',
+ 'string.path.apacheconf', 'text',
+ 'string.path.apacheconf', 'text' ],
+ regex: '(Redirect)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' },
+ { token:
+ [ 'keyword.alias.apacheconf', 'text',
+ 'string.regexp.apacheconf', 'text',
+ 'string.path.apacheconf', 'text' ],
+ regex: '(ScriptAliasMatch|AliasMatch)(\\s+)(.+?)(\\s+)(?:(.+?)(\\s))?' },
+ { token:
+ [ 'keyword.alias.apacheconf', 'text',
+ 'string.path.apacheconf', 'text',
+ 'string.path.apacheconf', 'text' ],
+ regex: '(RedirectPermanent|RedirectTemp|ScriptAlias|Alias)(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' },
+ { token: 'keyword.core.apacheconf',
+ regex: '\\b(?:AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|TimeOut|TraceEnable|UseCanonicalName)\\b' },
+ { token: 'keyword.mpm.apacheconf',
+ regex: '\\b(?:AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\b' },
+ { token: 'keyword.access.apacheconf',
+ regex: '\\b(?:Allow|Deny|Order)\\b' },
+ { token: 'keyword.actions.apacheconf',
+ regex: '\\b(?:Action|Script)\\b' },
+ { token: 'keyword.alias.apacheconf',
+ regex: '\\b(?:Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\b' },
+ { token: 'keyword.auth.apacheconf',
+ regex: '\\b(?:AuthAuthoritative|AuthGroupFile|AuthUserFile)\\b' },
+ { token: 'keyword.auth_anon.apacheconf',
+ regex: '\\b(?:Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail)\\b' },
+ { token: 'keyword.auth_dbm.apacheconf',
+ regex: '\\b(?:AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile)\\b' },
+ { token: 'keyword.auth_digest.apacheconf',
+ regex: '\\b(?:AuthDigestAlgorithm|AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)\\b' },
+ { token: 'keyword.auth_ldap.apacheconf',
+ regex: '\\b(?:AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl)\\b' },
+ { token: 'keyword.autoindex.apacheconf',
+ regex: '\\b(?:AddAlt|AddAltByEncoding|AddAltByType|AddDescription|AddIcon|AddIconByEncoding|AddIconByType|DefaultIcon|HeaderName|IndexIgnore|IndexOptions|IndexOrderDefault|ReadmeName)\\b' },
+ { token: 'keyword.cache.apacheconf',
+ regex: '\\b(?:CacheDefaultExpire|CacheDisable|CacheEnable|CacheForceCompletion|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire)\\b' },
+ { token: 'keyword.cern_meta.apacheconf',
+ regex: '\\b(?:MetaDir|MetaFiles|MetaSuffix)\\b' },
+ { token: 'keyword.cgi.apacheconf',
+ regex: '\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength)\\b' },
+ { token: 'keyword.cgid.apacheconf',
+ regex: '\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock)\\b' },
+ { token: 'keyword.charset_lite.apacheconf',
+ regex: '\\b(?:CharsetDefault|CharsetOptions|CharsetSourceEnc)\\b' },
+ { token: 'keyword.dav.apacheconf',
+ regex: '\\b(?:Dav|DavDepthInfinity|DavMinTimeout|DavLockDB)\\b' },
+ { token: 'keyword.deflate.apacheconf',
+ regex: '\\b(?:DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize)\\b' },
+ { token: 'keyword.dir.apacheconf',
+ regex: '\\b(?:DirectoryIndex|DirectorySlash)\\b' },
+ { token: 'keyword.disk_cache.apacheconf',
+ regex: '\\b(?:CacheDirLength|CacheDirLevels|CacheExpiryCheck|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheMaxFileSize|CacheMinFileSize|CacheRoot|CacheSize|CacheTimeMargin)\\b' },
+ { token: 'keyword.dumpio.apacheconf',
+ regex: '\\b(?:DumpIOInput|DumpIOOutput)\\b' },
+ { token: 'keyword.env.apacheconf',
+ regex: '\\b(?:PassEnv|SetEnv|UnsetEnv)\\b' },
+ { token: 'keyword.expires.apacheconf',
+ regex: '\\b(?:ExpiresActive|ExpiresByType|ExpiresDefault)\\b' },
+ { token: 'keyword.ext_filter.apacheconf',
+ regex: '\\b(?:ExtFilterDefine|ExtFilterOptions)\\b' },
+ { token: 'keyword.file_cache.apacheconf',
+ regex: '\\b(?:CacheFile|MMapFile)\\b' },
+ { token: 'keyword.headers.apacheconf',
+ regex: '\\b(?:Header|RequestHeader)\\b' },
+ { token: 'keyword.imap.apacheconf',
+ regex: '\\b(?:ImapBase|ImapDefault|ImapMenu)\\b' },
+ { token: 'keyword.include.apacheconf',
+ regex: '\\b(?:SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|XBitHack)\\b' },
+ { token: 'keyword.isapi.apacheconf',
+ regex: '\\b(?:ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer)\\b' },
+ { token: 'keyword.ldap.apacheconf',
+ regex: '\\b(?:LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTrustedCA|LDAPTrustedCAType)\\b' },
+ { token: 'keyword.log.apacheconf',
+ regex: '\\b(?:BufferedLogs|CookieLog|CustomLog|LogFormat|TransferLog|ForensicLog)\\b' },
+ { token: 'keyword.mem_cache.apacheconf',
+ regex: '\\b(?:MCacheMaxObjectCount|MCacheMaxObjectSize|MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize)\\b' },
+ { token: 'keyword.mime.apacheconf',
+ regex: '\\b(?:AddCharset|AddEncoding|AddHandler|AddInputFilter|AddLanguage|AddOutputFilter|AddType|DefaultLanguage|ModMimeUsePathInfo|MultiviewsMatch|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|TypesConfig)\\b' },
+ { token: 'keyword.misc.apacheconf',
+ regex: '\\b(?:ProtocolEcho|Example|AddModuleInfo|MimeMagicFile|CheckSpelling|ExtendedStatus|SuexecUserGroup|UserDir)\\b' },
+ { token: 'keyword.negotiation.apacheconf',
+ regex: '\\b(?:CacheNegotiatedDocs|ForceLanguagePriority|LanguagePriority)\\b' },
+ { token: 'keyword.nw_ssl.apacheconf',
+ regex: '\\b(?:NWSSLTrustedCerts|NWSSLUpgradeable|SecureListen)\\b' },
+ { token: 'keyword.proxy.apacheconf',
+ regex: '\\b(?:AllowCONNECT|NoProxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyFtpDirCharset|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassReverse|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia)\\b' },
+ { token: 'keyword.rewrite.apacheconf',
+ regex: '\\b(?:RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule)\\b' },
+ { token: 'keyword.setenvif.apacheconf',
+ regex: '\\b(?:BrowserMatch|BrowserMatchNoCase|SetEnvIf|SetEnvIfNoCase)\\b' },
+ { token: 'keyword.so.apacheconf',
+ regex: '\\b(?:LoadFile|LoadModule)\\b' },
+ { token: 'keyword.ssl.apacheconf',
+ regex: '\\b(?:SSLCACertificateFile|SSLCACertificatePath|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth)\\b' },
+ { token: 'keyword.usertrack.apacheconf',
+ regex: '\\b(?:CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking)\\b' },
+ { token: 'keyword.vhost_alias.apacheconf',
+ regex: '\\b(?:VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP)\\b' },
+ { token:
+ [ 'keyword.php.apacheconf',
+ 'text',
+ 'entity.property.apacheconf',
+ 'text',
+ 'string.value.apacheconf',
+ 'text' ],
+ regex: '\\b(php_value|php_flag)\\b(?:(\\s+)(.+?)(?:(\\s+)(.+?))?)?(\\s)' },
+ { token:
+ [ 'punctuation.variable.apacheconf',
+ 'variable.env.apacheconf',
+ 'variable.misc.apacheconf',
+ 'punctuation.variable.apacheconf' ],
+ regex: '(%\\{)(?:(HTTP_USER_AGENT|HTTP_REFERER|HTTP_COOKIE|HTTP_FORWARDED|HTTP_HOST|HTTP_PROXY_CONNECTION|HTTP_ACCEPT|REMOTE_ADDR|REMOTE_HOST|REMOTE_PORT|REMOTE_USER|REMOTE_IDENT|REQUEST_METHOD|SCRIPT_FILENAME|PATH_INFO|QUERY_STRING|AUTH_TYPE|DOCUMENT_ROOT|SERVER_ADMIN|SERVER_NAME|SERVER_ADDR|SERVER_PORT|SERVER_PROTOCOL|SERVER_SOFTWARE|TIME_YEAR|TIME_MON|TIME_DAY|TIME_HOUR|TIME_MIN|TIME_SEC|TIME_WDAY|TIME|API_VERSION|THE_REQUEST|REQUEST_URI|REQUEST_FILENAME|IS_SUBREQ|HTTPS)|(.*?))(\\})' },
+ { token: [ 'entity.mime-type.apacheconf', 'text' ],
+ regex: '\\b((?:text|image|application|video|audio)/.+?)(\\s)' },
+ { token: 'entity.helper.apacheconf',
+ regex: '\\b(?:from|unset|set|on|off)\\b',
+ caseInsensitive: true },
+ { token: 'constant.integer.apacheconf', regex: '\\b\\d+\\b' },
+ { token:
+ [ 'text',
+ 'punctuation.definition.flag.apacheconf',
+ 'string.flag.apacheconf',
+ 'punctuation.definition.flag.apacheconf',
+ 'text' ],
+ regex: '(\\s)(\\[)(.*?)(\\])(\\s)' } ] }
+
+ this.normalizeRules();
+};
+
+ApacheConfHighlightRules.metaData = { fileTypes:
+ [ 'conf',
+ 'CONF',
+ 'htaccess',
+ 'HTACCESS',
+ 'htgroups',
+ 'HTGROUPS',
+ 'htpasswd',
+ 'HTPASSWD',
+ '.htaccess',
+ '.HTACCESS',
+ '.htgroups',
+ '.HTGROUPS',
+ '.htpasswd',
+ '.HTPASSWD' ],
+ name: 'Apache Conf',
+ scopeName: 'source.apacheconf' }
+
+
+oop.inherits(ApacheConfHighlightRules, TextHighlightRules);
+
+exports.ApacheConfHighlightRules = ApacheConfHighlightRules;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/apache_conf",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apache_conf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ApacheConfHighlightRules = require("./apache_conf_highlight_rules").ApacheConfHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ApacheConfHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/apache_conf";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-applescript.js b/js/vendor/ace/src-noconflict/mode-applescript.js
new file mode 100755
index 0000000..5270d43
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-applescript.js
@@ -0,0 +1,271 @@
+ace.define("ace/mode/applescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var AppleScriptHighlightRules = function() {
+ var keywords = (
+ "about|above|after|against|and|around|as|at|back|before|beginning|" +
+ "behind|below|beneath|beside|between|but|by|considering|" +
+ "contain|contains|continue|copy|div|does|eighth|else|end|equal|" +
+ "equals|error|every|exit|fifth|first|for|fourth|from|front|" +
+ "get|given|global|if|ignoring|in|into|is|it|its|last|local|me|" +
+ "middle|mod|my|ninth|not|of|on|onto|or|over|prop|property|put|ref|" +
+ "reference|repeat|returning|script|second|set|seventh|since|" +
+ "sixth|some|tell|tenth|that|the|then|third|through|thru|" +
+ "timeout|times|to|transaction|try|until|where|while|whose|with|without"
+ );
+
+ var builtinConstants = (
+ "AppleScript|false|linefeed|return|pi|quote|result|space|tab|true"
+ );
+
+ var builtinFunctions = (
+ "activate|beep|count|delay|launch|log|offset|read|round|run|say|" +
+ "summarize|write"
+ );
+
+ var builtinTypes = (
+ "alias|application|boolean|class|constant|date|file|integer|list|" +
+ "number|real|record|string|text|character|characters|contents|day|" +
+ "frontmost|id|item|length|month|name|paragraph|paragraphs|rest|" +
+ "reverse|running|time|version|weekday|word|words|year"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "constant.language": builtinConstants,
+ "support.type": builtinTypes,
+ "keyword": keywords
+ }, "identifier");
+
+ this.$rules = {
+ "start": [
+ {
+ token: "comment",
+ regex: "--.*$"
+ },
+ {
+ token : "comment", // multi line comment
+ regex : "\\(\\*",
+ next : "comment"
+ },
+ {
+ token: "string", // " string
+ regex: '".*?"'
+ },
+ {
+ token: "support.type",
+ regex: '\\b(POSIX file|POSIX path|(date|time) string|quoted form)\\b'
+ },
+ {
+ token: "support.function",
+ regex: '\\b(clipboard info|the clipboard|info for|list (disks|folder)|' +
+ 'mount volume|path to|(close|open for) access|(get|set) eof|' +
+ 'current date|do shell script|get volume settings|random number|' +
+ 'set volume|system attribute|system info|time to GMT|' +
+ '(load|run|store) script|scripting components|' +
+ 'ASCII (character|number)|localized string|' +
+ 'choose (application|color|file|file name|' +
+ 'folder|from list|remote application|URL)|' +
+ 'display (alert|dialog))\\b|^\\s*return\\b'
+ },
+ {
+ token: "constant.language",
+ regex: '\\b(text item delimiters|current application|missing value)\\b'
+ },
+ {
+ token: "keyword",
+ regex: '\\b(apart from|aside from|instead of|out of|greater than|' +
+ "isn't|(doesn't|does not) (equal|come before|come after|contain)|" +
+ '(greater|less) than( or equal)?|(starts?|ends|begins?) with|' +
+ 'contained by|comes (before|after)|a (ref|reference))\\b'
+ },
+ {
+ token: keywordMapper,
+ regex: "[a-zA-Z][a-zA-Z0-9_]*\\b"
+ }
+ ],
+ "comment": [
+ {
+ token: "comment", // closing comment
+ regex: "\\*\\)",
+ next: "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ]
+ }
+
+ this.normalizeRules();
+};
+
+oop.inherits(AppleScriptHighlightRules, TextHighlightRules);
+
+exports.AppleScriptHighlightRules = AppleScriptHighlightRules;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/applescript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/applescript_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var AppleScriptHighlightRules = require("./applescript_highlight_rules").AppleScriptHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = AppleScriptHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "(*", end: "*)"};
+ this.$id = "ace/mode/applescript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-asciidoc.js b/js/vendor/ace/src-noconflict/mode-asciidoc.js
index c303320..e9e027a 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-asciidoc.js
+++ b/js/vendor/ace/src-noconflict/mode-asciidoc.js
@@ -1,70 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/asciidoc', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/asciidoc_highlight_rules', 'ace/mode/folding/asciidoc'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var AsciidocHighlightRules = require("./asciidoc_highlight_rules").AsciidocHighlightRules;
-var AsciidocFoldMode = require("./folding/asciidoc").FoldMode;
-
-var Mode = function() {
- var highlighter = new AsciidocHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.foldingRules = new AsciidocFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.getNextLineIndent = function(state, line, tab) {
- if (state == "listblock") {
- var match = /^((?:.+)?)([-+*][ ]+)/.exec(line);
- if (match) {
- return new Array(match[1].length + 1).join(" ") + match[2];
- } else {
- return "";
- }
- } else {
- return this.$getIndent(line);
- }
- };
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/asciidoc_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -258,8 +193,8 @@ oop.inherits(AsciidocHighlightRules, TextHighlightRules);
exports.AsciidocHighlightRules = AsciidocHighlightRules;
});
-ace.define('ace/mode/folding/asciidoc', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -370,3 +305,38 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asciidoc_highlight_rules","ace/mode/folding/asciidoc"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var AsciidocHighlightRules = require("./asciidoc_highlight_rules").AsciidocHighlightRules;
+var AsciidocFoldMode = require("./folding/asciidoc").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = AsciidocHighlightRules;
+
+ this.foldingRules = new AsciidocFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.type = "text";
+ this.getNextLineIndent = function(state, line, tab) {
+ if (state == "listblock") {
+ var match = /^((?:.+)?)([-+*][ ]+)/.exec(line);
+ if (match) {
+ return new Array(match[1].length + 1).join(" ") + match[2];
+ } else {
+ return "";
+ }
+ } else {
+ return this.$getIndent(line);
+ }
+ };
+ this.$id = "ace/mode/asciidoc";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-assembly_x86.js b/js/vendor/ace/src-noconflict/mode-assembly_x86.js
index 2965beb..bbbc642 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-assembly_x86.js
+++ b/js/vendor/ace/src-noconflict/mode-assembly_x86.js
@@ -1,59 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/assembly_x86', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/assembly_x86_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var AssemblyX86HighlightRules = require("./assembly_x86_highlight_rules").AssemblyX86HighlightRules;
-var FoldMode = require("./folding/coffee").FoldMode;
-
-var Mode = function() {
- var highlighter = new AssemblyX86HighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = ";";
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/assembly_x86_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/assembly_x86_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -129,8 +75,8 @@ oop.inherits(AssemblyX86HighlightRules, TextHighlightRules);
exports.AssemblyX86HighlightRules = AssemblyX86HighlightRules;
});
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -215,3 +161,25 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/assembly_x86",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/assembly_x86_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var AssemblyX86HighlightRules = require("./assembly_x86_highlight_rules").AssemblyX86HighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = AssemblyX86HighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = ";";
+ this.$id = "ace/mode/assembly_x86";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-autohotkey.js b/js/vendor/ace/src-noconflict/mode-autohotkey.js
index 6443a1a..f188860 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-autohotkey.js
+++ b/js/vendor/ace/src-noconflict/mode-autohotkey.js
@@ -1,64 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/autohotkey', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/autohotkey_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var AutoHotKeyHighlightRules = require("./autohotkey_highlight_rules").AutoHotKeyHighlightRules;
-var FoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new AutoHotKeyHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "/\\*";
- this.blockComment = {start: "/*", end: "*/"};
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/autohotkey_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/autohotkey_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -129,8 +70,8 @@ oop.inherits(AutoHotKeyHighlightRules, TextHighlightRules);
exports.AutoHotKeyHighlightRules = AutoHotKeyHighlightRules;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -149,23 +90,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -178,7 +151,84 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/autohotkey",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/autohotkey_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var AutoHotKeyHighlightRules = require("./autohotkey_highlight_rules").AutoHotKeyHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = AutoHotKeyHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = ";";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/autohotkey";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-batchfile.js b/js/vendor/ace/src-noconflict/mode-batchfile.js
index d95a4aa..ad03902 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-batchfile.js
+++ b/js/vendor/ace/src-noconflict/mode-batchfile.js
@@ -1,64 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/batchfile', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/batchfile_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var BatchFileHighlightRules = require("./batchfile_highlight_rules").BatchFileHighlightRules;
-var FoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new BatchFileHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "::";
- this.blockComment = "";
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/batchfile_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -99,7 +40,8 @@ var BatchFileHighlightRules = function() {
{ token: 'keyword.operator.redirect.shell',
regex: '&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>' } ],
variable: [
- { token: 'constant.numeric', regex: '%%\\w+'},
+ { token: 'constant.numeric', regex: '%%\\w+|%[*\\d]|%\\w+%'},
+ { token: 'constant.numeric', regex: '%~\\d+'},
{ token: ['markup.list', 'constant.other', 'markup.list'],
regex: '(%)(\\w+)(%?)' }]}
@@ -116,8 +58,8 @@ oop.inherits(BatchFileHighlightRules, TextHighlightRules);
exports.BatchFileHighlightRules = BatchFileHighlightRules;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -136,23 +78,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -165,7 +139,84 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var BatchFileHighlightRules = require("./batchfile_highlight_rules").BatchFileHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = BatchFileHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "::";
+ this.blockComment = "";
+ this.$id = "ace/mode/batchfile";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-c9search.js b/js/vendor/ace/src-noconflict/mode-c9search.js
index e63dd42..453c315 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-c9search.js
+++ b/js/vendor/ace/src-noconflict/mode-c9search.js
@@ -1,87 +1,138 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/c9search', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c9search_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/folding/c9search'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var C9SearchHighlightRules = require("./c9search_highlight_rules").C9SearchHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var C9StyleFoldMode = require("./folding/c9search").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new C9SearchHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new C9StyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/c9search_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
+var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+function safeCreateRegexp(source, flag) {
+ try {
+ return new RegExp(source, flag);
+ } catch(e) {}
+}
+
var C9SearchHighlightRules = function() {
this.$rules = {
"start" : [
{
- token : ["c9searchresults.constant.numeric", "c9searchresults.text", "c9searchresults.text"],
- regex : "(^\\s+[0-9]+)(:\\s*)(.+)"
+ tokenNames : ["c9searchresults.constant.numeric", "c9searchresults.text", "c9searchresults.text", "c9searchresults.keyword"],
+ regex : "(^\\s+[0-9]+)(:\\s)(.+)",
+ onMatch : function(val, state, stack) {
+ var values = this.splitRegex.exec(val);
+ var types = this.tokenNames;
+ var tokens = [{
+ type: types[0],
+ value: values[1]
+ },{
+ type: types[1],
+ value: values[2]
+ }];
+
+ var regex = stack[1];
+ var str = values[3];
+
+ var m;
+ var last = 0;
+ if (regex && regex.exec) {
+ regex.lastIndex = 0;
+ while (m = regex.exec(str)) {
+ var skipped = str.substring(last, m.index);
+ last = regex.lastIndex;
+ if (skipped)
+ tokens.push({type: types[2], value: skipped});
+ if (m[0])
+ tokens.push({type: types[3], value: m[0]});
+ else if (!skipped)
+ break;
+ }
+ }
+ if (last < str.length)
+ tokens.push({type: types[2], value: str.substr(last)});
+ return tokens;
+ }
},
{
token : ["string", "text"], // single line
- regex : "(.+)(:$)"
+ regex : "(\\S.*)(:$)"
+ },
+ {
+ regex : "Searching for .*$",
+ onMatch: function(val, state, stack) {
+ var parts = val.split("\x01");
+ if (parts.length < 3)
+ return "text";
+
+ var options, search, replace;
+
+ var i = 0;
+ var tokens = [{
+ value: parts[i++] + "'",
+ type: "text"
+ }, {
+ value: search = parts[i++],
+ type: "text" // "c9searchresults.keyword"
+ }, {
+ value: "'" + parts[i++],
+ type: "text"
+ }];
+ if (parts[2] !== " in") {
+ replace = parts[i];
+ tokens.push({
+ value: "'" + parts[i++] + "'",
+ type: "text"
+ }, {
+ value: parts[i++],
+ type: "text"
+ });
+ }
+ tokens.push({
+ value: " " + parts[i++] + " ",
+ type: "text"
+ });
+ if (parts[i+1]) {
+ options = parts[i+1];
+ tokens.push({
+ value: "(" + parts[i+1] + ")",
+ type: "text"
+ });
+ i += 1;
+ } else {
+ i -= 1;
+ }
+ while (i++ < parts.length) {
+ parts[i] && tokens.push({
+ value: parts[i],
+ type: "text"
+ });
+ }
+
+ if (replace) {
+ search = replace;
+ options = "";
+ }
+
+ if (search) {
+ if (!/regex/.test(options))
+ search = lang.escapeRegExp(search);
+ if (/whole/.test(options))
+ search = "\\b" + search + "\\b";
+ }
+
+ var regex = search && safeCreateRegexp(
+ "(" + search + ")",
+ / sensitive/.test(options) ? "g" : "ig"
+ );
+ if (regex) {
+ stack[0] = state;
+ stack[1] = regex;
+ }
+
+ return tokens;
+ }
+ },
+ {
+ regex : "\\d+",
+ token: "constant.numeric"
}
]
};
@@ -93,8 +144,8 @@ exports.C9SearchHighlightRules = C9SearchHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -133,9 +184,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-
-ace.define('ace/mode/folding/c9search', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/c9search",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -155,24 +205,30 @@ oop.inherits(FoldMode, BaseFoldMode);
var level1 = /^(Found.*|Searching for.*)$/;
var level2 = /^(\S.*\:|\s*)$/;
var re = level1.test(line) ? level1 : level2;
+
+ var startRow = row;
+ var endRow = row;
if (this.foldingStartMarker.test(line)) {
for (var i = row + 1, l = session.getLength(); i < l; i++) {
if (re.test(lines[i]))
break;
}
-
- return new Range(row, line.length, i, 0);
+ endRow = i;
}
-
- if (this.foldingStopMarker.test(line)) {
+ else if (this.foldingStopMarker.test(line)) {
for (var i = row - 1; i >= 0; i--) {
line = lines[i];
if (re.test(line))
break;
}
-
- return new Range(i, line.length, row, 0);
+ startRow = i;
+ }
+ if (startRow != endRow) {
+ var col = line.length;
+ if (re === level1)
+ col = line.search(/\(Found[^)]+\)$|$/);
+ return new Range(startRow, col, endRow, 0);
}
};
@@ -180,3 +236,40 @@ oop.inherits(FoldMode, BaseFoldMode);
});
+ace.define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var C9SearchHighlightRules = require("./c9search_highlight_rules").C9SearchHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var C9StyleFoldMode = require("./folding/c9search").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = C9SearchHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new C9StyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/c9search";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-c_cpp.js b/js/vendor/ace/src-noconflict/mode-c_cpp.js
index 3d64d1f..4744d66 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-c_cpp.js
+++ b/js/vendor/ace/src-noconflict/mode-c_cpp.js
@@ -1,113 +1,60 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/c_cpp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c_cpp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new c_cppHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- this.foldingRules = new CStyleFoldMode();
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
-}).call(Mode.prototype);
-exports.Mode = Mode;
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
});
-ace.define('ace/mode/c_cpp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b"
+var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"
var c_cppHighlightRules = function() {
@@ -119,12 +66,13 @@ var c_cppHighlightRules = function() {
var storageType = (
"asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
"_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
- "class|wchar_t|template"
+ "class|wchar_t|template|char16_t|char32_t"
);
var storageModifiers = (
- "const|extern|register|restrict|static|volatile|inline|private:|" +
- "protected:|public:|friend|explicit|virtual|export|mutable|typename"
+ "const|extern|register|restrict|static|volatile|inline|private|" +
+ "protected|public|friend|explicit|virtual|export|mutable|typename|" +
+ "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"
);
var keywordOperators = (
@@ -133,7 +81,7 @@ var c_cppHighlightRules = function() {
);
var builtinConstants = (
- "NULL|true|false|TRUE|FALSE"
+ "NULL|true|false|TRUE|FALSE|nullptr"
);
var keywordMapper = this.$keywords = this.createKeywordMapper({
@@ -147,11 +95,12 @@ var c_cppHighlightRules = function() {
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b";
- this.$rules = {
+ this.$rules = {
"start" : [
{
token : "comment",
- regex : "\\/\\/.*$"
+ regex : "//",
+ next : "singleLineComment"
},
DocCommentHighlightRules.getStartRule("doc-start"),
{
@@ -180,11 +129,11 @@ var c_cppHighlightRules = function() {
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
}, {
token : "keyword", // pre-compiler directives
- regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b",
+ regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
next : "directive"
}, {
token : "keyword", // special case pre-compiler directive
- regex : "(?:#\\s*endif)\\b"
+ regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
}, {
token : "support.function.C99.c",
regex : cFunctions
@@ -218,14 +167,26 @@ var c_cppHighlightRules = function() {
regex : ".+"
}
],
+ "singleLineComment" : [
+ {
+ token : "comment",
+ regex : /\\$/,
+ next : "singleLineComment"
+ }, {
+ token : "comment",
+ regex : /$/,
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ],
"qqstring" : [
{
token : "string",
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
next : "start"
}, {
- token : "string",
- regex : '.+'
+ defaultToken : "string"
}
],
"qstring" : [
@@ -234,8 +195,7 @@ var c_cppHighlightRules = function() {
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
next : "start"
}, {
- token : "string",
- regex : '.+'
+ defaultToken : "string"
}
],
"directive" : [
@@ -279,52 +239,8 @@ oop.inherits(c_cppHighlightRules, TextHighlightRules);
exports.c_cppHighlightRules = c_cppHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -363,8 +279,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -376,92 +292,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -476,6 +353,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -488,51 +366,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -541,6 +425,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -557,9 +442,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -569,15 +455,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -586,6 +470,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -602,9 +487,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -614,62 +500,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -681,13 +564,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -706,23 +656,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -735,7 +717,133 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = c_cppHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/c_cpp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-cirru.js b/js/vendor/ace/src-noconflict/mode-cirru.js
new file mode 100755
index 0000000..431a674
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-cirru.js
@@ -0,0 +1,202 @@
+ace.define("ace/mode/cirru_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var CirruHighlightRules = function() {
+ this.$rules = {
+ start: [{
+ token: 'constant.numeric',
+ regex: /[\d\.]+/
+ }, {
+ token: 'comment.line.double-dash',
+ regex: /--/,
+ next: 'comment',
+ }, {
+ token: 'storage.modifier',
+ regex: /\(/,
+ }, {
+ token: 'storage.modifier',
+ regex: /\,/,
+ next: 'line',
+ }, {
+ token: 'support.function',
+ regex: /[^\(\)\"\s]+/,
+ next: 'line'
+ }, {
+ token: 'string.quoted.double',
+ regex: /"/,
+ next: 'string',
+ }, {
+ token: 'storage.modifier',
+ regex: /\)/,
+ }],
+ comment: [{
+ token: 'comment.line.double-dash',
+ regex: /\ +[^\n]+/,
+ next: 'start',
+ }],
+ string: [{
+ token: 'string.quoted.double',
+ regex: /"/,
+ next: 'line',
+ }, {
+ token: 'constant.character.escape',
+ regex: /\\/,
+ next: 'escape',
+ }, {
+ token: 'string.quoted.double',
+ regex: /[^\\\"]+/,
+ }],
+ escape: [{
+ token: 'constant.character.escape',
+ regex: /./,
+ next: 'string',
+ }],
+ line: [{
+ token: 'constant.numeric',
+ regex: /[\d\.]+/
+ }, {
+ token: 'markup.raw',
+ regex: /^\s*/,
+ next: 'start',
+ }, {
+ token: 'storage.modifier',
+ regex: /\$/,
+ next: 'start',
+ }, {
+ token: 'variable.parameter',
+ regex: /[^\(\)\"\s]+/
+ }, {
+ token: 'storage.modifier',
+ regex: /\(/,
+ next: 'start'
+ }, {
+ token: 'storage.modifier',
+ regex: /\)/,
+ }, {
+ token: 'markup.raw',
+ regex: /^\ */,
+ next: 'start',
+ }, {
+ token: 'string.quoted.double',
+ regex: /"/,
+ next: 'string',
+ }]
+ }
+
+};
+
+oop.inherits(CirruHighlightRules, TextHighlightRules);
+
+exports.CirruHighlightRules = CirruHighlightRules;
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "#")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "#")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/cirru",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cirru_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CirruHighlightRules = require("./cirru_highlight_rules").CirruHighlightRules;
+var CoffeeFoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CirruHighlightRules;
+ this.foldingRules = new CoffeeFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.$id = "ace/mode/cirru";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-clojure.js b/js/vendor/ace/src-noconflict/mode-clojure.js
index 58aebc8..c5a3adb 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-clojure.js
+++ b/js/vendor/ace/src-noconflict/mode-clojure.js
@@ -1,94 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/clojure', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/clojure_highlight_rules', 'ace/mode/matching_parens_outdent', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ClojureHighlightRules = require("./clojure_highlight_rules").ClojureHighlightRules;
-var MatchingParensOutdent = require("./matching_parens_outdent").MatchingParensOutdent;
-var Range = require("../range").Range;
-
-var Mode = function() {
- var highlighter = new ClojureHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
- this.$outdent = new MatchingParensOutdent();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = ";";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/[\(\[]/);
- if (match) {
- indent += " ";
- }
- match = line.match(/[\)]/);
- if (match) {
- indent = "";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/clojure_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/clojure_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -255,8 +166,8 @@ oop.inherits(ClojureHighlightRules, TextHighlightRules);
exports.ClojureHighlightRules = ClojureHighlightRules;
});
-ace.define('ace/mode/matching_parens_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -299,3 +210,97 @@ var MatchingParensOutdent = function() {};
exports.MatchingParensOutdent = MatchingParensOutdent;
});
+
+ace.define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ClojureHighlightRules = require("./clojure_highlight_rules").ClojureHighlightRules;
+var MatchingParensOutdent = require("./matching_parens_outdent").MatchingParensOutdent;
+
+var Mode = function() {
+ this.HighlightRules = ClojureHighlightRules;
+ this.$outdent = new MatchingParensOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ";";
+ this.minorIndentFunctions = ["defn", "defn-", "defmacro", "def", "deftest", "testing"];
+
+ this.$toIndent = function(str) {
+ return str.split('').map(function(ch) {
+ if (/\s/.exec(ch)) {
+ return ch;
+ } else {
+ return ' ';
+ }
+ }).join('');
+ };
+
+ this.$calculateIndent = function(line, tab) {
+ var baseIndent = this.$getIndent(line);
+ var delta = 0;
+ var isParen, ch;
+ for (var i = line.length - 1; i >= 0; i--) {
+ ch = line[i];
+ if (ch === '(') {
+ delta--;
+ isParen = true;
+ } else if (ch === '(' || ch === '[' || ch === '{') {
+ delta--;
+ isParen = false;
+ } else if (ch === ')' || ch === ']' || ch === '}') {
+ delta++;
+ }
+ if (delta < 0) {
+ break;
+ }
+ }
+ if (delta < 0 && isParen) {
+ i += 1;
+ var iBefore = i;
+ var fn = '';
+ while (true) {
+ ch = line[i];
+ if (ch === ' ' || ch === '\t') {
+ if(this.minorIndentFunctions.indexOf(fn) !== -1) {
+ return this.$toIndent(line.substring(0, iBefore - 1) + tab);
+ } else {
+ return this.$toIndent(line.substring(0, i + 1));
+ }
+ } else if (ch === undefined) {
+ return this.$toIndent(line.substring(0, iBefore - 1) + tab);
+ }
+ fn += line[i];
+ i++;
+ }
+ } else if(delta < 0 && !isParen) {
+ return this.$toIndent(line.substring(0, i+1));
+ } else if(delta > 0) {
+ baseIndent = baseIndent.substring(0, baseIndent.length - tab.length);
+ return baseIndent;
+ } else {
+ return baseIndent;
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$calculateIndent(line, tab);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/clojure";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-cobol.js b/js/vendor/ace/src-noconflict/mode-cobol.js
index ae85e64..75d8791 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-cobol.js
+++ b/js/vendor/ace/src-noconflict/mode-cobol.js
@@ -1,59 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/cobol', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/cobol_highlight_rules', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CobolHighlightRules = require("./cobol_highlight_rules").CobolHighlightRules;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new CobolHighlightRules().getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "*";
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/cobol_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -121,4 +67,28 @@ var keywords = "ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|" +
oop.inherits(CobolHighlightRules, TextHighlightRules);
exports.CobolHighlightRules = CobolHighlightRules;
-}); \ No newline at end of file
+});
+
+ace.define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CobolHighlightRules = require("./cobol_highlight_rules").CobolHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = CobolHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "*";
+
+ this.$id = "ace/mode/cobol";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-coffee.js b/js/vendor/ace/src-noconflict/mode-coffee.js
index 74f41c0..a9c8579 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-coffee.js
+++ b/js/vendor/ace/src-noconflict/mode-coffee.js
@@ -1,122 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/coffee', ['require', 'exports', 'module' , 'ace/tokenizer', 'ace/mode/coffee_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/folding/coffee', 'ace/range', 'ace/mode/text', 'ace/worker/worker_client', 'ace/lib/oop'], function(require, exports, module) {
-
-
-var Tokenizer = require("../tokenizer").Tokenizer;
-var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules;
-var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var FoldMode = require("./folding/coffee").FoldMode;
-var Range = require("../range").Range;
-var TextMode = require("./text").Mode;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var oop = require("../lib/oop");
-
-function Mode() {
- var highlighter = new Rules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new Outdent();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new FoldMode();
-}
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- var indenter = /(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/;
- var commentLine = /^(\s*)#/;
- var hereComment = /^\s*###(?!#)/;
- var indentation = /^\s*/;
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
-
- if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') &&
- state === 'start' && indenter.test(line))
- indent += tab;
- return indent;
- };
-
- this.toggleCommentLines = function(state, doc, startRow, endRow){
- console.log("toggle");
- var range = new Range(0, 0, 0, 0);
- for (var i = startRow; i <= endRow; ++i) {
- var line = doc.getLine(i);
- if (hereComment.test(line))
- continue;
-
- if (commentLine.test(line))
- line = line.replace(commentLine, '$1');
- else
- line = line.replace(indentation, '$&#');
-
- range.end.row = range.start.row = i;
- range.end.column = line.length + 1;
- doc.replace(range, line);
- }
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/coffee_worker", "Worker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("error", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("ok", function(e) {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -128,7 +11,7 @@ ace.define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' ,
var keywords = (
"this|throw|then|try|typeof|super|switch|return|break|by|continue|" +
- "catch|class|in|instanceof|is|isnt|if|else|extends|for|forown|" +
+ "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" +
"finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" +
"or|on|unless|until|and|yes"
);
@@ -229,7 +112,7 @@ ace.define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' ,
}
if (val == "}" && stack.length) {
stack.shift();
- this.next = stack.shift();
+ this.next = stack.shift() || "";
if (this.next.indexOf("string") != -1)
return "paren.string";
}
@@ -317,8 +200,8 @@ ace.define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' ,
exports.CoffeeHighlightRules = CoffeeHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -357,8 +240,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -443,3 +326,87 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/coffee",["require","exports","module","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"], function(require, exports, module) {
+"use strict";
+
+var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules;
+var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var FoldMode = require("./folding/coffee").FoldMode;
+var Range = require("../range").Range;
+var TextMode = require("./text").Mode;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var oop = require("../lib/oop");
+
+function Mode() {
+ this.HighlightRules = Rules;
+ this.$outdent = new Outdent();
+ this.foldingRules = new FoldMode();
+}
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+ var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/;
+ var commentLine = /^(\s*)#/;
+ var hereComment = /^\s*###(?!#)/;
+ var indentation = /^\s*/;
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+
+ if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') &&
+ state === 'start' && indenter.test(line))
+ indent += tab;
+ return indent;
+ };
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow){
+ console.log("toggle");
+ var range = new Range(0, 0, 0, 0);
+ for (var i = startRow; i <= endRow; ++i) {
+ var line = doc.getLine(i);
+ if (hereComment.test(line))
+ continue;
+
+ if (commentLine.test(line))
+ line = line.replace(commentLine, '$1');
+ else
+ line = line.replace(indentation, '$&#');
+
+ range.end.row = range.start.row = i;
+ range.end.column = line.length + 1;
+ doc.replace(range, line);
+ }
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/coffee_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/coffee";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-coldfusion.js b/js/vendor/ace/src-noconflict/mode-coldfusion.js
index c1d941c..da55d1f 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-coldfusion.js
+++ b/js/vendor/ace/src-noconflict/mode-coldfusion.js
@@ -1,1067 +1,61 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/coldfusion', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/coldfusion_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var XmlMode = require("./xml").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ColdfusionHighlightRules = require("./coldfusion_highlight_rules").ColdfusionHighlightRules;
-
-var Mode = function() {
- XmlMode.call(this);
-
- var highlighter = new ColdfusionHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-};
-oop.inherits(Mode, XmlMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
- this.$behaviour = new XmlBehaviour();
- this.foldingRules = new XmlFoldMode();
-};
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.blockComment = {start: "<!--", end: "-->"};
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var XmlHighlightRules = function(normalize) {
+var DocCommentHighlightRules = function() {
this.$rules = {
- start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
- {
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
- },
- {
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
- },
- {token : "comment", regex : "<\\!--", next : "comment"},
- {
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
- },
- {include : "tag"},
- {include : "reference"}
- ],
-
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
-
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
- ],
-
- doctype : [
- {include : "space"},
- {include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
- ],
-
- declarations : [{
- token : "text",
- regex : "\\s+"
- }, {
- token: "punctuation.end",
- regex: "]",
- next: "pop"
- }, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
- push : [{
- token : "text",
- regex : "\\s+"
- },
- {
- token : "punctuation.end",
- regex : ">",
- next : "pop"
- },
- {include : "string"}]
- }],
-
- cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
- ],
-
- comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
- ],
-
- tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- }],
-
- space : [
- {token : "text", regex : "\\s+"}
- ],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
- string: [{
- token : "string",
- regex : "'",
- push : "qstring_inner"
- }, {
- token : "string",
- regex : '"',
- push : "qqstring_inner"
- }],
-
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
- }, {
- token : "keyword.operator.separator",
- regex : "="
- }, {
- include : "space"
- }, {
- include : "string"
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
}]
};
-
- if (this.constructor === XmlHighlightRules)
- this.normalizeRules();
};
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-(function() {
-
- this.embedTagRules = function(HighlightRules, prefix, tag){
- this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
- next: [
- {include : "space"},
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
- ]
- });
-
- this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
- onMatch : function(value, currentState, stack) {
- stack.splice(0);
- return this.token;
- }}
- ]
-
- this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
- next: tag + "-end"
- }, {
- token: "string.begin",
- regex : "<\\!\\[CDATA\\["
- }, {
- token: "string.end",
- regex : "\\]\\]>"
- }]);
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
-
-}).call(TextHighlightRules.prototype);
-
-oop.inherits(XmlHighlightRules, TextHighlightRules);
-
-exports.XmlHighlightRules = XmlHighlightRules;
-});
-
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
-
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
-}
-
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
- }
-
- return {
- text: '>' + '</' + tag + '>',
- selection: [1, 1]
- }
- }
- });
-
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
- if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-var lang = require("../../lib/lang");
-
-var SAFE_INSERT_IN_TOKENS =
- ["text", "paren.rparen", "punctuation.operator"];
-var SAFE_INSERT_BEFORE_TOKENS =
- ["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
- };
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
- CstyleBehaviour.recordAutoInsert(editor, session, "}");
- return {
- text: '{}',
- selection: [1, 1]
- };
- } else {
- CstyleBehaviour.recordMaybeInsert(editor, session, "{");
- return {
- text: '{',
- selection: [1, 1]
- };
- }
- }
- } else if (text == '}') {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- } else if (text == "\n" || text == "\r\n") {
- var closing = "";
- if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
- CstyleBehaviour.clearMaybeInsertedClosing();
- }
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
- var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- } else {
- maybeInsertedBrackets--;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- CstyleBehaviour.recordAutoInsert(editor, session, ")");
- return {
- text: '()',
- selection: [1, 1]
- };
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '[') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- CstyleBehaviour.recordAutoInsert(editor, session, "]");
- return {
- text: '[]',
- selection: [1, 1]
- };
- }
- } else if (text == ']') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ']') {
- var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- }
- });
-
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '[') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ']') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"' || text == "'") {
- var quote = text;
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
- return null;
- }
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == selected) {
- range.end.column++;
- return range;
- }
- }
- });
-
-};
-
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});
-
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var lang = require("../../lib/lang");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var FoldMode = exports.FoldMode = function(voidElements) {
- BaseFoldMode.call(this);
- this.voidElements = voidElements || {};
};
-oop.inherits(FoldMode, BaseFoldMode);
-(function() {
-
- this.getFoldWidget = function(session, foldStyle, row) {
- var tag = this._getFirstTagInLine(session, row);
-
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
- return "";
-
- if (tag.selfClosing)
- return "";
-
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
- return "";
-
- return "start";
- };
-
- this._getFirstTagInLine = function(session, row) {
- var tokens = session.getTokens(row);
- var value = "";
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type.lastIndexOf("meta.tag", 0) === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
- }
-
- return this._parseTag(value);
- };
-
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = tag.match(this.tagRe);
- var column = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
- };
- this._readTagForward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var start;
-
- do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
- }
- } while(token = iterator.stepForward());
-
- return null;
- };
-
- this._readTagBackward = function(iterator) {
- var token = iterator.getCurrentToken();
- if (!token)
- return null;
-
- var value = "";
- var end;
-
- do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
- }
- } while(token = iterator.stepBackward());
-
- return null;
- };
-
- this._pop = function(stack, tag) {
- while (stack.length) {
-
- var top = stack[stack.length-1];
- if (!tag || top.tagName == tag.tagName) {
- return stack.pop();
- }
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
- stack.pop();
- continue;
- } else {
- return null;
- }
- }
- };
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var firstTag = this._getFirstTagInLine(session, row);
-
- if (!firstTag.match)
- return null;
-
- var isBackward = firstTag.closing || firstTag.selfClosing;
- var stack = [];
- var tag;
-
- if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
- var start = {
- row: row,
- column: firstTag.column + firstTag.tagName.length + 2
- };
- while (tag = this._readTagForward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0)
- return Range.fromPoints(start, tag.start);
- }
- else {
- stack.push(tag)
- }
- }
- }
- else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
- var end = {
- row: row,
- column: firstTag.column
- };
-
- while (tag = this._readTagBackward(iterator)) {
- if (tag.selfClosing) {
- if (!stack.length) {
- tag.start.column += tag.tagName.length + 2;
- tag.end.column -= 2;
- return Range.fromPoints(tag.start, tag.end);
- } else
- continue;
- }
-
- if (!tag.closing) {
- this._pop(stack, tag);
- if (stack.length == 0) {
- tag.start.column += tag.tagName.length + 2;
- return Range.fromPoints(tag.start, end);
- }
- }
- else {
- stack.push(tag)
- }
- }
- }
-
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
-
-}).call(FoldMode.prototype);
-
-});
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
};
-oop.inherits(Mode, TextMode);
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -1182,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -1208,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -1246,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -1271,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -1305,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -1353,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -1363,52 +400,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -1447,8 +440,365 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -1467,23 +817,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -1496,48 +878,118 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
- var highlighter = new CssHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.HighlightRules = JavaScriptHighlightRules;
+
this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CssBehaviour();
- this.$keywordList = highlighter.$keywordList;
+ this.$behaviour = new CstyleBehaviour();
this.foldingRules = new CStyleFoldMode();
};
oop.inherits(Mode, TextMode);
(function() {
- this.foldingRules = "cStyle";
+ this.lineCommentStart = "//";
this.blockComment = {start: "/*", end: "*/"};
this.getNextLineIndent = function(state, line, tab) {
var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
if (tokens.length && tokens[tokens.length-1].type == "comment") {
return indent;
}
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
}
return indent;
@@ -1552,11 +1004,11 @@ oop.inherits(Mode, TextMode);
};
this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
worker.attachToDocument(session.getDocument());
- worker.on("csslint", function(e) {
- session.setAnnotations(e.data);
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
});
worker.on("terminate", function() {
@@ -1566,23 +1018,23 @@ oop.inherits(Mode, TextMode);
return worker;
};
+ this.$id = "ace/mode/javascript";
}).call(Mode.prototype);
exports.Mode = Mode;
-
});
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -1716,8 +1168,8 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -1795,28 +1247,289 @@ oop.inherits(CssBehaviour, CstyleBehaviour);
exports.CssBehaviour = CssBehaviour;
});
-ace.define('ace/mode/coldfusion_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript_highlight_rules', 'ace/mode/html_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var ColdfusionHighlightRules = function() {
- HtmlHighlightRules.call(this);
+var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
- this.embedTagRules(JavaScriptHighlightRules, "cfjs-", "cfscript");
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
+ },
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
+ },
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
- this.normalizeRules();
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
+ ],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
};
-oop.inherits(ColdfusionHighlightRules, HtmlHighlightRules);
-exports.ColdfusionHighlightRules = ColdfusionHighlightRules;
-});
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
+}).call(TextHighlightRules.prototype);
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -1831,6 +1544,7 @@ var tagMap = lang.createMap({
img : 'image',
input : 'form',
label : 'form',
+ option : 'form',
script : 'script',
select : 'form',
textarea : 'form',
@@ -1848,17 +1562,17 @@ var HtmlHighlightRules = function() {
this.addRules({
attributes: [{
- include : "space"
+ include : "tag_whitespace"
}, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "=",
push : [{
- include: "space",
+ include: "tag_whitespace"
}, {
- token : "string",
+ token : "string.unquoted.attribute-value.html",
regex : "[^<>='\"`\\s]+",
next : "pop"
}, {
@@ -1867,33 +1581,21 @@ var HtmlHighlightRules = function() {
next : "pop"
}]
}, {
- include : "string"
+ include : "attribute_value"
}],
tag: [{
token : function(start, tag) {
var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
},
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
}],
- start_tag_stuff: [
+ tag_stuff: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
});
this.embedTagRules(CssHighlightRules, "css-", "style");
@@ -1907,3 +1609,877 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules);
exports.HtmlHighlightRules = HtmlHighlightRules;
});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
+ this.defaultMode = defaultMode;
+ this.subModes = subModes;
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+
+ this.$getMode = function(state) {
+ if (typeof state != "string")
+ state = state[0];
+ for (var key in this.subModes) {
+ if (state.indexOf(key) === 0)
+ return this.subModes[key];
+ }
+ return null;
+ };
+
+ this.$tryMode = function(state, session, foldStyle, row) {
+ var mode = this.$getMode(state);
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
+ };
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ return (
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
+ );
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var mode = this.$getMode(session.getState(row-1));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.$getMode(session.getState(row));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.defaultMode;
+
+ return mode.getFoldWidgetRange(session, foldStyle, row);
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return "";
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag)
+ return null;
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/coldfusion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var ColdfusionHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ this.embedTagRules(JavaScriptHighlightRules, "cfjs-", "cfscript");
+
+ this.normalizeRules();
+};
+
+oop.inherits(ColdfusionHighlightRules, HtmlHighlightRules);
+
+exports.ColdfusionHighlightRules = ColdfusionHighlightRules;
+});
+
+ace.define("ace/mode/coldfusion",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/html","ace/mode/coldfusion_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var HtmlMode = require("./html").Mode;
+var ColdfusionHighlightRules = require("./coldfusion_highlight_rules").ColdfusionHighlightRules;
+
+var voidElements = "cfabort|cfapplication|cfargument|cfassociate|cfbreak|cfcache|cfcollection|cfcookie|cfdbinfo|cfdirectory|cfdump|cfelse|cfelseif|cferror|cfexchangecalendar|cfexchangeconnection|cfexchangecontact|cfexchangefilter|cfexchangetask|cfexit|cffeed|cffile|cfflush|cfftp|cfheader|cfhtmlhead|cfhttpparam|cfimage|cfimport|cfinclude|cfindex|cfinsert|cfinvokeargument|cflocation|cflog|cfmailparam|cfNTauthenticate|cfobject|cfobjectcache|cfparam|cfpdfformparam|cfprint|cfprocparam|cfprocresult|cfproperty|cfqueryparam|cfregistry|cfreportparam|cfrethrow|cfreturn|cfschedule|cfsearch|cfset|cfsetting|cfthrow|cfzipparam)".split("|");
+
+var Mode = function() {
+ HtmlMode.call(this);
+
+ this.HighlightRules = ColdfusionHighlightRules;
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.voidElements = oop.mixin(lang.arrayToMap(voidElements), this.voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.$id = "ace/mode/coldfusion";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-csharp.js b/js/vendor/ace/src-noconflict/mode-csharp.js
index 035761d..4732c49 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-csharp.js
+++ b/js/vendor/ace/src-noconflict/mode-csharp.js
@@ -1,68 +1,55 @@
-ace.define('ace/mode/csharp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/csharp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var Mode = function() {
- var highlighter = new CSharpHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
};
-oop.inherits(Mode, TextMode);
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
- this.createWorker = function(session) {
- return null;
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
-}).call(Mode.prototype);
-exports.Mode = Mode;
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
});
-ace.define('ace/mode/csharp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
@@ -87,9 +74,6 @@ var CSharpHighlightRules = function() {
regex : "\\/\\*",
next : "comment"
}, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
token : "string", // character
regex : /'(?:.|\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n]))'/
}, {
@@ -117,6 +101,9 @@ var CSharpHighlightRules = function() {
token : "keyword.operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
}, {
+ token : "keyword",
+ regex : "^\\s*#(if|else|elif|endif|define|undef|warning|error|line|region|endregion|pragma)"
+ }, {
token : "punctuation.operator",
regex : "\\?|\\:|\\,|\\;|\\."
}, {
@@ -152,52 +139,8 @@ oop.inherits(CSharpHighlightRules, TextHighlightRules);
exports.CSharpHighlightRules = CSharpHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -236,8 +179,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -249,92 +192,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -349,6 +253,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -361,51 +266,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -414,6 +325,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -430,9 +342,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -442,15 +355,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -459,6 +370,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -475,9 +387,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -487,62 +400,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -554,13 +464,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -579,23 +556,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -608,7 +617,231 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/folding/csharp",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var CFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, CFoldMode);
+
+(function() {
+ this.usingRe = /^\s*using \S/;
+
+ this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
+ this.getFoldWidgetBase = this.getFoldWidget;
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var fw = this.getFoldWidgetBase(session, foldStyle, row);
+ if (!fw) {
+ var line = session.getLine(row);
+ if (/^\s*#region\b/.test(line))
+ return "start";
+ var usingRe = this.usingRe;
+ if (usingRe.test(line)) {
+ var prev = session.getLine(row - 1);
+ var next = session.getLine(row + 1);
+ if (!usingRe.test(prev) && usingRe.test(next))
+ return "start"
+ }
+ }
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.getFoldWidgetRangeBase(session, foldStyle, row);
+ if (range)
+ return range;
+
+ var line = session.getLine(row);
+ if (this.usingRe.test(line))
+ return this.getUsingStatementBlock(session, line, row);
+
+ if (/^\s*#region\b/.test(line))
+ return this.getRegionBlock(session, line, row);
+ };
+
+ this.getUsingStatementBlock = function(session, line, row) {
+ var startColumn = line.match(this.usingRe)[0].length - 1;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ if (/^\s*$/.test(line))
+ continue;
+ if (!this.usingRe.test(line))
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+
+ this.getRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*#(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m)
+ continue;
+ if (m[1])
+ depth--;
+ else
+ depth++;
+
+ if (!depth)
+ break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/csharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csharp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/csharp"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/csharp").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CSharpHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.$id = "ace/mode/csharp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-css.js b/js/vendor/ace/src-noconflict/mode-css.js
index 65781cc..805ba77 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-css.js
+++ b/js/vendor/ace/src-noconflict/mode-css.js
@@ -1,115 +1,14 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CssBehaviour = require("./behaviour/css").CssBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new CssHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CssBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.foldingRules = "cStyle";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("csslint", function(e) {
- session.setAnnotations(e.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -243,8 +142,8 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -283,87 +182,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var CssBehaviour = function () {
-
- this.inherit(CstyleBehaviour);
-
- this.add("colon", "insertion", function (state, action, editor, session, text) {
- if (text === ':') {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- var token = iterator.getCurrentToken();
- if (token && token.value.match(/\s+/)) {
- token = iterator.stepBackward();
- }
- if (token && token.type === 'support.type') {
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar === ':') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- if (!line.substring(cursor.column).match(/^\s*;/)) {
- return {
- text: ':;',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("colon", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected === ':') {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- var token = iterator.getCurrentToken();
- if (token && token.value.match(/\s+/)) {
- token = iterator.stepBackward();
- }
- if (token && token.type === 'support.type') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar === ';') {
- range.end.column ++;
- return range;
- }
- }
- }
- });
-
- this.add("semicolon", "insertion", function (state, action, editor, session, text) {
- if (text === ';') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar === ';') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- });
-
-}
-oop.inherits(CssBehaviour, CstyleBehaviour);
-
-exports.CssBehaviour = CssBehaviour;
-});
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -375,92 +195,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -475,6 +256,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -487,51 +269,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -540,6 +328,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -556,9 +345,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -568,15 +358,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -585,6 +373,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -601,9 +390,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -613,62 +403,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -680,13 +467,159 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar === ';') {
+ range.end.column ++;
+ return range;
+ }
+ }
+ }
+ });
+
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -705,23 +638,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -734,7 +699,130 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-curly.js b/js/vendor/ace/src-noconflict/mode-curly.js
index df5c935..f8549c3 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-curly.js
+++ b/js/vendor/ace/src-noconflict/mode-curly.js
@@ -1,206 +1,61 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- * Libo Cannici <libo AT zendesk DOT com>
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-ace.define('ace/mode/curly', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/matching_brace_outdent', 'ace/mode/html_highlight_rules', 'ace/mode/folding/html', 'ace/mode/curly_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var HtmlMode = require("./html").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-var CurlyHighlightRules = require("./curly_highlight_rules").CurlyHighlightRules;
-
-var Mode = function() {
- var highlighter = new CurlyHighlightRules();
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new HtmlFoldMode();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, HtmlMode);
-
-(function() {
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-
-var Mode = function() {
- var highlighter = new HtmlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$behaviour = new HtmlBehaviour();
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.blockComment = {start: "<!--", end: "-->"};
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- this.checkOutdent = function(state, line, input) {
- return false;
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
};
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-}).call(Mode.prototype);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -321,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -347,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -385,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -410,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -444,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -492,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -502,52 +400,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -586,8 +440,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -599,92 +453,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -699,6 +514,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -711,51 +527,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -764,6 +586,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -780,9 +603,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -792,15 +616,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -809,6 +631,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -825,9 +648,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -837,62 +661,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -904,13 +725,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -929,23 +817,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -958,48 +878,118 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
- var highlighter = new CssHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.HighlightRules = JavaScriptHighlightRules;
+
this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CssBehaviour();
- this.$keywordList = highlighter.$keywordList;
+ this.$behaviour = new CstyleBehaviour();
this.foldingRules = new CStyleFoldMode();
};
oop.inherits(Mode, TextMode);
(function() {
- this.foldingRules = "cStyle";
+ this.lineCommentStart = "//";
this.blockComment = {start: "/*", end: "*/"};
this.getNextLineIndent = function(state, line, tab) {
var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
if (tokens.length && tokens[tokens.length-1].type == "comment") {
return indent;
}
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
}
return indent;
@@ -1014,11 +1004,11 @@ oop.inherits(Mode, TextMode);
};
this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
worker.attachToDocument(session.getDocument());
- worker.on("csslint", function(e) {
- session.setAnnotations(e.data);
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
});
worker.on("terminate", function() {
@@ -1028,23 +1018,23 @@ oop.inherits(Mode, TextMode);
return worker;
};
+ this.$id = "ace/mode/javascript";
}).call(Mode.prototype);
exports.Mode = Mode;
-
});
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -1178,8 +1168,8 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -1257,160 +1247,152 @@ oop.inherits(CssBehaviour, CstyleBehaviour);
exports.CssBehaviour = CssBehaviour;
});
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
+(function() {
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
-};
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+ return indent;
+ };
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+exports.Mode = Mode;
+
+});
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -1418,75 +1400,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}, {
- include : "string"
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -1499,18 +1491,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -1518,14 +1509,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -1537,258 +1528,253 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
};
-});
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
-var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var Behaviour = require("../behaviour").Behaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
+var lang = require("../../lib/lang");
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
-var HtmlBehaviour = function () {
+var XmlBehaviour = function () {
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
var token = iterator.getCurrentToken();
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var element = token.value;
- if (atCursor){
- var element = element.substring(0, position.column - token.start);
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
}
- if (voidElements.indexOf(element) !== -1){
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
}
- return {
- text: '>' + '</' + element + '>',
- selection: [1, 1]
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
}
}
});
-}
-oop.inherits(HtmlBehaviour, XmlBehaviour);
-
-exports.HtmlBehaviour = HtmlBehaviour;
-});
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
});
- return hasType;
-}
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
if (text == '>') {
var position = editor.getCursorPosition();
var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
+ if (is(token, "reference.attribute-value"))
return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
}
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
}
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
return {
- text: '>' + '</' + tag + '>',
+ text: ">" + "</" + element + ">",
selection: [1, 1]
- }
+ };
}
});
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
if (text == "\n") {
var cursor = editor.getCursorPosition();
var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
}
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-exports.XmlBehaviour = XmlBehaviour;
-});
-
-ace.define('ace/mode/folding/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+ if (!token) {
+ return;
+ }
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
-var oop = require("../../lib/oop");
-var MixedFoldMode = require("./mixed").FoldMode;
-var XmlFoldMode = require("./xml").FoldMode;
-var CStyleFoldMode = require("./cstyle").FoldMode;
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
- "js-": new CStyleFoldMode(),
- "css-": new CStyleFoldMode()
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
});
+
};
-oop.inherits(FoldMode, MixedFoldMode);
+oop.inherits(XmlBehaviour, Behaviour);
+exports.XmlBehaviour = XmlBehaviour;
});
-ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -1841,8 +1827,8 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var lang = require("../../lib/lang");
@@ -1850,91 +1836,118 @@ var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var FoldMode = exports.FoldMode = function(voidElements) {
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
BaseFoldMode.call(this);
this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
};
oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
(function() {
this.getFoldWidget = function(session, foldStyle, row) {
var tag = this._getFirstTagInLine(session, row);
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ if (!tag)
return "";
- if (tag.selfClosing)
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
return "";
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
return "";
return "start";
};
-
this._getFirstTagInLine = function(session, row) {
var tokens = session.getTokens(row);
- var value = "";
+ var tag = new Tag();
+
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
- if (token.type.lastIndexOf("meta.tag", 0) === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
}
-
- return this._parseTag(value);
+
+ return null;
};
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = tag.match(this.tagRe);
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
var column = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
};
this._readTagForward = function(iterator) {
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var start;
-
+
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
}
} while(token = iterator.stepForward());
-
+
return null;
};
@@ -1942,32 +1955,24 @@ oop.inherits(FoldMode, BaseFoldMode);
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var end;
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
}
} while(token = iterator.stepBackward());
-
+
return null;
};
@@ -1978,10 +1983,7 @@ oop.inherits(FoldMode, BaseFoldMode);
if (!tag || top.tagName == tag.tagName) {
return stack.pop();
}
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
stack.pop();
continue;
} else {
@@ -1993,7 +1995,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.getFoldWidgetRange = function(session, foldStyle, row) {
var firstTag = this._getFirstTagInLine(session, row);
- if (!firstTag.match)
+ if (!firstTag)
return null;
var isBackward = firstTag.closing || firstTag.selfClosing;
@@ -2001,11 +2003,13 @@ oop.inherits(FoldMode, BaseFoldMode);
var tag;
if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
var start = {
row: row,
- column: firstTag.column + firstTag.tagName.length + 2
+ column: firstTag.start.column + firstTag.tagName.length + 2
};
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
while (tag = this._readTagForward(iterator)) {
if (tag.selfClosing) {
if (!stack.length) {
@@ -2022,15 +2026,15 @@ oop.inherits(FoldMode, BaseFoldMode);
return Range.fromPoints(start, tag.start);
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
var end = {
row: row,
- column: firstTag.column
+ column: firstTag.start.column
};
while (tag = this._readTagBackward(iterator)) {
@@ -2047,11 +2051,13 @@ oop.inherits(FoldMode, BaseFoldMode);
this._pop(stack, tag);
if (stack.length == 0) {
tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
return Range.fromPoints(tag.start, end);
}
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
@@ -2061,8 +2067,375 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/curly_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/curly_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
@@ -2091,3 +2464,28 @@ oop.inherits(CurlyHighlightRules, HtmlHighlightRules);
exports.CurlyHighlightRules = CurlyHighlightRules;
});
+
+ace.define("ace/mode/curly",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/matching_brace_outdent","ace/mode/html_highlight_rules","ace/mode/folding/html","ace/mode/curly_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var CurlyHighlightRules = require("./curly_highlight_rules").CurlyHighlightRules;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = CurlyHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new HtmlFoldMode();
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.$id = "ace/mode/curly";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-d.js b/js/vendor/ace/src-noconflict/mode-d.js
index 11f95ee..574610f 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-d.js
+++ b/js/vendor/ace/src-noconflict/mode-d.js
@@ -1,340 +1,355 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/d', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/d_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var DHighlightRules = require("./d_highlight_rules").DHighlightRules;
-var FoldMode = require("./folding/cstyle").FoldMode;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var Mode = function() {
- var highlighter = new DHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
};
-oop.inherits(Mode, TextMode);
-(function() {
- this.lineCommentStart = "/\\+";
- this.blockComment = {start: "/*", end: "*/"};
-}).call(Mode.prototype);
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-exports.Mode = Mode;
-});
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
-ace.define('ace/mode/d_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/d_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var DHighlightRules = function() {
- this.$rules = { start:
- [ { token: 'punctuation.definition.comment.d', regex: '/\\*\\*/' },
- { include: 'text.html.javadoc' },
- { token:
- [ 'meta.definition.class.d',
- 'storage.modifier.d',
- 'storage.type.structure.d',
- 'meta.definition.class.d',
- 'entity.name.type.class.d',
- 'meta.definition.class.d',
- 'meta.definition.class.d',
- 'storage.type.template.d',
- 'meta.definition.class.d',
- 'meta.definition.class.d',
- 'meta.definition.class.d',
- 'punctuation.separator.inheritance.d',
- 'meta.definition.class.d',
- 'entity.other.inherited-class.d',
- 'meta.definition.class.d',
- 'entity.other.inherited-class.d',
- 'meta.definition.class.d',
- 'entity.other.inherited-class.d',
- 'meta.definition.class.d',
- 'entity.other.inherited-class.d',
- 'meta.definition.class.d',
- 'entity.other.inherited-class.d',
- 'meta.definition.class.d',
- 'entity.other.inherited-class.d',
- 'meta.definition.class.d',
- 'entity.other.inherited-class.d' ],
- regex: '^(\\s*)((?:\\b(?:public|private|protected|static|final|native|synchronized|abstract|export)\\b\\s*)*)(class|interface)(\\s+)(\\w+)(\\s*)(?:(\\(\\s*)([^\\)]+)(\\s*\\))|)(\\s*)(?:(\\s*)(:)(\\s*)(\\w+)(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?)?',
- push:
- [ { token: 'meta.definition.class.d', regex: '(?={)', next: 'pop' },
- { token: 'storage.modifier.d',
- regex: '\\b(?:_|:)\\b',
- push:
- [ { token: [], regex: '(?={)', next: 'pop' },
- { include: '#all-types' },
- { defaultToken: 'meta.definition.class.extends.d' } ] },
- { defaultToken: 'meta.definition.class.d' } ] },
- { token:
- [ 'meta.definition.struct.d',
- 'storage.modifier.d',
- 'storage.type.structure.d',
- 'meta.definition.struct.d',
- 'entity.name.type.struct.d',
- 'meta.definition.struct.d',
- 'meta.definition.struct.d',
- 'storage.type.template.d',
- 'meta.definition.struct.d',
- 'meta.definition.struct.d' ],
- regex: '^(\\s*)((?:\\b(?:public|private|protected|static|final|native|synchronized|abstract|export)\\b\\s*)*)(struct)(\\s+)(\\w+)(\\s*)(?:(\\(\\s*)([^\\)]+)(\\s*\\))|)(\\s*)',
- push:
- [ { token: 'meta.definition.struct.d',
- regex: '(?={)',
- next: 'pop' },
- { token: 'storage.modifier.d',
- regex: '\\b(?:_|:)\\b',
- push:
- [ { token: [], regex: '(?={)', next: 'pop' },
- { include: '#all-types' },
- { defaultToken: 'meta.definition.class.extends.d' } ] },
- { defaultToken: 'meta.definition.struct.d' } ] },
- { token:
- [ 'meta.definition.constructor.d',
- 'storage.modifier.d',
- 'entity.name.function.constructor.d',
- 'meta.definition.constructor.d' ],
- regex: '^(\\s*)((?:\\b(?:public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient|export)\\b\\s*)*)(\\bthis)(\\s*)(?!.*;)(?=\\()' },
- { token:
- [ 'storage.modifier.d',
- 'entity.name.function.destructor.d',
- 'meta.definition.destructor.d',
- 'meta.definition.destructor.d' ],
- regex: '(?:^|)((?:\\b(?:public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient|export)\\b\\s*)*)(~this)(\\s*)(\\()',
- TODO: '(?<!else|new|=) were disallowed in original regex'},
- { token:
- [ 'meta.definition.method.d',
- 'storage.modifier.d',
- 'storage.type.structure.d',
- 'meta.definition.method.d',
- 'entity.name.function.d',
- 'meta.definition.method.d' ],
- regex: '^(\\s*)((?:\\b(?:public|private|protected|static|final|native|lazy|synchronized|abstract|threadsafe|transient|export)\\b\\s*)*)(\\b(?:void|boolean|byte|char|short|int|float|long|double|[\\w_]+[\\w0-9_]*|(?:\\w+\\.)*[A-Z]\\w+)\\b(?:<(?:(?:\\w+\\.)*[A-Z]\\w+(?:\\s*,\\s*)?)+>|(?:\\[\\s*\\])*)?)(\\s*)(\\w+)(\\s*)(?!.*;)(?=\\()' },
- { token: 'constant.other.d', regex: '\\b[A-Z][A-Z0-9_]+\\b' },
- { include: '#comments' },
- { include: '#all-types' },
- { token: 'storage.modifier.access-control.d',
- regex: '\\b(?:private|protected|public|export)\\b' },
- { token: 'storage.modifier.d',
- regex: '\\b(?:auto|static|override|final|const|abstract|volatile|synchronized|lazy)\\b' },
- { token: 'storage.type.structure.d',
- regex: '\\b(?:template|interface|class|enum|struct|union)\\b' },
- { token: 'storage.type.d',
- regex: '\\b(?:ushort|int|uint|long|ulong|float|void|byte|ubyte|double|bit|char|wchar|ucent|cent|short|bool|dchar|real|ireal|ifloat|idouble|creal|cfloat|cdouble|lazy)\\b' },
- { token: 'keyword.control.exception.d',
- regex: '\\b(?:try|catch|finally|throw)\\b' },
- { token: 'keyword.control.d',
- regex: '\\b(?:return|break|case|continue|default|do|while|for|switch|if|else)\\b' },
- { token: 'keyword.control.conditional.d',
- regex: '\\b(?:if|else|switch|iftype)\\b' },
- { token: 'keyword.control.branch.d',
- regex: '\\b(?:goto|break|continue)\\b' },
- { token: 'keyword.control.repeat.d',
- regex: '\\b(?:while|for|do|foreach(?:_reverse)?)\\b' },
- { token: 'keyword.control.statement.d',
- regex: '\\b(?:version|return|with|invariant|body|scope|in|out|inout|asm|mixin|function|delegate)\\b' },
- { token: 'keyword.control.pragma.d', regex: '\\bpragma\\b' },
- { token: 'keyword.control.alias.d',
- regex: '\\b(?:alias|typedef)\\b' },
- { token: 'keyword.control.import.d', regex: '\\bimport\\b' },
- { token:
- [ 'meta.module.d',
- 'keyword.control.module.d',
- 'meta.module.d',
- 'entity.name.function.package.d',
- 'meta.module.d' ],
- regex: '^(\\s*)(module)(\\s+)([^ ;]+?)(;)' },
- { token: 'constant.language.boolean.d',
- regex: '\\b(?:true|false)\\b' },
- { token: 'constant.language.d',
- regex: '\\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|null)\\b' },
- { token: 'variable.language.d', regex: '\\b(?:this|super)\\b' },
- { token: 'constant.numeric.d',
- regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\\b' },
- { include: '#string_escaped_char' },
- { include: '#strings' },
- { token: 'keyword.operator.comparison.d',
- regex: '==|!=|<=|>=|<>|<|>' },
- { token: 'keyword.operator.increment-decrement.d',
- regex: '\\-\\-|\\+\\+' },
- { token: 'keyword.operator.arithmetic.d',
- regex: '\\-|\\+|\\*|\\/|~|%' },
- { token: 'keyword.operator.logical.d', regex: '!|&&|\\|\\|' },
- { token: 'keyword.operator.overload.d',
- regex: '\\b(?:opNeg|opCom|opPostInc|opPostDec|opCast|opAdd|opSub|opSub_r|opMul|opDiv|opDiv_r|opMod|opMod_r|opAnd|opOr|opXor|opShl|opShl_r|opShr|opShr_r|opUShr|opUShr_r|opCat|opCat_r|opEquals|opEquals|opCmp|opCmp|opCmp|opCmp|opAddAssign|opSubAssign|opMulAssign|opDivAssign|opModAssign|opAndAssign|opOrAssign|opXorAssign|opShlAssign|opShrAssign|opUShrAssign|opCatAssign|opIndex|opIndexAssign|opCall|opSlice|opSliceAssign|opPos|opAdd_r|opMul_r|opAnd_r|opOr_r|opXor_r)\\b' },
- { token: 'keyword.operator.d',
- regex: '\\b(?:new|delete|typeof|typeid|cast|align|is)\\b' },
- { token: 'keyword.other.class-fns.d',
- regex: '\\b(?:new|throws)\\b' },
- { token: 'keyword.other.external.d',
- regex: '\\b(?:package|extern)\\b' },
- { token: 'keyword.other.debug.d',
- regex: '\\b(?:deprecated|unittest|debug)\\b' },
- { token: 'support.type.sys-types.c',
- regex: '\\b(?:u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b' },
- { token: 'support.type.pthread.c',
- regex: '\\b(?:pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t)\\b' },
- { token: 'support.type.stdint.c',
- regex: '\\b(?:int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t)\\b' } ],
- '#all-types':
- [ { include: '#support-type-built-ins-d' },
- { include: '#support-type-d' },
- { include: '#storage-type-d' } ],
- '#comments':
- [ { token: 'punctuation.definition.comment.d',
- regex: '/\\*',
- push:
- [ { token: 'punctuation.definition.comment.d',
- regex: '\\*/',
- next: 'pop' },
- { defaultToken: 'comment.block.d' } ] },
- { token: 'punctuation.definition.comment.d',
- regex: '/\\+',
- push:
- [ { token: 'punctuation.definition.comment.d',
- regex: '\\+/',
- next: 'pop' },
- { defaultToken: 'comment.block.nested.d' } ] },
- { token:
- [ 'punctuation.definition.comment.d',
- 'comment.line.double-slash.d' ],
- regex: '(//)(.*$)' } ],
- '#constant_placeholder':
- [ { token: 'constant.other.placeholder.d',
- regex: '%(?:\\([a-z_]+\\))?#?0?\\-?[ ]?\\+?(?:[0-9]*|\\*)(?:\\.(?:[0-9]*|\\*))?[hL]?[a-z%]',
- caseInsensitive: true } ],
- '#regular_expressions': [{token: "constant.character.escape", regex: "\\\\."}], //[ { include: 'source.regexp.python' } ],
- '#statement-remainder':
- [ { token: 'meta.definition.param-list.d',
- regex: '\\(',
- push:
- [ { token: 'meta.definition.param-list.d',
- regex: '(?=\\))',
- next: 'pop' },
- { include: '#all-types' },
- { defaultToken: 'meta.definition.param-list.d' } ] },
- { token: 'keyword.other.class-fns.d',
- regex: 'throws',
- push:
- [ { token: [], regex: '(?={)', next: 'pop' },
- { include: '#all-types' },
- { defaultToken: 'meta.definition.throws.d' } ] } ],
- '#storage-type-d':
- [ { token: 'storage.type.d',
- regex: '\\b(?:void|byte|short|char|int|long|float|double|boolean|(?:[a-z]\\w+\\.)*[A-Z]\\w+)\\b' } ],
- '#string_escaped_char':
- [ { token: 'constant.character.escape.d',
- regex: '\\\\(?:\\\\|[abefnprtv\'"?]|[0-3]\\d{,2}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|&\\w+;)' },
- { token: 'invalid.illegal.unknown-escape.d', regex: '\\\\.' } ],
- '#strings':
- [ { token: 'punctuation.definition.string.begin.d',
- regex: '"',
- push:
- [ { include: '#string_escaped_char' },
- { token: 'punctuation.definition.string.end.d',
- regex: '"',
- next: 'pop' },
- { defaultToken: 'string.quoted.double.d' } ] },
- { token:
- [ 'storage.type.string.d',
- 'punctuation.definition.string.begin.d' ],
- regex: '(r)(")',
- push:
- [ { token: 'punctuation.definition.string.end.d',
- regex: '"',
- next: 'pop' },
- { include: '#regular_expressions' },
- { defaultToken: 'string.quoted.double.raw.d' } ] },
- { token: 'punctuation.definition.string.begin.d',
- regex: '`',
- push:
- [ { token: 'punctuation.definition.string.end.d',
- regex: '`',
- next: 'pop' },
- { defaultToken: 'string.quoted.double.raw.backtick.d' } ] },
- { token: 'punctuation.definition.string.begin.d',
- regex: '\'',
- push:
- [ { include: '#string_escaped_char' },
- { token: 'punctuation.definition.string.end.d',
- regex: '\'',
- next: 'pop' },
- { defaultToken: 'string.quoted.single.d' } ] } ],
- '#support-type-built-ins-classes-d':
- [ { token: 'support.type.built-ins.classes.d',
- regex: '\\b(?:AbstractServer|ArchiveMember|ArgParser|Barrier|BomSniffer|Buffer|BufferInput|BufferOutput|BufferSlice|BufferedFile|BufferedStream|BzipInput|BzipOutput|CFile|CacheInvalidatee|CacheInvalidator|CacheServer|CacheThread|Certificate|CertificateStore|CertificateStoreCtx|ChunkInput|ChunkOutput|ClassInfo|Cluster|ClusterCache|ClusterQueue|ClusterThread|CmdParser|ComObject|Compress|Condition|Conduit|Cookie|CookieParser|CookieStack|CounterInput|CounterOutput|DataFileInput|DataFileOutput|DataInput|DataOutput|Database|DatagramConduit|DeviceConduit|DigestInput|DigestOutput|DocPrinter|Document|DummyInputStream|DummyOutputStream|EndianInput|EndianOutput|EndianProtocol|EndianStream|EventSeekInputStream|EventSeekOutputStream|FTPConnection|Fiber|Field|File|FileConduit|FileFolder|FileGroup|FileInput|FileOutput|FilePath|FileScan|FilterStream|Foo|FormatOutput|GreedyInput|GreedyOutput|Gregorian|GrowBuffer|HeapCopy|HeapSlice|Hierarchy|HttpClient|HttpCookies|HttpCookiesView|HttpGet|HttpHeaders|HttpHeadersView|HttpParams|HttpPost|HttpStack|HttpTokens|HttpTriplet|IPv4Address|IUnknown|InputFilter|InternetAddress|InternetHost|Layout|LineInput|LineIterator|LinkedFolder|Log|MapInput|MapOutput|MappedBuffer|Md2|Md4|MemoryQueue|MemoryStream|MmFile|MmFileStream|ModuleInfo|MulticastConduit|Mutex|NativeProtocol|NetCall|NetHost|NetworkAlert|NetworkCache|NetworkCall|NetworkClient|NetworkCombo|NetworkMessage|NetworkQueue|NetworkRegistry|NetworkTask|NotImplemented|Object|Observer|OutBuffer|OutputFilter|PersistQueue|Pipe|PipeConduit|Print|PrivateKey|Process|Properties|Protocol|ProtocolReader|ProtocolWriter|PublicKey|PullParser|QueueFile|QueueServer|QueueThread|QueuedCache|QuoteIterator|Random|Range|ReadWriteMutex|Reader|Record|RegExp|RegExpT|RegexIterator|RollCall|SSLCtx|SSLServerSocket|SSLSocketConduit|SaxParser|SelectionKey|Semaphore|ServerSocket|ServerThread|Service|SimpleIterator|SliceInputStream|SliceSeekInputStream|SliceSeekOutputStream|SliceStream|SnoopInput|SnoopOutput|Socket|SocketConduit|SocketListener|SocketSet|SocketStream|Sprint|Stream|StreamIterator|TArrayStream|TaskServer|TaskThread|TcpSocket|Telnet|TempFile|Text|TextFileInput|TextFileOutput|TextView|Thread|ThreadGroup|ThreadLocal|ThreadPool|Token|TypeInfo|TypeInfo_AC|TypeInfo_Aa|TypeInfo_Ab|TypeInfo_Ac|TypeInfo_Ad|TypeInfo_Ae|TypeInfo_Af|TypeInfo_Ag|TypeInfo_Ah|TypeInfo_Ai|TypeInfo_Aj|TypeInfo_Ak|TypeInfo_Al|TypeInfo_Am|TypeInfo_Ao|TypeInfo_Ap|TypeInfo_Aq|TypeInfo_Ar|TypeInfo_Array|TypeInfo_As|TypeInfo_AssociativeArray|TypeInfo_At|TypeInfo_Au|TypeInfo_Av|TypeInfo_Aw|TypeInfo_C|TypeInfo_Class|TypeInfo_D|TypeInfo_Delegate|TypeInfo_Enum|TypeInfo_Function|TypeInfo_Interface|TypeInfo_P|TypeInfo_Pointer|TypeInfo_StaticArray|TypeInfo_Struct|TypeInfo_Tuple|TypeInfo_Typedef|TypeInfo_a|TypeInfo_b|TypeInfo_c|TypeInfo_d|TypeInfo_e|TypeInfo_f|TypeInfo_g|TypeInfo_h|TypeInfo_i|TypeInfo_j|TypeInfo_k|TypeInfo_l|TypeInfo_m|TypeInfo_o|TypeInfo_p|TypeInfo_q|TypeInfo_r|TypeInfo_s|TypeInfo_t|TypeInfo_u|TypeInfo_v|TypeInfo_w|TypedInput|TypedOutput|URIerror|UdpSocket|UnCompress|UniText|UnicodeBom|UnicodeFile|UnknownAddress|Uri|UtfInput|UtfOutput|VirtualFolder|WrapSeekInputStream|WrapSeekOutputStream|Writer|XmlPrinter|ZipArchive|ZipBlockReader|ZipBlockWriter|ZipEntry|ZipEntryVerifier|ZipFile|ZipFileGroup|ZipFolder|ZipSubFolder|ZipSubFolderEntry|ZipSubFolderGroup|ZlibInput|ZlibOutput)\\b' } ],
- '#support-type-built-ins-d':
- [ { include: '#support-type-built-ins-exceptions-d' },
- { include: '#support-type-built-ins-classes-d' },
- { include: '#support-type-built-ins-interfaces-d' },
- { include: '#support-type-built-ins-structs-d' } ],
- '#support-type-built-ins-exceptions-d':
- [ { token: 'support.type.built-ins.exceptions.d',
- regex: '\\b(?:AddressException|ArrayBoundsError|ArrayBoundsException|AssertError|AssertException|Base64CharException|Base64Exception|BzipClosedException|BzipException|ClusterEmptyException|ClusterFullException|ConvError|ConvOverflowError|ConversionException|CorruptedIteratorException|DatabaseException|DateParseError|Exception|FTPException|FiberException|FileException|FinalizeException|FormatError|HostException|IOException|IllegalArgumentException|IllegalElementException|InvalidKeyException|InvalidTypeException|LocaleException|ModuleCtorError|NoSuchElementException|OpenException|OpenRJException|OutOfMemoryException|PlatformException|ProcessCreateException|ProcessException|ProcessForkException|ProcessKillException|ProcessWaitException|ReadException|RegExpException|RegexException|RegistryException|SeekException|SharedLibException|SocketAcceptException|SocketException|StdioException|StreamException|StreamFileException|StringException|SwitchError|SwitchException|SyncException|TextException|ThreadError|ThreadException|UnboxException|UnicodeException|UtfException|VariantTypeMismatchException|Win32Exception|WriteException|XmlException|ZipChecksumException|ZipException|ZipExhaustedException|ZipNotSupportedException|ZlibClosedException|ZlibException|OurUnwindException|SysError)\\b' } ],
- '#support-type-built-ins-interfaces-d':
- [ { token: 'support.type.built-ins.interfaces.d',
- regex: '\\b(?:Buffered|HttpParamsView|ICache|IChannel|IClassFactory|ICluster|IConduit|IConsumer|IEvent|IHierarchy|ILevel|IListener|IMessage|IMessageLoader|IOStream|IReadable|ISelectable|ISelectionSet|ISelector|IServer|IUnknown|IWritable|IXmlPrinter|InputStream|OutputStream|PathView|VfsFile|VfsFiles|VfsFolder|VfsFolderEntry|VfsFolders|VfsHost|VfsSync|ZipReader|ZipWriter)\\b' } ],
- '#support-type-built-ins-structs-d':
- [ { token: 'support.type.built-ins.structs.d',
- regex: '\\b(?:ABC|ABCFLOAT|ACCEL|ACCESSTIMEOUT|ACCESS_ALLOWED_ACE|ACCESS_DENIED_ACE|ACE_HEADER|ACL|ACL_REVISION_INFORMATION|ACL_SIZE_INFORMATION|ACTION_HEADER|ADAPTER_STATUS|ADDJOB_INFO_1|ANIMATIONINFO|APPBARDATA|Argument|Atomic|Attribute|BITMAP|BITMAPCOREHEADER|BITMAPCOREINFO|BITMAPINFO|BITMAPINFOHEADER|BITMAPV4HEADER|BLOB|BROWSEINFO|BY_HANDLE_FILE_INFORMATION|Bar|Baz|BitArray|Box|BracketResult|ByteSwap|CANDIDATEFORM|CANDIDATELIST|CBTACTIVATESTRUCT|CBT_CREATEWND|CHARFORMAT|CHARRANGE|CHARSET|CHARSETINFO|CHAR_INFO|CIDA|CIEXYZ|CIEXYZTRIPLE|CLIENTCREATESTRUCT|CMINVOKECOMMANDINFO|COLORADJUSTMENT|COLORMAP|COMMCONFIG|COMMPROP|COMMTIMEOUTS|COMPAREITEMSTRUCT|COMPCOLOR|COMPOSITIONFORM|COMSTAT|CONNECTDLGSTRUCT|CONSOLE_CURSOR_INFO|CONTEXT|CONVCONTEXT|CONVINFO|COORD|COPYDATASTRUCT|CPINFO|CPLINFO|CREATESTRUCT|CREATE_PROCESS_DEBUG_INFO|CREATE_THREAD_DEBUG_INFO|CRITICAL_SECTION|CRITICAL_SECTION_DEBUG|CURRENCYFMT|CURSORSHAPE|CWPRETSTRUCT|CWPSTRUCT|CharClass|CharRange|Clock|CodePage|Console|DATATYPES_INFO_1|DCB|DDEACK|DDEADVISE|DDEDATA|DDELN|DDEML_MSG_HOOK_DATA|DDEPOKE|DDEUP|DEBUGHOOKINFO|DEBUG_EVENT|DELETEITEMSTRUCT|DEVMODE|DEVNAMES|DEV_BROADCAST_HDR|DEV_BROADCAST_OEM|DEV_BROADCAST_PORT|DEV_BROADCAST_VOLUME|DIBSECTION|DIR|DISCDLGSTRUCT|DISK_GEOMETRY|DISK_PERFORMANCE|DOCINFO|DOC_INFO_1|DOC_INFO_2|DRAGLISTINFO|DRAWITEMSTRUCT|DRAWTEXTPARAMS|DRIVER_INFO_1|DRIVER_INFO_2|DRIVER_INFO_3|DRIVE_LAYOUT_INFORMATION|Date|DateParse|DateTime|DirEntry|DynArg|EDITSTREAM|EMPTYRECORD|EMR|EMRABORTPATH|EMRANGLEARC|EMRARC|EMRBITBLT|EMRCREATEBRUSHINDIRECT|EMRCREATECOLORSPACE|EMRCREATEDIBPATTERNBRUSHPT|EMRCREATEMONOBRUSH|EMRCREATEPALETTE|EMRCREATEPEN|EMRELLIPSE|EMREOF|EMREXCLUDECLIPRECT|EMREXTCREATEFONTINDIRECTW|EMREXTCREATEPEN|EMREXTFLOODFILL|EMREXTSELECTCLIPRGN|EMREXTTEXTOUTA|EMRFILLPATH|EMRFILLRGN|EMRFORMAT|EMRFRAMERGN|EMRGDICOMMENT|EMRINVERTRGN|EMRLINETO|EMRMASKBLT|EMRMODIFYWORLDTRANSFORM|EMROFFSETCLIPRGN|EMRPLGBLT|EMRPOLYDRAW|EMRPOLYDRAW16|EMRPOLYLINE|EMRPOLYLINE16|EMRPOLYPOLYLINE|EMRPOLYPOLYLINE16|EMRPOLYTEXTOUTA|EMRRESIZEPALETTE|EMRRESTOREDC|EMRROUNDRECT|EMRSCALEVIEWPORTEXTEX|EMRSELECTCLIPPATH|EMRSELECTCOLORSPACE|EMRSELECTOBJECT|EMRSELECTPALETTE|EMRSETARCDIRECTION|EMRSETBKCOLOR|EMRSETCOLORADJUSTMENT|EMRSETDIBITSTODEVICE|EMRSETMAPPERFLAGS|EMRSETMITERLIMIT|EMRSETPALETTEENTRIES|EMRSETPIXELV|EMRSETVIEWPORTEXTEX|EMRSETVIEWPORTORGEX|EMRSETWORLDTRANSFORM|EMRSTRETCHBLT|EMRSTRETCHDIBITS|EMRTEXT|ENCORRECTTEXT|ENDROPFILES|ENHMETAHEADER|ENHMETARECORD|ENOLEOPFAILED|ENPROTECTED|ENSAVECLIPBOARD|ENUMLOGFONT|ENUMLOGFONTEX|ENUM_SERVICE_STATUS|EVENTLOGRECORD|EVENTMSG|EXCEPTION_DEBUG_INFO|EXCEPTION_POINTERS|EXCEPTION_RECORD|EXIT_PROCESS_DEBUG_INFO|EXIT_THREAD_DEBUG_INFO|EXTLOGFONT|EXTLOGPEN|EXT_BUTTON|EmptySlot|EndOfCDRecord|Environment|FILETIME|FILTERKEYS|FINDREPLACE|FINDTEXTEX|FIND_NAME_BUFFER|FIND_NAME_HEADER|FIXED|FLOATING_SAVE_AREA|FMS_GETDRIVEINFO|FMS_GETFILESEL|FMS_LOAD|FMS_TOOLBARLOAD|FOCUS_EVENT_RECORD|FONTSIGNATURE|FORMATRANGE|FORMAT_PARAMETERS|FORM_INFO_1|FileConst|FileHeader|FileRoots|FileSystem|FoldingCaseData|Foo|FtpConnectionDetail|FtpFeature|FtpFileInfo|FtpResponse|GC|GCP_RESULTS|GCStats|GENERIC_MAPPING|GLYPHMETRICS|GLYPHMETRICSFLOAT|GROUP_INFO_2|GUID|HANDLETABLE|HD_HITTESTINFO|HD_ITEM|HD_LAYOUT|HD_NOTIFY|HELPINFO|HELPWININFO|HIGHCONTRAST|HSZPAIR|HeaderElement|HttpConst|HttpHeader|HttpHeaderName|HttpResponses|HttpStatus|HttpToken|ICONINFO|ICONMETRICS|IMAGEINFO|IMAGE_DOS_HEADER|INPUT_RECORD|ITEMIDLIST|IeeeFlags|Interface|JOB_INFO_1|JOB_INFO_2|KERNINGPAIR|LANA_ENUM|LAYERPLANEDESCRIPTOR|LDT_ENTRY|LIST_ENTRY|LOAD_DLL_DEBUG_INFO|LOCALESIGNATURE|LOCALGROUP_INFO_0|LOCALGROUP_MEMBERS_INFO_0|LOCALGROUP_MEMBERS_INFO_3|LOGBRUSH|LOGCOLORSPACE|LOGFONT|LOGFONTA|LOGFONTW|LOGPALETTE|LOGPEN|LUID_AND_ATTRIBUTES|LV_COLUMN|LV_DISPINFO|LV_FINDINFO|LV_HITTESTINFO|LV_ITEM|LV_KEYDOWN|LocalFileHeader|MAT2|MD5_CTX|MDICREATESTRUCT|MEASUREITEMSTRUCT|MEMORYSTATUS|MEMORY_BASIC_INFORMATION|MENUEX_TEMPLATE_HEADER|MENUEX_TEMPLATE_ITEM|MENUITEMINFO|MENUITEMTEMPLATE|MENUITEMTEMPLATEHEADER|MENUTEMPLATE|MENU_EVENT_RECORD|METAFILEPICT|METARECORD|MINIMIZEDMETRICS|MINMAXINFO|MODEMDEVCAPS|MODEMSETTINGS|MONCBSTRUCT|MONCONVSTRUCT|MONERRSTRUCT|MONHSZSTRUCT|MONITOR_INFO_1|MONITOR_INFO_2|MONLINKSTRUCT|MONMSGSTRUCT|MOUSEHOOKSTRUCT|MOUSEKEYS|MOUSE_EVENT_RECORD|MSG|MSGBOXPARAMS|MSGFILTER|MULTIKEYHELP|NAME_BUFFER|NCB|NCCALCSIZE_PARAMS|NDDESHAREINFO|NETCONNECTINFOSTRUCT|NETINFOSTRUCT|NETRESOURCE|NEWCPLINFO|NEWTEXTMETRIC|NEWTEXTMETRICEX|NMHDR|NM_LISTVIEW|NM_TREEVIEW|NM_UPDOWNW|NONCLIENTMETRICS|NS_SERVICE_INFO|NUMBERFMT|OFNOTIFY|OFSTRUCT|OPENFILENAME|OPENFILENAMEA|OPENFILENAMEW|OSVERSIONINFO|OUTLINETEXTMETRIC|OUTPUT_DEBUG_STRING_INFO|OVERLAPPED|OffsetTypeInfo|PAINTSTRUCT|PALETTEENTRY|PANOSE|PARAFORMAT|PARTITION_INFORMATION|PERF_COUNTER_BLOCK|PERF_COUNTER_DEFINITION|PERF_DATA_BLOCK|PERF_INSTANCE_DEFINITION|PERF_OBJECT_TYPE|PIXELFORMATDESCRIPTOR|POINT|POINTFLOAT|POINTFX|POINTL|POINTS|POLYTEXT|PORT_INFO_1|PORT_INFO_2|PREVENT_MEDIA_REMOVAL|PRINTER_DEFAULTS|PRINTER_INFO_1|PRINTER_INFO_2|PRINTER_INFO_3|PRINTER_INFO_4|PRINTER_INFO_5|PRINTER_NOTIFY_INFO|PRINTER_NOTIFY_INFO_DATA|PRINTER_NOTIFY_OPTIONS|PRINTER_NOTIFY_OPTIONS_TYPE|PRINTPROCESSOR_INFO_1|PRIVILEGE_SET|PROCESS_HEAPENTRY|PROCESS_INFORMATION|PROPSHEETHEADER|PROPSHEETHEADER_U1|PROPSHEETHEADER_U2|PROPSHEETHEADER_U3|PROPSHEETPAGE|PROPSHEETPAGE_U1|PROPSHEETPAGE_U2|PROTOCOL_INFO|PROVIDOR_INFO_1|PSHNOTIFY|PUNCTUATION|PassByCopy|PassByRef|Phase1Info|PropertyConfigurator|QUERY_SERVICE_CONFIG|QUERY_SERVICE_LOCK_STATUS|RASAMB|RASCONN|RASCONNSTATUS|RASDIALEXTENSIONS|RASDIALPARAMS|RASENTRYNAME|RASPPPIP|RASPPPIPX|RASPPPNBF|RASTERIZER_STATUS|REASSIGN_BLOCKS|RECT|RECTL|REMOTE_NAME_INFO|REPASTESPECIAL|REQRESIZE|RGBQUAD|RGBTRIPLE|RGNDATA|RGNDATAHEADER|RIP_INFO|Runtime|SCROLLINFO|SECURITY_ATTRIBUTES|SECURITY_DESCRIPTOR|SECURITY_QUALITY_OF_SERVICE|SELCHANGE|SERIALKEYS|SERVICE_ADDRESS|SERVICE_ADDRESSES|SERVICE_INFO|SERVICE_STATUS|SERVICE_TABLE_ENTRY|SERVICE_TYPE_INFO_ABS|SERVICE_TYPE_VALUE_ABS|SESSION_BUFFER|SESSION_HEADER|SET_PARTITION_INFORMATION|SHFILEINFO|SHFILEOPSTRUCT|SHITEMID|SHNAMEMAPPING|SID|SID_AND_ATTRIBUTES|SID_IDENTIFIER_AUTHORITY|SINGLE_LIST_ENTRY|SIZE|SMALL_RECT|SOUNDSENTRY|STARTUPINFO|STICKYKEYS|STRRET|STYLEBUF|STYLESTRUCT|SYSTEMTIME|SYSTEM_AUDIT_ACE|SYSTEM_INFO|SYSTEM_INFO_U|SYSTEM_POWER_STATUS|Signal|SjLj_Function_Context|SpecialCaseData|TAPE_ERASE|TAPE_GET_DRIVE_PARAMETERS|TAPE_GET_MEDIA_PARAMETERS|TAPE_GET_POSITION|TAPE_PREPARE|TAPE_SET_DRIVE_PARAMETERS|TAPE_SET_MEDIA_PARAMETERS|TAPE_SET_POSITION|TAPE_WRITE_MARKS|TBADDBITMAP|TBBUTTON|TBNOTIFY|TBSAVEPARAMS|TCHOOSECOLOR|TCHOOSEFONT|TC_HITTESTINFO|TC_ITEM|TC_ITEMHEADER|TC_KEYDOWN|TEXTMETRIC|TEXTMETRICA|TEXTRANGE|TFINDTEXT|TIME_ZONE_INFORMATION|TOGGLEKEYS|TOKEN_CONTROL|TOKEN_DEFAULT_DACL|TOKEN_GROUPS|TOKEN_OWNER|TOKEN_PRIMARY_GROUP|TOKEN_PRIVILEGES|TOKEN_SOURCE|TOKEN_STATISTICS|TOKEN_USER|TOOLINFO|TOOLTIPTEXT|TPAGESETUPDLG|TPMPARAMS|TRANSMIT_FILE_BUFFERS|TREEITEM|TSMALLPOINT|TTHITTESTINFO|TTPOLYCURVE|TTPOLYGONHEADER|TVARIANT|TV_DISPINFO|TV_HITTESTINFO|TV_INSERTSTRUCT|TV_ITEM|TV_KEYDOWN|TV_SORTCB|Time|TimeOfDay|TimeSpan|Tuple|UDACCEL|ULARGE_INTEGER|UNIVERSAL_NAME_INFO|UNLOAD_DLL_DEBUG_INFO|USEROBJECTFLAGS|USER_INFO_0|USER_INFO_2|USER_INFO_3|UnicodeData|VALENT|VA_LIST|VERIFY_INFORMATION|VS_FIXEDFILEINFO|Variant|VfsFilterInfo|WIN32_FILE_ATTRIBUTE_DATA|WIN32_FIND_DATA|WIN32_FIND_DATAW|WIN32_STREAM_ID|WINDOWINFO|WINDOWPLACEMENT|WINDOWPOS|WINDOW_BUFFER_SIZE_RECORD|WNDCLASS|WNDCLASSA|WNDCLASSEX|WNDCLASSEXA|WSADATA|WallClock|XFORM|ZipEntryInfo)\\b' } ],
- '#support-type-d':
- [ { token: 'support.type.d',
- regex: '\\b(?:tango|std)\\.[\\w\\.]+\\b' } ] }
+ var keywords = (
+ "this|super|import|module|body|mixin|__traits|invariant|alias|asm|delete|"+
+ "typeof|typeid|sizeof|cast|new|in|is|typedef|__vector|__parameters"
+ );
+
+ var keywordControls = (
+ "break|case|continue|default|do|else|for|foreach|foreach_reverse|goto|if|" +
+ "return|switch|while|catch|try|throw|finally|version|assert|unittest|with"
+ );
- this.normalizeRules();
+ var types = (
+ "auto|bool|char|dchar|wchar|byte|ubyte|float|double|real|" +
+ "cfloat|creal|cdouble|cent|ifloat|ireal|idouble|" +
+ "int|long|short|void|uint|ulong|ushort|ucent|" +
+ "function|delegate|string|wstring|dstring|size_t|ptrdiff_t|hash_t|Object"
+ );
+
+ var modifiers = (
+ "abstract|align|debug|deprecated|export|extern|const|final|in|inout|out|" +
+ "ref|immutable|lazy|nothrow|override|package|pragma|private|protected|" +
+ "public|pure|scope|shared|__gshared|synchronized|static|volatile"
+ );
+
+ var storages = (
+ "class|struct|union|template|interface|enum|macro"
+ );
+
+ var stringEscapesSeq = {
+ token: "constant.language.escape",
+ regex: "\\\\(?:(?:x[0-9A-F]{2})|(?:[0-7]{1,3})|(?:['\"\\?0abfnrtv\\\\])|" +
+ "(?:u[0-9a-fA-F]{4})|(?:U[0-9a-fA-F]{8}))"
+ };
+
+ var builtinConstants = (
+ "null|true|false|"+
+ "__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__|"+
+ "__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__"
+ );
+
+ var operators = (
+ "/|/\\=|&|&\\=|&&|\\|\\|\\=|\\|\\||\\-|\\-\\=|\\-\\-|\\+|" +
+ "\\+\\=|\\+\\+|\\<|\\<\\=|\\<\\<|\\<\\<\\=|\\<\\>|\\<\\>\\=|\\>|\\>\\=|\\>\\>\\=|" +
+ "\\>\\>\\>\\=|\\>\\>|\\>\\>\\>|\\!|\\!\\=|\\!\\<\\>|\\!\\<\\>\\=|\\!\\<|\\!\\<\\=|" +
+ "\\!\\>|\\!\\>\\=|\\?|\\$|\\=|\\=\\=|\\*|\\*\\=|%|%\\=|" +
+ "\\^|\\^\\=|\\^\\^|\\^\\^\\=|~|~\\=|\\=\\>|#"
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword.modifier" : modifiers,
+ "keyword.control" : keywordControls,
+ "keyword.type" : types,
+ "keyword": keywords,
+ "keyword.storage": storages,
+ "punctation": "\\.|\\,|;|\\.\\.|\\.\\.\\.",
+ "keyword.operator" : operators,
+ "constant.language": builtinConstants
+ }, "identifier");
+
+ var identifierRe = "[a-zA-Z_\u00a1-\uffff][a-zA-Z\\d_\u00a1-\uffff]*\\b";
+
+ this.$rules = {
+ "start" : [
+ { //-------------------------------------------------------- COMMENTS
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "star-comment"
+ }, {
+ token: "comment.shebang",
+ regex: "^\s*#!.*"
+ }, {
+ token : "comment",
+ regex : "\\/\\+",
+ next: "plus-comment"
+ }, { //-------------------------------------------------------- STRINGS
+ onMatch: function(value, currentState, state) {
+ state.unshift(this.next, value.substr(2));
+ return "string";
+ },
+ regex: 'q"(?:[\\[\\(\\{\\<]+)',
+ next: 'operator-heredoc-string'
+ }, {
+ onMatch: function(value, currentState, state) {
+ state.unshift(this.next, value.substr(2));
+ return "string";
+ },
+ regex: 'q"(?:[a-zA-Z_]+)$',
+ next: 'identifier-heredoc-string'
+ }, {
+ token : "string", // multi line string start
+ regex : '[xr]?"',
+ next : "quote-string"
+ }, {
+ token : "string", // multi line string start
+ regex : '[xr]?`',
+ next : "backtick-string"
+ }, {
+ token : "string", // single line
+ regex : "[xr]?['](?:(?:\\\\.)|(?:[^'\\\\]))*?['][cdw]?"
+ }, { //-------------------------------------------------------- RULES
+ token: ["keyword", "text", "paren.lparen"],
+ regex: /(asm)(\s*)({)/,
+ next: "d-asm"
+ }, {
+ token: ["keyword", "text", "paren.lparen", "constant.language"],
+ regex: "(__traits)(\\s*)(\\()("+identifierRe+")"
+ }, { // import|module abc
+ token: ["keyword", "text", "variable.module"],
+ regex: "(import|module)(\\s+)((?:"+identifierRe+"\\.?)*)"
+ }, { // storage Name
+ token: ["keyword.storage", "text", "entity.name.type"],
+ regex: "("+storages+")(\\s*)("+identifierRe+")"
+ }, { // alias|typedef foo bar;
+ token: ["keyword", "text", "variable.storage", "text"],
+ regex: "(alias|typedef)(\\s*)("+identifierRe+")(\\s*)"
+ }, { //-------------------------------------------------------- OTHERS
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F_]+(l|ul|u|f|F|L|U|UL)?\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d[\\d_]*(?:(?:\\.[\\d_]*)?(?:[eE][+-]?[\\d_]+)?)?(l|ul|u|f|F|L|U|UL)?\\b"
+ }, {
+ token: "entity.other.attribute-name",
+ regex: "@"+identifierRe
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : operators
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\.|\\:"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "star-comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken: 'comment'
+ }
+ ],
+ "plus-comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\+\\/",
+ next : "start"
+ }, {
+ defaultToken: 'comment'
+ }
+ ],
+
+ "quote-string" : [
+ stringEscapesSeq,
+ {
+ token : "string",
+ regex : '"[cdw]?',
+ next : "start"
+ }, {
+ defaultToken: 'string'
+ }
+ ],
+
+ "backtick-string" : [
+ stringEscapesSeq,
+ {
+ token : "string",
+ regex : '`[cdw]?',
+ next : "start"
+ }, {
+ defaultToken: 'string'
+ }
+ ],
+
+ "operator-heredoc-string": [
+ {
+ onMatch: function(value, currentState, state) {
+ value = value.substring(value.length-2, value.length-1);
+ var map = {'>':'<',']':'[',')':'(','}':'{'};
+ if(Object.keys(map).indexOf(value) != -1)
+ value = map[value];
+ if(value != state[1]) return "string";
+ state.shift();
+ state.shift();
+
+ return "string";
+ },
+ regex: '(?:[\\]\\)}>]+)"',
+ next: 'start'
+ }, {
+ token: 'string',
+ regex: '[^\\]\\)}>]+'
+ }
+ ],
+
+ "identifier-heredoc-string": [
+ {
+ onMatch: function(value, currentState, state) {
+ value = value.substring(0, value.length-1);
+ if(value != state[1]) return "string";
+ state.shift();
+ state.shift();
+
+ return "string";
+ },
+ regex: '^(?:[A-Za-z_][a-zA-Z0-9]+)"',
+ next: 'start'
+ }, {
+ token: 'string',
+ regex: '[^\\]\\)}>]+'
+ }
+ ],
+
+ "d-asm": [
+ {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: 'keyword.instruction',
+ regex: '[a-zA-Z]+',
+ next: 'd-asm-instruction'
+ }, {
+ token: "text",
+ regex: "\\s+"
+ }
+ ],
+ 'd-asm-instruction': [
+ {
+ token: 'constant.language',
+ regex: /AL|AH|AX|EAX|BL|BH|BX|EBX|CL|CH|CX|ECX|DL|DH|DX|EDX|BP|EBP|SP|ESP|DI|EDI|SI|ESI/i
+ }, {
+ token: 'identifier',
+ regex: '[a-zA-Z]+'
+ }, {
+ token: 'string',
+ regex: '".*"'
+ }, {
+ token: 'comment',
+ regex: '//.*$'
+ }, {
+ token: 'constant.numeric',
+ regex: '[0-9.xA-F]+'
+ }, {
+ token: 'punctuation.operator',
+ regex: '\\,'
+ }, {
+ token: 'punctuation.operator',
+ regex: ';',
+ next: 'd-asm'
+ }, {
+ token: 'text',
+ regex: '\\s+'
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
};
-DHighlightRules.metaData = { comment: 'D language',
+DHighlightRules.metaData = {
+ comment: 'D language',
fileTypes: [ 'd', 'di' ],
- firstLineMatch: '^#!.*\\bg?dmd\\b.',
+ firstLineMatch: '^#!.*\\b[glr]?dmd\\b.',
foldingStartMarker: '(?x)/\\*\\*(?!\\*)|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))',
foldingStopMarker: '(?<!\\*)\\*\\*/|^\\s*\\}',
keyEquivalent: '^~D',
name: 'D',
- scopeName: 'source.d' }
-
-
+ scopeName: 'source.d'
+};
oop.inherits(DHighlightRules, TextHighlightRules);
exports.DHighlightRules = DHighlightRules;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -353,23 +368,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -382,7 +429,84 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/d",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/d_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var DHighlightRules = require("./d_highlight_rules").DHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = DHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/d";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-dart.js b/js/vendor/ace/src-noconflict/mode-dart.js
index 3facdb7..6a238a0 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-dart.js
+++ b/js/vendor/ace/src-noconflict/mode-dart.js
@@ -1,145 +1,60 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/dart', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/c_cpp', 'ace/tokenizer', 'ace/mode/dart_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var CMode = require("./c_cpp").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var DartHighlightRules = require("./dart_highlight_rules").DartHighlightRules;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- CMode.call(this);
- var highlighter = new DartHighlightRules();
- this.foldingRules = new CStyleFoldMode();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
-};
-oop.inherits(Mode, CMode);
-
-(function() {
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/c_cpp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c_cpp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new c_cppHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- this.foldingRules = new CStyleFoldMode();
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
-}).call(Mode.prototype);
-exports.Mode = Mode;
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
});
-ace.define('ace/mode/c_cpp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b"
+var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"
var c_cppHighlightRules = function() {
@@ -151,12 +66,13 @@ var c_cppHighlightRules = function() {
var storageType = (
"asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
"_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
- "class|wchar_t|template"
+ "class|wchar_t|template|char16_t|char32_t"
);
var storageModifiers = (
- "const|extern|register|restrict|static|volatile|inline|private:|" +
- "protected:|public:|friend|explicit|virtual|export|mutable|typename"
+ "const|extern|register|restrict|static|volatile|inline|private|" +
+ "protected|public|friend|explicit|virtual|export|mutable|typename|" +
+ "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"
);
var keywordOperators = (
@@ -165,7 +81,7 @@ var c_cppHighlightRules = function() {
);
var builtinConstants = (
- "NULL|true|false|TRUE|FALSE"
+ "NULL|true|false|TRUE|FALSE|nullptr"
);
var keywordMapper = this.$keywords = this.createKeywordMapper({
@@ -179,11 +95,12 @@ var c_cppHighlightRules = function() {
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b";
- this.$rules = {
+ this.$rules = {
"start" : [
{
token : "comment",
- regex : "\\/\\/.*$"
+ regex : "//",
+ next : "singleLineComment"
},
DocCommentHighlightRules.getStartRule("doc-start"),
{
@@ -212,11 +129,11 @@ var c_cppHighlightRules = function() {
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
}, {
token : "keyword", // pre-compiler directives
- regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b",
+ regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
next : "directive"
}, {
token : "keyword", // special case pre-compiler directive
- regex : "(?:#\\s*endif)\\b"
+ regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
}, {
token : "support.function.C99.c",
regex : cFunctions
@@ -250,14 +167,26 @@ var c_cppHighlightRules = function() {
regex : ".+"
}
],
+ "singleLineComment" : [
+ {
+ token : "comment",
+ regex : /\\$/,
+ next : "singleLineComment"
+ }, {
+ token : "comment",
+ regex : /$/,
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ],
"qqstring" : [
{
token : "string",
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
next : "start"
}, {
- token : "string",
- regex : '.+'
+ defaultToken : "string"
}
],
"qstring" : [
@@ -266,8 +195,7 @@ var c_cppHighlightRules = function() {
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
next : "start"
}, {
- token : "string",
- regex : '.+'
+ defaultToken : "string"
}
],
"directive" : [
@@ -311,52 +239,8 @@ oop.inherits(c_cppHighlightRules, TextHighlightRules);
exports.c_cppHighlightRules = c_cppHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -395,8 +279,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -408,92 +292,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -508,6 +353,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -520,51 +366,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -573,6 +425,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -589,9 +442,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -601,15 +455,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -618,6 +470,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -634,9 +487,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -646,62 +500,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -713,13 +564,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -738,23 +656,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -767,26 +717,152 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = c_cppHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
-ace.define('ace/mode/dart_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/c_cpp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/dart_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var DartHighlightRules = function() {
var constantLanguage = "true|false|null";
var variableLanguage = "this|super";
- var keywordControl = "try|catch|finally|throw|break|case|continue|default|do|else|for|if|in|return|switch|while|new";
- var keywordDeclaration = "abstract|class|extends|external|factory|implements|get|native|operator|set|typedef";
+ var keywordControl = "try|catch|finally|throw|rethrow|assert|break|case|continue|default|do|else|for|if|in|return|switch|while|new|deferred|async|await";
+ var keywordDeclaration = "abstract|class|extends|external|factory|implements|get|native|operator|set|typedef|with|enum";
var storageModifier = "static|final|const";
- var storageType = "void|bool|num|int|double|Dynamic|var|String";
+ var storageType = "void|bool|num|int|double|dynamic|var|String";
var keywordMapper = this.createKeywordMapper({
"constant.language.dart": constantLanguage,
@@ -809,6 +885,7 @@ var DartHighlightRules = function() {
token : "comment",
regex : /\/\/.*$/
},
+ DocCommentHighlightRules.getStartRule("doc-start"),
{
token : "comment", // multi line comment
regex : /\/\*/,
@@ -820,7 +897,7 @@ var DartHighlightRules = function() {
},
{
token: "keyword.other.import.dart",
- regex: "(?:\\b)(?:library|import|source|part|of)(?:\\b)"
+ regex: "(?:\\b)(?:library|import|export|part|of|show|hide)(?:\\b)"
},
{
token : ["keyword.other.import.dart", "text"],
@@ -942,9 +1019,35 @@ var DartHighlightRules = function() {
}, stringfill]
}
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
};
oop.inherits(DartHighlightRules, TextHighlightRules);
exports.DartHighlightRules = DartHighlightRules;
});
+
+ace.define("ace/mode/dart",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/dart_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var CMode = require("./c_cpp").Mode;
+var DartHighlightRules = require("./dart_highlight_rules").DartHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ CMode.call(this);
+ this.HighlightRules = DartHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, CMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/dart";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-diff.js b/js/vendor/ace/src-noconflict/mode-diff.js
index 826d87c..ae878db 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-diff.js
+++ b/js/vendor/ace/src-noconflict/mode-diff.js
@@ -1,135 +1,82 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/diff', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/diff_highlight_rules', 'ace/mode/folding/diff'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HighlightRules = require("./diff_highlight_rules").DiffHighlightRules;
-var FoldMode = require("./folding/diff").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new HighlightRules().getRules());
- this.foldingRules = new FoldMode(["diff", "index", "\\+{3}", "@@|\\*{5}"], "i");
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/diff_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DiffHighlightRules = function() {
-
- this.$rules = {
- "start" : [{
- regex: "^(?:\\*{15}|={67}|-{3}|\\+{3})$",
- token: "punctuation.definition.separator.diff",
- "name": "keyword"
- }, { //diff.range.unified
- regex: "^(@@)(\\s*.+?\\s*)(@@)(.*)$",
- token: [
- "constant",
- "constant.numeric",
- "constant",
- "comment.doc.tag"
- ]
- }, { //diff.range.normal
- regex: "^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",
- token: [
- "constant.numeric",
- "punctuation.definition.range.diff",
- "constant.function",
- "constant.numeric",
- "punctuation.definition.range.diff",
- "invalid"
- ],
- "name": "meta."
- }, {
+ace.define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DiffHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [{
+ regex: "^(?:\\*{15}|={67}|-{3}|\\+{3})$",
+ token: "punctuation.definition.separator.diff",
+ "name": "keyword"
+ }, { //diff.range.unified
+ regex: "^(@@)(\\s*.+?\\s*)(@@)(.*)$",
+ token: [
+ "constant",
+ "constant.numeric",
+ "constant",
+ "comment.doc.tag"
+ ]
+ }, { //diff.range.normal
+ regex: "^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",
+ token: [
+ "constant.numeric",
+ "punctuation.definition.range.diff",
+ "constant.function",
+ "constant.numeric",
+ "punctuation.definition.range.diff",
+ "invalid"
+ ],
+ "name": "meta."
+ }, {
regex: "^(\\-{3}|\\+{3}|\\*{3})( .+)$",
token: [
- "constant.numeric",
- "meta.tag"
- ]
- }, { // added
- regex: "^([!+>])(.*?)(\\s*)$",
- token: [
- "support.constant",
- "text",
- "invalid"
- ]
- }, { // removed
- regex: "^([<\\-])(.*?)(\\s*)$",
- token: [
- "support.function",
- "string",
- "invalid"
- ]
- }, {
- regex: "^(diff)(\\s+--\\w+)?(.+?)( .+)?$",
- token: ["variable", "variable", "keyword", "variable"]
- }, {
- regex: "^Index.+$",
- token: "variable"
- }, {
+ "constant.numeric",
+ "meta.tag"
+ ]
+ }, { // added
+ regex: "^([!+>])(.*?)(\\s*)$",
+ token: [
+ "support.constant",
+ "text",
+ "invalid"
+ ]
+ }, { // removed
+ regex: "^([<\\-])(.*?)(\\s*)$",
+ token: [
+ "support.function",
+ "string",
+ "invalid"
+ ]
+ }, {
+ regex: "^(diff)(\\s+--\\w+)?(.+?)( .+)?$",
+ token: ["variable", "variable", "keyword", "variable"]
+ }, {
+ regex: "^Index.+$",
+ token: "variable"
+ }, {
regex: "^\\s+$",
token: "text"
- }, {
+ }, {
regex: "\\s*$",
token: "invalid"
}, {
defaultToken: "invisible",
caseInsensitive: true
- }
- ]
- };
-};
-
-oop.inherits(DiffHighlightRules, TextHighlightRules);
-
-exports.DiffHighlightRules = DiffHighlightRules;
-});
+ }
+ ]
+ };
+};
+
+oop.inherits(DiffHighlightRules, TextHighlightRules);
-ace.define('ace/mode/folding/diff', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+exports.DiffHighlightRules = DiffHighlightRules;
+});
+ace.define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -167,3 +114,26 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/diff_highlight_rules","ace/mode/folding/diff"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var HighlightRules = require("./diff_highlight_rules").DiffHighlightRules;
+var FoldMode = require("./folding/diff").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HighlightRules;
+ this.foldingRules = new FoldMode(["diff", "index", "\\+{3}", "@@|\\*{5}"], "i");
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.$id = "ace/mode/diff";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-django.js b/js/vendor/ace/src-noconflict/mode-django.js
index 538724d..f0b8e07 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-django.js
+++ b/js/vendor/ace/src-noconflict/mode-django.js
@@ -1,262 +1,61 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/django', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var HtmlMode = require("./html").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var DjangoHighlightRules = function(){
+var DocCommentHighlightRules = function() {
this.$rules = {
- 'start': [{
- token: "string",
- regex: '".*?"'
- }, {
- token: "string",
- regex: "'.*?'"
- }, {
- token: "constant",
- regex: '[0-9]+'
- }, {
- token: "variable",
- regex: "[-_a-zA-Z0-9:]+"
- }],
- 'comment': [{
- token : "comment.block",
- merge: true,
- regex : ".+?"
- }],
- 'tag': [{
- token: "entity.name.function",
- regex: "[a-zA-Z][_a-zA-Z0-9]*",
- next: "start"
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
}]
};
};
-oop.inherits(DjangoHighlightRules, TextHighlightRules)
-
-var DjangoHtmlHighlightRules = function() {
- this.$rules = new HtmlHighlightRules().getRules();
-
- for (var i in this.$rules) {
- this.$rules[i].unshift({
- token: "comment.line",
- regex: "\\{#.*?#\\}"
- }, {
- token: "comment.block",
- regex: "\\{\\%\\s*comment\\s*\\%\\}",
- merge: true,
- next: "django-comment"
- }, {
- token: "constant.language",
- regex: "\\{\\{",
- next: "django-start"
- }, {
- token: "constant.language",
- regex: "\\{\\%",
- next: "django-tag"
- });
- this.embedRules(DjangoHighlightRules, "django-", [{
- token: "comment.block",
- regex: "\\{\\%\\s*endcomment\\s*\\%\\}",
- merge: true,
- next: "start"
- }, {
- token: "constant.language",
- regex: "\\%\\}",
- next: "start"
- }, {
- token: "constant.language",
- regex: "\\}\\}",
- next: "start"
- }]);
- }
-};
-
-oop.inherits(DjangoHtmlHighlightRules, HtmlHighlightRules);
-
-var Mode = function() {
- var highlighter = new DjangoHtmlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$embeds = highlighter.getEmbeds();
-};
-oop.inherits(Mode, HtmlMode);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-
-var Mode = function() {
- var highlighter = new HtmlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$behaviour = new HtmlBehaviour();
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.blockComment = {start: "<!--", end: "-->"};
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return false;
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-}).call(Mode.prototype);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -377,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -403,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -441,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -466,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -500,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -548,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -558,52 +400,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -642,8 +440,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -655,92 +453,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -755,6 +514,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -767,51 +527,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -820,6 +586,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -836,9 +603,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -848,15 +616,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -865,6 +631,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -881,9 +648,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -893,62 +661,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -960,13 +725,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -985,23 +817,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -1014,48 +878,118 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
- var highlighter = new CssHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.HighlightRules = JavaScriptHighlightRules;
+
this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CssBehaviour();
- this.$keywordList = highlighter.$keywordList;
+ this.$behaviour = new CstyleBehaviour();
this.foldingRules = new CStyleFoldMode();
};
oop.inherits(Mode, TextMode);
(function() {
- this.foldingRules = "cStyle";
+ this.lineCommentStart = "//";
this.blockComment = {start: "/*", end: "*/"};
this.getNextLineIndent = function(state, line, tab) {
var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
if (tokens.length && tokens[tokens.length-1].type == "comment") {
return indent;
}
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
}
return indent;
@@ -1070,11 +1004,11 @@ oop.inherits(Mode, TextMode);
};
this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
worker.attachToDocument(session.getDocument());
- worker.on("csslint", function(e) {
- session.setAnnotations(e.data);
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
});
worker.on("terminate", function() {
@@ -1084,23 +1018,23 @@ oop.inherits(Mode, TextMode);
return worker;
};
+ this.$id = "ace/mode/javascript";
}).call(Mode.prototype);
exports.Mode = Mode;
-
});
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -1234,8 +1168,8 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -1313,160 +1247,152 @@ oop.inherits(CssBehaviour, CstyleBehaviour);
exports.CssBehaviour = CssBehaviour;
});
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
+(function() {
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
-};
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+ return indent;
+ };
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -1474,75 +1400,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}, {
- include : "string"
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -1555,18 +1491,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -1574,14 +1509,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -1593,258 +1528,253 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
};
-});
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
-var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var Behaviour = require("../behaviour").Behaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
+var lang = require("../../lib/lang");
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
-var HtmlBehaviour = function () {
+var XmlBehaviour = function () {
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
var token = iterator.getCurrentToken();
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var element = token.value;
- if (atCursor){
- var element = element.substring(0, position.column - token.start);
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
}
- if (voidElements.indexOf(element) !== -1){
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
}
- return {
- text: '>' + '</' + element + '>',
- selection: [1, 1]
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
}
}
});
-}
-oop.inherits(HtmlBehaviour, XmlBehaviour);
-
-exports.HtmlBehaviour = HtmlBehaviour;
-});
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
});
- return hasType;
-}
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
if (text == '>') {
var position = editor.getCursorPosition();
var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
+ if (is(token, "reference.attribute-value"))
return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
}
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
}
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
return {
- text: '>' + '</' + tag + '>',
+ text: ">" + "</" + element + ">",
selection: [1, 1]
- }
+ };
}
});
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
if (text == "\n") {
var cursor = editor.getCursorPosition();
var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
}
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-exports.XmlBehaviour = XmlBehaviour;
-});
+ if (!token) {
+ return;
+ }
-ace.define('ace/mode/folding/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
-var oop = require("../../lib/oop");
-var MixedFoldMode = require("./mixed").FoldMode;
-var XmlFoldMode = require("./xml").FoldMode;
-var CStyleFoldMode = require("./cstyle").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
- "js-": new CStyleFoldMode(),
- "css-": new CStyleFoldMode()
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
});
+
};
-oop.inherits(FoldMode, MixedFoldMode);
+oop.inherits(XmlBehaviour, Behaviour);
+exports.XmlBehaviour = XmlBehaviour;
});
-ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -1897,8 +1827,8 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var lang = require("../../lib/lang");
@@ -1906,91 +1836,118 @@ var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var FoldMode = exports.FoldMode = function(voidElements) {
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
BaseFoldMode.call(this);
this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
};
oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
(function() {
this.getFoldWidget = function(session, foldStyle, row) {
var tag = this._getFirstTagInLine(session, row);
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ if (!tag)
return "";
- if (tag.selfClosing)
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
return "";
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
return "";
return "start";
};
-
this._getFirstTagInLine = function(session, row) {
var tokens = session.getTokens(row);
- var value = "";
+ var tag = new Tag();
+
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
- if (token.type.lastIndexOf("meta.tag", 0) === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
}
-
- return this._parseTag(value);
+
+ return null;
};
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = tag.match(this.tagRe);
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
var column = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
};
this._readTagForward = function(iterator) {
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var start;
-
+
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
}
} while(token = iterator.stepForward());
-
+
return null;
};
@@ -1998,32 +1955,24 @@ oop.inherits(FoldMode, BaseFoldMode);
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var end;
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
}
} while(token = iterator.stepBackward());
-
+
return null;
};
@@ -2034,10 +1983,7 @@ oop.inherits(FoldMode, BaseFoldMode);
if (!tag || top.tagName == tag.tagName) {
return stack.pop();
}
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
stack.pop();
continue;
} else {
@@ -2049,7 +1995,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.getFoldWidgetRange = function(session, foldStyle, row) {
var firstTag = this._getFirstTagInLine(session, row);
- if (!firstTag.match)
+ if (!firstTag)
return null;
var isBackward = firstTag.closing || firstTag.selfClosing;
@@ -2057,11 +2003,13 @@ oop.inherits(FoldMode, BaseFoldMode);
var tag;
if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
var start = {
row: row,
- column: firstTag.column + firstTag.tagName.length + 2
+ column: firstTag.start.column + firstTag.tagName.length + 2
};
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
while (tag = this._readTagForward(iterator)) {
if (tag.selfClosing) {
if (!stack.length) {
@@ -2078,15 +2026,15 @@ oop.inherits(FoldMode, BaseFoldMode);
return Range.fromPoints(start, tag.start);
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
var end = {
row: row,
- column: firstTag.column
+ column: firstTag.start.column
};
while (tag = this._readTagBackward(iterator)) {
@@ -2103,11 +2051,13 @@ oop.inherits(FoldMode, BaseFoldMode);
this._pop(stack, tag);
if (stack.length == 0) {
tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
return Range.fromPoints(tag.start, end);
}
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
@@ -2117,3 +2067,459 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/django",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DjangoHighlightRules = function(){
+ this.$rules = {
+ 'start': [{
+ token: "string",
+ regex: '".*?"'
+ }, {
+ token: "string",
+ regex: "'.*?'"
+ }, {
+ token: "constant",
+ regex: '[0-9]+'
+ }, {
+ token: "variable",
+ regex: "[-_a-zA-Z0-9:]+"
+ }],
+ 'comment': [{
+ token : "comment.block",
+ merge: true,
+ regex : ".+?"
+ }],
+ 'tag': [{
+ token: "entity.name.function",
+ regex: "[a-zA-Z][_a-zA-Z0-9]*",
+ next: "start"
+ }]
+ };
+};
+
+oop.inherits(DjangoHighlightRules, TextHighlightRules)
+
+var DjangoHtmlHighlightRules = function() {
+ this.$rules = new HtmlHighlightRules().getRules();
+
+ for (var i in this.$rules) {
+ this.$rules[i].unshift({
+ token: "comment.line",
+ regex: "\\{#.*?#\\}"
+ }, {
+ token: "comment.block",
+ regex: "\\{\\%\\s*comment\\s*\\%\\}",
+ merge: true,
+ next: "django-comment"
+ }, {
+ token: "constant.language",
+ regex: "\\{\\{",
+ next: "django-start"
+ }, {
+ token: "constant.language",
+ regex: "\\{\\%",
+ next: "django-tag"
+ });
+ this.embedRules(DjangoHighlightRules, "django-", [{
+ token: "comment.block",
+ regex: "\\{\\%\\s*endcomment\\s*\\%\\}",
+ merge: true,
+ next: "start"
+ }, {
+ token: "constant.language",
+ regex: "\\%\\}",
+ next: "start"
+ }, {
+ token: "constant.language",
+ regex: "\\}\\}",
+ next: "start"
+ }]);
+ }
+};
+
+oop.inherits(DjangoHtmlHighlightRules, HtmlHighlightRules);
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = DjangoHtmlHighlightRules;
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.$id = "ace/mode/django";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-dockerfile.js b/js/vendor/ace/src-noconflict/mode-dockerfile.js
new file mode 100755
index 0000000..3efd7a5
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-dockerfile.js
@@ -0,0 +1,803 @@
+ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var reservedKeywords = exports.reservedKeywords = (
+ '!|{|}|case|do|done|elif|else|'+
+ 'esac|fi|for|if|in|then|until|while|'+
+ '&|;|export|local|read|typeset|unset|'+
+ 'elif|select|set'
+ );
+
+var languageConstructs = exports.languageConstructs = (
+ '[|]|alias|bg|bind|break|builtin|'+
+ 'cd|command|compgen|complete|continue|'+
+ 'dirs|disown|echo|enable|eval|exec|'+
+ 'exit|fc|fg|getopts|hash|help|history|'+
+ 'jobs|kill|let|logout|popd|printf|pushd|'+
+ 'pwd|return|set|shift|shopt|source|'+
+ 'suspend|test|times|trap|type|ulimit|'+
+ 'umask|unalias|wait'
+);
+
+var ShHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": reservedKeywords,
+ "support.function.builtin": languageConstructs,
+ "invalid.deprecated": "debugger"
+ }, "identifier");
+
+ var integer = "(?:(?:[1-9]\\d*)|(?:0))";
+
+ var fraction = "(?:\\.\\d+)";
+ var intPart = "(?:\\d+)";
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
+ var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")";
+ var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
+ var fileDescriptor = "(?:&" + intPart + ")";
+
+ var variableName = "[a-zA-Z_][a-zA-Z0-9_]*";
+ var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))";
+
+ var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))";
+
+ var func = "(?:" + variableName + "\\s*\\(\\))";
+
+ this.$rules = {
+ "start" : [{
+ token : "constant",
+ regex : /\\./
+ }, {
+ token : ["text", "comment"],
+ regex : /(^|\s)(#.*)$/
+ }, {
+ token : "string",
+ regex : '"',
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/
+ }, {
+ token : "constant",
+ regex : /\$\w+/
+ }, {
+ token : "string",
+ regex : '"',
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ regex : "<<<",
+ token : "keyword.operator"
+ }, {
+ stateName: "heredoc",
+ regex : "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",
+ onMatch : function(value, currentState, stack) {
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
+ var tokens = value.split(this.splitRegex);
+ stack.push(next, tokens[4]);
+ return [
+ {type:"constant", value: tokens[1]},
+ {type:"text", value: tokens[2]},
+ {type:"string", value: tokens[3]},
+ {type:"support.class", value: tokens[4]},
+ {type:"string", value: tokens[5]}
+ ];
+ },
+ rules: {
+ heredoc: [{
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }],
+ indentedHeredoc: [{
+ token: "string",
+ regex: "^\t+"
+ }, {
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }]
+ }
+ }, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
+ token : "variable.language",
+ regex : builtinVariable
+ }, {
+ token : "variable",
+ regex : variable
+ }, {
+ token : "support.function",
+ regex : func
+ }, {
+ token : "support.function",
+ regex : fileDescriptor
+ }, {
+ token : "string", // ' string
+ start : "'", end : "'"
+ }, {
+ token : "constant.numeric", // float
+ regex : floatNumber
+ }, {
+ token : "constant.numeric", // integer
+ regex : integer + "\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]\\)\\}]"
+ } ]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(ShHighlightRules, TextHighlightRules);
+
+exports.ShHighlightRules = ShHighlightRules;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules;
+var Range = require("../range").Range;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+
+var Mode = function() {
+ this.HighlightRules = ShHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+ this.$behaviour = new CstyleBehaviour();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ var outdents = {
+ "pass": 1,
+ "return": 1,
+ "raise": 1,
+ "break": 1,
+ "continue": 1
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input !== "\r\n" && input !== "\r" && input !== "\n")
+ return false;
+
+ var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens)
+ return false;
+ do {
+ var last = tokens.pop();
+ } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
+
+ if (!last)
+ return false;
+
+ return (last.type == "keyword" && outdents[last.value]);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+
+ row += 1;
+ var indent = this.$getIndent(doc.getLine(row));
+ var tab = doc.getTabString();
+ if (indent.slice(-tab.length) == tab)
+ doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ };
+
+ this.$id = "ace/mode/sh";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/dockerfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/sh_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules;
+
+var DockerfileHighlightRules = function() {
+ ShHighlightRules.call(this);
+
+ var startRules = this.$rules.start;
+ for (var i = 0; i < startRules.length; i++) {
+ if (startRules[i].token == "variable.language") {
+ startRules.splice(i, 0, {
+ token: "constant.language",
+ regex: "(?:^(?:FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD|COPY)\\b)",
+ caseInsensitive: true
+ });
+ break;
+ }
+ }
+
+};
+
+oop.inherits(DockerfileHighlightRules, ShHighlightRules);
+
+exports.DockerfileHighlightRules = DockerfileHighlightRules;
+});
+
+ace.define("ace/mode/dockerfile",["require","exports","module","ace/lib/oop","ace/mode/sh","ace/mode/dockerfile_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var ShMode = require("./sh").Mode;
+var DockerfileHighlightRules = require("./dockerfile_highlight_rules").DockerfileHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ ShMode.call(this);
+
+ this.HighlightRules = DockerfileHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, ShMode);
+
+(function() {
+ this.$id = "ace/mode/dockerfile";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-dot.js b/js/vendor/ace/src-noconflict/mode-dot.js
index f08a66f..9803009 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-dot.js
+++ b/js/vendor/ace/src-noconflict/mode-dot.js
@@ -1,62 +1,5 @@
-ace.define('ace/mode/dot', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/matching_brace_outdent', 'ace/mode/dot_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var DotHighlightRules = require("./dot_highlight_rules").DotHighlightRules;
-var DotFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new DotHighlightRules();
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new DotFoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = ["//", "#"];
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -94,8 +37,59 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/dot_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/doc_comment_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/dot_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -221,52 +215,8 @@ exports.DotHighlightRules = DotHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -285,23 +235,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -314,7 +296,117 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/dot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matching_brace_outdent","ace/mode/dot_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var DotHighlightRules = require("./dot_highlight_rules").DotHighlightRules;
+var DotFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = DotHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new DotFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ["//", "#"];
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/dot";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-eiffel.js b/js/vendor/ace/src-noconflict/mode-eiffel.js
new file mode 100755
index 0000000..3180529
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-eiffel.js
@@ -0,0 +1,128 @@
+ace.define("ace/mode/eiffel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var EiffelHighlightRules = function() {
+ var keywords = "across|agent|alias|all|attached|as|assign|attribute|check|" +
+ "class|convert|create|debug|deferred|detachable|do|else|elseif|end|" +
+ "ensure|expanded|export|external|feature|from|frozen|if|inherit|" +
+ "inspect|invariant|like|local|loop|not|note|obsolete|old|once|" +
+ "Precursor|redefine|rename|require|rescue|retry|select|separate|" +
+ "some|then|undefine|until|variant|when";
+
+ var operatorKeywords = "and|implies|or|xor";
+
+ var languageConstants = "Void";
+
+ var booleanConstants = "True|False";
+
+ var languageVariables = "Current|Result";
+
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language": languageConstants,
+ "constant.language.boolean": booleanConstants,
+ "variable.language": languageVariables,
+ "keyword.operator": operatorKeywords,
+ "keyword": keywords
+ }, "identifier", true);
+
+ var simpleString = /(?:[^"%\b\f\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)+?/;
+
+ this.$rules = {
+ "start": [{
+ token : "string.quoted.other", // Aligned-verbatim-strings (verbatim option not supported)
+ regex : /"\[/,
+ next: "aligned_verbatim_string"
+ }, {
+ token : "string.quoted.other", // Non-aligned-verbatim-strings (verbatim option not supported)
+ regex : /"\{/,
+ next: "non-aligned_verbatim_string"
+ }, {
+ token : "string.quoted.double",
+ regex : /"(?:[^%\b\f\n\r\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)*?"/
+ }, {
+ token : "comment.line.double-dash",
+ regex : /--.*/
+ }, {
+ token : "constant.character",
+ regex : /'(?:[^%\b\f\n\r\t\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)'/
+ }, {
+ token : "constant.numeric", // hexa | octal | bin
+ regex : /\b0(?:[xX][\da-fA-F](?:_*[\da-fA-F])*|[cC][0-7](?:_*[0-7])*|[bB][01](?:_*[01])*)\b/
+ }, {
+ token : "constant.numeric",
+ regex : /(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]|<<|\|\(/
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]|>>|\|\)/
+ }, {
+ token : "keyword.operator", // punctuation
+ regex : /:=|->|\.(?=\w)|[;,:?]/
+ }, {
+ token : "keyword.operator",
+ regex : /\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~]/
+ }, {
+ token : function (v) {
+ var result = keywordMapper (v);
+ if (result === "identifier" && v === v.toUpperCase ()) {
+ result = "entity.name.type";
+ }
+ return result;
+ },
+ regex : /[a-zA-Z][a-zA-Z\d_]*\b/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "aligned_verbatim_string" : [{
+ token : "string",
+ regex : /]"/,
+ next : "start"
+ }, {
+ token : "string",
+ regex : simpleString
+ }
+ ],
+ "non-aligned_verbatim_string" : [{
+ token : "string.quoted.other",
+ regex : /}"/,
+ next : "start"
+ }, {
+ token : "string.quoted.other",
+ regex : simpleString
+ }
+ ]};
+};
+
+oop.inherits(EiffelHighlightRules, TextHighlightRules);
+
+exports.EiffelHighlightRules = EiffelHighlightRules;
+});
+
+ace.define("ace/mode/eiffel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/eiffel_highlight_rules","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var EiffelHighlightRules = require("./eiffel_highlight_rules").EiffelHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = EiffelHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.$id = "ace/mode/eiffel";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-ejs.js b/js/vendor/ace/src-noconflict/mode-ejs.js
index ce913e7..221b748 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-ejs.js
+++ b/js/vendor/ace/src-noconflict/mode-ejs.js
@@ -1,219 +1,14 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-ace.define('ace/mode/ejs', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/tokenizer', 'ace/mode/html', 'ace/mode/javascript', 'ace/mode/css', 'ace/mode/ruby'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-
-var EjsHighlightRules = function(start, end) {
- HtmlHighlightRules.call(this);
-
- if (!start)
- start = "(?:<%|<\\?|{{)";
- if (!end)
- end = "(?:%>|\\?>|}})";
-
- for (var i in this.$rules) {
- this.$rules[i].unshift({
- token : "markup.list.meta.tag",
- regex : start + "(?![>}])[-=]?",
- push : "ejs-start"
- });
- }
-
- this.embedRules(JavaScriptHighlightRules, "ejs-");
-
- this.$rules["ejs-start"].unshift({
- token : "markup.list.meta.tag",
- regex : "-?" + end,
- next : "pop"
- }, {
- token: "comment",
- regex: "//.*?" + end,
- next: "pop"
- });
-
- this.$rules["ejs-no_regex"].unshift({
- token : "markup.list.meta.tag",
- regex : "-?" + end,
- next : "pop"
- }, {
- token: "comment",
- regex: "//.*?" + end,
- next: "pop"
- });
-
- this.normalizeRules();
-};
-
-
-oop.inherits(EjsHighlightRules, HtmlHighlightRules);
-
-exports.EjsHighlightRules = EjsHighlightRules;
-
-
-var oop = require("../lib/oop");
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlMode = require("./html").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var RubyMode = require("./ruby").Mode;
-
-var Mode = function() {
- HtmlMode.call(this);
- var highlighter = new EjsHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode,
- "ejs-": JavaScriptMode
- });
-};
-oop.inherits(Mode, HtmlMode);
-
-(function() {
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
-
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
-
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
-
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
-
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
-};
-
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
-
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -347,14 +142,64 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -475,23 +320,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -501,10 +349,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -539,14 +383,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -564,7 +408,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -598,20 +442,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -646,9 +494,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -656,111 +544,83 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -768,75 +628,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}, {
- include : "string"
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -849,18 +719,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -868,14 +737,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -887,211 +756,90 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
-
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-
-ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(require, exports, module) {
-
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-
-var Mode = function() {
- var highlighter = new HtmlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$behaviour = new HtmlBehaviour();
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.blockComment = {start: "<!--", end: "-->"};
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
- this.checkOutdent = function(state, line, input) {
- return false;
- };
-
-}).call(Mode.prototype);
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-exports.Mode = Mode;
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
});
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-exports.Mode = Mode;
+exports.HtmlHighlightRules = HtmlHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -1130,8 +878,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -1143,92 +891,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -1243,6 +952,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -1255,51 +965,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -1308,6 +1024,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -1324,9 +1041,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -1336,15 +1054,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -1353,6 +1069,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -1369,9 +1086,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -1381,62 +1099,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -1448,13 +1163,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -1473,23 +1255,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -1502,48 +1316,118 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
- var highlighter = new CssHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.HighlightRules = JavaScriptHighlightRules;
+
this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CssBehaviour();
- this.$keywordList = highlighter.$keywordList;
+ this.$behaviour = new CstyleBehaviour();
this.foldingRules = new CStyleFoldMode();
};
oop.inherits(Mode, TextMode);
(function() {
- this.foldingRules = "cStyle";
+ this.lineCommentStart = "//";
this.blockComment = {start: "/*", end: "*/"};
this.getNextLineIndent = function(state, line, tab) {
var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
if (tokens.length && tokens[tokens.length-1].type == "comment") {
return indent;
}
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
}
return indent;
@@ -1558,11 +1442,11 @@ oop.inherits(Mode, TextMode);
};
this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
worker.attachToDocument(session.getDocument());
- worker.on("csslint", function(e) {
- session.setAnnotations(e.data);
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
});
worker.on("terminate", function() {
@@ -1572,14 +1456,14 @@ oop.inherits(Mode, TextMode);
return worker;
};
+ this.$id = "ace/mode/javascript";
}).call(Mode.prototype);
exports.Mode = Mode;
-
});
-ace.define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -1657,188 +1541,240 @@ oop.inherits(CssBehaviour, CstyleBehaviour);
exports.CssBehaviour = CssBehaviour;
});
-ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
-var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var Behaviour = require("../behaviour").Behaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
+var lang = require("../../lib/lang");
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
-var HtmlBehaviour = function () {
+var XmlBehaviour = function () {
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
var token = iterator.getCurrentToken();
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var element = token.value;
- if (atCursor){
- var element = element.substring(0, position.column - token.start);
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
}
- if (voidElements.indexOf(element) !== -1){
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
}
- return {
- text: '>' + '</' + element + '>',
- selection: [1, 1]
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
}
}
});
-}
-oop.inherits(HtmlBehaviour, XmlBehaviour);
-
-exports.HtmlBehaviour = HtmlBehaviour;
-});
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
});
- return hasType;
-}
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
if (text == '>') {
var position = editor.getCursorPosition();
var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
+ if (is(token, "reference.attribute-value"))
return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
}
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
}
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
return {
- text: '>' + '</' + tag + '>',
+ text: ">" + "</" + element + ">",
selection: [1, 1]
- }
+ };
}
});
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
if (text == "\n") {
var cursor = editor.getCursorPosition();
var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
}
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-exports.XmlBehaviour = XmlBehaviour;
-});
-
-ace.define('ace/mode/folding/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+ if (!token) {
+ return;
+ }
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
-var oop = require("../../lib/oop");
-var MixedFoldMode = require("./mixed").FoldMode;
-var XmlFoldMode = require("./xml").FoldMode;
-var CStyleFoldMode = require("./cstyle").FoldMode;
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
- "js-": new CStyleFoldMode(),
- "css-": new CStyleFoldMode()
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
});
+
};
-oop.inherits(FoldMode, MixedFoldMode);
+oop.inherits(XmlBehaviour, Behaviour);
+exports.XmlBehaviour = XmlBehaviour;
});
-ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -1891,8 +1827,8 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var lang = require("../../lib/lang");
@@ -1900,91 +1836,118 @@ var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var FoldMode = exports.FoldMode = function(voidElements) {
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
BaseFoldMode.call(this);
this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
};
oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
(function() {
this.getFoldWidget = function(session, foldStyle, row) {
var tag = this._getFirstTagInLine(session, row);
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ if (!tag)
return "";
- if (tag.selfClosing)
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
return "";
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
return "";
return "start";
};
-
this._getFirstTagInLine = function(session, row) {
var tokens = session.getTokens(row);
- var value = "";
+ var tag = new Tag();
+
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
- if (token.type.lastIndexOf("meta.tag", 0) === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
}
-
- return this._parseTag(value);
+
+ return null;
};
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = tag.match(this.tagRe);
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
var column = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
};
this._readTagForward = function(iterator) {
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var start;
-
+
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
}
} while(token = iterator.stepForward());
-
+
return null;
};
@@ -1992,32 +1955,24 @@ oop.inherits(FoldMode, BaseFoldMode);
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var end;
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
}
} while(token = iterator.stepBackward());
-
+
return null;
};
@@ -2028,10 +1983,7 @@ oop.inherits(FoldMode, BaseFoldMode);
if (!tag || top.tagName == tag.tagName) {
return stack.pop();
}
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
stack.pop();
continue;
} else {
@@ -2043,7 +1995,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.getFoldWidgetRange = function(session, foldStyle, row) {
var firstTag = this._getFirstTagInLine(session, row);
- if (!firstTag.match)
+ if (!firstTag)
return null;
var isBackward = firstTag.closing || firstTag.selfClosing;
@@ -2051,11 +2003,13 @@ oop.inherits(FoldMode, BaseFoldMode);
var tag;
if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
var start = {
row: row,
- column: firstTag.column + firstTag.tagName.length + 2
+ column: firstTag.start.column + firstTag.tagName.length + 2
};
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
while (tag = this._readTagForward(iterator)) {
if (tag.selfClosing) {
if (!stack.length) {
@@ -2072,15 +2026,15 @@ oop.inherits(FoldMode, BaseFoldMode);
return Range.fromPoints(start, tag.start);
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
var end = {
row: row,
- column: firstTag.column
+ column: firstTag.start.column
};
while (tag = this._readTagBackward(iterator)) {
@@ -2097,11 +2051,13 @@ oop.inherits(FoldMode, BaseFoldMode);
this._pop(stack, tag);
if (stack.length == 0) {
tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
return Range.fromPoints(tag.start, end);
}
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
@@ -2112,73 +2068,374 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/ruby', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ruby_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/folding/coffee'], function(require, exports, module) {
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var FoldMode = require("./folding/coffee").FoldMode;
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
-var Mode = function() {
- var highlighter = new RubyHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new FoldMode();
};
-oop.inherits(Mode, TextMode);
(function() {
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
- this.lineCommentStart = "#";
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
+ return [];
+ };
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
}
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- var startingClassOrMethod = line.match(/^\s*(class|def)\s.*$/);
- var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
- var startingConditional = line.match(/^\s*(if|else)\s*/)
- if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
- indent += tab;
- }
- }
+}).call(HtmlCompletions.prototype);
- return indent;
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
};
this.checkOutdent = function(state, line, input) {
- return /^\s+end$/.test(line + input) || /^\s+}$/.test(line + input) || /^\s+else$/.test(line + input);
+ return false;
};
- this.autoOutdent = function(state, doc, row) {
- var indent = this.$getIndent(doc.getLine(row));
- var tab = doc.getTabString();
- if (indent.slice(-tab.length) == tab)
- doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
};
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
}).call(Mode.prototype);
exports.Mode = Mode;
});
-ace.define('ace/mode/ruby_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -2285,9 +2542,70 @@ var RubyHighlightRules = function() {
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
},
- qString,
- qqString,
- tString,
+ [{
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren.lparen";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.start",
+ regex : /"/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /\#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /"/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /\#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /'/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\['\\]/
+ }, {
+ token : "string.end",
+ regex : /'/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
{
token : "text", // namespaces aren't symbols
@@ -2330,11 +2648,13 @@ var RubyHighlightRules = function() {
rules: {
heredoc: [{
onMatch: function(value, currentState, stack) {
- if (value == stack[1]) {
+ if (value === stack[1]) {
stack.shift();
stack.shift();
+ this.next = stack[0] || "start";
return "support.class";
}
+ this.next = "";
return "string";
},
regex: ".*$",
@@ -2345,11 +2665,13 @@ var RubyHighlightRules = function() {
regex: "^ +"
}, {
onMatch: function(value, currentState, stack) {
- if (value == stack[1]) {
+ if (value === stack[1]) {
stack.shift();
stack.shift();
+ this.next = stack[0] || "start";
return "support.class";
}
+ this.next = "";
return "string";
},
regex: ".*$",
@@ -2357,6 +2679,17 @@ var RubyHighlightRules = function() {
}]
}
}, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
+ token : "string.character",
+ regex : "\\B\\?."
+ }, {
token : "keyword.operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
}, {
@@ -2390,8 +2723,8 @@ oop.inherits(RubyHighlightRules, TextHighlightRules);
exports.RubyHighlightRules = RubyHighlightRules;
});
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -2476,3 +2809,153 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = RubyHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
+ var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
+ var startingConditional = line.match(/^\s*(if|else)\s*/)
+ if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, session, row) {
+ var line = session.getLine(row);
+ if (/}/.test(line))
+ return this.$outdent.autoOutdent(session, row);
+ var indent = this.$getIndent(line);
+ var prevLine = session.getLine(row - 1);
+ var prevIndent = this.$getIndent(prevLine);
+ var tab = session.getTabString();
+ if (prevIndent.length <= indent.length) {
+ if (indent.slice(-tab.length) == tab)
+ session.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ }
+ };
+
+ this.$id = "ace/mode/ruby";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/ejs",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules","ace/lib/oop","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+
+var EjsHighlightRules = function(start, end) {
+ HtmlHighlightRules.call(this);
+
+ if (!start)
+ start = "(?:<%|<\\?|{{)";
+ if (!end)
+ end = "(?:%>|\\?>|}})";
+
+ for (var i in this.$rules) {
+ this.$rules[i].unshift({
+ token : "markup.list.meta.tag",
+ regex : start + "(?![>}])[-=]?",
+ push : "ejs-start"
+ });
+ }
+
+ this.embedRules(JavaScriptHighlightRules, "ejs-");
+
+ this.$rules["ejs-start"].unshift({
+ token : "markup.list.meta.tag",
+ regex : "-?" + end,
+ next : "pop"
+ }, {
+ token: "comment",
+ regex: "//.*?" + end,
+ next: "pop"
+ });
+
+ this.$rules["ejs-no_regex"].unshift({
+ token : "markup.list.meta.tag",
+ regex : "-?" + end,
+ next : "pop"
+ }, {
+ token: "comment",
+ regex: "//.*?" + end,
+ next: "pop"
+ });
+
+ this.normalizeRules();
+};
+
+
+oop.inherits(EjsHighlightRules, HtmlHighlightRules);
+
+exports.EjsHighlightRules = EjsHighlightRules;
+
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var RubyMode = require("./ruby").Mode;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = EjsHighlightRules;
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode,
+ "ejs-": JavaScriptMode
+ });
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+
+ this.$id = "ace/mode/ejs";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-elixir.js b/js/vendor/ace/src-noconflict/mode-elixir.js
new file mode 100755
index 0000000..1e6d32b
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-elixir.js
@@ -0,0 +1,493 @@
+ace.define("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ElixirHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token:
+ [ 'meta.module.elixir',
+ 'keyword.control.module.elixir',
+ 'meta.module.elixir',
+ 'entity.name.type.module.elixir' ],
+ regex: '^(\\s*)(defmodule)(\\s+)((?:[A-Z]\\w*\\s*\\.\\s*)*[A-Z]\\w*)' },
+ { token: 'comment.documentation.heredoc',
+ regex: '@(?:module|type)?doc (?:~[a-z])?"""',
+ push:
+ [ { token: 'comment.documentation.heredoc',
+ regex: '\\s*"""',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'comment.documentation.heredoc' } ],
+ comment: '@doc with heredocs is treated as documentation' },
+ { token: 'comment.documentation.heredoc',
+ regex: '@(?:module|type)?doc ~[A-Z]"""',
+ push:
+ [ { token: 'comment.documentation.heredoc',
+ regex: '\\s*"""',
+ next: 'pop' },
+ { defaultToken: 'comment.documentation.heredoc' } ],
+ comment: '@doc with heredocs is treated as documentation' },
+ { token: 'comment.documentation.heredoc',
+ regex: '@(?:module|type)?doc (?:~[a-z])?\'\'\'',
+ push:
+ [ { token: 'comment.documentation.heredoc',
+ regex: '\\s*\'\'\'',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'comment.documentation.heredoc' } ],
+ comment: '@doc with heredocs is treated as documentation' },
+ { token: 'comment.documentation.heredoc',
+ regex: '@(?:module|type)?doc ~[A-Z]\'\'\'',
+ push:
+ [ { token: 'comment.documentation.heredoc',
+ regex: '\\s*\'\'\'',
+ next: 'pop' },
+ { defaultToken: 'comment.documentation.heredoc' } ],
+ comment: '@doc with heredocs is treated as documentation' },
+ { token: 'comment.documentation.false',
+ regex: '@(?:module|type)?doc false',
+ comment: '@doc false is treated as documentation' },
+ { token: 'comment.documentation.string',
+ regex: '@(?:module|type)?doc "',
+ push:
+ [ { token: 'comment.documentation.string',
+ regex: '"',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'comment.documentation.string' } ],
+ comment: '@doc with string is treated as documentation' },
+ { token: 'keyword.control.elixir',
+ regex: '\\b(?:do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!\\.)\\b(do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])' },
+ { token: 'keyword.operator.elixir',
+ regex: '\\b(?:and|not|or|when|xor|in|inlist|inbits)\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!\\.)\\b(and|not|or|when|xor|in|inlist|inbits)\\b',
+ comment: ' as above, just doesn\'t need a \'end\' and does a logic operation' },
+ { token: 'constant.language.elixir',
+ regex: '\\b(?:nil|true|false)\\b(?![?!])' },
+ { token: 'variable.language.elixir',
+ regex: '\\b__(?:CALLER|ENV|MODULE|DIR)__\\b(?![?!])' },
+ { token:
+ [ 'punctuation.definition.variable.elixir',
+ 'variable.other.readwrite.module.elixir' ],
+ regex: '(@)([a-zA-Z_]\\w*)' },
+ { token:
+ [ 'punctuation.definition.variable.elixir',
+ 'variable.other.anonymous.elixir' ],
+ regex: '(&)(\\d*)' },
+ { token: 'variable.other.constant.elixir',
+ regex: '\\b[A-Z]\\w*\\b' },
+ { token: 'constant.numeric.elixir',
+ regex: '\\b(?:0x[\\da-fA-F](?:_?[\\da-fA-F])*|\\d(?:_?\\d)*(?:\\.(?![^[:space:][:digit:]])(?:_?\\d)*)?(?:[eE][-+]?\\d(?:_?\\d)*)?|0b[01]+|0o[0-7]+)\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '\\b(0x\\h(?>_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0b[01]+|0o[0-7]+)\\b' },
+ { token: 'punctuation.definition.constant.elixir',
+ regex: ':\'',
+ push:
+ [ { token: 'punctuation.definition.constant.elixir',
+ regex: '\'',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'constant.other.symbol.single-quoted.elixir' } ] },
+ { token: 'punctuation.definition.constant.elixir',
+ regex: ':"',
+ push:
+ [ { token: 'punctuation.definition.constant.elixir',
+ regex: '"',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'constant.other.symbol.double-quoted.elixir' } ] },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '(?:\'\'\')',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?>\'\'\')',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '^\\s*\'\'\'',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'support.function.variable.quoted.single.heredoc.elixir' } ],
+ comment: 'Single-quoted heredocs' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\'',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'support.function.variable.quoted.single.elixir' } ],
+ comment: 'single quoted string (allows for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '(?:""")',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?>""")',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '^\\s*"""',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.quoted.double.heredoc.elixir' } ],
+ comment: 'Double-quoted heredocs' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '"',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.quoted.double.elixir' } ],
+ comment: 'double quoted string (allows for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z](?:""")',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '~[a-z](?>""")',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '^\\s*"""',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.quoted.double.heredoc.elixir' } ],
+ comment: 'Double-quoted heredocs sigils' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z]\\{',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\}[a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z]\\[',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\][a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z]\\<',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\>[a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z]\\(',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\)[a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z][^\\w]',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '[^\\w][a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z](?:""")',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '~[A-Z](?>""")',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '^\\s*"""',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'Double-quoted heredocs sigils' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z]\\{',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\}[a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z]\\[',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\][a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z]\\<',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\>[a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z]\\(',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\)[a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z][^\\w]',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '[^\\w][a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: ['punctuation.definition.constant.elixir', 'constant.other.symbol.elixir'],
+ regex: '(:)([a-zA-Z_][\\w@]*(?:[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(?:\\^\\^)?)',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!:)(:)(?>[a-zA-Z_][\\w@]*(?>[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)',
+ comment: 'symbols' },
+ { token: 'punctuation.definition.constant.elixir',
+ regex: '(?:[a-zA-Z_][\\w@]*(?:[?!])?):(?!:)',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?>[a-zA-Z_][\\w@]*(?>[?!])?)(:)(?!:)',
+ comment: 'symbols' },
+ { token:
+ [ 'punctuation.definition.comment.elixir',
+ 'comment.line.number-sign.elixir' ],
+ regex: '(#)(.*)' },
+ { token: 'constant.numeric.elixir',
+ regex: '\\?(?:\\\\(?:x[\\da-fA-F]{1,2}(?![\\da-fA-F])\\b|[^xMC])|[^\\s\\\\])',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!\\w)\\?(\\\\(x\\h{1,2}(?!\\h)\\b|[^xMC])|[^\\s\\\\])',
+ comment: '\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (3rd alternation = normal):\n\t\t\t?a ?A ?0 \n\t\t\t?* ?" ?( \n\t\t\t?. ?#\n\t\t\t\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t' },
+ { token: 'keyword.operator.assignment.augmented.elixir',
+ regex: '\\+=|\\-=|\\|\\|=|~=|&&=' },
+ { token: 'keyword.operator.comparison.elixir',
+ regex: '===?|!==?|<=?|>=?' },
+ { token: 'keyword.operator.bitwise.elixir',
+ regex: '\\|{3}|&{3}|\\^{3}|<{3}|>{3}|~{3}' },
+ { token: 'keyword.operator.logical.elixir',
+ regex: '!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b',
+ originalRegex: '(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b' },
+ { token: 'keyword.operator.arithmetic.elixir',
+ regex: '\\*|\\+|\\-|/' },
+ { token: 'keyword.operator.other.elixir',
+ regex: '\\||\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.|\\|>|~|=>' },
+ { token: 'keyword.operator.assignment.elixir', regex: '=' },
+ { token: 'punctuation.separator.other.elixir', regex: ':' },
+ { token: 'punctuation.separator.statement.elixir',
+ regex: '\\;' },
+ { token: 'punctuation.separator.object.elixir', regex: ',' },
+ { token: 'punctuation.separator.method.elixir', regex: '\\.' },
+ { token: 'punctuation.section.scope.elixir', regex: '\\{|\\}' },
+ { token: 'punctuation.section.array.elixir', regex: '\\[|\\]' },
+ { token: 'punctuation.section.function.elixir',
+ regex: '\\(|\\)' } ],
+ '#escaped_char':
+ [ { token: 'constant.character.escape.elixir',
+ regex: '\\\\(?:x[\\da-fA-F]{1,2}|.)' } ],
+ '#interpolated_elixir':
+ [ { token:
+ [ 'source.elixir.embedded.source',
+ 'source.elixir.embedded.source.empty' ],
+ regex: '(#\\{)(\\})' },
+ { todo:
+ { token: 'punctuation.section.embedded.elixir',
+ regex: '#\\{',
+ push:
+ [ { token: 'punctuation.section.embedded.elixir',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#nest_curly_and_self' },
+ { include: '$self' },
+ { defaultToken: 'source.elixir.embedded.source' } ] } } ],
+ '#nest_curly_and_self':
+ [ { token: 'punctuation.section.scope.elixir',
+ regex: '\\{',
+ push:
+ [ { token: 'punctuation.section.scope.elixir',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#nest_curly_and_self' } ] },
+ { include: '$self' } ],
+ '#regex_sub':
+ [ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { token:
+ [ 'punctuation.definition.arbitrary-repitition.elixir',
+ 'string.regexp.arbitrary-repitition.elixir',
+ 'string.regexp.arbitrary-repitition.elixir',
+ 'punctuation.definition.arbitrary-repitition.elixir' ],
+ regex: '(\\{)(\\d+)((?:,\\d+)?)(\\})' },
+ { token: 'punctuation.definition.character-class.elixir',
+ regex: '\\[(?:\\^?\\])?',
+ push:
+ [ { token: 'punctuation.definition.character-class.elixir',
+ regex: '\\]',
+ next: 'pop' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.regexp.character-class.elixir' } ] },
+ { token: 'punctuation.definition.group.elixir',
+ regex: '\\(',
+ push:
+ [ { token: 'punctuation.definition.group.elixir',
+ regex: '\\)',
+ next: 'pop' },
+ { include: '#regex_sub' },
+ { defaultToken: 'string.regexp.group.elixir' } ] },
+ { token:
+ [ 'punctuation.definition.comment.elixir',
+ 'comment.line.number-sign.elixir' ],
+ regex: '(?:^|\\s)(#)(\\s[[a-zA-Z0-9,. \\t?!-][^\\x00-\\x7F]]*$)',
+ originalRegex: '(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$',
+ comment: 'We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.' } ] }
+
+ this.normalizeRules();
+};
+
+ElixirHighlightRules.metaData = { comment: 'Textmate bundle for Elixir Programming Language.',
+ fileTypes: [ 'ex', 'exs' ],
+ firstLineMatch: '^#!/.*\\belixir',
+ foldingStartMarker: '(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$',
+ foldingStopMarker: '^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)',
+ keyEquivalent: '^~E',
+ name: 'Elixir',
+ scopeName: 'source.elixir' }
+
+
+oop.inherits(ElixirHighlightRules, TextHighlightRules);
+
+exports.ElixirHighlightRules = ElixirHighlightRules;
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "#")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "#")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/elixir",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elixir_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ElixirHighlightRules = require("./elixir_highlight_rules").ElixirHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ElixirHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/elixir"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-elm.js b/js/vendor/ace/src-noconflict/mode-elm.js
new file mode 100755
index 0000000..4da0845
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-elm.js
@@ -0,0 +1,293 @@
+ace.define("ace/mode/elm_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ElmHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": "as|case|class|data|default|deriving|do|else|export|foreign|" +
+ "hiding|jsevent|if|import|in|infix|infixl|infixr|instance|let|" +
+ "module|newtype|of|open|then|type|where|_|port|\u03BB"
+ }, "identifier");
+
+ var escapeRe = /\\(\d+|['"\\&trnbvf])/;
+
+ var smallRe = /[a-z_]/.source;
+ var largeRe = /[A-Z]/.source;
+ var idRe = /[a-z_A-Z0-9\']/.source;
+
+ this.$rules = {
+ start: [{
+ token: "string.start",
+ regex: '"',
+ next: "string"
+ }, {
+ token: "string.character",
+ regex: "'(?:" + escapeRe.source + "|.)'?"
+ }, {
+ regex: /0(?:[xX][0-9A-Fa-f]+|[oO][0-7]+)|\d+(\.\d+)?([eE][-+]?\d*)?/,
+ token: "constant.numeric"
+ }, {
+ token : "keyword",
+ regex : /\.\.|\||:|=|\\|\"|->|<-|\u2192/
+ }, {
+ token : "keyword.operator",
+ regex : /[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]+/
+ }, {
+ token : "operator.punctuation",
+ regex : /[,;`]/
+ }, {
+ regex : largeRe + idRe + "+\\.?",
+ token : function(value) {
+ if (value[value.length - 1] == ".")
+ return "entity.name.function";
+ return "constant.language";
+ }
+ }, {
+ regex : "^" + smallRe + idRe + "+",
+ token : function(value) {
+ return "constant.language";
+ }
+ }, {
+ token : keywordMapper,
+ regex : "[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b"
+ }, {
+ regex: "{-#?",
+ token: "comment.start",
+ onMatch: function(value, currentState, stack) {
+ this.next = value.length == 2 ? "blockComment" : "docComment";
+ return this.token;
+ }
+ }, {
+ token: "variable.language",
+ regex: /\[markdown\|/,
+ next: "markdown"
+ }, {
+ token: "paren.lparen",
+ regex: /[\[({]/
+ }, {
+ token: "paren.rparen",
+ regex: /[\])}]/
+ }, ],
+ markdown: [{
+ regex: /\|\]/,
+ next: "start"
+ }, {
+ defaultToken : "string"
+ }],
+ blockComment: [{
+ regex: "{-",
+ token: "comment.start",
+ push: "blockComment"
+ }, {
+ regex: "-}",
+ token: "comment.end",
+ next: "pop"
+ }, {
+ defaultToken: "comment"
+ }],
+ docComment: [{
+ regex: "{-",
+ token: "comment.start",
+ push: "docComment"
+ }, {
+ regex: "-}",
+ token: "comment.end",
+ next: "pop"
+ }, {
+ defaultToken: "doc.comment"
+ }],
+ string: [{
+ token: "constant.language.escape",
+ regex: escapeRe,
+ }, {
+ token: "text",
+ regex: /\\(\s|$)/,
+ next: "stringGap"
+ }, {
+ token: "string.end",
+ regex: '"',
+ next: "start"
+ }],
+ stringGap: [{
+ token: "text",
+ regex: /\\/,
+ next: "string"
+ }, {
+ token: "error",
+ regex: "",
+ next: "start"
+ }],
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(ElmHighlightRules, TextHighlightRules);
+
+exports.ElmHighlightRules = ElmHighlightRules;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/elm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elm_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var HighlightRules = require("./elm_highlight_rules").ElmHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "{-", end: "-}"};
+ this.$id = "ace/mode/elm";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-erlang.js b/js/vendor/ace/src-noconflict/mode-erlang.js
index ddebb60..e0148b5 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-erlang.js
+++ b/js/vendor/ace/src-noconflict/mode-erlang.js
@@ -1,64 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/erlang', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/erlang_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ErlangHighlightRules = require("./erlang_highlight_rules").ErlangHighlightRules;
-var FoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new ErlangHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "%";
- this.blockComment = {start: "/*", end: "*/"};
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/erlang_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/erlang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -896,8 +837,8 @@ oop.inherits(ErlangHighlightRules, TextHighlightRules);
exports.ErlangHighlightRules = ErlangHighlightRules;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -916,23 +857,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -945,7 +918,84 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/erlang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/erlang_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ErlangHighlightRules = require("./erlang_highlight_rules").ErlangHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ErlangHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "%";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/erlang";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-forth.js b/js/vendor/ace/src-noconflict/mode-forth.js
index c0ee36e..0374efc 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-forth.js
+++ b/js/vendor/ace/src-noconflict/mode-forth.js
@@ -1,64 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/forth', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/forth_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ForthHighlightRules = require("./forth_highlight_rules").ForthHighlightRules;
-var FoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new ForthHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "(?<=^|\\s)\\.?\\( [^)]*\\)";
- this.blockComment = {start: "/*", end: "*/"};
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/forth_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/forth_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -184,8 +125,8 @@ oop.inherits(ForthHighlightRules, TextHighlightRules);
exports.ForthHighlightRules = ForthHighlightRules;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -204,23 +145,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -233,7 +206,84 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/forth",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/forth_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ForthHighlightRules = require("./forth_highlight_rules").ForthHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ForthHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/forth";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-ftl.js b/js/vendor/ace/src-noconflict/mode-ftl.js
index bcf7757..003e5c3 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-ftl.js
+++ b/js/vendor/ace/src-noconflict/mode-ftl.js
@@ -1,321 +1,14 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/ftl', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ftl_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var FtlHighlightRules = require("./ftl_highlight_rules").FtlHighlightRules;
-
-var Mode = function() {
- var highlighter = new FtlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/ftl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var FtlLangHighlightRules = function () {
-
- var stringBuiltIns = "\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|"
- + "ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|"
- + "left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|"
- + "upper_case|word_list|xhtml|xml";
- var numberBuiltIns = "c|round|floor|ceiling";
- var dateBuiltIns = "iso_[a-z_]+";
- var seqBuiltIns = "first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk";
- var hashBuiltIns = "keys|values";
- var xmlBuiltIns = "children|parent|root|ancestors|node_name|node_type|node_namespace";
- var expertBuiltIns = "byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|"
- + "eval|has_content|interpret|is_[a-z_]+|namespacenew";
- var allBuiltIns = stringBuiltIns + numberBuiltIns + dateBuiltIns + seqBuiltIns + hashBuiltIns
- + xmlBuiltIns + expertBuiltIns;
-
- var deprecatedBuiltIns = "default|exists|if_exists|web_safe";
-
- var variables = "data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|"
- + "now|output_encoding|template_name|url_escaping_charset|vars|version";
-
- var operators = "gt|gte|lt|lte|as|in|using";
-
- var reserved = "true|false";
-
- var attributes = "encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|"
- + "url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|"
- + "attributes";
-
- this.$rules = {
- "start" : [{
- token : "constant.character.entity",
- regex : /&[^;]+;/
- }, {
- token : "support.function",
- regex : "\\?("+allBuiltIns+")"
- }, {
- token : "support.function.deprecated",
- regex : "\\?("+deprecatedBuiltIns+")"
- }, {
- token : "language.variable",
- regex : "\\.(?:"+variables+")"
- }, {
- token : "constant.language",
- regex : "\\b("+reserved+")\\b"
- }, {
- token : "keyword.operator",
- regex : "\\b(?:"+operators+")\\b"
- }, {
- token : "entity.other.attribute-name",
- regex : attributes
- }, {
- token : "string", //
- regex : /['"]/,
- next : "qstring"
- }, {
- token : function(value) {
- if (value.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")) {
- return "constant.numeric";
- } else {
- return "variable";
- }
- },
- regex : /[\w.+\-]+/
- }, {
- token : "keyword.operator",
- regex : "!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }],
-
- "qstring" : [{
- token : "constant.character.escape",
- regex : '\\\\[nrtvef\\\\"$]'
- }, {
- token : "string",
- regex : /['"]/,
- next : "start"
- }, {
- defaultToken : "string"
- }]
- };
-};
-
-oop.inherits(FtlLangHighlightRules, TextHighlightRules);
-
-var FtlHighlightRules = function() {
- HtmlHighlightRules.call(this);
-
- var directives = "assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|"
- + "ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|"
- + "setting|stop|switch|t|visit";
-
- var startRules = [
- {
- token : "comment",
- regex : "<#--",
- next : "ftl-dcomment"
- }, {
- token : "string.interpolated",
- regex : "\\${",
- push : "ftl-start"
- }, {
- token : "keyword.function",
- regex : "</?#("+directives+")",
- push : "ftl-start"
- }, {
- token : "keyword.other",
- regex : "</?@[a-zA-Z\\.]+",
- push : "ftl-start"
- }
- ];
-
- var endRules = [
- {
- token : "keyword",
- regex : "/?>",
- next : "pop"
- }, {
- token : "string.interpolated",
- regex : "}",
- next : "pop"
- }
- ];
-
- for (var key in this.$rules)
- this.$rules[key].unshift.apply(this.$rules[key], startRules);
-
- this.embedRules(FtlLangHighlightRules, "ftl-", endRules, ["start"]);
-
- this.addRules({
- "ftl-dcomment" : [{
- token : "comment",
- regex : ".*?-->",
- next : "pop"
- }, {
- token : "comment",
- regex : ".+"
- }]
- });
-
- this.normalizeRules();
-};
-
-oop.inherits(FtlHighlightRules, HtmlHighlightRules);
-
-exports.FtlHighlightRules = FtlHighlightRules;
-});
-
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
-
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
-
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
-
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
-
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
-};
-
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
-
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -449,14 +142,64 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -577,23 +320,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -603,10 +349,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -641,14 +383,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -666,7 +408,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -700,20 +442,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -748,9 +494,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -758,111 +544,83 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -870,75 +628,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
}, {
- include : "string"
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -951,18 +719,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -970,14 +737,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -989,72 +756,267 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/ftl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var FtlLangHighlightRules = function () {
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
+ var stringBuiltIns = "\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|"
+ + "ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|"
+ + "left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|"
+ + "upper_case|word_list|xhtml|xml";
+ var numberBuiltIns = "c|round|floor|ceiling";
+ var dateBuiltIns = "iso_[a-z_]+";
+ var seqBuiltIns = "first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk";
+ var hashBuiltIns = "keys|values";
+ var xmlBuiltIns = "children|parent|root|ancestors|node_name|node_type|node_namespace";
+ var expertBuiltIns = "byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|"
+ + "eval|has_content|interpret|is_[a-z_]+|namespacenew";
+ var allBuiltIns = stringBuiltIns + numberBuiltIns + dateBuiltIns + seqBuiltIns + hashBuiltIns
+ + xmlBuiltIns + expertBuiltIns;
+
+ var deprecatedBuiltIns = "default|exists|if_exists|web_safe";
+
+ var variables = "data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|"
+ + "now|output_encoding|template_name|url_escaping_charset|vars|version";
+
+ var operators = "gt|gte|lt|lte|as|in|using";
+
+ var reserved = "true|false";
+
+ var attributes = "encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|"
+ + "url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|"
+ + "attributes";
+
+ this.$rules = {
+ "start" : [{
+ token : "constant.character.entity",
+ regex : /&[^;]+;/
+ }, {
+ token : "support.function",
+ regex : "\\?("+allBuiltIns+")"
+ }, {
+ token : "support.function.deprecated",
+ regex : "\\?("+deprecatedBuiltIns+")"
+ }, {
+ token : "language.variable",
+ regex : "\\.(?:"+variables+")"
+ }, {
+ token : "constant.language",
+ regex : "\\b("+reserved+")\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\b(?:"+operators+")\\b"
+ }, {
+ token : "entity.other.attribute-name",
+ regex : attributes
+ }, {
+ token : "string", //
+ regex : /['"]/,
+ next : "qstring"
+ }, {
+ token : function(value) {
+ if (value.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")) {
+ return "constant.numeric";
+ } else {
+ return "variable";
+ }
+ },
+ regex : /[\w.+\-]+/
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }],
+
+ "qstring" : [{
+ token : "constant.character.escape",
+ regex : '\\\\[nrtvef\\\\"$]'
+ }, {
+ token : "string",
+ regex : /['"]/,
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }]
+ };
+};
+
+oop.inherits(FtlLangHighlightRules, TextHighlightRules);
+
+var FtlHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var directives = "assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|"
+ + "ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|"
+ + "setting|stop|switch|t|visit";
+
+ var startRules = [
{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
+ token : "comment",
+ regex : "<#--",
+ next : "ftl-dcomment"
+ }, {
+ token : "string.interpolated",
+ regex : "\\${",
+ push : "ftl-start"
+ }, {
+ token : "keyword.function",
+ regex : "</?#("+directives+")",
+ push : "ftl-start"
+ }, {
+ token : "keyword.other",
+ regex : "</?@[a-zA-Z\\.]+",
+ push : "ftl-start"
+ }
];
-}
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
+ var endRules = [
+ {
+ token : "keyword",
+ regex : "/?>",
+ next : "pop"
+ }, {
+ token : "string.interpolated",
+ regex : "}",
+ next : "pop"
+ }
+ ];
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
+
+ this.embedRules(FtlLangHighlightRules, "ftl-", endRules, ["start"]);
+
+ this.addRules({
+ "ftl-dcomment" : [{
+ token : "comment",
+ regex : ".*?-->",
+ next : "pop"
+ }, {
+ token : "comment",
+ regex : ".+"
+ }]
+ });
+
+ this.normalizeRules();
+};
+
+oop.inherits(FtlHighlightRules, HtmlHighlightRules);
+
+exports.FtlHighlightRules = FtlHighlightRules;
+});
+
+ace.define("ace/mode/ftl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ftl_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var FtlHighlightRules = require("./ftl_highlight_rules").FtlHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = FtlHighlightRules;
};
+oop.inherits(Mode, TextMode);
+(function() {
+
+ this.$id = "ace/mode/ftl";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
});
diff --git a/js/vendor/ace/src-noconflict/mode-gcode.js b/js/vendor/ace/src-noconflict/mode-gcode.js
new file mode 100755
index 0000000..77e9e80
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-gcode.js
@@ -0,0 +1,85 @@
+ace.define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+ "use strict";
+
+ var oop = require("../lib/oop");
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+ var GcodeHighlightRules = function() {
+
+ var keywords = (
+ "IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL"
+ );
+
+ var builtinConstants = (
+ "PI"
+ );
+
+ var builtinFunctions = (
+ "ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN"
+ );
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords,
+ "constant.language": builtinConstants
+ }, "identifier", true);
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "\\(.*\\)"
+ }, {
+ token : "comment", // block number
+ regex : "([N])([0-9]+)"
+ }, {
+ token : "string", // " string
+ regex : "([G])([0-9]+\\.?[0-9]?)"
+ }, {
+ token : "string", // ' string
+ regex : "([M])([0-9]+\\.?[0-9]?)"
+ }, {
+ token : "constant.numeric", // float
+ regex : "([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"
+ }, {
+ token : keywordMapper,
+ regex : "[A-Z]"
+ }, {
+ token : "keyword.operator",
+ regex : "EQ|LT|GT|NE|GE|LE|OR|XOR"
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ]
+ };
+ };
+
+ oop.inherits(GcodeHighlightRules, TextHighlightRules);
+
+ exports.GcodeHighlightRules = GcodeHighlightRules;
+});
+
+ace.define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"], function(require, exports, module) {
+ "use strict";
+
+ var oop = require("../lib/oop");
+ var TextMode = require("./text").Mode;
+ var GcodeHighlightRules = require("./gcode_highlight_rules").GcodeHighlightRules;
+ var Range = require("../range").Range;
+
+ var Mode = function() {
+ this.HighlightRules = GcodeHighlightRules;
+ };
+ oop.inherits(Mode, TextMode);
+
+ (function() {
+ this.$id = "ace/mode/gcode";
+ }).call(Mode.prototype);
+
+ exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-gherkin.js b/js/vendor/ace/src-noconflict/mode-gherkin.js
new file mode 100755
index 0000000..9928bc3
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-gherkin.js
@@ -0,0 +1,129 @@
+ace.define("ace/mode/gherkin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
+
+var GherkinHighlightRules = function() {
+ this.$rules = {
+ start : [{
+ token: 'constant.numeric',
+ regex: "(?:(?:[1-9]\\d*)|(?:0))"
+ }, {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "keyword",
+ regex : "Feature:|Background:|Scenario:|Scenario\ Outline:|Examples:|Given|When|Then|And|But|\\*",
+ }, {
+ token : "string", // multi line """ string start
+ regex : '"{3}',
+ next : "qqstring3"
+ }, {
+ token : "string", // " string
+ regex : '"',
+ next : "qqstring"
+ }, {
+ token : "comment",
+ regex : "@[A-Za-z0-9]+",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : "<.+>"
+ }, {
+ token : "comment",
+ regex : "\\| ",
+ next : "table-item"
+ }, {
+ token : "comment",
+ regex : "\\|$",
+ next : "start"
+ }],
+ "qqstring3" : [ {
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string", // multi line """ string end
+ regex : '"{3}',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }],
+ "qqstring" : [{
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }],
+ "table-item" : [{
+ token : "string",
+ regex : "[A-Za-z0-9 ]*",
+ next : "start"
+ }],
+ };
+
+}
+
+oop.inherits(GherkinHighlightRules, TextHighlightRules);
+
+exports.GherkinHighlightRules = GherkinHighlightRules;
+});
+
+ace.define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var GherkinHighlightRules = require("./gherkin_highlight_rules").GherkinHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = GherkinHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/gherkin";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var space2 = " ";
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ console.log(state)
+
+ if(line.match("[ ]*\\|")) {
+ indent += "| ";
+ }
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+
+ if (state == "start") {
+ if (line.match("Scenario:|Feature:|Scenario\ Outline:|Background:")) {
+ indent += space2;
+ } else if(line.match("(Given|Then).+(:)$|Examples:")) {
+ indent += space2;
+ } else if(line.match("\\*.+")) {
+ indent += "* ";
+ }
+ }
+
+
+ return indent;
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-gitignore.js b/js/vendor/ace/src-noconflict/mode-gitignore.js
new file mode 100755
index 0000000..a3cc839
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-gitignore.js
@@ -0,0 +1,51 @@
+ace.define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var GitignoreHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /^\s*#.*$/
+ }, {
+ token : "keyword", // negated patterns
+ regex : /^\s*!.*$/
+ }
+ ]
+ };
+
+ this.normalizeRules();
+};
+
+GitignoreHighlightRules.metaData = {
+ fileTypes: ['gitignore'],
+ name: 'Gitignore'
+};
+
+oop.inherits(GitignoreHighlightRules, TextHighlightRules);
+
+exports.GitignoreHighlightRules = GitignoreHighlightRules;
+});
+
+ace.define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var GitignoreHighlightRules = require("./gitignore_highlight_rules").GitignoreHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = GitignoreHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/gitignore";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-glsl.js b/js/vendor/ace/src-noconflict/mode-glsl.js
index b469d74..21eee89 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-glsl.js
+++ b/js/vendor/ace/src-noconflict/mode-glsl.js
@@ -1,139 +1,60 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/glsl', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/c_cpp', 'ace/tokenizer', 'ace/mode/glsl_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var CMode = require("./c_cpp").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var glslHighlightRules = require("./glsl_highlight_rules").glslHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new glslHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, CMode);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/c_cpp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c_cpp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new c_cppHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- this.foldingRules = new CStyleFoldMode();
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
-}).call(Mode.prototype);
-exports.Mode = Mode;
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
});
-ace.define('ace/mode/c_cpp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b"
+var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"
var c_cppHighlightRules = function() {
@@ -145,12 +66,13 @@ var c_cppHighlightRules = function() {
var storageType = (
"asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
"_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
- "class|wchar_t|template"
+ "class|wchar_t|template|char16_t|char32_t"
);
var storageModifiers = (
- "const|extern|register|restrict|static|volatile|inline|private:|" +
- "protected:|public:|friend|explicit|virtual|export|mutable|typename"
+ "const|extern|register|restrict|static|volatile|inline|private|" +
+ "protected|public|friend|explicit|virtual|export|mutable|typename|" +
+ "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"
);
var keywordOperators = (
@@ -159,7 +81,7 @@ var c_cppHighlightRules = function() {
);
var builtinConstants = (
- "NULL|true|false|TRUE|FALSE"
+ "NULL|true|false|TRUE|FALSE|nullptr"
);
var keywordMapper = this.$keywords = this.createKeywordMapper({
@@ -173,11 +95,12 @@ var c_cppHighlightRules = function() {
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b";
- this.$rules = {
+ this.$rules = {
"start" : [
{
token : "comment",
- regex : "\\/\\/.*$"
+ regex : "//",
+ next : "singleLineComment"
},
DocCommentHighlightRules.getStartRule("doc-start"),
{
@@ -206,11 +129,11 @@ var c_cppHighlightRules = function() {
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
}, {
token : "keyword", // pre-compiler directives
- regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b",
+ regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
next : "directive"
}, {
token : "keyword", // special case pre-compiler directive
- regex : "(?:#\\s*endif)\\b"
+ regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
}, {
token : "support.function.C99.c",
regex : cFunctions
@@ -244,14 +167,26 @@ var c_cppHighlightRules = function() {
regex : ".+"
}
],
+ "singleLineComment" : [
+ {
+ token : "comment",
+ regex : /\\$/,
+ next : "singleLineComment"
+ }, {
+ token : "comment",
+ regex : /$/,
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ],
"qqstring" : [
{
token : "string",
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
next : "start"
}, {
- token : "string",
- regex : '.+'
+ defaultToken : "string"
}
],
"qstring" : [
@@ -260,8 +195,7 @@ var c_cppHighlightRules = function() {
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
next : "start"
}, {
- token : "string",
- regex : '.+'
+ defaultToken : "string"
}
],
"directive" : [
@@ -305,52 +239,8 @@ oop.inherits(c_cppHighlightRules, TextHighlightRules);
exports.c_cppHighlightRules = c_cppHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -389,8 +279,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -402,92 +292,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -502,6 +353,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -514,51 +366,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -567,6 +425,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -583,9 +442,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -595,15 +455,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -612,6 +470,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -628,9 +487,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -640,62 +500,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -707,13 +564,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -732,23 +656,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -761,13 +717,139 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/glsl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/c_cpp_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = c_cppHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/c_cpp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/glsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/c_cpp_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
@@ -815,3 +897,30 @@ oop.inherits(glslHighlightRules, c_cppHighlightRules);
exports.glslHighlightRules = glslHighlightRules;
});
+
+ace.define("ace/mode/glsl",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/glsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var CMode = require("./c_cpp").Mode;
+var glslHighlightRules = require("./glsl_highlight_rules").glslHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = glslHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, CMode);
+
+(function() {
+ this.$id = "ace/mode/glsl";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-golang.js b/js/vendor/ace/src-noconflict/mode-golang.js
index 950cab5..72fdb80 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-golang.js
+++ b/js/vendor/ace/src-noconflict/mode-golang.js
@@ -1,78 +1,79 @@
-ace.define('ace/mode/golang', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/golang_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var GolangHighlightRules = require("./golang_highlight_rules").GolangHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new GolangHighlightRules();
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
- };//end getNextLineIndent
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
-}).call(Mode.prototype);
-exports.Mode = Mode;
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
});
-ace.define('ace/mode/golang_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+ace.define("ace/mode/golang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var GolangHighlightRules = function() {
var keywords = (
- "else|break|case|return|goto|if|const|" +
- "continue|struct|default|switch|for|" +
- "func|import|package|chan|defer|fallthrough|go|interface|map|range" +
+ "else|break|case|return|goto|if|const|select|" +
+ "continue|struct|default|switch|for|range|" +
+ "func|import|package|chan|defer|fallthrough|go|interface|map|range|" +
"select|type|var"
);
- var buildinConstants = ("nil|true|false|iota");
+ var builtinTypes = (
+ "string|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|" +
+ "float64|complex64|complex128|byte|rune|uint|int|uintptr|bool|error"
+ );
+ var builtinFunctions = (
+ "make|close|new|panic|recover"
+ );
+ var builtinConstants = ("nil|true|false|iota");
var keywordMapper = this.createKeywordMapper({
"keyword": keywords,
- "constant.language": buildinConstants
+ "constant.language": builtinConstants,
+ "support.function": builtinFunctions,
+ "support.type": builtinTypes
}, "identifier");
this.$rules = {
@@ -122,9 +123,6 @@ ace.define('ace/mode/golang_highlight_rules', ['require', 'exports', 'module' ,
token : "paren.rparen",
regex : "[\\])}]"
}, {
- token: "invalid",
- regex: "\\s+$"
- }, {
token : "text",
regex : "\\s+"
}
@@ -159,52 +157,8 @@ ace.define('ace/mode/golang_highlight_rules', ['require', 'exports', 'module' ,
exports.GolangHighlightRules = GolangHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -243,8 +197,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -256,92 +210,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -356,6 +271,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -368,51 +284,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -421,6 +343,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -437,9 +360,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -449,15 +373,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -466,6 +388,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -482,9 +405,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -494,62 +418,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -561,13 +482,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -586,23 +574,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -615,7 +635,117 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/golang_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var GolangHighlightRules = require("./golang_highlight_rules").GolangHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = GolangHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };//end getNextLineIndent
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/golang";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-groovy.js b/js/vendor/ace/src-noconflict/mode-groovy.js
index 701464e..7a7f4e7 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-groovy.js
+++ b/js/vendor/ace/src-noconflict/mode-groovy.js
@@ -1,127 +1,61 @@
-ace.define('ace/mode/groovy', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/groovy_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var JavaScriptMode = require("./javascript").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules;
-
-var Mode = function() {
- JavaScriptMode.call(this);
- var highlighter = new GroovyHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
-};
-oop.inherits(Mode, JavaScriptMode);
-
-(function() {
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- this.createWorker = function(session) {
- return null;
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
};
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
- return worker;
- };
-
-}).call(Mode.prototype);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -242,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -268,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -306,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -331,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -365,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -413,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -423,52 +400,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -507,8 +440,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -520,92 +453,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -620,6 +514,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -632,51 +527,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -685,6 +586,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -701,9 +603,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -713,15 +616,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -730,6 +631,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -746,9 +648,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -758,62 +661,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -825,13 +725,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -850,23 +817,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -879,12 +878,154 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/groovy_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
@@ -1049,3 +1190,28 @@ oop.inherits(GroovyHighlightRules, TextHighlightRules);
exports.GroovyHighlightRules = GroovyHighlightRules;
});
+
+ace.define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/groovy_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+ this.HighlightRules = GroovyHighlightRules;
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.$id = "ace/mode/groovy";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-haml.js b/js/vendor/ace/src-noconflict/mode-haml.js
index 5f213b6..648e808 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-haml.js
+++ b/js/vendor/ace/src-noconflict/mode-haml.js
@@ -1,193 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- * Garen J. Torikian < gjtorikian AT gmail DOT com >
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/haml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haml_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HamlHighlightRules = require("./haml_highlight_rules").HamlHighlightRules;
-var FoldMode = require("./folding/coffee").FoldMode;
-
-var Mode = function() {
- var highlighter = new HamlHighlightRules();
- this.foldingRules = new FoldMode();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = ["//", "#"];
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});ace.define('ace/mode/haml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/ruby_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var RubyExports = require("./ruby_highlight_rules");
-var RubyHighlightRules = RubyExports.RubyHighlightRules;
-
-var HamlHighlightRules = function() {
-
- this.$rules =
- {
- "start": [
- {
- token : "punctuation.section.comment",
- regex : /^\s*\/.*/
- },
- {
- token : "punctuation.section.comment",
- regex : /^\s*#.*/
- },
- {
- token: "string.quoted.double",
- regex: "==.+?=="
- },
- {
- token: "keyword.other.doctype",
- regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
- },
- RubyExports.qString,
- RubyExports.qqString,
- RubyExports.tString,
- {
- token: ["entity.name.tag.haml"],
- regex: /^\s*%[\w:]+/,
- next: "tag_single"
- },
- {
- token: [ "meta.escape.haml" ],
- regex: "^\\s*\\\\."
- },
- RubyExports.constantNumericHex,
- RubyExports.constantNumericFloat,
-
- RubyExports.constantOtherSymbol,
- {
- token: "text",
- regex: "=|-|~",
- next: "embedded_ruby"
- }
- ],
- "tag_single": [
- {
- token: "entity.other.attribute-name.class.haml",
- regex: "\\.[\\w-]+"
- },
- {
- token: "entity.other.attribute-name.id.haml",
- regex: "#[\\w-]+"
- },
- {
- token: "punctuation.section",
- regex: "\\{",
- next: "section"
- },
-
- RubyExports.constantOtherSymbol,
-
- {
- token: "text",
- regex: /\s/,
- next: "start"
- },
- {
- token: "empty",
- regex: "$|(?!\\.|#|\\{|\\[|=|-|~|\\/)",
- next: "start"
- }
- ],
- "section": [
- RubyExports.constantOtherSymbol,
-
- RubyExports.qString,
- RubyExports.qqString,
- RubyExports.tString,
-
- RubyExports.constantNumericHex,
- RubyExports.constantNumericFloat,
- {
- token: "punctuation.section",
- regex: "\\}",
- next: "start"
- }
- ],
- "embedded_ruby": [
- RubyExports.constantNumericHex,
- RubyExports.constantNumericFloat,
- {
- token : "support.class", // class name
- regex : "[A-Z][a-zA-Z_\\d]+"
- },
- {
- token : new RubyHighlightRules().getKeywords(),
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- },
- {
- token : ["keyword", "text", "text"],
- regex : "(?:do|\\{)(?: \\|[^|]+\\|)?$",
- next : "start"
- },
- {
- token : ["text"],
- regex : "^$",
- next : "start"
- },
- {
- token : ["text"],
- regex : "^(?!.*\\|\\s*$)",
- next : "start"
- }
- ]
-}
-
-};
-
-oop.inherits(HamlHighlightRules, TextHighlightRules);
-
-exports.HamlHighlightRules = HamlHighlightRules;
-});
-
-ace.define('ace/mode/ruby_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -294,9 +106,70 @@ var RubyHighlightRules = function() {
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
},
- qString,
- qqString,
- tString,
+ [{
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren.lparen";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.start",
+ regex : /"/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /\#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /"/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /\#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /'/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\['\\]/
+ }, {
+ token : "string.end",
+ regex : /'/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
{
token : "text", // namespaces aren't symbols
@@ -339,11 +212,13 @@ var RubyHighlightRules = function() {
rules: {
heredoc: [{
onMatch: function(value, currentState, stack) {
- if (value == stack[1]) {
+ if (value === stack[1]) {
stack.shift();
stack.shift();
+ this.next = stack[0] || "start";
return "support.class";
}
+ this.next = "";
return "string";
},
regex: ".*$",
@@ -354,11 +229,13 @@ var RubyHighlightRules = function() {
regex: "^ +"
}, {
onMatch: function(value, currentState, stack) {
- if (value == stack[1]) {
+ if (value === stack[1]) {
stack.shift();
stack.shift();
+ this.next = stack[0] || "start";
return "support.class";
}
+ this.next = "";
return "string";
},
regex: ".*$",
@@ -366,6 +243,17 @@ var RubyHighlightRules = function() {
}]
}
}, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
+ token : "string.character",
+ regex : "\\B\\?."
+ }, {
token : "keyword.operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
}, {
@@ -399,8 +287,138 @@ oop.inherits(RubyHighlightRules, TextHighlightRules);
exports.RubyHighlightRules = RubyHighlightRules;
});
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+ace.define("ace/mode/haml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/ruby_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var RubyExports = require("./ruby_highlight_rules");
+var RubyHighlightRules = RubyExports.RubyHighlightRules;
+
+var HamlHighlightRules = function() {
+
+ this.$rules =
+ {
+ "start": [
+ {
+ token : "punctuation.section.comment",
+ regex : /^\s*\/.*/
+ },
+ {
+ token : "punctuation.section.comment",
+ regex : /^\s*#.*/
+ },
+ {
+ token: "string.quoted.double",
+ regex: "==.+?=="
+ },
+ {
+ token: "keyword.other.doctype",
+ regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
+ },
+ RubyExports.qString,
+ RubyExports.qqString,
+ RubyExports.tString,
+ {
+ token: ["entity.name.tag.haml"],
+ regex: /^\s*%[\w:]+/,
+ next: "tag_single"
+ },
+ {
+ token: [ "meta.escape.haml" ],
+ regex: "^\\s*\\\\."
+ },
+ RubyExports.constantNumericHex,
+ RubyExports.constantNumericFloat,
+
+ RubyExports.constantOtherSymbol,
+ {
+ token: "text",
+ regex: "=|-|~",
+ next: "embedded_ruby"
+ }
+ ],
+ "tag_single": [
+ {
+ token: "entity.other.attribute-name.class.haml",
+ regex: "\\.[\\w-]+"
+ },
+ {
+ token: "entity.other.attribute-name.id.haml",
+ regex: "#[\\w-]+"
+ },
+ {
+ token: "punctuation.section",
+ regex: "\\{",
+ next: "section"
+ },
+
+ RubyExports.constantOtherSymbol,
+
+ {
+ token: "text",
+ regex: /\s/,
+ next: "start"
+ },
+ {
+ token: "empty",
+ regex: "$|(?!\\.|#|\\{|\\[|=|-|~|\\/)",
+ next: "start"
+ }
+ ],
+ "section": [
+ RubyExports.constantOtherSymbol,
+
+ RubyExports.qString,
+ RubyExports.qqString,
+ RubyExports.tString,
+
+ RubyExports.constantNumericHex,
+ RubyExports.constantNumericFloat,
+ {
+ token: "punctuation.section",
+ regex: "\\}",
+ next: "start"
+ }
+ ],
+ "embedded_ruby": [
+ RubyExports.constantNumericHex,
+ RubyExports.constantNumericFloat,
+ {
+ token : "support.class", // class name
+ regex : "[A-Z][a-zA-Z_\\d]+"
+ },
+ {
+ token : new RubyHighlightRules().getKeywords(),
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ },
+ {
+ token : ["keyword", "text", "text"],
+ regex : "(?:do|\\{)(?: \\|[^|]+\\|)?$",
+ next : "start"
+ },
+ {
+ token : ["text"],
+ regex : "^$",
+ next : "start"
+ },
+ {
+ token : ["text"],
+ regex : "^(?!.*\\|\\s*$)",
+ next : "start"
+ }
+ ]
+}
+
+};
+
+oop.inherits(HamlHighlightRules, TextHighlightRules);
+
+exports.HamlHighlightRules = HamlHighlightRules;
+});
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -485,3 +503,26 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/haml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haml_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var HamlHighlightRules = require("./haml_highlight_rules").HamlHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HamlHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = ["//", "#"];
+
+ this.$id = "ace/mode/haml";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-handlebars.js b/js/vendor/ace/src-noconflict/mode-handlebars.js
new file mode 100755
index 0000000..f0b1a6c
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-handlebars.js
@@ -0,0 +1,2551 @@
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function(options) {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment_regex_allowed"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex"
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ push: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "\\}",
+ next: "pop"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "comment" : [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }],
+
+ "ruleset" : [
+ {
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "pop"
+ }, {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : ["support.function", "string", "support.function"],
+ regex : "(url\\()(.*)(\\))"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar === ';') {
+ range.end.column ++;
+ return range;
+ }
+ }
+ }
+ });
+
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
+ },
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
+ },
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
+ ],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
+ this.defaultMode = defaultMode;
+ this.subModes = subModes;
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+
+ this.$getMode = function(state) {
+ if (typeof state != "string")
+ state = state[0];
+ for (var key in this.subModes) {
+ if (state.indexOf(key) === 0)
+ return this.subModes[key];
+ }
+ return null;
+ };
+
+ this.$tryMode = function(state, session, foldStyle, row) {
+ var mode = this.$getMode(state);
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
+ };
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ return (
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
+ );
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var mode = this.$getMode(session.getState(row-1));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.$getMode(session.getState(row));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.defaultMode;
+
+ return mode.getFoldWidgetRange(session, foldStyle, row);
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return "";
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag)
+ return null;
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/handlebars_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+function pop2(currentState, stack) {
+ stack.splice(0, 3);
+ return stack.shift() || "start";
+}
+var HandlebarsHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+ var hbs = {
+ regex : "(?={{)",
+ push : "handlebars"
+ };
+ for (var key in this.$rules) {
+ this.$rules[key].unshift(hbs);
+ }
+ this.$rules.handlebars = [{
+ token : "comment.start",
+ regex : "{{!--",
+ push : [{
+ token : "comment.end",
+ regex : "--}}",
+ next : pop2
+ }, {
+ defaultToken : "comment"
+ }]
+ }, {
+ token : "comment.start",
+ regex : "{{!",
+ push : [{
+ token : "comment.end",
+ regex : "}}",
+ next : pop2
+ }, {
+ defaultToken : "comment"
+ }]
+ }, {
+ token : "support.function", // unescaped variable
+ regex : "{{{",
+ push : [{
+ token : "support.function",
+ regex : "}}}",
+ next : pop2
+ }, {
+ token : "variable.parameter",
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
+ }]
+ }, {
+ token : "storage.type.start", // begin section
+ regex : "{{[#\\^/&]?",
+ push : [{
+ token : "storage.type.end",
+ regex : "}}",
+ next : pop2
+ }, {
+ token : "variable.parameter",
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
+ }]
+ }];
+
+ this.normalizeRules();
+};
+
+oop.inherits(HandlebarsHighlightRules, HtmlHighlightRules);
+
+exports.HandlebarsHighlightRules = HandlebarsHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+
+var HtmlBehaviour = function () {
+
+ XmlBehaviour.call(this);
+
+};
+
+oop.inherits(HtmlBehaviour, XmlBehaviour);
+
+exports.HtmlBehaviour = HtmlBehaviour;
+});
+
+ace.define("ace/mode/handlebars",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/handlebars_highlight_rules","ace/mode/behaviour/html","ace/mode/folding/html"], function(require, exports, module) {
+ "use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var HandlebarsHighlightRules = require("./handlebars_highlight_rules").HandlebarsHighlightRules;
+var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = HandlebarsHighlightRules;
+ this.$behaviour = new HtmlBehaviour();
+
+
+ this.foldingRules = new HtmlFoldMode();
+};
+
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.blockComment = {start: "{!--", end: "--}"};
+ this.$id = "ace/mode/handlebars";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-haskell.js b/js/vendor/ace/src-noconflict/mode-haskell.js
index bea308c..cad11e6 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-haskell.js
+++ b/js/vendor/ace/src-noconflict/mode-haskell.js
@@ -1,64 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/haskell', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haskell_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HaskellHighlightRules = require("./haskell_highlight_rules").HaskellHighlightRules;
-var FoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new HaskellHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "--";
- this.blockComment = {start: "/*", end: "*/"};
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/haskell_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/haskell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -76,9 +17,9 @@ var HaskellHighlightRules = function() {
{ token: 'constant.language.empty-list.haskell',
regex: '\\[\\]' },
{ token: 'keyword.other.haskell',
- regex: 'module',
+ regex: '\\bmodule\\b',
push:
- [ { token: 'keyword.other.haskell', regex: 'where', next: 'pop' },
+ [ { token: 'keyword.other.haskell', regex: '\\bwhere\\b', next: 'pop' },
{ include: '#module_name' },
{ include: '#module_exports' },
{ token: 'invalid', regex: '[a-z]+' },
@@ -266,8 +207,8 @@ oop.inherits(HaskellHighlightRules, TextHighlightRules);
exports.HaskellHighlightRules = HaskellHighlightRules;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -286,23 +227,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -315,7 +288,84 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/haskell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var HaskellHighlightRules = require("./haskell_highlight_rules").HaskellHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HaskellHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/haskell";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-haxe.js b/js/vendor/ace/src-noconflict/mode-haxe.js
index 47fb1ae..7cf2db1 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-haxe.js
+++ b/js/vendor/ace/src-noconflict/mode-haxe.js
@@ -1,63 +1,55 @@
-ace.define('ace/mode/haxe', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haxe_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HaxeHighlightRules = require("./haxe_highlight_rules").HaxeHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var Mode = function() {
- var highlighter = new HaxeHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
-}).call(Mode.prototype);
-exports.Mode = Mode;
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
});
-ace.define('ace/mode/haxe_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/haxe_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
@@ -150,52 +142,8 @@ oop.inherits(HaxeHighlightRules, TextHighlightRules);
exports.HaxeHighlightRules = HaxeHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -234,8 +182,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -247,92 +195,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -347,6 +256,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -359,51 +269,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -412,6 +328,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -428,9 +345,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -440,15 +358,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -457,6 +373,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -473,9 +390,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -485,62 +403,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -552,13 +467,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -577,23 +559,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -606,7 +620,118 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/haxe",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haxe_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var HaxeHighlightRules = require("./haxe_highlight_rules").HaxeHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HaxeHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/haxe";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-html.js b/js/vendor/ace/src-noconflict/mode-html.js
index 41b0282..bda519d 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-html.js
+++ b/js/vendor/ace/src-noconflict/mode-html.js
@@ -1,174 +1,61 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-
-var Mode = function() {
- var highlighter = new HtmlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$behaviour = new HtmlBehaviour();
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.blockComment = {start: "<!--", end: "-->"};
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- this.checkOutdent = function(state, line, input) {
- return false;
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
};
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-}).call(Mode.prototype);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -289,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -315,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -353,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -378,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -412,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -460,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -470,52 +400,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -554,8 +440,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -567,92 +453,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -667,6 +514,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -679,51 +527,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -732,6 +586,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -748,9 +603,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -760,15 +616,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -777,6 +631,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -793,9 +648,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -805,62 +661,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -872,13 +725,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -897,23 +817,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -926,48 +878,118 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
- var highlighter = new CssHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.HighlightRules = JavaScriptHighlightRules;
+
this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CssBehaviour();
- this.$keywordList = highlighter.$keywordList;
+ this.$behaviour = new CstyleBehaviour();
this.foldingRules = new CStyleFoldMode();
};
oop.inherits(Mode, TextMode);
(function() {
- this.foldingRules = "cStyle";
+ this.lineCommentStart = "//";
this.blockComment = {start: "/*", end: "*/"};
this.getNextLineIndent = function(state, line, tab) {
var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
if (tokens.length && tokens[tokens.length-1].type == "comment") {
return indent;
}
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
}
return indent;
@@ -982,11 +1004,11 @@ oop.inherits(Mode, TextMode);
};
this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
worker.attachToDocument(session.getDocument());
- worker.on("csslint", function(e) {
- session.setAnnotations(e.data);
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
});
worker.on("terminate", function() {
@@ -996,23 +1018,23 @@ oop.inherits(Mode, TextMode);
return worker;
};
+ this.$id = "ace/mode/javascript";
}).call(Mode.prototype);
exports.Mode = Mode;
-
});
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -1146,8 +1168,8 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -1225,160 +1247,152 @@ oop.inherits(CssBehaviour, CstyleBehaviour);
exports.CssBehaviour = CssBehaviour;
});
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
+(function() {
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
-};
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+ return indent;
+ };
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ return worker;
+ };
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -1386,75 +1400,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
}, {
- include : "string"
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -1467,18 +1491,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -1486,14 +1509,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -1505,258 +1528,253 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
};
-});
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
-var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var Behaviour = require("../behaviour").Behaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
+var lang = require("../../lib/lang");
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
-var HtmlBehaviour = function () {
+var XmlBehaviour = function () {
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
var token = iterator.getCurrentToken();
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var element = token.value;
- if (atCursor){
- var element = element.substring(0, position.column - token.start);
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
}
- if (voidElements.indexOf(element) !== -1){
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
}
- return {
- text: '>' + '</' + element + '>',
- selection: [1, 1]
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
}
}
});
-}
-oop.inherits(HtmlBehaviour, XmlBehaviour);
-
-exports.HtmlBehaviour = HtmlBehaviour;
-});
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
});
- return hasType;
-}
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
if (text == '>') {
var position = editor.getCursorPosition();
var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
+ if (is(token, "reference.attribute-value"))
return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
}
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
}
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
return {
- text: '>' + '</' + tag + '>',
+ text: ">" + "</" + element + ">",
selection: [1, 1]
- }
+ };
}
});
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
if (text == "\n") {
var cursor = editor.getCursorPosition();
var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
}
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});
-ace.define('ace/mode/folding/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+ if (!token) {
+ return;
+ }
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
-var oop = require("../../lib/oop");
-var MixedFoldMode = require("./mixed").FoldMode;
-var XmlFoldMode = require("./xml").FoldMode;
-var CStyleFoldMode = require("./cstyle").FoldMode;
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
- "js-": new CStyleFoldMode(),
- "css-": new CStyleFoldMode()
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
});
+
};
-oop.inherits(FoldMode, MixedFoldMode);
+oop.inherits(XmlBehaviour, Behaviour);
+exports.XmlBehaviour = XmlBehaviour;
});
-ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -1809,8 +1827,8 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var lang = require("../../lib/lang");
@@ -1818,91 +1836,118 @@ var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var FoldMode = exports.FoldMode = function(voidElements) {
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
BaseFoldMode.call(this);
this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
};
oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
(function() {
this.getFoldWidget = function(session, foldStyle, row) {
var tag = this._getFirstTagInLine(session, row);
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ if (!tag)
return "";
- if (tag.selfClosing)
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
return "";
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
return "";
return "start";
};
-
this._getFirstTagInLine = function(session, row) {
var tokens = session.getTokens(row);
- var value = "";
+ var tag = new Tag();
+
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
- if (token.type.lastIndexOf("meta.tag", 0) === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
}
-
- return this._parseTag(value);
+
+ return null;
};
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = tag.match(this.tagRe);
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
var column = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
};
this._readTagForward = function(iterator) {
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var start;
-
+
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
}
} while(token = iterator.stepForward());
-
+
return null;
};
@@ -1910,32 +1955,24 @@ oop.inherits(FoldMode, BaseFoldMode);
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var end;
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
}
} while(token = iterator.stepBackward());
-
+
return null;
};
@@ -1946,10 +1983,7 @@ oop.inherits(FoldMode, BaseFoldMode);
if (!tag || top.tagName == tag.tagName) {
return stack.pop();
}
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
stack.pop();
continue;
} else {
@@ -1961,7 +1995,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.getFoldWidgetRange = function(session, foldStyle, row) {
var firstTag = this._getFirstTagInLine(session, row);
- if (!firstTag.match)
+ if (!firstTag)
return null;
var isBackward = firstTag.closing || firstTag.selfClosing;
@@ -1969,11 +2003,13 @@ oop.inherits(FoldMode, BaseFoldMode);
var tag;
if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
var start = {
row: row,
- column: firstTag.column + firstTag.tagName.length + 2
+ column: firstTag.start.column + firstTag.tagName.length + 2
};
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
while (tag = this._readTagForward(iterator)) {
if (tag.selfClosing) {
if (!stack.length) {
@@ -1990,15 +2026,15 @@ oop.inherits(FoldMode, BaseFoldMode);
return Range.fromPoints(start, tag.start);
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
var end = {
row: row,
- column: firstTag.column
+ column: firstTag.start.column
};
while (tag = this._readTagBackward(iterator)) {
@@ -2015,11 +2051,13 @@ oop.inherits(FoldMode, BaseFoldMode);
this._pop(stack, tag);
if (stack.length == 0) {
tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
return Range.fromPoints(tag.start, end);
}
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
@@ -2029,3 +2067,369 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-html_ruby.js b/js/vendor/ace/src-noconflict/mode-html_ruby.js
index 1737adc..4a57ab3 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-html_ruby.js
+++ b/js/vendor/ace/src-noconflict/mode-html_ruby.js
@@ -1,219 +1,14 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-ace.define('ace/mode/html_ruby', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/tokenizer', 'ace/mode/html_ruby_highlight_rules', 'ace/mode/html', 'ace/mode/javascript', 'ace/mode/css', 'ace/mode/ruby'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlRubyHighlightRules = require("./html_ruby_highlight_rules").HtmlRubyHighlightRules;
-var HtmlMode = require("./html").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var RubyMode = require("./ruby").Mode;
-
-var Mode = function() {
- HtmlMode.call(this);
- var highlighter = new HtmlRubyHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode,
- "ruby-": RubyMode
- });
-};
-oop.inherits(Mode, HtmlMode);
-
-(function() {
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/html_ruby_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/ruby_highlight_rules'], function(require, exports, module) {
-
-
- var oop = require("../lib/oop");
- var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
- var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
-
- var HtmlRubyHighlightRules = function() {
- HtmlHighlightRules.call(this);
-
- var startRules = [
- {
- regex: "<%%|%%>",
- token: "constant.language.escape"
- }, {
- token : "comment.start.erb",
- regex : "<%#",
- push : [{regex: "%>", next: "pop"}]
- }, {
- token : "support.ruby_tag",
- regex : "<%+(?!>)[-=]?",
- push : "ruby-start"
- }
- ];
-
- var endRules = [
- {
- token : "support.ruby_tag",
- regex : "%>",
- next : "pop"
- }, {
- token: "comment",
- regex: "#(?:[^%]|%[^>])*"
- }
- ];
-
- for (var key in this.$rules)
- this.$rules[key].unshift.apply(this.$rules[key], startRules);
-
- this.embedRules(RubyHighlightRules, "ruby-", endRules, ["start"]);
-
- this.normalizeRules();
- };
-
-
- oop.inherits(HtmlRubyHighlightRules, HtmlHighlightRules);
-
- exports.HtmlRubyHighlightRules = HtmlRubyHighlightRules;
-});
-
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
-
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
-
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
-
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
-
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
-};
-
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
-
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -347,14 +142,64 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -475,23 +320,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -501,10 +349,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -539,14 +383,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -564,7 +408,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -598,20 +442,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -646,9 +494,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -656,111 +544,83 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -768,75 +628,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
}, {
- include : "string"
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -849,18 +719,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -868,14 +737,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -887,78 +756,90 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
};
-});
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-ace.define('ace/mode/ruby_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -1065,9 +946,70 @@ var RubyHighlightRules = function() {
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
},
- qString,
- qqString,
- tString,
+ [{
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren.lparen";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.start",
+ regex : /"/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /\#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /"/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /\#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /'/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\['\\]/
+ }, {
+ token : "string.end",
+ regex : /'/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
{
token : "text", // namespaces aren't symbols
@@ -1110,11 +1052,13 @@ var RubyHighlightRules = function() {
rules: {
heredoc: [{
onMatch: function(value, currentState, stack) {
- if (value == stack[1]) {
+ if (value === stack[1]) {
stack.shift();
stack.shift();
+ this.next = stack[0] || "start";
return "support.class";
}
+ this.next = "";
return "string";
},
regex: ".*$",
@@ -1125,11 +1069,13 @@ var RubyHighlightRules = function() {
regex: "^ +"
}, {
onMatch: function(value, currentState, stack) {
- if (value == stack[1]) {
+ if (value === stack[1]) {
stack.shift();
stack.shift();
+ this.next = stack[0] || "start";
return "support.class";
}
+ this.next = "";
return "string";
},
regex: ".*$",
@@ -1137,6 +1083,17 @@ var RubyHighlightRules = function() {
}]
}
}, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
+ token : "string.character",
+ regex : "\\B\\?."
+ }, {
token : "keyword.operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
}, {
@@ -1170,141 +1127,63 @@ oop.inherits(RubyHighlightRules, TextHighlightRules);
exports.RubyHighlightRules = RubyHighlightRules;
});
-ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(require, exports, module) {
+ace.define("ace/mode/html_ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"], function(require, exports, module) {
+ "use strict";
+ var oop = require("../lib/oop");
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+ var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-
-var Mode = function() {
- var highlighter = new HtmlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$behaviour = new HtmlBehaviour();
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.blockComment = {start: "<!--", end: "-->"};
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
- this.checkOutdent = function(state, line, input) {
- return false;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
+ var HtmlRubyHighlightRules = function() {
+ HtmlHighlightRules.call(this);
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
+ var startRules = [
+ {
+ regex: "<%%|%%>",
+ token: "constant.language.escape"
+ }, {
+ token : "comment.start.erb",
+ regex : "<%#",
+ push : [{
+ token : "comment.end.erb",
+ regex: "%>",
+ next: "pop",
+ defaultToken:"comment"
+ }]
+ }, {
+ token : "support.ruby_tag",
+ regex : "<%+(?!>)[-=]?",
+ push : "ruby-start"
}
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
+ ];
+
+ var endRules = [
+ {
+ token : "support.ruby_tag",
+ regex : "%>",
+ next : "pop"
+ }, {
+ token: "comment",
+ regex: "#(?:[^%]|%[^>])*"
}
- }
+ ];
- return indent;
- };
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
+ this.embedRules(RubyHighlightRules, "ruby-", endRules, ["start"]);
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+ this.normalizeRules();
};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-}).call(Mode.prototype);
+ oop.inherits(HtmlRubyHighlightRules, HtmlHighlightRules);
-exports.Mode = Mode;
+ exports.HtmlRubyHighlightRules = HtmlRubyHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -1343,8 +1222,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -1356,92 +1235,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -1456,6 +1296,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -1468,51 +1309,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -1521,6 +1368,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -1537,9 +1385,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -1549,15 +1398,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -1566,6 +1413,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -1582,9 +1430,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -1594,62 +1443,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -1661,13 +1507,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -1686,23 +1599,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -1715,48 +1660,118 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
- var highlighter = new CssHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.HighlightRules = JavaScriptHighlightRules;
+
this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CssBehaviour();
- this.$keywordList = highlighter.$keywordList;
+ this.$behaviour = new CstyleBehaviour();
this.foldingRules = new CStyleFoldMode();
};
oop.inherits(Mode, TextMode);
(function() {
- this.foldingRules = "cStyle";
+ this.lineCommentStart = "//";
this.blockComment = {start: "/*", end: "*/"};
this.getNextLineIndent = function(state, line, tab) {
var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
if (tokens.length && tokens[tokens.length-1].type == "comment") {
return indent;
}
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
}
return indent;
@@ -1771,11 +1786,11 @@ oop.inherits(Mode, TextMode);
};
this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
worker.attachToDocument(session.getDocument());
- worker.on("csslint", function(e) {
- session.setAnnotations(e.data);
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
});
worker.on("terminate", function() {
@@ -1785,14 +1800,14 @@ oop.inherits(Mode, TextMode);
return worker;
};
+ this.$id = "ace/mode/javascript";
}).call(Mode.prototype);
exports.Mode = Mode;
-
});
-ace.define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -1870,188 +1885,240 @@ oop.inherits(CssBehaviour, CstyleBehaviour);
exports.CssBehaviour = CssBehaviour;
});
-ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
-var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var Behaviour = require("../behaviour").Behaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
+var lang = require("../../lib/lang");
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
-var HtmlBehaviour = function () {
+var XmlBehaviour = function () {
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
var token = iterator.getCurrentToken();
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var element = token.value;
- if (atCursor){
- var element = element.substring(0, position.column - token.start);
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
}
- if (voidElements.indexOf(element) !== -1){
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
}
- return {
- text: '>' + '</' + element + '>',
- selection: [1, 1]
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
}
}
});
-}
-oop.inherits(HtmlBehaviour, XmlBehaviour);
-
-exports.HtmlBehaviour = HtmlBehaviour;
-});
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
});
- return hasType;
-}
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
if (text == '>') {
var position = editor.getCursorPosition();
var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
+ if (is(token, "reference.attribute-value"))
return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
}
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
}
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
return {
- text: '>' + '</' + tag + '>',
+ text: ">" + "</" + element + ">",
selection: [1, 1]
- }
+ };
}
});
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
if (text == "\n") {
var cursor = editor.getCursorPosition();
var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
}
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-exports.XmlBehaviour = XmlBehaviour;
-});
+ if (!token) {
+ return;
+ }
-ace.define('ace/mode/folding/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
-var oop = require("../../lib/oop");
-var MixedFoldMode = require("./mixed").FoldMode;
-var XmlFoldMode = require("./xml").FoldMode;
-var CStyleFoldMode = require("./cstyle").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
- "js-": new CStyleFoldMode(),
- "css-": new CStyleFoldMode()
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
});
+
};
-oop.inherits(FoldMode, MixedFoldMode);
+oop.inherits(XmlBehaviour, Behaviour);
+exports.XmlBehaviour = XmlBehaviour;
});
-ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -2104,8 +2171,8 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var lang = require("../../lib/lang");
@@ -2113,91 +2180,118 @@ var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var FoldMode = exports.FoldMode = function(voidElements) {
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
BaseFoldMode.call(this);
this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
};
oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
(function() {
this.getFoldWidget = function(session, foldStyle, row) {
var tag = this._getFirstTagInLine(session, row);
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ if (!tag)
return "";
- if (tag.selfClosing)
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
return "";
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
return "";
return "start";
};
-
this._getFirstTagInLine = function(session, row) {
var tokens = session.getTokens(row);
- var value = "";
+ var tag = new Tag();
+
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
- if (token.type.lastIndexOf("meta.tag", 0) === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
}
-
- return this._parseTag(value);
+
+ return null;
};
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = tag.match(this.tagRe);
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
var column = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
};
this._readTagForward = function(iterator) {
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var start;
-
+
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
}
} while(token = iterator.stepForward());
-
+
return null;
};
@@ -2205,32 +2299,24 @@ oop.inherits(FoldMode, BaseFoldMode);
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var end;
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
}
} while(token = iterator.stepBackward());
-
+
return null;
};
@@ -2241,10 +2327,7 @@ oop.inherits(FoldMode, BaseFoldMode);
if (!tag || top.tagName == tag.tagName) {
return stack.pop();
}
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
stack.pop();
continue;
} else {
@@ -2256,7 +2339,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.getFoldWidgetRange = function(session, foldStyle, row) {
var firstTag = this._getFirstTagInLine(session, row);
- if (!firstTag.match)
+ if (!firstTag)
return null;
var isBackward = firstTag.closing || firstTag.selfClosing;
@@ -2264,11 +2347,13 @@ oop.inherits(FoldMode, BaseFoldMode);
var tag;
if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
var start = {
row: row,
- column: firstTag.column + firstTag.tagName.length + 2
+ column: firstTag.start.column + firstTag.tagName.length + 2
};
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
while (tag = this._readTagForward(iterator)) {
if (tag.selfClosing) {
if (!stack.length) {
@@ -2285,15 +2370,15 @@ oop.inherits(FoldMode, BaseFoldMode);
return Range.fromPoints(start, tag.start);
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
var end = {
row: row,
- column: firstTag.column
+ column: firstTag.start.column
};
while (tag = this._readTagBackward(iterator)) {
@@ -2310,11 +2395,13 @@ oop.inherits(FoldMode, BaseFoldMode);
this._pop(stack, tag);
if (stack.length == 0) {
tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
return Range.fromPoints(tag.start, end);
}
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
@@ -2325,73 +2412,374 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/ruby', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ruby_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/folding/coffee'], function(require, exports, module) {
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var FoldMode = require("./folding/coffee").FoldMode;
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
-var Mode = function() {
- var highlighter = new RubyHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new FoldMode();
};
-oop.inherits(Mode, TextMode);
(function() {
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
- this.lineCommentStart = "#";
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
+ return [];
+ };
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
}
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- var startingClassOrMethod = line.match(/^\s*(class|def)\s.*$/);
- var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
- var startingConditional = line.match(/^\s*(if|else)\s*/)
- if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
- indent += tab;
- }
- }
+}).call(HtmlCompletions.prototype);
- return indent;
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
};
this.checkOutdent = function(state, line, input) {
- return /^\s+end$/.test(line + input) || /^\s+}$/.test(line + input) || /^\s+else$/.test(line + input);
+ return false;
};
- this.autoOutdent = function(state, doc, row) {
- var indent = this.$getIndent(doc.getLine(row));
- var tab = doc.getTabString();
- if (indent.slice(-tab.length) == tab)
- doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
};
+ this.$id = "ace/mode/html";
}).call(Mode.prototype);
exports.Mode = Mode;
});
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -2476,3 +2864,103 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = RubyHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
+ var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
+ var startingConditional = line.match(/^\s*(if|else)\s*/)
+ if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, session, row) {
+ var line = session.getLine(row);
+ if (/}/.test(line))
+ return this.$outdent.autoOutdent(session, row);
+ var indent = this.$getIndent(line);
+ var prevLine = session.getLine(row - 1);
+ var prevIndent = this.$getIndent(prevLine);
+ var tab = session.getTabString();
+ if (prevIndent.length <= indent.length) {
+ if (indent.slice(-tab.length) == tab)
+ session.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ }
+ };
+
+ this.$id = "ace/mode/ruby";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/html_ruby",["require","exports","module","ace/lib/oop","ace/mode/html_ruby_highlight_rules","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlRubyHighlightRules = require("./html_ruby_highlight_rules").HtmlRubyHighlightRules;
+var HtmlMode = require("./html").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var RubyMode = require("./ruby").Mode;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = HtmlRubyHighlightRules;
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode,
+ "ruby-": RubyMode
+ });
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+
+ this.$id = "ace/mode/html_ruby";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-ini.js b/js/vendor/ace/src-noconflict/mode-ini.js
index bb2f96f..32cf52b 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-ini.js
+++ b/js/vendor/ace/src-noconflict/mode-ini.js
@@ -1,116 +1,77 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/ini', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ini_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var IniHighlightRules = require("./ini_highlight_rules").IniHighlightRules;
-var FoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new IniHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = ";";
- this.blockComment = {start: "/*", end: "*/"};
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/ini_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/ini_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var IniHighlightRules = function() {
+var escapeRe = "\\\\(?:[\\\\0abtrn;#=:]|x[a-fA-F\\d]{4})";
- this.$rules = { start:
- [ { token: 'punctuation.definition.comment.ini',
- regex: '#.*',
- push_:
- [ { token: 'comment.line.number-sign.ini',
- regex: '$',
- next: 'pop' },
- { defaultToken: 'comment.line.number-sign.ini' } ] },
- { token: 'punctuation.definition.comment.ini',
- regex: ';.*',
- push_:
- [ { token: 'comment.line.semicolon.ini', regex: '$', next: 'pop' },
- { defaultToken: 'comment.line.semicolon.ini' } ] },
- { token:
- [ 'keyword.other.definition.ini',
- 'text',
- 'punctuation.separator.key-value.ini' ],
- regex: '\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)' },
- { token:
- [ 'punctuation.definition.entity.ini',
- 'constant.section.group-title.ini',
- 'punctuation.definition.entity.ini' ],
- regex: '^(\\[)(.*?)(\\])' },
- { token: 'punctuation.definition.string.begin.ini',
- regex: '\'',
- push:
- [ { token: 'punctuation.definition.string.end.ini',
- regex: '\'',
- next: 'pop' },
- { token: 'constant.character.escape.ini', regex: '\\\\.' },
- { defaultToken: 'string.quoted.single.ini' } ] },
- { token: 'punctuation.definition.string.begin.ini',
- regex: '"',
- push:
- [ { token: 'punctuation.definition.string.end.ini',
+var IniHighlightRules = function() {
+ this.$rules = {
+ start: [{
+ token: 'punctuation.definition.comment.ini',
+ regex: '#.*',
+ push_: [{
+ token: 'comment.line.number-sign.ini',
+ regex: '$|^',
+ next: 'pop'
+ }, {
+ defaultToken: 'comment.line.number-sign.ini'
+ }]
+ }, {
+ token: 'punctuation.definition.comment.ini',
+ regex: ';.*',
+ push_: [{
+ token: 'comment.line.semicolon.ini',
+ regex: '$|^',
+ next: 'pop'
+ }, {
+ defaultToken: 'comment.line.semicolon.ini'
+ }]
+ }, {
+ token: ['keyword.other.definition.ini', 'text', 'punctuation.separator.key-value.ini'],
+ regex: '\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)'
+ }, {
+ token: ['punctuation.definition.entity.ini', 'constant.section.group-title.ini', 'punctuation.definition.entity.ini'],
+ regex: '^(\\[)(.*?)(\\])'
+ }, {
+ token: 'punctuation.definition.string.begin.ini',
+ regex: "'",
+ push: [{
+ token: 'punctuation.definition.string.end.ini',
+ regex: "'",
+ next: 'pop'
+ }, {
+ token: "constant.language.escape",
+ regex: escapeRe
+ }, {
+ defaultToken: 'string.quoted.single.ini'
+ }]
+ }, {
+ token: 'punctuation.definition.string.begin.ini',
+ regex: '"',
+ push: [{
+ token: "constant.language.escape",
+ regex: escapeRe
+ }, {
+ token: 'punctuation.definition.string.end.ini',
regex: '"',
- next: 'pop' },
- { defaultToken: 'string.quoted.double.ini' } ] } ] }
-
+ next: 'pop'
+ }, {
+ defaultToken: 'string.quoted.double.ini'
+ }]
+ }]
+ };
+
this.normalizeRules();
};
-IniHighlightRules.metaData = { fileTypes: [ 'ini', 'conf' ],
- keyEquivalent: '^~I',
- name: 'Ini',
- scopeName: 'source.ini' }
+IniHighlightRules.metaData = {
+ fileTypes: ['ini', 'conf'],
+ keyEquivalent: '^~I',
+ name: 'Ini',
+ scopeName: 'source.ini'
+};
oop.inherits(IniHighlightRules, TextHighlightRules);
@@ -118,56 +79,76 @@ oop.inherits(IniHighlightRules, TextHighlightRules);
exports.IniHighlightRules = IniHighlightRules;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
-var FoldMode = exports.FoldMode = function(commentRegex) {
- if (commentRegex) {
- this.foldingStartMarker = new RegExp(
- this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
- );
- this.foldingStopMarker = new RegExp(
- this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
- );
- }
+var FoldMode = exports.FoldMode = function() {
};
oop.inherits(FoldMode, BaseFoldMode);
(function() {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.foldingStartMarker = /^\s*\[([^\])]*)]\s*(?:$|[;#])/;
this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var re = this.foldingStartMarker;
var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
+
+ var m = line.match(re);
+
+ if (!m) return;
+
+ var startName = m[1] + ".";
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ if (/^\s*$/.test(line))
+ continue;
+ m = line.match(re);
+ if (m && m[1].lastIndexOf(startName, 0) !== 0)
+ break;
+
+ endRow = row;
+ }
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
}
+ };
- if (foldStyle !== "markbeginend")
- return;
+}).call(FoldMode.prototype);
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
+});
- if (match[1])
- return this.closingBracketBlock(session, match[1], row, i);
+ace.define("ace/mode/ini",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ini_highlight_rules","ace/mode/folding/ini"], function(require, exports, module) {
+"use strict";
- return session.getCommentFoldRange(row, i, -1);
- }
- };
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var IniHighlightRules = require("./ini_highlight_rules").IniHighlightRules;
+var FoldMode = require("./folding/ini").FoldMode;
-}).call(FoldMode.prototype);
+var Mode = function() {
+ this.HighlightRules = IniHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+(function() {
+ this.lineCommentStart = ";";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/ini";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
});
diff --git a/js/vendor/ace/src-noconflict/mode-io.js b/js/vendor/ace/src-noconflict/mode-io.js
new file mode 100755
index 0000000..3fd016e
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-io.js
@@ -0,0 +1,246 @@
+ace.define("ace/mode/io_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var IoHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token: [ 'text', 'meta.empty-parenthesis.io' ],
+ regex: '(\\()(\\))',
+ comment: 'we match this to overload return inside () --Allan; scoping rules for what gets the scope have changed, so we now group the ) instead of the ( -- Rob' },
+ { token: [ 'text', 'meta.comma-parenthesis.io' ],
+ regex: '(\\,)(\\))',
+ comment: 'We want to do the same for ,) -- Seckar; same as above -- Rob' },
+ { token: 'keyword.control.io',
+ regex: '\\b(?:if|ifTrue|ifFalse|ifTrueIfFalse|for|loop|reverseForeach|foreach|map|continue|break|while|do|return)\\b' },
+ { token: 'punctuation.definition.comment.io',
+ regex: '/\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.io',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.io' } ] },
+ { token: 'punctuation.definition.comment.io',
+ regex: '//',
+ push:
+ [ { token: 'comment.line.double-slash.io',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.double-slash.io' } ] },
+ { token: 'punctuation.definition.comment.io',
+ regex: '#',
+ push:
+ [ { token: 'comment.line.number-sign.io', regex: '$', next: 'pop' },
+ { defaultToken: 'comment.line.number-sign.io' } ] },
+ { token: 'variable.language.io',
+ regex: '\\b(?:self|sender|target|proto|protos|parent)\\b',
+ comment: 'I wonder if some of this isn\'t variable.other.language? --Allan; scoping this as variable.language to match Objective-C\'s handling of \'self\', which is inconsistent with C++\'s handling of \'this\' but perhaps intentionally so -- Rob' },
+ { token: 'keyword.operator.io',
+ regex: '<=|>=|=|:=|\\*|\\||\\|\\||\\+|-|/|&|&&|>|<|\\?|@|@@|\\b(?:and|or)\\b' },
+ { token: 'constant.other.io', regex: '\\bGL[\\w_]+\\b' },
+ { token: 'support.class.io', regex: '\\b[A-Z](?:\\w+)?\\b' },
+ { token: 'support.function.io',
+ regex: '\\b(?:clone|call|init|method|list|vector|block|\\w+(?=\\s*\\())\\b' },
+ { token: 'support.function.open-gl.io',
+ regex: '\\bgl(?:u|ut)?[A-Z]\\w+\\b' },
+ { token: 'punctuation.definition.string.begin.io',
+ regex: '"""',
+ push:
+ [ { token: 'punctuation.definition.string.end.io',
+ regex: '"""',
+ next: 'pop' },
+ { token: 'constant.character.escape.io', regex: '\\\\.' },
+ { defaultToken: 'string.quoted.triple.io' } ] },
+ { token: 'punctuation.definition.string.begin.io',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.io',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.io', regex: '\\\\.' },
+ { defaultToken: 'string.quoted.double.io' } ] },
+ { token: 'constant.numeric.io',
+ regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b' },
+ { token: 'variable.other.global.io', regex: 'Lobby\\b' },
+ { token: 'constant.language.io',
+ regex: '\\b(?:TRUE|true|FALSE|false|NULL|null|Null|Nil|nil|YES|NO)\\b' } ] }
+
+ this.normalizeRules();
+};
+
+IoHighlightRules.metaData = { fileTypes: [ 'io' ],
+ keyEquivalent: '^~I',
+ name: 'Io',
+ scopeName: 'source.io' }
+
+
+oop.inherits(IoHighlightRules, TextHighlightRules);
+
+exports.IoHighlightRules = IoHighlightRules;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/io",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/io_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var IoHighlightRules = require("./io_highlight_rules").IoHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = IoHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/io"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-jack.js b/js/vendor/ace/src-noconflict/mode-jack.js
new file mode 100755
index 0000000..14f98e1
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-jack.js
@@ -0,0 +1,696 @@
+ace.define("ace/mode/jack_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JackHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : "string",
+ regex : '"',
+ next : "string2"
+ }, {
+ token : "string",
+ regex : "'",
+ next : "string1"
+ }, {
+ token : "constant.numeric", // hex
+ regex: "-?0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "(?:0|[-+]?[1-9][0-9]*)\\b"
+ }, {
+ token : "constant.binary",
+ regex : "<[0-9A-Fa-f][0-9A-Fa-f](\\s+[0-9A-Fa-f][0-9A-Fa-f])*>"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : "constant.language.null",
+ regex : "null\\b"
+ }, {
+ token : "storage.type",
+ regex: "(?:Integer|Boolean|Null|String|Buffer|Tuple|List|Object|Function|Coroutine|Form)\\b"
+ }, {
+ token : "keyword",
+ regex : "(?:return|abort|vars|for|delete|in|is|escape|exec|split|and|if|elif|else|while)\\b"
+ }, {
+ token : "language.builtin",
+ regex : "(?:lines|source|parse|read-stream|interval|substr|parseint|write|print|range|rand|inspect|bind|i-values|i-pairs|i-map|i-filter|i-chunk|i-all\\?|i-any\\?|i-collect|i-zip|i-merge|i-each)\\b"
+ }, {
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "storage.form",
+ regex : "@[a-z]+"
+ }, {
+ token : "constant.other.symbol",
+ regex : ':+[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?'
+ }, {
+ token : "variable",
+ regex : '[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?'
+ }, {
+ token : "keyword.operator",
+ regex : "\\|\\||\\^\\^|&&|!=|==|<=|<|>=|>|\\+|-|\\*|\\/|\\^|\\%|\\#|\\!"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "string1" : [
+ {
+ token : "constant.language.escape",
+ regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/
+ }, {
+ token : "string",
+ regex : "[^'\\\\]+"
+ }, {
+ token : "string",
+ regex : "'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : "",
+ next : "start"
+ }
+ ],
+ "string2" : [
+ {
+ token : "constant.language.escape",
+ regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/
+ }, {
+ token : "string",
+ regex : '[^"\\\\]+'
+ }, {
+ token : "string",
+ regex : '"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : "",
+ next : "start"
+ }
+ ]
+ };
+
+};
+
+oop.inherits(JackHighlightRules, TextHighlightRules);
+
+exports.JackHighlightRules = JackHighlightRules;
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/jack",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jack_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var HighlightRules = require("./jack_highlight_rules").JackHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+
+ this.$id = "ace/mode/jack";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-jade.js b/js/vendor/ace/src-noconflict/mode-jade.js
index 360baf3..2a23b95 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-jade.js
+++ b/js/vendor/ace/src-noconflict/mode-jade.js
@@ -1,468 +1,61 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- * Garen J. Torikian <gjtorikian @ gmail DOT com>
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/jade', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/jade_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JadeHighlightRules = require("./jade_highlight_rules").JadeHighlightRules;
-var FoldMode = require("./folding/coffee").FoldMode;
-
-var Mode = function() {
- var highlighter = new JadeHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.foldingRules = new FoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "//";
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/jade_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/markdown_highlight_rules', 'ace/mode/scss_highlight_rules', 'ace/mode/less_highlight_rules', 'ace/mode/coffee_highlight_rules', 'ace/mode/javascript_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
-var SassHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
-var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
-var CoffeeHighlightRules = require("./coffee_highlight_rules").CoffeeHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-
-function mixin_embed(tag, prefix) {
- return {
- token : "entity.name.function.jade",
- regex : "^\\s*\\:" + tag,
- next : prefix + "start"
- };
-}
-var JadeHighlightRules = function() {
-
- var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
- "u[0-9a-fA-F]{4}|" + // unicode
- "[0-2][0-7]{0,2}|" + // oct
- "3[0-6][0-7]?|" + // oct
- "37[0-7]?|" + // oct
- "[4-7][0-7]?|" + //oct
- ".)";
-
- this.$rules =
- {
- "start": [
- {
- token: "keyword.control.import.include.jade",
- regex: "\\s*\\binclude\\b"
- },
- {
- token: "keyword.other.doctype.jade",
- regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
- },
- {
- token : "punctuation.section.comment",
- regex : "^\\s*\/\/(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)"
- },
- {
- onMatch: function(value, currentState, stack) {
- stack.unshift(this.next, value.length - 2, currentState);
- return "comment";
- },
- regex: /^\s*\/\//,
- next: "comment_block"
- },
- mixin_embed("markdown", "markdown-"),
- mixin_embed("sass", "sass-"),
- mixin_embed("less", "less-"),
- mixin_embed("coffee", "coffee-"),
- {
- token: [ "storage.type.function.jade",
- "entity.name.function.jade",
- "punctuation.definition.parameters.begin.jade",
- "variable.parameter.function.jade",
- "punctuation.definition.parameters.end.jade"
- ],
- regex: "^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))"
- },
- {
- token: [ "storage.type.function.jade", "entity.name.function.jade"],
- regex: "^(\\s*mixin)( [\\w\\-]+)"
- },
- {
- token: "source.js.embedded.jade",
- regex: "^\\s*(?:-|=|!=)",
- next: "js-start"
- },
- {
- token: "string.interpolated.jade",
- regex: "[#!]\\{[^\\}]+\\}"
- },
- {
- token: "meta.tag.any.jade",
- regex: /^\s*(?!\w+\:)(?:[\w]+|(?=\.|#)])/,
- next: "tag_single"
- },
- {
- token: "suport.type.attribute.id.jade",
- regex: "#\\w+"
- },
- {
- token: "suport.type.attribute.class.jade",
- regex: "\\.\\w+"
- },
- {
- token: "punctuation",
- regex: "\\s*(?:\\()",
- next: "tag_attributes"
- }
- ],
- "comment_block": [
- {regex: /^\s*/, onMatch: function(value, currentState, stack) {
- if (value.length <= stack[1]) {
- stack.shift();
- stack.shift();
- this.next = stack.shift();
- return "text";
- } else {
- this.next = "";
- return "comment";
- }
- }, next: "start"},
- {defaultToken: "comment"}
- ],
- "tag_single": [
- {
- token: "entity.other.attribute-name.class.jade",
- regex: "\\.[\\w-]+"
- },
- {
- token: "entity.other.attribute-name.id.jade",
- regex: "#[\\w-]+"
- },
- {
- token: ["text", "punctuation"],
- regex: "($)|((?!\\.|#|=|-))",
- next: "start"
- }
- ],
- "tag_attributes": [
- {
- token : "string",
- regex : "'(?=.)",
- next : "qstring"
- },
- {
- token : "string",
- regex : '"(?=.)',
- next : "qqstring"
- },
- {
- token: "entity.other.attribute-name.jade",
- regex: "\\b[a-zA-Z\\-:]+"
- },
- {
- token: ["entity.other.attribute-name.jade", "punctuation"],
- regex: "\\b([a-zA-Z:\\.-]+)(=)",
- next: "attribute_strings"
- },
- {
- token: "punctuation",
- regex: "\\)",
- next: "start"
- }
- ],
- "attribute_strings": [
- {
- token : "string",
- regex : "'(?=.)",
- next : "qstring"
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
},
+ DocCommentHighlightRules.getTagRule(),
{
- token : "string",
- regex : '"(?=.)',
- next : "qqstring"
- }
- ],
- "qqstring" : [
- {
- token : "constant.language.escape",
- regex : escapedRe
- }, {
- token : "string",
- regex : '[^"\\\\]+'
- }, {
- token : "string",
- regex : "\\\\$",
- next : "qqstring"
- }, {
- token : "string",
- regex : '"|$',
- next : "tag_attributes"
- }
- ],
- "qstring" : [
- {
- token : "constant.language.escape",
- regex : escapedRe
- }, {
- token : "string",
- regex : "[^'\\\\]+"
- }, {
- token : "string",
- regex : "\\\\$",
- next : "qstring"
- }, {
- token : "string",
- regex : "'|$",
- next : "tag_attributes"
- }
- ]
-};
-
- this.embedRules(JavaScriptHighlightRules, "js-", [{
- token: "text",
- regex: ".$",
- next: "start"
- }]);
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
};
-oop.inherits(JadeHighlightRules, TextHighlightRules);
-
-exports.JadeHighlightRules = JadeHighlightRules;
-});
-
-ace.define('ace/mode/markdown_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/html_highlight_rules', 'ace/mode/css_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-
-var escaped = function(ch) {
- return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
-}
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-function github_embed(tag, prefix) {
- return { // Github style block
- token : "support.function",
- regex : "^```" + tag + "\\s*$",
- push : prefix + "start"
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
}
-var MarkdownHighlightRules = function() {
- HtmlHighlightRules.call(this);
-
- this.$rules["start"].unshift({
- token : "empty_line",
- regex : '^$',
- next: "allowBlock"
- }, { // h1
- token: "markup.heading.1",
- regex: "^=+(?=\\s*$)"
- }, { // h2
- token: "markup.heading.2",
- regex: "^\\-+(?=\\s*$)"
- }, {
- token : function(value) {
- return "markup.heading." + value.length;
- },
- regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/,
- next : "header"
- },
- github_embed("(?:javascript|js)", "jscode-"),
- github_embed("xml", "xmlcode-"),
- github_embed("html", "htmlcode-"),
- github_embed("css", "csscode-"),
- { // Github style block
- token : "support.function",
- regex : "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
- next : "githubblock"
- }, { // block quote
- token : "string",
- regex : "^>[ ].+$",
- next : "blockquote"
- }, { // HR * - _
- token : "constant",
- regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",
- next: "allowBlock"
- }, { // list
- token : "markup.list",
- regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
- next : "listblock-start"
- }, {
- include : "basic"
- });
-
- this.addRules({
- "basic" : [{
- token : "constant.language.escape",
- regex : /\\[\\`*_{}\[\]()#+\-.!]/
- }, { // code span `
- token : "support.function",
- regex : "(`+)(.*?[^`])(\\1)"
- }, { // reference
- token : ["text", "constant", "text", "url", "string", "text"],
- regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
- }, { // link by reference
- token : ["text", "string", "text", "constant", "text"],
- regex : "(\\[)(" + escaped("]") + ")(\\]\s*\\[)("+ escaped("]") + ")(\\])"
- }, { // link by url
- token : ["text", "string", "text", "markup.underline", "string", "text"],
- regex : "(\\[)(" + // [
- escaped("]") + // link text
- ")(\\]\\()"+ // ](
- '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href
- '(\\s*"' + escaped('"') + '"\\s*)?' + // "title"
- "(\\))" // )
- }, { // strong ** __
- token : "string",
- regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"
- }, { // emphasis * _
- token : "string",
- regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"
- }, { //
- token : ["text", "url", "text"],
- regex : "(<)("+
- "(?:https?|ftp|dict):[^'\">\\s]+"+
- "|"+
- "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
- ")(>)"
- }],
- "allowBlock": [
- {token : "support.function", regex : "^ {4}.+", next : "allowBlock"},
- {token : "empty", regex : "", next : "start"}
- ],
-
- "header" : [{
- regex: "$",
- next : "start"
- }, {
- include: "basic"
- }, {
- defaultToken : "heading"
- } ],
-
- "listblock-start" : [{
- token : "support.variable",
- regex : /(?:\[[ x]\])?/,
- next : "listblock"
- }],
-
- "listblock" : [ { // Lists only escape on completely blank lines.
- token : "empty_line",
- regex : "^$",
- next : "start"
- }, { // list
- token : "markup.list",
- regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
- next : "listblock-start"
- }, {
- include : "basic", noEscape: true
- }, {
- defaultToken : "list"
- } ],
-
- "blockquote" : [ { // BLockquotes only escape on blank lines.
- token : "empty_line",
- regex : "^\\s*$",
- next : "start"
- }, {
- token : "string",
- regex : ".+"
- } ],
-
- "githubblock" : [ {
- token : "support.function",
- regex : "^```",
- next : "start"
- }, {
- token : "support.function",
- regex : ".+"
- } ]
- });
-
- this.embedRules(JavaScriptHighlightRules, "jscode-", [{
- token : "support.function",
- regex : "^```",
- next : "pop"
- }]);
-
- this.embedRules(HtmlHighlightRules, "htmlcode-", [{
- token : "support.function",
- regex : "^```",
- next : "pop"
- }]);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
- this.embedRules(CssHighlightRules, "csscode-", [{
- token : "support.function",
- regex : "^```",
- next : "pop"
- }]);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
- this.embedRules(XmlHighlightRules, "xmlcode-", [{
- token : "support.function",
- regex : "^```",
- next : "pop"
- }]);
- this.normalizeRules();
-};
-oop.inherits(MarkdownHighlightRules, TextHighlightRules);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.MarkdownHighlightRules = MarkdownHighlightRules;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -583,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -609,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -647,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -672,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -706,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -754,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -764,111 +400,83 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -876,75 +484,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
}, {
- include : "string"
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -957,18 +575,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -976,14 +593,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -995,180 +612,17 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
-
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
-
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
-
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
-
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
-
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
-};
-
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
-
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -1302,8 +756,285 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/scss_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+
+var escaped = function(ch) {
+ return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
+}
+
+function github_embed(tag, prefix) {
+ return { // Github style block
+ token : "support.function",
+ regex : "^\\s*```" + tag + "\\s*$",
+ push : prefix + "start"
+ };
+}
+
+var MarkdownHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ this.$rules["start"].unshift({
+ token : "empty_line",
+ regex : '^$',
+ next: "allowBlock"
+ }, { // h1
+ token: "markup.heading.1",
+ regex: "^=+(?=\\s*$)"
+ }, { // h2
+ token: "markup.heading.2",
+ regex: "^\\-+(?=\\s*$)"
+ }, {
+ token : function(value) {
+ return "markup.heading." + value.length;
+ },
+ regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/,
+ next : "header"
+ },
+ github_embed("(?:javascript|js)", "jscode-"),
+ github_embed("xml", "xmlcode-"),
+ github_embed("html", "htmlcode-"),
+ github_embed("css", "csscode-"),
+ { // Github style block
+ token : "support.function",
+ regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
+ }, { // block quote
+ token : "string.blockquote",
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
+ next : "blockquote"
+ }, { // HR * - _
+ token : "constant",
+ regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",
+ next: "allowBlock"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock-start"
+ }, {
+ include : "basic"
+ });
+
+ this.addRules({
+ "basic" : [{
+ token : "constant.language.escape",
+ regex : /\\[\\`*_{}\[\]()#+\-.!]/
+ }, { // code span `
+ token : "support.function",
+ regex : "(`+)(.*?[^`])(\\1)"
+ }, { // reference
+ token : ["text", "constant", "text", "url", "string", "text"],
+ regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
+ }, { // link by reference
+ token : ["text", "string", "text", "constant", "text"],
+ regex : "(\\[)(" + escaped("]") + ")(\\]\s*\\[)("+ escaped("]") + ")(\\])"
+ }, { // link by url
+ token : ["text", "string", "text", "markup.underline", "string", "text"],
+ regex : "(\\[)(" + // [
+ escaped("]") + // link text
+ ")(\\]\\()"+ // ](
+ '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href
+ '(\\s*"' + escaped('"') + '"\\s*)?' + // "title"
+ "(\\))" // )
+ }, { // strong ** __
+ token : "string.strong",
+ regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"
+ }, { // emphasis * _
+ token : "string.emphasis",
+ regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"
+ }, { //
+ token : ["text", "url", "text"],
+ regex : "(<)("+
+ "(?:https?|ftp|dict):[^'\">\\s]+"+
+ "|"+
+ "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
+ ")(>)"
+ }],
+ "allowBlock": [
+ {token : "support.function", regex : "^ {4}.+", next : "allowBlock"},
+ {token : "empty", regex : "", next : "start"}
+ ],
+
+ "header" : [{
+ regex: "$",
+ next : "start"
+ }, {
+ include: "basic"
+ }, {
+ defaultToken : "heading"
+ } ],
+
+ "listblock-start" : [{
+ token : "support.variable",
+ regex : /(?:\[[ x]\])?/,
+ next : "listblock"
+ }],
+
+ "listblock" : [ { // Lists only escape on completely blank lines.
+ token : "empty_line",
+ regex : "^$",
+ next : "start"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock-start"
+ }, {
+ include : "basic", noEscape: true
+ }, { // Github style block
+ token : "support.function",
+ regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
+ }, {
+ defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
+ } ],
+
+ "blockquote" : [ { // Blockquotes only escape on blank lines.
+ token : "empty_line",
+ regex : "^\\s*$",
+ next : "start"
+ }, { // block quote
+ token : "string.blockquote",
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
+ next : "blockquote"
+ }, {
+ include : "basic", noEscape: true
+ }, {
+ defaultToken : "string.blockquote"
+ } ],
+
+ "githubblock" : [ {
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "start"
+ }, {
+ token : "support.function",
+ regex : ".+"
+ } ]
+ });
+
+ this.embedRules(JavaScriptHighlightRules, "jscode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(HtmlHighlightRules, "htmlcode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(CssHighlightRules, "csscode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(XmlHighlightRules, "xmlcode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.normalizeRules();
+};
+oop.inherits(MarkdownHighlightRules, TextHighlightRules);
+
+exports.MarkdownHighlightRules = MarkdownHighlightRules;
+});
+
+ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -1556,8 +1287,8 @@ exports.ScssHighlightRules = ScssHighlightRules;
});
-ace.define('ace/mode/less_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -1785,8 +1516,8 @@ exports.LessHighlightRules = LessHighlightRules;
});
-ace.define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -1798,7 +1529,7 @@ ace.define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' ,
var keywords = (
"this|throw|then|try|typeof|super|switch|return|break|by|continue|" +
- "catch|class|in|instanceof|is|isnt|if|else|extends|for|forown|" +
+ "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" +
"finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" +
"or|on|unless|until|and|yes"
);
@@ -1899,7 +1630,7 @@ ace.define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' ,
}
if (val == "}" && stack.length) {
stack.shift();
- this.next = stack.shift();
+ this.next = stack.shift() || "";
if (this.next.indexOf("string") != -1)
return "paren.string";
}
@@ -1987,8 +1718,220 @@ ace.define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' ,
exports.CoffeeHighlightRules = CoffeeHighlightRules;
});
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+ace.define("ace/mode/jade_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/scss_highlight_rules","ace/mode/less_highlight_rules","ace/mode/coffee_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
+var SassHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
+var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
+var CoffeeHighlightRules = require("./coffee_highlight_rules").CoffeeHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+
+function mixin_embed(tag, prefix) {
+ return {
+ token : "entity.name.function.jade",
+ regex : "^\\s*\\:" + tag,
+ next : prefix + "start"
+ };
+}
+var JadeHighlightRules = function() {
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules =
+ {
+ "start": [
+ {
+ token: "keyword.control.import.include.jade",
+ regex: "\\s*\\binclude\\b"
+ },
+ {
+ token: "keyword.other.doctype.jade",
+ regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
+ },
+ {
+ token : "punctuation.section.comment",
+ regex : "^\\s*\/\/(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)"
+ },
+ {
+ onMatch: function(value, currentState, stack) {
+ stack.unshift(this.next, value.length - 2, currentState);
+ return "comment";
+ },
+ regex: /^\s*\/\//,
+ next: "comment_block"
+ },
+ mixin_embed("markdown", "markdown-"),
+ mixin_embed("sass", "sass-"),
+ mixin_embed("less", "less-"),
+ mixin_embed("coffee", "coffee-"),
+ {
+ token: [ "storage.type.function.jade",
+ "entity.name.function.jade",
+ "punctuation.definition.parameters.begin.jade",
+ "variable.parameter.function.jade",
+ "punctuation.definition.parameters.end.jade"
+ ],
+ regex: "^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))"
+ },
+ {
+ token: [ "storage.type.function.jade", "entity.name.function.jade"],
+ regex: "^(\\s*mixin)( [\\w\\-]+)"
+ },
+ {
+ token: "source.js.embedded.jade",
+ regex: "^\\s*(?:-|=|!=)",
+ next: "js-start"
+ },
+ {
+ token: "string.interpolated.jade",
+ regex: "[#!]\\{[^\\}]+\\}"
+ },
+ {
+ token: "meta.tag.any.jade",
+ regex: /^\s*(?!\w+\:)(?:[\w]+|(?=\.|#)])/,
+ next: "tag_single"
+ },
+ {
+ token: "suport.type.attribute.id.jade",
+ regex: "#\\w+"
+ },
+ {
+ token: "suport.type.attribute.class.jade",
+ regex: "\\.\\w+"
+ },
+ {
+ token: "punctuation",
+ regex: "\\s*(?:\\()",
+ next: "tag_attributes"
+ }
+ ],
+ "comment_block": [
+ {regex: /^\s*/, onMatch: function(value, currentState, stack) {
+ if (value.length <= stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack.shift();
+ return "text";
+ } else {
+ this.next = "";
+ return "comment";
+ }
+ }, next: "start"},
+ {defaultToken: "comment"}
+ ],
+ "tag_single": [
+ {
+ token: "entity.other.attribute-name.class.jade",
+ regex: "\\.[\\w-]+"
+ },
+ {
+ token: "entity.other.attribute-name.id.jade",
+ regex: "#[\\w-]+"
+ },
+ {
+ token: ["text", "punctuation"],
+ regex: "($)|((?!\\.|#|=|-))",
+ next: "start"
+ }
+ ],
+ "tag_attributes": [
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ },
+ {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ },
+ {
+ token: "entity.other.attribute-name.jade",
+ regex: "\\b[a-zA-Z\\-:]+"
+ },
+ {
+ token: ["entity.other.attribute-name.jade", "punctuation"],
+ regex: "\\b([a-zA-Z:\\.-]+)(=)",
+ next: "attribute_strings"
+ },
+ {
+ token: "punctuation",
+ regex: "\\)",
+ next: "start"
+ }
+ ],
+ "attribute_strings": [
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ },
+ {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : '[^"\\\\]+'
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "tag_attributes"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "[^'\\\\]+"
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "tag_attributes"
+ }
+ ]
+};
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token: "text",
+ regex: ".$",
+ next: "start"
+ }]);
+};
+
+oop.inherits(JadeHighlightRules, TextHighlightRules);
+
+exports.JadeHighlightRules = JadeHighlightRules;
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -2073,3 +2016,26 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/jade",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jade_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JadeHighlightRules = require("./jade_highlight_rules").JadeHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JadeHighlightRules;
+
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.$id = "ace/mode/jade";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-java.js b/js/vendor/ace/src-noconflict/mode-java.js
index cc71e03..f94fbed 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-java.js
+++ b/js/vendor/ace/src-noconflict/mode-java.js
@@ -1,128 +1,61 @@
-ace.define('ace/mode/java', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/java_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var JavaScriptMode = require("./javascript").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
-
-var Mode = function() {
- JavaScriptMode.call(this);
- var highlighter = new JavaHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
-};
-oop.inherits(Mode, JavaScriptMode);
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-(function() {
-
- this.createWorker = function(session) {
- return null;
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
};
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-}).call(Mode.prototype);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -243,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -269,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -307,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -332,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -366,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -414,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -424,52 +400,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -508,8 +440,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -521,92 +453,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -621,6 +514,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -633,51 +527,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -686,6 +586,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -702,9 +603,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -714,15 +616,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -731,6 +631,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -747,9 +648,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -759,62 +661,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -826,13 +725,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -851,23 +817,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -880,12 +878,154 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/java_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
@@ -954,9 +1094,6 @@ var JavaHighlightRules = function() {
regex : "\\/\\*",
next : "comment"
}, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
token : "string", // single line
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
@@ -1008,3 +1145,28 @@ oop.inherits(JavaHighlightRules, TextHighlightRules);
exports.JavaHighlightRules = JavaHighlightRules;
});
+
+ace.define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/java_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+ this.HighlightRules = JavaHighlightRules;
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.$id = "ace/mode/java";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-javascript.js b/js/vendor/ace/src-noconflict/mode-javascript.js
index bf54175..9942010 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-javascript.js
+++ b/js/vendor/ace/src-noconflict/mode-javascript.js
@@ -1,130 +1,61 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-}).call(Mode.prototype);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -245,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -271,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -309,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -334,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -368,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -416,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -426,52 +400,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -510,8 +440,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -523,92 +453,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -623,6 +514,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -635,51 +527,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -688,6 +586,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -704,9 +603,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -716,15 +616,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -733,6 +631,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -749,9 +648,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -761,62 +661,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -828,13 +725,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -853,23 +817,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -882,7 +878,148 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-json.js b/js/vendor/ace/src-noconflict/mode-json.js
index f0cecb2..4e4df5a 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-json.js
+++ b/js/vendor/ace/src-noconflict/mode-json.js
@@ -1,99 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/json', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/json_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/worker/worker_client'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HighlightRules = require("./json_highlight_rules").JsonHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new HighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/json_worker", "JsonWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("error", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("ok", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/json_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -160,8 +66,8 @@ oop.inherits(JsonHighlightRules, TextHighlightRules);
exports.JsonHighlightRules = JsonHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -200,8 +106,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -213,92 +119,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -313,6 +180,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -325,51 +193,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -378,6 +252,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -394,9 +269,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -406,15 +282,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -423,6 +297,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -439,9 +314,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -451,62 +327,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -518,13 +391,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -543,23 +483,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -572,7 +544,125 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var HighlightRules = require("./json_highlight_rules").JsonHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+
+var Mode = function() {
+ this.HighlightRules = HighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/json_worker", "JsonWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+
+ this.$id = "ace/mode/json";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-jsoniq.js b/js/vendor/ace/src-noconflict/mode-jsoniq.js
index 47d2c07..d1c38ba 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-jsoniq.js
+++ b/js/vendor/ace/src-noconflict/mode-jsoniq.js
@@ -1,384 +1,6 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-ace.define('ace/mode/jsoniq', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/xquery/JSONiqLexer', 'ace/range', 'ace/mode/behaviour/xquery', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JSONiqLexer = require("./xquery/JSONiqLexer").JSONiqLexer;
-var Range = require("../range").Range;
-var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-
-var Mode = function() {
- this.$tokenizer = new JSONiqLexer();
- this.$behaviour = new XQueryBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);
- if (match)
- indent += tab;
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*[\}\)]/.test(input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*[\}\)])/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var i, line;
- var outdent = true;
- var re = /^\s*\(:(.*):\)/;
-
- for (i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- var range = new Range(0, 0, 0, 0);
- for (i=startRow; i<= endRow; i++) {
- line = doc.getLine(i);
- range.start.row = i;
- range.end.row = i;
- range.end.column = line.length;
-
- doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)");
- }
- };
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/xquery/JSONiqLexer', ['require', 'exports', 'module' , 'ace/mode/xquery/JSONiqTokenizer'], function(require, exports, module) {
-
- var JSONiqTokenizer = require("./JSONiqTokenizer").JSONiqTokenizer;
-
- var TokenHandler = function(code) {
-
- var input = code;
-
- this.tokens = [];
-
- this.reset = function(code) {
- input = input;
- this.tokens = [];
- };
-
- this.startNonterminal = function(name, begin) {};
-
- this.endNonterminal = function(name, end) {};
-
- this.terminal = function(name, begin, end) {
- this.tokens.push({
- name: name,
- value: input.substring(begin, end)
- });
- };
-
- this.whitespace = function(begin, end) {
- this.tokens.push({
- name: "WS",
- value: input.substring(begin, end)
- });
- };
- };
- var keys = "NaN|after|allowing|ancestor|ancestor-or-self|and|append|array|as|ascending|at|attribute|base-uri|before|boundary-space|break|by|case|cast|castable|catch|child|collation|comment|constraint|construction|contains|context|continue|copy|copy-namespaces|count|decimal-format|decimal-separator|declare|default|delete|descendant|descendant-or-self|descending|digit|div|document|document-node|element|else|empty|empty-sequence|encoding|end|eq|every|except|exit|external|false|first|following|following-sibling|for|from|ft-option|function|ge|greatest|group|grouping-separator|gt|idiv|if|import|in|index|infinity|insert|instance|integrity|intersect|into|is|item|json|json-item|jsoniq|last|lax|le|least|let|loop|lt|minus-sign|mod|modify|module|namespace|namespace-node|ne|next|node|nodes|not|null|object|of|only|option|or|order|ordered|ordering|paragraphs|parent|pattern-separator|per-mille|percent|preceding|preceding-sibling|previous|processing-instruction|rename|replace|return|returning|revalidation|satisfies|schema|schema-attribute|schema-element|score|select|self|sentences|sliding|some|stable|start|strict|switch|text|then|times|to|treat|true|try|tumbling|type|typeswitch|union|unordered|updating|validate|value|variable|version|when|where|while|window|with|words|xquery|zero-digit".split("|");
- var keywords = keys.map(
- function(val) { return { name: "'" + val + "'", token: "keyword" }; }
- );
-
- var ncnames = keys.map(
- function(val) { return { name: "'" + val + "'", token: "text", next: function(stack){ stack.pop(); } }; }
- );
-
- var cdata = "constant.language";
- var number = "constant";
- var xmlcomment = "comment";
- var pi = "xml-pe";
- var pragma = "constant.buildin";
-
- var Rules = {
- start: [
- { name: "'(#'", token: pragma, next: function(stack){ stack.push("Pragma"); } },
- { name: "'(:'", token: "comment", next: function(stack){ stack.push("Comment"); } },
- { name: "'(:~'", token: "comment.doc", next: function(stack){ stack.push("CommentDoc"); } },
- { name: "'<!--'", token: xmlcomment, next: function(stack){ stack.push("XMLComment"); } },
- { name: "'<?'", token: pi, next: function(stack) { stack.push("PI"); } },
- { name: "''''", token: "string", next: function(stack){ stack.push("AposString"); } },
- { name: "'\"'", token: "string", next: function(stack){ stack.push("QuotString"); } },
- { name: "Annotation", token: "support.function" },
- { name: "ModuleDecl", token: "keyword", next: function(stack){ stack.push("Prefix"); } },
- { name: "OptionDecl", token: "keyword", next: function(stack){ stack.push("_EQName"); } },
- { name: "AttrTest", token: "support.type" },
- { name: "Variable", token: "variable" },
- { name: "'<![CDATA['", token: cdata, next: function(stack){ stack.push("CData"); } },
- { name: "IntegerLiteral", token: number },
- { name: "DecimalLiteral", token: number },
- { name: "DoubleLiteral", token: number },
- { name: "Operator", token: "keyword.operator" },
- { name: "EQName", token: function(val) { return keys.indexOf(val) !== -1 ? "keyword" : "support.function"; } },
- { name: "'('", token:"lparen" },
- { name: "')'", token:"rparen" },
- { name: "Tag", token: "meta.tag", next: function(stack){ stack.push("StartTag"); } },
- { name: "'}'", token: "text", next: function(stack){ if(stack.length > 1) stack.pop(); } },
- { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } } //, next: function(stack){ if(stack.length > 1) { stack.pop(); } } }
- ].concat(keywords),
- _EQName: [
- { name: "EQName", token: "text", next: function(stack) { stack.pop(); } }
- ].concat(ncnames),
- Prefix: [
- { name: "NCName", token: "text", next: function(stack) { stack.pop(); } }
- ].concat(ncnames),
- StartTag: [
- { name: "'>'", token: "meta.tag", next: function(stack){ stack.push("TagContent"); } },
- { name: "QName", token: "entity.other.attribute-name" },
- { name: "'='", token: "text" },
- { name: "''''", token: "string", next: function(stack){ stack.push("AposAttr"); } },
- { name: "'\"'", token: "string", next: function(stack){ stack.push("QuotAttr"); } },
- { name: "'/>'", token: "meta.tag.r", next: function(stack){ stack.pop(); } }
- ],
- TagContent: [
- { name: "ElementContentChar", token: "text" },
- { name: "'<![CDATA['", token: cdata, next: function(stack){ stack.push("CData"); } },
- { name: "'<!--'", token: xmlcomment, next: function(stack){ stack.push("XMLComment"); } },
- { name: "Tag", token: "meta.tag", next: function(stack){ stack.push("StartTag"); } },
- { name: "PredefinedEntityRef", token: "constant.language.escape" },
- { name: "CharRef", token: "constant.language.escape" },
- { name: "'{{'", token: "text" },
- { name: "'}}'", token: "text" },
- { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } },
- { name: "EndTag", token: "meta.tag", next: function(stack){ stack.pop(); stack.pop(); } }
- ],
- AposAttr: [
- { name: "''''", token: "string", next: function(stack){ stack.pop(); } },
- { name: "EscapeApos", token: "constant.language.escape" },
- { name: "AposAttrContentChar", token: "string" },
- { name: "PredefinedEntityRef", token: "constant.language.escape" },
- { name: "CharRef", token: "constant.language.escape" },
- { name: "'{{'", token: "string" },
- { name: "'}}'", token: "string" },
- { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } }
- ],
- QuotAttr: [
- { name: "'\"'", token: "string", next: function(stack){ stack.pop(); } },
- { name: "EscapeQuot", token: "constant.language.escape" },
- { name: "QuotAttrContentChar", token: "string" },
- { name: "PredefinedEntityRef", token: "constant.language.escape" },
- { name: "CharRef", token: "constant.language.escape" },
- { name: "'{{'", token: "string" },
- { name: "'}}'", token: "string" },
- { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } }
- ],
- Pragma: [
- { name: "PragmaContents", token: pragma },
- { name: "'#'", token: pragma },
- { name: "'#)'", token: pragma, next: function(stack){ stack.pop(); } }
- ],
- Comment: [
- { name: "CommentContents", token: "comment" },
- { name: "'(:'", token: "comment", next: function(stack){ stack.push("Comment"); } },
- { name: "':)'", token: "comment", next: function(stack){ stack.pop(); } }
- ],
- CommentDoc: [
- { name: "DocCommentContents", token: "comment.doc" },
- { name: "DocTag", token: "comment.doc.tag" },
- { name: "'(:'", token: "comment.doc", next: function(stack){ stack.push("CommentDoc"); } },
- { name: "':)'", token: "comment.doc", next: function(stack){ stack.pop(); } }
- ],
- XMLComment: [
- { name: "DirCommentContents", token: xmlcomment },
- { name: "'-->'", token: xmlcomment, next: function(stack){ stack.pop(); } }
- ],
- CData: [
- { name: "CDataSectionContents", token: cdata },
- { name: "']]>'", token: cdata, next: function(stack){ stack.pop(); } }
- ],
- PI: [
- { name: "DirPIContents", token: pi },
- { name: "'?'", token: pi },
- { name: "'?>'", token: pi, next: function(stack){ stack.pop(); } }
- ],
- AposString: [
- { name: "''''", token: "string", next: function(stack){ stack.pop(); } },
- { name: "PredefinedEntityRef", token: "constant.language.escape" },
- { name: "CharRef", token: "constant.language.escape" },
- { name: "EscapeApos", token: "constant.language.escape" },
- { name: "AposChar", token: "string" }
- ],
- QuotString: [
- { name: "'\"'", token: "string", next: function(stack){ stack.pop(); } },
- { name: "PredefinedEntityRef", token: "constant.language.escape" },
- { name: "CharRef", token: "constant.language.escape" },
- { name: "EscapeQuot", token: "constant.language.escape" },
- { name: "QuotChar", token: "string" }
- ]
- };
-
-exports.JSONiqLexer = function() {
-
- this.tokens = [];
-
- this.getLineTokens = function(line, state, row) {
- state = (state === "start" || !state) ? '["start"]' : state;
- var stack = JSON.parse(state);
- var h = new TokenHandler(line);
- var tokenizer = new JSONiqTokenizer(line, h);
- var tokens = [];
-
- while(true) {
- var currentState = stack[stack.length - 1];
- try {
-
- h.tokens = [];
- tokenizer["parse_" + currentState]();
- var info = null;
-
- if(h.tokens.length > 1 && h.tokens[0].name === "WS") {
- tokens.push({
- type: "text",
- value: h.tokens[0].value
- });
- h.tokens.splice(0, 1);
- }
-
- var token = h.tokens[0];
- var rules = Rules[currentState];
- for(var k = 0; k < rules.length; k++) {
- var rule = Rules[currentState][k];
- if((typeof(rule.name) === "function" && rule.name(token)) || rule.name === token.name) {
- info = rule;
- break;
- }
- }
-
- if(token.name === "EOF") { break; }
- if(token.value === "") { throw "Encountered empty string lexical rule."; }
-
- tokens.push({
- type: info === null ? "text" : (typeof(info.token) === "function" ? info.token(token.value) : info.token),
- value: token.value
- });
-
- if(info && info.next) {
- info.next(stack);
- }
-
- } catch(e) {
- if(e instanceof tokenizer.ParseException) {
- var index = 0;
- for(var i=0; i < tokens.length; i++) {
- index += tokens[i].value.length;
- }
- tokens.push({ type: "text", value: line.substring(index) });
- return {
- tokens: tokens,
- state: JSON.stringify(["start"])
- };
- } else {
- throw e;
- }
- }
- }
-
-
- if(this.tokens[row] !== undefined) {
- var cachedLine = this.lines[row];
- var begin = sharedStart([line, cachedLine]);
- var diff = cachedLine.length - line.length;
- var idx = 0;
- var col = 0;
- for(var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- for(var j = 0; j < this.tokens[row].length; j++) {
- var semanticToken = this.tokens[row][j];
- if(
- ((col + token.value.length) <= begin.length && semanticToken.sc === col && semanticToken.ec === (col + token.value.length)) ||
- (semanticToken.sc === (col + diff) && semanticToken.ec === (col + token.value.length + diff))
- ) {
- idx = i;
- tokens[i].type = semanticToken.type;
- }
- }
- col += token.value.length;
- }
- }
-
- return {
- tokens: tokens,
- state: JSON.stringify(stack)
- };
- };
-
- function sharedStart(A) {
- var tem1, tem2, s, A = A.slice(0).sort();
- tem1 = A[0];
- s = tem1.length;
- tem2 = A.pop();
- while(s && tem2.indexOf(tem1) == -1) {
- tem1 = tem1.substring(0, --s);
- }
- return tem1;
- }
-};
-});
-
- ace.define('ace/mode/xquery/JSONiqTokenizer', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/xquery/jsoniq_lexer",["require","exports","module"], function(require, exports, module) {
+module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({
+1:[function(_dereq_,module,exports){
var JSONiqTokenizer = exports.JSONiqTokenizer = function JSONiqTokenizer(string, parsingEventHandler)
{
init(string, parsingEventHandler);
@@ -472,104 +94,107 @@ exports.JSONiqLexer = function() {
lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest |
switch (l1)
{
- case 55: // '<![CDATA['
- shift(55); // '<![CDATA['
+ case 58: // '<![CDATA['
+ shift(58); // '<![CDATA['
break;
- case 54: // '<!--'
- shift(54); // '<!--'
+ case 57: // '<!--'
+ shift(57); // '<!--'
break;
- case 56: // '<?'
- shift(56); // '<?'
+ case 59: // '<?'
+ shift(59); // '<?'
break;
- case 40: // '(#'
- shift(40); // '(#'
+ case 43: // '(#'
+ shift(43); // '(#'
break;
- case 42: // '(:~'
- shift(42); // '(:~'
+ case 45: // '(:~'
+ shift(45); // '(:~'
break;
- case 41: // '(:'
- shift(41); // '(:'
+ case 44: // '(:'
+ shift(44); // '(:'
break;
- case 35: // '"'
- shift(35); // '"'
+ case 37: // '"'
+ shift(37); // '"'
break;
- case 38: // "'"
- shift(38); // "'"
+ case 41: // "'"
+ shift(41); // "'"
break;
- case 274: // '}'
- shift(274); // '}'
+ case 277: // '}'
+ shift(277); // '}'
break;
- case 271: // '{'
- shift(271); // '{'
+ case 274: // '{'
+ shift(274); // '{'
break;
- case 39: // '('
- shift(39); // '('
+ case 42: // '('
+ shift(42); // '('
break;
- case 43: // ')'
- shift(43); // ')'
+ case 46: // ')'
+ shift(46); // ')'
break;
- case 49: // '/'
- shift(49); // '/'
+ case 52: // '/'
+ shift(52); // '/'
break;
- case 62: // '['
- shift(62); // '['
+ case 65: // '['
+ shift(65); // '['
break;
- case 63: // ']'
- shift(63); // ']'
+ case 66: // ']'
+ shift(66); // ']'
break;
- case 46: // ','
- shift(46); // ','
+ case 49: // ','
+ shift(49); // ','
break;
- case 48: // '.'
- shift(48); // '.'
+ case 51: // '.'
+ shift(51); // '.'
break;
- case 53: // ';'
- shift(53); // ';'
+ case 56: // ';'
+ shift(56); // ';'
break;
- case 51: // ':'
- shift(51); // ':'
+ case 54: // ':'
+ shift(54); // ':'
break;
- case 34: // '!'
- shift(34); // '!'
+ case 36: // '!'
+ shift(36); // '!'
break;
- case 273: // '|'
- shift(273); // '|'
+ case 276: // '|'
+ shift(276); // '|'
break;
- case 2: // Annotation
- shift(2); // Annotation
+ case 40: // '$$'
+ shift(40); // '$$'
break;
- case 1: // ModuleDecl
- shift(1); // ModuleDecl
+ case 5: // Annotation
+ shift(5); // Annotation
break;
- case 3: // OptionDecl
- shift(3); // OptionDecl
+ case 4: // ModuleDecl
+ shift(4); // ModuleDecl
break;
- case 12: // AttrTest
- shift(12); // AttrTest
+ case 6: // OptionDecl
+ shift(6); // OptionDecl
break;
- case 13: // Wildcard
- shift(13); // Wildcard
+ case 15: // AttrTest
+ shift(15); // AttrTest
break;
- case 15: // IntegerLiteral
- shift(15); // IntegerLiteral
+ case 16: // Wildcard
+ shift(16); // Wildcard
break;
- case 16: // DecimalLiteral
- shift(16); // DecimalLiteral
+ case 18: // IntegerLiteral
+ shift(18); // IntegerLiteral
break;
- case 17: // DoubleLiteral
- shift(17); // DoubleLiteral
+ case 19: // DecimalLiteral
+ shift(19); // DecimalLiteral
break;
- case 5: // Variable
- shift(5); // Variable
+ case 20: // DoubleLiteral
+ shift(20); // DoubleLiteral
break;
- case 6: // Tag
- shift(6); // Tag
+ case 8: // Variable
+ shift(8); // Variable
break;
- case 4: // Operator
- shift(4); // Operator
+ case 9: // Tag
+ shift(9); // Tag
break;
- case 33: // EOF
- shift(33); // EOF
+ case 7: // Operator
+ shift(7); // Operator
+ break;
+ case 35: // EOF
+ shift(35); // EOF
break;
default:
parse_EQName();
@@ -583,26 +208,26 @@ exports.JSONiqLexer = function() {
lookahead1W(8); // QName | S^WS | EOF | '"' | "'" | '/>' | '=' | '>'
switch (l1)
{
- case 58: // '>'
- shift(58); // '>'
+ case 61: // '>'
+ shift(61); // '>'
break;
- case 50: // '/>'
- shift(50); // '/>'
+ case 53: // '/>'
+ shift(53); // '/>'
break;
- case 27: // QName
- shift(27); // QName
+ case 29: // QName
+ shift(29); // QName
break;
- case 57: // '='
- shift(57); // '='
+ case 60: // '='
+ shift(60); // '='
break;
- case 35: // '"'
- shift(35); // '"'
+ case 37: // '"'
+ shift(37); // '"'
break;
- case 38: // "'"
- shift(38); // "'"
+ case 41: // "'"
+ shift(41); // "'"
break;
default:
- shift(33); // EOF
+ shift(35); // EOF
}
eventHandler.endNonterminal("StartTag", e0);
};
@@ -613,38 +238,38 @@ exports.JSONiqLexer = function() {
lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF |
switch (l1)
{
- case 23: // ElementContentChar
- shift(23); // ElementContentChar
+ case 25: // ElementContentChar
+ shift(25); // ElementContentChar
break;
- case 6: // Tag
- shift(6); // Tag
+ case 9: // Tag
+ shift(9); // Tag
break;
- case 7: // EndTag
- shift(7); // EndTag
+ case 10: // EndTag
+ shift(10); // EndTag
break;
- case 55: // '<![CDATA['
- shift(55); // '<![CDATA['
+ case 58: // '<![CDATA['
+ shift(58); // '<![CDATA['
break;
- case 54: // '<!--'
- shift(54); // '<!--'
+ case 57: // '<!--'
+ shift(57); // '<!--'
break;
- case 18: // PredefinedEntityRef
- shift(18); // PredefinedEntityRef
+ case 21: // PredefinedEntityRef
+ shift(21); // PredefinedEntityRef
break;
- case 29: // CharRef
- shift(29); // CharRef
+ case 31: // CharRef
+ shift(31); // CharRef
break;
- case 272: // '{{'
- shift(272); // '{{'
+ case 275: // '{{'
+ shift(275); // '{{'
break;
- case 275: // '}}'
- shift(275); // '}}'
+ case 278: // '}}'
+ shift(278); // '}}'
break;
- case 271: // '{'
- shift(271); // '{'
+ case 274: // '{'
+ shift(274); // '{'
break;
default:
- shift(33); // EOF
+ shift(35); // EOF
}
eventHandler.endNonterminal("TagContent", e0);
};
@@ -655,32 +280,32 @@ exports.JSONiqLexer = function() {
lookahead1(10); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | EOF | "'" |
switch (l1)
{
- case 20: // EscapeApos
- shift(20); // EscapeApos
+ case 23: // EscapeApos
+ shift(23); // EscapeApos
break;
- case 25: // AposAttrContentChar
- shift(25); // AposAttrContentChar
+ case 27: // AposAttrContentChar
+ shift(27); // AposAttrContentChar
break;
- case 18: // PredefinedEntityRef
- shift(18); // PredefinedEntityRef
+ case 21: // PredefinedEntityRef
+ shift(21); // PredefinedEntityRef
break;
- case 29: // CharRef
- shift(29); // CharRef
+ case 31: // CharRef
+ shift(31); // CharRef
break;
- case 272: // '{{'
- shift(272); // '{{'
+ case 275: // '{{'
+ shift(275); // '{{'
break;
- case 275: // '}}'
- shift(275); // '}}'
+ case 278: // '}}'
+ shift(278); // '}}'
break;
- case 271: // '{'
- shift(271); // '{'
+ case 274: // '{'
+ shift(274); // '{'
break;
- case 38: // "'"
- shift(38); // "'"
+ case 41: // "'"
+ shift(41); // "'"
break;
default:
- shift(33); // EOF
+ shift(35); // EOF
}
eventHandler.endNonterminal("AposAttr", e0);
};
@@ -691,32 +316,32 @@ exports.JSONiqLexer = function() {
lookahead1(9); // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | EOF | '"' |
switch (l1)
{
- case 19: // EscapeQuot
- shift(19); // EscapeQuot
+ case 22: // EscapeQuot
+ shift(22); // EscapeQuot
break;
- case 24: // QuotAttrContentChar
- shift(24); // QuotAttrContentChar
+ case 26: // QuotAttrContentChar
+ shift(26); // QuotAttrContentChar
break;
- case 18: // PredefinedEntityRef
- shift(18); // PredefinedEntityRef
+ case 21: // PredefinedEntityRef
+ shift(21); // PredefinedEntityRef
break;
- case 29: // CharRef
- shift(29); // CharRef
+ case 31: // CharRef
+ shift(31); // CharRef
break;
- case 272: // '{{'
- shift(272); // '{{'
+ case 275: // '{{'
+ shift(275); // '{{'
break;
- case 275: // '}}'
- shift(275); // '}}'
+ case 278: // '}}'
+ shift(278); // '}}'
break;
- case 271: // '{'
- shift(271); // '{'
+ case 274: // '{'
+ shift(274); // '{'
break;
- case 35: // '"'
- shift(35); // '"'
+ case 37: // '"'
+ shift(37); // '"'
break;
default:
- shift(33); // EOF
+ shift(35); // EOF
}
eventHandler.endNonterminal("QuotAttr", e0);
};
@@ -727,14 +352,14 @@ exports.JSONiqLexer = function() {
lookahead1(1); // CDataSectionContents | EOF | ']]>'
switch (l1)
{
- case 11: // CDataSectionContents
- shift(11); // CDataSectionContents
+ case 14: // CDataSectionContents
+ shift(14); // CDataSectionContents
break;
- case 64: // ']]>'
- shift(64); // ']]>'
+ case 67: // ']]>'
+ shift(67); // ']]>'
break;
default:
- shift(33); // EOF
+ shift(35); // EOF
}
eventHandler.endNonterminal("CData", e0);
};
@@ -745,14 +370,14 @@ exports.JSONiqLexer = function() {
lookahead1(0); // DirCommentContents | EOF | '-->'
switch (l1)
{
- case 9: // DirCommentContents
- shift(9); // DirCommentContents
+ case 12: // DirCommentContents
+ shift(12); // DirCommentContents
break;
- case 47: // '-->'
- shift(47); // '-->'
+ case 50: // '-->'
+ shift(50); // '-->'
break;
default:
- shift(33); // EOF
+ shift(35); // EOF
}
eventHandler.endNonterminal("XMLComment", e0);
};
@@ -763,17 +388,17 @@ exports.JSONiqLexer = function() {
lookahead1(3); // DirPIContents | EOF | '?' | '?>'
switch (l1)
{
- case 10: // DirPIContents
- shift(10); // DirPIContents
+ case 13: // DirPIContents
+ shift(13); // DirPIContents
break;
- case 59: // '?'
- shift(59); // '?'
+ case 62: // '?'
+ shift(62); // '?'
break;
- case 60: // '?>'
- shift(60); // '?>'
+ case 63: // '?>'
+ shift(63); // '?>'
break;
default:
- shift(33); // EOF
+ shift(35); // EOF
}
eventHandler.endNonterminal("PI", e0);
};
@@ -784,17 +409,17 @@ exports.JSONiqLexer = function() {
lookahead1(2); // PragmaContents | EOF | '#' | '#)'
switch (l1)
{
- case 8: // PragmaContents
- shift(8); // PragmaContents
+ case 11: // PragmaContents
+ shift(11); // PragmaContents
break;
- case 36: // '#'
- shift(36); // '#'
+ case 38: // '#'
+ shift(38); // '#'
break;
- case 37: // '#)'
- shift(37); // '#)'
+ case 39: // '#)'
+ shift(39); // '#)'
break;
default:
- shift(33); // EOF
+ shift(35); // EOF
}
eventHandler.endNonterminal("Pragma", e0);
};
@@ -805,17 +430,17 @@ exports.JSONiqLexer = function() {
lookahead1(4); // CommentContents | EOF | '(:' | ':)'
switch (l1)
{
- case 52: // ':)'
- shift(52); // ':)'
+ case 55: // ':)'
+ shift(55); // ':)'
break;
- case 41: // '(:'
- shift(41); // '(:'
+ case 44: // '(:'
+ shift(44); // '(:'
break;
- case 30: // CommentContents
- shift(30); // CommentContents
+ case 32: // CommentContents
+ shift(32); // CommentContents
break;
default:
- shift(33); // EOF
+ shift(35); // EOF
}
eventHandler.endNonterminal("Comment", e0);
};
@@ -823,23 +448,23 @@ exports.JSONiqLexer = function() {
this.parse_CommentDoc = function()
{
eventHandler.startNonterminal("CommentDoc", e0);
- lookahead1(5); // DocTag | DocCommentContents | EOF | '(:' | ':)'
+ lookahead1(6); // DocTag | DocCommentContents | EOF | '(:' | ':)'
switch (l1)
{
- case 31: // DocTag
- shift(31); // DocTag
+ case 33: // DocTag
+ shift(33); // DocTag
break;
- case 32: // DocCommentContents
- shift(32); // DocCommentContents
+ case 34: // DocCommentContents
+ shift(34); // DocCommentContents
break;
- case 52: // ':)'
- shift(52); // ':)'
+ case 55: // ':)'
+ shift(55); // ':)'
break;
- case 41: // '(:'
- shift(41); // '(:'
+ case 44: // '(:'
+ shift(44); // '(:'
break;
default:
- shift(33); // EOF
+ shift(35); // EOF
}
eventHandler.endNonterminal("CommentDoc", e0);
};
@@ -847,26 +472,23 @@ exports.JSONiqLexer = function() {
this.parse_QuotString = function()
{
eventHandler.startNonterminal("QuotString", e0);
- lookahead1(6); // PredefinedEntityRef | EscapeQuot | QuotChar | CharRef | EOF | '"'
+ lookahead1(5); // JSONChar | JSONCharRef | JSONPredefinedCharRef | EOF | '"'
switch (l1)
{
- case 18: // PredefinedEntityRef
- shift(18); // PredefinedEntityRef
- break;
- case 29: // CharRef
- shift(29); // CharRef
+ case 3: // JSONPredefinedCharRef
+ shift(3); // JSONPredefinedCharRef
break;
- case 19: // EscapeQuot
- shift(19); // EscapeQuot
+ case 2: // JSONCharRef
+ shift(2); // JSONCharRef
break;
- case 21: // QuotChar
- shift(21); // QuotChar
+ case 1: // JSONChar
+ shift(1); // JSONChar
break;
- case 35: // '"'
- shift(35); // '"'
+ case 37: // '"'
+ shift(37); // '"'
break;
default:
- shift(33); // EOF
+ shift(35); // EOF
}
eventHandler.endNonterminal("QuotString", e0);
};
@@ -877,23 +499,23 @@ exports.JSONiqLexer = function() {
lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'"
switch (l1)
{
- case 18: // PredefinedEntityRef
- shift(18); // PredefinedEntityRef
+ case 21: // PredefinedEntityRef
+ shift(21); // PredefinedEntityRef
break;
- case 29: // CharRef
- shift(29); // CharRef
+ case 31: // CharRef
+ shift(31); // CharRef
break;
- case 20: // EscapeApos
- shift(20); // EscapeApos
+ case 23: // EscapeApos
+ shift(23); // EscapeApos
break;
- case 22: // AposChar
- shift(22); // AposChar
+ case 24: // AposChar
+ shift(24); // AposChar
break;
- case 38: // "'"
- shift(38); // "'"
+ case 41: // "'"
+ shift(41); // "'"
break;
default:
- shift(33); // EOF
+ shift(35); // EOF
}
eventHandler.endNonterminal("AposString", e0);
};
@@ -921,53 +543,53 @@ exports.JSONiqLexer = function() {
eventHandler.startNonterminal("EQName", e0);
switch (l1)
{
- case 77: // 'attribute'
- shift(77); // 'attribute'
+ case 80: // 'attribute'
+ shift(80); // 'attribute'
break;
- case 91: // 'comment'
- shift(91); // 'comment'
+ case 94: // 'comment'
+ shift(94); // 'comment'
break;
- case 115: // 'document-node'
- shift(115); // 'document-node'
+ case 118: // 'document-node'
+ shift(118); // 'document-node'
break;
- case 116: // 'element'
- shift(116); // 'element'
+ case 119: // 'element'
+ shift(119); // 'element'
break;
- case 119: // 'empty-sequence'
- shift(119); // 'empty-sequence'
+ case 122: // 'empty-sequence'
+ shift(122); // 'empty-sequence'
break;
- case 140: // 'function'
- shift(140); // 'function'
+ case 143: // 'function'
+ shift(143); // 'function'
break;
- case 147: // 'if'
- shift(147); // 'if'
+ case 150: // 'if'
+ shift(150); // 'if'
break;
- case 160: // 'item'
- shift(160); // 'item'
+ case 163: // 'item'
+ shift(163); // 'item'
break;
- case 180: // 'namespace-node'
- shift(180); // 'namespace-node'
+ case 183: // 'namespace-node'
+ shift(183); // 'namespace-node'
break;
- case 186: // 'node'
- shift(186); // 'node'
+ case 189: // 'node'
+ shift(189); // 'node'
break;
- case 211: // 'processing-instruction'
- shift(211); // 'processing-instruction'
+ case 214: // 'processing-instruction'
+ shift(214); // 'processing-instruction'
break;
- case 221: // 'schema-attribute'
- shift(221); // 'schema-attribute'
+ case 224: // 'schema-attribute'
+ shift(224); // 'schema-attribute'
break;
- case 222: // 'schema-element'
- shift(222); // 'schema-element'
+ case 225: // 'schema-element'
+ shift(225); // 'schema-element'
break;
- case 238: // 'switch'
- shift(238); // 'switch'
+ case 241: // 'switch'
+ shift(241); // 'switch'
break;
- case 239: // 'text'
- shift(239); // 'text'
+ case 242: // 'text'
+ shift(242); // 'text'
break;
- case 248: // 'typeswitch'
- shift(248); // 'typeswitch'
+ case 251: // 'typeswitch'
+ shift(251); // 'typeswitch'
break;
default:
parse_FunctionName();
@@ -980,344 +602,344 @@ exports.JSONiqLexer = function() {
eventHandler.startNonterminal("FunctionName", e0);
switch (l1)
{
- case 14: // EQName^Token
- shift(14); // EQName^Token
+ case 17: // EQName^Token
+ shift(17); // EQName^Token
break;
- case 65: // 'after'
- shift(65); // 'after'
+ case 68: // 'after'
+ shift(68); // 'after'
break;
- case 68: // 'ancestor'
- shift(68); // 'ancestor'
+ case 71: // 'ancestor'
+ shift(71); // 'ancestor'
break;
- case 69: // 'ancestor-or-self'
- shift(69); // 'ancestor-or-self'
+ case 72: // 'ancestor-or-self'
+ shift(72); // 'ancestor-or-self'
break;
- case 70: // 'and'
- shift(70); // 'and'
+ case 73: // 'and'
+ shift(73); // 'and'
break;
- case 74: // 'as'
- shift(74); // 'as'
+ case 77: // 'as'
+ shift(77); // 'as'
break;
- case 75: // 'ascending'
- shift(75); // 'ascending'
+ case 78: // 'ascending'
+ shift(78); // 'ascending'
break;
- case 79: // 'before'
- shift(79); // 'before'
+ case 82: // 'before'
+ shift(82); // 'before'
break;
- case 83: // 'case'
- shift(83); // 'case'
+ case 86: // 'case'
+ shift(86); // 'case'
break;
- case 84: // 'cast'
- shift(84); // 'cast'
+ case 87: // 'cast'
+ shift(87); // 'cast'
break;
- case 85: // 'castable'
- shift(85); // 'castable'
+ case 88: // 'castable'
+ shift(88); // 'castable'
break;
- case 88: // 'child'
- shift(88); // 'child'
+ case 91: // 'child'
+ shift(91); // 'child'
break;
- case 89: // 'collation'
- shift(89); // 'collation'
+ case 92: // 'collation'
+ shift(92); // 'collation'
break;
- case 98: // 'copy'
- shift(98); // 'copy'
+ case 101: // 'copy'
+ shift(101); // 'copy'
break;
- case 100: // 'count'
- shift(100); // 'count'
+ case 103: // 'count'
+ shift(103); // 'count'
break;
- case 103: // 'declare'
- shift(103); // 'declare'
+ case 106: // 'declare'
+ shift(106); // 'declare'
break;
- case 104: // 'default'
- shift(104); // 'default'
+ case 107: // 'default'
+ shift(107); // 'default'
break;
- case 105: // 'delete'
- shift(105); // 'delete'
+ case 108: // 'delete'
+ shift(108); // 'delete'
break;
- case 106: // 'descendant'
- shift(106); // 'descendant'
+ case 109: // 'descendant'
+ shift(109); // 'descendant'
break;
- case 107: // 'descendant-or-self'
- shift(107); // 'descendant-or-self'
+ case 110: // 'descendant-or-self'
+ shift(110); // 'descendant-or-self'
break;
- case 108: // 'descending'
- shift(108); // 'descending'
+ case 111: // 'descending'
+ shift(111); // 'descending'
break;
- case 113: // 'div'
- shift(113); // 'div'
+ case 116: // 'div'
+ shift(116); // 'div'
break;
- case 114: // 'document'
- shift(114); // 'document'
+ case 117: // 'document'
+ shift(117); // 'document'
break;
- case 117: // 'else'
- shift(117); // 'else'
+ case 120: // 'else'
+ shift(120); // 'else'
break;
- case 118: // 'empty'
- shift(118); // 'empty'
+ case 121: // 'empty'
+ shift(121); // 'empty'
break;
- case 121: // 'end'
- shift(121); // 'end'
+ case 124: // 'end'
+ shift(124); // 'end'
break;
- case 123: // 'eq'
- shift(123); // 'eq'
+ case 126: // 'eq'
+ shift(126); // 'eq'
break;
- case 124: // 'every'
- shift(124); // 'every'
+ case 127: // 'every'
+ shift(127); // 'every'
break;
- case 126: // 'except'
- shift(126); // 'except'
+ case 129: // 'except'
+ shift(129); // 'except'
break;
- case 129: // 'first'
- shift(129); // 'first'
+ case 132: // 'first'
+ shift(132); // 'first'
break;
- case 130: // 'following'
- shift(130); // 'following'
+ case 133: // 'following'
+ shift(133); // 'following'
break;
- case 131: // 'following-sibling'
- shift(131); // 'following-sibling'
+ case 134: // 'following-sibling'
+ shift(134); // 'following-sibling'
break;
- case 132: // 'for'
- shift(132); // 'for'
+ case 135: // 'for'
+ shift(135); // 'for'
break;
- case 141: // 'ge'
- shift(141); // 'ge'
+ case 144: // 'ge'
+ shift(144); // 'ge'
break;
- case 143: // 'group'
- shift(143); // 'group'
+ case 146: // 'group'
+ shift(146); // 'group'
break;
- case 145: // 'gt'
- shift(145); // 'gt'
+ case 148: // 'gt'
+ shift(148); // 'gt'
break;
- case 146: // 'idiv'
- shift(146); // 'idiv'
+ case 149: // 'idiv'
+ shift(149); // 'idiv'
break;
- case 148: // 'import'
- shift(148); // 'import'
+ case 151: // 'import'
+ shift(151); // 'import'
break;
- case 154: // 'insert'
- shift(154); // 'insert'
+ case 157: // 'insert'
+ shift(157); // 'insert'
break;
- case 155: // 'instance'
- shift(155); // 'instance'
+ case 158: // 'instance'
+ shift(158); // 'instance'
break;
- case 157: // 'intersect'
- shift(157); // 'intersect'
+ case 160: // 'intersect'
+ shift(160); // 'intersect'
break;
- case 158: // 'into'
- shift(158); // 'into'
+ case 161: // 'into'
+ shift(161); // 'into'
break;
- case 159: // 'is'
- shift(159); // 'is'
+ case 162: // 'is'
+ shift(162); // 'is'
break;
- case 165: // 'last'
- shift(165); // 'last'
+ case 168: // 'last'
+ shift(168); // 'last'
break;
- case 167: // 'le'
- shift(167); // 'le'
+ case 170: // 'le'
+ shift(170); // 'le'
break;
- case 169: // 'let'
- shift(169); // 'let'
+ case 172: // 'let'
+ shift(172); // 'let'
break;
- case 173: // 'lt'
- shift(173); // 'lt'
+ case 176: // 'lt'
+ shift(176); // 'lt'
break;
- case 175: // 'mod'
- shift(175); // 'mod'
+ case 178: // 'mod'
+ shift(178); // 'mod'
break;
- case 176: // 'modify'
- shift(176); // 'modify'
+ case 179: // 'modify'
+ shift(179); // 'modify'
break;
- case 177: // 'module'
- shift(177); // 'module'
+ case 180: // 'module'
+ shift(180); // 'module'
break;
- case 179: // 'namespace'
- shift(179); // 'namespace'
+ case 182: // 'namespace'
+ shift(182); // 'namespace'
break;
- case 181: // 'ne'
- shift(181); // 'ne'
+ case 184: // 'ne'
+ shift(184); // 'ne'
break;
- case 193: // 'only'
- shift(193); // 'only'
+ case 196: // 'only'
+ shift(196); // 'only'
break;
- case 195: // 'or'
- shift(195); // 'or'
+ case 198: // 'or'
+ shift(198); // 'or'
break;
- case 196: // 'order'
- shift(196); // 'order'
+ case 199: // 'order'
+ shift(199); // 'order'
break;
- case 197: // 'ordered'
- shift(197); // 'ordered'
+ case 200: // 'ordered'
+ shift(200); // 'ordered'
break;
- case 201: // 'parent'
- shift(201); // 'parent'
+ case 204: // 'parent'
+ shift(204); // 'parent'
break;
- case 207: // 'preceding'
- shift(207); // 'preceding'
+ case 210: // 'preceding'
+ shift(210); // 'preceding'
break;
- case 208: // 'preceding-sibling'
- shift(208); // 'preceding-sibling'
+ case 211: // 'preceding-sibling'
+ shift(211); // 'preceding-sibling'
break;
- case 213: // 'rename'
- shift(213); // 'rename'
+ case 216: // 'rename'
+ shift(216); // 'rename'
break;
- case 214: // 'replace'
- shift(214); // 'replace'
+ case 217: // 'replace'
+ shift(217); // 'replace'
break;
- case 215: // 'return'
- shift(215); // 'return'
+ case 218: // 'return'
+ shift(218); // 'return'
break;
- case 219: // 'satisfies'
- shift(219); // 'satisfies'
+ case 222: // 'satisfies'
+ shift(222); // 'satisfies'
break;
- case 224: // 'self'
- shift(224); // 'self'
+ case 227: // 'self'
+ shift(227); // 'self'
break;
- case 230: // 'some'
- shift(230); // 'some'
+ case 233: // 'some'
+ shift(233); // 'some'
break;
- case 231: // 'stable'
- shift(231); // 'stable'
+ case 234: // 'stable'
+ shift(234); // 'stable'
break;
- case 232: // 'start'
- shift(232); // 'start'
+ case 235: // 'start'
+ shift(235); // 'start'
break;
- case 243: // 'to'
- shift(243); // 'to'
+ case 246: // 'to'
+ shift(246); // 'to'
break;
- case 244: // 'treat'
- shift(244); // 'treat'
+ case 247: // 'treat'
+ shift(247); // 'treat'
break;
- case 245: // 'try'
- shift(245); // 'try'
+ case 248: // 'try'
+ shift(248); // 'try'
break;
- case 249: // 'union'
- shift(249); // 'union'
+ case 252: // 'union'
+ shift(252); // 'union'
break;
- case 251: // 'unordered'
- shift(251); // 'unordered'
+ case 254: // 'unordered'
+ shift(254); // 'unordered'
break;
- case 255: // 'validate'
- shift(255); // 'validate'
+ case 258: // 'validate'
+ shift(258); // 'validate'
break;
- case 261: // 'where'
- shift(261); // 'where'
+ case 264: // 'where'
+ shift(264); // 'where'
break;
- case 265: // 'with'
- shift(265); // 'with'
+ case 268: // 'with'
+ shift(268); // 'with'
break;
- case 269: // 'xquery'
- shift(269); // 'xquery'
+ case 272: // 'xquery'
+ shift(272); // 'xquery'
break;
- case 67: // 'allowing'
- shift(67); // 'allowing'
+ case 70: // 'allowing'
+ shift(70); // 'allowing'
break;
- case 76: // 'at'
- shift(76); // 'at'
+ case 79: // 'at'
+ shift(79); // 'at'
break;
- case 78: // 'base-uri'
- shift(78); // 'base-uri'
+ case 81: // 'base-uri'
+ shift(81); // 'base-uri'
break;
- case 80: // 'boundary-space'
- shift(80); // 'boundary-space'
+ case 83: // 'boundary-space'
+ shift(83); // 'boundary-space'
break;
- case 81: // 'break'
- shift(81); // 'break'
+ case 84: // 'break'
+ shift(84); // 'break'
break;
- case 86: // 'catch'
- shift(86); // 'catch'
+ case 89: // 'catch'
+ shift(89); // 'catch'
break;
- case 93: // 'construction'
- shift(93); // 'construction'
+ case 96: // 'construction'
+ shift(96); // 'construction'
break;
- case 96: // 'context'
- shift(96); // 'context'
+ case 99: // 'context'
+ shift(99); // 'context'
break;
- case 97: // 'continue'
- shift(97); // 'continue'
+ case 100: // 'continue'
+ shift(100); // 'continue'
break;
- case 99: // 'copy-namespaces'
- shift(99); // 'copy-namespaces'
+ case 102: // 'copy-namespaces'
+ shift(102); // 'copy-namespaces'
break;
- case 101: // 'decimal-format'
- shift(101); // 'decimal-format'
+ case 104: // 'decimal-format'
+ shift(104); // 'decimal-format'
break;
- case 120: // 'encoding'
- shift(120); // 'encoding'
+ case 123: // 'encoding'
+ shift(123); // 'encoding'
break;
- case 127: // 'exit'
- shift(127); // 'exit'
+ case 130: // 'exit'
+ shift(130); // 'exit'
break;
- case 128: // 'external'
- shift(128); // 'external'
+ case 131: // 'external'
+ shift(131); // 'external'
break;
- case 136: // 'ft-option'
- shift(136); // 'ft-option'
+ case 139: // 'ft-option'
+ shift(139); // 'ft-option'
break;
- case 149: // 'in'
- shift(149); // 'in'
+ case 152: // 'in'
+ shift(152); // 'in'
break;
- case 150: // 'index'
- shift(150); // 'index'
+ case 153: // 'index'
+ shift(153); // 'index'
break;
- case 156: // 'integrity'
- shift(156); // 'integrity'
+ case 159: // 'integrity'
+ shift(159); // 'integrity'
break;
- case 166: // 'lax'
- shift(166); // 'lax'
+ case 169: // 'lax'
+ shift(169); // 'lax'
break;
- case 187: // 'nodes'
- shift(187); // 'nodes'
+ case 190: // 'nodes'
+ shift(190); // 'nodes'
break;
- case 194: // 'option'
- shift(194); // 'option'
+ case 197: // 'option'
+ shift(197); // 'option'
break;
- case 198: // 'ordering'
- shift(198); // 'ordering'
+ case 201: // 'ordering'
+ shift(201); // 'ordering'
break;
- case 217: // 'revalidation'
- shift(217); // 'revalidation'
+ case 220: // 'revalidation'
+ shift(220); // 'revalidation'
break;
- case 220: // 'schema'
- shift(220); // 'schema'
+ case 223: // 'schema'
+ shift(223); // 'schema'
break;
- case 223: // 'score'
- shift(223); // 'score'
+ case 226: // 'score'
+ shift(226); // 'score'
break;
- case 229: // 'sliding'
- shift(229); // 'sliding'
+ case 232: // 'sliding'
+ shift(232); // 'sliding'
break;
- case 235: // 'strict'
- shift(235); // 'strict'
+ case 238: // 'strict'
+ shift(238); // 'strict'
break;
- case 246: // 'tumbling'
- shift(246); // 'tumbling'
+ case 249: // 'tumbling'
+ shift(249); // 'tumbling'
break;
- case 247: // 'type'
- shift(247); // 'type'
+ case 250: // 'type'
+ shift(250); // 'type'
break;
- case 252: // 'updating'
- shift(252); // 'updating'
+ case 255: // 'updating'
+ shift(255); // 'updating'
break;
- case 256: // 'value'
- shift(256); // 'value'
+ case 259: // 'value'
+ shift(259); // 'value'
break;
- case 257: // 'variable'
- shift(257); // 'variable'
+ case 260: // 'variable'
+ shift(260); // 'variable'
break;
- case 258: // 'version'
- shift(258); // 'version'
+ case 261: // 'version'
+ shift(261); // 'version'
break;
- case 262: // 'while'
- shift(262); // 'while'
+ case 265: // 'while'
+ shift(265); // 'while'
break;
- case 92: // 'constraint'
- shift(92); // 'constraint'
+ case 95: // 'constraint'
+ shift(95); // 'constraint'
break;
- case 171: // 'loop'
- shift(171); // 'loop'
+ case 174: // 'loop'
+ shift(174); // 'loop'
break;
default:
- shift(216); // 'returning'
+ shift(219); // 'returning'
}
eventHandler.endNonterminal("FunctionName", e0);
}
@@ -1327,392 +949,392 @@ exports.JSONiqLexer = function() {
eventHandler.startNonterminal("NCName", e0);
switch (l1)
{
- case 26: // NCName^Token
- shift(26); // NCName^Token
+ case 28: // NCName^Token
+ shift(28); // NCName^Token
break;
- case 65: // 'after'
- shift(65); // 'after'
+ case 68: // 'after'
+ shift(68); // 'after'
break;
- case 70: // 'and'
- shift(70); // 'and'
+ case 73: // 'and'
+ shift(73); // 'and'
break;
- case 74: // 'as'
- shift(74); // 'as'
+ case 77: // 'as'
+ shift(77); // 'as'
break;
- case 75: // 'ascending'
- shift(75); // 'ascending'
+ case 78: // 'ascending'
+ shift(78); // 'ascending'
break;
- case 79: // 'before'
- shift(79); // 'before'
+ case 82: // 'before'
+ shift(82); // 'before'
break;
- case 83: // 'case'
- shift(83); // 'case'
+ case 86: // 'case'
+ shift(86); // 'case'
break;
- case 84: // 'cast'
- shift(84); // 'cast'
+ case 87: // 'cast'
+ shift(87); // 'cast'
break;
- case 85: // 'castable'
- shift(85); // 'castable'
+ case 88: // 'castable'
+ shift(88); // 'castable'
break;
- case 89: // 'collation'
- shift(89); // 'collation'
+ case 92: // 'collation'
+ shift(92); // 'collation'
break;
- case 100: // 'count'
- shift(100); // 'count'
+ case 103: // 'count'
+ shift(103); // 'count'
break;
- case 104: // 'default'
- shift(104); // 'default'
+ case 107: // 'default'
+ shift(107); // 'default'
break;
- case 108: // 'descending'
- shift(108); // 'descending'
+ case 111: // 'descending'
+ shift(111); // 'descending'
break;
- case 113: // 'div'
- shift(113); // 'div'
+ case 116: // 'div'
+ shift(116); // 'div'
break;
- case 117: // 'else'
- shift(117); // 'else'
+ case 120: // 'else'
+ shift(120); // 'else'
break;
- case 118: // 'empty'
- shift(118); // 'empty'
+ case 121: // 'empty'
+ shift(121); // 'empty'
break;
- case 121: // 'end'
- shift(121); // 'end'
+ case 124: // 'end'
+ shift(124); // 'end'
break;
- case 123: // 'eq'
- shift(123); // 'eq'
+ case 126: // 'eq'
+ shift(126); // 'eq'
break;
- case 126: // 'except'
- shift(126); // 'except'
+ case 129: // 'except'
+ shift(129); // 'except'
break;
- case 132: // 'for'
- shift(132); // 'for'
+ case 135: // 'for'
+ shift(135); // 'for'
break;
- case 141: // 'ge'
- shift(141); // 'ge'
+ case 144: // 'ge'
+ shift(144); // 'ge'
break;
- case 143: // 'group'
- shift(143); // 'group'
+ case 146: // 'group'
+ shift(146); // 'group'
break;
- case 145: // 'gt'
- shift(145); // 'gt'
+ case 148: // 'gt'
+ shift(148); // 'gt'
break;
- case 146: // 'idiv'
- shift(146); // 'idiv'
+ case 149: // 'idiv'
+ shift(149); // 'idiv'
break;
- case 155: // 'instance'
- shift(155); // 'instance'
+ case 158: // 'instance'
+ shift(158); // 'instance'
break;
- case 157: // 'intersect'
- shift(157); // 'intersect'
+ case 160: // 'intersect'
+ shift(160); // 'intersect'
break;
- case 158: // 'into'
- shift(158); // 'into'
+ case 161: // 'into'
+ shift(161); // 'into'
break;
- case 159: // 'is'
- shift(159); // 'is'
+ case 162: // 'is'
+ shift(162); // 'is'
break;
- case 167: // 'le'
- shift(167); // 'le'
+ case 170: // 'le'
+ shift(170); // 'le'
break;
- case 169: // 'let'
- shift(169); // 'let'
+ case 172: // 'let'
+ shift(172); // 'let'
break;
- case 173: // 'lt'
- shift(173); // 'lt'
+ case 176: // 'lt'
+ shift(176); // 'lt'
break;
- case 175: // 'mod'
- shift(175); // 'mod'
+ case 178: // 'mod'
+ shift(178); // 'mod'
break;
- case 176: // 'modify'
- shift(176); // 'modify'
+ case 179: // 'modify'
+ shift(179); // 'modify'
break;
- case 181: // 'ne'
- shift(181); // 'ne'
+ case 184: // 'ne'
+ shift(184); // 'ne'
break;
- case 193: // 'only'
- shift(193); // 'only'
+ case 196: // 'only'
+ shift(196); // 'only'
break;
- case 195: // 'or'
- shift(195); // 'or'
+ case 198: // 'or'
+ shift(198); // 'or'
break;
- case 196: // 'order'
- shift(196); // 'order'
+ case 199: // 'order'
+ shift(199); // 'order'
break;
- case 215: // 'return'
- shift(215); // 'return'
+ case 218: // 'return'
+ shift(218); // 'return'
break;
- case 219: // 'satisfies'
- shift(219); // 'satisfies'
+ case 222: // 'satisfies'
+ shift(222); // 'satisfies'
break;
- case 231: // 'stable'
- shift(231); // 'stable'
+ case 234: // 'stable'
+ shift(234); // 'stable'
break;
- case 232: // 'start'
- shift(232); // 'start'
+ case 235: // 'start'
+ shift(235); // 'start'
break;
- case 243: // 'to'
- shift(243); // 'to'
+ case 246: // 'to'
+ shift(246); // 'to'
break;
- case 244: // 'treat'
- shift(244); // 'treat'
+ case 247: // 'treat'
+ shift(247); // 'treat'
break;
- case 249: // 'union'
- shift(249); // 'union'
+ case 252: // 'union'
+ shift(252); // 'union'
break;
- case 261: // 'where'
- shift(261); // 'where'
+ case 264: // 'where'
+ shift(264); // 'where'
break;
- case 265: // 'with'
- shift(265); // 'with'
+ case 268: // 'with'
+ shift(268); // 'with'
break;
- case 68: // 'ancestor'
- shift(68); // 'ancestor'
+ case 71: // 'ancestor'
+ shift(71); // 'ancestor'
break;
- case 69: // 'ancestor-or-self'
- shift(69); // 'ancestor-or-self'
+ case 72: // 'ancestor-or-self'
+ shift(72); // 'ancestor-or-self'
break;
- case 77: // 'attribute'
- shift(77); // 'attribute'
+ case 80: // 'attribute'
+ shift(80); // 'attribute'
break;
- case 88: // 'child'
- shift(88); // 'child'
+ case 91: // 'child'
+ shift(91); // 'child'
break;
- case 91: // 'comment'
- shift(91); // 'comment'
+ case 94: // 'comment'
+ shift(94); // 'comment'
break;
- case 98: // 'copy'
- shift(98); // 'copy'
+ case 101: // 'copy'
+ shift(101); // 'copy'
break;
- case 103: // 'declare'
- shift(103); // 'declare'
+ case 106: // 'declare'
+ shift(106); // 'declare'
break;
- case 105: // 'delete'
- shift(105); // 'delete'
+ case 108: // 'delete'
+ shift(108); // 'delete'
break;
- case 106: // 'descendant'
- shift(106); // 'descendant'
+ case 109: // 'descendant'
+ shift(109); // 'descendant'
break;
- case 107: // 'descendant-or-self'
- shift(107); // 'descendant-or-self'
+ case 110: // 'descendant-or-self'
+ shift(110); // 'descendant-or-self'
break;
- case 114: // 'document'
- shift(114); // 'document'
+ case 117: // 'document'
+ shift(117); // 'document'
break;
- case 115: // 'document-node'
- shift(115); // 'document-node'
+ case 118: // 'document-node'
+ shift(118); // 'document-node'
break;
- case 116: // 'element'
- shift(116); // 'element'
+ case 119: // 'element'
+ shift(119); // 'element'
break;
- case 119: // 'empty-sequence'
- shift(119); // 'empty-sequence'
+ case 122: // 'empty-sequence'
+ shift(122); // 'empty-sequence'
break;
- case 124: // 'every'
- shift(124); // 'every'
+ case 127: // 'every'
+ shift(127); // 'every'
break;
- case 129: // 'first'
- shift(129); // 'first'
+ case 132: // 'first'
+ shift(132); // 'first'
break;
- case 130: // 'following'
- shift(130); // 'following'
+ case 133: // 'following'
+ shift(133); // 'following'
break;
- case 131: // 'following-sibling'
- shift(131); // 'following-sibling'
+ case 134: // 'following-sibling'
+ shift(134); // 'following-sibling'
break;
- case 140: // 'function'
- shift(140); // 'function'
+ case 143: // 'function'
+ shift(143); // 'function'
break;
- case 147: // 'if'
- shift(147); // 'if'
+ case 150: // 'if'
+ shift(150); // 'if'
break;
- case 148: // 'import'
- shift(148); // 'import'
+ case 151: // 'import'
+ shift(151); // 'import'
break;
- case 154: // 'insert'
- shift(154); // 'insert'
+ case 157: // 'insert'
+ shift(157); // 'insert'
break;
- case 160: // 'item'
- shift(160); // 'item'
+ case 163: // 'item'
+ shift(163); // 'item'
break;
- case 165: // 'last'
- shift(165); // 'last'
+ case 168: // 'last'
+ shift(168); // 'last'
break;
- case 177: // 'module'
- shift(177); // 'module'
+ case 180: // 'module'
+ shift(180); // 'module'
break;
- case 179: // 'namespace'
- shift(179); // 'namespace'
+ case 182: // 'namespace'
+ shift(182); // 'namespace'
break;
- case 180: // 'namespace-node'
- shift(180); // 'namespace-node'
+ case 183: // 'namespace-node'
+ shift(183); // 'namespace-node'
break;
- case 186: // 'node'
- shift(186); // 'node'
+ case 189: // 'node'
+ shift(189); // 'node'
break;
- case 197: // 'ordered'
- shift(197); // 'ordered'
+ case 200: // 'ordered'
+ shift(200); // 'ordered'
break;
- case 201: // 'parent'
- shift(201); // 'parent'
+ case 204: // 'parent'
+ shift(204); // 'parent'
break;
- case 207: // 'preceding'
- shift(207); // 'preceding'
+ case 210: // 'preceding'
+ shift(210); // 'preceding'
break;
- case 208: // 'preceding-sibling'
- shift(208); // 'preceding-sibling'
+ case 211: // 'preceding-sibling'
+ shift(211); // 'preceding-sibling'
break;
- case 211: // 'processing-instruction'
- shift(211); // 'processing-instruction'
+ case 214: // 'processing-instruction'
+ shift(214); // 'processing-instruction'
break;
- case 213: // 'rename'
- shift(213); // 'rename'
+ case 216: // 'rename'
+ shift(216); // 'rename'
break;
- case 214: // 'replace'
- shift(214); // 'replace'
+ case 217: // 'replace'
+ shift(217); // 'replace'
break;
- case 221: // 'schema-attribute'
- shift(221); // 'schema-attribute'
+ case 224: // 'schema-attribute'
+ shift(224); // 'schema-attribute'
break;
- case 222: // 'schema-element'
- shift(222); // 'schema-element'
+ case 225: // 'schema-element'
+ shift(225); // 'schema-element'
break;
- case 224: // 'self'
- shift(224); // 'self'
+ case 227: // 'self'
+ shift(227); // 'self'
break;
- case 230: // 'some'
- shift(230); // 'some'
+ case 233: // 'some'
+ shift(233); // 'some'
break;
- case 238: // 'switch'
- shift(238); // 'switch'
+ case 241: // 'switch'
+ shift(241); // 'switch'
break;
- case 239: // 'text'
- shift(239); // 'text'
+ case 242: // 'text'
+ shift(242); // 'text'
break;
- case 245: // 'try'
- shift(245); // 'try'
+ case 248: // 'try'
+ shift(248); // 'try'
break;
- case 248: // 'typeswitch'
- shift(248); // 'typeswitch'
+ case 251: // 'typeswitch'
+ shift(251); // 'typeswitch'
break;
- case 251: // 'unordered'
- shift(251); // 'unordered'
+ case 254: // 'unordered'
+ shift(254); // 'unordered'
break;
- case 255: // 'validate'
- shift(255); // 'validate'
+ case 258: // 'validate'
+ shift(258); // 'validate'
break;
- case 257: // 'variable'
- shift(257); // 'variable'
+ case 260: // 'variable'
+ shift(260); // 'variable'
break;
- case 269: // 'xquery'
- shift(269); // 'xquery'
+ case 272: // 'xquery'
+ shift(272); // 'xquery'
break;
- case 67: // 'allowing'
- shift(67); // 'allowing'
+ case 70: // 'allowing'
+ shift(70); // 'allowing'
break;
- case 76: // 'at'
- shift(76); // 'at'
+ case 79: // 'at'
+ shift(79); // 'at'
break;
- case 78: // 'base-uri'
- shift(78); // 'base-uri'
+ case 81: // 'base-uri'
+ shift(81); // 'base-uri'
break;
- case 80: // 'boundary-space'
- shift(80); // 'boundary-space'
+ case 83: // 'boundary-space'
+ shift(83); // 'boundary-space'
break;
- case 81: // 'break'
- shift(81); // 'break'
+ case 84: // 'break'
+ shift(84); // 'break'
break;
- case 86: // 'catch'
- shift(86); // 'catch'
+ case 89: // 'catch'
+ shift(89); // 'catch'
break;
- case 93: // 'construction'
- shift(93); // 'construction'
+ case 96: // 'construction'
+ shift(96); // 'construction'
break;
- case 96: // 'context'
- shift(96); // 'context'
+ case 99: // 'context'
+ shift(99); // 'context'
break;
- case 97: // 'continue'
- shift(97); // 'continue'
+ case 100: // 'continue'
+ shift(100); // 'continue'
break;
- case 99: // 'copy-namespaces'
- shift(99); // 'copy-namespaces'
+ case 102: // 'copy-namespaces'
+ shift(102); // 'copy-namespaces'
break;
- case 101: // 'decimal-format'
- shift(101); // 'decimal-format'
+ case 104: // 'decimal-format'
+ shift(104); // 'decimal-format'
break;
- case 120: // 'encoding'
- shift(120); // 'encoding'
+ case 123: // 'encoding'
+ shift(123); // 'encoding'
break;
- case 127: // 'exit'
- shift(127); // 'exit'
+ case 130: // 'exit'
+ shift(130); // 'exit'
break;
- case 128: // 'external'
- shift(128); // 'external'
+ case 131: // 'external'
+ shift(131); // 'external'
break;
- case 136: // 'ft-option'
- shift(136); // 'ft-option'
+ case 139: // 'ft-option'
+ shift(139); // 'ft-option'
break;
- case 149: // 'in'
- shift(149); // 'in'
+ case 152: // 'in'
+ shift(152); // 'in'
break;
- case 150: // 'index'
- shift(150); // 'index'
+ case 153: // 'index'
+ shift(153); // 'index'
break;
- case 156: // 'integrity'
- shift(156); // 'integrity'
+ case 159: // 'integrity'
+ shift(159); // 'integrity'
break;
- case 166: // 'lax'
- shift(166); // 'lax'
+ case 169: // 'lax'
+ shift(169); // 'lax'
break;
- case 187: // 'nodes'
- shift(187); // 'nodes'
+ case 190: // 'nodes'
+ shift(190); // 'nodes'
break;
- case 194: // 'option'
- shift(194); // 'option'
+ case 197: // 'option'
+ shift(197); // 'option'
break;
- case 198: // 'ordering'
- shift(198); // 'ordering'
+ case 201: // 'ordering'
+ shift(201); // 'ordering'
break;
- case 217: // 'revalidation'
- shift(217); // 'revalidation'
+ case 220: // 'revalidation'
+ shift(220); // 'revalidation'
break;
- case 220: // 'schema'
- shift(220); // 'schema'
+ case 223: // 'schema'
+ shift(223); // 'schema'
break;
- case 223: // 'score'
- shift(223); // 'score'
+ case 226: // 'score'
+ shift(226); // 'score'
break;
- case 229: // 'sliding'
- shift(229); // 'sliding'
+ case 232: // 'sliding'
+ shift(232); // 'sliding'
break;
- case 235: // 'strict'
- shift(235); // 'strict'
+ case 238: // 'strict'
+ shift(238); // 'strict'
break;
- case 246: // 'tumbling'
- shift(246); // 'tumbling'
+ case 249: // 'tumbling'
+ shift(249); // 'tumbling'
break;
- case 247: // 'type'
- shift(247); // 'type'
+ case 250: // 'type'
+ shift(250); // 'type'
break;
- case 252: // 'updating'
- shift(252); // 'updating'
+ case 255: // 'updating'
+ shift(255); // 'updating'
break;
- case 256: // 'value'
- shift(256); // 'value'
+ case 259: // 'value'
+ shift(259); // 'value'
break;
- case 258: // 'version'
- shift(258); // 'version'
+ case 261: // 'version'
+ shift(261); // 'version'
break;
- case 262: // 'while'
- shift(262); // 'while'
+ case 265: // 'while'
+ shift(265); // 'while'
break;
- case 92: // 'constraint'
- shift(92); // 'constraint'
+ case 95: // 'constraint'
+ shift(95); // 'constraint'
break;
- case 171: // 'loop'
- shift(171); // 'loop'
+ case 174: // 'loop'
+ shift(174); // 'loop'
break;
default:
- shift(216); // 'returning'
+ shift(219); // 'returning'
}
eventHandler.endNonterminal("NCName", e0);
}
@@ -1747,7 +1369,7 @@ exports.JSONiqLexer = function() {
for (;;)
{
code = match(set);
- if (code != 28) // S^WS
+ if (code != 30) // S^WS
{
break;
}
@@ -1876,10 +1498,10 @@ JSONiqTokenizer.getTokenSet = function(tokenSetId)
{
var set = [];
var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095;
- for (var i = 0; i < 276; i += 32)
+ for (var i = 0; i < 279; i += 32)
{
var j = i;
- var i0 = (i >> 5) * 2062 + s - 1;
+ var i0 = (i >> 5) * 2066 + s - 1;
var i1 = i0 >> 2;
var i2 = i1 >> 2;
var f = JSONiqTokenizer.EXPECTED[(i0 & 3) + JSONiqTokenizer.EXPECTED[(i1 & 3) + JSONiqTokenizer.EXPECTED[(i2 & 3) + JSONiqTokenizer.EXPECTED[i2 >> 2]]]];
@@ -1895,32 +1517,35 @@ JSONiqTokenizer.getTokenSet = function(tokenSetId)
};
JSONiqTokenizer.MAP0 =
-[ 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35
+[ 67, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 37, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 31, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 31, 62, 63, 64, 65, 37
];
JSONiqTokenizer.MAP1 =
-[ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181, 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 247, 261, 277, 293, 309, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 35, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 31, 31, 35, 35, 35, 35, 35, 35, 35, 65, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65
+[ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181, 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 247, 261, 277, 293, 309, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 67, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 37, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 37, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 31, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 31, 62, 63, 64, 65, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 31, 31, 37, 37, 37, 37, 37, 37, 37, 66, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66
];
JSONiqTokenizer.MAP2 =
-[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 35, 31, 35, 31, 31, 35
+[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 37, 31, 37, 31, 31, 37
];
JSONiqTokenizer.INITIAL =
-[ 1, 2, 36867, 45060, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
+[ 1, 2, 49155, 57348, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
];
JSONiqTokenizer.TRANSITION =
-[ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22874, 18847, 17152, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 17365, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 17470, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 18199, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 17890, 17922, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18065, 36544, 18632, 18081, 18098, 18114, 18159, 18185, 18215, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17756, 18816, 18429, 18445, 18143, 17393, 18500, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18590, 21686, 17152, 19027, 19252, 17687, 19027, 28677, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 17365, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 17470, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 18199, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 17890, 17922, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18065, 36544, 18632, 18081, 18098, 18114, 18159, 18185, 18215, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17756, 18816, 18429, 18445, 18143, 17393, 18500, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20083, 18847, 18648, 19027, 19252, 21242, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18774, 18789, 18805, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18832, 22889, 18925, 19027, 19252, 17569, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18956, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 19073, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 18972, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21818, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21671, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22395, 20098, 18731, 19027, 19252, 17687, 19027, 17173, 23525, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 18129, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 20746, 19130, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19043, 18847, 18620, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19100, 22410, 19006, 19027, 19252, 17687, 19027, 19084, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21967, 21982, 19006, 19027, 19252, 17687, 19027, 18701, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22380, 18847, 19006, 19027, 19252, 30659, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 19157, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 19299, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 19191, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21758, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 19237, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21626, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19268, 19284, 19326, 18482, 27869, 30509, 24384, 31417, 23323, 18482, 19370, 18482, 18484, 27202, 19389, 27202, 27202, 19411, 24384, 34295, 24384, 24384, 25485, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 28530, 19459, 24384, 24384, 24384, 24384, 24017, 18036, 24041, 18482, 18482, 18482, 18484, 19487, 27202, 27202, 27202, 27202, 19503, 35523, 19539, 24384, 24384, 24384, 19647, 18482, 35623, 18482, 18482, 23052, 27202, 19557, 27202, 27202, 30764, 23993, 24384, 19579, 24384, 24384, 26758, 18482, 18482, 19346, 27867, 27202, 27202, 19599, 17590, 23998, 24384, 24384, 19619, 25683, 18482, 18482, 28511, 27202, 27203, 23997, 19639, 19887, 28419, 18902, 18483, 19663, 27202, 24325, 35844, 19887, 30991, 19713, 19395, 19736, 22259, 19754, 22073, 19770, 35154, 19795, 19816, 19836, 19859, 25794, 34248, 24116, 19720, 19875, 30988, 23482, 30981, 28304, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21743, 18847, 19006, 19027, 19252, 17431, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22365, 18847, 19907, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21641, 18847, 19326, 18482, 27869, 30544, 24384, 29176, 21442, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 19935, 24384, 24384, 24384, 24384, 32316, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 28530, 19965, 24384, 24384, 24384, 24384, 31473, 18475, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19988, 24384, 24384, 24384, 24384, 24384, 33654, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 29523, 29939, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 20017, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20068, 19058, 20158, 20367, 20884, 17944, 20276, 20853, 25651, 20604, 20460, 20185, 20209, 17189, 17208, 17281, 17675, 20232, 20273, 20295, 20338, 22456, 20777, 20600, 21329, 20635, 20365, 20937, 21207, 17292, 17421, 21157, 17192, 21217, 22425, 20279, 25549, 22436, 20276, 20383, 18983, 20421, 20446, 21317, 21051, 20476, 20322, 20663, 20490, 17543, 17559, 17585, 22463, 20540, 19523, 20246, 20556, 20257, 20430, 20585, 20620, 20193, 20651, 17661, 18368, 17703, 17730, 17772, 19513, 20679, 20692, 22446, 21027, 21097, 18990, 21111, 20708, 20736, 17744, 17795, 17874, 17590, 25536, 20349, 20762, 20812, 20169, 20828, 21376, 17714, 17976, 18021, 18560, 20844, 20569, 25560, 20869, 20900, 18114, 18159, 20916, 20953, 21013, 21043, 21067, 18281, 21083, 18574, 21127, 21143, 21181, 20515, 20930, 20883, 20504, 21197, 21233, 21258, 20524, 20216, 17405, 21270, 21286, 21302, 20720, 20310, 21345, 21361, 21392, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21952, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 21427, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 21479, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 36500, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 28667, 21921, 17617, 36472, 18265, 17237, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 21550, 21509, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 21535, 30636, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21773, 18847, 21587, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21611, 18847, 19006, 19027, 19252, 18169, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21728, 19115, 21878, 19027, 19252, 17687, 19027, 19310, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 17379, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 21906, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 18322, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21937, 18605, 19006, 19027, 19252, 22018, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21656, 21833, 19006, 19027, 19252, 17687, 19027, 21519, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 31473, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 32253, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 22228, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 31473, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 31644, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 31473, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 33557, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 34068, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22245, 24384, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 31473, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22290, 18847, 22034, 18482, 27869, 34957, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 34436, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22320, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 27077, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 19919, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21803, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22275, 22479, 19006, 19027, 19252, 17687, 19027, 19141, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 22510, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22574, 18847, 22954, 22970, 27597, 22986, 23002, 23033, 22062, 18482, 18482, 18482, 23049, 27202, 27202, 27202, 23068, 22096, 24384, 24384, 24384, 23088, 31359, 31082, 19693, 18482, 28112, 28225, 19443, 35045, 27202, 27202, 23108, 23139, 23155, 23178, 24384, 24384, 23212, 35330, 31659, 23228, 18482, 23256, 23274, 27795, 26712, 23293, 35214, 34879, 33340, 23312, 18235, 23359, 32708, 23949, 24384, 23380, 35255, 23429, 18482, 33884, 23408, 23448, 27202, 27202, 23498, 23518, 21406, 23541, 24384, 24384, 23570, 26114, 23601, 23623, 18482, 33444, 23651, 32875, 27202, 22171, 18862, 23702, 36589, 24384, 18481, 23731, 32601, 27202, 23750, 23768, 20047, 32969, 24367, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 23784, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 28217, 31795, 23804, 26925, 34916, 23831, 26501, 25793, 23859, 23895, 23482, 30981, 22080, 19438, 27956, 19678, 29812, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22589, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 28902, 25794, 27202, 27202, 27202, 34019, 23914, 22148, 24384, 24384, 24384, 28393, 23930, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 26591, 18482, 18482, 18482, 31585, 23965, 27202, 27202, 27202, 23986, 22185, 24014, 24384, 24384, 24384, 24033, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 26504, 24057, 24107, 24132, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22604, 18847, 22034, 19697, 27869, 24166, 24384, 24182, 24198, 26600, 18482, 18482, 18484, 24233, 24249, 27202, 27202, 22096, 24268, 24284, 24384, 24384, 30621, 19800, 35427, 35999, 32609, 18482, 25794, 24303, 28959, 23752, 27202, 35010, 22148, 24341, 32040, 26837, 24383, 31473, 31659, 18482, 18482, 18482, 24784, 18484, 27202, 27202, 27202, 27202, 24401, 19503, 24384, 24384, 24384, 24384, 20134, 31154, 18482, 18482, 18482, 27845, 23052, 27202, 27202, 33502, 27202, 30764, 21406, 24384, 24384, 22938, 24384, 26114, 18482, 36246, 18482, 27867, 27202, 24423, 27202, 22171, 22934, 24384, 24442, 24384, 36762, 28438, 18482, 34466, 34508, 35771, 24461, 24385, 24477, 25677, 18482, 36220, 27202, 27202, 24498, 30954, 23715, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 24521, 30990, 27868, 34251, 30090, 23343, 24546, 19856, 25793, 19779, 30988, 23482, 26152, 22080, 19438, 29824, 24562, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22619, 18847, 22034, 25767, 22132, 25325, 23162, 29176, 24597, 24091, 23607, 24656, 26122, 24680, 24426, 24696, 28551, 22096, 24731, 24445, 24747, 23364, 30621, 18482, 18482, 18482, 18482, 24781, 25794, 27202, 27202, 27202, 34210, 35010, 22148, 24384, 24384, 24384, 33259, 31473, 22525, 24087, 24213, 18482, 18482, 34908, 24800, 30419, 27202, 27202, 32418, 19503, 29781, 35065, 24384, 24384, 19891, 31154, 24835, 18482, 18482, 24854, 29214, 27202, 27202, 32006, 27202, 30764, 35344, 24384, 24384, 31544, 24384, 26114, 33098, 27814, 27002, 27867, 34668, 25625, 24871, 22171, 22934, 19214, 34531, 24889, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 33615, 27202, 27202, 24907, 24930, 23554, 30991, 18484, 27202, 31802, 22199, 19466, 23052, 23296, 19847, 30877, 31015, 24955, 19859, 24983, 34248, 30871, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 24999, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22634, 18847, 25024, 25040, 31293, 25056, 25072, 25088, 22062, 34734, 24217, 36253, 34808, 32637, 25104, 23072, 32848, 22245, 36623, 25120, 30679, 27356, 30621, 25136, 26455, 25174, 25208, 22540, 23240, 25224, 25240, 25256, 25306, 25341, 25357, 25418, 25446, 25470, 26739, 25522, 31659, 23635, 25576, 27398, 25593, 28592, 25945, 25617, 27202, 32546, 27295, 25641, 25850, 25667, 24384, 34758, 25699, 25716, 22552, 27787, 30221, 25756, 25789, 25810, 25828, 28333, 28988, 30764, 21493, 33405, 25848, 25866, 25904, 26114, 31227, 26677, 30167, 27867, 25941, 25961, 27202, 22171, 22934, 25977, 25997, 24384, 23394, 27775, 25740, 25270, 26013, 26048, 26064, 26104, 26138, 26178, 26211, 26230, 26247, 30500, 26380, 26282, 28388, 30991, 33711, 27202, 33645, 26324, 36716, 26353, 26374, 35300, 30990, 26396, 26415, 30927, 26358, 33832, 26442, 26471, 26487, 26520, 23482, 33146, 26539, 26555, 27956, 31266, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22649, 18847, 26576, 26189, 26616, 25325, 26643, 29176, 22062, 26669, 18482, 18482, 18484, 26693, 27202, 27202, 27202, 22096, 26728, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 26782, 25794, 27202, 27202, 27202, 26258, 35010, 22148, 24384, 24384, 24384, 21571, 31473, 31659, 18482, 18482, 33949, 18482, 18484, 27202, 27202, 25812, 27202, 27202, 19503, 24384, 24384, 24384, 26800, 24384, 31154, 18482, 18482, 18482, 35570, 23052, 27202, 27202, 27202, 26817, 30764, 21406, 24384, 24384, 24384, 26836, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 31882, 18483, 35699, 27202, 19738, 26853, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 26913, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 24967, 31061, 19438, 26953, 27663, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22664, 18847, 26990, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 23017, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 27024, 24384, 24384, 24384, 24384, 24017, 31659, 18482, 18482, 27047, 18482, 18484, 27202, 27202, 27331, 27202, 27202, 27066, 24384, 24384, 29025, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 33957, 27867, 27202, 27202, 27093, 17590, 23998, 24384, 24384, 27114, 27135, 36322, 27153, 27201, 27219, 28359, 18229, 34780, 34405, 27235, 35972, 27268, 27293, 27311, 36040, 33984, 20980, 31851, 21453, 30535, 27347, 32520, 27372, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 26337, 30118, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 27397, 27414, 27436, 27452, 27473, 22062, 18482, 18482, 30171, 18484, 27202, 27202, 27982, 27202, 22096, 24384, 24384, 25700, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 34013, 27202, 27202, 27202, 27202, 29731, 22148, 24384, 24384, 24384, 24384, 27119, 31659, 27489, 18482, 18482, 18482, 18484, 27185, 27202, 27202, 27202, 27202, 19503, 27457, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 27050, 23052, 27202, 27202, 27202, 32469, 30764, 23993, 24384, 24384, 24384, 34982, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 20796, 27202, 29362, 22110, 33940, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22679, 18847, 22034, 27508, 27528, 27553, 35182, 27569, 22062, 29693, 26300, 23258, 27585, 24715, 27613, 27202, 27648, 22096, 36597, 27698, 24384, 27733, 18877, 18482, 27811, 18482, 27830, 22046, 27865, 32194, 27202, 25158, 27885, 27913, 22148, 29458, 24384, 29977, 34392, 26750, 27763, 26889, 18482, 18482, 27252, 29886, 27929, 27202, 27202, 27202, 27981, 27998, 28024, 28045, 24384, 24384, 28062, 28081, 28128, 25506, 28145, 26088, 28160, 27202, 28173, 24640, 28189, 30764, 31496, 24384, 28205, 34154, 36166, 24939, 28241, 28259, 28283, 21463, 33034, 28320, 28349, 17590, 20967, 23092, 28375, 28409, 28095, 28435, 28454, 28474, 28509, 28527, 20001, 33682, 25879, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30272, 28267, 28546, 28567, 19425, 28583, 23052, 23296, 19847, 19471, 28608, 28653, 31075, 25794, 34248, 19856, 25793, 19779, 29644, 35950, 30318, 22080, 19438, 27956, 23123, 28693, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 22494, 18482, 18482, 18482, 18482, 18484, 25283, 27202, 27202, 27202, 27202, 19503, 29397, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22694, 18847, 28740, 28775, 28810, 28834, 28850, 28873, 28889, 24142, 28936, 31945, 36329, 25290, 28954, 27632, 28975, 29004, 24505, 29020, 25454, 29041, 23017, 27512, 29083, 29103, 30721, 18482, 23478, 29123, 24819, 27202, 29148, 28920, 27024, 29166, 23196, 24384, 29192, 35529, 31659, 18482, 18482, 25601, 32589, 29211, 27202, 27202, 31434, 30700, 29230, 27066, 24384, 24384, 24384, 29255, 29306, 19647, 18482, 33383, 18482, 18482, 23052, 27202, 29333, 27202, 27202, 30764, 23993, 35925, 24384, 24384, 24384, 27717, 36123, 18482, 18482, 29350, 29413, 27202, 35642, 17590, 21411, 29432, 24384, 25981, 18481, 33866, 18482, 27202, 26967, 27203, 23997, 32729, 19887, 25677, 18482, 26897, 27202, 27202, 29451, 23870, 24354, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 31737, 19859, 25794, 34248, 19856, 29474, 29539, 29283, 29581, 29637, 22080, 32533, 29501, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22709, 18847, 22034, 29660, 29512, 25325, 33242, 29176, 29682, 27245, 18482, 29709, 33286, 26974, 27202, 29725, 29747, 22096, 19221, 24384, 32702, 29772, 18877, 26784, 33892, 28458, 18482, 18482, 25794, 29797, 27202, 29840, 27202, 35010, 22148, 35817, 24384, 29859, 24384, 24017, 36756, 25192, 18482, 18482, 29879, 18484, 27202, 29902, 27202, 26032, 27202, 29925, 24384, 29960, 24384, 33594, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 29239, 29993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 31665, 18482, 18482, 19603, 27202, 27203, 23997, 30013, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19949, 19466, 36661, 19563, 19847, 30029, 30128, 30062, 19859, 25794, 30078, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 30106, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22724, 18847, 30152, 30187, 30237, 30288, 30304, 30344, 22062, 35616, 32797, 25773, 18484, 29909, 34096, 26820, 27202, 22096, 24914, 23189, 29195, 24384, 18877, 34444, 30360, 18482, 18482, 18482, 23413, 24707, 27202, 27202, 27202, 35010, 30378, 34990, 24384, 24384, 24384, 24017, 29554, 18482, 18482, 27137, 18482, 31281, 30394, 27202, 27202, 30413, 30566, 19503, 30435, 24384, 24384, 29969, 35678, 19647, 28759, 30455, 35459, 35606, 23052, 28724, 30490, 30525, 30560, 30764, 23993, 20123, 30582, 30606, 30675, 26291, 33426, 28938, 27682, 30695, 23675, 33466, 28493, 17590, 23944, 20405, 34338, 20997, 32331, 26308, 30716, 30737, 24315, 30756, 21563, 36372, 30787, 26653, 24611, 33177, 32448, 30814, 31804, 25430, 25917, 26523, 18484, 28818, 31802, 29269, 19466, 28297, 34240, 23815, 26076, 30842, 30858, 32115, 30893, 30915, 32757, 25793, 30943, 30988, 23482, 30981, 30970, 31007, 27956, 19678, 29489, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22739, 18847, 31031, 31047, 32397, 31098, 31114, 31170, 22062, 18482, 29565, 35577, 36725, 27202, 33216, 31186, 24407, 22096, 24384, 20142, 31202, 34301, 27748, 31218, 33388, 27166, 18482, 29087, 27277, 27202, 31251, 31309, 27202, 31328, 31344, 24384, 31375, 31391, 24384, 31410, 31659, 18482, 36130, 32801, 18482, 18484, 27202, 27202, 31433, 31450, 27202, 19503, 24384, 24384, 31470, 33588, 24384, 32977, 18482, 18482, 18482, 18482, 30038, 27202, 27202, 27202, 27202, 31489, 32244, 24384, 24384, 24384, 24384, 31512, 18482, 28755, 18482, 24634, 35732, 27202, 27202, 28637, 31538, 35788, 24384, 24384, 19337, 31986, 18482, 33208, 25316, 27203, 29997, 29863, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 31560, 19887, 31601, 32369, 33316, 30136, 31629, 19972, 31681, 31726, 31753, 31781, 30046, 31820, 31847, 25794, 34282, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 31867, 30252, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22754, 18847, 22034, 18909, 30474, 31902, 24287, 31918, 31934, 32767, 35262, 27008, 29621, 34103, 19820, 29416, 33323, 22096, 27031, 30439, 29435, 28857, 29596, 18482, 18482, 18482, 31961, 18482, 25794, 27202, 27202, 35038, 27202, 35010, 22148, 24384, 24384, 29389, 24384, 24017, 31979, 18482, 26937, 18482, 18482, 18484, 27202, 31454, 32002, 27202, 27202, 32022, 24384, 33015, 32056, 24384, 24384, 33690, 18482, 18482, 33119, 18482, 23052, 27202, 27202, 27624, 27202, 29756, 32078, 24384, 24384, 34332, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 36691, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 31710, 22155, 33181, 24252, 32103, 30990, 27868, 34251, 19859, 25794, 34248, 30265, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 32138, 32166, 32186, 30826, 33252, 29067, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 23585, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 32210, 24384, 24384, 24384, 24384, 24017, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 32233, 24384, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 33857, 18483, 36057, 27202, 19738, 35289, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22769, 18847, 32269, 31613, 34604, 32285, 32301, 32351, 22062, 18482, 32367, 19354, 32385, 27202, 32413, 27098, 32434, 22096, 24384, 32485, 20052, 32506, 18877, 25396, 23734, 18482, 18482, 32562, 32625, 27202, 32653, 27202, 23664, 32673, 32689, 24384, 32724, 24384, 25888, 32745, 34706, 18482, 27381, 32783, 24577, 24838, 32817, 24873, 32838, 32864, 27202, 32899, 32934, 24384, 32957, 29317, 24384, 30798, 26214, 27678, 33875, 18482, 23052, 36352, 27202, 32993, 27202, 30764, 23993, 32087, 24384, 33013, 24384, 35853, 18482, 18482, 30362, 27965, 27202, 27202, 33754, 17590, 20112, 24384, 24384, 34576, 20792, 18482, 18482, 33031, 27202, 27203, 36159, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 34554, 24150, 33050, 33080, 33114, 27868, 34251, 23843, 26560, 31696, 19856, 25793, 19779, 30988, 23482, 30981, 33135, 22123, 27956, 23463, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22784, 18847, 33162, 28106, 33197, 25325, 33232, 29176, 22062, 33275, 35433, 18482, 18484, 33302, 26399, 33339, 27202, 22096, 33356, 28065, 33404, 24384, 18877, 22229, 18482, 33421, 18482, 18482, 33442, 33460, 24811, 27202, 27202, 26627, 22148, 24758, 35190, 24384, 24384, 25925, 29611, 18482, 18482, 29290, 25186, 33482, 33501, 27202, 27202, 33518, 36276, 19503, 33554, 24384, 24384, 33573, 32490, 19647, 18482, 18482, 31235, 33610, 23052, 27202, 27202, 33631, 27202, 30764, 23993, 24384, 24384, 33670, 24384, 26862, 27492, 18482, 33706, 27867, 32883, 34639, 27202, 17590, 32036, 24765, 23788, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 33727, 36097, 19887, 25677, 18482, 23334, 27202, 29150, 19738, 23870, 35357, 30328, 18484, 33748, 34675, 33770, 19466, 34050, 33824, 31831, 30990, 27868, 34251, 33848, 28913, 33908, 19856, 30469, 33973, 25385, 36033, 34000, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22799, 18847, 34035, 32576, 34084, 34119, 34135, 34170, 34186, 32150, 36005, 31522, 31886, 34202, 34226, 34267, 29334, 34317, 34354, 34378, 34421, 26801, 18877, 26195, 29666, 25402, 18482, 35091, 25794, 34460, 34482, 34504, 25832, 35010, 22148, 34524, 34547, 34570, 19623, 24017, 36654, 35111, 24664, 18482, 32335, 34592, 31312, 34620, 34636, 27202, 34655, 34691, 28046, 34750, 34774, 24384, 33785, 19647, 34796, 32170, 34844, 24581, 33485, 26704, 34828, 34860, 35493, 29132, 36704, 33800, 35368, 32941, 34146, 26758, 34895, 18482, 18482, 34932, 34948, 27202, 32997, 17590, 29944, 34973, 24384, 36296, 25500, 30202, 35875, 35006, 35026, 26266, 20396, 31146, 35061, 35081, 35127, 24623, 28484, 27897, 19738, 35143, 35170, 26162, 28794, 35206, 35230, 33064, 35245, 23052, 23296, 29054, 30990, 27868, 34251, 19859, 25794, 34248, 24530, 25147, 35278, 31765, 35316, 33370, 22080, 19438, 27956, 24072, 28623, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22814, 18847, 22034, 34720, 34059, 35384, 20989, 35400, 35416, 35449, 18482, 18482, 23432, 35475, 27202, 27202, 27202, 35509, 31127, 24384, 24384, 24384, 35545, 18482, 26871, 35101, 35593, 24855, 25794, 30397, 23502, 26024, 35639, 35658, 22148, 19541, 19583, 30590, 35674, 27709, 35560, 29107, 18482, 18482, 18482, 18484, 27202, 35694, 27202, 27202, 27202, 35715, 24384, 36580, 24384, 24384, 24384, 19647, 30215, 18482, 18482, 18482, 23052, 35731, 27202, 27202, 27202, 27537, 22904, 24384, 24384, 24384, 24384, 23879, 35748, 18482, 18482, 25008, 35770, 27202, 27202, 17590, 20031, 35787, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 23898, 18484, 34488, 31802, 25371, 19466, 23052, 23296, 26426, 30990, 27868, 34251, 19859, 25794, 35804, 19856, 27178, 35833, 33092, 23482, 30981, 22080, 22212, 28705, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22829, 18847, 22034, 35869, 28716, 25325, 31137, 29176, 22062, 26766, 18482, 22558, 18484, 23970, 27202, 29843, 27202, 22096, 33732, 24384, 31394, 24384, 18877, 18482, 18482, 26880, 18482, 18482, 25794, 27202, 30740, 27202, 27202, 35010, 22148, 24384, 24891, 24384, 24384, 24017, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22844, 18847, 22034, 27849, 27869, 35891, 24384, 35907, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 31575, 18482, 18482, 18482, 18482, 26231, 27202, 27202, 27202, 27202, 27202, 19503, 35923, 24384, 24384, 24384, 24384, 19647, 18482, 28129, 18482, 18482, 35941, 27202, 32822, 27202, 32657, 30764, 23993, 24384, 32217, 24384, 32062, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22859, 18847, 22034, 35966, 34820, 25325, 33931, 29176, 35988, 18482, 23277, 18482, 36021, 27202, 27202, 36056, 36073, 22096, 24384, 24384, 36096, 33921, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 36113, 18482, 25577, 18482, 18482, 18484, 27202, 27202, 27324, 27202, 27202, 36146, 24384, 24384, 34362, 24384, 24384, 19647, 28243, 18482, 18482, 18482, 23052, 30899, 27202, 27202, 27202, 23686, 23993, 33808, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 19373, 27869, 36182, 24384, 36198, 22062, 18482, 18482, 18482, 18049, 27202, 27202, 27202, 35485, 22096, 24384, 24384, 24384, 29371, 18877, 18482, 36214, 18482, 28788, 18482, 25794, 34872, 27202, 27420, 27202, 35010, 22148, 29380, 24384, 24482, 24384, 24017, 31659, 18482, 36236, 18482, 18482, 18484, 27202, 36080, 27202, 27202, 27202, 19503, 24384, 28029, 24384, 24384, 24384, 19647, 18482, 18482, 32122, 18482, 35754, 27202, 27202, 36269, 27202, 33531, 23993, 24384, 24384, 36292, 24384, 36312, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 25730, 18482, 18482, 36345, 27202, 27203, 19203, 24385, 19887, 25677, 31963, 18483, 27202, 32462, 19738, 23870, 36368, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22350, 18847, 36388, 19027, 19252, 17687, 36433, 17173, 17595, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 36452, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 17682, 21701, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22335, 18847, 19006, 19027, 19252, 17687, 19027, 21712, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21788, 18847, 36488, 19027, 19252, 17687, 19027, 17173, 17779, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17810, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21165, 21997, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21803, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 36516, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21803, 18847, 19326, 18482, 27869, 30764, 24384, 29176, 28008, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 36566, 24384, 24384, 24384, 24384, 22919, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 28530, 36613, 24384, 24384, 24384, 24384, 24017, 18892, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 36639, 36677, 18731, 19027, 19252, 17687, 19027, 17454, 17595, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17223, 17308, 17327, 17346, 18937, 36741, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 17682, 21701, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 0, 94242, 0, 118820, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2482176, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 2207744, 2404352, 2412544, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3104768, 2605056, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2678784, 2207744, 2695168, 2207744, 2703360, 2207744, 2711552, 2752512, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 139, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2158592, 2158592, 2158592, 2863104, 2891776, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2785280, 2207744, 2809856, 2207744, 2207744, 2842624, 2207744, 2207744, 2207744, 2899968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2564096, 2207744, 2207744, 2207744, 2158592, 2404352, 2412544, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2605056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2678784, 2158592, 2695168, 2158592, 2703360, 2158592, 2711552, 2752512, 2158592, 2158592, 2785280, 2158592, 2158592, 2785280, 2158592, 2809856, 2158592, 2158592, 2842624, 2158592, 2158592, 2158592, 2899968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 641, 0, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 32768, 0, 2158592, 0, 2158592, 2158592, 2158592, 2383872, 2158592, 2158592, 2158592, 2158592, 3006464, 2383872, 2207744, 2207744, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2572573, 2158877, 2158877, 0, 2207744, 2207744, 2596864, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2641920, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162968, 0, 0, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2146304, 2146304, 2224128, 2224128, 2232320, 2232320, 2232320, 641, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2531328, 2158592, 2158592, 2158592, 2158592, 2158592, 2617344, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2502656, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2699264, 2158592, 2158592, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2207744, 2863104, 2891776, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3018752, 2207744, 3043328, 2207744, 2207744, 2207744, 2207744, 3080192, 2207744, 2207744, 3112960, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 167936, 0, 0, 2162688, 0, 0, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2404352, 2412544, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2584576, 2158592, 2609152, 2158592, 2158592, 2629632, 2158592, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2158592, 2158592, 3170304, 3174400, 2158592, 2367488, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 0, 2207744, 2207744, 2207744, 2433024, 2207744, 2453504, 2461696, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2510848, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3096576, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 2715648, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2867200, 2207744, 2904064, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2473984, 2207744, 2207744, 2494464, 2207744, 2207744, 2207744, 2523136, 2207744, 2207744, 2207744, 2207744, 3014656, 2207744, 2207744, 3051520, 2207744, 2207744, 3100672, 2207744, 2207744, 3121152, 2207744, 2207744, 2207744, 2207744, 2207744, 2531328, 2207744, 2207744, 2207744, 2207744, 2207744, 2617344, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 1508, 2207744, 3149824, 2207744, 2207744, 3170304, 3174400, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 2158592, 2158592, 2158592, 2404352, 2412544, 2707456, 2732032, 2207744, 2207744, 2207744, 2822144, 2826240, 2207744, 2895872, 2207744, 2207744, 2924544, 2207744, 2207744, 2973696, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 285, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 0, 0, 2535424, 2543616, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2572288, 2981888, 2207744, 2207744, 3002368, 2207744, 3047424, 3063808, 3076096, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3203072, 2708960, 2732032, 2158592, 2158592, 2158592, 2822144, 2827748, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2981888, 2158592, 2158592, 3002368, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2981888, 2158592, 2158592, 3003876, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 172310, 279, 0, 2162688, 0, 0, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2908160, 2527232, 2207744, 2207744, 2576384, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2908160, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 0, 0, 2158592, 2158592, 2158592, 2158592, 2633728, 2658304, 0, 0, 2740224, 2744320, 0, 2834432, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 933, 45, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 2494464, 2158592, 2158592, 2158592, 2524757, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 1504, 2158592, 2498560, 2158592, 2158592, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 2736128, 2158592, 2158592, 0, 2158592, 2912256, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3108864, 2158592, 2158592, 3133440, 3145728, 3153920, 2375680, 2379776, 2207744, 2207744, 2420736, 2207744, 2449408, 2207744, 2207744, 2207744, 2498560, 2207744, 2207744, 2207744, 2207744, 2568192, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 551, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 2020, 2158592, 2592768, 2625536, 2207744, 2207744, 2674688, 2736128, 2207744, 2207744, 2207744, 2912256, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 20480, 0, 0, 0, 0, 0, 2162688, 20480, 0, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 641, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2498560, 2158592, 2158592, 1621, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 1608, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1107, 97, 97, 1110, 97, 97, 3133440, 3145728, 3153920, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3014656, 2158592, 2158592, 3051520, 2158592, 2158592, 3100672, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2416640, 2207744, 2465792, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2633728, 2658304, 2740224, 2744320, 2834432, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 32768, 0, 0, 0, 0, 0, 0, 2367488, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2158592, 2158592, 2478080, 2158592, 2158592, 2158592, 2535424, 2543616, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3117056, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 2207744, 2584576, 2207744, 2609152, 2207744, 2207744, 2629632, 2207744, 2207744, 2207744, 2686976, 2207744, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158592, 2158592, 2478080, 2207744, 2207744, 2990080, 2207744, 2207744, 2158592, 2158592, 2482176, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 0, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 3010560, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158592, 2428928, 2158592, 2514944, 0, 0, 2158592, 2588672, 2158592, 0, 2838528, 2158592, 2158592, 2158592, 3010560, 2158592, 2506752, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 0, 29315, 922, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 3006464, 2383872, 0, 2020, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158592, 2637824, 2953216, 2158592, 2539520, 2158592, 2539520, 2207744, 0, 0, 2539520, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 0, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2965504, 2965504, 2965504, 0, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2474269, 2158877, 2158877, 0, 0, 2158877, 2158877, 2158877, 2158877, 2634013, 2658589, 0, 0, 2740509, 2744605, 0, 2834717, 40976, 18, 36884, 45078, 24, 28, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 36884, 0, 0, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 86016, 0, 0, 2211840, 102439, 0, 0, 0, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 0, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 135, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2158592, 2158592, 2158592, 2596864, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2641920, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2494464, 2158592, 2158592, 2158592, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 0, 27, 27, 0, 2158592, 2498560, 2158592, 2158592, 0, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2494464, 2158592, 2158592, 2158592, 3006464, 2383872, 0, 0, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 40976, 18, 36884, 45078, 24, 27, 147488, 94242, 147456, 147488, 106538, 98347, 0, 0, 147456, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 81920, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2428928, 2158592, 2514944, 2158592, 2588672, 2158592, 2838528, 2158592, 2158592, 40976, 18, 151573, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1487, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 130, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3096576, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 644, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 1080, 0, 1084, 0, 1088, 0, 0, 0, 0, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2531466, 2158730, 2158730, 2158730, 2158730, 2158730, 2617482, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2158592, 2818048, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 159779, 159744, 102439, 159779, 98347, 0, 0, 159744, 40976, 18, 18, 36884, 0, 45078, 0, 2224253, 172032, 2224253, 2232448, 2232448, 172032, 2232448, 90143, 0, 0, 2170880, 0, 0, 550, 829, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 124, 124, 127, 127, 127, 40976, 18, 36884, 45078, 25, 29, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 163931, 40976, 18, 18, 36884, 0, 45078, 249856, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 0, 827, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 4243810, 4243810, 24, 24, 27, 27, 27, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 57344, 286, 2158592, 2158592, 2158592, 2158592, 2707456, 2732032, 2158592, 2158592, 2158592, 2822144, 2826240, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 53248, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1613, 97, 97, 97, 97, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 546, 0, 0, 0, 0, 286, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 17, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 120, 121, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 53248, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 196608, 18, 266240, 24, 24, 27, 27, 27, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 0, 45, 45, 45, 45, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 45, 45, 45, 45, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1766, 67, 67, 67, 1767, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 546, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 743, 57889, 0, 2170880, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1856, 45, 1858, 1859, 67, 67, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367773, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2699549, 2158877, 2158877, 2158877, 2158877, 2158877, 2748701, 2756893, 2777373, 2801949, 97, 1115, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 67, 67, 67, 67, 67, 1258, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1826, 67, 97, 97, 97, 97, 97, 97, 1338, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 905, 97, 97, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 1679, 67, 67, 67, 1682, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 189, 45, 45, 45, 1748, 45, 45, 45, 1749, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1959, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1791, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1802, 67, 1817, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1848, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 45, 45, 45, 1863, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 1878, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1973, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1165, 97, 1167, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 136, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 229376, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 67, 24850, 24850, 12564, 12564, 0, 0, 280, 547, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1789, 97, 57889, 547, 547, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1799, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1092, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1612, 97, 97, 97, 97, 1616, 97, 1297, 1472, 0, 0, 0, 0, 1303, 1474, 0, 0, 0, 0, 1309, 1476, 0, 0, 0, 0, 97, 97, 97, 1481, 97, 97, 97, 97, 97, 97, 1488, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 97, 40976, 18, 36884, 45078, 26, 30, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 213080, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 143448, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 0, 0, 0, 97, 97, 97, 97, 1482, 97, 1483, 97, 97, 97, 97, 97, 97, 1326, 97, 97, 1329, 1330, 97, 97, 97, 97, 97, 97, 1159, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211974, 102439, 0, 0, 106538, 98347, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2474122, 2158730, 2158730, 2494602, 2158730, 2158730, 2158730, 2809994, 2158730, 2158730, 2842762, 2158730, 2158730, 2158730, 2900106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3014794, 2158730, 2158730, 3051658, 2158730, 2158730, 3100810, 2158730, 2158730, 2158730, 2158730, 3096714, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 2207744, 541, 541, 543, 543, 0, 0, 2166784, 0, 548, 549, 549, 0, 286, 2158877, 2158877, 2158877, 2863389, 2892061, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3186973, 2158877, 0, 0, 0, 0, 0, 0, 0, 0, 2367626, 2158877, 2404637, 2412829, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2564381, 2158877, 2158877, 2605341, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2679069, 2158877, 2695453, 2158877, 2703645, 2158877, 2711837, 2752797, 2158877, 0, 2158877, 2158877, 2158877, 2384010, 2158730, 2158730, 2158730, 2158730, 3006602, 2383872, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2441216, 2445312, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2502656, 2158877, 2785565, 2158877, 2810141, 2158877, 2158877, 2842909, 2158877, 2158877, 2158877, 2900253, 2158877, 2158877, 2158877, 2158877, 2158877, 2531613, 2158877, 2158877, 2158877, 2158877, 2158877, 2617629, 2158877, 2158877, 2158877, 2158877, 2158730, 2818186, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3105053, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 0, 0, 97, 97, 97, 1611, 97, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 1499, 97, 97, 97, 97, 97, 2441354, 2445450, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2502794, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2433162, 2158730, 2453642, 2461834, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2580618, 2158730, 2158730, 2158730, 2158730, 2621578, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2699402, 2158730, 2158730, 2158730, 2158730, 2678922, 2158730, 2695306, 2158730, 2703498, 2158730, 2711690, 2752650, 2158730, 2158730, 2785418, 2158730, 2158730, 2158730, 3113098, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3186826, 2158730, 2207744, 2207744, 2207744, 2207744, 2699264, 2207744, 2207744, 2207744, 2207744, 2207744, 2748416, 2756608, 2777088, 2801664, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 0, 0, 2535709, 2543901, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2990365, 2158877, 2158877, 2158730, 2158730, 2158730, 2158730, 2158730, 2572426, 2158877, 2502941, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2580765, 2158877, 2158877, 2158877, 2158877, 2621725, 2158877, 3019037, 2158877, 3043613, 2158877, 2158877, 2158877, 2158877, 3080477, 2158877, 2158877, 3113245, 2158877, 2158877, 2158877, 2158877, 0, 2158877, 2908445, 2158877, 2158877, 2158877, 2978077, 2158877, 2158877, 2158877, 2158877, 3039517, 2158877, 2158730, 2510986, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2584714, 2158730, 2609290, 2158730, 2158730, 2629770, 2158730, 2158730, 2158730, 2388106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2605194, 2158730, 2158730, 2158730, 2158730, 2687114, 2158730, 2715786, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2867338, 2158730, 2904202, 2158730, 2158730, 2158730, 2642058, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2781322, 2793610, 2158730, 3121290, 2158730, 2158730, 2158730, 3149962, 2158730, 2158730, 3170442, 3174538, 2158730, 2367488, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2580480, 2207744, 2207744, 2207744, 2207744, 2621440, 2207744, 2207744, 2158877, 2433309, 2158877, 2453789, 2461981, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2511133, 2158877, 2158877, 2158877, 2158877, 2584861, 2158877, 2609437, 2158877, 2158877, 2629917, 2158877, 2158877, 2158877, 2687261, 2158877, 2715933, 2158877, 2158730, 2158730, 2973834, 2158730, 2982026, 2158730, 2158730, 3002506, 2158730, 3047562, 3063946, 3076234, 2158730, 2158730, 2158730, 2158730, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158877, 2507037, 0, 0, 2158877, 2158730, 2158730, 2158730, 3203210, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 823, 0, 825, 2707741, 2732317, 2158877, 2158877, 2158877, 2822429, 2826525, 2158877, 2896157, 2158877, 2158877, 2924829, 2158877, 2158877, 2973981, 2158877, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 642, 0, 2158592, 0, 45, 1529, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 67, 67, 2982173, 2158877, 2158877, 3002653, 2158877, 3047709, 3064093, 3076381, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3203357, 2523274, 2527370, 2158730, 2158730, 2576522, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2908298, 2494749, 2158877, 2158877, 2158877, 2523421, 2527517, 2158877, 2158877, 2576669, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 40976, 0, 18, 18, 4321280, 2224253, 2232448, 4329472, 2232448, 2158730, 2498698, 2158730, 2158730, 2158730, 2158730, 2568330, 2158730, 2592906, 2625674, 2158730, 2158730, 2674826, 2736266, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2158730, 2912394, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3109002, 2158730, 2158730, 3133578, 3145866, 3154058, 2375680, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375965, 2380061, 2158877, 2158877, 2421021, 2158877, 2449693, 2158877, 2158877, 2158877, 3117341, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3104906, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158877, 2498845, 2158877, 2158877, 0, 2158877, 2158877, 2568477, 2158877, 2593053, 2625821, 2158877, 2158877, 2674973, 0, 0, 0, 0, 97, 97, 1480, 97, 97, 97, 97, 97, 1485, 97, 97, 97, 0, 97, 97, 1729, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 311, 97, 97, 97, 97, 97, 97, 97, 97, 1520, 97, 97, 1523, 97, 97, 1526, 97, 2736413, 2158877, 2158877, 0, 2158877, 2912541, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3109149, 2158877, 2158877, 3014941, 2158877, 2158877, 3051805, 2158877, 2158877, 3100957, 2158877, 2158877, 3121437, 2158877, 2158877, 2158877, 3150109, 3133725, 3146013, 3154205, 2158730, 2408586, 2416778, 2158730, 2465930, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3018890, 2158730, 3043466, 2158730, 2158730, 2158730, 2158730, 3080330, 2633866, 2658442, 2740362, 2744458, 2834570, 2949258, 2158730, 2986122, 2158730, 2998410, 2158730, 2158730, 2158730, 3129482, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158877, 2408733, 2416925, 2158877, 2466077, 2158877, 2158877, 3170589, 3174685, 2158877, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2424970, 2158730, 2158730, 2158730, 2158730, 2707594, 2732170, 2158730, 2158730, 2158730, 2822282, 2826378, 2158730, 2896010, 2158730, 2158730, 2924682, 2949405, 2158877, 2986269, 2158877, 2998557, 2158877, 2158877, 2158877, 3129629, 2158730, 2158730, 2478218, 2158730, 2158730, 2158730, 2535562, 2543754, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3117194, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 2781184, 2793472, 2207744, 2818048, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 541, 0, 543, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158877, 2158877, 2478365, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2158730, 2482314, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 542, 0, 544, 2158730, 2158730, 2158730, 2990218, 2158730, 2158730, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 135, 0, 2207744, 2207744, 2990080, 2207744, 2207744, 2158877, 2158877, 2482461, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2429066, 2158730, 2515082, 2158730, 2588810, 2158730, 2838666, 2158730, 2158730, 2158730, 3010698, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158877, 2429213, 2158877, 2515229, 0, 0, 2158877, 2588957, 2158877, 0, 2838813, 2158877, 2158877, 2158877, 3010845, 2158730, 2506890, 2158730, 2158730, 2158730, 2748554, 2756746, 2777226, 2801802, 2158730, 2158730, 2158730, 2863242, 2891914, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2564234, 2158730, 2158730, 2158730, 2158730, 2158730, 2597002, 2158730, 2158730, 2158730, 3006464, 2384157, 0, 0, 2158877, 2158877, 2158877, 2158877, 3006749, 2158730, 2637962, 2953354, 2158730, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158877, 2638109, 2953501, 2158877, 2539658, 2158730, 2539520, 2207744, 0, 0, 2539805, 2158877, 2158730, 2158730, 2158730, 2977930, 2158730, 2158730, 2158730, 2158730, 3039370, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3158154, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2965642, 2965504, 2965789, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1484, 97, 97, 97, 97, 2158592, 18, 0, 122880, 0, 0, 0, 77824, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 356, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1427, 67, 67, 67, 67, 67, 1432, 67, 67, 67, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 122880, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 1322, 550, 0, 286, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 4329472, 27, 27, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 542, 0, 0, 0, 542, 0, 544, 0, 0, 0, 544, 0, 550, 0, 0, 0, 0, 0, 97, 97, 1610, 97, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 237568, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 192512, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 94, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 96, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 12378, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 126, 126, 126, 126, 90143, 0, 0, 2170880, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 20480, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 241664, 102439, 106538, 98347, 0, 0, 20568, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 200797, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 0, 0, 44, 0, 0, 20575, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 41, 41, 41, 0, 0, 1126400, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 89, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 131201, 27, 27, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 208896, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 32768, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2433024, 2158592, 2453504, 2461696, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 245783, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 221184, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 180224, 40976, 18, 18, 36884, 155648, 45078, 0, 24, 24, 217088, 27, 27, 27, 217088, 90143, 0, 0, 2170880, 0, 0, 828, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 233472, 0, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 0, 0, 97, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1788, 97, 97, 0, 97, 2024, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 235, 67, 67, 67, 67, 67, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1798, 45, 45, 1800, 45, 45, 0, 1472, 0, 0, 0, 0, 0, 1474, 0, 0, 0, 0, 0, 1476, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 1320, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1787, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2029, 45, 67, 67, 67, 67, 2033, 1527, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 67, 24850, 24850, 12564, 12564, 0, 57889, 281, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 97, 1786, 97, 0, 0, 97, 97, 0, 1790, 40976, 19, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 262144, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 46, 67, 98, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 45, 67, 97, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 258048, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 1122423, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 1114152, 1114152, 1114152, 0, 0, 1114112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 37, 102439, 106538, 98347, 0, 0, 204800, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 57436, 40976, 18, 36884, 45078, 24, 27, 33, 33, 0, 33, 33, 33, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 124, 124, 124, 127, 127, 127, 127, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158877, 2158877, 2158877, 2388253, 2158877, 2158877, 2158877, 2158877, 2158877, 2781469, 2793757, 2158877, 2818333, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2867485, 2158877, 2904349, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3096861, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2441501, 2445597, 2158877, 2158877, 2158877, 2158877, 2158877, 40976, 122, 123, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 936, 2158592, 4243810, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 935, 45, 45, 45, 715, 45, 45, 45, 45, 45, 45, 45, 723, 45, 45, 45, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 45, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 47, 68, 99, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 48, 69, 100, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 49, 70, 101, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 50, 71, 102, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 51, 72, 103, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 52, 73, 104, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 53, 74, 105, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 54, 75, 106, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 55, 76, 107, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 56, 77, 108, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 57, 78, 109, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 58, 79, 110, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 59, 80, 111, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 60, 81, 112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 61, 82, 113, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 62, 83, 114, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 63, 84, 115, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 64, 85, 116, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 65, 86, 117, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 66, 87, 118, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 0, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1321, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 131, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 145, 149, 45, 45, 45, 45, 45, 174, 45, 179, 45, 185, 45, 188, 45, 45, 202, 67, 255, 67, 67, 269, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 292, 296, 97, 97, 97, 97, 97, 321, 97, 326, 97, 332, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 646, 335, 97, 97, 349, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 437, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 523, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 511, 67, 67, 67, 97, 97, 97, 620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1501, 1502, 97, 793, 67, 67, 796, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 808, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 2052, 67, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 830, 97, 97, 97, 97, 97, 97, 97, 97, 97, 315, 97, 97, 97, 97, 97, 97, 841, 97, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 891, 97, 97, 894, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 906, 45, 937, 45, 45, 940, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 734, 735, 67, 737, 67, 738, 67, 740, 67, 67, 67, 45, 967, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 435, 45, 45, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1081, 13112, 1085, 54074, 1089, 0, 0, 0, 0, 0, 0, 363, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1674, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1913, 67, 1914, 67, 67, 67, 1918, 67, 67, 97, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 630, 97, 97, 97, 97, 97, 1169, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1534, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 1233, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 742, 67, 45, 45, 1191, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 454, 67, 67, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2050, 0, 97, 97, 45, 45, 45, 732, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 1293, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 2158592, 2158592, 2158592, 2404352, 2412544, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1737, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 647, 45, 45, 1387, 45, 45, 1391, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 1400, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 941, 45, 943, 45, 45, 45, 45, 45, 45, 951, 45, 67, 1438, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 67, 67, 67, 67, 799, 67, 67, 67, 804, 67, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 1446, 67, 67, 67, 67, 67, 67, 67, 1298, 0, 0, 0, 1304, 0, 0, 0, 1310, 97, 1491, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1736, 97, 45, 45, 1541, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 677, 45, 45, 67, 1581, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 791, 792, 67, 67, 67, 67, 1598, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 97, 97, 97, 1727, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 67, 67, 97, 1879, 97, 1881, 97, 0, 1884, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1842, 97, 97, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1928, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1903, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 1971, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1381, 45, 45, 45, 45, 1976, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1747, 809, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 907, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1478, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 477, 67, 67, 67, 67, 67, 67, 1294, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1324, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1374, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 45, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 1910, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1919, 67, 0, 0, 97, 97, 97, 97, 45, 2048, 67, 2049, 0, 0, 97, 2051, 45, 45, 45, 939, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 397, 45, 45, 45, 1921, 67, 67, 1923, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1947, 45, 1935, 0, 0, 0, 97, 1939, 97, 97, 1941, 97, 45, 45, 45, 45, 45, 45, 382, 389, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 1812, 67, 67, 67, 67, 67, 256, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 336, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 371, 373, 45, 45, 45, 955, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 45, 457, 459, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 478, 67, 67, 482, 67, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1828, 97, 554, 556, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 575, 97, 97, 579, 97, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 330, 97, 97, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1587, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 97, 1706, 97, 97, 97, 1709, 97, 97, 97, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 856, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1642, 97, 1644, 97, 97, 890, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 67, 67, 67, 67, 1065, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 97, 97, 1505, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1617, 97, 97, 1635, 0, 1637, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 67, 67, 1704, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 565, 572, 97, 97, 97, 97, 97, 97, 97, 97, 1832, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1946, 45, 45, 67, 67, 67, 67, 67, 97, 1926, 97, 1927, 97, 0, 0, 0, 97, 97, 1934, 2043, 0, 0, 97, 97, 97, 2047, 45, 45, 67, 67, 0, 1832, 97, 97, 45, 45, 45, 981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 372, 45, 45, 45, 45, 1661, 1662, 45, 45, 45, 45, 45, 1666, 45, 45, 45, 45, 45, 1673, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 67, 1426, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 67, 67, 45, 418, 45, 45, 420, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 45, 959, 45, 45, 962, 45, 45, 45, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 483, 67, 67, 67, 67, 504, 67, 67, 506, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 467, 67, 67, 67, 67, 67, 67, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 580, 97, 97, 97, 97, 601, 97, 97, 603, 97, 97, 606, 97, 97, 97, 97, 97, 97, 848, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1498, 97, 97, 97, 97, 97, 97, 45, 45, 714, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 989, 990, 45, 67, 67, 67, 67, 67, 1011, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 67, 67, 67, 768, 67, 67, 67, 67, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 45, 45, 1179, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 1004, 67, 1217, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 728, 67, 1461, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 97, 1516, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 67, 67, 67, 1705, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1715, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1380, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1887, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 2006, 45, 45, 1907, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1920, 67, 97, 0, 2035, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 1428, 67, 67, 67, 67, 67, 67, 1435, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 146, 45, 152, 45, 45, 165, 45, 175, 45, 180, 45, 45, 187, 190, 195, 45, 203, 254, 257, 262, 67, 270, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 293, 97, 299, 97, 97, 312, 97, 322, 97, 327, 97, 97, 334, 337, 342, 97, 350, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 484, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 97, 581, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 648, 45, 650, 45, 651, 45, 653, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1954, 67, 67, 67, 1958, 67, 67, 67, 67, 67, 67, 67, 783, 67, 67, 67, 788, 67, 67, 67, 67, 680, 45, 45, 45, 45, 45, 45, 45, 45, 688, 689, 691, 45, 45, 45, 45, 45, 983, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 947, 45, 45, 45, 45, 952, 45, 45, 698, 699, 45, 45, 702, 703, 45, 45, 45, 45, 45, 45, 45, 711, 744, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 761, 67, 67, 67, 67, 765, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 775, 776, 778, 67, 67, 67, 67, 67, 67, 785, 786, 67, 67, 789, 790, 67, 67, 67, 67, 67, 67, 1574, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 468, 475, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 798, 67, 67, 67, 802, 67, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 67, 810, 67, 67, 67, 67, 67, 67, 67, 67, 67, 821, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 833, 97, 835, 97, 836, 97, 838, 97, 97, 0, 0, 97, 97, 97, 1785, 97, 97, 0, 0, 97, 97, 0, 97, 97, 1979, 97, 97, 45, 45, 1983, 45, 1984, 45, 45, 45, 45, 45, 652, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 690, 45, 45, 694, 45, 45, 97, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 0, 1717, 1718, 97, 97, 97, 97, 97, 1722, 97, 0, 0, 859, 97, 97, 97, 97, 863, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 873, 874, 876, 97, 97, 97, 97, 97, 97, 883, 884, 97, 97, 887, 888, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 225280, 0, 365, 0, 367, 0, 45, 45, 45, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1199, 45, 45, 45, 45, 45, 97, 97, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 919, 638, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2425117, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2597149, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2642205, 2158877, 2158877, 2158877, 2158877, 2158877, 3158301, 0, 2375818, 2379914, 2158730, 2158730, 2420874, 2158730, 2449546, 2158730, 2158730, 953, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 965, 978, 45, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1027, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 1077, 1078, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 366, 0, 139, 2158730, 2158730, 2158730, 2404490, 2412682, 1113, 97, 97, 97, 97, 97, 97, 1121, 97, 1123, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1540, 1155, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 1168, 97, 97, 1171, 1172, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1559, 1561, 45, 45, 45, 1564, 45, 1566, 1567, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 168, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1046, 67, 67, 1254, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 807, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 1354, 97, 97, 97, 1359, 97, 97, 97, 0, 97, 97, 97, 97, 1640, 97, 97, 97, 97, 97, 97, 97, 897, 97, 97, 97, 902, 97, 97, 97, 97, 97, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 0, 97, 97, 97, 1730, 97, 97, 97, 97, 97, 97, 97, 97, 915, 97, 97, 97, 97, 0, 360, 0, 67, 67, 67, 1440, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 1019, 67, 67, 67, 67, 67, 1453, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 97, 97, 97, 1493, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 97, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 67, 67, 67, 67, 1584, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 1060, 67, 67, 67, 67, 67, 67, 67, 1599, 1601, 67, 67, 67, 1604, 67, 1606, 1607, 67, 1472, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 1614, 97, 97, 97, 97, 45, 45, 1850, 45, 45, 45, 45, 1855, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1229, 97, 1618, 97, 97, 97, 97, 97, 97, 97, 1625, 97, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 447, 45, 45, 45, 45, 45, 67, 67, 1633, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1643, 1645, 97, 97, 0, 0, 97, 97, 97, 2002, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1740, 45, 45, 45, 1744, 45, 45, 45, 97, 1648, 97, 1650, 1651, 97, 0, 45, 45, 45, 1654, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 664, 45, 45, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 1669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1005, 67, 67, 1681, 67, 67, 67, 67, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 67, 67, 67, 67, 67, 0, 97, 97, 1713, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1378, 45, 45, 45, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 1549, 45, 45, 45, 45, 45, 97, 97, 1780, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2027, 2028, 45, 45, 67, 67, 2031, 2032, 67, 45, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1917, 67, 67, 67, 67, 67, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1708, 97, 97, 97, 97, 97, 45, 45, 1862, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 67, 1877, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1839, 0, 0, 97, 97, 97, 97, 1936, 0, 0, 97, 97, 97, 97, 97, 97, 1943, 1944, 1945, 45, 45, 45, 45, 670, 45, 45, 45, 45, 674, 45, 45, 45, 45, 678, 45, 1948, 45, 1950, 45, 45, 45, 45, 1955, 1956, 1957, 67, 67, 67, 1960, 67, 1962, 67, 67, 67, 67, 1967, 1968, 1969, 97, 0, 0, 0, 97, 97, 1974, 97, 0, 1936, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1906, 0, 1977, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1746, 45, 45, 45, 45, 2011, 67, 67, 2013, 67, 67, 67, 2017, 97, 97, 0, 0, 2021, 97, 8192, 97, 97, 2025, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1916, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 140, 45, 45, 45, 1180, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 45, 45, 45, 387, 45, 392, 45, 45, 396, 45, 45, 399, 45, 45, 67, 207, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 817, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 287, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1656, 1657, 45, 376, 45, 45, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1406, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 462, 67, 67, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 1013, 67, 67, 1016, 67, 67, 67, 67, 97, 97, 97, 97, 559, 97, 97, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 896, 97, 97, 97, 900, 97, 97, 97, 97, 97, 97, 912, 914, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 391, 45, 45, 45, 45, 45, 45, 45, 45, 713, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 1140, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 636, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 1363, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 889, 97, 97, 97, 1714, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 926, 45, 45, 45, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 45, 45, 45, 45, 45, 944, 45, 45, 45, 45, 45, 45, 45, 45, 1676, 45, 45, 45, 45, 45, 45, 67, 97, 97, 97, 1833, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1902, 45, 45, 45, 45, 45, 957, 45, 45, 45, 45, 961, 45, 963, 45, 45, 45, 67, 97, 2034, 0, 97, 97, 97, 97, 97, 2040, 45, 45, 45, 2042, 67, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 1414, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 45, 45, 45, 57889, 0, 0, 54074, 54074, 550, 831, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 578, 97, 45, 45, 968, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 67, 67, 67, 67, 67, 25398, 1082, 13112, 1086, 54074, 1090, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 67, 67, 67, 67, 1464, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 67, 97, 97, 97, 97, 1519, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 0, 0, 0, 0, 1528, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 45, 1554, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 45, 1565, 45, 45, 45, 45, 683, 45, 45, 45, 687, 45, 45, 692, 45, 45, 45, 45, 45, 1953, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 1568, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1594, 97, 97, 1649, 97, 97, 97, 0, 45, 45, 1653, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 45, 45, 1670, 45, 1672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 736, 67, 67, 67, 67, 67, 741, 67, 67, 67, 1680, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 67, 1692, 67, 67, 67, 67, 67, 67, 67, 1697, 67, 1699, 67, 67, 67, 67, 67, 67, 1041, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1044, 67, 67, 67, 67, 67, 67, 67, 1769, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 624, 97, 97, 97, 97, 97, 97, 634, 97, 97, 1792, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 958, 45, 45, 45, 45, 45, 45, 964, 45, 150, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 977, 204, 45, 67, 67, 67, 217, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 271, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 297, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 97, 97, 97, 97, 351, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1398, 45, 45, 45, 153, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 660, 661, 45, 45, 205, 45, 67, 67, 67, 67, 220, 67, 228, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1302, 0, 0, 0, 1308, 0, 67, 67, 67, 67, 67, 272, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 352, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 439, 45, 45, 45, 45, 45, 445, 45, 45, 45, 452, 45, 45, 67, 67, 212, 216, 67, 67, 67, 67, 67, 241, 67, 246, 67, 252, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 67, 521, 67, 67, 525, 67, 67, 67, 67, 67, 531, 67, 67, 67, 538, 67, 0, 0, 2046, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 1421, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1384, 97, 618, 97, 97, 622, 97, 97, 97, 97, 97, 628, 97, 97, 97, 635, 97, 18, 131427, 0, 0, 0, 639, 0, 132, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 932, 45, 45, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1194, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 45, 45, 45, 45, 67, 67, 45, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 696, 45, 45, 45, 701, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 194, 45, 45, 45, 729, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 805, 67, 67, 67, 67, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 1700, 67, 1702, 67, 67, 67, 67, 67, 814, 816, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1008, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1020, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1429, 67, 1430, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 1076, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1102, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1124, 97, 1126, 97, 97, 1114, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 97, 97, 1170, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 45, 45, 45, 1532, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 45, 172, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 706, 45, 45, 709, 45, 45, 1177, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 1204, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 45, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 67, 1237, 67, 67, 67, 67, 67, 67, 1259, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1289, 67, 67, 67, 1292, 97, 97, 97, 97, 1339, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 97, 45, 1849, 45, 1851, 45, 45, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 726, 45, 1385, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1188, 45, 45, 1401, 1402, 45, 45, 45, 45, 1405, 45, 45, 45, 45, 45, 45, 45, 45, 1752, 45, 45, 45, 45, 45, 67, 67, 1410, 45, 45, 45, 1413, 45, 1415, 45, 45, 45, 45, 45, 45, 1419, 45, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 2019, 0, 97, 67, 67, 67, 1452, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 1274, 67, 67, 67, 1279, 67, 1460, 67, 1462, 67, 67, 67, 67, 67, 67, 1466, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 67, 1605, 67, 67, 67, 0, 97, 97, 97, 1506, 97, 97, 97, 97, 97, 97, 97, 97, 1512, 97, 97, 97, 0, 1728, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 1515, 97, 1517, 97, 97, 97, 97, 97, 97, 1521, 97, 97, 97, 97, 97, 97, 0, 45, 1652, 45, 45, 45, 1655, 45, 45, 45, 45, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 1553, 45, 45, 45, 1556, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 45, 67, 67, 67, 67, 1572, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 67, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 67, 1465, 67, 67, 1468, 67, 67, 1471, 67, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1580, 67, 67, 1596, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 542, 0, 544, 67, 67, 67, 67, 1759, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 533, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 1777, 97, 97, 97, 1793, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 998, 45, 45, 1001, 1002, 45, 45, 67, 67, 45, 1861, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1871, 67, 1873, 1874, 67, 0, 97, 45, 67, 0, 97, 45, 67, 16384, 97, 45, 67, 97, 0, 0, 0, 1473, 0, 1082, 0, 0, 0, 1475, 0, 1086, 0, 0, 0, 1477, 1876, 67, 97, 97, 97, 97, 97, 1883, 0, 1885, 97, 97, 97, 1889, 0, 0, 0, 286, 0, 0, 0, 286, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 126, 126, 126, 2053, 0, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 2039, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 1246, 67, 67, 1249, 1250, 67, 67, 67, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 141, 45, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 1189, 45, 45, 155, 45, 45, 45, 45, 45, 45, 45, 45, 45, 191, 45, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1753, 45, 45, 45, 67, 67, 45, 45, 67, 208, 67, 67, 67, 222, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 258, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 288, 97, 97, 97, 302, 97, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 338, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 370, 45, 45, 45, 45, 716, 45, 45, 45, 45, 45, 722, 45, 45, 45, 45, 45, 45, 1912, 67, 67, 67, 67, 67, 67, 67, 67, 67, 819, 67, 67, 25398, 542, 13112, 544, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1409, 45, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 553, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1138, 97, 97, 97, 97, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 0, 1834, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 353, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 67, 67, 747, 748, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1301, 0, 0, 0, 1307, 0, 0, 67, 794, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 97, 97, 97, 845, 846, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 97, 892, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 45, 992, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1239, 67, 67, 67, 1063, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 67, 67, 67, 67, 0, 1299, 0, 0, 0, 1305, 0, 0, 0, 97, 1141, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1152, 97, 97, 0, 0, 97, 97, 1784, 97, 97, 97, 0, 0, 97, 97, 0, 97, 1978, 97, 97, 97, 1982, 45, 45, 45, 45, 45, 45, 45, 45, 45, 972, 973, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1157, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 1151, 97, 97, 97, 1253, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 539, 45, 1423, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1773, 67, 97, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 67, 67, 1439, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 97, 97, 1492, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 1703, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 45, 1949, 45, 1951, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1961, 67, 0, 97, 45, 67, 0, 97, 2060, 2061, 0, 2062, 45, 67, 97, 0, 0, 2036, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 223, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1297, 0, 0, 0, 1303, 0, 0, 0, 1309, 1963, 67, 67, 67, 97, 97, 97, 97, 0, 1972, 0, 97, 97, 97, 1975, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 931, 45, 45, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 45, 1989, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1996, 97, 18, 131427, 0, 0, 360, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 930, 45, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 1998, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1985, 45, 1986, 45, 45, 45, 156, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 679, 131427, 0, 358, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 381, 45, 45, 45, 45, 45, 45, 45, 45, 45, 400, 45, 45, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 436, 67, 67, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 25398, 542, 13112, 544, 67, 67, 522, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 67, 0, 1300, 0, 0, 0, 1306, 0, 0, 0, 97, 97, 619, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 97, 1105, 97, 97, 97, 97, 1109, 97, 97, 97, 67, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 0, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2041, 67, 67, 67, 67, 67, 780, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 97, 97, 97, 878, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 0, 45, 979, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 67, 67, 67, 1023, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1094, 0, 0, 0, 1092, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1486, 97, 1489, 97, 97, 97, 1117, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 1146, 97, 97, 97, 97, 97, 97, 97, 97, 881, 97, 97, 97, 886, 97, 97, 97, 1311, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1615, 97, 97, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 97, 1847, 97, 45, 45, 45, 45, 1852, 45, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 67, 67, 67, 67, 67, 1868, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1882, 0, 0, 0, 97, 97, 97, 97, 0, 1891, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1929, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1900, 45, 1901, 45, 45, 45, 1905, 45, 67, 2054, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 2037, 2038, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1774, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 142, 45, 45, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 157, 45, 45, 171, 45, 45, 45, 182, 45, 45, 45, 45, 200, 45, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 45, 45, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 1214, 45, 45, 45, 67, 209, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 249, 67, 0, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 97, 0, 0, 1937, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1741, 45, 45, 45, 45, 45, 45, 67, 67, 67, 267, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 289, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 329, 97, 97, 0, 0, 97, 97, 2001, 0, 97, 2003, 97, 97, 97, 45, 45, 45, 1739, 45, 45, 45, 1742, 45, 45, 45, 45, 45, 97, 97, 347, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 840, 67, 1007, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 67, 67, 67, 1052, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1031, 67, 67, 67, 67, 67, 97, 97, 97, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 1190, 45, 45, 45, 45, 45, 1195, 45, 1197, 45, 45, 45, 45, 1201, 45, 45, 45, 45, 1952, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 250, 67, 67, 67, 1255, 67, 1257, 67, 67, 67, 67, 1261, 67, 67, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 67, 67, 1267, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 280, 94, 0, 0, 1281, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1070, 67, 67, 67, 67, 67, 1335, 97, 1337, 97, 97, 97, 97, 1341, 97, 97, 97, 97, 97, 97, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 1347, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 1361, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 544, 0, 550, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 53530, 97, 97, 97, 1365, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 608, 97, 97, 97, 45, 45, 1424, 45, 1425, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1058, 67, 67, 67, 67, 45, 1555, 45, 45, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 45, 45, 45, 45, 67, 67, 1570, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 1595, 67, 67, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 97, 97, 97, 1636, 97, 97, 97, 1639, 97, 97, 1641, 97, 97, 97, 97, 97, 97, 1173, 0, 921, 0, 0, 0, 0, 0, 0, 45, 67, 67, 67, 1693, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 67, 273, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 1860, 45, 45, 67, 67, 1865, 67, 67, 67, 67, 1870, 67, 67, 67, 67, 1875, 67, 67, 97, 97, 1880, 97, 97, 0, 0, 0, 97, 97, 1888, 97, 0, 0, 0, 1938, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1854, 45, 45, 45, 45, 45, 45, 45, 1909, 45, 45, 1911, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 1924, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1898, 45, 45, 45, 45, 45, 45, 1904, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 16384, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1724, 2008, 2009, 45, 45, 67, 67, 67, 2014, 2015, 67, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 2022, 0, 2023, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1869, 67, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 147, 151, 154, 45, 162, 45, 45, 176, 178, 181, 45, 45, 45, 192, 196, 45, 45, 45, 45, 2012, 67, 67, 67, 67, 67, 67, 2018, 97, 0, 0, 97, 1894, 1895, 97, 1897, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 656, 45, 45, 45, 45, 45, 45, 67, 259, 263, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 294, 298, 301, 97, 309, 97, 97, 323, 325, 328, 97, 97, 97, 97, 97, 560, 97, 97, 97, 569, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 339, 343, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 519, 97, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 616, 45, 649, 45, 45, 45, 45, 45, 654, 45, 45, 45, 45, 45, 45, 45, 45, 1393, 45, 45, 45, 45, 45, 45, 45, 45, 1209, 45, 45, 45, 45, 45, 45, 45, 67, 763, 67, 67, 67, 67, 67, 67, 67, 67, 770, 67, 67, 67, 774, 67, 0, 2045, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 213, 67, 219, 67, 67, 232, 67, 242, 67, 247, 67, 67, 67, 779, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 67, 811, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 834, 97, 97, 97, 97, 97, 839, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 645, 97, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 868, 97, 97, 97, 872, 97, 97, 877, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 97, 97, 97, 97, 909, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 27, 27, 27, 1036, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1033, 67, 67, 67, 97, 97, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 67, 67, 67, 1295, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1317, 97, 97, 97, 97, 97, 97, 1375, 97, 97, 97, 0, 0, 0, 45, 1379, 45, 45, 45, 45, 45, 45, 422, 45, 45, 45, 429, 431, 45, 45, 45, 45, 0, 1090, 0, 0, 97, 1479, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1716, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1723, 0, 921, 29315, 0, 0, 0, 0, 45, 929, 45, 45, 45, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 67, 67, 67, 67, 1240, 97, 97, 97, 1738, 45, 45, 45, 45, 45, 45, 45, 1743, 45, 45, 45, 45, 166, 45, 45, 45, 45, 184, 186, 45, 45, 197, 45, 45, 97, 1779, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 640, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 45, 1803, 45, 45, 45, 45, 45, 1809, 45, 45, 45, 67, 67, 67, 1814, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1932, 97, 97, 0, 1781, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 67, 67, 67, 1818, 67, 67, 67, 67, 67, 1824, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1890, 0, 1829, 97, 97, 0, 0, 97, 97, 1836, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1987, 1845, 97, 97, 97, 45, 45, 45, 45, 45, 1853, 45, 45, 45, 1857, 45, 45, 45, 67, 1864, 67, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 1710, 1711, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1886, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1838, 0, 0, 0, 97, 1843, 97, 0, 1893, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 67, 2044, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1660, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 453, 45, 455, 67, 67, 67, 67, 268, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 348, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 359, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 695, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 0, 921, 29315, 0, 925, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 45, 67, 1037, 67, 1039, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1095, 0, 0, 0, 1096, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 97, 1131, 97, 1133, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 1312, 0, 0, 0, 0, 1096, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1830, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1896, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1210, 45, 45, 45, 45, 45, 45, 133, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 401, 45, 45, 158, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1200, 45, 45, 45, 45, 206, 67, 67, 67, 67, 67, 225, 67, 67, 67, 67, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 57889, 0, 0, 54074, 54074, 550, 832, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1083, 13112, 1087, 54074, 1091, 0, 0, 0, 0, 0, 0, 1316, 0, 831, 97, 97, 97, 97, 97, 97, 97, 1174, 921, 0, 1175, 0, 0, 0, 0, 45, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 148, 67, 67, 264, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 295, 97, 97, 97, 97, 313, 97, 97, 97, 97, 331, 333, 97, 18, 131427, 356, 638, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 45, 45, 1530, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 988, 45, 45, 45, 97, 344, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 402, 404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 67, 438, 45, 45, 45, 45, 45, 45, 45, 45, 449, 450, 45, 45, 45, 67, 67, 214, 218, 221, 67, 229, 67, 67, 243, 245, 248, 67, 67, 67, 67, 67, 488, 490, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1071, 67, 1073, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 67, 67, 67, 535, 536, 67, 67, 67, 67, 67, 67, 1683, 1684, 67, 67, 67, 67, 1688, 1689, 67, 67, 67, 67, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 97, 97, 97, 585, 587, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 97, 97, 97, 97, 97, 97, 97, 621, 97, 97, 97, 97, 97, 97, 97, 97, 632, 633, 97, 97, 0, 0, 97, 1783, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2026, 45, 45, 45, 45, 67, 2030, 67, 67, 67, 67, 67, 67, 1053, 1054, 67, 67, 67, 67, 67, 67, 1061, 67, 712, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 725, 45, 45, 45, 163, 167, 173, 177, 45, 45, 45, 45, 45, 193, 45, 45, 45, 45, 982, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 1558, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 704, 705, 45, 45, 45, 45, 45, 45, 45, 45, 731, 45, 45, 45, 67, 67, 67, 67, 67, 739, 67, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 67, 67, 764, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 812, 67, 67, 67, 67, 818, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 837, 97, 97, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 97, 97, 862, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 0, 97, 97, 97, 97, 910, 97, 97, 97, 97, 916, 97, 97, 97, 0, 0, 0, 97, 97, 1940, 97, 97, 1942, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 395, 45, 45, 45, 45, 966, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 67, 67, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1040, 67, 1042, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 527, 67, 67, 67, 67, 67, 67, 537, 67, 67, 67, 67, 67, 1051, 67, 67, 67, 67, 67, 1057, 67, 67, 67, 67, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1445, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1079, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 1098, 97, 97, 97, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 97, 97, 1134, 97, 1136, 97, 1139, 97, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 1176, 0, 646, 45, 67, 67, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 67, 97, 1348, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1127, 97, 67, 1569, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1448, 1449, 67, 1816, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 1827, 97, 97, 0, 0, 1782, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 1831, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1980, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1395, 45, 45, 45, 45, 45, 97, 1846, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 45, 45, 2010, 45, 67, 67, 67, 67, 67, 2016, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 2007, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 143, 45, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1813, 67, 67, 1815, 45, 45, 67, 210, 67, 67, 67, 67, 67, 67, 239, 67, 67, 67, 67, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 97, 97, 290, 97, 97, 97, 97, 97, 97, 319, 97, 97, 97, 97, 97, 97, 303, 97, 97, 317, 97, 97, 97, 97, 97, 97, 305, 97, 97, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 97, 97, 97, 375, 45, 45, 45, 379, 45, 45, 390, 45, 45, 394, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 461, 67, 67, 67, 465, 67, 67, 476, 67, 67, 480, 67, 67, 67, 67, 67, 67, 1761, 67, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 97, 97, 97, 558, 97, 97, 97, 562, 97, 97, 573, 97, 97, 577, 97, 97, 0, 1999, 97, 97, 97, 0, 97, 97, 2004, 2005, 97, 45, 45, 45, 45, 1193, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 597, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1334, 45, 681, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 1399, 45, 45, 730, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1434, 67, 67, 67, 67, 67, 67, 750, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 45, 45, 993, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1238, 67, 67, 1006, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 1048, 1049, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 67, 1296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 97, 97, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 920, 97, 97, 1142, 1143, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 1154, 45, 1218, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 67, 67, 67, 67, 67, 1269, 67, 67, 67, 67, 67, 67, 67, 67, 1278, 67, 67, 67, 67, 67, 67, 1772, 67, 67, 97, 97, 97, 97, 97, 97, 97, 0, 921, 922, 1175, 0, 0, 0, 0, 45, 97, 97, 1349, 97, 97, 97, 97, 97, 97, 97, 97, 1358, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 926, 0, 0, 0, 45, 45, 1411, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1754, 45, 45, 67, 67, 1301, 0, 1307, 0, 1313, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 21054, 97, 97, 97, 97, 67, 1757, 67, 67, 67, 1760, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 1778, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 97, 97, 1158, 97, 97, 97, 1161, 97, 97, 97, 97, 1166, 97, 97, 97, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 1820, 67, 1822, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1933, 97, 1892, 97, 97, 97, 97, 97, 97, 1899, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1925, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1796, 97, 45, 45, 45, 45, 45, 45, 45, 970, 45, 45, 45, 45, 45, 45, 45, 45, 1417, 45, 45, 45, 45, 45, 45, 45, 67, 1964, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1721, 97, 97, 0, 0, 1997, 97, 0, 0, 2000, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 733, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 144, 45, 45, 45, 1805, 45, 1807, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 231, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 45, 45, 67, 211, 67, 67, 67, 67, 230, 234, 240, 244, 67, 67, 67, 67, 67, 67, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 481, 67, 67, 260, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 291, 97, 97, 97, 97, 310, 314, 320, 324, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 97, 97, 97, 1362, 340, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 360, 0, 362, 0, 365, 28809, 367, 139, 369, 45, 45, 45, 374, 67, 67, 460, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 67, 67, 67, 67, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 67, 502, 67, 67, 67, 67, 67, 67, 67, 508, 67, 67, 67, 515, 517, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 1931, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 552, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 97, 97, 557, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 97, 97, 1135, 97, 97, 97, 97, 97, 97, 97, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 1638, 97, 97, 97, 97, 97, 97, 97, 97, 1646, 97, 599, 97, 97, 97, 97, 97, 97, 97, 605, 97, 97, 97, 612, 614, 97, 97, 97, 97, 97, 1377, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 745, 67, 67, 67, 67, 751, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 762, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 777, 67, 67, 781, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 1593, 67, 67, 97, 843, 97, 97, 97, 97, 849, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 860, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1797, 45, 45, 45, 45, 1801, 45, 97, 875, 97, 97, 879, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 991, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 215, 67, 67, 67, 67, 233, 67, 67, 67, 67, 251, 253, 1022, 67, 67, 67, 1026, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 67, 1064, 67, 67, 67, 1067, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1775, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 1096, 0, 921, 29315, 0, 0, 0, 0, 928, 45, 45, 45, 45, 45, 934, 45, 45, 45, 164, 45, 45, 45, 45, 45, 45, 45, 45, 45, 198, 45, 45, 45, 378, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 398, 45, 97, 97, 1116, 97, 97, 97, 1120, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1147, 1148, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 0, 45, 1178, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 45, 451, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 1260, 67, 67, 67, 1263, 67, 67, 1265, 1203, 45, 45, 1205, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 67, 1266, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 45, 1386, 45, 1389, 45, 45, 45, 45, 1394, 45, 45, 45, 1397, 45, 45, 45, 45, 995, 45, 997, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1915, 67, 67, 67, 67, 67, 1422, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1433, 67, 1436, 67, 67, 67, 67, 1441, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 0, 24851, 12565, 0, 0, 0, 0, 28809, 53532, 97, 97, 97, 97, 1494, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1571, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 67, 67, 67, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 97, 1634, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1125, 97, 97, 97, 1647, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 720, 45, 45, 45, 45, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 942, 45, 45, 946, 45, 45, 45, 950, 45, 45, 1658, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 1712, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 1835, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1844, 97, 97, 1726, 0, 97, 97, 97, 97, 97, 1732, 97, 1734, 97, 97, 97, 97, 97, 300, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 866, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1758, 67, 67, 67, 1762, 67, 67, 67, 67, 67, 67, 67, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1771, 67, 67, 67, 97, 97, 97, 97, 97, 1776, 97, 97, 97, 97, 97, 1794, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1966, 97, 97, 97, 1970, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1837, 97, 0, 1840, 1841, 97, 97, 97, 1988, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1994, 1995, 67, 97, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 1319, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1733, 97, 97, 97, 97, 97, 97, 1340, 97, 97, 97, 1343, 97, 97, 1345, 97, 1346, 67, 67, 265, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 345, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 361, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 414, 45, 45, 45, 45, 377, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1207, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 67, 67, 67, 67, 67, 463, 67, 67, 67, 472, 67, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 540, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 97, 97, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 917, 97, 97, 0, 0, 0, 637, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 927, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 433, 45, 45, 45, 45, 697, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 708, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 45, 45, 384, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 45, 45, 45, 45, 45, 67, 67, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1164, 97, 97, 97, 67, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1687, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 1097, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1450, 45, 45, 1388, 45, 1390, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1236, 67, 67, 67, 67, 67, 1437, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 1490, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1503, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1930, 0, 97, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 67, 67, 1965, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 1382, 45, 1383, 45, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 45, 45, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 341, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 1099, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1333, 97, 1230, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1992, 67, 1993, 67, 67, 67, 97, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1665, 45, 45, 45, 45, 45, 131427, 357, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 416, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1990, 67, 1991, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1707, 97, 97, 97, 97, 97, 97, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1030, 67, 1032, 67, 67, 67, 67, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1632, 0, 921, 29315, 923, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1392, 45, 45, 45, 45, 45, 45, 45, 45, 45, 960, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1093, 0, 0, 0, 0, 0, 97, 1609, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1369, 97, 97, 97, 1372, 97, 97, 67, 67, 266, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 346, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1677, 45, 45, 45, 45, 67, 45, 45, 954, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 425, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1069, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 97, 97, 97, 97, 97, 1376, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 67, 456, 67, 67, 67, 67, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 1252, 97, 1725, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 1630, 0, 0, 94242, 0, 0, 0, 2211840, 0, 1118208, 0, 0, 0, 0, 2158592, 2158731, 2158592, 2158592, 2158592, 3117056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3018752, 2158592, 3043328, 2158592, 2158592, 2158592, 2158592, 3080192, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158878, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2605056, 2158592, 2158592, 2207744, 0, 542, 0, 544, 0, 0, 2166784, 0, 0, 0, 550, 0, 0, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2867200, 2158592, 2904064, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 0, 0, 1130496, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 139, 0, 0, 0, 139, 0, 2367488, 2207744, 0, 0, 0, 0, 176128, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 1508, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 67, 24850, 24850, 12564, 12564, 0, 0, 0, 0, 0, 53531, 53531, 0, 286, 97, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 564, 97, 97, 97, 97, 97, 97, 97, 57889, 0, 0, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 97, 576, 97, 97, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 0, 0, 139264, 0, 921, 29315, 0, 0, 926, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1811, 45, 67, 67, 67, 67, 67, 0, 2146304, 2146304, 0, 0, 0, 0, 2224128, 2224128, 2224128, 2232320, 2232320, 2232320, 2232320, 0, 0, 1301, 0, 0, 0, 0, 0, 1307, 0, 0, 0, 0, 0, 1313, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1318, 97, 97, 97, 97, 97, 97, 1795, 97, 97, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 67, 67, 2158592, 2146304, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 924, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45
+[ 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 17408, 19288, 17439, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22126, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17672, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19469, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 36919, 18234, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18419, 18432, 18304, 18448, 18485, 18523, 18553, 18583, 18599, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 18825, 18841, 18871, 18906, 18944, 18960, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19074, 36169, 17439, 36866, 17466, 36890, 36866, 22314, 19105, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22126, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17672, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19469, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 36919, 18234, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18419, 18432, 18304, 18448, 18485, 18523, 18553, 18583, 18599, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 18825, 18841, 18871, 18906, 18944, 18960, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22182, 19288, 19121, 36866, 17466, 18345, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19273, 19552, 19304, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19332, 17423, 19363, 36866, 17466, 17537, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 18614, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 19391, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 19427, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36154, 19288, 19457, 36866, 17466, 17740, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22780, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22375, 22197, 18469, 36866, 17466, 36890, 36866, 21991, 24018, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 21331, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 19485, 19501, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19537, 22390, 19568, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19596, 19611, 19457, 36866, 17466, 36890, 36866, 18246, 19627, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22242, 20553, 19457, 36866, 17466, 36890, 36866, 18648, 30477, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36472, 19288, 19457, 36866, 17466, 17809, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 21770, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 19643, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 19672, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 20538, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 17975, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22345, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19726, 19742, 21529, 24035, 23112, 26225, 23511, 27749, 27397, 24035, 34360, 24035, 24036, 23114, 35166, 23114, 23114, 19758, 23511, 35247, 23511, 23511, 28447, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 19821, 23511, 23511, 23511, 23511, 23512, 19441, 36539, 24035, 24035, 24035, 24035, 19846, 19869, 23114, 23114, 23114, 28618, 32187, 19892, 23511, 23511, 23511, 34585, 20402, 36647, 24035, 24035, 24036, 23114, 33757, 23114, 23114, 23029, 20271, 23511, 27070, 23511, 23511, 30562, 24035, 24035, 29274, 26576, 23114, 23114, 31118, 23036, 29695, 23511, 23511, 32431, 23634, 30821, 24035, 23110, 19913, 23114, 23467, 31261, 23261, 34299, 19932, 24035, 32609, 19965, 35389, 19984, 27689, 19830, 29391, 29337, 20041, 22643, 35619, 33728, 20062, 20121, 20166, 35100, 26145, 20211, 23008, 19876, 20208, 20227, 25670, 20132, 26578, 27685, 20141, 20243, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36094, 19288, 19457, 36866, 17466, 21724, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22735, 19552, 20287, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22750, 19288, 21529, 24035, 23112, 28056, 23511, 29483, 28756, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 20327, 23511, 23511, 23511, 23511, 31156, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 20371, 23511, 23511, 23511, 23511, 27443, 20395, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 29457, 29700, 23511, 23511, 23511, 23511, 33444, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 28350, 20421, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 20447, 20475, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 20523, 22257, 20569, 20783, 21715, 17603, 20699, 20837, 20614, 20630, 21149, 20670, 21405, 17486, 17509, 17525, 18373, 19179, 20695, 20716, 20732, 20755, 19194, 18042, 21641, 20592, 20779, 20598, 21412, 17470, 17591, 20896, 17468, 17619, 20799, 20700, 21031, 20744, 20699, 20828, 18075, 21259, 20581, 20853, 18048, 20868, 20884, 17756, 17784, 17800, 17825, 17854, 21171, 21200, 20931, 20947, 21378, 20955, 20971, 18086, 20645, 21002, 20986, 18178, 17960, 18012, 18381, 18064, 29176, 21044, 21438, 21018, 21122, 21393, 21060, 21844, 21094, 20654, 17493, 18150, 18166, 18214, 25967, 20763, 21799, 21110, 21830, 21138, 21246, 21301, 18336, 18361, 21165, 21187, 20812, 21216, 21232, 21287, 21317, 18553, 21347, 21363, 21428, 21454, 21271, 21483, 21499, 21515, 21575, 21467, 18712, 21591, 21633, 21078, 18189, 18198, 20679, 21657, 21701, 21074, 21687, 21740, 21756, 21786, 21815, 21860, 21876, 21892, 21946, 21962, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36457, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 36813, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 21981, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 22151, 22007, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 27898, 17884, 18890, 17906, 17928, 22042, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 22070, 22112, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 22142, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36109, 19288, 18469, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22167, 19288, 19457, 36866, 17466, 17768, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22227, 36487, 22273, 36866, 17466, 36890, 36866, 19316, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18749, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 22304, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19580, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22330, 19089, 19457, 36866, 17466, 18721, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22765, 19347, 19457, 36866, 17466, 36890, 36866, 18114, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34541, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 22540, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29908, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22561, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 23837, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22584, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36442, 19288, 21605, 24035, 23112, 28137, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 31568, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22690, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 27584, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 22659, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22360, 19552, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22675, 22811, 19457, 36866, 17466, 36890, 36866, 19133, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22827, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36064, 19288, 22865, 22881, 32031, 22897, 22913, 22956, 29939, 24035, 24035, 24035, 23003, 23114, 23114, 23114, 23024, 22420, 23511, 23511, 23511, 23052, 29116, 23073, 29268, 24035, 25563, 26915, 23106, 23131, 23114, 23114, 23159, 23181, 23197, 23248, 23511, 23511, 23282, 23305, 22493, 32364, 24035, 33472, 30138, 26325, 31770, 33508, 27345, 33667, 23114, 23321, 23473, 23351, 35793, 36576, 23511, 23375, 22500, 24145, 24035, 29197, 20192, 24533, 23440, 23114, 19017, 23459, 22839, 23489, 23510, 23511, 33563, 23528, 32076, 25389, 24035, 26576, 23561, 23583, 23114, 32683, 22516, 23622, 23655, 23511, 23634, 35456, 37144, 23110, 23683, 34153, 20499, 32513, 25824, 23705, 24035, 24035, 23111, 23114, 19874, 27078, 33263, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 20507, 32241, 20150, 31862, 27464, 35108, 23727, 23007, 35895, 34953, 26578, 27685, 20141, 24569, 31691, 19787, 33967, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36427, 19552, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 27027, 26576, 23114, 23114, 23114, 31471, 23756, 22468, 23511, 23511, 23511, 34687, 23772, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 23788, 24035, 24035, 24035, 21559, 23828, 23114, 23114, 23114, 25086, 22839, 23853, 23511, 23511, 23511, 23876, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 31761, 23909, 23953, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36049, 19288, 21605, 30825, 23112, 23987, 23511, 24003, 31001, 27617, 24034, 24035, 24036, 24052, 24089, 23114, 23114, 22420, 24109, 24168, 23511, 23511, 29116, 24188, 27609, 20017, 29516, 24035, 26576, 24222, 19968, 23114, 24252, 33811, 22468, 24270, 33587, 23511, 24320, 27443, 22493, 24035, 24035, 24035, 24035, 24339, 23113, 23114, 23114, 23114, 28128, 28618, 29700, 23511, 23511, 23511, 28276, 34564, 20402, 24035, 24035, 32929, 24036, 23114, 23114, 23114, 24357, 23029, 22839, 23511, 23511, 23511, 24377, 25645, 24035, 34112, 24035, 26576, 23114, 26643, 23114, 32683, 22516, 23511, 25638, 23511, 23711, 24035, 24395, 27809, 23114, 24414, 20499, 24432, 30917, 23628, 24035, 30680, 23111, 23114, 30233, 27078, 25748, 24452, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 24475, 19829, 26577, 26597, 26154, 24519, 24556, 24596, 23007, 20046, 20132, 26578, 24634, 20141, 24569, 31691, 24679, 24727, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36412, 19288, 21605, 19943, 34861, 32618, 26027, 29483, 32016, 32050, 36233, 24776, 35574, 24801, 24819, 32671, 31289, 22420, 24868, 24886, 20087, 26849, 29116, 19803, 24035, 24035, 24035, 36228, 26576, 23114, 23114, 23114, 24981, 33811, 22468, 23511, 23511, 23511, 29028, 27443, 22493, 24923, 27965, 24035, 24035, 32797, 24946, 23443, 23114, 23114, 29636, 24997, 22849, 28252, 23511, 23511, 23511, 25042, 25110, 24035, 24035, 34085, 24036, 25133, 23114, 23114, 25152, 23029, 22839, 25169, 23511, 36764, 23511, 25645, 30403, 24035, 25186, 26576, 31806, 24093, 25212, 32683, 22516, 32713, 26245, 34293, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 32406, 23111, 23114, 28676, 30944, 27689, 25234, 24035, 23112, 19872, 37063, 23266, 24036, 23114, 30243, 20379, 26100, 29218, 20211, 30105, 25257, 25284, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 24834, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36034, 19288, 21671, 25314, 25072, 25330, 25346, 25362, 29939, 29951, 35288, 29984, 23812, 27216, 25405, 25424, 30456, 22584, 26292, 25461, 25480, 31592, 29116, 25516, 34963, 25545, 27007, 25579, 33937, 25614, 25661, 25686, 34872, 25702, 25718, 25734, 25769, 25795, 25811, 25840, 22493, 26533, 25856, 24035, 25876, 30763, 27481, 25909, 23114, 28987, 25936, 25954, 29700, 25983, 23511, 31412, 26043, 26063, 22568, 29241, 29592, 26116, 31216, 35383, 26170, 34783, 26194, 26221, 22839, 26241, 26261, 22477, 26283, 26308, 27306, 31035, 24655, 26576, 29854, 33386, 26341, 32683, 22516, 32153, 30926, 26361, 19996, 26381, 35463, 26397, 26424, 34646, 26478, 35605, 31386, 26494, 35567, 31964, 22940, 23689, 25218, 30309, 32289, 19830, 33605, 23112, 32109, 27733, 27084, 24496, 35886, 35221, 26525, 36602, 26549, 26558, 26574, 26594, 26613, 26629, 26666, 26700, 26578, 27685, 23740, 24285, 31691, 26733, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36397, 19552, 18991, 25887, 28117, 32618, 26776, 29483, 29939, 26802, 24035, 24035, 24036, 28664, 23114, 23114, 23114, 22420, 30297, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 25559, 26576, 23114, 23114, 23114, 30525, 33811, 22468, 23511, 23511, 23511, 28725, 27443, 22493, 24035, 24035, 27249, 24035, 24035, 23113, 23114, 23114, 26827, 23114, 28618, 29700, 23511, 23511, 26845, 23511, 34564, 20402, 24035, 24035, 26979, 24036, 23114, 23114, 23114, 24974, 23029, 22839, 23511, 23511, 23511, 26865, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 33305, 24035, 25598, 23114, 19874, 34253, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 26886, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 26931, 24569, 26439, 26947, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36019, 19288, 26995, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 27043, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 27061, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 29978, 24035, 24035, 23113, 23114, 33114, 23114, 23114, 30010, 29700, 23511, 35913, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 27155, 26576, 23114, 23114, 30447, 23036, 29695, 23511, 23511, 30935, 20099, 24152, 25529, 27100, 34461, 27121, 22625, 29156, 26009, 27137, 30422, 31903, 31655, 28870, 27171, 32439, 31731, 19830, 27232, 22612, 27265, 26786, 25494, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 20342, 27288, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 27322, 27339, 28020, 27361, 27382, 29939, 24035, 24035, 32581, 24036, 23114, 23114, 23114, 27425, 22420, 23511, 23511, 23511, 27442, 28306, 19803, 24035, 24035, 24035, 24035, 26710, 23114, 23114, 23114, 23114, 32261, 22468, 23511, 23511, 23511, 23511, 35719, 24694, 29510, 24035, 24035, 24035, 24035, 26717, 23114, 23114, 23114, 23114, 28618, 32217, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 27459, 23114, 23114, 23114, 36252, 23029, 20271, 23511, 23511, 23511, 28840, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 27480, 34483, 28401, 29761, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36382, 19288, 21605, 27497, 27517, 28504, 28898, 27569, 29939, 29401, 27600, 27323, 27633, 19025, 27662, 23114, 27705, 22420, 20483, 27721, 23511, 27765, 28306, 19803, 23540, 24035, 24610, 27781, 27805, 26650, 23114, 28573, 32990, 25920, 22468, 26870, 23511, 26684, 34262, 34737, 25057, 34622, 24035, 24035, 23971, 24206, 27825, 27847, 23114, 23114, 27865, 27885, 35766, 27914, 23511, 23511, 32766, 32844, 27934, 28795, 26909, 27955, 26092, 27988, 25445, 28005, 28036, 28052, 21965, 23511, 32196, 19897, 28072, 28102, 36534, 21541, 23801, 28153, 28180, 28197, 28221, 23036, 32695, 28251, 28268, 28292, 23667, 34825, 23930, 24580, 28322, 28344, 31627, 28366, 25996, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 35625, 33477, 33359, 27674, 28393, 33992, 24036, 23114, 30243, 19829, 28417, 28433, 28463, 23008, 19876, 20208, 23007, 20046, 20132, 28489, 28520, 20141, 24569, 31691, 19787, 28550, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 28589, 24035, 24035, 24035, 24035, 28608, 23114, 23114, 23114, 23114, 28618, 20431, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36004, 19288, 28634, 31951, 28565, 28702, 28718, 28741, 32544, 20175, 28792, 32086, 20105, 28811, 29059, 29862, 28856, 22420, 28886, 30354, 23359, 28922, 28306, 28952, 23888, 26320, 36506, 24035, 29331, 28968, 36609, 23114, 29003, 31661, 27061, 30649, 27366, 23511, 29023, 27918, 24694, 24035, 24035, 23893, 33094, 30867, 23113, 23114, 23114, 29044, 34184, 30010, 29700, 23511, 23511, 29081, 29102, 34585, 20402, 27789, 24035, 24035, 24036, 23114, 29132, 23114, 23114, 23029, 20271, 23511, 29153, 23511, 23511, 30562, 30174, 24035, 24035, 27409, 25438, 23114, 23114, 29172, 36668, 31332, 23511, 23511, 29192, 30144, 24035, 23110, 30203, 23114, 23467, 31544, 23261, 23628, 24035, 22545, 23111, 23114, 29213, 27078, 27689, 29234, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 29257, 23008, 19876, 20208, 28768, 29290, 29320, 34776, 29353, 20141, 22435, 29378, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36367, 19288, 21605, 34616, 19006, 32618, 31497, 31507, 36216, 20184, 24035, 34393, 29424, 34668, 23114, 34900, 29447, 22420, 30360, 23511, 37089, 29473, 28306, 19803, 29499, 24398, 24035, 24035, 26576, 31799, 29532, 29550, 23114, 33811, 22468, 32298, 29571, 31184, 23511, 23512, 37127, 36628, 29589, 24035, 24135, 24035, 23113, 29608, 23114, 27831, 29634, 28618, 29652, 30037, 23511, 24172, 29671, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 29555, 29690, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 29719, 24035, 23110, 29738, 23114, 23467, 34035, 29756, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 29777, 34364, 28181, 30243, 29799, 31920, 27272, 27185, 23008, 31126, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29828, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35989, 19552, 19687, 35139, 28649, 29878, 29894, 29924, 29939, 23224, 23085, 31969, 24036, 35173, 24752, 24803, 23114, 22420, 31190, 30318, 24870, 23511, 28306, 29967, 23967, 24035, 24035, 24035, 26576, 30000, 23114, 23114, 23114, 33811, 22468, 30026, 23511, 23511, 23511, 23512, 26078, 24035, 24035, 24035, 30053, 37137, 30071, 23114, 23114, 33368, 25136, 28618, 30723, 23511, 23511, 37096, 31356, 34585, 20402, 30092, 30127, 30160, 24036, 35740, 30219, 24960, 30259, 23029, 20271, 34042, 30285, 30342, 30376, 23289, 30055, 30400, 30419, 30438, 32640, 33532, 33514, 30472, 18792, 26267, 24323, 23057, 30493, 23639, 20008, 30196, 33188, 30517, 20075, 23511, 30541, 23628, 30578, 33928, 28776, 30594, 19874, 30610, 30637, 19830, 30677, 27646, 19872, 25779, 23266, 23232, 35016, 30243, 30696, 29812, 30712, 30746, 27206, 30779, 30807, 23007, 33395, 20132, 26578, 27685, 31703, 22928, 31691, 19787, 31079, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36352, 19288, 23335, 30841, 26131, 30888, 30904, 30986, 29939, 24035, 24704, 31017, 20025, 23114, 26178, 31051, 31095, 22420, 23511, 22524, 31142, 31172, 28534, 31206, 35497, 25196, 24035, 28592, 24503, 23114, 31239, 31285, 23114, 31305, 31321, 31355, 31372, 31407, 23511, 30556, 24694, 24035, 27501, 19805, 24035, 24035, 23113, 23114, 31428, 24066, 23114, 28618, 29700, 23511, 31837, 18809, 23511, 34585, 31448, 24035, 24035, 24035, 23090, 23114, 23114, 23114, 23114, 31619, 35038, 23511, 23511, 23511, 23511, 33714, 24035, 33085, 24035, 29431, 23114, 31467, 23114, 23143, 31487, 23511, 31523, 23511, 35195, 36783, 24035, 30111, 23567, 23114, 23467, 31543, 31560, 23628, 24035, 24035, 23111, 23114, 19874, 30953, 31584, 34508, 24035, 31608, 26345, 37055, 23266, 31643, 31677, 31719, 31747, 31786, 31822, 26898, 23008, 19876, 31859, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 31878, 31936, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35974, 19288, 21605, 27972, 35663, 31985, 29655, 32001, 36715, 24785, 25893, 23545, 31912, 19853, 19916, 25938, 24540, 22420, 31843, 29674, 29573, 32735, 28936, 19803, 24035, 24035, 32047, 24035, 26576, 23114, 23114, 27544, 23114, 33811, 22468, 23511, 23511, 32161, 23511, 23512, 32066, 24035, 33313, 24035, 24035, 24035, 23113, 27426, 32102, 23114, 23114, 28618, 32125, 23511, 32144, 23511, 23511, 33569, 20402, 24035, 27045, 24035, 24036, 23114, 23114, 28328, 23114, 30076, 32177, 23511, 23511, 30384, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23595, 32212, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 22635, 25753, 32233, 32257, 32277, 19829, 26577, 26597, 20211, 23008, 19876, 32322, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 32352, 35285, 32380, 34196, 33016, 30661, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 32404, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 32422, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 30269, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 19949, 24035, 23111, 32455, 19874, 31269, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36337, 19552, 19209, 21617, 26509, 32475, 32491, 32529, 29939, 24035, 32578, 25241, 32597, 23114, 32634, 29007, 32656, 22420, 23511, 32729, 26365, 32751, 28306, 32788, 32882, 24035, 24035, 32813, 36727, 23114, 33182, 23114, 27553, 33235, 32829, 23511, 32706, 23511, 28906, 28377, 26962, 32881, 32904, 32898, 32920, 24035, 32953, 23114, 32977, 26408, 23114, 28164, 33006, 23511, 33039, 35774, 23511, 32306, 20402, 33076, 30872, 24035, 24036, 25408, 33110, 28979, 23114, 23029, 20271, 35835, 33130, 33054, 23511, 30562, 33148, 24035, 24035, 33167, 23114, 23114, 33775, 23036, 20459, 23511, 23511, 25464, 24646, 24035, 24035, 22446, 23114, 23114, 25627, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 31391, 33204, 33220, 33251, 33287, 26577, 26597, 20211, 33329, 19876, 33345, 23007, 20046, 20132, 26578, 27685, 28473, 22599, 31691, 33411, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35959, 19288, 21907, 27243, 29843, 32618, 33427, 31507, 29939, 33460, 34090, 24035, 24036, 33493, 24416, 33530, 23114, 22420, 33548, 24379, 33585, 23511, 28306, 19803, 33603, 24202, 24035, 24035, 25593, 33749, 28205, 23114, 23114, 32388, 22468, 33853, 33060, 23511, 23511, 31339, 33621, 24035, 24035, 34397, 24618, 30757, 33663, 23114, 23114, 33683, 35684, 28618, 26678, 23511, 23511, 32506, 33699, 34585, 20402, 24035, 32562, 26973, 24036, 23114, 23114, 33377, 33773, 23029, 20271, 23511, 23511, 30621, 23511, 23860, 24035, 33791, 21553, 26576, 36558, 23114, 33809, 23036, 32857, 26047, 23511, 33827, 23634, 24035, 24035, 23110, 23114, 23114, 31252, 23511, 33845, 23628, 24035, 24459, 23111, 23114, 33869, 27078, 30791, 29783, 24035, 24742, 19872, 33895, 23266, 26462, 19710, 33879, 33919, 26577, 26597, 24123, 24930, 21930, 20208, 30501, 33953, 25268, 20252, 33983, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36322, 19552, 23390, 33634, 35154, 34008, 34024, 34058, 35544, 34106, 34128, 26811, 33151, 34144, 34169, 34212, 23114, 34228, 34244, 34278, 34315, 23511, 34331, 34347, 34380, 34413, 24035, 24663, 26576, 34429, 34453, 34477, 29534, 33811, 22468, 34499, 34524, 34557, 25170, 34580, 35436, 23937, 34601, 24035, 24341, 26453, 23113, 34638, 34662, 23114, 24236, 28618, 34684, 34703, 34729, 23511, 35352, 34753, 34799, 24035, 34815, 32558, 34848, 34888, 35814, 34923, 23165, 29137, 23606, 30326, 30730, 34939, 33023, 30562, 36848, 34979, 24035, 24847, 34996, 23114, 23114, 35032, 29695, 35054, 23511, 23511, 35091, 33296, 35124, 24296, 28235, 24361, 36276, 32772, 35067, 35189, 27301, 30855, 24852, 22452, 35211, 35237, 35316, 25500, 35270, 23405, 24304, 35304, 29362, 24036, 23114, 35332, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 35368, 28823, 23920, 32336, 35405, 20141, 24569, 31691, 35421, 35479, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35944, 22795, 21605, 33647, 35877, 35513, 30962, 35529, 34073, 35557, 24035, 24035, 20405, 31107, 23114, 23114, 23114, 35590, 34713, 23511, 23511, 23511, 35641, 19803, 29408, 32937, 25298, 24035, 35657, 23115, 27849, 24760, 35679, 26205, 22468, 23511, 35700, 24907, 24901, 35075, 31893, 34980, 24035, 24035, 24035, 24035, 23113, 35009, 23114, 23114, 23114, 28618, 35716, 30970, 23511, 23511, 23511, 34585, 23215, 24035, 24035, 24035, 24036, 35735, 23114, 23114, 23114, 27105, 35756, 35790, 23511, 23511, 23511, 35254, 35446, 24035, 24035, 31223, 35809, 23114, 23114, 23036, 36825, 35830, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 31031, 20355, 19872, 33903, 23266, 24036, 23114, 28686, 19829, 26577, 26597, 20211, 23008, 23424, 20208, 24711, 31065, 24486, 26578, 27685, 20141, 19773, 35851, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36307, 19288, 21605, 35494, 19702, 32618, 33437, 31507, 29939, 25117, 24035, 27939, 24036, 27869, 23114, 26829, 23114, 22420, 23494, 23511, 33132, 23511, 28306, 19803, 24035, 34832, 24035, 24035, 26576, 23114, 25153, 23114, 23114, 33811, 22468, 23511, 23511, 35911, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35929, 19288, 21605, 25860, 23112, 36185, 23511, 36201, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 26748, 24035, 24035, 24035, 24035, 24035, 36249, 23114, 23114, 23114, 23114, 28618, 28835, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 27151, 24035, 26760, 23114, 27989, 23114, 23114, 36268, 20271, 23511, 24436, 23511, 29703, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36292, 19288, 21605, 36503, 21922, 32618, 34534, 31507, 36522, 24035, 33793, 24035, 35864, 23114, 23114, 36555, 23417, 22420, 23511, 23511, 36574, 26020, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 36592, 24035, 24035, 36625, 24035, 24035, 23113, 23114, 32961, 23114, 23114, 29618, 29700, 23511, 29086, 23511, 23511, 34585, 20402, 36644, 24035, 24035, 24036, 29740, 23114, 23114, 23114, 29065, 36663, 31527, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 31451, 23112, 36684, 23511, 36700, 29939, 24035, 24035, 24035, 30185, 23114, 23114, 23114, 27526, 22420, 23511, 23511, 23511, 32865, 28306, 19803, 36743, 24035, 27017, 24035, 26576, 27535, 23114, 31432, 23114, 33811, 22468, 33271, 23511, 32128, 23511, 23512, 24694, 24035, 27196, 24035, 24035, 24035, 23113, 32459, 23114, 23114, 23114, 28618, 29700, 33829, 36762, 23511, 23511, 34585, 20402, 24035, 36746, 24035, 29722, 23114, 23114, 34437, 23114, 34907, 20271, 23511, 23511, 18801, 23511, 23206, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 36837, 24035, 24035, 33739, 23114, 23114, 25094, 23511, 23261, 23628, 24035, 36780, 23111, 24073, 19874, 27078, 35344, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22720, 19288, 36799, 36866, 17466, 36890, 36864, 21991, 22211, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 17631, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36883, 36906, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22705, 19288, 19457, 36866, 17466, 36890, 36866, 19375, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36124, 19288, 36951, 36866, 17466, 36890, 36866, 21991, 22404, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18567, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36979, 36995, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18027, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 21529, 24035, 23112, 23033, 23511, 31507, 25377, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 37040, 23511, 23511, 23511, 23511, 28086, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 37079, 23511, 23511, 23511, 23511, 23512, 34766, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 37112, 37160, 18469, 36866, 17466, 36890, 36866, 17656, 37174, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18537, 22984, 17553, 17572, 22285, 18780, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36883, 36906, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 127011, 110630, 114730, 106539, 127011, 127011, 127011, 53264, 18, 18, 0, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 0, 0, 127011, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 3002368, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2576384, 2215936, 2215936, 2215936, 2416640, 2424832, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2543616, 2215936, 2215936, 2215936, 2215936, 2215936, 2629632, 2215936, 2617344, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2691072, 2215936, 2707456, 2215936, 2715648, 2215936, 2723840, 2764800, 2215936, 2215936, 2797568, 2215936, 2822144, 2215936, 2215936, 2854912, 2215936, 2215936, 2215936, 2912256, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 180224, 0, 0, 2174976, 0, 0, 2170880, 2617344, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2691072, 2170880, 2707456, 2170880, 2715648, 2170880, 2723840, 2764800, 2170880, 2170880, 2797568, 2170880, 2170880, 2797568, 2170880, 2822144, 2170880, 2170880, 2854912, 2170880, 2170880, 2170880, 2912256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2609152, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2654208, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 184599, 280, 0, 2174976, 0, 0, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 544, 0, 546, 0, 0, 2179072, 0, 0, 0, 552, 0, 0, 2170880, 2170880, 2170880, 3117056, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2158592, 2158592, 2232320, 2232320, 0, 2240512, 2240512, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3129344, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2400256, 2215936, 2215936, 2215936, 2215936, 2711552, 2170880, 2170880, 2170880, 2170880, 2170880, 2760704, 2768896, 2789376, 2813952, 2170880, 2170880, 2170880, 2875392, 2904064, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2453504, 2457600, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 167936, 0, 0, 0, 0, 2174976, 0, 0, 2215936, 2215936, 2514944, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2592768, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 32768, 0, 0, 0, 0, 0, 2174976, 32768, 0, 2633728, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2711552, 2215936, 2215936, 2215936, 2215936, 2215936, 2760704, 2768896, 2789376, 2813952, 2215936, 2215936, 2215936, 2875392, 2904064, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 0, 65819, 2215936, 2215936, 3031040, 2215936, 3055616, 2215936, 2215936, 2215936, 2215936, 3092480, 2215936, 2215936, 3125248, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3002368, 2215936, 2215936, 2170880, 2170880, 2494464, 2170880, 2170880, 0, 0, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2445312, 2170880, 2465792, 2473984, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2523136, 2170880, 2170880, 2641920, 2170880, 2170880, 2170880, 2699264, 2170880, 2727936, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2879488, 2170880, 2916352, 2170880, 2170880, 2170880, 2879488, 2170880, 2916352, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3026944, 2170880, 2170880, 3063808, 2170880, 2170880, 3112960, 2170880, 2170880, 3133440, 2170880, 2170880, 3112960, 2170880, 2170880, 3133440, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 2379776, 2215936, 2523136, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2596864, 2215936, 2621440, 2215936, 2215936, 2641920, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 548, 0, 0, 0, 0, 287, 2170880, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3117056, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2699264, 2215936, 2727936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2879488, 2215936, 2916352, 2215936, 2215936, 0, 0, 0, 0, 188416, 0, 2179072, 0, 0, 0, 0, 0, 287, 2170880, 0, 2171019, 2171019, 2171019, 2400395, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3031179, 2171019, 3055755, 2171019, 2171019, 2215936, 3133440, 2215936, 2215936, 2215936, 3162112, 2215936, 2215936, 3182592, 3186688, 2215936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2523275, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2597003, 2171019, 2621579, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 4337664, 28, 2170880, 2170880, 2170880, 2629632, 2170880, 2170880, 2170880, 2170880, 2719744, 2744320, 2170880, 2170880, 2170880, 2834432, 2838528, 2170880, 2908160, 2170880, 2170880, 2936832, 2215936, 2215936, 2215936, 2215936, 2719744, 2744320, 2215936, 2215936, 2215936, 2834432, 2838528, 2215936, 2908160, 2215936, 2215936, 2936832, 2215936, 2215936, 2985984, 2215936, 2994176, 2215936, 2215936, 3014656, 2215936, 3059712, 3076096, 3088384, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2445312, 2215936, 2465792, 2473984, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171019, 2171019, 2494603, 2171019, 2171019, 2215936, 2215936, 2215936, 3215360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2985984, 2170880, 2994176, 2170880, 2170880, 3016168, 2170880, 3059712, 3076096, 3088384, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 124, 124, 0, 128, 128, 2170880, 2170880, 2170880, 3215360, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2486272, 2170880, 2170880, 2506752, 2170880, 2170880, 2170880, 2535424, 2539520, 2170880, 2170880, 2588672, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 2170880, 2170880, 3051520, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3170304, 0, 2387968, 2392064, 2170880, 2170880, 2433024, 2170880, 2170880, 2170880, 3170304, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2486272, 2215936, 2215936, 2506752, 2215936, 2215936, 2215936, 2535424, 2539520, 2215936, 2215936, 2588672, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 136, 0, 2215936, 2215936, 2920448, 2215936, 2215936, 2215936, 2990080, 2215936, 2215936, 2215936, 2215936, 3051520, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3108864, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3026944, 2215936, 2215936, 3063808, 2215936, 2215936, 3112960, 2215936, 2215936, 2215936, 3170304, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2453504, 2457600, 2170880, 2170880, 2170880, 2486272, 2170880, 2170880, 2506752, 2170880, 2170880, 2170880, 2537049, 2539520, 2170880, 2170880, 2588672, 2170880, 2170880, 2170880, 1508, 2170880, 2170880, 2170880, 1512, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 2170880, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2686976, 2748416, 2170880, 2170880, 2170880, 2924544, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3121152, 2170880, 2170880, 3145728, 3158016, 3166208, 2170880, 2420736, 2428928, 2170880, 2478080, 2170880, 2170880, 2170880, 2170880, 0, 0, 2170880, 2170880, 2170880, 2170880, 2646016, 2670592, 0, 0, 3145728, 3158016, 3166208, 2387968, 2392064, 2215936, 2215936, 2433024, 2215936, 2461696, 2215936, 2215936, 2215936, 2510848, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 0, 2170880, 2215936, 2215936, 2580480, 2215936, 2605056, 2637824, 2215936, 2215936, 2686976, 2748416, 2215936, 2215936, 2215936, 2924544, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 286, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 3121152, 2215936, 2215936, 3145728, 3158016, 3166208, 2387968, 2392064, 2170880, 2170880, 2433024, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 1625, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 647, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2576384, 2170880, 2170880, 2170880, 2170880, 2170880, 2609152, 2170880, 2170880, 2686976, 0, 0, 2748416, 2170880, 2170880, 0, 2170880, 2924544, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 0, 0, 28, 28, 2170880, 3141632, 2215936, 2420736, 2428928, 2215936, 2478080, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2215936, 2998272, 2215936, 3010560, 2215936, 2215936, 2215936, 3141632, 2170880, 2420736, 2428928, 2752512, 2756608, 0, 2846720, 2961408, 2170880, 2998272, 2170880, 3010560, 2170880, 2170880, 2170880, 3141632, 2170880, 2170880, 2490368, 2215936, 2490368, 2215936, 2215936, 2215936, 2547712, 2555904, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 245760, 0, 3129344, 2170880, 2170880, 2490368, 2170880, 2170880, 2170880, 0, 0, 2547712, 2555904, 2170880, 2170880, 2170880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 45056, 0, 2584576, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 1482, 97, 97, 97, 97, 97, 97, 97, 1354, 97, 97, 97, 97, 97, 97, 97, 97, 1148, 97, 97, 97, 97, 97, 97, 97, 2584576, 2170880, 2170880, 1512, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2441216, 2170880, 2527232, 2170880, 2600960, 2170880, 2850816, 2170880, 2170880, 2170880, 3022848, 2215936, 2441216, 2215936, 2527232, 2215936, 2600960, 2215936, 2850816, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 287, 2170880, 2215936, 3022848, 2170880, 2441216, 2170880, 2527232, 0, 0, 2170880, 2600960, 2170880, 0, 2850816, 2170880, 2170880, 2170880, 2170880, 2170880, 2523136, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2596864, 2170880, 2621440, 2170880, 2170880, 2641920, 2170880, 2170880, 2170880, 3022848, 2170880, 2519040, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2519040, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2453504, 2457600, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2514944, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2592768, 2170880, 2170880, 2519040, 0, 2024, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 2396160, 2170880, 2170880, 2170880, 2170880, 3018752, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396160, 0, 2024, 2170880, 2170880, 2170880, 2170880, 3018752, 2170880, 2650112, 2965504, 2170880, 2215936, 2650112, 2965504, 2215936, 0, 0, 2170880, 2650112, 2965504, 2170880, 2551808, 2170880, 2551808, 2215936, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 141, 45, 45, 67, 67, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 0, 2551808, 2170880, 2170880, 2215936, 0, 2170880, 2170880, 2215936, 0, 2170880, 2170880, 2215936, 0, 2170880, 2977792, 2977792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 29, 102432, 127011, 110630, 114730, 106539, 127011, 127011, 127011, 53264, 18, 18, 49172, 0, 0, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 136, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 4256099, 4256099, 24, 24, 0, 28, 28, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 0, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 2170880, 2170880, 2547712, 2555904, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3129344, 2215936, 2215936, 543, 543, 545, 545, 0, 0, 2179072, 0, 550, 551, 551, 0, 287, 2171166, 2171166, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 645, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 149, 2584576, 2170880, 2170880, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2441216, 2170880, 2527232, 2170880, 2600960, 2519040, 0, 0, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 2396160, 2170880, 2170880, 2170880, 2170880, 3018752, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396160, 0, 0, 2170880, 2170880, 2170880, 2170880, 3018752, 2170880, 2650112, 2965504, 53264, 18, 49172, 57366, 24, 155648, 28, 102432, 155648, 155687, 114730, 106539, 0, 0, 155648, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 0, 0, 0, 0, 2220032, 0, 94208, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 208896, 18, 278528, 24, 24, 0, 28, 28, 53264, 18, 159765, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 139394, 28, 28, 102432, 131, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 32768, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 546, 0, 0, 2183168, 0, 0, 552, 832, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2609152, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2654208, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 1084, 0, 1088, 0, 1092, 0, 0, 0, 0, 0, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 937, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 644, 0, 0, 0, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 826, 0, 828, 0, 0, 2183168, 0, 0, 830, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2592768, 2170880, 2170880, 2170880, 2170880, 2633728, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2711552, 2170880, 2170880, 2170880, 2170880, 2170880, 2760704, 53264, 18, 49172, 57366, 24, 8192, 28, 172066, 172032, 110630, 172066, 106539, 0, 0, 172032, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 16384, 28, 28, 28, 28, 102432, 0, 98304, 0, 0, 2220032, 110630, 0, 0, 0, 0, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 45056, 0, 0, 0, 53264, 18, 49172, 57366, 25, 8192, 30, 102432, 0, 110630, 114730, 106539, 0, 0, 176219, 53264, 18, 18, 49172, 0, 57366, 0, 124, 124, 124, 0, 128, 128, 128, 128, 102432, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 0, 546, 0, 0, 2183168, 0, 65536, 552, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2170880, 2998272, 2170880, 3010560, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 143, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1824, 67, 1826, 67, 67, 67, 67, 17, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 120, 121, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 2179072, 548, 0, 65820, 65820, 0, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2033, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 978, 0, 546, 70179, 0, 2183168, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1013, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 67, 67, 67, 483, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1359, 97, 97, 97, 67, 67, 1584, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 45, 45, 45, 45, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 774, 67, 67, 1713, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 1723, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 45, 1559, 45, 45, 1561, 45, 45, 45, 45, 45, 45, 45, 687, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1771, 1772, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 1827, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 1614, 97, 97, 97, 97, 97, 603, 97, 97, 605, 97, 97, 608, 97, 97, 97, 97, 0, 1532, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 450, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 1839, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 1883, 97, 1885, 97, 0, 1888, 0, 97, 97, 0, 97, 97, 1848, 97, 97, 97, 97, 1852, 45, 45, 45, 45, 45, 45, 45, 384, 391, 45, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 45, 45, 45, 45, 1237, 45, 45, 45, 45, 45, 45, 67, 0, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1951, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1963, 97, 2023, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 1994, 67, 1995, 67, 67, 67, 67, 67, 67, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 137, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2793472, 2805760, 2170880, 2830336, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3031040, 2170880, 3055616, 2170880, 2170880, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 281, 549, 0, 65820, 65820, 0, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2031, 2032, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1769, 67, 0, 546, 70179, 549, 549, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1858, 45, 641, 0, 0, 0, 0, 41606, 926, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 456, 67, 0, 0, 0, 1313, 0, 0, 0, 1096, 1319, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1110, 97, 97, 97, 97, 67, 67, 67, 67, 1301, 1476, 0, 0, 0, 0, 1307, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1486, 97, 1487, 97, 1313, 1480, 0, 0, 0, 0, 1319, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1476, 0, 1478, 0, 1480, 0, 97, 97, 97, 97, 97, 97, 97, 45, 1853, 45, 1855, 45, 45, 45, 45, 53264, 18, 49172, 57366, 26, 8192, 31, 102432, 0, 110630, 114730, 106539, 0, 0, 225368, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 18, 49172, 163840, 57366, 0, 24, 24, 229376, 0, 28, 28, 28, 229376, 102432, 0, 0, 0, 0, 2220167, 110630, 0, 0, 0, 114730, 106539, 0, 2171019, 2171019, 2171019, 2171019, 2592907, 2171019, 2171019, 2171019, 2171019, 2633867, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2654347, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3117195, 2171019, 2171019, 2171019, 2171019, 2240641, 0, 0, 0, 0, 0, 0, 0, 0, 368, 0, 140, 2171019, 2171019, 2171019, 2416779, 2424971, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2617483, 2171019, 2171019, 2642059, 2171019, 2171019, 2171019, 2699403, 2171019, 2728075, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3215499, 2215936, 2215936, 2215936, 2215936, 2215936, 2437120, 2215936, 2215936, 2171019, 2822283, 2171019, 2171019, 2855051, 2171019, 2171019, 2171019, 2912395, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3002507, 2171019, 2171019, 2215936, 2215936, 2494464, 2215936, 2215936, 2215936, 2171166, 2171166, 2416926, 2425118, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2576670, 2171166, 2617630, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2691358, 2171166, 2707742, 2171166, 2715934, 2171166, 2724126, 2765086, 2171166, 2171166, 2797854, 2171166, 2822430, 2171166, 2171166, 2855198, 2171166, 2171166, 2171166, 2912542, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2793758, 2806046, 2171166, 2830622, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3109150, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2543902, 2171166, 2171166, 2171166, 2171166, 2171166, 2629918, 2793611, 2805899, 2171019, 2830475, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 0, 546, 0, 0, 2183168, 0, 0, 552, 0, 2171166, 2171166, 2171166, 2400542, 2171166, 2171166, 2171166, 0, 2171166, 2171166, 2171166, 0, 2171166, 2920734, 2171166, 2171166, 2171166, 2990366, 2171166, 2171166, 2171166, 2171166, 3117342, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 0, 53264, 0, 18, 18, 4329472, 2232445, 0, 2240641, 4337664, 2711691, 2171019, 2171019, 2171019, 2171019, 2171019, 2760843, 2769035, 2789515, 2814091, 2171019, 2171019, 2171019, 2875531, 2904203, 2171019, 2171019, 3092619, 2171019, 2171019, 3125387, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3199115, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2453504, 2457600, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2793472, 2805760, 2215936, 2830336, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2494464, 2170880, 2170880, 2171166, 2171166, 2634014, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2711838, 2171166, 2171166, 2171166, 2171166, 2171166, 2760990, 2769182, 2789662, 2814238, 2171166, 2171166, 2171166, 2875678, 2904350, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3199262, 2171166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2379915, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2445451, 2171019, 2465931, 2474123, 2171019, 2171019, 3113099, 2171019, 2171019, 3133579, 2171019, 2171019, 2171019, 3162251, 2171019, 2171019, 3182731, 3186827, 2171019, 2379776, 2879627, 2171019, 2916491, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3027083, 2171019, 2171019, 3063947, 2699550, 2171166, 2728222, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2879774, 2171166, 2916638, 2171166, 2171166, 2171166, 2171166, 2171166, 2609438, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2654494, 2171166, 2171166, 2171166, 2171166, 2171166, 2445598, 2171166, 2466078, 2474270, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2523422, 2171019, 2437259, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2543755, 2171019, 2171019, 2171019, 2584715, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2908299, 2171019, 2171019, 2936971, 2171019, 2171019, 2986123, 2171019, 2994315, 2171019, 2171019, 3014795, 2171019, 3059851, 3076235, 3088523, 2171166, 2171166, 2986270, 2171166, 2994462, 2171166, 2171166, 3014942, 2171166, 3059998, 3076382, 3088670, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3027230, 2171166, 2171166, 3064094, 2171166, 2171166, 3113246, 2171166, 2171166, 3133726, 2506891, 2171019, 2171019, 2171019, 2535563, 2539659, 2171019, 2171019, 2588811, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2691211, 2171019, 2707595, 2171019, 2715787, 2171019, 2723979, 2764939, 2171019, 2171019, 2797707, 2215936, 2215936, 3170304, 0, 0, 0, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2453790, 2457886, 2171166, 2171166, 2171166, 2486558, 2171166, 2171166, 2507038, 2171166, 2171166, 2171166, 2535710, 2539806, 2171166, 2171166, 2588958, 2171166, 2171166, 2171166, 2171166, 2515230, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2593054, 2171166, 2171166, 2171166, 2171166, 3051806, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3170590, 0, 2388107, 2392203, 2171019, 2171019, 2433163, 2171019, 2461835, 2171019, 2171019, 2171019, 2510987, 2171019, 2171019, 2171019, 2171019, 2580619, 2171019, 2605195, 2637963, 2171019, 2171019, 2171019, 2920587, 2171019, 2171019, 2171019, 2990219, 2171019, 2171019, 2171019, 2171019, 3051659, 2171019, 2171019, 2171019, 2453643, 2457739, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2515083, 2171019, 2171019, 2171019, 2171019, 2646155, 2670731, 2752651, 2756747, 2846859, 2961547, 2171019, 2998411, 2171019, 3010699, 2171019, 2171019, 2687115, 2748555, 2171019, 2171019, 2171019, 2924683, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3121291, 2171019, 2171019, 2171019, 3170443, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2486272, 2215936, 2215936, 2506752, 3145867, 3158155, 3166347, 2387968, 2392064, 2215936, 2215936, 2433024, 2215936, 2461696, 2215936, 2215936, 2215936, 2510848, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 553, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 3121152, 2215936, 2215936, 3145728, 3158016, 3166208, 2388254, 2392350, 2171166, 2171166, 2433310, 2171166, 2461982, 2171166, 2171166, 2171166, 2511134, 2171166, 2171166, 0, 2171166, 2171166, 2580766, 2171166, 2605342, 2638110, 2171166, 2171166, 2171166, 2171166, 3031326, 2171166, 3055902, 2171166, 2171166, 2171166, 2171166, 3092766, 2171166, 2171166, 3125534, 2171166, 2171166, 2171166, 3162398, 2171166, 2171166, 3182878, 3186974, 2171166, 0, 0, 0, 2171019, 2171019, 2171019, 2171019, 3109003, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2215936, 2215936, 2400256, 2215936, 2215936, 2215936, 2215936, 2171166, 2687262, 0, 0, 2748702, 2171166, 2171166, 0, 2171166, 2924830, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2597150, 2171166, 2621726, 2171166, 2171166, 2642206, 2171166, 2171166, 2171166, 2171166, 3121438, 2171166, 2171166, 3146014, 3158302, 3166494, 2171019, 2420875, 2429067, 2171019, 2478219, 2171019, 2171019, 2171019, 2171019, 2547851, 2556043, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3129483, 2215936, 2171019, 3141771, 2215936, 2420736, 2428928, 2215936, 2478080, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2215936, 2998272, 2215936, 3010560, 2215936, 2215936, 2215936, 3141632, 2171166, 2421022, 2429214, 2171166, 2478366, 2171166, 2171166, 2171166, 2171166, 0, 0, 2171166, 2171166, 2171166, 2171166, 2646302, 2670878, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 0, 45, 45, 45, 45, 45, 1405, 1406, 45, 45, 45, 45, 1409, 45, 45, 45, 45, 45, 1415, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1238, 45, 45, 45, 45, 67, 2752798, 2756894, 0, 2847006, 2961694, 2171166, 2998558, 2171166, 3010846, 2171166, 2171166, 2171166, 3141918, 2171019, 2171019, 2490507, 3129344, 2171166, 2171166, 2490654, 2171166, 2171166, 2171166, 0, 0, 2547998, 2556190, 2171166, 2171166, 2171166, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 167, 45, 45, 45, 45, 185, 187, 45, 45, 198, 45, 45, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3129630, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2576523, 2171019, 2171019, 2171019, 2171019, 2171019, 2609291, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3002368, 2215936, 2215936, 2171166, 2171166, 2494750, 2171166, 2171166, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 147, 2584576, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 3002654, 2171166, 2171166, 2171019, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2175257, 0, 0, 2584862, 2171166, 2171166, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171019, 2441355, 2171019, 2527371, 2171019, 2601099, 2171019, 2850955, 2171019, 2171019, 2171019, 3022987, 2215936, 2441216, 2215936, 2527232, 2215936, 2600960, 2215936, 2850816, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 69632, 287, 2170880, 2215936, 3022848, 2171166, 2441502, 2171166, 2527518, 0, 0, 2171166, 2601246, 2171166, 0, 2851102, 2171166, 2171166, 2171166, 2171166, 2720030, 2744606, 2171166, 2171166, 2171166, 2834718, 2838814, 2171166, 2908446, 2171166, 2171166, 2937118, 3023134, 2171019, 2519179, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2519040, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 3215646, 0, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2486411, 2171019, 2171019, 2171019, 2629771, 2171019, 2171019, 2171019, 2171019, 2719883, 2744459, 2171019, 2171019, 2171019, 2834571, 2838667, 2171019, 2519326, 0, 0, 2171166, 2171166, 0, 2171166, 2171166, 2171166, 2396299, 2171019, 2171019, 2171019, 2171019, 3018891, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396446, 0, 0, 2171166, 2171166, 2171166, 2171166, 3019038, 2171019, 2650251, 2965643, 2171019, 2215936, 2650112, 2965504, 2215936, 0, 0, 2171166, 2650398, 2965790, 2171166, 2551947, 2171019, 2551808, 2215936, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 144, 45, 45, 67, 67, 67, 67, 67, 228, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1929, 97, 97, 97, 97, 0, 0, 0, 2552094, 2171166, 2171019, 2215936, 0, 2171166, 2171019, 2215936, 0, 2171166, 2171019, 2215936, 0, 2171166, 2977931, 2977792, 2978078, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1321, 97, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 140, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2445312, 2170880, 2465792, 2473984, 2170880, 2170880, 2170880, 2584576, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 0, 140, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3002368, 2170880, 2170880, 2215936, 2215936, 2494464, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3215360, 544, 0, 0, 0, 544, 0, 546, 0, 0, 0, 546, 0, 0, 2183168, 0, 0, 552, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 0, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 552, 0, 0, 0, 552, 0, 287, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2437120, 2170880, 2170880, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 644, 0, 2215936, 2215936, 3170304, 544, 0, 546, 0, 552, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 0, 140, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 249856, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 151640, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2416640, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 253952, 110630, 114730, 106539, 0, 0, 32856, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 192512, 53264, 18, 18, 49172, 0, 57366, 0, 2232445, 184320, 2232445, 0, 2240641, 2240641, 184320, 2240641, 102432, 0, 0, 0, 221184, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3108864, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 0, 0, 0, 45056, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 127, 127, 53264, 18, 49172, 258071, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 204800, 53264, 18, 49172, 57366, 24, 27, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 33, 0, 33, 33, 33, 0, 0, 0, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 16384, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2170880, 2170880, 2170880, 2416640, 67, 67, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2030, 45, 45, 45, 45, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1699, 67, 67, 67, 67, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 1358, 97, 97, 97, 641, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 45, 45, 45, 0, 1480, 0, 0, 0, 0, 1319, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1680, 45, 45, 45, 641, 0, 924, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 45, 45, 45, 45, 67, 67, 37139, 37139, 24853, 24853, 0, 70179, 282, 0, 0, 65820, 65820, 369, 287, 97, 0, 0, 97, 97, 0, 97, 2028, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1767, 67, 67, 67, 0, 0, 0, 0, 0, 0, 1612, 97, 97, 97, 97, 97, 97, 0, 1785, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1790, 97, 0, 0, 2170880, 2170880, 3051520, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3170304, 241664, 2387968, 2392064, 2170880, 2170880, 2433024, 53264, 19, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 274432, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 270336, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 1134711, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 1126440, 1126440, 1126440, 0, 0, 1126400, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 36, 110630, 114730, 106539, 0, 0, 217088, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 94, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 96, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 24666, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 126, 28, 28, 28, 28, 102432, 53264, 122, 123, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 2170880, 2170880, 4256099, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 1319, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1109, 97, 97, 97, 97, 1113, 132, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 146, 150, 45, 45, 45, 45, 45, 175, 45, 180, 45, 186, 45, 189, 45, 45, 203, 67, 256, 67, 67, 270, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 293, 297, 97, 97, 97, 97, 97, 322, 97, 327, 97, 333, 97, 0, 0, 97, 2026, 0, 2027, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 336, 97, 97, 350, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 2424832, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2617344, 2170880, 45, 439, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 525, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 622, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 1527, 369, 648, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1239, 45, 45, 45, 67, 729, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 762, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 0, 0, 0, 1477, 0, 1086, 0, 0, 0, 1479, 0, 1090, 67, 67, 796, 67, 67, 799, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 67, 67, 811, 67, 67, 67, 67, 67, 816, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 833, 97, 97, 97, 97, 97, 97, 97, 97, 1380, 0, 0, 0, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 45, 45, 45, 45, 67, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 97, 97, 97, 894, 97, 97, 897, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1382, 45, 45, 45, 97, 909, 97, 97, 97, 97, 97, 914, 97, 97, 97, 97, 97, 97, 97, 923, 67, 67, 1079, 67, 67, 67, 67, 67, 37689, 1085, 25403, 1089, 66365, 1093, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 148, 1114, 97, 97, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 97, 97, 606, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1173, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 145, 45, 45, 67, 67, 67, 67, 67, 1762, 67, 67, 67, 1766, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1934, 67, 67, 1255, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 67, 67, 67, 67, 1297, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 33344, 97, 97, 97, 1335, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 1377, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 670, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 67, 67, 1438, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 0, 0, 1305, 0, 0, 0, 0, 0, 1311, 0, 0, 0, 1317, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1322, 97, 97, 1491, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 1553, 45, 1504, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 97, 97, 0, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 1540, 45, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1700, 67, 67, 67, 97, 1648, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1541, 0, 97, 97, 97, 97, 0, 1940, 0, 97, 97, 97, 97, 97, 97, 45, 45, 2011, 45, 45, 45, 2015, 67, 67, 2017, 67, 67, 67, 2021, 97, 67, 67, 812, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 97, 97, 97, 910, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 923, 0, 0, 0, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 1188, 45, 45, 45, 45, 1414, 45, 45, 45, 1417, 45, 1419, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 453, 45, 45, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 282, 41098, 65820, 97, 1324, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 930, 45, 45, 45, 45, 97, 97, 97, 97, 1378, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 45, 67, 67, 1923, 67, 1925, 67, 67, 1927, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1985, 45, 45, 45, 45, 45, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 45, 946, 45, 45, 950, 45, 45, 45, 0, 97, 97, 97, 1939, 0, 0, 0, 97, 1943, 97, 97, 1945, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 990, 45, 45, 45, 67, 257, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 337, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 370, 2170880, 2170880, 2170880, 2416640, 401, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 459, 461, 67, 67, 67, 67, 67, 67, 67, 67, 475, 67, 480, 67, 67, 67, 67, 67, 67, 1054, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 484, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 67, 67, 97, 556, 558, 97, 97, 97, 97, 97, 97, 97, 97, 572, 97, 577, 97, 97, 0, 0, 1896, 97, 97, 97, 97, 97, 97, 1903, 45, 45, 45, 45, 983, 45, 45, 45, 45, 988, 45, 45, 45, 45, 45, 45, 1195, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1549, 45, 45, 45, 45, 45, 581, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1004, 45, 45, 45, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 761, 67, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 1071, 67, 67, 67, 67, 1076, 794, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 544, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 859, 97, 0, 0, 2025, 97, 20480, 97, 97, 2029, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1775, 67, 67, 67, 97, 97, 97, 97, 892, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1515, 97, 993, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 992, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1607, 67, 67, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 97, 45, 1556, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 696, 45, 1596, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 67, 97, 97, 97, 1621, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1346, 97, 97, 97, 97, 1740, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 45, 45, 67, 97, 97, 97, 97, 97, 97, 1836, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1984, 97, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 45, 45, 45, 45, 67, 739, 67, 67, 67, 67, 67, 744, 45, 45, 1909, 45, 45, 45, 45, 45, 45, 45, 67, 1917, 67, 1918, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 67, 67, 67, 67, 67, 97, 1930, 97, 1931, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 1580, 67, 67, 0, 97, 97, 1938, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 699, 45, 45, 45, 704, 45, 45, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 97, 2006, 97, 97, 97, 97, 0, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 722, 723, 45, 45, 45, 45, 45, 45, 2045, 67, 67, 67, 2047, 0, 0, 97, 97, 97, 2051, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1957, 45, 67, 67, 67, 67, 67, 1836, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 67, 67, 1761, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 45, 45, 420, 45, 45, 422, 45, 45, 425, 45, 45, 45, 45, 45, 45, 45, 387, 45, 45, 45, 45, 397, 45, 45, 45, 67, 460, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 515, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 97, 0, 2039, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1426, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1689, 67, 67, 67, 97, 557, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 612, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 896, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 97, 45, 939, 45, 45, 45, 45, 943, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1916, 67, 67, 67, 67, 67, 45, 67, 67, 67, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 1019, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 804, 67, 67, 67, 67, 67, 1077, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2437120, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2543616, 2170880, 2170880, 2170880, 2170880, 2170880, 2629632, 1169, 97, 1171, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 936, 45, 45, 67, 67, 214, 67, 220, 67, 67, 233, 67, 243, 67, 248, 67, 67, 67, 67, 67, 67, 1298, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1617, 97, 0, 0, 0, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 45, 45, 45, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 1281, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 776, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 907, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 690, 45, 45, 695, 45, 45, 67, 67, 67, 67, 67, 1465, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1712, 97, 97, 97, 97, 1741, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1924, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1983, 97, 97, 45, 45, 1987, 45, 1988, 45, 0, 97, 97, 97, 97, 0, 0, 0, 1942, 97, 97, 97, 97, 97, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 711, 45, 45, 153, 45, 45, 166, 45, 176, 45, 181, 45, 45, 188, 191, 196, 45, 204, 255, 258, 263, 67, 271, 67, 67, 0, 37139, 24853, 0, 0, 0, 282, 41098, 65820, 97, 97, 97, 294, 97, 300, 97, 97, 313, 97, 323, 97, 328, 97, 97, 335, 338, 343, 97, 351, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 41098, 0, 140, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1411, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 67, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1263, 67, 67, 67, 67, 67, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1526, 97, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 0, 97, 97, 1796, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1744, 45, 45, 45, 369, 0, 651, 45, 653, 45, 654, 45, 656, 45, 45, 45, 660, 45, 45, 45, 45, 1558, 45, 45, 45, 45, 45, 45, 45, 45, 1566, 45, 45, 681, 45, 683, 45, 45, 45, 45, 45, 45, 45, 45, 691, 692, 694, 45, 45, 45, 716, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 709, 45, 45, 712, 45, 714, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 726, 45, 45, 45, 733, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 747, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 1613, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 67, 764, 67, 67, 67, 67, 768, 67, 770, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1977, 67, 778, 779, 781, 67, 67, 67, 67, 67, 67, 788, 789, 67, 67, 792, 793, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 67, 67, 824, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 836, 97, 838, 97, 839, 97, 841, 97, 97, 97, 845, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 97, 97, 0, 1728, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1802, 45, 97, 97, 862, 97, 97, 97, 97, 866, 97, 868, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1788, 97, 97, 97, 0, 0, 97, 97, 876, 877, 879, 97, 97, 97, 97, 97, 97, 886, 887, 97, 97, 890, 891, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1646, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 97, 97, 922, 923, 45, 955, 45, 957, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 195, 45, 45, 45, 45, 45, 981, 982, 45, 45, 45, 45, 45, 45, 989, 45, 45, 45, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 45, 45, 45, 67, 1023, 67, 67, 67, 67, 67, 67, 1031, 67, 1033, 67, 67, 67, 67, 67, 67, 67, 817, 819, 67, 67, 67, 67, 67, 37689, 544, 67, 1065, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 1078, 67, 67, 1081, 1082, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2437406, 2171166, 2171166, 97, 1115, 97, 1117, 97, 97, 97, 97, 97, 97, 1125, 97, 1127, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 1644, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 1642, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1159, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1502, 97, 97, 97, 97, 97, 1172, 97, 97, 1175, 1176, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 935, 45, 45, 45, 1233, 45, 45, 45, 1236, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1873, 67, 67, 45, 45, 1218, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 1230, 45, 45, 67, 67, 215, 219, 222, 67, 230, 67, 67, 244, 246, 249, 67, 67, 67, 67, 67, 67, 1882, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1904, 45, 1905, 45, 67, 67, 67, 67, 67, 1258, 67, 1260, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 67, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 67, 818, 67, 67, 67, 67, 67, 67, 37689, 544, 67, 67, 1295, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2174976, 0, 0, 97, 97, 97, 1326, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 97, 97, 97, 97, 97, 1338, 97, 1340, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 1503, 97, 1363, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 578, 97, 1375, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 45, 45, 45, 45, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1778, 97, 97, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 97, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 1554, 45, 1570, 1571, 45, 67, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 67, 1061, 67, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 1594, 67, 67, 67, 67, 67, 97, 2038, 0, 97, 97, 97, 97, 97, 2044, 45, 45, 45, 995, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 45, 45, 45, 1809, 45, 1811, 45, 45, 45, 45, 45, 67, 1610, 1611, 67, 1476, 0, 1478, 0, 1480, 0, 97, 97, 97, 97, 97, 97, 1618, 1647, 1649, 97, 97, 97, 1652, 97, 1654, 1655, 97, 0, 45, 45, 45, 1658, 45, 45, 67, 67, 216, 67, 67, 67, 67, 234, 67, 67, 67, 67, 252, 254, 1845, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 947, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1881, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1902, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1921, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 0, 97, 1937, 97, 97, 1940, 0, 0, 97, 97, 97, 97, 97, 97, 1947, 1948, 1949, 45, 45, 45, 1952, 45, 1954, 45, 45, 45, 45, 1959, 1960, 1961, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 67, 67, 1964, 67, 1966, 67, 67, 67, 67, 1971, 1972, 1973, 97, 0, 0, 0, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 884, 97, 97, 97, 889, 97, 97, 1978, 97, 0, 0, 1981, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 736, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 45, 67, 67, 67, 67, 0, 2049, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 933, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 97, 97, 288, 97, 97, 97, 97, 97, 97, 317, 97, 97, 97, 97, 97, 97, 0, 0, 97, 1787, 97, 97, 97, 97, 0, 0, 45, 45, 378, 45, 45, 45, 45, 45, 390, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 431, 433, 45, 45, 45, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 67, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 632, 97, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 67, 97, 97, 97, 97, 97, 97, 1837, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1897, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 97, 2010, 45, 45, 45, 45, 45, 45, 2016, 67, 67, 67, 67, 67, 67, 2022, 45, 2046, 67, 67, 67, 0, 0, 2050, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 932, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 45, 45, 133, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 701, 702, 45, 45, 705, 706, 45, 45, 45, 45, 45, 45, 703, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 45, 45, 45, 45, 45, 725, 45, 45, 45, 369, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 834, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1799, 97, 97, 45, 45, 45, 1569, 45, 45, 45, 1572, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1306, 0, 67, 67, 67, 1598, 67, 67, 67, 67, 67, 67, 67, 67, 1606, 67, 67, 1609, 97, 97, 97, 1650, 97, 97, 1653, 97, 97, 97, 0, 45, 45, 1657, 45, 45, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1421, 45, 45, 45, 1703, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1711, 97, 97, 0, 1895, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 958, 45, 960, 45, 45, 45, 45, 45, 45, 45, 45, 1913, 45, 45, 1915, 67, 67, 67, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 481, 67, 45, 1749, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 45, 45, 45, 45, 173, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1773, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1886, 0, 0, 0, 97, 97, 67, 2035, 2036, 67, 67, 97, 0, 0, 97, 2041, 2042, 97, 97, 45, 45, 45, 45, 1662, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1397, 45, 45, 45, 45, 151, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 437, 205, 45, 67, 67, 67, 218, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 67, 97, 97, 97, 97, 298, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 97, 97, 97, 97, 97, 97, 352, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 0, 0, 0, 0, 0, 365, 0, 41098, 0, 140, 45, 45, 45, 45, 45, 1427, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1435, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1037, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 923, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1919, 67, 1759, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 45, 154, 45, 162, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 964, 45, 45, 45, 206, 45, 67, 67, 67, 67, 221, 67, 229, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 67, 785, 67, 67, 67, 67, 67, 67, 67, 67, 802, 67, 67, 67, 807, 67, 67, 67, 97, 97, 97, 97, 353, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 0, 0, 0, 0, 0, 366, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 402, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 45, 45, 674, 45, 45, 45, 45, 45, 45, 45, 45, 389, 45, 394, 45, 45, 398, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 447, 45, 45, 45, 454, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 488, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 67, 67, 67, 67, 67, 1774, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 67, 67, 523, 67, 67, 527, 67, 67, 67, 67, 67, 533, 67, 67, 67, 540, 97, 97, 97, 585, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 97, 97, 97, 97, 1784, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 0, 28, 28, 97, 97, 620, 97, 97, 624, 97, 97, 97, 97, 97, 630, 97, 97, 97, 637, 713, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 45, 45, 45, 1197, 45, 45, 45, 45, 45, 45, 45, 45, 730, 732, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1581, 67, 45, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 775, 67, 67, 67, 67, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 67, 67, 67, 1080, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 287, 0, 0, 0, 287, 0, 2379776, 2170880, 2170880, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 920, 97, 97, 0, 0, 0, 0, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 45, 959, 45, 45, 45, 45, 45, 45, 45, 45, 45, 184, 45, 45, 45, 45, 202, 45, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1266, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1279, 67, 67, 67, 67, 67, 272, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1293, 67, 67, 67, 1296, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 281, 94, 0, 0, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 0, 97, 1376, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1384, 45, 45, 67, 208, 67, 67, 67, 67, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1069, 1070, 67, 67, 67, 67, 67, 67, 67, 0, 37140, 24854, 0, 0, 0, 0, 41098, 65821, 45, 1423, 45, 45, 45, 45, 45, 45, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1083, 37689, 0, 25403, 0, 66365, 0, 0, 0, 1436, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1830, 67, 1452, 1453, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 67, 67, 1461, 67, 67, 67, 1464, 67, 1466, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 1587, 67, 67, 67, 67, 67, 67, 67, 67, 1595, 1489, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 1505, 1506, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 1164, 97, 97, 97, 97, 97, 1516, 97, 97, 97, 1519, 97, 1521, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1301, 0, 0, 0, 1307, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 919, 97, 97, 97, 0, 97, 97, 97, 1781, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1792, 1860, 45, 1862, 1863, 45, 1865, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1875, 67, 1877, 1878, 67, 1880, 67, 97, 97, 97, 97, 97, 1887, 0, 1889, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 237568, 0, 367, 0, 97, 1893, 0, 0, 0, 97, 1898, 1899, 97, 1901, 97, 45, 45, 45, 45, 45, 2014, 45, 67, 67, 67, 67, 67, 2020, 67, 97, 1989, 45, 1990, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1996, 67, 1997, 67, 67, 67, 67, 67, 273, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 2005, 0, 97, 2007, 97, 97, 18, 0, 139621, 0, 0, 0, 642, 0, 133, 364, 0, 0, 367, 41606, 0, 97, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 209, 67, 67, 67, 223, 67, 67, 67, 67, 67, 67, 67, 67, 67, 786, 67, 67, 67, 791, 67, 67, 45, 45, 940, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1016, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 133, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 142, 45, 45, 67, 210, 67, 67, 67, 225, 67, 67, 239, 67, 67, 67, 250, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 476, 67, 67, 67, 67, 67, 67, 67, 1709, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1843, 0, 67, 259, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 289, 97, 97, 97, 303, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 97, 339, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 358, 0, 0, 0, 0, 0, 0, 41098, 0, 140, 45, 45, 45, 45, 45, 1953, 45, 1955, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1687, 1688, 67, 67, 67, 67, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1203, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 477, 67, 67, 67, 67, 67, 67, 67, 1970, 97, 97, 97, 1974, 0, 0, 0, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1372, 97, 97, 97, 97, 67, 522, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 536, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 574, 97, 97, 97, 97, 97, 301, 97, 309, 97, 97, 97, 97, 97, 97, 97, 97, 97, 900, 97, 97, 97, 905, 97, 97, 97, 619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 633, 97, 97, 18, 0, 139621, 0, 0, 362, 0, 0, 0, 364, 0, 0, 367, 41606, 369, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 664, 67, 67, 67, 67, 750, 751, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1057, 1058, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 67, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 902, 97, 97, 97, 97, 67, 67, 1051, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1302, 0, 0, 0, 1308, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1139, 97, 97, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 1161, 97, 97, 97, 97, 97, 1166, 97, 97, 18, 640, 139621, 0, 641, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 67, 67, 67, 67, 1257, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1305, 0, 0, 97, 97, 1337, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1630, 97, 67, 1474, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2380062, 2171166, 2171166, 97, 1529, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 45, 45, 67, 67, 67, 67, 1707, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1891, 1739, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 1200, 45, 45, 45, 45, 97, 97, 1894, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 45, 45, 45, 67, 67, 1965, 67, 1967, 67, 67, 67, 97, 97, 97, 97, 0, 1976, 0, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 97, 97, 1979, 0, 0, 97, 1982, 97, 97, 97, 1986, 45, 45, 45, 45, 45, 735, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 2000, 97, 97, 97, 2002, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1798, 97, 97, 97, 45, 45, 45, 2034, 67, 67, 67, 67, 97, 0, 0, 2040, 97, 97, 97, 97, 45, 45, 45, 45, 1752, 45, 45, 45, 1753, 1754, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 45, 45, 438, 45, 45, 45, 45, 45, 445, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1430, 67, 67, 67, 67, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 531, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 1096, 97, 97, 97, 621, 97, 97, 97, 97, 97, 628, 97, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 45, 942, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 708, 45, 45, 45, 45, 763, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 809, 810, 67, 67, 67, 67, 783, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 1303, 0, 0, 0, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 45, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 67, 67, 67, 67, 1027, 67, 67, 67, 67, 1032, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 1097, 1064, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 67, 1098, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 331, 97, 97, 97, 97, 1158, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 1309, 0, 0, 0, 1315, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1374, 97, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1240, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1252, 67, 97, 97, 97, 1635, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1800, 97, 45, 45, 45, 97, 97, 1793, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1743, 45, 45, 45, 1746, 45, 0, 97, 97, 97, 97, 97, 1851, 97, 45, 45, 45, 45, 1856, 45, 45, 45, 45, 1864, 45, 45, 67, 67, 1869, 67, 67, 67, 67, 1874, 67, 0, 97, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 211, 67, 67, 67, 67, 67, 67, 240, 67, 67, 67, 67, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 67, 67, 268, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 290, 97, 97, 97, 305, 97, 97, 319, 97, 97, 97, 330, 97, 97, 18, 640, 139621, 0, 641, 0, 0, 0, 0, 364, 0, 643, 367, 41606, 97, 97, 348, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 395, 45, 45, 45, 400, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 45, 972, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 745, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 1086, 25403, 1090, 66365, 1094, 0, 0, 97, 843, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 1121, 97, 97, 97, 97, 1126, 97, 97, 97, 97, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1400, 45, 67, 67, 67, 1011, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 1304, 0, 0, 0, 1190, 45, 45, 1193, 1194, 45, 45, 45, 45, 45, 1199, 45, 1201, 45, 45, 45, 45, 1911, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 67, 67, 45, 1205, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1217, 45, 45, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 1229, 45, 45, 45, 1388, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1574, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 1254, 67, 67, 67, 67, 67, 1259, 67, 1261, 67, 67, 67, 67, 1265, 67, 67, 67, 67, 67, 67, 1708, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 1289, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 1087, 25403, 1091, 66365, 1095, 0, 0, 97, 97, 97, 97, 1339, 97, 1341, 97, 97, 97, 97, 1345, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 573, 97, 97, 97, 97, 97, 97, 1717, 97, 0, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1329, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 97, 97, 97, 1365, 97, 97, 97, 97, 1369, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1399, 45, 45, 45, 1413, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1669, 45, 1422, 45, 45, 1425, 45, 45, 1428, 45, 1429, 67, 67, 67, 67, 67, 67, 67, 67, 1468, 67, 67, 67, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 539, 67, 67, 1475, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 97, 97, 1530, 97, 0, 45, 45, 1534, 45, 45, 45, 45, 45, 45, 45, 45, 1956, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1599, 67, 67, 1601, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 67, 1632, 97, 1634, 0, 97, 97, 97, 1640, 97, 97, 97, 1643, 97, 97, 1645, 97, 97, 97, 97, 97, 912, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1660, 1661, 45, 45, 45, 45, 1665, 1666, 45, 45, 45, 45, 45, 1670, 1692, 1693, 67, 67, 67, 67, 67, 1697, 67, 67, 67, 67, 67, 67, 67, 1702, 97, 97, 1714, 1715, 97, 97, 97, 97, 0, 1721, 1722, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 97, 97, 1362, 1726, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 1734, 97, 97, 97, 97, 97, 848, 849, 97, 97, 97, 97, 856, 97, 97, 97, 97, 97, 354, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 45, 45, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1681, 45, 0, 1846, 97, 97, 97, 97, 97, 97, 45, 45, 1854, 45, 45, 45, 45, 1859, 67, 67, 67, 1879, 67, 67, 97, 97, 1884, 97, 97, 0, 0, 0, 97, 97, 97, 1105, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 1347, 97, 1892, 97, 0, 0, 0, 97, 97, 97, 1900, 97, 97, 45, 45, 45, 45, 45, 997, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1002, 45, 45, 1005, 1006, 45, 67, 67, 67, 67, 67, 1926, 67, 67, 1928, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1737, 97, 0, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1944, 97, 97, 1946, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 190, 45, 45, 45, 152, 155, 45, 163, 45, 45, 177, 179, 182, 45, 45, 45, 193, 197, 45, 45, 45, 1672, 45, 45, 45, 45, 45, 1677, 45, 1679, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 67, 260, 264, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 295, 299, 302, 97, 310, 97, 97, 324, 326, 329, 97, 97, 97, 0, 97, 97, 1639, 0, 1641, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 97, 97, 97, 1523, 97, 97, 97, 97, 97, 97, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 97, 97, 312, 97, 97, 97, 97, 97, 97, 97, 97, 1123, 97, 97, 97, 97, 97, 97, 97, 340, 344, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 373, 375, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 435, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1410, 45, 45, 45, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 67, 67, 67, 67, 1969, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 2064, 2065, 0, 2066, 45, 521, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 465, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1933, 0, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 18, 640, 139621, 358, 641, 0, 0, 0, 0, 364, 0, 0, 367, 0, 618, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 97, 97, 881, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 569, 97, 97, 97, 97, 97, 369, 0, 45, 652, 45, 45, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1432, 67, 67, 67, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 67, 0, 1305, 0, 1311, 0, 1317, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 1724, 97, 97, 97, 777, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 535, 67, 67, 67, 67, 67, 67, 67, 814, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 837, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 97, 97, 97, 0, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1168, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 97, 97, 0, 1637, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1801, 45, 45, 97, 875, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1151, 1152, 97, 97, 97, 67, 67, 67, 1040, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 790, 67, 67, 67, 1180, 0, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 200, 45, 45, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 67, 67, 67, 0, 0, 0, 1481, 0, 1094, 0, 0, 97, 1483, 97, 97, 97, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 1633, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1381, 0, 0, 45, 45, 45, 45, 97, 97, 1727, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 636, 45, 45, 1760, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 67, 67, 1299, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1616, 97, 97, 1803, 45, 45, 45, 45, 1807, 45, 45, 45, 45, 45, 1813, 45, 45, 45, 67, 67, 1684, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 822, 67, 67, 37689, 544, 67, 67, 1818, 67, 67, 67, 67, 1822, 67, 67, 67, 67, 67, 1828, 67, 67, 67, 67, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2012, 2013, 45, 45, 67, 67, 67, 2018, 2019, 67, 67, 97, 67, 97, 97, 97, 1833, 97, 97, 0, 0, 97, 97, 1840, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 1733, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 1849, 97, 97, 97, 45, 45, 45, 45, 45, 1857, 45, 45, 45, 1910, 45, 1912, 45, 45, 1914, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 67, 1020, 67, 45, 1861, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1446, 67, 67, 67, 67, 67, 1876, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1890, 97, 97, 97, 97, 97, 1134, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 97, 97, 97, 580, 1935, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1906, 45, 67, 67, 67, 67, 2048, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 931, 45, 45, 45, 45, 45, 45, 1674, 45, 1676, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1871, 67, 67, 67, 67, 0, 97, 97, 45, 67, 0, 97, 2060, 2061, 0, 2063, 45, 67, 0, 97, 45, 45, 156, 45, 45, 45, 45, 45, 45, 45, 45, 45, 192, 45, 45, 45, 45, 1673, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 429, 45, 45, 45, 45, 67, 67, 67, 269, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 349, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 374, 45, 45, 67, 67, 213, 217, 67, 67, 67, 67, 67, 242, 67, 247, 67, 253, 45, 45, 698, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 399, 45, 45, 0, 0, 0, 0, 925, 41606, 0, 929, 0, 0, 45, 45, 45, 45, 45, 45, 1391, 45, 45, 1395, 45, 45, 45, 45, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 436, 45, 67, 67, 67, 67, 1041, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1776, 67, 67, 97, 97, 97, 1099, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 888, 97, 97, 97, 1131, 97, 97, 97, 97, 1135, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 97, 97, 883, 97, 97, 97, 97, 97, 97, 1310, 0, 0, 0, 1316, 0, 0, 0, 0, 1100, 0, 0, 0, 97, 97, 97, 97, 97, 1107, 97, 97, 97, 97, 97, 97, 97, 97, 1343, 97, 97, 97, 97, 97, 97, 1348, 0, 0, 1317, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1868, 67, 1870, 67, 67, 67, 67, 67, 1817, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 823, 67, 37689, 544, 67, 97, 1832, 97, 97, 1834, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 1732, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1177, 0, 0, 925, 0, 0, 0, 0, 97, 97, 97, 97, 0, 0, 1941, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1991, 1992, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1998, 134, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 941, 45, 45, 944, 45, 45, 45, 45, 45, 45, 952, 45, 45, 207, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 67, 67, 67, 37689, 544, 369, 650, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1682, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 835, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1725, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 1036, 67, 67, 67, 265, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 296, 97, 97, 97, 97, 314, 97, 97, 97, 97, 332, 334, 97, 97, 97, 97, 97, 1146, 1147, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 97, 97, 345, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 372, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 45, 45, 404, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 451, 452, 45, 45, 45, 67, 1683, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 67, 67, 490, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 1450, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 537, 538, 67, 67, 67, 67, 67, 506, 67, 67, 508, 67, 67, 511, 67, 67, 67, 67, 0, 1476, 0, 0, 0, 0, 0, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1484, 97, 97, 97, 97, 97, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1499, 97, 97, 97, 97, 97, 97, 97, 97, 97, 587, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 634, 635, 97, 97, 97, 97, 97, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 97, 97, 97, 369, 0, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 1001, 45, 45, 45, 45, 45, 45, 45, 45, 715, 45, 45, 45, 720, 45, 45, 45, 45, 45, 45, 45, 45, 728, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 97, 97, 97, 97, 840, 97, 97, 97, 97, 97, 1174, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 0, 0, 0, 0, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 97, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 680, 45, 968, 45, 970, 45, 973, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 962, 45, 45, 45, 45, 45, 979, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 688, 45, 45, 45, 45, 45, 45, 45, 1007, 1008, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 1044, 67, 1046, 67, 1049, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 808, 67, 67, 0, 0, 0, 1102, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 97, 97, 97, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 1138, 97, 1140, 97, 1143, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 45, 1191, 45, 45, 45, 45, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 991, 45, 67, 67, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1048, 67, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 97, 1386, 45, 1387, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 455, 45, 457, 45, 45, 1424, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1433, 67, 1434, 67, 67, 67, 67, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 1593, 67, 67, 45, 45, 1805, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1814, 45, 45, 1816, 67, 67, 67, 67, 1820, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1829, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 821, 67, 67, 67, 37689, 544, 67, 1831, 97, 97, 97, 97, 1835, 0, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1850, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 961, 45, 45, 45, 45, 965, 45, 967, 1907, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1920, 0, 1936, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 28672, 97, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2054, 97, 97, 291, 97, 97, 97, 97, 97, 97, 320, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 926, 1179, 0, 45, 377, 45, 45, 45, 381, 45, 45, 392, 45, 45, 396, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 45, 45, 45, 67, 67, 67, 67, 463, 67, 67, 67, 467, 67, 67, 478, 67, 67, 482, 67, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 1472, 67, 502, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1460, 67, 97, 97, 97, 97, 560, 97, 97, 97, 564, 97, 97, 575, 97, 97, 579, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 930, 97, 599, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 872, 97, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1758, 0, 362, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 934, 45, 45, 45, 164, 168, 174, 178, 45, 45, 45, 45, 45, 194, 45, 45, 45, 165, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 45, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1060, 67, 67, 67, 67, 67, 67, 1052, 1053, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1063, 97, 1157, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1167, 97, 97, 97, 97, 97, 1379, 97, 97, 97, 0, 0, 0, 45, 1383, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 1812, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1471, 67, 45, 1402, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 67, 1462, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 97, 1517, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 1636, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 1705, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1842, 0, 0, 1779, 97, 97, 97, 1782, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1789, 97, 97, 0, 0, 0, 97, 1847, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 45, 737, 738, 67, 740, 67, 741, 67, 743, 67, 67, 67, 67, 67, 67, 1968, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 45, 67, 0, 97, 45, 67, 2062, 97, 45, 67, 0, 97, 45, 67, 67, 97, 97, 2001, 97, 0, 0, 2004, 97, 97, 0, 97, 97, 97, 97, 1797, 97, 97, 97, 97, 97, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 292, 97, 97, 97, 97, 311, 315, 321, 325, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1330, 97, 97, 1333, 1334, 97, 341, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 363, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 416, 45, 376, 45, 45, 45, 45, 382, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 45, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 414, 45, 45, 45, 418, 67, 67, 67, 462, 67, 67, 67, 67, 468, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 1604, 67, 67, 67, 67, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 1067, 67, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 274, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 504, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 517, 519, 541, 67, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 554, 97, 97, 97, 559, 97, 97, 97, 97, 565, 97, 97, 97, 97, 97, 97, 97, 1718, 0, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 906, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 597, 97, 97, 97, 97, 97, 1520, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 1656, 45, 45, 45, 97, 97, 601, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 614, 616, 638, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 661, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1815, 45, 67, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 678, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 977, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 697, 67, 67, 748, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1274, 67, 67, 67, 67, 67, 67, 67, 67, 765, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 67, 780, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1777, 67, 97, 97, 97, 97, 97, 97, 846, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 97, 1742, 45, 45, 45, 45, 45, 45, 45, 1747, 97, 97, 97, 863, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 1178, 925, 0, 1179, 0, 97, 97, 97, 878, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 954, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 963, 45, 45, 966, 45, 45, 157, 45, 45, 171, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 1022, 67, 67, 1026, 67, 67, 67, 1030, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 1605, 67, 67, 67, 1608, 67, 67, 67, 1039, 67, 67, 1042, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 67, 0, 1100, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 97, 97, 97, 97, 1116, 97, 97, 1120, 97, 97, 97, 1124, 97, 97, 97, 97, 97, 97, 562, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1133, 97, 97, 1136, 97, 97, 97, 97, 97, 97, 97, 97, 915, 917, 97, 97, 97, 97, 97, 0, 97, 1170, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 0, 0, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1993, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 1278, 67, 0, 0, 0, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1189, 1204, 45, 45, 45, 1207, 45, 45, 1209, 45, 1210, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 45, 689, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 805, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1249, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1300, 0, 0, 0, 0, 0, 1267, 67, 67, 1269, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 97, 1349, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 97, 0, 1980, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 677, 45, 45, 45, 45, 1401, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 953, 67, 1437, 67, 1440, 67, 67, 67, 67, 1445, 67, 67, 67, 1448, 67, 67, 67, 67, 67, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 67, 67, 67, 1473, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1320, 0, 834, 97, 97, 97, 97, 1490, 97, 1493, 97, 97, 97, 97, 1498, 97, 97, 97, 1501, 97, 97, 97, 0, 97, 1638, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 916, 97, 97, 97, 97, 97, 97, 0, 1528, 97, 97, 97, 0, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1932, 0, 0, 1555, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1567, 45, 45, 158, 45, 45, 172, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 45, 67, 212, 67, 67, 67, 67, 231, 235, 241, 245, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 472, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1651, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 45, 45, 67, 1704, 67, 1706, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1841, 97, 0, 1844, 97, 97, 97, 97, 1716, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1385, 1748, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1757, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 97, 97, 1780, 97, 97, 97, 0, 0, 1786, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1730, 0, 97, 97, 97, 97, 97, 1736, 97, 1738, 67, 97, 97, 97, 97, 97, 97, 0, 1838, 97, 97, 97, 97, 97, 0, 0, 97, 1729, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 1165, 97, 97, 97, 45, 1950, 45, 45, 45, 45, 45, 45, 45, 45, 1958, 67, 67, 67, 1962, 67, 67, 67, 67, 67, 1246, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1710, 97, 97, 97, 1999, 67, 97, 97, 97, 97, 0, 2003, 97, 97, 97, 0, 97, 97, 2008, 2009, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 2052, 67, 2053, 0, 0, 0, 0, 925, 41606, 0, 0, 930, 0, 45, 45, 45, 45, 45, 45, 1392, 45, 1394, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 1565, 45, 45, 45, 1568, 0, 97, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 28672, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 679, 45, 45, 67, 67, 266, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 346, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 362, 0, 364, 0, 367, 41098, 369, 140, 371, 45, 45, 45, 379, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 449, 45, 45, 45, 45, 45, 67, 67, 542, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 97, 0, 1794, 1795, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 97, 639, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 45, 731, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 251, 67, 67, 67, 67, 67, 798, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1073, 67, 67, 67, 860, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 873, 0, 0, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 921, 97, 0, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1250, 67, 67, 1253, 0, 0, 1312, 0, 0, 0, 1318, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 97, 1155, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1141, 97, 97, 67, 67, 1439, 67, 1441, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 67, 97, 97, 1492, 97, 1494, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 97, 67, 67, 67, 2037, 67, 97, 0, 0, 97, 97, 97, 2043, 97, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 232, 67, 67, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1975, 0, 0, 97, 874, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1142, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 65, 86, 117, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 63, 84, 115, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 61, 82, 113, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 59, 80, 111, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 57, 78, 109, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 55, 76, 107, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 53, 74, 105, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 51, 72, 103, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 49, 70, 101, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 47, 68, 99, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 45, 67, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 213085, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 0, 0, 44, 0, 0, 32863, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 41, 41, 41, 0, 0, 1138688, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 89, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 127, 127, 127, 127, 102432, 67, 262, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 342, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 360, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 45, 45, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1292, 67, 67, 1294, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 1615, 97, 97, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 66, 87, 118, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 64, 85, 116, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 62, 83, 114, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 60, 81, 112, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 58, 79, 110, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 56, 77, 108, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 54, 75, 106, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 52, 73, 104, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 50, 71, 102, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 48, 69, 100, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 46, 67, 98, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 233472, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 69724, 53264, 18, 18, 49172, 0, 57366, 262144, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 45, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 28, 139621, 359, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 1389, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 45, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1449, 67, 67, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1154, 97, 0, 0, 0, 0, 925, 41606, 927, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 67, 67, 45, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 951, 45, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 45, 0, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1488, 67, 67, 267, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 347, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 361, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 734, 45, 45, 45, 67, 67, 67, 67, 67, 742, 67, 67, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1214, 45, 45, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1361, 97, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 45, 45, 0, 0, 0, 0, 2220032, 0, 0, 1130496, 0, 0, 0, 0, 2170880, 2171020, 2170880, 2170880, 18, 0, 0, 131072, 0, 0, 0, 90112, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 1485, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45, 45, 1390, 45, 1393, 45, 45, 45, 45, 1398, 45, 45, 45, 2170880, 2171167, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2576384, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 0, 0, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2721252, 2744320, 2170880, 2170880, 2170880, 2834432, 2840040, 2170880, 2908160, 2170880, 2170880, 2936832, 2170880, 2170880, 2985984, 2170880, 2994176, 2170880, 2170880, 3014656, 2170880, 3059712, 3076096, 3088384, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 0, 2220032, 0, 0, 0, 1142784, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3215360, 2215936, 2215936, 2215936, 2215936, 2215936, 2437120, 2215936, 2215936, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 543, 0, 545, 0, 0, 2183168, 0, 0, 831, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 3031040, 2170880, 3055616, 2170880, 2170880, 2170880, 2170880, 3092480, 2170880, 2170880, 3125248, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 0, 0, 0, 0, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 0, 0, 0, 65820, 65820, 0, 287, 97, 97, 97, 97, 97, 1783, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1791, 0, 0, 546, 70179, 0, 0, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 97, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 0, 0, 147456, 0, 0, 0, 0, 925, 41606, 0, 928, 0, 0, 45, 45, 45, 45, 45, 45, 998, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 1564, 45, 45, 45, 45, 0, 2158592, 2158592, 0, 0, 0, 0, 2232320, 2232320, 2232320, 0, 2240512, 2240512, 2240512, 2240512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2416640
];
JSONiqTokenizer.EXPECTED =
-[ 290, 300, 304, 353, 296, 309, 305, 319, 315, 324, 328, 352, 354, 334, 338, 330, 320, 345, 349, 293, 358, 362, 341, 366, 312, 370, 374, 378, 382, 386, 390, 394, 398, 737, 402, 634, 439, 604, 634, 634, 634, 634, 408, 634, 634, 634, 404, 634, 634, 634, 457, 634, 634, 963, 634, 634, 413, 634, 634, 634, 634, 634, 634, 634, 663, 418, 422, 903, 902, 426, 431, 548, 634, 437, 521, 919, 443, 615, 409, 449, 455, 624, 731, 751, 634, 461, 465, 672, 470, 469, 474, 481, 485, 477, 489, 493, 629, 542, 497, 505, 603, 602, 991, 648, 510, 804, 634, 515, 958, 526, 525, 530, 768, 634, 546, 552, 711, 710, 593, 558, 562, 618, 566, 570, 574, 578, 582, 586, 590, 608, 612, 660, 822, 821, 634, 622, 596, 444, 628, 533, 724, 633, 640, 653, 647, 652, 536, 1008, 451, 450, 445, 657, 670, 676, 685, 689, 693, 697, 701, 704, 707, 715, 719, 798, 815, 634, 723, 762, 996, 634, 728, 969, 730, 735, 908, 634, 741, 679, 889, 511, 747, 634, 750, 755, 499, 666, 499, 501, 759, 772, 776, 780, 634, 787, 784, 797, 802, 809, 808, 427, 814, 1006, 517, 634, 519, 853, 634, 813, 850, 793, 634, 819, 826, 833, 832, 837, 843, 847, 857, 861, 863, 867, 871, 875, 879, 883, 643, 887, 539, 980, 979, 634, 893, 944, 634, 900, 896, 634, 907, 933, 506, 912, 917, 828, 433, 636, 635, 554, 961, 923, 930, 927, 937, 941, 634, 634, 634, 974, 948, 952, 985, 913, 968, 967, 743, 634, 973, 839, 634, 978, 599, 634, 984, 989, 765, 444, 995, 1000, 634, 1003, 790, 955, 1012, 681, 634, 634, 634, 634, 634, 414, 1016, 1020, 1024, 1085, 1027, 1090, 1090, 1046, 1080, 1137, 1108, 1215, 1049, 1032, 1039, 1085, 1085, 1085, 1085, 1058, 1062, 1068, 1085, 1086, 1090, 1090, 1091, 1072, 1064, 1107, 1090, 1090, 1090, 1118, 1123, 1138, 1078, 1074, 1084, 1085, 1085, 1085, 1087, 1090, 1062, 1052, 1060, 1114, 1062, 1104, 1085, 1085, 1090, 1090, 1028, 1122, 1063, 1128, 1139, 1127, 1158, 1085, 1085, 1151, 1090, 1090, 1090, 1095, 1090, 1132, 1073, 1136, 1143, 1061, 1150, 1085, 1155, 1098, 1101, 1146, 1162, 1169, 1101, 1185, 1151, 1090, 1110, 1173, 1054, 1087, 1109, 1177, 1165, 1089, 1204, 1184, 1107, 1189, 1193, 1088, 1197, 1180, 1201, 1208, 1042, 1212, 1219, 1223, 1227, 1231, 1235, 1245, 1777, 1527, 1686, 1686, 1238, 1686, 1254, 1686, 1686, 1686, 1294, 1669, 1686, 1686, 1686, 1322, 1625, 1534, 1268, 1624, 1275, 1281, 1443, 1292, 1300, 1686, 1686, 1686, 1350, 1826, 1306, 1686, 1686, 1240, 2032, 1317, 1321, 1686, 1686, 1253, 1686, 1326, 1686, 1686, 1686, 1418, 1709, 1446, 1686, 1686, 1686, 1492, 1686, 1295, 1447, 1686, 1686, 1258, 1686, 1736, 1686, 1686, 1520, 1355, 1686, 1288, 1348, 1361, 1686, 1359, 1686, 1364, 1498, 1368, 1302, 1362, 1381, 1389, 1395, 1486, 1686, 1371, 1377, 1370, 1686, 1375, 1382, 1384, 1402, 1408, 1385, 1383, 1619, 1413, 1423, 1428, 1433, 1686, 1686, 1270, 1686, 1338, 1686, 1440, 1686, 1686, 1686, 1499, 1465, 1686, 1686, 1686, 1639, 1473, 1884, 1686, 1686, 1293, 1864, 1686, 1686, 1296, 1321, 1483, 1686, 1686, 1686, 1646, 1686, 1748, 1496, 1686, 1418, 1675, 1686, 1418, 1702, 1686, 1418, 1981, 1686, 1429, 1409, 1427, 1504, 1692, 1686, 1686, 1313, 1448, 1651, 1508, 1686, 1686, 1340, 1686, 1903, 1686, 1686, 1435, 1513, 1686, 1283, 1287, 1519, 1686, 1524, 1363, 1568, 1938, 1539, 1566, 1579, 1479, 1533, 1538, 1553, 1544, 1552, 1557, 1563, 1574, 1557, 1583, 1589, 1590, 1759, 1594, 1603, 1607, 1611, 1686, 1436, 1514, 1686, 1434, 1656, 1686, 1434, 1680, 1686, 1453, 1686, 1686, 1686, 1559, 1617, 1686, 1770, 1418, 1623, 1769, 1629, 1686, 1515, 1335, 1686, 1285, 1686, 1671, 1921, 1650, 1686, 1686, 1344, 1308, 1666, 1686, 1686, 1686, 1659, 1685, 1686, 1686, 1686, 1686, 1241, 1686, 1686, 1844, 1691, 1686, 1630, 1977, 1970, 1362, 1686, 1686, 1686, 1693, 1698, 1686, 1686, 1686, 1697, 1686, 1764, 1715, 1686, 1634, 1638, 1686, 1599, 1585, 1686, 1271, 1686, 1269, 1686, 1721, 1686, 1686, 1354, 1686, 1801, 1686, 1799, 1686, 1640, 1686, 1686, 1461, 1686, 1686, 1732, 1686, 1944, 1686, 1740, 1686, 1746, 1415, 1396, 1686, 1598, 1547, 1417, 1597, 1416, 1577, 1546, 1397, 1577, 1547, 1548, 1570, 1398, 1753, 1686, 1652, 1509, 1686, 1686, 1686, 1757, 1686, 1419, 1686, 1763, 1418, 1768, 1781, 1686, 1686, 1686, 1705, 1686, 2048, 1792, 1686, 1686, 1686, 1735, 1686, 1797, 1686, 1686, 1404, 1686, 1639, 1815, 1686, 1686, 1418, 2017, 1820, 1686, 1686, 1803, 1686, 1686, 1686, 1736, 1489, 1686, 1686, 1825, 1338, 1260, 1263, 1686, 1686, 1785, 1686, 1686, 1728, 1686, 1686, 1749, 1497, 1830, 1830, 1262, 1248, 1261, 1329, 1260, 1264, 1329, 1248, 1249, 1259, 1540, 1849, 1842, 1686, 1686, 1835, 1686, 1686, 1816, 1686, 1686, 1831, 1882, 1848, 1686, 1686, 1686, 1774, 2071, 1854, 1686, 1686, 1469, 1884, 1686, 1821, 1859, 1686, 1686, 1350, 1883, 1686, 1686, 1686, 1781, 1391, 1875, 1686, 1686, 1613, 1644, 1686, 1686, 1889, 1686, 1686, 1662, 1884, 1686, 1885, 1890, 1686, 1686, 1686, 1894, 1686, 1686, 1678, 1686, 1907, 1686, 1686, 1529, 1914, 1686, 1838, 1686, 1686, 1881, 1686, 1686, 1872, 1876, 1836, 1919, 1686, 1837, 1692, 1910, 1686, 1925, 1928, 1742, 1686, 1811, 1811, 1930, 1810, 1929, 1935, 1928, 1900, 1942, 1867, 1868, 1931, 1035, 1788, 1948, 1952, 1956, 1960, 1964, 1686, 1976, 1686, 1686, 1686, 2065, 1686, 1992, 2037, 1686, 1686, 1998, 2009, 1972, 2002, 1686, 1686, 1686, 2077, 1300, 2023, 1686, 1686, 1686, 1807, 2031, 1686, 1686, 1686, 1860, 1500, 2032, 1686, 1686, 1686, 2083, 1686, 2036, 1686, 1277, 1276, 2042, 1877, 1686, 1686, 2041, 1686, 1686, 2027, 2037, 2012, 1686, 2012, 1855, 1850, 1686, 2046, 1686, 1686, 2054, 1996, 1686, 1897, 1309, 2059, 2052, 1686, 2058, 1686, 1686, 2081, 1686, 1717, 1477, 1686, 1331, 1686, 1686, 1687, 1686, 1860, 1681, 1686, 1686, 1686, 1966, 1724, 1686, 1686, 1686, 1984, 2015, 1686, 1686, 1686, 1988, 1686, 2063, 1686, 1686, 1686, 2005, 1686, 1727, 1686, 1686, 1711, 1457, 2069, 1686, 1686, 1686, 2019, 2075, 1686, 1686, 1915, 1686, 1686, 1793, 1874, 1686, 1686, 1491, 1362, 1449, 1686, 1686, 1460, 2098, 2087, 2091, 2095, 2184, 2102, 2113, 2780, 2117, 2134, 2142, 2281, 2146, 2146, 2146, 2304, 2296, 2181, 2639, 2591, 2872, 2592, 2873, 2313, 2195, 2200, 2281, 2146, 2273, 2226, 2204, 2152, 2219, 2276, 2167, 2177, 2276, 2235, 2276, 2276, 2230, 2281, 2276, 2296, 2276, 2293, 2276, 2276, 2276, 2276, 2234, 2276, 2311, 2314, 2210, 2199, 2217, 2222, 2276, 2276, 2276, 2240, 2276, 2294, 2276, 2276, 2173, 2276, 2198, 2281, 2281, 2281, 2281, 2282, 2146, 2146, 2146, 2146, 2205, 2146, 2204, 2248, 2276, 2235, 2276, 2297, 2276, 2276, 2276, 2277, 2256, 2281, 2283, 2146, 2146, 2146, 2275, 2276, 2295, 2276, 2276, 2293, 2146, 2304, 2264, 2269, 2221, 2276, 2276, 2276, 2293, 2295, 2276, 2276, 2276, 2295, 2263, 2205, 2268, 2220, 2172, 2276, 2276, 2276, 2296, 2276, 2276, 2296, 2294, 2276, 2276, 2278, 2281, 2281, 2280, 2281, 2281, 2281, 2283, 2206, 2223, 2276, 2276, 2279, 2281, 2281, 2146, 2273, 2276, 2276, 2281, 2281, 2281, 2276, 2292, 2276, 2298, 2225, 2276, 2298, 2169, 2224, 2292, 2298, 2171, 2229, 2281, 2281, 2171, 2236, 2281, 2281, 2281, 2146, 2275, 2225, 2292, 2299, 2276, 2229, 2281, 2146, 2276, 2290, 2297, 2283, 2146, 2146, 2274, 2224, 2227, 2298, 2225, 2297, 2276, 2230, 2170, 2230, 2282, 2146, 2147, 2151, 2156, 2288, 2276, 2230, 2303, 2308, 2236, 2284, 2228, 2318, 2318, 2318, 2326, 2335, 2339, 2343, 2349, 2416, 2693, 2357, 2592, 2109, 2592, 2592, 2162, 2943, 2823, 2646, 2592, 2361, 2592, 2122, 2592, 2592, 2122, 2470, 2592, 2592, 2592, 2109, 2107, 2592, 2592, 2592, 2123, 2592, 2592, 2592, 2125, 2592, 2413, 2592, 2592, 2592, 2127, 2592, 2592, 2414, 2592, 2592, 2592, 2130, 2952, 2592, 2594, 2592, 2592, 2212, 2609, 2252, 2592, 2592, 2592, 2446, 2434, 2592, 2592, 2592, 2212, 2446, 2450, 2456, 2431, 2435, 2592, 2592, 2243, 2478, 2448, 2439, 2946, 2592, 2592, 2592, 2368, 2809, 2813, 2450, 2441, 2212, 2812, 2449, 2440, 2947, 2592, 2592, 2592, 2345, 2451, 2457, 2948, 2592, 2124, 2592, 2592, 2650, 2823, 2449, 2455, 2946, 2592, 2128, 2592, 2592, 2649, 2952, 2592, 2810, 2448, 2461, 2991, 2467, 2592, 2592, 2329, 2817, 2474, 2990, 2466, 2592, 2592, 2373, 2447, 2992, 2469, 2592, 2592, 2592, 2373, 2447, 2477, 2468, 2592, 2592, 2353, 2469, 2592, 2495, 2592, 2592, 2415, 2483, 2592, 2415, 2496, 2592, 2592, 2352, 2592, 2592, 2352, 2352, 2469, 2592, 2592, 2363, 2331, 2494, 2592, 2592, 2592, 2375, 2592, 2375, 2415, 2504, 2592, 2592, 2367, 2372, 2503, 2592, 2592, 2592, 2389, 2418, 2415, 2592, 2592, 2373, 2592, 2592, 2592, 2593, 2732, 2417, 2415, 2592, 2417, 2520, 2592, 2592, 2592, 2390, 2521, 2521, 2592, 2592, 2592, 2401, 2599, 2585, 2526, 2531, 2120, 2592, 2212, 2426, 2450, 2463, 2948, 2592, 2592, 2592, 2213, 2389, 2527, 2532, 2121, 2542, 2551, 2105, 2592, 2213, 2592, 2592, 2592, 2558, 2538, 2544, 2553, 2557, 2537, 2543, 2552, 2421, 2572, 2576, 2546, 2543, 2547, 2592, 2592, 2373, 2615, 2575, 2545, 2105, 2592, 2244, 2479, 2592, 2129, 2592, 2592, 2628, 2690, 2469, 2562, 2566, 2592, 2592, 2592, 2415, 2928, 2934, 2401, 2570, 2574, 2564, 2572, 2585, 2590, 2592, 2592, 2585, 2965, 2592, 2592, 2592, 2445, 2251, 2592, 2592, 2592, 2474, 2592, 2609, 2892, 2592, 2362, 2592, 2592, 2138, 2851, 2159, 2592, 2592, 2592, 2509, 2888, 2892, 2592, 2592, 2592, 2490, 2418, 2891, 2592, 2592, 2376, 2592, 2592, 2374, 2592, 2889, 2388, 2592, 2373, 2373, 2890, 2592, 2592, 2387, 2592, 2887, 2505, 2892, 2592, 2373, 2610, 2388, 2592, 2592, 2376, 2373, 2592, 2887, 2891, 2592, 2374, 2592, 2592, 2608, 2159, 2614, 2620, 2592, 2592, 2394, 2594, 2887, 2399, 2592, 2887, 2397, 2508, 2374, 2507, 2592, 2375, 2592, 2592, 2592, 2595, 2508, 2506, 2592, 2506, 2505, 2505, 2592, 2507, 2637, 2505, 2592, 2592, 2401, 2661, 2592, 2643, 2592, 2592, 2417, 2592, 2655, 2592, 2592, 2592, 2510, 2414, 2656, 2592, 2592, 2592, 2516, 2592, 2593, 2660, 2665, 2880, 2592, 2592, 2592, 2522, 2767, 2666, 2881, 2592, 2592, 2420, 2571, 2696, 2592, 2592, 2592, 2580, 2572, 2686, 2632, 2698, 2592, 2383, 2514, 2592, 2163, 2932, 2465, 2685, 2631, 2697, 2592, 2388, 2592, 2592, 2212, 2604, 2671, 2632, 2678, 2592, 2401, 2405, 2409, 2592, 2592, 2592, 2679, 2592, 2592, 2592, 2592, 2108, 2677, 2591, 2592, 2592, 2592, 2419, 2592, 2683, 2187, 2191, 2469, 2671, 2189, 2467, 2592, 2401, 2629, 2633, 2702, 2468, 2592, 2592, 2421, 2536, 2703, 2469, 2592, 2592, 2422, 2573, 2593, 2672, 2467, 2592, 2402, 2406, 2592, 2402, 2979, 2592, 2592, 2626, 2673, 2467, 2592, 2446, 2259, 2947, 2592, 2377, 2709, 2592, 2592, 2522, 2862, 2713, 2468, 2592, 2592, 2581, 2572, 2562, 2374, 2374, 2592, 2376, 2721, 2724, 2592, 2592, 2624, 2373, 2731, 2592, 2592, 2592, 2626, 2732, 2592, 2592, 2592, 2755, 2656, 2726, 2736, 2741, 2592, 2486, 2593, 2381, 2592, 2727, 2737, 2742, 2715, 2747, 2753, 2592, 2498, 2469, 2873, 2743, 2592, 2592, 2592, 2791, 2759, 2763, 2592, 2592, 2627, 2704, 2592, 2592, 2522, 2789, 2593, 2761, 2753, 2592, 2498, 2863, 2592, 2592, 2767, 2592, 2592, 2592, 2792, 2789, 2592, 2592, 2592, 2803, 2126, 2592, 2592, 2592, 2811, 2122, 2592, 2592, 2592, 2834, 2777, 2592, 2592, 2592, 2848, 2936, 2591, 2489, 2797, 2592, 2592, 2670, 2631, 2490, 2798, 2592, 2592, 2592, 2963, 2807, 2592, 2592, 2592, 2965, 2838, 2592, 2592, 2592, 2975, 2330, 2818, 2829, 2592, 2498, 2939, 2592, 2498, 2592, 2791, 2331, 2819, 2830, 2592, 2592, 2592, 2982, 2834, 2817, 2828, 2106, 2592, 2592, 2592, 2405, 2405, 2817, 2828, 2592, 2592, 2415, 2849, 2842, 2592, 2522, 2773, 2592, 2522, 2868, 2592, 2580, 2600, 2586, 2137, 2850, 2843, 2592, 2592, 2855, 2937, 2844, 2592, 2592, 2592, 2987, 2936, 2591, 2592, 2592, 2684, 2630, 2592, 2856, 2938, 2592, 2592, 2860, 2939, 2592, 2592, 2872, 2592, 2861, 2591, 2592, 2592, 2887, 2616, 2592, 2867, 2592, 2592, 2708, 2592, 2498, 2469, 2498, 2497, 2785, 2773, 2499, 2783, 2770, 2877, 2877, 2877, 2772, 2592, 2592, 2345, 2885, 2592, 2592, 2592, 2715, 2762, 2515, 2896, 2592, 2592, 2715, 2917, 2516, 2897, 2592, 2592, 2592, 2901, 2906, 2911, 2592, 2592, 2956, 2960, 2715, 2902, 2907, 2912, 2593, 2916, 2920, 2820, 2922, 2822, 2592, 2592, 2715, 2927, 2921, 2821, 2106, 2592, 2592, 2974, 2408, 2321, 2821, 2106, 2592, 2592, 2983, 2592, 2593, 2404, 2408, 2592, 2592, 2717, 2749, 2716, 2928, 2322, 2822, 2593, 2926, 2919, 2820, 2934, 2823, 2592, 2592, 2592, 2651, 2824, 2592, 2592, 2592, 2130, 2952, 2592, 2592, 2592, 2592, 2964, 2592, 2592, 2716, 2748, 2592, 2969, 2592, 2592, 2716, 2918, 2368, 2970, 2592, 2592, 2592, 2403, 2407, 2592, 2592, 2787, 2211, 2404, 2409, 2592, 2592, 2802, 2837, 2987, 2592, 2592, 2592, 2809, 2427, 2592, 2793, 2592, 2592, 2809, 2447, 1073741824, 0x80000000, 539754496, 542375936, 402653184, 554434560, 571736064, 545521856, 268451840, 335544320, 268693630, 512, 2048, 256, 1024, 0, 1024, 0, 1073741824, 0x80000000, 0, 0, 0, 8388608, 0, 0, 1073741824, 1073741824, 0, 0x80000000, 537133056, 4194304, 1048576, 268435456, -1073741824, 0, 0, 0, 1048576, 0, 0, 0, 1572864, 0, 0, 0, 4194304, 0, 134217728, 16777216, 0, 0, 32, 64, 98304, 0, 33554432, 8388608, 192, 67108864, 67108864, 67108864, 67108864, 16, 32, 4, 0, 8192, 196608, 196608, 229376, 80, 4096, 524288, 8388608, 0, 0, 32, 128, 256, 24576, 24600, 24576, 24576, 2, 24576, 24576, 24576, 24584, 24592, 24576, 24578, 24576, 24578, 24576, 24576, 16, 512, 2048, 2048, 256, 4096, 32768, 1048576, 4194304, 67108864, 134217728, 268435456, 262144, 134217728, 0, 128, 128, 64, 16384, 16384, 16384, 67108864, 32, 32, 4, 4, 4096, 262144, 134217728, 0, 0, 0, 2, 0, 8192, 131072, 131072, 4096, 4096, 4096, 4096, 24576, 24576, 24576, 8, 8, 24576, 24576, 16384, 16384, 16384, 24576, 24584, 24576, 24576, 24576, 16384, 24576, 536870912, 262144, 0, 0, 32, 2048, 8192, 4, 4096, 4096, 4096, 786432, 8388608, 16777216, 0, 128, 16384, 16384, 16384, 32768, 65536, 2097152, 32, 32, 32, 32, 4, 4, 4, 4, 4, 4096, 67108864, 67108864, 67108864, 24576, 24576, 24576, 24576, 0, 16384, 16384, 16384, 16384, 67108864, 67108864, 8, 67108864, 24576, 8, 8, 8, 24576, 24576, 24576, 24578, 24576, 24576, 24576, 2, 2, 2, 16384, 67108864, 67108864, 67108864, 32, 67108864, 8, 8, 24576, 2048, 0x80000000, 536870912, 262144, 262144, 262144, 67108864, 8, 24576, 16384, 32768, 1048576, 4194304, 25165824, 67108864, 24576, 32770, 2, 4, 112, 512, 98304, 524288, 50, 402653186, 1049090, 1049091, 10, 66, 100925514, 10, 66, 12582914, 0, 0, -1678194207, -1678194207, -1041543218, 0, 32768, 0, 0, 32, 65536, 268435456, 1, 1, 513, 1048577, 0, 12582912, 0, 0, 0, 4, 1792, 0, 0, 0, 7, 29360128, 0, 0, 0, 8, 0, 0, 0, 12, 1, 1, 0, 0, -604102721, -604102721, 4194304, 8388608, 0, 0, 0, 31, 925600, 997981306, 997981306, 997981306, 0, 0, 2048, 8388608, 0, 0, 1, 2, 4, 32, 64, 512, 8192, 0, 0, 0, 245760, 997720064, 0, 0, 0, 32, 0, 0, 0, 3, 12, 16, 32, 8, 112, 3072, 12288, 16384, 32768, 65536, 131072, 7864320, 16777216, 973078528, 0, 0, 65536, 131072, 3670016, 4194304, 16777216, 33554432, 2, 8, 48, 2048, 8192, 16384, 32768, 65536, 131072, 524288, 131072, 524288, 3145728, 4194304, 16777216, 33554432, 65536, 131072, 2097152, 4194304, 16777216, 33554432, 134217728, 268435456, 536870912, 0, 0, 0, 1024, 0, 8, 48, 2048, 8192, 65536, 33554432, 268435456, 536870912, 65536, 268435456, 536870912, 0, 0, 32768, 0, 0, 126, 623104, 65011712, 0, 32, 65536, 536870912, 0, 0, 65536, 524288, 0, 32, 65536, 0, 0, 0, 2048, 0, 0, 0, 15482, 245760, -604102721, 0, 0, 0, 18913, 33062912, 925600, -605028352, 0, 0, 0, 65536, 31, 8096, 131072, 786432, 3145728, 3145728, 12582912, 50331648, 134217728, 268435456, 160, 256, 512, 7168, 131072, 786432, 131072, 786432, 1048576, 2097152, 12582912, 16777216, 268435456, 1073741824, 0x80000000, 12582912, 16777216, 33554432, 268435456, 1073741824, 0x80000000, 3, 12, 16, 160, 256, 7168, 786432, 1048576, 12582912, 16777216, 268435456, 1073741824, 0, 8, 16, 32, 128, 256, 512, 7168, 786432, 1048576, 2097152, 0, 1, 2, 8, 16, 7168, 786432, 1048576, 8388608, 16777216, 16777216, 1073741824, 0, 0, 0, 0, 1, 0, 0, 8, 32, 128, 256, 7168, 8, 32, 0, 3072, 0, 8, 32, 3072, 4096, 524288, 8, 32, 0, 0, 3072, 4096, 0, 2048, 524288, 8388608, 8, 2048, 0, 0, 1, 12, 256, 4096, 32768, 262144, 1048576, 4194304, 67108864, 0, 2048, 0, 2048, 2048, 1073741824, -58805985, -58805985, -58805985, 0, 0, 262144, 0, 0, 32, 4194304, 16777216, 134217728, 4382, 172032, -58982400, 0, 0, 2, 28, 256, 4096, 8192, 8192, 32768, 131072, 262144, 524288, 1, 2, 12, 256, 4096, 0, 0, 4194304, 67108864, 134217728, 805306368, 1073741824, 0, 0, 1, 2, 12, 16, 256, 4096, 1048576, 67108864, 134217728, 268435456, 0, 512, 1048576, 4194304, 201326592, 1879048192, 0, 0, 12, 256, 4096, 134217728, 268435456, 536870912, 12, 256, 268435456, 536870912, 0, 12, 256, 0, 0, 1, 32, 64, 512, 0, 0, 205236961, 205236961, 0, 0, 0, 1, 96, 640, 1, 10976, 229376, 204996608, 0, 640, 2048, 8192, 229376, 1572864, 1572864, 2097152, 201326592, 0, 0, 0, 64, 512, 2048, 229376, 1572864, 201326592, 1572864, 201326592, 0, 0, 1, 4382, 0, 1, 32, 2048, 65536, 131072, 1572864, 201326592, 131072, 1572864, 134217728, 0, 0, 524288, 524288, 0, 0, 0, -68582786, -68582786, -68582786, 0, 0, 2097152, 524288, 0, 524288, 0, 0, 65536, 131072, 1572864, 0, 0, 2, 4, 0, 0, 65011712, -134217728, 0, 0, 0, 0, 2, 4, 120, 512, -268435456, 0, 0, 0, 2, 8, 48, 64, 2048, 8192, 98304, 524288, 2097152, 4194304, 25165824, 33554432, 134217728, 268435456, 0x80000000, 0, 0, 25165824, 33554432, 134217728, 1879048192, 0x80000000, 0, 0, 4, 112, 512, 622592, 65011712, 134217728, -268435456, 16777216, 33554432, 134217728, 1610612736, 0, 0, 0, 64, 98304, 524288, 4194304, 16777216, 33554432, 0, 98304, 524288, 16777216, 33554432, 0, 65536, 524288, 33554432, 536870912, 1073741824, 0, 65536, 524288, 536870912, 1073741824, 0, 0, 65536, 524288, 536870912, 0, 524288, 0, 524288, 524288, 1048576, 2086666240, 0x80000000, 0, -1678194207, 0, 0, 0, 8, 32, 2048, 524288, 8388608, 0, 0, 33062912, 436207616, 0x80000000, 0, 0, 32, 64, 2432, 16384, 32768, 32768, 524288, 3145728, 4194304, 25165824, 25165824, 167772160, 268435456, 0x80000000, 0, 32, 64, 384, 2048, 16384, 32768, 1048576, 2097152, 4194304, 25165824, 32, 64, 128, 256, 2048, 16384, 2048, 16384, 1048576, 4194304, 16777216, 33554432, 134217728, 536870912, 1073741824, 0, 0, 2048, 16384, 4194304, 16777216, 33554432, 134217728, 805306368, 0, 0, 16777216, 134217728, 268435456, 0x80000000, 0, 622592, 622592, 622592, 8807, 8807, 434791, 0, 0, 16777216, 0, 0, 0, 7, 608, 8192, 0, 0, 0, 3, 4, 96, 512, 32, 64, 8192, 0, 0, 16777216, 134217728, 0, 0, 2, 4, 8192, 16384, 65536, 2097152, 33554432, 268435456
+[ 291, 300, 304, 341, 315, 309, 305, 295, 319, 323, 327, 329, 296, 333, 337, 339, 342, 346, 350, 294, 356, 360, 312, 367, 352, 371, 363, 375, 379, 383, 387, 391, 395, 726, 399, 405, 518, 684, 405, 405, 405, 405, 808, 405, 405, 405, 512, 405, 405, 405, 431, 405, 405, 406, 405, 405, 404, 405, 405, 405, 405, 405, 405, 405, 908, 631, 410, 415, 405, 414, 419, 608, 405, 429, 602, 405, 435, 443, 405, 441, 641, 478, 405, 447, 451, 450, 456, 643, 461, 460, 762, 679, 465, 469, 741, 473, 477, 482, 486, 492, 932, 931, 523, 498, 504, 720, 405, 510, 596, 405, 516, 941, 580, 522, 929, 527, 590, 589, 897, 939, 534, 538, 547, 551, 555, 559, 563, 567, 571, 969, 575, 708, 690, 689, 579, 584, 634, 405, 594, 731, 405, 600, 882, 405, 606, 895, 786, 452, 612, 405, 615, 620, 876, 624, 628, 638, 647, 651, 655, 659, 663, 667, 676, 683, 688, 695, 694, 791, 405, 699, 437, 405, 706, 714, 405, 712, 825, 870, 405, 718, 724, 769, 768, 823, 730, 735, 745, 751, 422, 755, 759, 425, 766, 902, 810, 587, 775, 888, 887, 405, 773, 992, 405, 779, 962, 405, 785, 781, 986, 790, 795, 797, 506, 500, 499, 801, 805, 814, 820, 829, 833, 837, 841, 845, 849, 853, 857, 861, 616, 865, 869, 868, 488, 405, 874, 816, 405, 880, 738, 405, 886, 892, 543, 405, 901, 906, 913, 912, 918, 494, 541, 922, 926, 936, 945, 949, 953, 957, 530, 966, 973, 960, 702, 701, 405, 979, 981, 405, 985, 747, 405, 990, 998, 914, 405, 996, 1004, 672, 975, 974, 1014, 1002, 1008, 670, 1012, 405, 405, 405, 405, 405, 401, 1018, 1022, 1026, 1106, 1071, 1111, 1111, 1111, 1082, 1145, 1030, 1101, 1034, 1038, 1106, 1106, 1106, 1106, 1046, 1206, 1052, 1106, 1072, 1111, 1111, 1042, 1134, 1065, 1111, 1112, 1056, 1160, 1207, 1062, 1204, 1208, 1069, 1106, 1106, 1106, 1076, 1111, 1207, 1161, 1122, 1205, 1064, 1094, 1106, 1106, 1107, 1111, 1111, 1111, 1078, 1086, 1207, 1092, 1098, 1046, 1058, 1106, 1106, 1110, 1111, 1111, 1116, 1120, 1161, 1126, 1202, 1104, 1106, 1145, 1146, 1129, 1138, 1088, 1151, 1048, 1157, 1153, 1132, 1141, 1165, 1107, 1111, 1172, 1179, 1109, 1183, 1175, 1143, 1147, 1187, 1108, 1191, 1195, 1144, 1199, 1168, 1212, 1216, 1220, 1224, 1228, 1232, 1236, 1557, 1247, 1241, 1241, 1038, 1434, 1241, 1241, 1241, 1241, 1254, 1275, 1617, 1241, 1280, 1287, 1241, 1241, 1241, 1287, 1241, 2114, 1291, 1241, 1243, 1241, 2049, 1824, 2094, 2095, 1520, 1309, 1241, 1241, 1302, 1241, 1321, 1311, 1241, 1241, 1313, 1778, 1325, 1336, 1241, 1241, 1325, 1330, 1353, 1241, 1241, 1695, 1354, 1241, 1241, 1241, 1294, 1686, 1331, 1241, 1696, 1368, 1241, 1338, 1370, 1241, 1392, 1399, 1364, 2017, 1406, 2016, 1405, 1716, 1406, 1407, 1422, 1417, 1421, 1241, 1241, 1241, 1349, 1426, 1241, 1774, 1756, 1241, 1773, 1241, 1241, 1345, 1964, 1812, 1432, 1241, 1241, 1345, 1993, 1459, 1241, 1241, 1241, 1395, 1848, 1767, 1465, 1241, 1241, 1394, 1847, 1242, 1477, 1241, 1241, 1428, 1241, 1445, 1492, 1241, 1241, 1438, 1241, 1499, 1241, 1241, 1241, 1455, 1241, 1818, 1448, 1241, 1250, 1241, 2026, 1623, 1449, 1241, 1612, 1616, 1241, 1614, 1241, 1257, 1241, 1241, 1985, 1292, 1586, 1512, 1241, 1517, 2050, 1526, 1674, 1519, 1524, 1647, 2051, 1532, 1537, 1551, 1544, 1550, 1555, 1561, 1571, 1578, 1584, 1590, 1591, 1653, 1595, 1602, 1606, 1610, 1634, 1628, 1640, 1633, 1645, 1241, 1241, 1241, 1469, 1241, 1970, 1651, 1241, 1270, 1241, 1241, 1819, 1449, 1241, 1293, 1664, 1241, 1241, 1481, 1485, 1574, 1672, 1241, 1241, 1513, 1317, 1487, 1684, 1241, 1241, 1533, 1299, 1694, 1241, 1241, 1295, 1241, 1241, 1241, 1546, 1700, 1241, 1241, 1707, 1241, 1713, 1241, 1849, 1715, 1241, 1720, 1241, 1276, 1267, 1241, 1241, 2107, 1657, 1864, 1241, 1881, 1241, 1326, 1292, 1241, 1685, 1358, 1724, 1338, 1241, 1363, 1362, 1342, 1340, 1361, 1339, 1833, 1372, 1360, 1833, 1833, 1342, 1343, 1835, 1341, 1731, 1738, 1344, 1241, 1745, 1241, 1379, 1241, 1241, 2092, 1241, 1388, 1761, 1754, 1241, 1386, 1241, 1400, 1760, 1241, 1241, 1241, 1598, 1734, 1241, 1241, 1241, 1635, 1645, 1241, 1780, 1766, 1241, 1241, 1332, 1771, 1241, 1241, 1629, 2079, 1241, 1242, 1784, 1241, 1241, 1680, 1639, 2063, 1790, 1241, 1241, 1741, 1241, 1241, 1800, 1241, 1241, 1762, 1473, 1241, 1806, 1241, 1241, 1786, 1240, 1709, 1241, 1241, 1241, 1668, 1811, 1241, 1940, 1241, 1401, 1974, 1241, 1408, 1413, 1382, 1241, 1816, 1241, 1241, 1802, 2086, 1811, 1241, 1817, 1945, 1823, 2095, 2095, 2047, 2094, 2046, 2080, 1241, 1409, 1312, 1376, 2096, 2048, 1241, 1241, 1807, 1241, 1241, 1241, 2035, 1241, 1241, 1828, 1241, 2057, 2061, 1241, 1241, 1843, 1241, 2059, 1241, 1241, 1241, 1690, 1847, 1241, 1241, 1241, 1703, 2102, 1848, 1241, 1241, 1853, 1292, 1848, 1241, 2016, 1857, 1241, 2002, 1868, 1241, 1436, 1241, 1241, 1271, 1305, 1241, 1874, 1241, 1241, 1884, 2037, 1892, 1241, 1890, 1241, 1461, 1241, 1241, 1795, 1241, 1241, 1891, 1241, 1878, 1241, 1888, 1241, 1888, 1905, 1896, 2087, 1912, 1903, 1241, 1911, 1906, 1916, 1905, 2027, 1863, 1925, 2088, 1859, 1861, 1922, 1927, 1931, 1935, 1494, 1241, 1241, 1918, 1907, 1939, 1917, 1944, 1949, 1241, 1241, 1451, 1955, 1241, 1241, 1241, 1796, 1727, 2061, 1241, 1241, 1899, 1241, 1660, 1968, 1241, 1241, 1951, 1678, 1978, 1241, 1241, 1241, 1839, 1241, 1241, 1984, 1982, 1241, 1488, 1241, 1241, 1624, 1450, 1989, 1241, 1241, 1241, 1870, 1995, 1292, 1241, 1241, 1958, 1261, 1241, 1996, 1241, 1241, 1241, 2039, 2008, 1241, 1241, 1750, 2000, 1241, 1256, 2001, 1960, 1241, 1564, 1241, 1504, 1241, 1241, 1442, 1241, 1241, 1564, 1528, 1263, 1241, 1508, 1241, 1241, 1468, 1498, 2006, 1540, 2015, 1539, 2014, 1748, 2013, 1539, 1831, 2014, 2012, 1500, 1567, 2022, 2021, 1241, 1580, 1241, 1241, 2033, 2037, 1791, 2045, 2031, 1241, 1621, 1241, 1641, 2044, 1241, 1241, 1241, 2093, 1241, 1241, 2055, 1241, 1241, 2067, 1241, 1283, 1241, 1241, 1241, 2101, 2071, 1241, 1241, 1241, 2073, 1848, 2040, 1241, 1241, 1241, 2077, 1241, 1241, 2106, 1241, 1241, 2084, 1241, 2111, 1241, 1241, 1381, 1380, 1241, 1241, 1241, 2100, 1241, 2129, 2118, 2122, 2126, 2197, 2133, 3010, 2825, 2145, 2698, 2156, 2226, 2160, 2161, 2165, 2174, 2293, 2194, 2630, 2201, 2203, 2152, 3019, 2226, 2263, 2209, 2213, 2218, 2269, 2292, 2269, 2269, 2184, 2226, 2238, 2148, 2151, 3017, 2245, 2214, 2269, 2269, 2185, 2226, 2292, 2269, 2291, 2269, 2269, 2269, 2292, 2205, 3019, 2226, 2226, 2160, 2160, 2160, 2261, 2160, 2160, 2160, 2262, 2276, 2160, 2160, 2277, 2216, 2283, 2216, 2269, 2269, 2268, 2269, 2267, 2269, 2269, 2269, 2271, 2568, 2292, 2269, 2293, 2269, 2182, 2190, 2269, 2186, 2226, 2226, 2226, 2226, 2227, 2160, 2160, 2160, 2160, 2263, 2160, 2275, 2277, 2282, 2215, 2217, 2269, 2269, 2291, 2269, 2269, 2293, 2291, 2269, 2220, 2269, 2295, 2294, 2269, 2269, 2305, 2233, 2262, 2278, 2218, 2269, 2234, 2226, 2226, 2228, 2160, 2160, 2160, 2289, 2220, 2294, 2294, 2269, 2269, 2304, 2269, 2160, 2160, 2287, 2269, 2269, 2305, 2269, 2269, 2312, 2269, 2269, 2225, 2226, 2160, 2287, 2289, 2219, 2304, 2295, 2314, 2234, 2226, 2314, 2269, 2226, 2226, 2160, 2288, 2219, 2222, 2304, 2296, 2269, 2224, 2160, 2160, 2269, 2302, 2294, 2314, 2224, 2226, 2288, 2220, 2294, 2269, 2290, 2269, 2269, 2293, 2269, 2269, 2269, 2269, 2270, 2221, 2313, 2225, 2227, 2160, 2300, 2269, 2225, 2261, 2309, 2234, 2229, 2223, 2318, 2318, 2318, 2328, 2336, 2340, 2344, 2350, 2637, 2712, 2358, 2362, 2372, 2135, 2378, 2398, 2135, 2135, 2135, 2135, 2136, 2417, 2241, 2135, 2378, 2135, 2135, 2980, 2984, 2135, 3006, 2135, 2135, 2135, 2945, 2931, 2425, 2400, 2135, 2135, 2135, 2954, 2135, 2481, 2433, 2135, 2135, 2988, 2824, 2135, 2135, 2482, 2434, 2135, 2135, 2440, 2445, 2452, 2135, 2135, 2998, 3002, 2961, 2441, 2446, 2453, 2463, 2974, 2135, 2135, 2135, 2140, 2642, 2709, 2459, 2470, 2465, 2135, 2135, 3005, 2135, 2135, 2987, 2823, 2458, 2469, 2464, 2975, 2135, 2135, 2135, 2353, 2488, 2447, 2324, 2974, 2135, 2409, 2459, 2448, 2135, 2961, 2487, 2446, 2476, 2323, 2973, 2135, 2135, 2135, 2354, 2476, 2974, 2135, 2135, 2135, 2957, 2135, 2135, 2960, 2135, 2135, 2135, 2363, 2409, 2459, 2474, 2465, 2487, 2571, 2973, 2135, 2135, 2168, 2973, 2135, 2135, 2135, 2959, 2135, 2135, 2135, 2506, 2135, 2957, 2488, 2170, 2135, 2135, 2135, 2960, 2135, 2818, 2493, 2135, 2135, 3033, 2135, 2135, 2135, 2934, 2819, 2494, 2135, 2135, 2135, 2976, 2780, 2499, 2135, 2135, 2135, 3000, 2968, 2135, 2935, 2135, 2135, 2135, 2364, 2507, 2135, 2135, 2934, 2135, 2135, 2780, 2492, 2507, 2135, 2135, 2506, 2780, 2135, 2135, 2782, 2780, 2135, 2782, 2135, 2783, 2374, 2514, 2135, 2135, 2135, 3007, 2530, 2974, 2135, 2135, 2135, 3008, 2135, 2135, 2134, 2135, 2526, 2531, 2975, 2135, 2135, 3042, 2581, 2575, 2956, 2135, 2135, 2135, 2394, 2135, 2508, 2535, 2840, 2844, 2495, 2135, 2135, 2136, 2684, 2537, 2842, 2846, 2135, 2136, 2561, 2581, 2551, 2536, 2841, 2845, 2975, 3043, 2582, 2843, 2555, 2135, 3040, 3044, 2538, 2844, 2975, 2135, 2135, 2253, 2644, 2672, 2542, 2554, 2135, 2135, 2346, 2873, 2551, 2555, 2135, 2135, 2135, 2381, 2559, 2565, 2538, 2553, 2135, 2560, 2914, 2576, 2590, 2135, 2135, 2135, 2408, 2136, 2596, 2624, 2135, 2135, 2135, 2409, 2135, 2618, 2597, 3008, 2135, 2135, 2380, 2956, 2601, 2135, 2135, 2135, 2410, 2620, 2624, 2135, 2136, 2383, 2135, 2135, 2783, 2623, 2135, 2135, 2393, 2888, 2136, 2621, 3008, 2135, 2618, 2618, 2622, 2135, 2135, 2405, 2414, 2619, 2384, 2624, 2135, 2136, 2950, 2135, 2138, 2135, 2139, 2135, 2604, 2623, 2135, 2140, 2878, 2665, 2957, 2622, 2135, 2135, 2428, 2762, 2606, 2612, 2135, 2135, 2501, 2586, 2604, 3038, 2135, 2604, 3036, 2387, 2958, 2386, 2135, 2141, 2135, 2421, 2387, 2385, 2135, 2385, 2384, 2384, 2135, 2386, 2628, 2384, 2135, 2135, 2501, 2596, 2591, 2135, 2135, 2135, 2400, 2135, 2634, 2135, 2135, 2559, 2580, 2575, 2648, 2135, 2135, 2135, 2429, 2649, 2135, 2135, 2135, 2435, 2654, 2658, 2135, 2135, 2135, 2436, 2649, 2178, 2659, 2135, 2135, 2595, 2601, 2669, 2677, 2135, 2135, 2616, 2957, 2879, 2665, 2691, 2135, 2363, 2367, 2900, 2878, 2664, 2690, 2975, 2877, 2643, 2670, 2974, 2671, 2975, 2135, 2135, 2619, 2608, 2669, 2673, 2135, 2135, 2653, 2177, 2672, 2135, 2135, 2135, 2486, 2168, 2251, 2255, 2695, 2974, 2709, 2135, 2135, 2135, 2487, 2169, 2399, 2716, 2975, 2135, 2363, 2770, 2776, 2640, 2717, 2135, 2135, 2729, 2135, 2135, 2641, 2718, 2135, 2135, 2135, 2505, 2135, 2640, 2257, 2974, 2135, 2727, 2975, 2135, 2365, 2332, 2895, 2957, 2135, 2959, 2135, 2365, 2749, 2754, 2959, 2958, 2958, 2135, 2380, 2793, 2799, 2135, 2735, 2738, 2135, 2381, 2135, 2135, 2940, 2974, 2135, 2744, 2135, 2135, 2739, 2519, 2976, 2745, 2135, 2135, 2135, 2509, 2755, 2135, 2135, 2135, 2510, 2772, 2778, 2135, 2135, 2740, 2520, 2135, 2771, 2777, 2135, 2135, 2759, 2750, 2792, 2798, 2135, 2135, 2781, 2392, 2779, 2135, 2135, 2135, 2521, 2135, 2679, 2248, 2135, 2135, 2681, 2480, 2135, 2135, 2786, 3000, 2135, 2679, 2683, 2135, 2135, 2416, 2135, 2135, 2135, 2525, 2135, 2730, 2135, 2135, 2135, 2560, 2581, 2135, 2805, 2135, 2135, 2804, 2962, 2832, 2974, 2135, 2382, 2135, 2135, 2958, 2135, 2135, 2960, 2135, 2829, 2833, 2975, 2961, 2965, 2969, 2973, 2968, 2972, 2135, 2135, 2135, 2641, 2135, 2515, 2966, 2970, 2851, 2478, 2135, 2135, 2808, 2135, 2809, 2135, 2135, 2135, 2722, 2852, 2479, 2135, 2135, 2815, 2135, 2135, 2766, 2853, 2480, 2135, 2857, 2479, 2135, 2388, 2723, 2135, 2364, 2331, 2894, 2858, 2480, 2135, 2135, 2850, 2478, 2135, 2135, 2135, 2806, 2864, 2135, 2399, 2256, 2974, 2865, 2135, 2135, 2862, 2135, 2135, 2135, 2685, 2807, 2865, 2135, 2135, 2807, 2863, 2135, 2135, 2135, 2686, 2884, 2807, 2135, 2809, 2807, 2135, 2135, 2807, 2806, 2705, 2810, 2808, 2700, 2869, 2702, 2702, 2702, 2704, 2883, 2135, 2135, 2135, 2730, 2884, 2135, 2135, 2135, 2731, 2321, 2546, 2135, 2135, 2876, 2255, 2889, 2322, 2547, 2135, 2401, 2135, 2135, 2135, 2949, 2367, 2893, 2544, 2973, 2906, 2973, 2135, 2135, 2877, 2663, 2368, 2901, 2907, 2974, 2366, 2899, 2905, 2972, 2920, 2974, 2135, 2135, 2911, 2900, 2920, 2363, 2913, 2918, 2465, 2941, 2975, 2135, 2135, 2924, 2928, 2974, 2945, 2931, 2135, 2135, 2135, 2765, 2136, 2955, 2135, 2135, 2939, 2931, 2380, 2135, 2135, 2380, 2135, 2135, 2135, 2780, 2507, 2137, 2135, 2137, 2135, 2139, 2135, 2806, 2810, 2135, 2135, 2135, 2992, 2135, 2135, 2962, 2966, 2970, 2974, 2135, 2135, 2787, 3014, 2135, 2521, 2993, 2135, 2135, 2135, 2803, 2135, 2135, 2135, 2618, 2607, 2997, 3001, 2135, 2135, 2963, 2967, 2971, 2975, 2135, 2135, 2791, 2797, 2135, 3009, 2999, 3003, 2787, 3001, 2135, 2135, 2964, 2968, 2785, 2999, 3003, 2135, 2135, 2135, 2804, 2785, 2999, 3004, 2135, 2135, 2135, 2807, 2135, 2135, 3023, 2135, 2135, 2135, 2811, 2135, 2135, 3027, 2135, 2135, 2135, 2837, 2968, 3028, 2135, 2135, 2135, 2875, 2135, 2784, 3029, 2135, 2408, 2457, 2446, 0, 14, 0, -2120220672, 1610612736, -2074083328, -2002780160, -2111830528, 1073872896, 1342177280, 1075807216, 4096, 16384, 2048, 8192, 0, 8192, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, -2145386496, 8388608, 1073741824, 0, 0x80000000, 0x80000000, 2097152, 2097152, 2097152, 536870912, 0, 0, 134217728, 33554432, 1536, 268435456, 268435456, 268435456, 268435456, 128, 256, 32, 0, 65536, 131072, 524288, 16777216, 268435456, 0x80000000, 1572864, 1835008, 640, 32768, 65536, 262144, 1048576, 2097152, 196608, 196800, 196608, 196608, 0, 131072, 131072, 131072, 196608, 196624, 196608, 196624, 196608, 196608, 128, 4096, 16384, 16384, 2048, 0, 4, 0, 0, 0x80000000, 2097152, 0, 1024, 32, 32, 0, 65536, 1572864, 1048576, 32768, 32768, 32768, 32768, 196608, 196608, 196608, 64, 64, 196608, 196608, 131072, 131072, 131072, 131072, 268435456, 268435456, 64, 196736, 196608, 196608, 196608, 131072, 196608, 196608, 16384, 4, 4, 4, 2, 32, 32, 65536, 1048576, 12582912, 1073741824, 0, 0, 2, 8, 16, 96, 2048, 32768, 0, 0, 131072, 268435456, 268435456, 268435456, 256, 256, 196608, 196672, 196608, 196608, 196608, 196608, 4, 0, 256, 256, 256, 256, 32, 32, 32768, 32, 32, 32, 32, 32768, 268435456, 268435456, 268435456, 196608, 196608, 196608, 196624, 196608, 196608, 196608, 16, 16, 16, 268435456, 196608, 64, 64, 64, 196608, 196608, 196608, 196672, 268435456, 64, 64, 196608, 196608, 16, 196608, 196608, 196608, 268435456, 64, 196608, 131072, 262144, 4194304, 25165824, 33554432, 134217728, 268435456, 268435456, 196608, 262152, 8, 256, 512, 3072, 16384, 200, -1073741816, 8392713, 40, 8392718, 520, 807404072, 40, 520, 100663304, 0, 0, -540651761, -540651761, 257589048, 0, 262144, 0, 0, 3, 8, 256, 0, 4, 6, 4100, 8388612, 0, 0, 0, 3, 4, 8, 256, 512, 1024, 0, 2097152, 0, 0, -537854471, -537854471, 0, 100663296, 0, 0, 1, 2, 0, 0, 0, 16384, 0, 0, 0, 96, 14336, 0, 0, 0, 7, 8, 234881024, 0, 0, 0, 8, 0, 0, 0, 0, 262144, 0, 0, 16, 64, 384, 512, 0, 1, 1, 0, 12582912, 0, 0, 0, 0, 33554432, 67108864, -606084144, -606084144, -606084138, 0, 0, 28, 32, 768, 1966080, -608174080, 0, 0, 0, 14, 35056, 16, 64, 896, 24576, 98304, 98304, 131072, 262144, 524288, 1048576, 4194304, 25165824, 1048576, 62914560, 134217728, -805306368, 0, 384, 512, 16384, 65536, 131072, 262144, 29360128, 33554432, 134217728, 268435456, 1073741824, 0x80000000, 262144, 524288, 1048576, 29360128, 33554432, 524288, 1048576, 16777216, 33554432, 134217728, 268435456, 1073741824, 0, 0, 0, 123856, 1966080, 0, 64, 384, 16384, 65536, 131072, 16384, 65536, 524288, 268435456, 0x80000000, 0, 0, 524288, 0x80000000, 0, 0, 1, 16, 0, 256, 524288, 0, 0, 0, 25, 96, 128, -537854471, 0, 0, 0, 32, 7404800, -545259520, 0, 0, 0, 60, 0, 249, 64768, 1048576, 6291456, 6291456, 25165824, 100663296, 402653184, 1073741824, 96, 128, 1280, 2048, 4096, 57344, 6291456, 57344, 6291456, 8388608, 16777216, 33554432, 201326592, 1342177280, 0x80000000, 0, 57344, 6291456, 8388608, 100663296, 134217728, 0x80000000, 0, 0, 0, 1, 8, 16, 64, 128, 64, 128, 256, 1024, 131072, 131072, 131072, 262144, 524288, 16777216, 57344, 6291456, 8388608, 67108864, 134217728, 64, 256, 1024, 2048, 4096, 57344, 64, 256, 0, 24576, 32768, 6291456, 67108864, 134217728, 0, 1, 64, 256, 24576, 32768, 4194304, 32768, 4194304, 67108864, 0, 0, 64, 256, 0, 0, 24576, 32768, 0, 16384, 4194304, 67108864, 64, 16384, 0, 0, 1, 64, 256, 16384, 4194304, 67108864, 0, 0, 0, 16384, 0, 16384, 16384, 0, -470447874, -470447874, -470447874, 0, 0, 128, 0, 0, 8, 96, 2048, 32768, 262144, 8388608, 35056, 1376256, -471859200, 0, 0, 14, 16, 224, 2048, 32768, 2097152, 4194304, 8388608, -486539264, 0, 96, 128, 2048, 32768, 262144, 2097152, 262144, 2097152, 8388608, 33554432, 536870912, 1073741824, 0x80000000, 0, 1610612736, 0x80000000, 0, 0, 1, 524288, 1048576, 12582912, 0, 0, 0, 151311, 264503296, 2097152, 8388608, 33554432, 1610612736, 0x80000000, 262144, 8388608, 33554432, 536870912, 67108864, 4194304, 0, 4194304, 0, 4194304, 4194304, 0, 0, 524288, 8388608, 536870912, 1073741824, 0x80000000, 1, 4097, 8388609, 96, 2048, 32768, 1073741824, 0x80000000, 0, 96, 2048, 0x80000000, 0, 0, 96, 2048, 0, 0, 1, 12582912, 0, 0, 0, 0, 1641895695, 1641895695, 0, 0, 0, 249, 7404800, 15, 87808, 1835008, 1639972864, 0, 768, 5120, 16384, 65536, 1835008, 1835008, 12582912, 16777216, 1610612736, 0, 3, 4, 8, 768, 4096, 65536, 0, 0, 256, 512, 786432, 8, 256, 512, 4096, 16384, 1835008, 16384, 1835008, 12582912, 1610612736, 0, 0, 0, 256, 0, 0, 0, 4, 8, 16, 32, 1, 2, 8, 256, 16384, 524288, 16384, 524288, 1048576, 12582912, 1610612736, 0, 0, 0, 8388608, 0, 0, 0, 524288, 4194304, 0, 0, 0, 8388608, -548662288, -548662288, -548662288, 0, 0, 256, 16384, 65536, 520093696, -1073741824, 0, 0, 0, 16777216, 0, 16, 32, 960, 4096, 4980736, 520093696, 1073741824, 0, 32, 896, 4096, 57344, 1048576, 6291456, 8388608, 16777216, 100663296, 134217728, 268435456, 0x80000000, 0, 512, 786432, 4194304, 33554432, 134217728, 268435456, 0, 786432, 4194304, 134217728, 268435456, 0, 524288, 4194304, 268435456, 0, 0, 0, 0, 0, 4194304, 4194304, -540651761, 0, 0, 0, 2, 4, 8, 16, 96, 128, 264503296, -805306368, 0, 0, 0, 8, 256, 512, 19456, 131072, 3072, 16384, 131072, 262144, 8388608, 16777216, 512, 1024, 2048, 16384, 131072, 262144, 131072, 262144, 8388608, 33554432, 201326592, 268435456, 0, 3, 4, 256, 1024, 2048, 57344, 16384, 131072, 8388608, 33554432, 134217728, 268435456, 0, 3, 256, 1024, 16384, 131072, 33554432, 134217728, 1073741824, 0x80000000, 0, 0, 256, 524288, 0x80000000, 0, 3, 256, 33554432, 134217728, 1073741824, 0, 1, 2, 33554432, 1, 2, 134217728, 1073741824, 0, 1, 2, 134217728, 0, 0, 0, 64, 0, 0, 0, 16, 32, 896, 4096, 786432, 4194304, 16777216, 33554432, 201326592, 268435456, 1073741824, 0x80000000, 0, 0, 0, 15, 0, 4980736, 4980736, 4980736, 70460, 70460, 3478332, 0, 0, 1008, 4984832, 520093696, 60, 4864, 65536, 0, 0, 0, 12, 16, 32, 256, 512, 4096, 65536, 0, 0, 0, 67108864, 0, 0, 0, 12, 0, 256, 512, 65536, 0, 0, 1024, 512, 131072, 131072, 4, 16, 32, 65536, 0, 4, 16, 32, 0, 0, 0, 4, 16, 0, 0, 16384, 67108864, 0, 0, 1, 24, 96, 128, 256, 1024
];
JSONiqTokenizer.TOKEN =
[
"(0)",
+ "JSONChar",
+ "JSONCharRef",
+ "JSONPredefinedCharRef",
"ModuleDecl",
"Annotation",
"OptionDecl",
@@ -1941,7 +1566,6 @@ JSONiqTokenizer.TOKEN =
"PredefinedEntityRef",
"'\"\"'",
"EscapeApos",
- "QuotChar",
"AposChar",
"ElementContentChar",
"QuotAttrContentChar",
@@ -1958,6 +1582,7 @@ JSONiqTokenizer.TOKEN =
"'\"'",
"'#'",
"'#)'",
+ "'$$'",
"''''",
"'('",
"'(#'",
@@ -2197,73 +1822,255 @@ JSONiqTokenizer.TOKEN =
"'}'",
"'}}'"
];
- });
-ace.define('ace/mode/behaviour/xquery', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/mode/behaviour/xml', 'ace/token_iterator'], function(require, exports, module) {
+},
+{}],
+2:[function(_dereq_,module,exports){
+'use strict';
+
+var JSONiqTokenizer = _dereq_('./JSONiqTokenizer').JSONiqTokenizer;
+var Lexer = _dereq_('./lexer').Lexer;
+
+var keys = 'NaN|after|allowing|ancestor|ancestor-or-self|and|append|array|as|ascending|at|attribute|base-uri|before|boundary-space|break|by|case|cast|castable|catch|child|collation|comment|constraint|construction|contains|context|continue|copy|copy-namespaces|count|decimal-format|decimal-separator|declare|default|delete|descendant|descendant-or-self|descending|digit|div|document|document-node|element|else|empty|empty-sequence|encoding|end|eq|every|except|exit|external|false|first|following|following-sibling|for|from|ft-option|function|ge|greatest|group|grouping-separator|gt|idiv|if|import|in|index|infinity|insert|instance|integrity|intersect|into|is|item|json|json-item|jsoniq|last|lax|le|least|let|loop|lt|minus-sign|mod|modify|module|namespace|namespace-node|ne|next|node|nodes|not|null|object|of|only|option|or|order|ordered|ordering|paragraphs|parent|pattern-separator|per-mille|percent|preceding|preceding-sibling|previous|processing-instruction|rename|replace|return|returning|revalidation|satisfies|schema|schema-attribute|schema-element|score|select|self|sentences|sliding|some|stable|start|strict|switch|text|then|times|to|treat|true|try|tumbling|type|typeswitch|union|unordered|updating|validate|value|variable|version|when|where|while|window|with|words|xquery|zero-digit'.split('|');
+var keywords = keys.map(function(val) { return { name: '\'' + val + '\'', token: 'keyword' }; });
+var ncnames = keys.map(function(val) { return { name: '\'' + val + '\'', token: 'text', next: function(stack){ stack.pop(); } }; });
+
+var cdata = 'constant.language';
+var number = 'constant';
+var xmlcomment = 'comment';
+var pi = 'xml-pe';
+var pragma = 'constant.buildin';
+var n = function(name){
+ return '\'' + name + '\'';
+};
+var Rules = {
+ start: [
+ { name: n('(#'), token: pragma, next: function(stack){ stack.push('Pragma'); } },
+ { name: n('(:'), token: 'comment', next: function(stack){ stack.push('Comment'); } },
+ { name: n('(:~'), token: 'comment.doc', next: function(stack){ stack.push('CommentDoc'); } },
+ { name: n('<!--'), token: xmlcomment, next: function(stack){ stack.push('XMLComment'); } },
+ { name: n('<?'), token: pi, next: function(stack) { stack.push('PI'); } },
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.push('AposString'); } },
+ { name: n('"'), token: 'string', next: function(stack){ stack.push('QuotString'); } },
+ { name: 'Annotation', token: 'support.function' },
+ { name: 'ModuleDecl', token: 'keyword', next: function(stack){ stack.push('Prefix'); } },
+ { name: 'OptionDecl', token: 'keyword', next: function(stack){ stack.push('_EQName'); } },
+ { name: 'AttrTest', token: 'support.type' },
+ { name: 'Variable', token: 'variable' },
+ { name: n('<![CDATA['), token: cdata, next: function(stack){ stack.push('CData'); } },
+ { name: 'IntegerLiteral', token: number },
+ { name: 'DecimalLiteral', token: number },
+ { name: 'DoubleLiteral', token: number },
+ { name: 'Operator', token: 'keyword.operator' },
+ { name: 'EQName', token: function(val) { return keys.indexOf(val) !== -1 ? 'keyword' : 'support.function'; } },
+ { name: n('('), token: 'lparen' },
+ { name: n(')'), token: 'rparen' },
+ { name: 'Tag', token: 'meta.tag', next: function(stack){ stack.push('StartTag'); } },
+ { name: n('}'), token: 'text', next: function(stack){ if(stack.length > 1) { stack.pop(); } } },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } } //, next: function(stack){ if(stack.length > 1) { stack.pop(); } } }
+ ].concat(keywords),
+ _EQName: [
+ { name: 'EQName', token: 'text', next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ Prefix: [
+ { name: 'NCName', token: 'text', next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ StartTag: [
+ { name: n('>'), token: 'meta.tag', next: function(stack){ stack.push('TagContent'); } },
+ { name: 'QName', token: 'entity.other.attribute-name' },
+ { name: n('='), token: 'text' },
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.push('AposAttr'); } },
+ { name: n('"'), token: 'string', next: function(stack){ stack.push('QuotAttr'); } },
+ { name: n('/>'), token: 'meta.tag.r', next: function(stack){ stack.pop(); } }
+ ],
+ TagContent: [
+ { name: 'ElementContentChar', token: 'text' },
+ { name: n('<![CDATA['), token: cdata, next: function(stack){ stack.push('CData'); } },
+ { name: n('<!--'), token: xmlcomment, next: function(stack){ stack.push('XMLComment'); } },
+ { name: 'Tag', token: 'meta.tag', next: function(stack){ stack.push('StartTag'); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'text' },
+ { name: n('}}'), token: 'text' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } },
+ { name: 'EndTag', token: 'meta.tag', next: function(stack){ stack.pop(); stack.pop(); } }
+ ],
+ AposAttr: [
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'EscapeApos', token: 'constant.language.escape' },
+ { name: 'AposAttrContentChar', token: 'string' },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'string' },
+ { name: n('}}'), token: 'string' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } }
+ ],
+ QuotAttr: [
+ { name: n('\"'), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'EscapeQuot', token: 'constant.language.escape' },
+ { name: 'QuotAttrContentChar', token: 'string' },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'string' },
+ { name: n('}}'), token: 'string' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } }
+ ],
+ Pragma: [
+ { name: 'PragmaContents', token: pragma },
+ { name: n('#'), token: pragma },
+ { name: n('#)'), token: pragma, next: function(stack){ stack.pop(); } }
+ ],
+ Comment: [
+ { name: 'CommentContents', token: 'comment' },
+ { name: n('(:'), token: 'comment', next: function(stack){ stack.push('Comment'); } },
+ { name: n(':)'), token: 'comment', next: function(stack){ stack.pop(); } }
+ ],
+ CommentDoc: [
+ { name: 'DocCommentContents', token: 'comment.doc' },
+ { name: 'DocTag', token: 'comment.doc.tag' },
+ { name: n('(:'), token: 'comment.doc', next: function(stack){ stack.push('CommentDoc'); } },
+ { name: n(':)'), token: 'comment.doc', next: function(stack){ stack.pop(); } }
+ ],
+ XMLComment: [
+ { name: 'DirCommentContents', token: xmlcomment },
+ { name: n('-->'), token: xmlcomment, next: function(stack){ stack.pop(); } }
+ ],
+ CData: [
+ { name: 'CDataSectionContents', token: cdata },
+ { name: n(']]>'), token: cdata, next: function(stack){ stack.pop(); } }
+ ],
+ PI: [
+ { name: 'DirPIContents', token: pi },
+ { name: n('?'), token: pi },
+ { name: n('?>'), token: pi, next: function(stack){ stack.pop(); } }
+ ],
+ AposString: [
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: 'EscapeApos', token: 'constant.language.escape' },
+ { name: 'AposChar', token: 'string' }
+ ],
+ QuotString: [
+ { name: n('"'), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'JSONPredefinedCharRef', token: 'constant.language.escape' },
+ { name: 'JSONCharRef', token: 'constant.language.escape' },
+ { name: 'JSONChar', token: 'string' }
+ ]
+};
+
+exports.JSONiqLexer = function(){ return new Lexer(JSONiqTokenizer, Rules); };
+},
+{"./JSONiqTokenizer":1,"./lexer":3}],
+3:[function(_dereq_,module,exports){
+'use strict';
- var oop = require("../../lib/oop");
- var Behaviour = require('../behaviour').Behaviour;
- var CstyleBehaviour = require('./cstyle').CstyleBehaviour;
- var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
- var TokenIterator = require("../../token_iterator").TokenIterator;
-
-function hasType(token, type) {
- var hasType = true;
- var typeList = token.type.split('.');
- var needleList = type.split('.');
- needleList.forEach(function(needle){
- if (typeList.indexOf(needle) == -1) {
- hasType = false;
- return false;
- }
- });
- return hasType;
-}
+var TokenHandler = function(code) {
+ var input = code;
+ this.tokens = [];
- var XQueryBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["braces", "parens", "string_dquotes"]); // Get string behaviour
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
- var atCursor = false;
- var state = JSON.parse(state).pop();
- if ((token && token.value === '>') || state !== "StartTag") return;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- var previous = iterator.stepBackward();
- if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) {
- return
- }
- var tag = token.value.substring(1);
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
- }
+ this.reset = function() {
+ input = input;
+ this.tokens = [];
+ };
+
+ this.startNonterminal = function() {};
+ this.endNonterminal = function() {};
- return {
- text: '>' + '</' + tag + '>',
- selection: [1, 1]
+ this.terminal = function(name, begin, end) {
+ this.tokens.push({
+ name: name,
+ value: input.substring(begin, end)
+ });
+ };
+
+ this.whitespace = function(begin, end) {
+ this.tokens.push({
+ name: 'WS',
+ value: input.substring(begin, end)
+ });
+ };
+};
+
+exports.Lexer = function(Tokenizer, Rules) {
+
+ this.tokens = [];
+
+ this.getLineTokens = function(line, state) {
+ state = (state === 'start' || !state) ? '["start"]' : state;
+ var stack = JSON.parse(state);
+ var h = new TokenHandler(line);
+ var tokenizer = new Tokenizer(line, h);
+ var tokens = [];
+
+ while(true) {
+ var currentState = stack[stack.length - 1];
+ try {
+ h.tokens = [];
+ tokenizer['parse_' + currentState]();
+ var info = null;
+
+ if(h.tokens.length > 1 && h.tokens[0].name === 'WS') {
+ tokens.push({
+ type: 'text',
+ value: h.tokens[0].value
+ });
+ h.tokens.splice(0, 1);
+ }
+
+ var token = h.tokens[0];
+ var rules = Rules[currentState];
+ for(var k = 0; k < rules.length; k++) {
+ var rule = Rules[currentState][k];
+ if((typeof(rule.name) === 'function' && rule.name(token)) || rule.name === token.name) {
+ info = rule;
+ break;
+ }
+ }
+
+ if(token.name === 'EOF') { break; }
+ if(token.value === '') { throw 'Encountered empty string lexical rule.'; }
+
+ tokens.push({
+ type: info === null ? 'text' : (typeof(info.token) === 'function' ? info.token(token.value) : info.token),
+ value: token.value
+ });
+
+ if(info && info.next) {
+ info.next(stack);
+ }
+
+ } catch(e) {
+ if(e instanceof tokenizer.ParseException) {
+ var index = 0;
+ for(var i=0; i < tokens.length; i++) {
+ index += tokens[i].value.length;
+ }
+ tokens.push({ type: 'text', value: line.substring(index) });
+ return {
+ tokens: tokens,
+ state: JSON.stringify(['start'])
+ };
+ } else {
+ throw e;
+ }
}
}
- });
- }
- oop.inherits(XQueryBehaviour, Behaviour);
+ return {
+ tokens: tokens,
+ state: JSON.stringify(stack)
+ };
+ };
+};
+},
+{}]},{},[2])
+(2)
- exports.XQueryBehaviour = XQueryBehaviour;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -2275,92 +2082,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -2375,6 +2143,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -2387,51 +2156,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -2440,6 +2215,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -2456,9 +2232,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -2468,15 +2245,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -2485,6 +2260,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -2501,9 +2277,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -2513,62 +2290,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -2580,40 +2354,276 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
if (text == '>') {
var position = editor.getCursorPosition();
var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ }
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define("ace/mode/behaviour/xquery",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+ var oop = require("../../lib/oop");
+ var Behaviour = require('../behaviour').Behaviour;
+ var CstyleBehaviour = require('./cstyle').CstyleBehaviour;
+ var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+ var TokenIterator = require("../../token_iterator").TokenIterator;
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+ var XQueryBehaviour = function () {
+
+ this.inherit(CstyleBehaviour, ["braces", "parens", "string_dquotes"]); // Get string behaviour
+ this.inherit(XmlBehaviour); // Get xml behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
var atCursor = false;
+ var state = JSON.parse(state).pop();
+ if ((token && token.value === '>') || state !== "StartTag") return;
if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
do {
token = iterator.stepBackward();
@@ -2621,10 +2631,11 @@ var XmlBehaviour = function () {
} else {
atCursor = true;
}
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
+ var previous = iterator.stepBackward();
+ if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) {
+ return
}
- var tag = token.value;
+ var tag = token.value.substring(1);
if (atCursor){
var tag = tag.substring(0, position.column - token.start);
}
@@ -2636,31 +2647,14 @@ var XmlBehaviour = function () {
}
});
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
- if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
+ }
+ oop.inherits(XQueryBehaviour, Behaviour);
-exports.XmlBehaviour = XmlBehaviour;
+ exports.XQueryBehaviour = XQueryBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -2679,23 +2673,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -2708,7 +2734,223 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/jsoniq",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/jsoniq_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var JSONiqLexer = require("./xquery/jsoniq_lexer").JSONiqLexer;
+var Range = require("../range").Range;
+var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var Anchor = require("../anchor").Anchor;
+
+var Mode = function() {
+ this.$tokenizer = new JSONiqLexer();
+ this.$behaviour = new XQueryBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+ this.$highlightRules = new TextHighlightRules();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.completer = {
+ getCompletions: function(editor, session, pos, prefix, callback) {
+ if (!session.$worker)
+ return callback();
+ session.$worker.emit("complete", { data: { pos: pos, prefix: prefix } });
+ session.$worker.on("complete", function(e){
+ callback(null, e.data);
+ });
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);
+ if (match)
+ indent += tab;
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*[\}\)]/.test(input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*[\}\)])/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var i, line;
+ var outdent = true;
+ var re = /^\s*\(:(.*):\)/;
+
+ for (i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ var range = new Range(0, 0, 0, 0);
+ for (i=startRow; i<= endRow; i++) {
+ line = doc.getLine(i);
+ range.start.row = i;
+ range.end.row = i;
+ range.end.column = line.length;
+
+ doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)");
+ }
+ };
+ this.createWorker = function(session) {
+
+ var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker");
+ var that = this;
+
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("ok", function(e) {
+ session.clearAnnotations();
+ });
+
+ worker.on("markers", function(e) {
+ session.clearAnnotations();
+ that.addMarkers(e.data, session);
+ });
+
+ return worker;
+ };
+
+ this.removeMarkers = function(session) {
+ var markers = session.getMarkers(false);
+ for (var id in markers) {
+ if (markers[id].clazz.indexOf('language_highlight_') === 0) {
+ session.removeMarker(id);
+ }
+ }
+ for (var i = 0; i < session.markerAnchors.length; i++) {
+ session.markerAnchors[i].detach();
+ }
+ session.markerAnchors = [];
+ };
+
+ this.addMarkers = function(annos, mySession) {
+ var _self = this;
+
+ if (!mySession.markerAnchors) mySession.markerAnchors = [];
+ this.removeMarkers(mySession);
+ mySession.languageAnnos = [];
+ annos.forEach(function(anno) {
+ var anchor = new Anchor(mySession.getDocument(), anno.pos.sl, anno.pos.sc || 0);
+ mySession.markerAnchors.push(anchor);
+ var markerId;
+ var colDiff = anno.pos.ec - anno.pos.sc;
+ var rowDiff = anno.pos.el - anno.pos.sl;
+ var gutterAnno = {
+ guttertext: anno.message,
+ type: anno.level || "warning",
+ text: anno.message
+ };
+
+ function updateFloat(single) {
+ if (markerId)
+ mySession.removeMarker(markerId);
+ gutterAnno.row = anchor.row;
+ if (anno.pos.sc !== undefined && anno.pos.ec !== undefined) {
+ var range = new Range(anno.pos.sl, anno.pos.sc, anno.pos.el, anno.pos.ec);
+ markerId = mySession.addMarker(range, "language_highlight_" + (anno.type ? anno.type : "default"));
+ }
+ if (single) mySession.setAnnotations(mySession.languageAnnos);
+ }
+ updateFloat();
+ anchor.on("change", function() {
+ updateFloat(true);
+ });
+ if (anno.message) mySession.languageAnnos.push(gutterAnno);
+ });
+ mySession.setAnnotations(mySession.languageAnnos);
+ };
+
+ this.$id = "ace/mode/jsoniq";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-jsp.js b/js/vendor/ace/src-noconflict/mode-jsp.js
index 845c2b0..d70efc4 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-jsp.js
+++ b/js/vendor/ace/src-noconflict/mode-jsp.js
@@ -1,226 +1,14 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/jsp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/jsp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JspHighlightRules = require("./jsp_highlight_rules").JspHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JspHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/jsp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/java_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
-
-var JspHighlightRules = function() {
- HtmlHighlightRules.call(this);
-
- var builtinVariables = 'request|response|out|session|' +
- 'application|config|pageContext|page|Exception';
-
- var keywords = 'page|include|taglib';
-
- var startRules = [
- {
- token : "comment",
- regex : "<%--",
- push : "jsp-dcomment"
- }, {
- token : "meta.tag", // jsp open tag
- regex : "<%@?|<%=?|<jsp:[^>]+>",
- push : "jsp-start"
- }
- ];
-
- var endRules = [
- {
- token : "meta.tag", // jsp close tag
- regex : "%>|<\\/jsp:[^>]+>",
- next : "pop"
- }, {
- token: "variable.language",
- regex : builtinVariables
- }, {
- token: "keyword",
- regex : keywords
- }
- ];
-
- for (var key in this.$rules)
- this.$rules[key].unshift.apply(this.$rules[key], startRules);
-
- this.embedRules(JavaHighlightRules, "jsp-", endRules, ["start"]);
-
- this.addRules({
- "jsp-dcomment" : [{
- token : "comment",
- regex : ".*?--%>",
- next : "pop"
- }]
- });
-
- this.normalizeRules();
-};
-
-oop.inherits(JspHighlightRules, HtmlHighlightRules);
-
-exports.JspHighlightRules = JspHighlightRules;
-});
-
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
-
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
-
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
-
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
-
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
-};
-
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
-
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -354,14 +142,64 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -482,23 +320,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -508,10 +349,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -546,14 +383,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -571,7 +408,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -605,20 +442,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -653,9 +494,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -663,111 +544,83 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -775,75 +628,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
}, {
- include : "string"
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -856,18 +719,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -875,14 +737,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -894,77 +756,90 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
};
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
});
-ace.define('ace/mode/java_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
@@ -1033,9 +908,6 @@ var JavaHighlightRules = function() {
regex : "\\/\\*",
next : "comment"
}, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
token : "string", // single line
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
@@ -1088,8 +960,70 @@ oop.inherits(JavaHighlightRules, TextHighlightRules);
exports.JavaHighlightRules = JavaHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+ace.define("ace/mode/jsp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/java_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
+
+var JspHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var builtinVariables = 'request|response|out|session|' +
+ 'application|config|pageContext|page|Exception';
+
+ var keywords = 'page|include|taglib';
+
+ var startRules = [
+ {
+ token : "comment",
+ regex : "<%--",
+ push : "jsp-dcomment"
+ }, {
+ token : "meta.tag", // jsp open tag
+ regex : "<%@?|<%=?|<jsp:[^>]+>",
+ push : "jsp-start"
+ }
+ ];
+
+ var endRules = [
+ {
+ token : "meta.tag", // jsp close tag
+ regex : "%>|<\\/jsp:[^>]+>",
+ next : "pop"
+ }, {
+ token: "variable.language",
+ regex : builtinVariables
+ }, {
+ token: "keyword",
+ regex : keywords
+ }
+ ];
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
+
+ this.embedRules(JavaHighlightRules, "jsp-", endRules, ["start"]);
+
+ this.addRules({
+ "jsp-dcomment" : [{
+ token : "comment",
+ regex : ".*?--%>",
+ next : "pop"
+ }]
+ });
+ this.normalizeRules();
+};
+
+oop.inherits(JspHighlightRules, HtmlHighlightRules);
+
+exports.JspHighlightRules = JspHighlightRules;
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -1128,8 +1062,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -1141,92 +1075,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -1241,6 +1136,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -1253,51 +1149,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -1306,6 +1208,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -1322,9 +1225,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -1334,15 +1238,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -1351,6 +1253,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -1367,9 +1270,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -1379,62 +1283,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -1446,13 +1347,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -1471,23 +1439,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -1500,7 +1500,87 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/jsp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JspHighlightRules = require("./jsp_highlight_rules").JspHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JspHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.$id = "ace/mode/jsp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-jsx.js b/js/vendor/ace/src-noconflict/mode-jsx.js
index f9962d7..cbdcc0f 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-jsx.js
+++ b/js/vendor/ace/src-noconflict/mode-jsx.js
@@ -1,60 +1,54 @@
-ace.define('ace/mode/jsx', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/jsx_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JsxHighlightRules = require("./jsx_highlight_rules").JsxHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-function Mode() {
- this.$tokenizer = new Tokenizer(new JsxHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-}
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
-}).call(Mode.prototype);
-exports.Mode = Mode;
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
});
-ace.define('ace/mode/jsx_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+ace.define("ace/mode/jsx_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
@@ -173,52 +167,8 @@ oop.inherits(JsxHighlightRules, TextHighlightRules);
exports.JsxHighlightRules = JsxHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -257,8 +207,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -270,92 +220,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -370,6 +281,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -382,51 +294,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -435,6 +353,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -451,9 +370,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -463,15 +383,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -480,6 +398,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -496,9 +415,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -508,62 +428,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -575,13 +492,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -600,23 +584,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -629,7 +645,118 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/jsx",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsx_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JsxHighlightRules = require("./jsx_highlight_rules").JsxHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+function Mode() {
+ this.HighlightRules = JsxHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+}
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/jsx";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-julia.js b/js/vendor/ace/src-noconflict/mode-julia.js
index 32765cd..ae692e3 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-julia.js
+++ b/js/vendor/ace/src-noconflict/mode-julia.js
@@ -1,64 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/julia', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/julia_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JuliaHighlightRules = require("./julia_highlight_rules").JuliaHighlightRules;
-var FoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JuliaHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "#";
- this.blockComment = "";
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/julia_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/julia_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -84,11 +25,11 @@ var JuliaHighlightRules = function() {
regex: '(#)(?!\\{)(.*$)'} ],
'#function_call':
[ { token: [ 'support.function.julia', 'text' ],
- regex: '([a-zA-Z0-9_]+!?)(\\w*\\()'} ],
+ regex: '([a-zA-Z0-9_]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*\\()'} ],
'#function_decl':
[ { token: [ 'keyword.other.julia', 'meta.function.julia',
'entity.name.function.julia', 'meta.function.julia','text' ],
- regex: '(function|macro)(\\s*)([a-zA-Z0-9_\\{]+!?)(\\w*)([(\\\\{])'} ],
+ regex: '(function|macro)(\\s*)([a-zA-Z0-9_\\{]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*)([(\\\\{])'} ],
'#keyword':
[ { token: 'keyword.other.julia',
regex: '\\b(?:function|type|immutable|macro|quote|abstract|bitstype|typealias|module|baremodule|new)\\b' },
@@ -96,7 +37,7 @@ var JuliaHighlightRules = function() {
regex: '\\b(?:if|else|elseif|while|for|in|begin|let|end|do|try|catch|finally|return|break|continue)\\b' },
{ token: 'storage.modifier.variable.julia',
regex: '\\b(?:global|local|const|export|import|importall|using)\\b' },
- { token: 'variable.macro.julia', regex: '@\\w+\\b' } ],
+ { token: 'variable.macro.julia', regex: '@[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b' } ],
'#number':
[ { token: 'constant.numeric.julia',
regex: '\\b0(?:x|X)[0-9a-fA-F]*|(?:\\b[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]*)?(?:im)?|\\bInf(?:32)?\\b|\\bNaN(?:32)?\\b|\\btrue\\b|\\bfalse\\b' } ],
@@ -120,7 +61,7 @@ var JuliaHighlightRules = function() {
{ token: 'keyword.operator.interpolation.julia',
regex: '\\$#?(?=.)' },
{ token: [ 'variable', 'keyword.operator.transposed-variable.julia' ],
- regex: '(\\w+)((?:\'|\\.\')*\\.?\')' },
+ regex: '([\\w\\xff-\\u218e\\u2455-\\uffff]+)((?:\'|\\.\')*\\.?\')' },
{ token: 'text',
regex: '\\[|\\('},
{ token: [ 'text', 'keyword.operator.transposed-matrix.julia' ],
@@ -143,10 +84,10 @@ var JuliaHighlightRules = function() {
{ include: '#string_escaped_char' },
{ defaultToken: 'string.quoted.double.julia' } ] },
{ token: 'punctuation.definition.string.begin.julia',
- regex: '\\b\\w+"',
+ regex: '\\b[\\w\\xff-\\u218e\\u2455-\\uffff]+"',
push:
[ { token: 'punctuation.definition.string.end.julia',
- regex: '"\\w*',
+ regex: '"[\\w\\xff-\\u218e\\u2455-\\uffff]*',
next: 'pop' },
{ include: '#string_custom_escaped_char' },
{ defaultToken: 'string.quoted.custom-double.julia' } ] },
@@ -190,8 +131,8 @@ oop.inherits(JuliaHighlightRules, TextHighlightRules);
exports.JuliaHighlightRules = JuliaHighlightRules;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -210,23 +151,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -239,7 +212,84 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/julia",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/julia_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JuliaHighlightRules = require("./julia_highlight_rules").JuliaHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JuliaHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.blockComment = "";
+ this.$id = "ace/mode/julia";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-latex.js b/js/vendor/ace/src-noconflict/mode-latex.js
index d19d359..cf91761 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-latex.js
+++ b/js/vendor/ace/src-noconflict/mode-latex.js
@@ -1,38 +1,27 @@
-ace.define('ace/mode/latex', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/latex_highlight_rules', 'ace/mode/folding/latex', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules;
-var LatexFoldMode = require("./folding/latex").FoldMode;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new LatexHighlightRules().getRules());
- this.foldingRules = new LatexFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "%";
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-ace.define('ace/mode/latex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var LatexHighlightRules = function() {
+var LatexHighlightRules = function() {
+
this.$rules = {
"start" : [{
- token : "keyword",
- regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : ["keyword", "lparen", "variable.parameter", "rparen", "lparen", "storage.type", "rparen"],
+ regex : "(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"
+ }, {
+ token : ["keyword","lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"
+ }, {
+ token : ["storage.type", "lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\(?:begin|end))({)(\\w*)(})"
+ }, {
+ token : "storage.type",
+ regex : "\\\\[a-zA-Z]+"
}, {
token : "lparen",
regex : "[[({]"
@@ -40,23 +29,41 @@ var LatexHighlightRules = function() {
token : "rparen",
regex : "[\\])}]"
}, {
- token : "string",
- regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"
+ token : "constant.character.escape",
+ regex : "\\\\[^a-zA-Z]?"
}, {
+ token : "string",
+ regex : "\\${1,2}",
+ next : "equation"
+ }],
+ "equation" : [{
token : "comment",
regex : "%.*$"
+ }, {
+ token : "string",
+ regex : "\\${1,2}",
+ next : "start"
+ }, {
+ token : "constant.character.escape",
+ regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
+ }, {
+ token : "error",
+ regex : "^\\s*$",
+ next : "start"
+ }, {
+ defaultToken : "string"
}]
+
};
};
-
oop.inherits(LatexHighlightRules, TextHighlightRules);
exports.LatexHighlightRules = LatexHighlightRules;
});
-ace.define('ace/mode/folding/latex', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -69,7 +76,7 @@ oop.inherits(FoldMode, BaseFoldMode);
(function() {
- this.foldingStartMarker = /^\s*\\(begin)|(section|subsection)\b|{\s*$/;
+ this.foldingStartMarker = /^\s*\\(begin)|(section|subsection|paragraph)\b|{\s*$/;
this.foldingStopMarker = /^\s*\\(end)\b|^\s*}/;
this.getFoldWidgetRange = function(session, foldStyle, row) {
@@ -101,7 +108,7 @@ oop.inherits(FoldMode, BaseFoldMode);
var stream = new TokenIterator(session, row, column);
var token = stream.getCurrentToken();
- if (!token || token.type !== "keyword")
+ if (!token || !(token.type == "storage.type" || token.type == "constant.character.escape"))
return;
var val = token.value;
@@ -123,7 +130,7 @@ oop.inherits(FoldMode, BaseFoldMode);
stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
while(token = stream.step()) {
- if (token.type !== "keyword")
+ if (!token || !(token.type == "storage.type" || token.type == "constant.character.escape"))
continue;
var level = keywords[token.value];
if (!level)
@@ -146,11 +153,11 @@ oop.inherits(FoldMode, BaseFoldMode);
};
this.latexSection = function(session, row, column) {
- var keywords = ["\\subsection", "\\section", "\\begin", "\\end"];
+ var keywords = ["\\subsection", "\\section", "\\begin", "\\end", "\\paragraph"];
var stream = new TokenIterator(session, row, column);
var token = stream.getCurrentToken();
- if (!token || token.type != "keyword")
+ if (!token || token.type != "storage.type")
return;
var startLevel = keywords.indexOf(token.value);
@@ -158,7 +165,7 @@ oop.inherits(FoldMode, BaseFoldMode);
var endRow = row;
while(token = stream.stepForward()) {
- if (token.type !== "keyword")
+ if (token.type !== "storage.type")
continue;
var level = keywords.indexOf(token.value);
@@ -187,3 +194,30 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/latex_highlight_rules","ace/mode/folding/latex","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules;
+var LatexFoldMode = require("./folding/latex").FoldMode;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = LatexHighlightRules;
+ this.foldingRules = new LatexFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.type = "text";
+
+ this.lineCommentStart = "%";
+
+ this.$id = "ace/mode/latex";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-lean.js b/js/vendor/ace/src-noconflict/mode-lean.js
new file mode 100755
index 0000000..c57589e
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-lean.js
@@ -0,0 +1,281 @@
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/lean_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var leanHighlightRules = function() {
+
+ var keywordControls = (
+ [ "add_rewrite", "alias", "as", "assume", "attribute",
+ "begin", "by", "calc", "calc_refl", "calc_subst", "calc_trans", "check",
+ "classes", "coercions", "conjecture", "constants", "context",
+ "corollary", "else", "end", "environment", "eval", "example",
+ "exists", "exit", "export", "exposing", "extends", "fields", "find_decl",
+ "forall", "from", "fun", "have", "help", "hiding", "if",
+ "import", "in", "infix", "infixl", "infixr", "instances",
+ "let", "local", "match", "namespace", "notation", "obtain", "obtains",
+ "omit", "opaque", "open", "options", "parameter", "parameters", "postfix",
+ "precedence", "prefix", "premise", "premises", "print", "private", "proof",
+ "protected", "qed", "raw", "renaming", "section", "set_option",
+ "show", "tactic_hint", "take", "then", "universe",
+ "universes", "using", "variable", "variables", "with"].join("|")
+ );
+
+ var nameProviders = (
+ ["inductive", "structure", "record", "theorem", "axiom",
+ "axioms", "lemma", "hypothesis", "definition", "constant"].join("|")
+ );
+
+ var storageType = (
+ ["Prop", "Type", "Type'", "Type₊", "Type₁", "Type₂", "Type₃"].join("|")
+ );
+
+ var storageModifiers = (
+ "\\[(" +
+ ["abbreviations", "all-transparent", "begin-end-hints", "class", "classes", "coercion",
+ "coercions", "declarations", "decls", "instance", "irreducible",
+ "multiple-instances", "notation", "notations", "parsing-only", "persistent",
+ "reduce-hints", "reducible", "tactic-hints", "visible", "wf", "whnf"
+ ].join("|") +
+ ")\\]"
+ );
+
+ var keywordOperators = (
+ [].join("|")
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword.control" : keywordControls,
+ "storage.type" : storageType,
+ "keyword.operator" : keywordOperators,
+ "variable.language": "sorry",
+ }, "identifier");
+
+ var identifierRe = "[A-Za-z_\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2100-\u214f][A-Za-z0-9_'\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2070-\u2079\u207f-\u2089\u2090-\u209c\u2100-\u214f]*";
+ var operatorRe = new RegExp(["#", "@", "->", "∼", "↔", "/", "==", "=", ":=", "<->",
+ "/\\", "\\/", "∧", "∨", "≠", "<", ">", "≤", "≥", "¬",
+ "<=", ">=", "⁻¹", "⬝", "▸", "\\+", "\\*", "-", "/",
+ "λ", "→", "∃", "∀", ":="].join("|"));
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment", // single line comment "--"
+ regex : "--.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment "/-"
+ regex : "\\/-",
+ next : "comment"
+ }, {
+ stateName: "qqstring",
+ token : "string.start", regex : '"', next : [
+ {token : "string.end", regex : '"', next : "start"},
+ {token : "constant.language.escape", regex : /\\[n"\\]/},
+ {defaultToken: "string"}
+ ]
+ }, {
+ token : "keyword.control", regex : nameProviders, next : [
+ {token : "variable.language", regex : identifierRe, next : "start"} ]
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ }, {
+ token : "storage.modifier",
+ regex : storageModifiers
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "operator",
+ regex : operatorRe
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [ {token: "comment", regex: "-/", next: "start"},
+ {defaultToken: "comment"} ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.normalizeRules();
+};
+
+oop.inherits(leanHighlightRules, TextHighlightRules);
+
+exports.leanHighlightRules = leanHighlightRules;
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/lean",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lean_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var leanHighlightRules = require("./lean_highlight_rules").leanHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = leanHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "/-", end: "-/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "- ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/lean";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-less.js b/js/vendor/ace/src-noconflict/mode-less.js
index 4b78a8f..3077309 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-less.js
+++ b/js/vendor/ace/src-noconflict/mode-less.js
@@ -1,88 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/less', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/less_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CssBehaviour = require("./behaviour/css").CssBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new LessHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CssBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/less_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -310,8 +227,8 @@ exports.LessHighlightRules = LessHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -350,87 +267,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var CssBehaviour = function () {
-
- this.inherit(CstyleBehaviour);
-
- this.add("colon", "insertion", function (state, action, editor, session, text) {
- if (text === ':') {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- var token = iterator.getCurrentToken();
- if (token && token.value.match(/\s+/)) {
- token = iterator.stepBackward();
- }
- if (token && token.type === 'support.type') {
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar === ':') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- if (!line.substring(cursor.column).match(/^\s*;/)) {
- return {
- text: ':;',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("colon", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected === ':') {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- var token = iterator.getCurrentToken();
- if (token && token.value.match(/\s+/)) {
- token = iterator.stepBackward();
- }
- if (token && token.type === 'support.type') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar === ';') {
- range.end.column ++;
- return range;
- }
- }
- }
- });
-
- this.add("semicolon", "insertion", function (state, action, editor, session, text) {
- if (text === ';') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar === ';') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- });
-
-}
-oop.inherits(CssBehaviour, CstyleBehaviour);
-
-exports.CssBehaviour = CssBehaviour;
-});
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -442,92 +280,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -542,6 +341,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -554,51 +354,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -607,6 +413,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -623,9 +430,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -635,15 +443,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -652,6 +458,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -668,9 +475,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -680,62 +488,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -747,13 +552,159 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar === ';') {
+ range.end.column ++;
+ return range;
+ }
+ }
+ }
+ });
+
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -772,23 +723,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -801,7 +784,114 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = LessHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/less";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-liquid.js b/js/vendor/ace/src-noconflict/mode-liquid.js
index d5d3c08..8cc15ac 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-liquid.js
+++ b/js/vendor/ace/src-noconflict/mode-liquid.js
@@ -1,285 +1,14 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/liquid', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/liquid_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(require, exports, module) {
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var LiquidHighlightRules = require("./liquid_highlight_rules").LiquidHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-
-var Mode = function() {
- var highlighter = new LiquidHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
- this.$outdent = new MatchingBraceOutdent();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.blockComment = {start: "<!--", end: "-->"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/liquid_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/html_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-
-var LiquidHighlightRules = function() {
- HtmlHighlightRules.call(this);
- var functions = (
- "date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|" +
- "escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|" +
- "truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split"
- );
-
- var keywords = (
- "capture|endcapture|case|endcase|when|comment|endcomment|" +
- "cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|" +
- "style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow"
- );
-
- var builtinVariables = 'forloop|tablerowloop';
-
- var definitions = ("assign");
-
- var keywordMapper = this.createKeywordMapper({
- "variable.language": builtinVariables,
- "keyword": keywords,
- "support.function": functions,
- "keyword.definition": definitions
- }, "identifier");
- for (var rule in this.$rules) {
- this.$rules[rule].unshift({
- token : "variable",
- regex : "{%",
- push : "liquid-start"
- }, {
- token : "variable",
- regex : "{{",
- push : "liquid-start"
- });
- }
-
- this.addRules({
- "liquid-start" : [{
- token: "variable",
- regex: "}}",
- next: "pop"
- }, {
- token: "variable",
- regex: "%}",
- next: "pop"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : keywordMapper,
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\/|\\*|\\-|\\+|=|!=|\\?\\:"
- }, {
- token : "paren.lparen",
- regex : /[\[\({]/
- }, {
- token : "paren.rparen",
- regex : /[\])}]/
- }, {
- token : "text",
- regex : "\\s+"
- }]
- });
-
- this.normalizeRules();
-};
-oop.inherits(LiquidHighlightRules, TextHighlightRules);
-
-exports.LiquidHighlightRules = LiquidHighlightRules;
-});
-
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
-
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
-
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
-
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
-
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
-};
-
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
-
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -413,14 +142,64 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -541,23 +320,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -567,10 +349,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -605,14 +383,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -630,7 +408,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -664,20 +442,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -712,9 +494,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -722,111 +544,83 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -834,75 +628,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
}, {
- include : "string"
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -915,18 +719,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -934,14 +737,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -953,78 +756,182 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
};
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+ace.define("ace/mode/liquid_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var LiquidHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+ var functions = (
+ "date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|" +
+ "escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|" +
+ "truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split"
+ );
+
+ var keywords = (
+ "capture|endcapture|case|endcase|when|comment|endcomment|" +
+ "cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|" +
+ "style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow"
+ );
+
+ var builtinVariables = 'forloop|tablerowloop';
+
+ var definitions = ("assign");
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": builtinVariables,
+ "keyword": keywords,
+ "support.function": functions,
+ "keyword.definition": definitions
+ }, "identifier");
+ for (var rule in this.$rules) {
+ this.$rules[rule].unshift({
+ token : "variable",
+ regex : "{%",
+ push : "liquid-start"
+ }, {
+ token : "variable",
+ regex : "{{",
+ push : "liquid-start"
+ });
+ }
+
+ this.addRules({
+ "liquid-start" : [{
+ token: "variable",
+ regex: "}}",
+ next: "pop"
+ }, {
+ token: "variable",
+ regex: "%}",
+ next: "pop"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\/|\\*|\\-|\\+|=|!=|\\?\\:"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[\({]/
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }]
+ });
+
+ this.normalizeRules();
+};
+oop.inherits(LiquidHighlightRules, TextHighlightRules);
+exports.LiquidHighlightRules = LiquidHighlightRules;
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -1062,3 +969,56 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
+
+ace.define("ace/mode/liquid",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/liquid_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LiquidHighlightRules = require("./liquid_highlight_rules").LiquidHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = LiquidHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/liquid";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-lisp.js b/js/vendor/ace/src-noconflict/mode-lisp.js
index 531c994..0c6fc4d 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-lisp.js
+++ b/js/vendor/ace/src-noconflict/mode-lisp.js
@@ -1,62 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/lisp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lisp_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var LispHighlightRules = require("./lisp_highlight_rules").LispHighlightRules;
-
-var Mode = function() {
- var highlighter = new LispHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = ";";
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-
-ace.define('ace/mode/lisp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -137,3 +80,25 @@ oop.inherits(LispHighlightRules, TextHighlightRules);
exports.LispHighlightRules = LispHighlightRules;
});
+
+ace.define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LispHighlightRules = require("./lisp_highlight_rules").LispHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = LispHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ";";
+
+ this.$id = "ace/mode/lisp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-live_script.js b/js/vendor/ace/src-noconflict/mode-live_script.js
new file mode 100755
index 0000000..a5d36eb
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-live_script.js
@@ -0,0 +1,481 @@
+ace.define("ace/mode/live_script_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LiveScriptHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token: 'punctuation.definition.comment.livescript',
+ regex: '\\/\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.livescript',
+ regex: '\\*\\/',
+ next: 'pop' },
+ { token: 'storage.type.annotation.livescriptscript',
+ regex: '@\\w*' },
+ { defaultToken: 'comment.block.livescript' } ] },
+ { token:
+ [ 'punctuation.definition.comment.livescript',
+ 'comment.line.number-sign.livescript' ],
+ regex: '(#)(?!\\{)(.*$)' },
+ { token:
+ [ 'variable.parameter.function.livescript',
+ 'meta.inline.function.livescript',
+ 'storage.type.function.livescript',
+ 'meta.inline.function.livescript',
+ 'variable.parameter.function.livescript',
+ 'meta.inline.function.livescript',
+ 'storage.type.function.livescript' ],
+ regex: '(\\s*\\!?\\(\\s*[^()]*?\\))(\\s*)(!?[~-]{1,2}>)|(\\s*\\!?)(\\(?[^()]*?\\)?)(\\s*)(<[~-]{1,2}!?)',
+ comment: 'match stuff like: a -> … ' },
+ { token:
+ [ 'keyword.operator.new.livescript',
+ 'meta.class.instance.constructor',
+ 'entity.name.type.instance.livescript' ],
+ regex: '(new)(\\s+)(\\w+(?:\\.\\w*)*)' },
+ { token: 'keyword.illegal.livescript',
+ regex: '\\bp(?:ackage|r(?:ivate|otected)|ublic)|interface|enum|static|yield\\b' },
+ { token: 'punctuation.definition.string.begin.livescript',
+ regex: '\'\'\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.livescript',
+ regex: '\'\'\'',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.heredoc.livescript' } ] },
+ { token: 'punctuation.definition.string.begin.livescript',
+ regex: '"""',
+ push:
+ [ { token: 'punctuation.definition.string.end.livescript',
+ regex: '"""',
+ next: 'pop' },
+ { token: 'constant.character.escape.livescript',
+ regex: '\\\\.' },
+ { include: '#interpolated_livescript' },
+ { defaultToken: 'string.quoted.double.heredoc.livescript' } ] },
+ { token: 'punctuation.definition.string.begin.livescript',
+ regex: '``',
+ push:
+ [ { token: 'punctuation.definition.string.end.livescript',
+ regex: '``',
+ next: 'pop' },
+ { token: 'constant.character.escape.livescript',
+ regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)' },
+ { defaultToken: 'string.quoted.script.livescript' } ] },
+ { token: 'string.array-literal.livescript',
+ regex: '<\\[',
+ push:
+ [ { token: 'string.array-literal.livescript',
+ regex: '\\]>',
+ next: 'pop' },
+ { defaultToken: 'string.array-literal.livescript' } ] },
+ { token: 'string.regexp.livescript',
+ regex: '/{2}(?![\\s=/*+{}?]).*?[^\\\\]/[igmy]{0,4}(?![a-zA-Z0-9])/{2}' },
+ { token: 'string.regexp.livescript',
+ regex: '/{2}$',
+ push:
+ [ { token: 'string.regexp.livescript',
+ regex: '/{2}[imgy]{0,4}',
+ next: 'pop' },
+ { include: '#embedded_spaced_comment' },
+ { include: '#interpolated_livescript' },
+ { defaultToken: 'string.regexp.livescript' } ] },
+ { token: 'string.regexp.livescript',
+ regex: '/{2}',
+ push:
+ [ { token: 'string.regexp.livescript',
+ regex: '/{2}[imgy]{0,4}',
+ next: 'pop' },
+ { token: 'constant.character.escape.livescript',
+ regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)' },
+ { include: '#interpolated_livescript' },
+ { defaultToken: 'string.regexp.livescript' } ] },
+ { token: 'string.regexp.livescript',
+ regex: '/(?![\\s=/*+{}?]).*?[^\\\\]/[igmy]{0,4}(?![a-zA-Z0-9])' },
+ { token: 'keyword.control.livescript',
+ regex: '\\b(?<![\\.\\$\\-])(?:t(?:h(?:is|row|en)|ry|ypeof!?|il|o)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction|rom|allthrough)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith|hen)|o(?:f|r|therwise)|return|break|let|var|loop|match|by)(?!\\-|\\s*:)\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?x)\n\t\t\t\t\\b(?<![\\.\\$\\-])(?:\n\t\t t(?:h(?:is|row|en)|ry|ypeof!?|il|o)\n\t\t |c(?:on(?:tinue|st)|a(?:se|tch)|lass)\n\t\t |i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])\n\t\t |d(?:e(?:fault|lete|bugger)|o)\n\t\t |f(?:or(?:\\s+own)?|inally|unction|rom|allthrough)\n\t\t |s(?:uper|witch)\n\t\t |e(?:lse|x(?:tends|port)|val)\n\t\t |a(?:nd|rguments)\n\t\t |n(?:ew|ot)\n\t\t |un(?:less|til)\n\t\t |w(?:hile|ith|hen)\n\t\t |o(?:f|r|therwise)\n\t\t |return|break|let|var|loop\n\t\t |match\n\t\t |by\n\t\t\t\t)(?!\\-|\\s*:)\\b\n\t\t\t' },
+ { token: 'keyword.operator.livescript',
+ regex: '\\b(?<![\\.\\$\\-])(?:instanceof|new|delete|typeof|and|or|is|isnt|not)(?!\\-|\\s*:)\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?x)\n\t\t\t\t\\b(?<![\\.\\$\\-])(\n\t\t\t\t\tinstanceof|new|delete|typeof|and|or|is|isnt|not\n\t\t\t\t)(?!\\-|\\s*:)\\b\n\t\t\t' },
+ { token: 'keyword.operator.livescript',
+ regex: 'and=|or=|%|&|\\^|\\*|\\/|(?<![a-zA-Z$_])(?:\\-)?\\-(?!\\-?>)|\\+\\+|\\+|~(?!~?>)|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<(?!\\[)|(?<!\\])>|(?<!\\w)!(?!(?:[~\\-]+)?>)|&&|\\.\\.(?:\\.)?|\\s\\.\\s|\\?|\\||\\|\\||\\:|\\*=|(?<!\\()/=|%=|\\+=|\\-=|\\.=|&=|\\(\\.|\\.\\)|\\^=',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?x)\n\t\t\t\tand=|or=|%|&|\\^|\\*|\\/|(?<![a-zA-Z$_])(\\-)?\\-(?!\\-?>)|\\+\\+|\\+|\n\t\t\t\t~(?!~?>)|==|=|!=|<=|>=|<<=|>>=|\n\t\t\t\t>>>=|<>|<(?!\\[)|(?<!\\])>|(?<!\\w)!(?!([~\\-]+)?>)|&&|\\.\\.(\\.)?|\\s\\.\\s|\\?|\\||\\|\\||\\:|\\*=|(?<!\\()/=|%=|\\+=|\\-=|\\.=|&=|\\(\\.|\\.\\)|\n\t\t\t\t\\^=\n\t\t\t' },
+ { token:
+ [ 'variable.assignment.livescript',
+ 'variable.assignment.livescript',
+ 'variable.assignment.livescript',
+ 'punctuation.separator.key-value',
+ 'keyword.operator.livescript',
+ 'variable.assignment.livescript' ],
+ regex: '([a-zA-Z\\$_])((?:[\\w$.-])*)(\\s*)(?!\\::)(?:(:)|(=))(\\s*)(?!(?:\\s*!?\\s*\\(.*\\))?\\s*!?[~-]{1,2}>)' },
+ { token: 'keyword.operator.livescript',
+ regex: '(?<=\\s|^)[\\[\\{](?=.*?[\\]\\}]\\s+[:=])',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<=\\s|^)([\\[\\{])(?=.*?[\\]\\}]\\s+[:=])',
+ push:
+ [ { token: 'keyword.operator.livescript',
+ regex: '[\\]\\}]\\s*[:=]',
+ next: 'pop' },
+ { include: '#variable_name' },
+ { include: '#instance_variable' },
+ { include: '#single_quoted_string' },
+ { include: '#double_quoted_string' },
+ { include: '#numeric' },
+ { defaultToken: 'meta.variable.assignment.destructured.livescript' } ] },
+ { token:
+ [ 'meta.function.livescript',
+ 'entity.name.function.livescript',
+ 'entity.name.function.livescript',
+ 'entity.name.function.livescript',
+ 'entity.name.function.livescript',
+ 'variable.parameter.function.livescript',
+ 'entity.name.function.livescript',
+ 'storage.type.function.livescript' ],
+ regex: '(\\s*)(?=[a-zA-Z\\$_])([a-zA-Z\\$_])((?:[\\w$.:-])*)(\\s*)([:=])((?:\\s*!?\\s*\\(.*\\))?)(\\s*)(!?[~-]{1,2}>)' },
+ { token: 'storage.type.function.livescript',
+ regex: '!?[~-]{1,2}>' },
+ { token: 'constant.language.boolean.true.livescript',
+ regex: '\\b(?<!\\.)(?:true|on|yes)(?!\\s*[:=])\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '\\b(?<!\\.)(true|on|yes)(?!\\s*[:=])\\b' },
+ { token: 'constant.language.boolean.false.livescript',
+ regex: '\\b(?<!\\.)(?:false|off|no)(?!\\s*[:=])\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '\\b(?<!\\.)(false|off|no)(?!\\s*[:=])\\b' },
+ { token: 'constant.language.null.livescript',
+ regex: '\\b(?<!\\.)(?:null|void)(?!\\s*[:=])\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '\\b(?<!\\.)(null|void)(?!\\s*[:=])\\b' },
+ { token: 'variable.language.livescript',
+ regex: '\\b(?<!\\.)(?:super|this|extends)(?!\\s*[:=])\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '\\b(?<!\\.)(super|this|extends)(?!\\s*[:=])\\b' },
+ { token:
+ [ 'storage.type.class.livescript',
+ 'meta.class.livescript',
+ 'entity.name.type.class.livescript',
+ 'meta.class.livescript',
+ 'keyword.control.inheritance.livescript',
+ 'meta.class.livescript',
+ 'entity.other.inherited-class.livescript' ],
+ regex: '(class\\b)(\\s+)((?:@?[a-zA-Z$_][\\w$.-]*)?)(?:(\\s+)(extends)(\\s+)(@?[a-zA-Z$_][\\w$.-]*))?' },
+ { token: 'keyword.other.livescript',
+ regex: '\\b(?:debugger|\\\\)\\b' },
+ { token: 'support.class.livescript',
+ regex: '\\b(?:Array|ArrayBuffer|Blob|Boolean|Date|document|event|Function|Int(?:8|16|32|64)Array|Math|Map|Number|Object|Proxy|RegExp|Set|String|WeakMap|window|Uint(?:8|16|32|64)Array|XMLHttpRequest)\\b' },
+ { token: 'entity.name.type.object.livescript',
+ regex: '\\bconsole\\b' },
+ { token: 'support.function.console.livescript',
+ regex: '(?<=console\\.)(?:debug|warn|info|log|error|time(?:End|-end)|assert)\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '((?<=console\\.)(debug|warn|info|log|error|time(End|-end)|assert))\\b' },
+ { token: 'support.function.livescript',
+ regex: '\\b(?:decodeURI(?:Component)?|encodeURI(?:Component)?|eval|parse(?:Float|Int)|require)\\b' },
+ { token: 'support.function.prelude.livescript',
+ regex: '(?<![.-])\\b(?:map|filter|reject|partition|find|each|head|tail|last|initial|empty|values|keys|length|cons|append|join|reverse|fold(?:l|r)?1?|unfoldr|and(?:List|-list)|or(?:List|-list)|any|all|unique|sum|product|mean|compact|concat(?:Map|-map)?|maximum|minimum|scan(?:l|r)?1?|replicate|slice|apply|split(?:At|-at)?|take(?:While|-while)?|drop(?:While|-while)?|span|first|break(?:It|-it)|list(?:ToObj|-to-obj)|obj(?:ToFunc|-to-func)|pairs(?:ToObj|-to-obj)|obj(?:ToPairs|-to-pairs|ToLists|-to-lists)|zip(?:All|-all)?(?:With|-with)?|compose|curry|partial|flip|fix|sort(?:With|-with|By|-by)?|group(?:By|-by)|break(?:List|-list|Str|-str)|difference|intersection|union|average|flatten|chars|unchars|repeat|lines|unlines|words|unwords|max|min|negate|abs|signum|quot|rem|div|mod|recip|pi|tau|exp|sqrt|ln|pow|sin|cos|tan|asin|acos|atan|atan2|truncate|round|ceiling|floor|is(?:It|-it)NaN|even|odd|gcd|lcm|disabled__id)\\b(?![.-])',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?x)(?<![.-])\\b(\n\t\t\t\tmap|filter|reject|partition|find|each|head|tail|last|initial|empty|\n\t\t\t\tvalues|keys|length|cons|append|join|reverse|fold(l|r)?1?|unfoldr|\n\t\t\t\tand(List|-list)|or(List|-list)|any|all|unique|sum|product|mean|compact|\n\t\t\t\tconcat(Map|-map)?|maximum|minimum|scan(l|r)?1?|replicate|slice|apply|\n\t\t\t\tsplit(At|-at)?|take(While|-while)?|drop(While|-while)?|span|first|\n\t\t\t\tbreak(It|-it)|list(ToObj|-to-obj)|obj(ToFunc|-to-func)|\n\t\t\t\tpairs(ToObj|-to-obj)|obj(ToPairs|-to-pairs|ToLists|-to-lists)|\n\t\t\t\tzip(All|-all)?(With|-with)?|compose|curry|partial|flip|fix|\n\t\t\t\tsort(With|-with|By|-by)?|group(By|-by)|break(List|-list|Str|-str)|\n\t\t\t\tdifference|intersection|union|average|flatten|chars|unchars|repeat|\n\t\t\t\tlines|unlines|words|unwords|max|min|negate|abs|signum|quot|rem|div|mod|\n\t\t\t\trecip|pi|tau|exp|sqrt|ln|pow|sin|cos|tan|asin|acos|atan|atan2|truncate|\n\t\t\t\tround|ceiling|floor|is(It|-it)NaN|even|odd|gcd|lcm|disabled__id\n\t\t\t)\\b(?![.-])',
+ comment: 'Generated by DOM query from http://gkz.github.com/prelude-ls/:\n\t [].slice\n\t .call(document.querySelectorAll(".nav-pills li a"))\n\t .map(function(_) {return _.innerText})\n\t .filter(function(_) {return _.trim() !== \'})\n\t .slice(2)\n\t .join("|")\n \t\t' },
+ { token: 'support.function.semireserved.livescript',
+ regex: '(?<![.-])\\b(?:that|it|e)\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?x)(?<![.-])\\b(that|it|e)\\b' },
+ { token: 'support.function.method.array.livescript',
+ regex: '(?<=(?:\\.|\\]|\\)))(?:apply|call|concat|every|filter|for(?:Each|-each)|from|has(?:Own|-own)(?:Property|-property)|index(?:Of|-of)|is(?:Prototype|-prototype)(?:Of|-of)|join|last(?:Index|-index)(?:Of|-of)|map|of|pop|property(?:Is|-is)(?:Enumerable|-enumerable)|push|reduce(?:Right|-right)?|reverse|shift|slice|some|sort|splice|to(?:Locale|-locale)?(?:String|-string)|unshift|valueOf)\\b(?!-)',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?x)((?<=(\\.|\\]|\\)))(\n\t\t\t\tapply|call|concat|every|filter|for(Each|-each)|\n\t\t\t\tfrom|has(Own|-own)(Property|-property)|index(Of|-of)|\n\t\t\t\tis(Prototype|-prototype)(Of|-of)|join|last(Index|-index)(Of|-of)|\n\t\t\t\tmap|of|pop|property(Is|-is)(Enumerable|-enumerable)|push|\n\t\t\t\treduce(Right|-right)?|reverse|shift|slice|some|sort|\n\t\t\t\tsplice|to(Locale|-locale)?(String|-string)|unshift|valueOf\n\t\t\t))\\b(?!-) ' },
+ { token: 'support.function.static.array.livescript',
+ regex: '(?<=Array\\.)isArray\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?x)((?<=Array\\.)(\n\t\t\t\tisArray\n\t\t\t))\\b' },
+ { token: 'support.function.static.object.livescript',
+ regex: '(?<=Object\\.)(?:create|ace.define(?:Propert|-propert)(?:ies|y)|freeze|get(?:Own|-own)(?:Property|-property)(?:Descriptors?|Names)|get(?:Property|-property)(?:Descriptor|Names)|getPrototypeOf|is(?:(?:Extensible|-extensible)|(?:Frozen|-frozen)|(?:Sealed|-sealed))?|keys|prevent(?:Extensions|-extensions)|seal)\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?x)((?<=Object\\.)(\n\t\t\t\tcreate|ace.define(Propert|-propert)(ies|y)|freeze|\n\t\t\t\tget(Own|-own)(Property|-property)(Descriptors?|Names)|\n\t\t\t\tget(Property|-property)(Descriptor|Names)|getPrototypeOf|\n\t\t\t\tis((Extensible|-extensible)|(Frozen|-frozen)|(Sealed|-sealed))?|\n\t\t\t\tkeys|prevent(Extensions|-extensions)|seal\n\t\t\t))\\b' },
+ { token: 'support.function.static.math.livescript',
+ regex: '(?<=Math\\.)(?:abs|acos|acosh|asin|asinh|atan|atan2|atanh|ceil|cos|cosh|exp|expm1|floor|hypot|log|log10|log1p|log2|max|min|pow|random|round|sign|sin|sinh|sqrt|tan|tanh|trunc)\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?x)((?<=Math\\.)(\n\t\t\t\tabs|acos|acosh|asin|asinh|atan|atan2|atanh|ceil|cos|cosh|exp|expm1|floor|\n\t\t\t\thypot|log|log10|log1p|log2|max|min|pow|random|round|sign|sin|sinh|sqrt|\n\t\t\t\ttan|tanh|trunc\n\t\t\t))\\b' },
+ { token: 'support.function.static.number.livescript',
+ regex: '(?<=Number\\.)(?:is(?:Finite|Integer|NaN)|to(?:Integer|-integer))\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?x)((?<=Number\\.)(\n\t\t\t\tis(Finite|Integer|NaN)|to(Integer|-integer)\n\t\t\t))\\b' },
+ { token: 'constant.language.livescript',
+ regex: '\\b(?:Infinity|NaN|undefined)\\b' },
+ { token: 'punctuation.terminator.statement.livescript',
+ regex: '\\;' },
+ { token: 'meta.delimiter.object.comma.livescript',
+ regex: ',[ |\\t]*' },
+ { token: 'meta.delimiter.method.period.livescript',
+ regex: '\\.' },
+ { token: 'meta.brace.curly.livescript', regex: '\\{|\\}' },
+ { token: 'meta.brace.round.livescript', regex: '\\(|\\)' },
+ { token: 'meta.brace.square.livescript', regex: '\\[|\\]\\s*' },
+ { include: '#instance_variable' },
+ { include: '#backslash_string' },
+ { include: '#single_quoted_string' },
+ { include: '#double_quoted_string' },
+ { include: '#numeric' } ],
+ '#backslash_string':
+ [ { token: 'string.quoted.single.livescript',
+ regex: '\\\\(?:[\\\\)\\s,\\};\\]])?',
+ push:
+ [ { token: 'punctuation.definition.string.end.livescript',
+ regex: '[\\\\)\\s,\\};\\]]',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.single.livescript' } ] } ],
+ '#double_quoted_string':
+ [ { token: 'punctuation.definition.string.begin.livescript',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.livescript',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.livescript',
+ regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)' },
+ { include: '#interpolated_livescript' },
+ { defaultToken: 'string.quoted.double.livescript' } ] } ],
+ '#embedded_comment':
+ [ { token:
+ [ 'punctuation.definition.comment.livescript',
+ 'comment.line.number-sign.livescript' ],
+ regex: '(?<!\\\\)(#)(.*$)',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!\\\\)(#).*$\\n' } ],
+ '#embedded_spaced_comment':
+ [ { token:
+ [ 'punctuation.definition.comment.livescript',
+ 'comment.line.number-sign.livescript' ],
+ regex: '(?<!\\\\)(#\\s)(.*$)',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!\\\\)(#\\s).*$\\n' } ],
+ '#constructor_variable':
+ [ { token: 'variable.other.readwrite.constructor.livescript',
+ regex: '[a-zA-Z$_][\\w$-]*@{2}(?:[a-zA-Z$_][\\w$-]*)?' } ],
+ '#instance_variable':
+ [ { token: 'variable.other.readwrite.instance.livescript',
+ regex: '(?<!\\S)@(?:[a-zA-Z$_][\\w$-]*)?',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!\\S)(@)([a-zA-Z$_][\\w$-]*)?' } ],
+ '#interpolated_livescript':
+ [ { todo:
+ { token: 'punctuation.section.embedded.livescript',
+ regex: '\\#\\{',
+ push:
+ [ { token: 'punctuation.section.embedded.livescript',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '$self' },
+ { defaultToken: 'source.livescript.embedded.source' } ] } },
+ { todo:
+ { token: 'source.livescript.embedded.source.simple',
+ regex: '\\#',
+ push:
+ [ { token: 'source.livescript.embedded.source.simple',
+ regex: '',
+ next: 'pop' },
+ { include: '$self' },
+ { defaultToken: 'source.livescript.embedded.source.simple' } ] } } ],
+ '#numeric':
+ [ { token: 'constant.numeric.livescript',
+ regex: '(?<![\\$@a-zA-Z_])(?:[0-9]+r[0-9_]+|(?:16r|0[xX])[0-9a-fA-F_]+|[0-9]+(?:\\.[0-9_]+)?(?:e[+\\-]?[0-9_]+)?[_a-zA-Z]*)',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<![\\$@a-zA-Z_])(([0-9]+r[0-9_]+)|((16r|0[xX])[0-9a-fA-F_]+)|([0-9]+(\\.[0-9_]+)?(e[+\\-]?[0-9_]+)?)[_a-zA-Z]*)' } ],
+ '#single_quoted_string':
+ [ { token: 'punctuation.definition.string.begin.livescript',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.livescript',
+ regex: '\'',
+ next: 'pop' },
+ { token: 'constant.character.escape.livescript',
+ regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' },
+ { defaultToken: 'string.quoted.single.livescript' } ] } ],
+ '#variable_name':
+ [ { token: 'variable.assignment.livescript',
+ regex: '[a-zA-Z\\$_][\\w$-]*(?:\\.\\w+)*(?!\\-)' } ] }
+
+ this.normalizeRules();
+};
+
+LiveScriptHighlightRules.metaData = { comment: 'LiveScript Syntax: version 1',
+ fileTypes: [ 'ls', 'Slakefile', 'ls.erb' ],
+ firstLineMatch: '^#!.*\\bls',
+ foldingStartMarker: '^\\s*class\\s+\\S.*$|.*(->|=>)\\s*$|.*[\\[{]\\s*$',
+ foldingStopMarker: '^\\s*$|^\\s*[}\\]]\\s*$',
+ keyEquivalent: '^~C',
+ name: 'LiveScript',
+ scopeName: 'source.livescript' }
+
+
+oop.inherits(LiveScriptHighlightRules, TextHighlightRules);
+
+exports.LiveScriptHighlightRules = LiveScriptHighlightRules;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/live_script",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/live_script_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LiveScriptHighlightRules = require("./live_script_highlight_rules").LiveScriptHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = LiveScriptHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$id = "ace/mode/live_script"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-livescript.js b/js/vendor/ace/src-noconflict/mode-livescript.js
index dc2cda0..81008bc 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-livescript.js
+++ b/js/vendor/ace/src-noconflict/mode-livescript.js
@@ -1,4 +1,44 @@
-ace.define('ace/mode/livescript', ['require', 'exports', 'module' , 'ace/tokenizer', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/text'], function(require, exports, module) {
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/livescript",["require","exports","module","ace/tokenizer","ace/mode/matching_brace_outdent","ace/range","ace/mode/text"], function(require, exports, module){
var identifier, LiveScriptMode, keywordend, stringfill;
identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*';
exports.Mode = LiveScriptMode = (function(superclass){
@@ -9,6 +49,7 @@ ace.define('ace/mode/livescript', ['require', 'exports', 'module' , 'ace/tokeniz
if (that = require('../mode/matching_brace_outdent')) {
this.$outdent = new that.MatchingBraceOutdent;
}
+ this.$id = "ace/mode/livescript";
}
indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$');
prototype.getNextLineIndent = function(state, line, tab){
@@ -51,8 +92,7 @@ ace.define('ace/mode/livescript', ['require', 'exports', 'module' , 'ace/tokeniz
}(require('../mode/text').Mode));
keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))';
stringfill = {
- token: 'string',
- regex: '.+'
+ defaultToken: 'string'
};
LiveScriptMode.Rules = {
start: [
@@ -145,7 +185,7 @@ ace.define('ace/mode/livescript', ['require', 'exports', 'module' , 'ace/tokeniz
next: 'key'
}, {
token: 'keyword.operator',
- regex: '\\S+'
+ regex: '[\\^!|&%+\\-]+'
}, {
token: 'text',
regex: '\\s+'
@@ -163,8 +203,7 @@ ace.define('ace/mode/livescript', ['require', 'exports', 'module' , 'ace/tokeniz
token: 'comment.regex',
regex: '\\s+(?:#.*)?'
}, {
- token: 'string.regex',
- regex: '\\S+'
+ defaultToken: 'string.regex'
}
],
key: [
@@ -177,7 +216,7 @@ ace.define('ace/mode/livescript', ['require', 'exports', 'module' , 'ace/tokeniz
next: 'start'
}, {
token: 'text',
- regex: '.',
+ regex: '',
next: 'start'
}
],
@@ -187,8 +226,7 @@ ace.define('ace/mode/livescript', ['require', 'exports', 'module' , 'ace/tokeniz
regex: '.*?\\*/',
next: 'start'
}, {
- token: 'comment.doc',
- regex: '.+'
+ defaultToken: 'comment.doc'
}
],
qdoc: [
@@ -246,43 +284,3 @@ function import$(obj, src){
return obj;
}
});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
- this.checkOutdent = function(line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*\}/.test(input);
- };
-
- this.autoOutdent = function(doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*\})/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.$getIndent = function(line) {
- return line.match(/^\s*/)[0];
- };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
diff --git a/js/vendor/ace/src-noconflict/mode-logiql.js b/js/vendor/ace/src-noconflict/mode-logiql.js
index 46c5c6d..4ddd01b 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-logiql.js
+++ b/js/vendor/ace/src-noconflict/mode-logiql.js
@@ -1,146 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/logiql', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/logiql_highlight_rules', 'ace/mode/folding/coffee', 'ace/token_iterator', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var LogiQLHighlightRules = require("./logiql_highlight_rules").LogiQLHighlightRules;
-var FoldMode = require("./folding/coffee").FoldMode;
-var TokenIterator = require("../token_iterator").TokenIterator;
-var Range = require("../range").Range;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-
-var Mode = function() {
- var highlighter = new LogiQLHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
- if (/comment|string/.test(endState))
- return indent;
- if (tokens.length && tokens[tokens.length - 1].type == "comment.single")
- return indent;
-
- var match = line.match();
- if (/(-->|<--|<-|->|{)\s*$/.test(line))
- indent += tab;
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- if (this.$outdent.checkOutdent(line, input))
- return true;
-
- if (input !== "\n" && input !== "\r\n")
- return false;
-
- if (!/^\s+/.test(line))
- return false;
-
- return true;
- };
-
- this.autoOutdent = function(state, doc, row) {
- if (this.$outdent.autoOutdent(doc, row))
- return;
- var prevLine = doc.getLine(row);
- var match = prevLine.match(/^\s+/);
- var column = prevLine.lastIndexOf(".") + 1;
- if (!match || !row || !column) return 0;
-
- var line = doc.getLine(row + 1);
- var startRange = this.getMatching(doc, {row: row, column: column});
- if (!startRange || startRange.start.row == row) return 0;
-
- column = match[0].length;
- var indent = this.$getIndent(doc.getLine(startRange.start.row));
- doc.replace(new Range(row + 1, 0, row + 1, column), indent);
- };
-
- this.getMatching = function(session, row, column) {
- if (row == undefined)
- row = session.selection.lead
- if (typeof row == "object") {
- column = row.column;
- row = row.row;
- }
-
- var startToken = session.getTokenAt(row, column);
- var KW_START = "keyword.start", KW_END = "keyword.end";
- var tok;
- if (!startToken)
- return;
- if (startToken.type == KW_START) {
- var it = new TokenIterator(session, row, column);
- it.step = it.stepForward;
- } else if (startToken.type == KW_END) {
- var it = new TokenIterator(session, row, column);
- it.step = it.stepBackward;
- } else
- return;
-
- while (tok = it.step()) {
- if (tok.type == KW_START || tok.type == KW_END)
- break;
- }
- if (!tok || tok.type == startToken.type)
- return;
-
- var col = it.getCurrentTokenColumn();
- var row = it.getCurrentTokenRow();
- return new Range(row, col, row, col + tok.value.length);
- };
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/logiql_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/logiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -158,7 +17,7 @@ var LogiQLHighlightRules = function() {
regex: '//.*',
},
{ token: 'constant.numeric',
- regex: '\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?',
+ regex: '\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?[fd]?',
},
{ token: 'string',
regex: '"',
@@ -196,7 +55,7 @@ var LogiQLHighlightRules = function() {
regex: '\\b(lang:[\\w:]*)',
},
{ token: [ 'storage.type', 'text' ],
- regex: '(export|sealed|clauses|block|alias)(\\s*\\()(?=`)',
+ regex: '(export|sealed|clauses|block|alias|alias_all)(\\s*\\()(?=`)',
},
{ token: 'entity.name',
regex: '[a-zA-Z_][a-zA-Z_0-9:]*(@prev|@init|@final)?(?=(\\(|\\[))',
@@ -213,8 +72,8 @@ oop.inherits(LogiQLHighlightRules, TextHighlightRules);
exports.LogiQLHighlightRules = LogiQLHighlightRules;
});
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -300,8 +159,8 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -313,92 +172,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
- };
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -413,6 +233,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -425,51 +246,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -478,6 +305,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -494,9 +322,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -506,15 +335,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -523,6 +350,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -539,9 +367,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -551,62 +380,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -618,13 +444,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -662,3 +555,113 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
+
+ace.define("ace/mode/logiql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/logiql_highlight_rules","ace/mode/folding/coffee","ace/token_iterator","ace/range","ace/mode/behaviour/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LogiQLHighlightRules = require("./logiql_highlight_rules").LogiQLHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+var TokenIterator = require("../token_iterator").TokenIterator;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ this.HighlightRules = LogiQLHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+ if (/comment|string/.test(endState))
+ return indent;
+ if (tokens.length && tokens[tokens.length - 1].type == "comment.single")
+ return indent;
+
+ var match = line.match();
+ if (/(-->|<--|<-|->|{)\s*$/.test(line))
+ indent += tab;
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (this.$outdent.checkOutdent(line, input))
+ return true;
+
+ if (input !== "\n" && input !== "\r\n")
+ return false;
+
+ if (!/^\s+/.test(line))
+ return false;
+
+ return true;
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ if (this.$outdent.autoOutdent(doc, row))
+ return;
+ var prevLine = doc.getLine(row);
+ var match = prevLine.match(/^\s+/);
+ var column = prevLine.lastIndexOf(".") + 1;
+ if (!match || !row || !column) return 0;
+
+ var line = doc.getLine(row + 1);
+ var startRange = this.getMatching(doc, {row: row, column: column});
+ if (!startRange || startRange.start.row == row) return 0;
+
+ column = match[0].length;
+ var indent = this.$getIndent(doc.getLine(startRange.start.row));
+ doc.replace(new Range(row + 1, 0, row + 1, column), indent);
+ };
+
+ this.getMatching = function(session, row, column) {
+ if (row == undefined)
+ row = session.selection.lead
+ if (typeof row == "object") {
+ column = row.column;
+ row = row.row;
+ }
+
+ var startToken = session.getTokenAt(row, column);
+ var KW_START = "keyword.start", KW_END = "keyword.end";
+ var tok;
+ if (!startToken)
+ return;
+ if (startToken.type == KW_START) {
+ var it = new TokenIterator(session, row, column);
+ it.step = it.stepForward;
+ } else if (startToken.type == KW_END) {
+ var it = new TokenIterator(session, row, column);
+ it.step = it.stepBackward;
+ } else
+ return;
+
+ while (tok = it.step()) {
+ if (tok.type == KW_START || tok.type == KW_END)
+ break;
+ }
+ if (!tok || tok.type == startToken.type)
+ return;
+
+ var col = it.getCurrentTokenColumn();
+ var row = it.getCurrentTokenRow();
+ return new Range(row, col, row, col + tok.value.length);
+ };
+ this.$id = "ace/mode/logiql";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-lsl.js b/js/vendor/ace/src-noconflict/mode-lsl.js
index 1dafa11..e3eb1dc 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-lsl.js
+++ b/js/vendor/ace/src-noconflict/mode-lsl.js
@@ -1,98 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2013, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/lsl', ['require', 'exports', 'module' , 'ace/tokenizer', 'ace/mode/lsl_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/text', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/lib/oop'], function(require, exports, module) {
-
-
-var Tokenizer = require("../tokenizer").Tokenizer;
-var Rules = require("./lsl_highlight_rules").LSLHighlightRules;
-var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var TextMode = require("./text").Mode;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-var oop = require("../lib/oop");
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new Rules().getRules());
- this.$outdent = new Outdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = ["//"];
-
- this.blockComment = {
- start: "/*",
- end: "*/"
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type === "comment.block.lsl") {
- return indent;
- }
-
- if (state === "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/lsl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/lsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -102,265 +9,21 @@ oop.inherits(LSLHighlightRules, TextHighlightRules);
function LSLHighlightRules() {
var keywordMapper = this.createKeywordMapper({
"constant.language.float.lsl" : "DEG_TO_RAD|PI|PI_BY_TWO|RAD_TO_DEG|SQRT2|TWO_PI",
- "constant.language.integer.lsl": "ACTIVE|AGENT|AGENT_ALWAYS_RUN|AGENT_ATTACHMENTS|" +
- "AGENT_AUTOPILOT|AGENT_AWAY|AGENT_BUSY|AGENT_BY_LEGACY_NAME|AGENT_BY_USERNAME|" +
- "AGENT_CROUCHING|AGENT_FLYING|AGENT_IN_AIR|AGENT_LIST_PARCEL|AGENT_LIST_PARCEL_OWNER|" +
- "AGENT_LIST_REGION|AGENT_MOUSELOOK|AGENT_ON_OBJECT|AGENT_SCRIPTED|AGENT_SITTING|" +
- "AGENT_TYPING|AGENT_WALKING|ALL_SIDES|ANIM_ON|ATTACH_AVATAR_CENTER|ATTACH_BACK|" +
- "ATTACH_BELLY|ATTACH_CHEST|ATTACH_CHIN|ATTACH_HEAD|ATTACH_HUD_BOTTOM|" +
- "ATTACH_HUD_BOTTOM_LEFT|ATTACH_HUD_BOTTOM_RIGHT|ATTACH_HUD_CENTER_1|ATTACH_HUD_CENTER_2|" +
- "ATTACH_HUD_TOP_CENTER|ATTACH_HUD_TOP_LEFT|ATTACH_HUD_TOP_RIGHT|ATTACH_LEAR|" +
- "ATTACH_LEFT_PEC|ATTACH_LEYE|ATTACH_LFOOT|ATTACH_LHAND|ATTACH_LHIP|ATTACH_LLARM|" +
- "ATTACH_LLLEG|ATTACH_LSHOULDER|ATTACH_LUARM|ATTACH_LULEG|ATTACH_MOUTH|" +
- "ATTACH_NECK|ATTACH_NOSE|ATTACH_PELVIS|ATTACH_REAR|ATTACH_REYE|ATTACH_RFOOT|" +
- "ATTACH_RHAND|ATTACH_RHIP|ATTACH_RIGHT_PEC|ATTACH_RLARM|ATTACH_RLLEG|" +
- "ATTACH_RSHOULDER|ATTACH_RUARM|ATTACH_RULEG|AVOID_CHARACTERS|AVOID_DYNAMIC_OBSTACLES|" +
- "AVOID_NONE|CAMERA_ACTIVE|CAMERA_BEHINDNESS_ANGLE|CAMERA_BEHINDNESS_LAG|" +
- "CAMERA_DISTANCE|CAMERA_FOCUS|CAMERA_FOCUS_LAG|CAMERA_FOCUS_LOCKED|CAMERA_FOCUS_OFFSET|" +
- "CAMERA_FOCUS_THRESHOLD|CAMERA_PITCH|CAMERA_POSITION|CAMERA_POSITION_LAG|" +
- "CAMERA_POSITION_LOCKED|CAMERA_POSITION_THRESHOLD|CHANGED_ALLOWED_DROP|" +
- "CHANGED_COLOR|CHANGED_INVENTORY|CHANGED_LINK|CHANGED_MEDIA|CHANGED_OWNER|" +
- "CHANGED_REGION|CHANGED_REGION_START|CHANGED_SCALE|CHANGED_SHAPE|CHANGED_TELEPORT|" +
- "CHANGED_TEXTURE|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|CHARACTER_AVOIDANCE_MODE|" +
- "CHARACTER_CMD_JUMP|CHARACTER_CMD_SMOOTH_STOP|CHARACTER_CMD_STOP|CHARACTER_DESIRED_SPEED|" +
- "CHARACTER_DESIRED_TURN_SPEED|CHARACTER_LENGTH|CHARACTER_MAX_ACCEL|CHARACTER_MAX_DECEL|" +
- "CHARACTER_MAX_SPEED|CHARACTER_MAX_TURN_RADIUS|CHARACTER_ORIENTATION|" +
- "CHARACTER_RADIUS|CHARACTER_STAY_WITHIN_PARCEL|CHARACTER_TYPE|CHARACTER_TYPE_A|" +
- "CHARACTER_TYPE_B|CHARACTER_TYPE_C|CHARACTER_TYPE_D|CHARACTER_TYPE_NONE|" +
- "CLICK_ACTION_BUY|CLICK_ACTION_NONE|CLICK_ACTION_OPEN|CLICK_ACTION_OPEN_MEDIA|" +
- "CLICK_ACTION_PAY|CLICK_ACTION_PLAY|CLICK_ACTION_SIT|CLICK_ACTION_TOUCH|" +
- "CONTENT_TYPE_ATOM|CONTENT_TYPE_FORM|CONTENT_TYPE_HTML|CONTENT_TYPE_JSON|" +
- "CONTENT_TYPE_LLSD|CONTENT_TYPE_RSS|CONTENT_TYPE_TEXT|CONTENT_TYPE_XHTML|" +
- "CONTENT_TYPE_XML|CONTROL_BACK|CONTROL_DOWN|CONTROL_FWD|CONTROL_LBUTTON|" +
- "CONTROL_LEFT|CONTROL_ML_LBUTTON|CONTROL_RIGHT|CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT|" +
- "CONTROL_UP|DATA_BORN|DATA_NAME|DATA_ONLINE|DATA_PAYINFO|DATA_SIM_POS|" +
- "DATA_SIM_RATING|DATA_SIM_STATUS|DEBUG_CHANNEL|DENSITY|ERR_GENERIC|ERR_MALFORMED_PARAMS|" +
- "ERR_PARCEL_PERMISSIONS|ERR_RUNTIME_PERMISSIONS|ERR_THROTTLED|ESTATE_ACCESS_ALLOWED_AGENT_ADD|" +
- "ESTATE_ACCESS_ALLOWED_AGENT_REMOVE|ESTATE_ACCESS_ALLOWED_GROUP_ADD|ESTATE_ACCESS_ALLOWED_GROUP_REMOVE|" +
- "ESTATE_ACCESS_BANNED_AGENT_ADD|ESTATE_ACCESS_BANNED_AGENT_REMOVE|FORCE_DIRECT_PATH|" +
- "FRICTION|GCNP_RADIUS|GCNP_STATIC|GRAVITY_MULTIPLIER|HORIZONTAL|HTTP_BODY_MAXLENGTH|" +
- "HTTP_BODY_TRUNCATED|HTTP_CUSTOM_HEADER|HTTP_METHOD|HTTP_MIMETYPE|HTTP_PRAGMA_NO_CACHE|" +
- "HTTP_VERBOSE_THROTTLE|HTTP_VERIFY_CERT|INVENTORY_ALL|INVENTORY_ANIMATION|" +
- "INVENTORY_BODYPART|INVENTORY_CLOTHING|INVENTORY_GESTURE|INVENTORY_LANDMARK|" +
- "INVENTORY_NONE|INVENTORY_NOTECARD|INVENTORY_OBJECT|INVENTORY_SCRIPT|" +
- "INVENTORY_SOUND|INVENTORY_TEXTURE|JSON_APPEND|KFM_CMD_PAUSE|KFM_CMD_PLAY|" +
- "KFM_CMD_SET_MODE|KFM_CMD_STOP|KFM_COMMAND|KFM_DATA|KFM_FORWARD|KFM_LOOP|" +
- "KFM_MODE|KFM_PING_PONG|KFM_REVERSE|KFM_ROTATION|KFM_TRANSLATION|LAND_LEVEL|" +
- "LAND_LOWER|LAND_NOISE|LAND_RAISE|LAND_REVERT|LAND_SMOOTH|LINK_ALL_CHILDREN|" +
- "LINK_ALL_OTHERS|LINK_ROOT|LINK_SET|LINK_THIS|LIST_STAT_GEOMETRIC_MEAN|" +
- "LIST_STAT_MAX|LIST_STAT_MEAN|LIST_STAT_MEDIAN|LIST_STAT_MIN|LIST_STAT_NUM_COUNT|" +
- "LIST_STAT_RANGE|LIST_STAT_STD_DEV|LIST_STAT_SUM|LIST_STAT_SUM_SQUARES|" +
- "LOOP|MASK_BASE|MASK_EVERYONE|MASK_GROUP|MASK_NEXT|MASK_OWNER|OBJECT_ATTACHED_POINT|" +
- "OBJECT_CHARACTER_TIME|OBJECT_CREATOR|OBJECT_DESC|OBJECT_GROUP|OBJECT_NAME|" +
- "OBJECT_OWNER|OBJECT_PATHFINDING_TYPE|OBJECT_PHANTOM|OBJECT_PHYSICS|OBJECT_PHYSICS_COST|" +
- "OBJECT_POS|OBJECT_PRIM_EQUIVALENCE|OBJECT_RETURN_PARCEL|OBJECT_RETURN_PARCEL_OWNER|" +
- "OBJECT_RETURN_REGION|OBJECT_ROOT|OBJECT_ROT|OBJECT_RUNNING_SCRIPT_COUNT|" +
- "OBJECT_SCRIPT_MEMORY|OBJECT_SCRIPT_TIME|OBJECT_SERVER_COST|OBJECT_STREAMING_COST|" +
- "OBJECT_TEMP_ON_REZ|OBJECT_TOTAL_SCRIPT_COUNT|OBJECT_UNKNOWN_DETAIL|OBJECT_VELOCITY|" +
- "OPT_AVATAR|OPT_CHARACTER|OPT_EXCLUSION_VOLUME|OPT_LEGACY_LINKSET|OPT_MATERIAL_VOLUME|" +
- "OPT_OTHER|OPT_STATIC_OBSTACLE|OPT_WALKABLE|PARCEL_COUNT_GROUP|PARCEL_COUNT_OTHER|" +
- "PARCEL_COUNT_OWNER|PARCEL_COUNT_SELECTED|PARCEL_COUNT_TEMP|PARCEL_COUNT_TOTAL|" +
- "PARCEL_DETAILS_AREA|PARCEL_DETAILS_DESC|PARCEL_DETAILS_GROUP|PARCEL_DETAILS_ID|" +
- "PARCEL_DETAILS_NAME|PARCEL_DETAILS_OWNER|PARCEL_DETAILS_SEE_AVATARS|" +
- "PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS|" +
- "PARCEL_FLAG_ALLOW_CREATE_OBJECTS|PARCEL_FLAG_ALLOW_DAMAGE|PARCEL_FLAG_ALLOW_FLY|" +
- "PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_GROUP_SCRIPTS|" +
- "PARCEL_FLAG_ALLOW_LANDMARK|PARCEL_FLAG_ALLOW_SCRIPTS|PARCEL_FLAG_ALLOW_TERRAFORM|" +
- "PARCEL_FLAG_LOCAL_SOUND_ONLY|PARCEL_FLAG_RESTRICT_PUSHOBJECT|PARCEL_FLAG_USE_ACCESS_GROUP|" +
- "PARCEL_FLAG_USE_ACCESS_LIST|PARCEL_FLAG_USE_BAN_LIST|PARCEL_FLAG_USE_LAND_PASS_LIST|" +
- "PARCEL_MEDIA_COMMAND_AGENT|PARCEL_MEDIA_COMMAND_AUTO_ALIGN|PARCEL_MEDIA_COMMAND_DESC|" +
- "PARCEL_MEDIA_COMMAND_LOOP|PARCEL_MEDIA_COMMAND_LOOP_SET|PARCEL_MEDIA_COMMAND_PAUSE|" +
- "PARCEL_MEDIA_COMMAND_PLAY|PARCEL_MEDIA_COMMAND_SIZE|PARCEL_MEDIA_COMMAND_STOP|" +
- "PARCEL_MEDIA_COMMAND_TEXTURE|PARCEL_MEDIA_COMMAND_TIME|PARCEL_MEDIA_COMMAND_TYPE|" +
- "PARCEL_MEDIA_COMMAND_UNLOAD|PARCEL_MEDIA_COMMAND_URL|PASSIVE|PATROL_PAUSE_AT_WAYPOINTS|" +
- "PAY_DEFAULT|PAY_HIDE|PAYMENT_INFO_ON_FILE|PAYMENT_INFO_USED|PERM_ALL|" +
- "PERM_COPY|PERM_MODIFY|PERM_MOVE|PERM_TRANSFER|PERMISSION_ATTACH|PERMISSION_CHANGE_LINKS|" +
- "PERMISSION_CONTROL_CAMERA|PERMISSION_DEBIT|PERMISSION_OVERRIDE_ANIMATIONS|" +
- "PERMISSION_RETURN_OBJECTS|PERMISSION_SILENT_ESTATE_MANAGEMENT|PERMISSION_TAKE_CONTROLS|" +
- "PERMISSION_TELEPORT|PERMISSION_TRACK_CAMERA|PERMISSION_TRIGGER_ANIMATION|" +
- "PING_PONG|PRIM_BUMP_BARK|PRIM_BUMP_BLOBS|PRIM_BUMP_BRICKS|PRIM_BUMP_BRIGHT|" +
- "PRIM_BUMP_CHECKER|PRIM_BUMP_CONCRETE|PRIM_BUMP_DARK|PRIM_BUMP_DISKS|" +
- "PRIM_BUMP_GRAVEL|PRIM_BUMP_LARGETILE|PRIM_BUMP_NONE|PRIM_BUMP_SHINY|" +
- "PRIM_BUMP_SIDING|PRIM_BUMP_STONE|PRIM_BUMP_STUCCO|PRIM_BUMP_SUCTION|" +
- "PRIM_BUMP_TILE|PRIM_BUMP_WEAVE|PRIM_BUMP_WOOD|PRIM_COLOR|PRIM_DESC|PRIM_FLEXIBLE|" +
- "PRIM_FULLBRIGHT|PRIM_GLOW|PRIM_HOLE_CIRCLE|PRIM_HOLE_DEFAULT|PRIM_HOLE_SQUARE|" +
- "PRIM_HOLE_TRIANGLE|PRIM_LINK_TARGET|PRIM_MATERIAL|PRIM_MATERIAL_FLESH|" +
- "PRIM_MATERIAL_GLASS|PRIM_MATERIAL_METAL|PRIM_MATERIAL_PLASTIC|PRIM_MATERIAL_RUBBER|" +
- "PRIM_MATERIAL_STONE|PRIM_MATERIAL_WOOD|PRIM_MEDIA_ALT_IMAGE_ENABLE|PRIM_MEDIA_AUTO_LOOP|" +
- "PRIM_MEDIA_AUTO_PLAY|PRIM_MEDIA_AUTO_SCALE|PRIM_MEDIA_AUTO_ZOOM|PRIM_MEDIA_CONTROLS|" +
- "PRIM_MEDIA_CONTROLS_MINI|PRIM_MEDIA_CONTROLS_STANDARD|PRIM_MEDIA_CURRENT_URL|" +
- "PRIM_MEDIA_FIRST_CLICK_INTERACT|PRIM_MEDIA_HEIGHT_PIXELS|PRIM_MEDIA_HOME_URL|" +
- "PRIM_MEDIA_MAX_HEIGHT_PIXELS|PRIM_MEDIA_MAX_URL_LENGTH|PRIM_MEDIA_MAX_WHITELIST_COUNT|" +
- "PRIM_MEDIA_MAX_WHITELIST_SIZE|PRIM_MEDIA_MAX_WIDTH_PIXELS|PRIM_MEDIA_PARAM_MAX|" +
- "PRIM_MEDIA_PERM_ANYONE|PRIM_MEDIA_PERM_GROUP|PRIM_MEDIA_PERM_NONE|PRIM_MEDIA_PERM_OWNER|" +
- "PRIM_MEDIA_PERMS_CONTROL|PRIM_MEDIA_PERMS_INTERACT|PRIM_MEDIA_WHITELIST|" +
- "PRIM_MEDIA_WHITELIST_ENABLE|PRIM_MEDIA_WIDTH_PIXELS|PRIM_NAME|PRIM_OMEGA|" +
- "PRIM_PHANTOM|PRIM_PHYSICS|PRIM_PHYSICS_SHAPE_CONVEX|PRIM_PHYSICS_SHAPE_NONE|" +
- "PRIM_PHYSICS_SHAPE_PRIM|PRIM_PHYSICS_SHAPE_TYPE|PRIM_POINT_LIGHT|PRIM_POS_LOCAL|" +
- "PRIM_POSITION|PRIM_ROT_LOCAL|PRIM_ROTATION|PRIM_SCULPT_FLAG_INVERT|PRIM_SCULPT_FLAG_MIRROR|" +
- "PRIM_SCULPT_TYPE_CYLINDER|PRIM_SCULPT_TYPE_MASK|PRIM_SCULPT_TYPE_PLANE|" +
- "PRIM_SCULPT_TYPE_SPHERE|PRIM_SCULPT_TYPE_TORUS|PRIM_SHINY_HIGH|PRIM_SHINY_LOW|" +
- "PRIM_SHINY_MEDIUM|PRIM_SHINY_NONE|PRIM_SIZE|PRIM_SLICE|PRIM_TEMP_ON_REZ|" +
- "PRIM_TEXGEN|PRIM_TEXGEN_DEFAULT|PRIM_TEXGEN_PLANAR|PRIM_TEXT|PRIM_TEXTURE|" +
- "PRIM_TYPE|PRIM_TYPE_BOX|PRIM_TYPE_CYLINDER|PRIM_TYPE_PRISM|PRIM_TYPE_RING|" +
- "PRIM_TYPE_SCULPT|PRIM_TYPE_SPHERE|PRIM_TYPE_TORUS|PRIM_TYPE_TUBE|PROFILE_NONE|" +
- "PROFILE_SCRIPT_MEMORY|PSYS_PART_BOUNCE_MASK|PSYS_PART_EMISSIVE_MASK|" +
- "PSYS_PART_END_ALPHA|PSYS_PART_END_COLOR|PSYS_PART_END_SCALE|PSYS_PART_FLAGS|" +
- "PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_INTERP_COLOR_MASK|" +
- "PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_MAX_AGE|PSYS_PART_START_ALPHA|" +
- "PSYS_PART_START_COLOR|PSYS_PART_START_SCALE|PSYS_PART_TARGET_LINEAR_MASK|" +
- "PSYS_PART_TARGET_POS_MASK|PSYS_PART_WIND_MASK|PSYS_SRC_ACCEL|PSYS_SRC_ANGLE_BEGIN|" +
- "PSYS_SRC_ANGLE_END|PSYS_SRC_BURST_PART_COUNT|PSYS_SRC_BURST_RADIUS|PSYS_SRC_BURST_RATE|" +
- "PSYS_SRC_BURST_SPEED_MAX|PSYS_SRC_BURST_SPEED_MIN|PSYS_SRC_MAX_AGE|PSYS_SRC_OMEGA|" +
- "PSYS_SRC_PATTERN|PSYS_SRC_PATTERN_ANGLE|PSYS_SRC_PATTERN_ANGLE_CONE|" +
- "PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY|PSYS_SRC_PATTERN_DROP|PSYS_SRC_PATTERN_EXPLODE|" +
- "PSYS_SRC_TARGET_KEY|PSYS_SRC_TEXTURE|PU_EVADE_HIDDEN|PU_EVADE_SPOTTED|" +
- "PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED|PU_FAILURE_INVALID_GOAL|PU_FAILURE_INVALID_START|" +
- "PU_FAILURE_NO_NAVMESH|PU_FAILURE_NO_VALID_DESTINATION|PU_FAILURE_OTHER|" +
- "PU_FAILURE_PARCEL_UNREACHABLE|PU_FAILURE_TARGET_GONE|PU_FAILURE_UNREACHABLE|" +
- "PU_GOAL_REACHED|PU_SLOWDOWN_DISTANCE_REACHED|PUBLIC_CHANNEL|PURSUIT_FUZZ_FACTOR|" +
- "PURSUIT_GOAL_TOLERANCE|PURSUIT_INTERCEPT|PURSUIT_OFFSET|RC_DATA_FLAGS|" +
- "RC_DETECT_PHANTOM|RC_GET_LINK_NUM|RC_GET_NORMAL|RC_GET_ROOT_KEY|RC_MAX_HITS|" +
- "RC_REJECT_AGENTS|RC_REJECT_LAND|RC_REJECT_NONPHYSICAL|RC_REJECT_PHYSICAL|" +
- "RC_REJECT_TYPES|RCERR_CAST_TIME_EXCEEDED|RCERR_SIM_PERF_LOW|RCERR_UNKNOWN|" +
- "REGION_FLAG_ALLOW_DAMAGE|REGION_FLAG_ALLOW_DIRECT_TELEPORT|REGION_FLAG_BLOCK_FLY|" +
- "REGION_FLAG_BLOCK_TERRAFORM|REGION_FLAG_DISABLE_COLLISIONS|REGION_FLAG_DISABLE_PHYSICS|" +
- "REGION_FLAG_FIXED_SUN|REGION_FLAG_RESTRICT_PUSHOBJECT|REGION_FLAG_SANDBOX|" +
- "REMOTE_DATA_CHANNEL|REMOTE_DATA_REPLY|REMOTE_DATA_REQUEST|REQUIRE_LINE_OF_SIGHT|" +
- "RESTITUTION|REVERSE|ROTATE|SCALE|SCRIPTED|SIM_STAT_PCT_CHARS_STEPPED|" +
- "SMOOTH|STATUS_BLOCK_GRAB|STATUS_BLOCK_GRAB_OBJECT|STATUS_BOUNDS_ERROR|" +
- "STATUS_CAST_SHADOWS|STATUS_DIE_AT_EDGE|STATUS_INTERNAL_ERROR|STATUS_MALFORMED_PARAMS|" +
- "STATUS_NOT_FOUND|STATUS_NOT_SUPPORTED|STATUS_OK|STATUS_PHANTOM|STATUS_PHYSICS|" +
- "STATUS_RETURN_AT_EDGE|STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|" +
- "STATUS_SANDBOX|STATUS_TYPE_MISMATCH|STATUS_WHITELIST_FAILED|STRING_TRIM|" +
- "STRING_TRIM_HEAD|STRING_TRIM_TAIL|TOUCH_INVALID_FACE|TRAVERSAL_TYPE|" +
- "TRAVERSAL_TYPE_FAST|TRAVERSAL_TYPE_NONE|TRAVERSAL_TYPE_SLOW|TYPE_FLOAT|" +
- "TYPE_INTEGER|TYPE_INVALID|TYPE_KEY|TYPE_ROTATION|TYPE_STRING|TYPE_VECTOR|" +
- "VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY|VEHICLE_ANGULAR_DEFLECTION_TIMESCALE|" +
- "VEHICLE_ANGULAR_FRICTION_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE|" +
- "VEHICLE_ANGULAR_MOTOR_DIRECTION|VEHICLE_ANGULAR_MOTOR_TIMESCALE|VEHICLE_BANKING_EFFICIENCY|" +
- "VEHICLE_BANKING_MIX|VEHICLE_BANKING_TIMESCALE|VEHICLE_BUOYANCY|VEHICLE_FLAG_CAMERA_DECOUPLED|" +
- "VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT|VEHICLE_FLAG_HOVER_TERRAIN_ONLY|VEHICLE_FLAG_HOVER_UP_ONLY|" +
- "VEHICLE_FLAG_HOVER_WATER_ONLY|VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_LIMIT_ROLL_ONLY|" +
- "VEHICLE_FLAG_MOUSELOOK_BANK|VEHICLE_FLAG_MOUSELOOK_STEER|VEHICLE_FLAG_NO_DEFLECTION_UP|" +
- "VEHICLE_HOVER_EFFICIENCY|VEHICLE_HOVER_HEIGHT|VEHICLE_HOVER_TIMESCALE|" +
- "VEHICLE_LINEAR_DEFLECTION_EFFICIENCY|VEHICLE_LINEAR_DEFLECTION_TIMESCALE|" +
- "VEHICLE_LINEAR_FRICTION_TIMESCALE|VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE|" +
- "VEHICLE_LINEAR_MOTOR_DIRECTION|VEHICLE_LINEAR_MOTOR_OFFSET|VEHICLE_LINEAR_MOTOR_TIMESCALE|" +
- "VEHICLE_REFERENCE_FRAME|VEHICLE_TYPE_AIRPLANE|VEHICLE_TYPE_BALLOON|VEHICLE_TYPE_BOAT|" +
- "VEHICLE_TYPE_CAR|VEHICLE_TYPE_NONE|VEHICLE_TYPE_SLED|VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY|" +
- "VEHICLE_VERTICAL_ATTRACTION_TIMESCALE|VERTICAL|WANDER_PAUSE_AT_WAYPOINTS",
+ "constant.language.integer.lsl": "ACTIVE|AGENT|AGENT_ALWAYS_RUN|AGENT_ATTACHMENTS|AGENT_AUTOPILOT|AGENT_AWAY|AGENT_BUSY|AGENT_BY_LEGACY_NAME|AGENT_BY_USERNAME|AGENT_CROUCHING|AGENT_FLYING|AGENT_IN_AIR|AGENT_LIST_PARCEL|AGENT_LIST_PARCEL_OWNER|AGENT_LIST_REGION|AGENT_MOUSELOOK|AGENT_ON_OBJECT|AGENT_SCRIPTED|AGENT_SITTING|AGENT_TYPING|AGENT_WALKING|ALL_SIDES|ANIM_ON|ATTACH_AVATAR_CENTER|ATTACH_BACK|ATTACH_BELLY|ATTACH_CHEST|ATTACH_CHIN|ATTACH_HEAD|ATTACH_HUD_BOTTOM|ATTACH_HUD_BOTTOM_LEFT|ATTACH_HUD_BOTTOM_RIGHT|ATTACH_HUD_CENTER_1|ATTACH_HUD_CENTER_2|ATTACH_HUD_TOP_CENTER|ATTACH_HUD_TOP_LEFT|ATTACH_HUD_TOP_RIGHT|ATTACH_LEAR|ATTACH_LEFT_PEC|ATTACH_LEYE|ATTACH_LFOOT|ATTACH_LHAND|ATTACH_LHIP|ATTACH_LLARM|ATTACH_LLLEG|ATTACH_LSHOULDER|ATTACH_LUARM|ATTACH_LULEG|ATTACH_MOUTH|ATTACH_NECK|ATTACH_NOSE|ATTACH_PELVIS|ATTACH_REAR|ATTACH_REYE|ATTACH_RFOOT|ATTACH_RHAND|ATTACH_RHIP|ATTACH_RIGHT_PEC|ATTACH_RLARM|ATTACH_RLLEG|ATTACH_RSHOULDER|ATTACH_RUARM|ATTACH_RULEG|AVOID_CHARACTERS|AVOID_DYNAMIC_OBSTACLES|AVOID_NONE|CAMERA_ACTIVE|CAMERA_BEHINDNESS_ANGLE|CAMERA_BEHINDNESS_LAG|CAMERA_DISTANCE|CAMERA_FOCUS|CAMERA_FOCUS_LAG|CAMERA_FOCUS_LOCKED|CAMERA_FOCUS_OFFSET|CAMERA_FOCUS_THRESHOLD|CAMERA_PITCH|CAMERA_POSITION|CAMERA_POSITION_LAG|CAMERA_POSITION_LOCKED|CAMERA_POSITION_THRESHOLD|CHANGED_ALLOWED_DROP|CHANGED_COLOR|CHANGED_INVENTORY|CHANGED_LINK|CHANGED_MEDIA|CHANGED_OWNER|CHANGED_REGION|CHANGED_REGION_START|CHANGED_SCALE|CHANGED_SHAPE|CHANGED_TELEPORT|CHANGED_TEXTURE|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|CHARACTER_AVOIDANCE_MODE|CHARACTER_CMD_JUMP|CHARACTER_CMD_SMOOTH_STOP|CHARACTER_CMD_STOP|CHARACTER_DESIRED_SPEED|CHARACTER_DESIRED_TURN_SPEED|CHARACTER_LENGTH|CHARACTER_MAX_ACCEL|CHARACTER_MAX_DECEL|CHARACTER_MAX_SPEED|CHARACTER_MAX_TURN_RADIUS|CHARACTER_ORIENTATION|CHARACTER_RADIUS|CHARACTER_STAY_WITHIN_PARCEL|CHARACTER_TYPE|CHARACTER_TYPE_A|CHARACTER_TYPE_B|CHARACTER_TYPE_C|CHARACTER_TYPE_D|CHARACTER_TYPE_NONE|CLICK_ACTION_BUY|CLICK_ACTION_NONE|CLICK_ACTION_OPEN|CLICK_ACTION_OPEN_MEDIA|CLICK_ACTION_PAY|CLICK_ACTION_PLAY|CLICK_ACTION_SIT|CLICK_ACTION_TOUCH|CONTENT_TYPE_ATOM|CONTENT_TYPE_FORM|CONTENT_TYPE_HTML|CONTENT_TYPE_JSON|CONTENT_TYPE_LLSD|CONTENT_TYPE_RSS|CONTENT_TYPE_TEXT|CONTENT_TYPE_XHTML|CONTENT_TYPE_XML|CONTROL_BACK|CONTROL_DOWN|CONTROL_FWD|CONTROL_LBUTTON|CONTROL_LEFT|CONTROL_ML_LBUTTON|CONTROL_RIGHT|CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT|CONTROL_UP|DATA_BORN|DATA_NAME|DATA_ONLINE|DATA_PAYINFO|DATA_SIM_POS|DATA_SIM_RATING|DATA_SIM_STATUS|DEBUG_CHANNEL|DENSITY|ERR_GENERIC|ERR_MALFORMED_PARAMS|ERR_PARCEL_PERMISSIONS|ERR_RUNTIME_PERMISSIONS|ERR_THROTTLED|ESTATE_ACCESS_ALLOWED_AGENT_ADD|ESTATE_ACCESS_ALLOWED_AGENT_REMOVE|ESTATE_ACCESS_ALLOWED_GROUP_ADD|ESTATE_ACCESS_ALLOWED_GROUP_REMOVE|ESTATE_ACCESS_BANNED_AGENT_ADD|ESTATE_ACCESS_BANNED_AGENT_REMOVE|FALSE|FORCE_DIRECT_PATH|FRICTION|GCNP_RADIUS|GCNP_STATIC|GRAVITY_MULTIPLIER|HORIZONTAL|HTTP_BODY_MAXLENGTH|HTTP_BODY_TRUNCATED|HTTP_CUSTOM_HEADER|HTTP_METHOD|HTTP_MIMETYPE|HTTP_PRAGMA_NO_CACHE|HTTP_VERBOSE_THROTTLE|HTTP_VERIFY_CERT|INVENTORY_ALL|INVENTORY_ANIMATION|INVENTORY_BODYPART|INVENTORY_CLOTHING|INVENTORY_GESTURE|INVENTORY_LANDMARK|INVENTORY_NONE|INVENTORY_NOTECARD|INVENTORY_OBJECT|INVENTORY_SCRIPT|INVENTORY_SOUND|INVENTORY_TEXTURE|JSON_APPEND|KFM_CMD_PAUSE|KFM_CMD_PLAY|KFM_CMD_SET_MODE|KFM_CMD_STOP|KFM_COMMAND|KFM_DATA|KFM_FORWARD|KFM_LOOP|KFM_MODE|KFM_PING_PONG|KFM_REVERSE|KFM_ROTATION|KFM_TRANSLATION|LAND_LEVEL|LAND_LOWER|LAND_NOISE|LAND_RAISE|LAND_REVERT|LAND_SMOOTH|LINK_ALL_CHILDREN|LINK_ALL_OTHERS|LINK_ROOT|LINK_SET|LINK_THIS|LIST_STAT_GEOMETRIC_MEAN|LIST_STAT_MAX|LIST_STAT_MEAN|LIST_STAT_MEDIAN|LIST_STAT_MIN|LIST_STAT_NUM_COUNT|LIST_STAT_RANGE|LIST_STAT_STD_DEV|LIST_STAT_SUM|LIST_STAT_SUM_SQUARES|LOOP|MASK_BASE|MASK_EVERYONE|MASK_GROUP|MASK_NEXT|MASK_OWNER|OBJECT_ATTACHED_POINT|OBJECT_CHARACTER_TIME|OBJECT_CREATOR|OBJECT_DESC|OBJECT_GROUP|OBJECT_NAME|OBJECT_OWNER|OBJECT_PATHFINDING_TYPE|OBJECT_PHANTOM|OBJECT_PHYSICS|OBJECT_PHYSICS_COST|OBJECT_POS|OBJECT_PRIM_EQUIVALENCE|OBJECT_RENDER_WEIGHT|OBJECT_RETURN_PARCEL|OBJECT_RETURN_PARCEL_OWNER|OBJECT_RETURN_REGION|OBJECT_ROOT|OBJECT_ROT|OBJECT_RUNNING_SCRIPT_COUNT|OBJECT_SCRIPT_MEMORY|OBJECT_SCRIPT_TIME|OBJECT_SERVER_COST|OBJECT_STREAMING_COST|OBJECT_TEMP_ON_REZ|OBJECT_TOTAL_SCRIPT_COUNT|OBJECT_UNKNOWN_DETAIL|OBJECT_VELOCITY|OPT_AVATAR|OPT_CHARACTER|OPT_EXCLUSION_VOLUME|OPT_LEGACY_LINKSET|OPT_MATERIAL_VOLUME|OPT_OTHER|OPT_STATIC_OBSTACLE|OPT_WALKABLE|PARCEL_COUNT_GROUP|PARCEL_COUNT_OTHER|PARCEL_COUNT_OWNER|PARCEL_COUNT_SELECTED|PARCEL_COUNT_TEMP|PARCEL_COUNT_TOTAL|PARCEL_DETAILS_AREA|PARCEL_DETAILS_DESC|PARCEL_DETAILS_GROUP|PARCEL_DETAILS_ID|PARCEL_DETAILS_NAME|PARCEL_DETAILS_OWNER|PARCEL_DETAILS_SEE_AVATARS|PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS|PARCEL_FLAG_ALLOW_CREATE_OBJECTS|PARCEL_FLAG_ALLOW_DAMAGE|PARCEL_FLAG_ALLOW_FLY|PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_GROUP_SCRIPTS|PARCEL_FLAG_ALLOW_LANDMARK|PARCEL_FLAG_ALLOW_SCRIPTS|PARCEL_FLAG_ALLOW_TERRAFORM|PARCEL_FLAG_LOCAL_SOUND_ONLY|PARCEL_FLAG_RESTRICT_PUSHOBJECT|PARCEL_FLAG_USE_ACCESS_GROUP|PARCEL_FLAG_USE_ACCESS_LIST|PARCEL_FLAG_USE_BAN_LIST|PARCEL_FLAG_USE_LAND_PASS_LIST|PARCEL_MEDIA_COMMAND_AGENT|PARCEL_MEDIA_COMMAND_AUTO_ALIGN|PARCEL_MEDIA_COMMAND_DESC|PARCEL_MEDIA_COMMAND_LOOP|PARCEL_MEDIA_COMMAND_LOOP_SET|PARCEL_MEDIA_COMMAND_PAUSE|PARCEL_MEDIA_COMMAND_PLAY|PARCEL_MEDIA_COMMAND_SIZE|PARCEL_MEDIA_COMMAND_STOP|PARCEL_MEDIA_COMMAND_TEXTURE|PARCEL_MEDIA_COMMAND_TIME|PARCEL_MEDIA_COMMAND_TYPE|PARCEL_MEDIA_COMMAND_UNLOAD|PARCEL_MEDIA_COMMAND_URL|PASSIVE|PATROL_PAUSE_AT_WAYPOINTS|PAYMENT_INFO_ON_FILE|PAYMENT_INFO_USED|PAY_DEFAULT|PAY_HIDE|PERMISSION_ATTACH|PERMISSION_CHANGE_LINKS|PERMISSION_CONTROL_CAMERA|PERMISSION_DEBIT|PERMISSION_OVERRIDE_ANIMATIONS|PERMISSION_RETURN_OBJECTS|PERMISSION_SILENT_ESTATE_MANAGEMENT|PERMISSION_TAKE_CONTROLS|PERMISSION_TELEPORT|PERMISSION_TRACK_CAMERA|PERMISSION_TRIGGER_ANIMATION|PERM_ALL|PERM_COPY|PERM_MODIFY|PERM_MOVE|PERM_TRANSFER|PING_PONG|PRIM_ALPHA_MODE|PRIM_ALPHA_MODE_BLEND|PRIM_ALPHA_MODE_EMISSIVE|PRIM_ALPHA_MODE_MASK|PRIM_ALPHA_MODE_NONE|PRIM_BUMP_BARK|PRIM_BUMP_BLOBS|PRIM_BUMP_BRICKS|PRIM_BUMP_BRIGHT|PRIM_BUMP_CHECKER|PRIM_BUMP_CONCRETE|PRIM_BUMP_DARK|PRIM_BUMP_DISKS|PRIM_BUMP_GRAVEL|PRIM_BUMP_LARGETILE|PRIM_BUMP_NONE|PRIM_BUMP_SHINY|PRIM_BUMP_SIDING|PRIM_BUMP_STONE|PRIM_BUMP_STUCCO|PRIM_BUMP_SUCTION|PRIM_BUMP_TILE|PRIM_BUMP_WEAVE|PRIM_BUMP_WOOD|PRIM_COLOR|PRIM_DESC|PRIM_FLEXIBLE|PRIM_FULLBRIGHT|PRIM_GLOW|PRIM_HOLE_CIRCLE|PRIM_HOLE_DEFAULT|PRIM_HOLE_SQUARE|PRIM_HOLE_TRIANGLE|PRIM_LINK_TARGET|PRIM_MATERIAL|PRIM_MATERIAL_FLESH|PRIM_MATERIAL_GLASS|PRIM_MATERIAL_METAL|PRIM_MATERIAL_PLASTIC|PRIM_MATERIAL_RUBBER|PRIM_MATERIAL_STONE|PRIM_MATERIAL_WOOD|PRIM_MEDIA_ALT_IMAGE_ENABLE|PRIM_MEDIA_AUTO_LOOP|PRIM_MEDIA_AUTO_PLAY|PRIM_MEDIA_AUTO_SCALE|PRIM_MEDIA_AUTO_ZOOM|PRIM_MEDIA_CONTROLS|PRIM_MEDIA_CONTROLS_MINI|PRIM_MEDIA_CONTROLS_STANDARD|PRIM_MEDIA_CURRENT_URL|PRIM_MEDIA_FIRST_CLICK_INTERACT|PRIM_MEDIA_HEIGHT_PIXELS|PRIM_MEDIA_HOME_URL|PRIM_MEDIA_MAX_HEIGHT_PIXELS|PRIM_MEDIA_MAX_URL_LENGTH|PRIM_MEDIA_MAX_WHITELIST_COUNT|PRIM_MEDIA_MAX_WHITELIST_SIZE|PRIM_MEDIA_MAX_WIDTH_PIXELS|PRIM_MEDIA_PARAM_MAX|PRIM_MEDIA_PERMS_CONTROL|PRIM_MEDIA_PERMS_INTERACT|PRIM_MEDIA_PERM_ANYONE|PRIM_MEDIA_PERM_GROUP|PRIM_MEDIA_PERM_NONE|PRIM_MEDIA_PERM_OWNER|PRIM_MEDIA_WHITELIST|PRIM_MEDIA_WHITELIST_ENABLE|PRIM_MEDIA_WIDTH_PIXELS|PRIM_NAME|PRIM_NORMAL|PRIM_OMEGA|PRIM_PHANTOM|PRIM_PHYSICS|PRIM_PHYSICS_SHAPE_CONVEX|PRIM_PHYSICS_SHAPE_NONE|PRIM_PHYSICS_SHAPE_PRIM|PRIM_PHYSICS_SHAPE_TYPE|PRIM_POINT_LIGHT|PRIM_POSITION|PRIM_POS_LOCAL|PRIM_ROTATION|PRIM_ROT_LOCAL|PRIM_SCULPT_FLAG_INVERT|PRIM_SCULPT_FLAG_MIRROR|PRIM_SCULPT_TYPE_CYLINDER|PRIM_SCULPT_TYPE_MASK|PRIM_SCULPT_TYPE_PLANE|PRIM_SCULPT_TYPE_SPHERE|PRIM_SCULPT_TYPE_TORUS|PRIM_SHINY_HIGH|PRIM_SHINY_LOW|PRIM_SHINY_MEDIUM|PRIM_SHINY_NONE|PRIM_SIZE|PRIM_SLICE|PRIM_SPECULAR|PRIM_TEMP_ON_REZ|PRIM_TEXGEN|PRIM_TEXGEN_DEFAULT|PRIM_TEXGEN_PLANAR|PRIM_TEXT|PRIM_TEXTURE|PRIM_TYPE|PRIM_TYPE_BOX|PRIM_TYPE_CYLINDER|PRIM_TYPE_PRISM|PRIM_TYPE_RING|PRIM_TYPE_SCULPT|PRIM_TYPE_SPHERE|PRIM_TYPE_TORUS|PRIM_TYPE_TUBE|PROFILE_NONE|PROFILE_SCRIPT_MEMORY|PSYS_PART_BF_DEST_COLOR|PSYS_PART_BF_ONE|PSYS_PART_BF_ONE_MINUS_DEST_COLOR|PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA|PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR|PSYS_PART_BF_SOURCE_ALPHA|PSYS_PART_BF_SOURCE_COLOR|PSYS_PART_BF_ZERO|PSYS_PART_BLEND_FUNC_DEST|PSYS_PART_BLEND_FUNC_SOURCE|PSYS_PART_BOUNCE_MASK|PSYS_PART_EMISSIVE_MASK|PSYS_PART_END_ALPHA|PSYS_PART_END_COLOR|PSYS_PART_END_GLOW|PSYS_PART_END_SCALE|PSYS_PART_FLAGS|PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_INTERP_COLOR_MASK|PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_MAX_AGE|PSYS_PART_RIBBON_MASK|PSYS_PART_START_ALPHA|PSYS_PART_START_COLOR|PSYS_PART_START_GLOW|PSYS_PART_START_SCALE|PSYS_PART_TARGET_LINEAR_MASK|PSYS_PART_TARGET_POS_MASK|PSYS_PART_WIND_MASK|PSYS_SRC_ACCEL|PSYS_SRC_ANGLE_BEGIN|PSYS_SRC_ANGLE_END|PSYS_SRC_BURST_PART_COUNT|PSYS_SRC_BURST_RADIUS|PSYS_SRC_BURST_RATE|PSYS_SRC_BURST_SPEED_MAX|PSYS_SRC_BURST_SPEED_MIN|PSYS_SRC_MAX_AGE|PSYS_SRC_OMEGA|PSYS_SRC_PATTERN|PSYS_SRC_PATTERN_ANGLE|PSYS_SRC_PATTERN_ANGLE_CONE|PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY|PSYS_SRC_PATTERN_DROP|PSYS_SRC_PATTERN_EXPLODE|PSYS_SRC_TARGET_KEY|PSYS_SRC_TEXTURE|PUBLIC_CHANNEL|PURSUIT_FUZZ_FACTOR|PURSUIT_GOAL_TOLERANCE|PURSUIT_INTERCEPT|PURSUIT_OFFSET|PU_EVADE_HIDDEN|PU_EVADE_SPOTTED|PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED|PU_FAILURE_INVALID_GOAL|PU_FAILURE_INVALID_START|PU_FAILURE_NO_NAVMESH|PU_FAILURE_NO_VALID_DESTINATION|PU_FAILURE_OTHER|PU_FAILURE_PARCEL_UNREACHABLE|PU_FAILURE_TARGET_GONE|PU_FAILURE_UNREACHABLE|PU_GOAL_REACHED|PU_SLOWDOWN_DISTANCE_REACHED|RCERR_CAST_TIME_EXCEEDED|RCERR_SIM_PERF_LOW|RCERR_UNKNOWN|RC_DATA_FLAGS|RC_DETECT_PHANTOM|RC_GET_LINK_NUM|RC_GET_NORMAL|RC_GET_ROOT_KEY|RC_MAX_HITS|RC_REJECT_AGENTS|RC_REJECT_LAND|RC_REJECT_NONPHYSICAL|RC_REJECT_PHYSICAL|RC_REJECT_TYPES|REGION_FLAG_ALLOW_DAMAGE|REGION_FLAG_ALLOW_DIRECT_TELEPORT|REGION_FLAG_BLOCK_FLY|REGION_FLAG_BLOCK_TERRAFORM|REGION_FLAG_DISABLE_COLLISIONS|REGION_FLAG_DISABLE_PHYSICS|REGION_FLAG_FIXED_SUN|REGION_FLAG_RESTRICT_PUSHOBJECT|REGION_FLAG_SANDBOX|REMOTE_DATA_CHANNEL|REMOTE_DATA_REPLY|REMOTE_DATA_REQUEST|REQUIRE_LINE_OF_SIGHT|RESTITUTION|REVERSE|ROTATE|SCALE|SCRIPTED|SIM_STAT_PCT_CHARS_STEPPED|SMOOTH|STATUS_BLOCK_GRAB|STATUS_BLOCK_GRAB_OBJECT|STATUS_BOUNDS_ERROR|STATUS_CAST_SHADOWS|STATUS_DIE_AT_EDGE|STATUS_INTERNAL_ERROR|STATUS_MALFORMED_PARAMS|STATUS_NOT_FOUND|STATUS_NOT_SUPPORTED|STATUS_OK|STATUS_PHANTOM|STATUS_PHYSICS|STATUS_RETURN_AT_EDGE|STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|STATUS_SANDBOX|STATUS_TYPE_MISMATCH|STATUS_WHITELIST_FAILED|STRING_TRIM|STRING_TRIM_HEAD|STRING_TRIM_TAIL|TOUCH_INVALID_FACE|TRAVERSAL_TYPE|TRAVERSAL_TYPE_FAST|TRAVERSAL_TYPE_NONE|TRAVERSAL_TYPE_SLOW|TRUE|TYPE_FLOAT|TYPE_INTEGER|TYPE_INVALID|TYPE_KEY|TYPE_ROTATION|TYPE_STRING|TYPE_VECTOR|VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY|VEHICLE_ANGULAR_DEFLECTION_TIMESCALE|VEHICLE_ANGULAR_FRICTION_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DIRECTION|VEHICLE_ANGULAR_MOTOR_TIMESCALE|VEHICLE_BANKING_EFFICIENCY|VEHICLE_BANKING_MIX|VEHICLE_BANKING_TIMESCALE|VEHICLE_BUOYANCY|VEHICLE_FLAG_CAMERA_DECOUPLED|VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT|VEHICLE_FLAG_HOVER_TERRAIN_ONLY|VEHICLE_FLAG_HOVER_UP_ONLY|VEHICLE_FLAG_HOVER_WATER_ONLY|VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_LIMIT_ROLL_ONLY|VEHICLE_FLAG_MOUSELOOK_BANK|VEHICLE_FLAG_MOUSELOOK_STEER|VEHICLE_FLAG_NO_DEFLECTION_UP|VEHICLE_HOVER_EFFICIENCY|VEHICLE_HOVER_HEIGHT|VEHICLE_HOVER_TIMESCALE|VEHICLE_LINEAR_DEFLECTION_EFFICIENCY|VEHICLE_LINEAR_DEFLECTION_TIMESCALE|VEHICLE_LINEAR_FRICTION_TIMESCALE|VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE|VEHICLE_LINEAR_MOTOR_DIRECTION|VEHICLE_LINEAR_MOTOR_OFFSET|VEHICLE_LINEAR_MOTOR_TIMESCALE|VEHICLE_REFERENCE_FRAME|VEHICLE_TYPE_AIRPLANE|VEHICLE_TYPE_BALLOON|VEHICLE_TYPE_BOAT|VEHICLE_TYPE_CAR|VEHICLE_TYPE_NONE|VEHICLE_TYPE_SLED|VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY|VEHICLE_VERTICAL_ATTRACTION_TIMESCALE|VERTICAL|WANDER_PAUSE_AT_WAYPOINTS|XP_ERROR_EXPERIENCES_DISABLED|XP_ERROR_EXPERIENCE_DISABLED|XP_ERROR_EXPERIENCE_SUSPENDED|XP_ERROR_INVALID_EXPERIENCE|XP_ERROR_INVALID_PARAMETERS|XP_ERROR_KEY_NOT_FOUND|XP_ERROR_MATURITY_EXCEEDED|XP_ERROR_NONE|XP_ERROR_NOT_FOUND|XP_ERROR_NOT_PERMITTED|XP_ERROR_NO_EXPERIENCE|XP_ERROR_QUOTA_EXCEEDED|XP_ERROR_RETRY_UPDATE|XP_ERROR_STORAGE_EXCEPTION|XP_ERROR_STORE_DISABLED|XP_ERROR_THROTTLED|XP_ERROR_UNKNOWN_ERROR",
"constant.language.integer.boolean.lsl" : "FALSE|TRUE",
"constant.language.quaternion.lsl" : "ZERO_ROTATION",
- "constant.language.string.lsl" : "EOF|JSON_ARRAY|JSON_FALSE|JSON_INVALID|" +
- "JSON_NULL|JSON_NUMBER|JSON_OBJECT|JSON_STRING|JSON_TRUE|NULL_KEY|" +
- "TEXTURE_BLANK|TEXTURE_DEFAULT|TEXTURE_MEDIA|TEXTURE_PLYWOOD|" +
- "TEXTURE_TRANSPARENT|URL_REQUEST_DENIED|URL_REQUEST_GRANTED",
+ "constant.language.string.lsl" : "EOF|JSON_ARRAY|JSON_DELETE|JSON_FALSE|JSON_INVALID|JSON_NULL|JSON_NUMBER|JSON_OBJECT|JSON_STRING|JSON_TRUE|NULL_KEY|TEXTURE_BLANK|TEXTURE_DEFAULT|TEXTURE_MEDIA|TEXTURE_PLYWOOD|TEXTURE_TRANSPARENT|URL_REQUEST_DENIED|URL_REQUEST_GRANTED",
"constant.language.vector.lsl" : "TOUCH_INVALID_TEXCOORD|TOUCH_INVALID_VECTOR|ZERO_VECTOR",
"invalid.broken.lsl": "LAND_LARGE_BRUSH|LAND_MEDIUM_BRUSH|LAND_SMALL_BRUSH",
- "invalid.deprecated.lsl" : "ATTACH_LPEC|ATTACH_RPEC|CHARACTER_MAX_ANGULAR_ACCEL|" +
- "CHARACTER_MAX_ANGULAR_SPEED|CHARACTER_TURN_SPEED_MULTIPLIER|DATA_RATING|" +
- "PRIM_CAST_SHADOWS|PRIM_MATERIAL_LIGHT|PRIM_PHYSICS_MATERIAL|PRIM_TYPE_LEGACY|" +
- "PSYS_SRC_INNERANGLE|PSYS_SRC_OUTERANGLE|VEHICLE_FLAG_NO_FLY_UP|llCloud|" +
- "llGodLikeRezObject|llMakeExplosion|llMakeFire|llMakeFountain|llMakeSmoke|" +
- "llRemoteDataSetRegion|llSetInventoryPermMask|llSetObjectPermMask|llSound|" +
- "llSoundPreload|llXorBase64Strings|llXorBase64StringsCorrect",
- "invalid.godmode.lsl": "llGodLikeRezObject|llSetInventoryPermMask|llSetObjectPermMask",
- "invalid.illegal.lsl" : "print",
- "invalid.unimplemented.lsl": "CHARACTER_MAX_ANGULAR_ACCEL|CHARACTER_MAX_ANGULAR_SPEED|" +
- "CHARACTER_TURN_SPEED_MULTIPLIER|PERMISSION_CHANGE_JOINTS|PERMISSION_CHANGE_PERMISSIONS|" +
- "PERMISSION_RELEASE_OWNERSHIP|PERMISSION_REMAP_CONTROLS|PRIM_PHYSICS_MATERIAL|PRIM_TYPE_LEGACY|" +
- "PSYS_SRC_OBJ_REL_MASK|event|llCollisionSprite|llPointAt|llRefreshPrimURL|" +
- "llReleaseCamera|llRemoteLoadScript|llSetPrimURL|llStopPointAt|llTakeCamera",
+ "invalid.deprecated.lsl" : "ATTACH_LPEC|ATTACH_RPEC|DATA_RATING|OBJECT_ATTACHMENT_GEOMETRY_BYTES|OBJECT_ATTACHMENT_SURFACE_AREA|PRIM_CAST_SHADOWS|PRIM_MATERIAL_LIGHT|PRIM_TYPE_LEGACY|PSYS_SRC_INNERANGLE|PSYS_SRC_OUTERANGLE|VEHICLE_FLAG_NO_FLY_UP|llClearExperiencePermissions|llCloud|llGetExperienceList|llMakeExplosion|llMakeFire|llMakeFountain|llMakeSmoke|llRemoteDataSetRegion|llSound|llSoundPreload|llXorBase64Strings|llXorBase64StringsCorrect",
+ "invalid.illegal.lsl": "event",
+ "invalid.unimplemented.lsl": "CHARACTER_MAX_ANGULAR_ACCEL|CHARACTER_MAX_ANGULAR_SPEED|CHARACTER_TURN_SPEED_MULTIPLIER|PERMISSION_CHANGE_JOINTS|PERMISSION_CHANGE_PERMISSIONS|PERMISSION_RELEASE_OWNERSHIP|PERMISSION_REMAP_CONTROLS|PRIM_PHYSICS_MATERIAL|PSYS_SRC_OBJ_REL_MASK|llCollisionSprite|llPointAt|llRefreshPrimURL|llReleaseCamera|llRemoteLoadScript|llSetPrimURL|llStopPointAt|llTakeCamera",
+ "reserved.godmode.lsl": "llGodLikeRezObject|llSetInventoryPermMask|llSetObjectPermMask",
+ "reserved.log.lsl" : "print",
"keyword.control.lsl" : "do|else|for|if|jump|return|while",
"storage.type.lsl" : "float|integer|key|list|quaternion|rotation|string|vector",
- "support.function.lsl": "llAbs|llAcos|llAddToLandBanList|llAddToLandPassList|" +
- "llAdjustSoundVolume|llAllowInventoryDrop|llAngleBetween|llApplyImpulse|" +
- "llApplyRotationalImpulse|llAsin|llAtan2|llAttachToAvatar|llAttachToAvatarTemp|" +
- "llAvatarOnLinkSitTarget|llAvatarOnSitTarget|llAxes2Rot|llAxisAngle2Rot|" +
- "llBase64ToInteger|llBase64ToString|llBreakAllLinks|llBreakLink|llCastRay|" +
- "llCeil|llClearCameraParams|llClearLinkMedia|llClearPrimMedia|llCloseRemoteDataChannel|" +
- "llCollisionFilter|llCollisionSound|llCos|llCreateCharacter|llCreateLink|" +
- "llCSV2List|llDeleteCharacter|llDeleteSubList|llDeleteSubString|llDetachFromAvatar|" +
- "llDetectedGrab|llDetectedGroup|llDetectedKey|llDetectedLinkNumber|llDetectedName|" +
- "llDetectedOwner|llDetectedPos|llDetectedRot|llDetectedTouchBinormal|" +
- "llDetectedTouchFace|llDetectedTouchNormal|llDetectedTouchPos|llDetectedTouchST|" +
- "llDetectedTouchUV|llDetectedType|llDetectedVel|llDialog|llDie|llDumpList2String|" +
- "llEdgeOfWorld|llEjectFromLand|llEmail|llEscapeURL|llEuler2Rot|llExecCharacterCmd|" +
- "llEvade|llFabs|llFleeFrom|llFloor|llForceMouselook|llFrand|llGenerateKey|" +
- "llGetAccel|llGetAgentInfo|llGetAgentLanguage|llGetAgentList|llGetAgentSize|" +
- "llGetAlpha|llGetAndResetTime|llGetAnimation|llGetAnimationList|llGetAnimationOverride|" +
- "llGetAttached|llGetBoundingBox|llGetCameraPos|llGetCameraRot|llGetCenterOfMass|" +
- "llGetClosestNavPoint|llGetColor|llGetCreator|llGetDate|llGetDisplayName|" +
- "llGetEnergy|llGetEnv|llGetForce|llGetFreeMemory|llGetFreeURLs|llGetGeometricCenter|" +
- "llGetGMTclock|llGetHTTPHeader|llGetInventoryCreator|llGetInventoryKey|llGetInventoryName|" +
- "llGetInventoryNumber|llGetInventoryPermMask|llGetInventoryType|llGetKey|" +
- "llGetLandOwnerAt|llGetLinkKey|llGetLinkMedia|llGetLinkName|llGetLinkNumber|" +
- "llGetLinkNumberOfSides|llGetLinkPrimitiveParams|llGetListEntryType|llGetListLength|" +
- "llGetLocalPos|llGetLocalRot|llGetMass|llGetMassMKS|llGetMemoryLimit|" +
- "llGetNextEmail|llGetNotecardLine|llGetNumberOfNotecardLines|llGetNumberOfPrims|" +
- "llGetNumberOfSides|llGetObjectDesc|llGetObjectDetails|llGetObjectMass|" +
- "llGetObjectName|llGetObjectPermMask|llGetObjectPrimCount|llGetOmega|" +
- "llGetOwner|llGetOwnerKey|llGetParcelDetails|llGetParcelFlags|llGetParcelMaxPrims|" +
- "llGetParcelMusicURL|llGetParcelPrimCount|llGetParcelPrimOwners|llGetPermissions|" +
- "llGetPermissionsKey|llGetPhysicsMaterial|llGetPos|llGetPrimitiveParams|" +
- "llGetPrimMediaParams|llGetRegionAgentCount|llGetRegionCorner|llGetRegionFlags|" +
- "llGetRegionFPS|llGetRegionName|llGetRegionTimeDilation|llGetRootPosition|" +
- "llGetRootRotation|llGetRot|llGetScale|llGetScriptName|llGetScriptState|" +
- "llGetSimStats|llGetSimulatorHostname|llGetSPMaxMemory|llGetStartParameter|" +
- "llGetStaticPath|llGetStatus|llGetSubString|llGetSunDirection|llGetTexture|" +
- "llGetTextureOffset|llGetTextureRot|llGetTextureScale|llGetTime|llGetTimeOfDay|" +
- "llGetTimestamp|llGetTorque|llGetUnixTime|llGetUsedMemory|llGetUsername|" +
- "llGetVel|llGetWallclock|llGiveInventory|llGiveInventoryList|llGiveMoney|" +
- "llGround|llGroundContour|llGroundNormal|llGroundRepel|llGroundSlope|" +
- "llHTTPRequest|llHTTPResponse|llInsertString|llInstantMessage|llIntegerToBase64|" +
- "llJson2List|llJsonGetValue|llJsonSetValue|llJsonValueType|llKey2Name|" +
- "llLinkParticleSystem|llLinkSitTarget|llList2CSV|llList2Float|llList2Integer|" +
- "llList2Json|llList2Key|llList2List|llList2ListStrided|llList2Rot|" +
- "llList2String|llList2Vector|llListen|llListenControl|llListenRemove|" +
- "llListFindList|llListInsertList|llListRandomize|llListReplaceList|llListSort|" +
- "llListStatistics|llLoadURL|llLog|llLog10|llLookAt|llLoopSound|llLoopSoundMaster|" +
- "llLoopSoundSlave|llManageEstateAccess|llMapDestination|llMD5String|llMessageLinked|" +
- "llMinEventDelay|llModifyLand|llModPow|llMoveToTarget|llNavigateTo|llOffsetTexture|" +
- "llOpenRemoteDataChannel|llOverMyLand|llOwnerSay|llParcelMediaCommandList|" +
- "llParcelMediaQuery|llParseString2List|llParseStringKeepNulls|llParticleSystem|" +
- "llPassCollisions|llPassTouches|llPatrolPoints|llPlaySound|llPlaySoundSlave|" +
- "llPow|llPreloadSound|llPursue|llPushObject|llRegionSay|llRegionSayTo|" +
- "llReleaseControls|llReleaseURL|llRemoteDataReply|llRemoteLoadScriptPin|" +
- "llRemoveFromLandBanList|llRemoveFromLandPassList|llRemoveInventory|llRemoveVehicleFlags|" +
- "llRequestAgentData|llRequestDisplayName|llRequestInventoryData|llRequestPermissions|" +
- "llRequestSecureURL|llRequestSimulatorData|llRequestURL|llRequestUsername|" +
- "llResetAnimationOverride|llResetLandBanList|llResetLandPassList|llResetOtherScript|" +
- "llResetScript|llResetTime|llReturnObjectsByID|llReturnObjectsByOwner|" +
- "llRezAtRoot|llRezObject|llRot2Angle|llRot2Axis|llRot2Euler|" +
- "llRot2Fwd|llRot2Left|llRot2Up|llRotateTexture|llRotBetween|llRotLookAt|" +
- "llRotTarget|llRotTargetRemove|llRound|llSameGroup|llSay|llScaleTexture|" +
- "llScriptDanger|llScriptProfiler|llSendRemoteData|llSensor|llSensorRemove|" +
- "llSensorRepeat|llSetAlpha|llSetAngularVelocity|llSetAnimationOverride|llSetBuoyancy|" +
- "llSetCameraAtOffset|llSetCameraEyeOffset|llSetCameraParams|llSetClickAction|" +
- "llSetColor|llSetContentType|llSetDamage|llSetForce|llSetForceAndTorque|llSetHoverHeight|" +
- "llSetKeyframedMotion|llSetLinkAlpha|llSetLinkCamera|llSetLinkColor|llSetLinkMedia|" +
- "llSetLinkPrimitiveParams|llSetLinkPrimitiveParamsFast|llSetLinkTexture|llSetLinkTextureAnim|" +
- "llSetLocalRot|llSetMemoryLimit|llSetObjectDesc|llSetObjectName|llSetParcelMusicURL|" +
- "llSetPayPrice|llSetPhysicsMaterial|llSetPos|llSetPrimitiveParams|llSetPrimMediaParams|" +
- "llSetRegionPos|llSetRemoteScriptAccessPin|llSetRot|llSetScale|llSetScriptState|" +
- "llSetSitText|llSetSoundQueueing|llSetSoundRadius|llSetStatus|llSetText|" +
- "llSetTexture|llSetTextureAnim|llSetTimerEvent|llSetTorque|llSetTouchText|" +
- "llSetVehicleFlags|llSetVehicleFloatParam|llSetVehicleRotationParam|llSetVehicleType|" +
- "llSetVehicleVectorParam|llSetVelocity|llSHA1String|llShout|llSin|llSitTarget|" +
- "llSleep|llSqrt|llStartAnimation|llStopAnimation|llStopHover|llStopLookAt|" +
- "llStopMoveToTarget|llStopSound|llStringLength|llStringToBase64|llStringTrim|" +
- "llSubStringIndex|llTakeControls|llTan|llTarget|llTargetOmega|llTargetRemove|" +
- "llTeleportAgent|llTeleportAgentGlobalCoords|llTeleportAgentHome|llTextBox|" +
- "llToLower|llToUpper|llTransferLindenDollars|llTriggerSound|llTriggerSoundLimited|" +
- "llUnescapeURL|llUnSit|llUpdateCharacter|llVecDist|llVecMag|llVecNorm|" +
- "llVolumeDetect|llWanderWithin|llWater|llWhisper|llWind|llXorBase64",
- "support.function.event.lsl" : "at_rot_target|at_target|attach|changed|collision|" +
- "collision_end|collision_start|control|dataserver|email|http_request|" +
- "http_response|land_collision|land_collision_end|land_collision_start|" +
- "link_message|listen|money|moving_end|moving_start|no_sensor|not_at_rot_target|" +
- "not_at_target|object_rez|on_rez|path_update|remote_data|run_time_permissions|" +
- "sensor|state_entry|state_exit|timer|touch|touch_end|touch_start|transaction_result"
+ "support.function.lsl": "llAbs|llAcos|llAddToLandBanList|llAddToLandPassList|llAdjustSoundVolume|llAgentInExperience|llAllowInventoryDrop|llAngleBetween|llApplyImpulse|llApplyRotationalImpulse|llAsin|llAtan2|llAttachToAvatar|llAttachToAvatarTemp|llAvatarOnLinkSitTarget|llAvatarOnSitTarget|llAxes2Rot|llAxisAngle2Rot|llBase64ToInteger|llBase64ToString|llBreakAllLinks|llBreakLink|llCSV2List|llCastRay|llCeil|llClearCameraParams|llClearLinkMedia|llClearPrimMedia|llCloseRemoteDataChannel|llCollisionFilter|llCollisionSound|llCos|llCreateCharacter|llCreateKeyValue|llCreateLink|llDataSizeKeyValue|llDeleteCharacter|llDeleteKeyValue|llDeleteSubList|llDeleteSubString|llDetachFromAvatar|llDetectedGrab|llDetectedGroup|llDetectedKey|llDetectedLinkNumber|llDetectedName|llDetectedOwner|llDetectedPos|llDetectedRot|llDetectedTouchBinormal|llDetectedTouchFace|llDetectedTouchNormal|llDetectedTouchPos|llDetectedTouchST|llDetectedTouchUV|llDetectedType|llDetectedVel|llDialog|llDie|llDumpList2String|llEdgeOfWorld|llEjectFromLand|llEmail|llEscapeURL|llEuler2Rot|llEvade|llExecCharacterCmd|llFabs|llFleeFrom|llFloor|llForceMouselook|llFrand|llGenerateKey|llGetAccel|llGetAgentInfo|llGetAgentLanguage|llGetAgentList|llGetAgentSize|llGetAlpha|llGetAndResetTime|llGetAnimation|llGetAnimationList|llGetAnimationOverride|llGetAttached|llGetBoundingBox|llGetCameraPos|llGetCameraRot|llGetCenterOfMass|llGetClosestNavPoint|llGetColor|llGetCreator|llGetDate|llGetDisplayName|llGetEnergy|llGetEnv|llGetExperienceDetails|llGetExperienceErrorMessage|llGetForce|llGetFreeMemory|llGetFreeURLs|llGetGMTclock|llGetGeometricCenter|llGetHTTPHeader|llGetInventoryCreator|llGetInventoryKey|llGetInventoryName|llGetInventoryNumber|llGetInventoryPermMask|llGetInventoryType|llGetKey|llGetLandOwnerAt|llGetLinkKey|llGetLinkMedia|llGetLinkName|llGetLinkNumber|llGetLinkNumberOfSides|llGetLinkPrimitiveParams|llGetListEntryType|llGetListLength|llGetLocalPos|llGetLocalRot|llGetMass|llGetMassMKS|llGetMaxScaleFactor|llGetMemoryLimit|llGetMinScaleFactor|llGetNextEmail|llGetNotecardLine|llGetNumberOfNotecardLines|llGetNumberOfPrims|llGetNumberOfSides|llGetObjectDesc|llGetObjectDetails|llGetObjectMass|llGetObjectName|llGetObjectPermMask|llGetObjectPrimCount|llGetOmega|llGetOwner|llGetOwnerKey|llGetParcelDetails|llGetParcelFlags|llGetParcelMaxPrims|llGetParcelMusicURL|llGetParcelPrimCount|llGetParcelPrimOwners|llGetPermissions|llGetPermissionsKey|llGetPhysicsMaterial|llGetPos|llGetPrimMediaParams|llGetPrimitiveParams|llGetRegionAgentCount|llGetRegionCorner|llGetRegionFPS|llGetRegionFlags|llGetRegionName|llGetRegionTimeDilation|llGetRootPosition|llGetRootRotation|llGetRot|llGetSPMaxMemory|llGetScale|llGetScriptName|llGetScriptState|llGetSimStats|llGetSimulatorHostname|llGetStartParameter|llGetStaticPath|llGetStatus|llGetSubString|llGetSunDirection|llGetTexture|llGetTextureOffset|llGetTextureRot|llGetTextureScale|llGetTime|llGetTimeOfDay|llGetTimestamp|llGetTorque|llGetUnixTime|llGetUsedMemory|llGetUsername|llGetVel|llGetWallclock|llGiveInventory|llGiveInventoryList|llGiveMoney|llGround|llGroundContour|llGroundNormal|llGroundRepel|llGroundSlope|llHTTPRequest|llHTTPResponse|llInsertString|llInstantMessage|llIntegerToBase64|llJson2List|llJsonGetValue|llJsonSetValue|llJsonValueType|llKey2Name|llKeyCountKeyValue|llKeysKeyValue|llLinkParticleSystem|llLinkSitTarget|llList2CSV|llList2Float|llList2Integer|llList2Json|llList2Key|llList2List|llList2ListStrided|llList2Rot|llList2String|llList2Vector|llListFindList|llListInsertList|llListRandomize|llListReplaceList|llListSort|llListStatistics|llListen|llListenControl|llListenRemove|llLoadURL|llLog|llLog10|llLookAt|llLoopSound|llLoopSoundMaster|llLoopSoundSlave|llMD5String|llManageEstateAccess|llMapDestination|llMessageLinked|llMinEventDelay|llModPow|llModifyLand|llMoveToTarget|llNavigateTo|llOffsetTexture|llOpenRemoteDataChannel|llOverMyLand|llOwnerSay|llParcelMediaCommandList|llParcelMediaQuery|llParseString2List|llParseStringKeepNulls|llParticleSystem|llPassCollisions|llPassTouches|llPatrolPoints|llPlaySound|llPlaySoundSlave|llPow|llPreloadSound|llPursue|llPushObject|llReadKeyValue|llRegionSay|llRegionSayTo|llReleaseControls|llReleaseURL|llRemoteDataReply|llRemoteLoadScriptPin|llRemoveFromLandBanList|llRemoveFromLandPassList|llRemoveInventory|llRemoveVehicleFlags|llRequestAgentData|llRequestDisplayName|llRequestExperiencePermissions|llRequestInventoryData|llRequestPermissions|llRequestSecureURL|llRequestSimulatorData|llRequestURL|llRequestUsername|llResetAnimationOverride|llResetLandBanList|llResetLandPassList|llResetOtherScript|llResetScript|llResetTime|llReturnObjectsByID|llReturnObjectsByOwner|llRezAtRoot|llRezObject|llRot2Angle|llRot2Axis|llRot2Euler|llRot2Fwd|llRot2Left|llRot2Up|llRotBetween|llRotLookAt|llRotTarget|llRotTargetRemove|llRotateTexture|llRound|llSHA1String|llSameGroup|llSay|llScaleByFactor|llScaleTexture|llScriptDanger|llScriptProfiler|llSendRemoteData|llSensor|llSensorRemove|llSensorRepeat|llSetAlpha|llSetAngularVelocity|llSetAnimationOverride|llSetBuoyancy|llSetCameraAtOffset|llSetCameraEyeOffset|llSetCameraParams|llSetClickAction|llSetColor|llSetContentType|llSetDamage|llSetForce|llSetForceAndTorque|llSetHoverHeight|llSetKeyframedMotion|llSetLinkAlpha|llSetLinkCamera|llSetLinkColor|llSetLinkMedia|llSetLinkPrimitiveParams|llSetLinkPrimitiveParamsFast|llSetLinkTexture|llSetLinkTextureAnim|llSetLocalRot|llSetMemoryLimit|llSetObjectDesc|llSetObjectName|llSetParcelMusicURL|llSetPayPrice|llSetPhysicsMaterial|llSetPos|llSetPrimMediaParams|llSetPrimitiveParams|llSetRegionPos|llSetRemoteScriptAccessPin|llSetRot|llSetScale|llSetScriptState|llSetSitText|llSetSoundQueueing|llSetSoundRadius|llSetStatus|llSetText|llSetTexture|llSetTextureAnim|llSetTimerEvent|llSetTorque|llSetTouchText|llSetVehicleFlags|llSetVehicleFloatParam|llSetVehicleRotationParam|llSetVehicleType|llSetVehicleVectorParam|llSetVelocity|llShout|llSin|llSitTarget|llSleep|llSqrt|llStartAnimation|llStopAnimation|llStopHover|llStopLookAt|llStopMoveToTarget|llStopSound|llStringLength|llStringToBase64|llStringTrim|llSubStringIndex|llTakeControls|llTan|llTarget|llTargetOmega|llTargetRemove|llTeleportAgent|llTeleportAgentGlobalCoords|llTeleportAgentHome|llTextBox|llToLower|llToUpper|llTransferLindenDollars|llTriggerSound|llTriggerSoundLimited|llUnSit|llUnescapeURL|llUpdateCharacter|llUpdateKeyValue|llVecDist|llVecMag|llVecNorm|llVolumeDetect|llWanderWithin|llWater|llWhisper|llWind|llXorBase64",
+ "support.function.event.lsl" : "at_rot_target|at_target|attach|changed|collision|collision_end|collision_start|control|dataserver|email|experience_permissions|experience_permissions_denied|http_request|http_response|land_collision|land_collision_end|land_collision_start|link_message|listen|money|moving_end|moving_start|no_sensor|not_at_rot_target|not_at_target|object_rez|on_rez|path_update|remote_data|run_time_permissions|sensor|state_entry|state_exit|timer|touch|touch_end|touch_start|transaction_result"
}, "identifier");
this.$rules = {
@@ -369,7 +32,7 @@ function LSLHighlightRules() {
token : "comment.line.double-slash.lsl",
regex : "\\/\\/.*$"
}, {
- token : "comment.block.lsl",
+ token : "comment.block.begin.lsl",
regex : "\\/\\*",
next : "comment"
}, {
@@ -377,14 +40,15 @@ function LSLHighlightRules() {
start : '"',
end : '"',
next : [{
- token : "constant.language.escape.lsl", regex : /\\[tn"\\]/
+ token : "constant.character.escape.lsl",
+ regex : /\\[tn"\\]/
}]
}, {
token : "constant.numeric.lsl",
regex : "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b"
}, {
token : "entity.name.state.lsl",
- regex : "\\b((state)\\s+\\w+|default)\\b"
+ regex : "\\b((state)\\s+[A-Za-z_]\\w*|default)\\b"
}, {
token : keywordMapper,
regex : "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"
@@ -395,6 +59,9 @@ function LSLHighlightRules() {
token : "keyword.operator.lsl",
regex : "\\+\\+|\\-\\-|<<|>>|&&?|\\|\\|?|\\^|~|[!%<>=*+\\-\\/]=?"
}, {
+ token : "invalid.illegal.keyword.operator.lsl",
+ regex : ":=?"
+ }, {
token : "punctuation.operator.lsl",
regex : "\\,|\\;"
}, {
@@ -410,8 +77,8 @@ function LSLHighlightRules() {
],
"comment" : [
{
- token : "comment.block.lsl",
- regex : ".*?\\*\\/",
+ token : "comment.block.end.lsl",
+ regex : "\\*\\/",
next : "start"
}, {
token : "comment.block.lsl",
@@ -425,8 +92,8 @@ function LSLHighlightRules() {
exports.LSLHighlightRules = LSLHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -465,8 +132,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -478,92 +145,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -578,6 +206,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -590,51 +219,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -643,6 +278,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -659,9 +295,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -671,15 +308,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -688,6 +323,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -704,9 +340,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -716,62 +353,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -783,13 +417,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -808,23 +509,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -837,7 +570,124 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/lsl",["require","exports","module","ace/mode/lsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/text","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/lib/oop"], function(require, exports, module) {
+"use strict";
+
+var Rules = require("./lsl_highlight_rules").LSLHighlightRules;
+var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var TextMode = require("./text").Mode;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var oop = require("../lib/oop");
+
+var Mode = function() {
+ this.HighlightRules = Rules;
+ this.$outdent = new Outdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ["//"];
+
+ this.blockComment = {
+ start: "/*",
+ end: "*/"
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type === "comment.block.lsl") {
+ return indent;
+ }
+
+ if (state === "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/lsl";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-lua.js b/js/vendor/ace/src-noconflict/mode-lua.js
index 2d1fd1f..6a23bdf 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-lua.js
+++ b/js/vendor/ace/src-noconflict/mode-lua.js
@@ -1,168 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/lua', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lua_highlight_rules', 'ace/mode/folding/lua', 'ace/range', 'ace/worker/worker_client'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
-var LuaFoldMode = require("./folding/lua").FoldMode;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-
-var Mode = function() {
- var highlighter = new LuaHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.foldingRules = new LuaFoldMode();
- this.$keywordList = highlighter.$keywordList;
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "--";
- this.blockComment = {start: "--[", end: "]--"};
-
- var indentKeywords = {
- "function": 1,
- "then": 1,
- "do": 1,
- "else": 1,
- "elseif": 1,
- "repeat": 1,
- "end": -1,
- "until": -1
- };
- var outdentKeywords = [
- "else",
- "elseif",
- "end",
- "until"
- ];
-
- function getNetIndentLevel(tokens) {
- var level = 0;
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type == "keyword") {
- if (token.value in indentKeywords) {
- level += indentKeywords[token.value];
- }
- } else if (token.type == "paren.lparen") {
- level ++;
- } else if (token.type == "paren.rparen") {
- level --;
- }
- }
- if (level < 0) {
- return -1;
- } else if (level > 0) {
- return 1;
- } else {
- return 0;
- }
- }
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var level = 0;
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (state == "start") {
- level = getNetIndentLevel(tokens);
- }
- if (level > 0) {
- return indent + tab;
- } else if (level < 0 && indent.substr(indent.length - tab.length) == tab) {
- if (!this.checkOutdent(state, line, "\n")) {
- return indent.substr(0, indent.length - tab.length);
- }
- }
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- if (input != "\n" && input != "\r" && input != "\r\n")
- return false;
-
- if (line.match(/^\s*[\)\}\]]$/))
- return true;
-
- var tokens = this.$tokenizer.getLineTokens(line.trim(), state).tokens;
-
- if (!tokens || !tokens.length)
- return false;
-
- return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1);
- };
-
- this.autoOutdent = function(state, session, row) {
- var prevLine = session.getLine(row - 1);
- var prevIndent = this.$getIndent(prevLine).length;
- var prevTokens = this.$tokenizer.getLineTokens(prevLine, "start").tokens;
- var tabLength = session.getTabString().length;
- var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens);
- var curIndent = this.$getIndent(session.getLine(row)).length;
- if (curIndent < expectedIndent) {
- return;
- }
- session.outdentRows(new Range(row, 0, row + 2, 0));
- };
-
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("error", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("ok", function(e) {
- session.clearAnnotations();
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/lua_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -214,7 +51,7 @@ var LuaHighlightRules = function() {
"constant.library": stdLibaries,
"constant.language": builtinConstants,
"invalid.illegal": futureReserved,
- "variable.language": "this"
+ "variable.language": "self"
}, "identifier");
var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
@@ -323,8 +160,8 @@ oop.inherits(LuaHighlightRules, TextHighlightRules);
exports.LuaHighlightRules = LuaHighlightRules;
});
-ace.define('ace/mode/folding/lua', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -456,3 +293,134 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
+var LuaFoldMode = require("./folding/lua").FoldMode;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+
+var Mode = function() {
+ this.HighlightRules = LuaHighlightRules;
+
+ this.foldingRules = new LuaFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "--[", end: "]--"};
+
+ var indentKeywords = {
+ "function": 1,
+ "then": 1,
+ "do": 1,
+ "else": 1,
+ "elseif": 1,
+ "repeat": 1,
+ "end": -1,
+ "until": -1
+ };
+ var outdentKeywords = [
+ "else",
+ "elseif",
+ "end",
+ "until"
+ ];
+
+ function getNetIndentLevel(tokens) {
+ var level = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token.type == "keyword") {
+ if (token.value in indentKeywords) {
+ level += indentKeywords[token.value];
+ }
+ } else if (token.type == "paren.lparen") {
+ level ++;
+ } else if (token.type == "paren.rparen") {
+ level --;
+ }
+ }
+ if (level < 0) {
+ return -1;
+ } else if (level > 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var level = 0;
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (state == "start") {
+ level = getNetIndentLevel(tokens);
+ }
+ if (level > 0) {
+ return indent + tab;
+ } else if (level < 0 && indent.substr(indent.length - tab.length) == tab) {
+ if (!this.checkOutdent(state, line, "\n")) {
+ return indent.substr(0, indent.length - tab.length);
+ }
+ }
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input != "\n" && input != "\r" && input != "\r\n")
+ return false;
+
+ if (line.match(/^\s*[\)\}\]]$/))
+ return true;
+
+ var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens || !tokens.length)
+ return false;
+
+ return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1);
+ };
+
+ this.autoOutdent = function(state, session, row) {
+ var prevLine = session.getLine(row - 1);
+ var prevIndent = this.$getIndent(prevLine).length;
+ var prevTokens = this.getTokenizer().getLineTokens(prevLine, "start").tokens;
+ var tabLength = session.getTabString().length;
+ var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens);
+ var curIndent = this.$getIndent(session.getLine(row)).length;
+ if (curIndent < expectedIndent) {
+ return;
+ }
+ session.outdentRows(new Range(row, 0, row + 2, 0));
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/lua";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-luapage.js b/js/vendor/ace/src-noconflict/mode-luapage.js
index 0e71f74..66aaea5 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-luapage.js
+++ b/js/vendor/ace/src-noconflict/mode-luapage.js
@@ -1,167 +1,61 @@
-ace.define('ace/mode/luapage', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html', 'ace/mode/lua', 'ace/tokenizer', 'ace/mode/luapage_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var HtmlMode = require("./html").Mode;
-var LuaMode = require("./lua").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var LuaPageHighlightRules = require("./luapage_highlight_rules").LuaPageHighlightRules;
-
-var Mode = function() {
- var highlighter = new LuaPageHighlightRules();
-
- this.$tokenizer = new Tokenizer(new LuaPageHighlightRules().getRules());
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "lua-": LuaMode
- });
-};
-oop.inherits(Mode, HtmlMode);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-
-var Mode = function() {
- var highlighter = new HtmlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$behaviour = new HtmlBehaviour();
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.blockComment = {start: "<!--", end: "-->"};
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- this.checkOutdent = function(state, line, input) {
- return false;
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
};
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-}).call(Mode.prototype);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -282,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -308,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -346,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -371,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -405,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -453,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -463,52 +400,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -547,8 +440,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -560,92 +453,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -660,6 +514,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -672,51 +527,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -725,6 +586,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -741,9 +603,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -753,15 +616,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -770,6 +631,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -786,9 +648,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -798,62 +661,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -865,13 +725,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -890,23 +817,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -919,48 +878,118 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
- var highlighter = new CssHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.HighlightRules = JavaScriptHighlightRules;
+
this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CssBehaviour();
- this.$keywordList = highlighter.$keywordList;
+ this.$behaviour = new CstyleBehaviour();
this.foldingRules = new CStyleFoldMode();
};
oop.inherits(Mode, TextMode);
(function() {
- this.foldingRules = "cStyle";
+ this.lineCommentStart = "//";
this.blockComment = {start: "/*", end: "*/"};
this.getNextLineIndent = function(state, line, tab) {
var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
if (tokens.length && tokens[tokens.length-1].type == "comment") {
return indent;
}
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
}
return indent;
@@ -975,11 +1004,11 @@ oop.inherits(Mode, TextMode);
};
this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
worker.attachToDocument(session.getDocument());
- worker.on("csslint", function(e) {
- session.setAnnotations(e.data);
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
});
worker.on("terminate", function() {
@@ -989,23 +1018,23 @@ oop.inherits(Mode, TextMode);
return worker;
};
+ this.$id = "ace/mode/javascript";
}).call(Mode.prototype);
exports.Mode = Mode;
-
});
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -1139,8 +1168,8 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -1218,160 +1247,152 @@ oop.inherits(CssBehaviour, CstyleBehaviour);
exports.CssBehaviour = CssBehaviour;
});
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
+(function() {
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
-};
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+ return indent;
+ };
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ return worker;
+ };
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -1379,75 +1400,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}, {
- include : "string"
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -1460,18 +1491,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -1479,14 +1509,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -1498,258 +1528,253 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
};
-});
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
-var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var Behaviour = require("../behaviour").Behaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
+var lang = require("../../lib/lang");
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
-var HtmlBehaviour = function () {
+var XmlBehaviour = function () {
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
var token = iterator.getCurrentToken();
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var element = token.value;
- if (atCursor){
- var element = element.substring(0, position.column - token.start);
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
}
- if (voidElements.indexOf(element) !== -1){
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
}
- return {
- text: '>' + '</' + element + '>',
- selection: [1, 1]
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
}
}
});
-}
-oop.inherits(HtmlBehaviour, XmlBehaviour);
-
-exports.HtmlBehaviour = HtmlBehaviour;
-});
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
});
- return hasType;
-}
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
if (text == '>') {
var position = editor.getCursorPosition();
var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
+ if (is(token, "reference.attribute-value"))
return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
}
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
}
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
return {
- text: '>' + '</' + tag + '>',
+ text: ">" + "</" + element + ">",
selection: [1, 1]
- }
+ };
}
});
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
if (text == "\n") {
var cursor = editor.getCursorPosition();
var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
}
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});
-ace.define('ace/mode/folding/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+ if (!token) {
+ return;
+ }
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
-var oop = require("../../lib/oop");
-var MixedFoldMode = require("./mixed").FoldMode;
-var XmlFoldMode = require("./xml").FoldMode;
-var CStyleFoldMode = require("./cstyle").FoldMode;
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
- "js-": new CStyleFoldMode(),
- "css-": new CStyleFoldMode()
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
});
+
};
-oop.inherits(FoldMode, MixedFoldMode);
+oop.inherits(XmlBehaviour, Behaviour);
+exports.XmlBehaviour = XmlBehaviour;
});
-ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -1802,8 +1827,8 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var lang = require("../../lib/lang");
@@ -1811,91 +1836,118 @@ var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var FoldMode = exports.FoldMode = function(voidElements) {
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
BaseFoldMode.call(this);
this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
};
oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
(function() {
this.getFoldWidget = function(session, foldStyle, row) {
var tag = this._getFirstTagInLine(session, row);
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ if (!tag)
return "";
- if (tag.selfClosing)
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
return "";
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
return "";
return "start";
};
-
this._getFirstTagInLine = function(session, row) {
var tokens = session.getTokens(row);
- var value = "";
+ var tag = new Tag();
+
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
- if (token.type.lastIndexOf("meta.tag", 0) === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
}
-
- return this._parseTag(value);
+
+ return null;
};
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = tag.match(this.tagRe);
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
var column = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
};
this._readTagForward = function(iterator) {
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var start;
-
+
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
}
} while(token = iterator.stepForward());
-
+
return null;
};
@@ -1903,32 +1955,24 @@ oop.inherits(FoldMode, BaseFoldMode);
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var end;
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
}
} while(token = iterator.stepBackward());
-
+
return null;
};
@@ -1939,10 +1983,7 @@ oop.inherits(FoldMode, BaseFoldMode);
if (!tag || top.tagName == tag.tagName) {
return stack.pop();
}
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
stack.pop();
continue;
} else {
@@ -1954,7 +1995,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.getFoldWidgetRange = function(session, foldStyle, row) {
var firstTag = this._getFirstTagInLine(session, row);
- if (!firstTag.match)
+ if (!firstTag)
return null;
var isBackward = firstTag.closing || firstTag.selfClosing;
@@ -1962,11 +2003,13 @@ oop.inherits(FoldMode, BaseFoldMode);
var tag;
if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
var start = {
row: row,
- column: firstTag.column + firstTag.tagName.length + 2
+ column: firstTag.start.column + firstTag.tagName.length + 2
};
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
while (tag = this._readTagForward(iterator)) {
if (tag.selfClosing) {
if (!stack.length) {
@@ -1983,15 +2026,15 @@ oop.inherits(FoldMode, BaseFoldMode);
return Range.fromPoints(start, tag.start);
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
var end = {
row: row,
- column: firstTag.column
+ column: firstTag.start.column
};
while (tag = this._readTagBackward(iterator)) {
@@ -2008,11 +2051,13 @@ oop.inherits(FoldMode, BaseFoldMode);
this._pop(stack, tag);
if (stack.length == 0) {
tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
return Range.fromPoints(tag.start, end);
}
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
@@ -2023,141 +2068,374 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/lua', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lua_highlight_rules', 'ace/mode/folding/lua', 'ace/range', 'ace/worker/worker_client'], function(require, exports, module) {
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
-var LuaFoldMode = require("./folding/lua").FoldMode;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
-var Mode = function() {
- var highlighter = new LuaHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.foldingRules = new LuaFoldMode();
- this.$keywordList = highlighter.$keywordList;
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
};
-oop.inherits(Mode, TextMode);
-(function() {
-
- this.lineCommentStart = "--";
- this.blockComment = {start: "--[", end: "]--"};
-
- var indentKeywords = {
- "function": 1,
- "then": 1,
- "do": 1,
- "else": 1,
- "elseif": 1,
- "repeat": 1,
- "end": -1,
- "until": -1
- };
- var outdentKeywords = [
- "else",
- "elseif",
- "end",
- "until"
- ];
+var elements = Object.keys(attributeMap);
- function getNetIndentLevel(tokens) {
- var level = 0;
- for (var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- if (token.type == "keyword") {
- if (token.value in indentKeywords) {
- level += indentKeywords[token.value];
- }
- } else if (token.type == "paren.lparen") {
- level ++;
- } else if (token.type == "paren.rparen") {
- level --;
- }
- }
- if (level < 0) {
- return -1;
- } else if (level > 0) {
- return 1;
- } else {
- return 0;
- }
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
}
+ if (token)
+ return token.value;
+}
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var level = 0;
+var HtmlCompletions = function() {
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
+};
- if (state == "start") {
- level = getNetIndentLevel(tokens);
- }
- if (level > 0) {
- return indent + tab;
- } else if (level < 0 && indent.substr(indent.length - tab.length) == tab) {
- if (!this.checkOutdent(state, line, "\n")) {
- return indent.substr(0, indent.length - tab.length);
- }
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
}
- return indent;
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
};
- this.checkOutdent = function(state, line, input) {
- if (input != "\n" && input != "\r" && input != "\r\n")
- return false;
+}).call(HtmlCompletions.prototype);
- if (line.match(/^\s*[\)\}\]]$/))
- return true;
+exports.HtmlCompletions = HtmlCompletions;
+});
- var tokens = this.$tokenizer.getLineTokens(line.trim(), state).tokens;
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
- if (!tokens || !tokens.length)
- return false;
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
- return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1);
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
};
- this.autoOutdent = function(state, session, row) {
- var prevLine = session.getLine(row - 1);
- var prevIndent = this.$getIndent(prevLine).length;
- var prevTokens = this.$tokenizer.getLineTokens(prevLine, "start").tokens;
- var tabLength = session.getTabString().length;
- var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens);
- var curIndent = this.$getIndent(session.getLine(row)).length;
- if (curIndent < expectedIndent) {
- return;
- }
- session.outdentRows(new Range(row, 0, row + 2, 0));
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
};
this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker");
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
worker.attachToDocument(session.getDocument());
-
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
worker.on("error", function(e) {
- session.setAnnotations([e.data]);
+ session.setAnnotations(e.data);
});
-
- worker.on("ok", function(e) {
+
+ worker.on("terminate", function() {
session.clearAnnotations();
});
-
+
return worker;
};
+ this.$id = "ace/mode/html";
}).call(Mode.prototype);
exports.Mode = Mode;
});
-ace.define('ace/mode/lua_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -2209,7 +2487,7 @@ var LuaHighlightRules = function() {
"constant.library": stdLibaries,
"constant.language": builtinConstants,
"invalid.illegal": futureReserved,
- "variable.language": "this"
+ "variable.language": "self"
}, "identifier");
var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
@@ -2318,8 +2596,8 @@ oop.inherits(LuaHighlightRules, TextHighlightRules);
exports.LuaHighlightRules = LuaHighlightRules;
});
-ace.define('ace/mode/folding/lua', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -2451,8 +2729,140 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/luapage_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/lua_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
+var LuaFoldMode = require("./folding/lua").FoldMode;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+
+var Mode = function() {
+ this.HighlightRules = LuaHighlightRules;
+
+ this.foldingRules = new LuaFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "--[", end: "]--"};
+
+ var indentKeywords = {
+ "function": 1,
+ "then": 1,
+ "do": 1,
+ "else": 1,
+ "elseif": 1,
+ "repeat": 1,
+ "end": -1,
+ "until": -1
+ };
+ var outdentKeywords = [
+ "else",
+ "elseif",
+ "end",
+ "until"
+ ];
+
+ function getNetIndentLevel(tokens) {
+ var level = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token.type == "keyword") {
+ if (token.value in indentKeywords) {
+ level += indentKeywords[token.value];
+ }
+ } else if (token.type == "paren.lparen") {
+ level ++;
+ } else if (token.type == "paren.rparen") {
+ level --;
+ }
+ }
+ if (level < 0) {
+ return -1;
+ } else if (level > 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var level = 0;
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (state == "start") {
+ level = getNetIndentLevel(tokens);
+ }
+ if (level > 0) {
+ return indent + tab;
+ } else if (level < 0 && indent.substr(indent.length - tab.length) == tab) {
+ if (!this.checkOutdent(state, line, "\n")) {
+ return indent.substr(0, indent.length - tab.length);
+ }
+ }
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input != "\n" && input != "\r" && input != "\r\n")
+ return false;
+
+ if (line.match(/^\s*[\)\}\]]$/))
+ return true;
+
+ var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens || !tokens.length)
+ return false;
+
+ return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1);
+ };
+
+ this.autoOutdent = function(state, session, row) {
+ var prevLine = session.getLine(row - 1);
+ var prevIndent = this.$getIndent(prevLine).length;
+ var prevTokens = this.getTokenizer().getLineTokens(prevLine, "start").tokens;
+ var tabLength = session.getTabString().length;
+ var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens);
+ var curIndent = this.$getIndent(session.getLine(row)).length;
+ if (curIndent < expectedIndent) {
+ return;
+ }
+ session.outdentRows(new Range(row, 0, row + 2, 0));
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/lua";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/luapage_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/lua_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
@@ -2497,4 +2907,29 @@ oop.inherits(LuaPageHighlightRules, HtmlHighlightRules);
exports.LuaPageHighlightRules = LuaPageHighlightRules;
-}); \ No newline at end of file
+});
+
+ace.define("ace/mode/luapage",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/lua","ace/mode/luapage_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var LuaMode = require("./lua").Mode;
+var LuaPageHighlightRules = require("./luapage_highlight_rules").LuaPageHighlightRules;
+
+var Mode = function() {
+ HtmlMode.call(this);
+
+ this.HighlightRules = LuaPageHighlightRules;
+ this.createModeDelegates({
+ "lua-": LuaMode
+ });
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.$id = "ace/mode/luapage";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-lucene.js b/js/vendor/ace/src-noconflict/mode-lucene.js
index 5fa60cf..dbb214b 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-lucene.js
+++ b/js/vendor/ace/src-noconflict/mode-lucene.js
@@ -1,20 +1,5 @@
-ace.define('ace/mode/lucene', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lucene_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new LuceneHighlightRules().getRules());
-};
-
-oop.inherits(Mode, TextMode);
-
-exports.Mode = Mode;
-});ace.define('ace/mode/lucene_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -62,3 +47,23 @@ oop.inherits(LuceneHighlightRules, TextHighlightRules);
exports.LuceneHighlightRules = LuceneHighlightRules;
});
+
+ace.define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"], function(require, exports, module) {
+'use strict';
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = LuceneHighlightRules;
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$id = "ace/mode/lucene";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-makefile.js b/js/vendor/ace/src-noconflict/mode-makefile.js
index 4f95d45..362e476 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-makefile.js
+++ b/js/vendor/ace/src-noconflict/mode-makefile.js
@@ -1,139 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/makefile', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/makefile_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var MakefileHighlightRules = require("./makefile_highlight_rules").MakefileHighlightRules;
-var FoldMode = require("./folding/coffee").FoldMode;
-
-var Mode = function() {
- var highlighter = new MakefileHighlightRules();
- this.foldingRules = new FoldMode();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "#";
- this.$indentWithTabs = true;
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});ace.define('ace/mode/makefile_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/sh_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var ShHighlightFile = require("./sh_highlight_rules");
-
-var MakefileHighlightRules = function() {
-
- var keywordMapper = this.createKeywordMapper({
- "keyword": ShHighlightFile.reservedKeywords,
- "support.function.builtin": ShHighlightFile.languageConstructs,
- "invalid.deprecated": "debugger"
- }, "string");
-
- this.$rules =
- {
- "start": [
- {
- token: "string.interpolated.backtick.makefile",
- regex: "`",
- next: "shell-start"
- },
- {
- token: "punctuation.definition.comment.makefile",
- regex: /#(?=.)/,
- next: "comment"
- },
- {
- token: [ "keyword.control.makefile"],
- regex: "^(?:\\s*\\b)(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)(?:\\b)"
- },
- {// ^([^\t ]+(\s[^\t ]+)*:(?!\=))\s*.*
- token: ["entity.name.function.makefile", "text"],
- regex: "^([^\\t ]+(?:\\s[^\\t ]+)*:)(\\s*.*)"
- }
- ],
- "comment": [
- {
- token : "punctuation.definition.comment.makefile",
- regex : /.+\\/
- },
- {
- token : "punctuation.definition.comment.makefile",
- regex : ".+",
- next : "start"
- }
- ],
- "shell-start": [
- {
- token: keywordMapper,
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- },
- {
- token: "string",
- regex : "\\w+"
- },
- {
- token : "string.interpolated.backtick.makefile",
- regex : "`",
- next : "start"
- }
- ]
-}
-
-};
-
-oop.inherits(MakefileHighlightRules, TextHighlightRules);
-
-exports.MakefileHighlightRules = MakefileHighlightRules;
-});
-
-ace.define('ace/mode/sh_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -172,7 +38,7 @@ var ShHighlightRules = function() {
var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
var fileDescriptor = "(?:&" + intPart + ")";
- var variableName = "[a-zA-Z][a-zA-Z0-9_]*";
+ var variableName = "[a-zA-Z_][a-zA-Z0-9_]*";
var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))";
var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))";
@@ -203,6 +69,65 @@ var ShHighlightRules = function() {
defaultToken: "string"
}]
}, {
+ regex : "<<<",
+ token : "keyword.operator"
+ }, {
+ stateName: "heredoc",
+ regex : "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",
+ onMatch : function(value, currentState, stack) {
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
+ var tokens = value.split(this.splitRegex);
+ stack.push(next, tokens[4]);
+ return [
+ {type:"constant", value: tokens[1]},
+ {type:"text", value: tokens[2]},
+ {type:"string", value: tokens[3]},
+ {type:"support.class", value: tokens[4]},
+ {type:"string", value: tokens[5]}
+ ];
+ },
+ rules: {
+ heredoc: [{
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }],
+ indentedHeredoc: [{
+ token: "string",
+ regex: "^\t+"
+ }, {
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }]
+ }
+ }, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
token : "variable.language",
regex : builtinVariable
}, {
@@ -225,7 +150,7 @@ var ShHighlightRules = function() {
regex : integer + "\\b"
}, {
token : keywordMapper,
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b"
}, {
token : "keyword.operator",
regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="
@@ -246,8 +171,81 @@ oop.inherits(ShHighlightRules, TextHighlightRules);
exports.ShHighlightRules = ShHighlightRules;
});
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+ace.define("ace/mode/makefile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/sh_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ShHighlightFile = require("./sh_highlight_rules");
+
+var MakefileHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": ShHighlightFile.reservedKeywords,
+ "support.function.builtin": ShHighlightFile.languageConstructs,
+ "invalid.deprecated": "debugger"
+ }, "string");
+
+ this.$rules =
+ {
+ "start": [
+ {
+ token: "string.interpolated.backtick.makefile",
+ regex: "`",
+ next: "shell-start"
+ },
+ {
+ token: "punctuation.definition.comment.makefile",
+ regex: /#(?=.)/,
+ next: "comment"
+ },
+ {
+ token: [ "keyword.control.makefile"],
+ regex: "^(?:\\s*\\b)(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)(?:\\b)"
+ },
+ {// ^([^\t ]+(\s[^\t ]+)*:(?!\=))\s*.*
+ token: ["entity.name.function.makefile", "text"],
+ regex: "^([^\\t ]+(?:\\s[^\\t ]+)*:)(\\s*.*)"
+ }
+ ],
+ "comment": [
+ {
+ token : "punctuation.definition.comment.makefile",
+ regex : /.+\\/
+ },
+ {
+ token : "punctuation.definition.comment.makefile",
+ regex : ".+",
+ next : "start"
+ }
+ ],
+ "shell-start": [
+ {
+ token: keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ },
+ {
+ token: "string",
+ regex : "\\w+"
+ },
+ {
+ token : "string.interpolated.backtick.makefile",
+ regex : "`",
+ next : "start"
+ }
+ ]
+}
+
+};
+
+oop.inherits(MakefileHighlightRules, TextHighlightRules);
+
+exports.MakefileHighlightRules = MakefileHighlightRules;
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -332,3 +330,28 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/makefile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/makefile_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var MakefileHighlightRules = require("./makefile_highlight_rules").MakefileHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = MakefileHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+ this.$indentWithTabs = true;
+
+ this.$id = "ace/mode/makefile";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-markdown.js b/js/vendor/ace/src-noconflict/mode-markdown.js
index b6208e6..19533f2 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-markdown.js
+++ b/js/vendor/ace/src-noconflict/mode-markdown.js
@@ -1,179 +1,61 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/markdown', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/xml', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/markdown_highlight_rules', 'ace/mode/folding/markdown'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var XmlMode = require("./xml").Mode;
-var HtmlMode = require("./html").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
-var MarkdownFoldMode = require("./folding/markdown").FoldMode;
-
-var Mode = function() {
- var highlighter = new MarkdownHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "xml-": XmlMode,
- "html-": HtmlMode
- });
-
- this.foldingRules = new MarkdownFoldMode();
-};
-oop.inherits(Mode, TextMode);
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-(function() {
-
- this.lineCommentStart = ">";
-
- this.getNextLineIndent = function(state, line, tab) {
- if (state == "listblock") {
- var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line);
- if (!match)
- return "";
- var marker = match[2];
- if (!marker)
- marker = parseInt(match[3], 10) + 1 + ".";
- return match[1] + marker + match[4];
- } else {
- return this.$getIndent(line);
- }
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
};
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-}).call(Mode.prototype);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -294,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -320,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -358,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -383,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -417,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -465,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -475,52 +400,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -559,8 +440,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -572,92 +453,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -672,6 +514,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -684,51 +527,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -737,6 +586,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -753,9 +603,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -765,15 +616,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -782,6 +631,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -798,9 +648,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -810,62 +661,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -877,13 +725,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -902,23 +817,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -931,99 +878,229 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var XmlFoldMode = require("./folding/xml").FoldMode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
- this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
- this.$behaviour = new XmlBehaviour();
- this.foldingRules = new XmlFoldMode();
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
};
-
oop.inherits(Mode, TextMode);
(function() {
-
- this.blockComment = {start: "<!--", end: "-->"};
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
}).call(Mode.prototype);
exports.Mode = Mode;
});
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -1031,75 +1108,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
}, {
- include : "string"
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -1112,18 +1199,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -1131,14 +1217,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -1150,152 +1236,171 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
+var XmlBehaviour = function () {
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
-});
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+ if (!token)
+ token = iterator.stepBackward();
+ if (!token)
+ return;
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
+ }
+ }
+ });
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
});
- return hasType;
-}
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
if (text == '>') {
var position = editor.getCursorPosition();
var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
+ if (is(token, "reference.attribute-value"))
return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
}
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
}
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
return {
- text: '>' + '</' + tag + '>',
+ text: ">" + "</" + element + ">",
selection: [1, 1]
- }
+ };
}
});
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
if (text == "\n") {
var cursor = editor.getCursorPosition();
var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
}
}
}
});
-
-}
+
+};
+
oop.inherits(XmlBehaviour, Behaviour);
exports.XmlBehaviour = XmlBehaviour;
});
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var lang = require("../../lib/lang");
@@ -1303,91 +1408,118 @@ var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var FoldMode = exports.FoldMode = function(voidElements) {
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
BaseFoldMode.call(this);
this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
};
oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
(function() {
this.getFoldWidget = function(session, foldStyle, row) {
var tag = this._getFirstTagInLine(session, row);
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ if (!tag)
return "";
- if (tag.selfClosing)
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
return "";
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
return "";
return "start";
};
-
this._getFirstTagInLine = function(session, row) {
var tokens = session.getTokens(row);
- var value = "";
+ var tag = new Tag();
+
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
- if (token.type.lastIndexOf("meta.tag", 0) === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
}
-
- return this._parseTag(value);
+
+ return null;
};
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = tag.match(this.tagRe);
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
var column = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
};
this._readTagForward = function(iterator) {
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var start;
-
+
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
}
} while(token = iterator.stepForward());
-
+
return null;
};
@@ -1395,32 +1527,24 @@ oop.inherits(FoldMode, BaseFoldMode);
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var end;
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
}
} while(token = iterator.stepBackward());
-
+
return null;
};
@@ -1431,10 +1555,7 @@ oop.inherits(FoldMode, BaseFoldMode);
if (!tag || top.tagName == tag.tagName) {
return stack.pop();
}
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
stack.pop();
continue;
} else {
@@ -1446,7 +1567,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.getFoldWidgetRange = function(session, foldStyle, row) {
var firstTag = this._getFirstTagInLine(session, row);
- if (!firstTag.match)
+ if (!firstTag)
return null;
var isBackward = firstTag.closing || firstTag.selfClosing;
@@ -1454,11 +1575,13 @@ oop.inherits(FoldMode, BaseFoldMode);
var tag;
if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
var start = {
row: row,
- column: firstTag.column + firstTag.tagName.length + 2
+ column: firstTag.start.column + firstTag.tagName.length + 2
};
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
while (tag = this._readTagForward(iterator)) {
if (tag.selfClosing) {
if (!stack.length) {
@@ -1475,15 +1598,15 @@ oop.inherits(FoldMode, BaseFoldMode);
return Range.fromPoints(start, tag.start);
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
var end = {
row: row,
- column: firstTag.column
+ column: firstTag.start.column
};
while (tag = this._readTagBackward(iterator)) {
@@ -1500,11 +1623,13 @@ oop.inherits(FoldMode, BaseFoldMode);
this._pop(stack, tag);
if (stack.length == 0) {
tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
return Range.fromPoints(tag.start, end);
}
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
@@ -1515,105 +1640,36 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-
-var Mode = function() {
- var highlighter = new HtmlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$behaviour = new HtmlBehaviour();
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.blockComment = {start: "<!--", end: "-->"};
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
- this.checkOutdent = function(state, line, input) {
- return false;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
+var lang = require("../lib/lang");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var XmlFoldMode = require("./folding/xml").FoldMode;
var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CssBehaviour = require("./behaviour/css").CssBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
- var highlighter = new CssHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CssBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
+ this.HighlightRules = XmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.foldingRules = new XmlFoldMode();
};
+
oop.inherits(Mode, TextMode);
(function() {
- this.foldingRules = "cStyle";
- this.blockComment = {start: "/*", end: "*/"};
+ this.voidElements = lang.arrayToMap([]);
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
+ this.blockComment = {start: "<!--", end: "-->"};
this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker");
worker.attachToDocument(session.getDocument());
- worker.on("csslint", function(e) {
+ worker.on("error", function(e) {
session.setAnnotations(e.data);
});
@@ -1623,24 +1679,24 @@ oop.inherits(Mode, TextMode);
return worker;
};
-
+
+ this.$id = "ace/mode/xml";
}).call(Mode.prototype);
exports.Mode = Mode;
-
});
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -1774,8 +1830,8 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -1853,8 +1909,77 @@ oop.inherits(CssBehaviour, CstyleBehaviour);
exports.CssBehaviour = CssBehaviour;
});
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -1869,6 +1994,7 @@ var tagMap = lang.createMap({
img : 'image',
input : 'form',
label : 'form',
+ option : 'form',
script : 'script',
select : 'form',
textarea : 'form',
@@ -1886,17 +2012,17 @@ var HtmlHighlightRules = function() {
this.addRules({
attributes: [{
- include : "space"
+ include : "tag_whitespace"
}, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "=",
push : [{
- include: "space",
+ include: "tag_whitespace"
}, {
- token : "string",
+ token : "string.unquoted.attribute-value.html",
regex : "[^<>='\"`\\s]+",
next : "pop"
}, {
@@ -1905,33 +2031,21 @@ var HtmlHighlightRules = function() {
next : "pop"
}]
}, {
- include : "string"
+ include : "attribute_value"
}],
tag: [{
token : function(start, tag) {
var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
},
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
}],
- start_tag_stuff: [
+ tag_stuff: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
});
this.embedTagRules(CssHighlightRules, "css-", "style");
@@ -1946,114 +2060,8 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules);
exports.HtmlHighlightRules = HtmlHighlightRules;
});
-ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
-
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
-}
-
-var HtmlBehaviour = function () {
-
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var element = token.value;
- if (atCursor){
- var element = element.substring(0, position.column - token.start);
- }
- if (voidElements.indexOf(element) !== -1){
- return;
- }
- return {
- text: '>' + '</' + element + '>',
- selection: [1, 1]
- }
- }
- });
-}
-oop.inherits(HtmlBehaviour, XmlBehaviour);
-
-exports.HtmlBehaviour = HtmlBehaviour;
-});
-
-ace.define('ace/mode/folding/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var MixedFoldMode = require("./mixed").FoldMode;
-var XmlFoldMode = require("./xml").FoldMode;
-var CStyleFoldMode = require("./cstyle").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
- "js-": new CStyleFoldMode(),
- "css-": new CStyleFoldMode()
- });
-};
-
-oop.inherits(FoldMode, MixedFoldMode);
-
-});
-
-ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -2106,8 +2114,374 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/markdown_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/html_highlight_rules', 'ace/mode/css_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -2124,7 +2498,7 @@ var escaped = function(ch) {
function github_embed(tag, prefix) {
return { // Github style block
token : "support.function",
- regex : "^```" + tag + "\\s*$",
+ regex : "^\\s*```" + tag + "\\s*$",
push : prefix + "start"
};
}
@@ -2155,11 +2529,11 @@ var MarkdownHighlightRules = function() {
github_embed("css", "csscode-"),
{ // Github style block
token : "support.function",
- regex : "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
+ regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",
next : "githubblock"
}, { // block quote
- token : "string",
- regex : "^>[ ].+$",
+ token : "string.blockquote",
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
next : "blockquote"
}, { // HR * - _
token : "constant",
@@ -2195,10 +2569,10 @@ var MarkdownHighlightRules = function() {
'(\\s*"' + escaped('"') + '"\\s*)?' + // "title"
"(\\))" // )
}, { // strong ** __
- token : "string",
+ token : "string.strong",
regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"
}, { // emphasis * _
- token : "string",
+ token : "string.emphasis",
regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"
}, { //
token : ["text", "url", "text"],
@@ -2238,22 +2612,31 @@ var MarkdownHighlightRules = function() {
next : "listblock-start"
}, {
include : "basic", noEscape: true
+ }, { // Github style block
+ token : "support.function",
+ regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
}, {
- defaultToken : "list"
+ defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
} ],
- "blockquote" : [ { // BLockquotes only escape on blank lines.
+ "blockquote" : [ { // Blockquotes only escape on blank lines.
token : "empty_line",
regex : "^\\s*$",
next : "start"
+ }, { // block quote
+ token : "string.blockquote",
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
+ next : "blockquote"
}, {
- token : "string",
- regex : ".+"
+ include : "basic", noEscape: true
+ }, {
+ defaultToken : "string.blockquote"
} ],
"githubblock" : [ {
token : "support.function",
- regex : "^```",
+ regex : "^\\s*```",
next : "start"
}, {
token : "support.function",
@@ -2263,25 +2646,25 @@ var MarkdownHighlightRules = function() {
this.embedRules(JavaScriptHighlightRules, "jscode-", [{
token : "support.function",
- regex : "^```",
+ regex : "^\\s*```",
next : "pop"
}]);
this.embedRules(HtmlHighlightRules, "htmlcode-", [{
token : "support.function",
- regex : "^```",
+ regex : "^\\s*```",
next : "pop"
}]);
this.embedRules(CssHighlightRules, "csscode-", [{
token : "support.function",
- regex : "^```",
+ regex : "^\\s*```",
next : "pop"
}]);
this.embedRules(XmlHighlightRules, "xmlcode-", [{
token : "support.function",
- regex : "^```",
+ regex : "^\\s*```",
next : "pop"
}]);
@@ -2292,8 +2675,8 @@ oop.inherits(MarkdownHighlightRules, TextHighlightRules);
exports.MarkdownHighlightRules = MarkdownHighlightRules;
});
-ace.define('ace/mode/folding/markdown', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -2387,3 +2770,50 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var XmlMode = require("./xml").Mode;
+var HtmlMode = require("./html").Mode;
+var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
+var MarkdownFoldMode = require("./folding/markdown").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = MarkdownHighlightRules;
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "xml-": XmlMode,
+ "html-": HtmlMode
+ });
+
+ this.foldingRules = new MarkdownFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.type = "text";
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ if (state == "listblock") {
+ var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line);
+ if (!match)
+ return "";
+ var marker = match[2];
+ if (!marker)
+ marker = parseInt(match[3], 10) + 1 + ".";
+ return match[1] + marker + match[4];
+ } else {
+ return this.$getIndent(line);
+ }
+ };
+ this.$id = "ace/mode/markdown";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-mask.js b/js/vendor/ace/src-noconflict/mode-mask.js
new file mode 100755
index 0000000..1055e77
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-mask.js
@@ -0,0 +1,1983 @@
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function(options) {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment_regex_allowed"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex"
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ push: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "\\}",
+ next: "pop"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "comment" : [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }],
+
+ "ruleset" : [
+ {
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "pop"
+ }, {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : ["support.function", "string", "support.function"],
+ regex : "(url\\()(.*)(\\))"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
+ },
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
+ },
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
+ ],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+
+var escaped = function(ch) {
+ return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
+}
+
+function github_embed(tag, prefix) {
+ return { // Github style block
+ token : "support.function",
+ regex : "^\\s*```" + tag + "\\s*$",
+ push : prefix + "start"
+ };
+}
+
+var MarkdownHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ this.$rules["start"].unshift({
+ token : "empty_line",
+ regex : '^$',
+ next: "allowBlock"
+ }, { // h1
+ token: "markup.heading.1",
+ regex: "^=+(?=\\s*$)"
+ }, { // h2
+ token: "markup.heading.2",
+ regex: "^\\-+(?=\\s*$)"
+ }, {
+ token : function(value) {
+ return "markup.heading." + value.length;
+ },
+ regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/,
+ next : "header"
+ },
+ github_embed("(?:javascript|js)", "jscode-"),
+ github_embed("xml", "xmlcode-"),
+ github_embed("html", "htmlcode-"),
+ github_embed("css", "csscode-"),
+ { // Github style block
+ token : "support.function",
+ regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
+ }, { // block quote
+ token : "string.blockquote",
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
+ next : "blockquote"
+ }, { // HR * - _
+ token : "constant",
+ regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",
+ next: "allowBlock"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock-start"
+ }, {
+ include : "basic"
+ });
+
+ this.addRules({
+ "basic" : [{
+ token : "constant.language.escape",
+ regex : /\\[\\`*_{}\[\]()#+\-.!]/
+ }, { // code span `
+ token : "support.function",
+ regex : "(`+)(.*?[^`])(\\1)"
+ }, { // reference
+ token : ["text", "constant", "text", "url", "string", "text"],
+ regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
+ }, { // link by reference
+ token : ["text", "string", "text", "constant", "text"],
+ regex : "(\\[)(" + escaped("]") + ")(\\]\s*\\[)("+ escaped("]") + ")(\\])"
+ }, { // link by url
+ token : ["text", "string", "text", "markup.underline", "string", "text"],
+ regex : "(\\[)(" + // [
+ escaped("]") + // link text
+ ")(\\]\\()"+ // ](
+ '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href
+ '(\\s*"' + escaped('"') + '"\\s*)?' + // "title"
+ "(\\))" // )
+ }, { // strong ** __
+ token : "string.strong",
+ regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"
+ }, { // emphasis * _
+ token : "string.emphasis",
+ regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"
+ }, { //
+ token : ["text", "url", "text"],
+ regex : "(<)("+
+ "(?:https?|ftp|dict):[^'\">\\s]+"+
+ "|"+
+ "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
+ ")(>)"
+ }],
+ "allowBlock": [
+ {token : "support.function", regex : "^ {4}.+", next : "allowBlock"},
+ {token : "empty", regex : "", next : "start"}
+ ],
+
+ "header" : [{
+ regex: "$",
+ next : "start"
+ }, {
+ include: "basic"
+ }, {
+ defaultToken : "heading"
+ } ],
+
+ "listblock-start" : [{
+ token : "support.variable",
+ regex : /(?:\[[ x]\])?/,
+ next : "listblock"
+ }],
+
+ "listblock" : [ { // Lists only escape on completely blank lines.
+ token : "empty_line",
+ regex : "^$",
+ next : "start"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock-start"
+ }, {
+ include : "basic", noEscape: true
+ }, { // Github style block
+ token : "support.function",
+ regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
+ }, {
+ defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
+ } ],
+
+ "blockquote" : [ { // Blockquotes only escape on blank lines.
+ token : "empty_line",
+ regex : "^\\s*$",
+ next : "start"
+ }, { // block quote
+ token : "string.blockquote",
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
+ next : "blockquote"
+ }, {
+ include : "basic", noEscape: true
+ }, {
+ defaultToken : "string.blockquote"
+ } ],
+
+ "githubblock" : [ {
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "start"
+ }, {
+ token : "support.function",
+ regex : ".+"
+ } ]
+ });
+
+ this.embedRules(JavaScriptHighlightRules, "jscode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(HtmlHighlightRules, "htmlcode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(CssHighlightRules, "csscode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(XmlHighlightRules, "xmlcode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.normalizeRules();
+};
+oop.inherits(MarkdownHighlightRules, TextHighlightRules);
+
+exports.MarkdownHighlightRules = MarkdownHighlightRules;
+});
+
+ace.define("ace/mode/mask_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/css_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+exports.MaskHighlightRules = MaskHighlightRules;
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextRules = require("./text_highlight_rules").TextHighlightRules;
+var JSRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var CssRules = require("./css_highlight_rules").CssHighlightRules;
+var MDRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
+var HTMLRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var token_TAG = "keyword.support.constant.language",
+ token_COMPO = "support.function.markup.bold",
+ token_KEYWORD = "keyword",
+ token_LANG = "constant.language",
+ token_UTIL = "keyword.control.markup.italic",
+ token_ATTR = "support.variable.class",
+ token_PUNKT = "keyword.operator",
+ token_ITALIC = "markup.italic",
+ token_BOLD = "markup.bold",
+ token_LPARE = "paren.lparen",
+ token_RPARE = "paren.rparen";
+
+var const_FUNCTIONS,
+ const_KEYWORDS,
+ const_CONST,
+ const_TAGS;
+(function(){
+ const_FUNCTIONS = lang.arrayToMap(
+ ("log").split("|")
+ );
+ const_CONST = lang.arrayToMap(
+ (":dualbind|:bind|:import|slot|event|style|html|markdown|md").split("|")
+ );
+ const_KEYWORDS = lang.arrayToMap(
+ ("debugger|define|var|if|each|for|of|else|switch|case|with|visible|+if|+each|+for|+switch|+with|+visible|include|import").split("|")
+ );
+ const_TAGS = lang.arrayToMap(
+ ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
+ "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
+ "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
+ "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
+ "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
+ "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
+ "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
+ "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
+ "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
+ );
+}());
+
+function MaskHighlightRules () {
+
+ this.$rules = {
+ "start" : [
+ Token("comment", "\\/\\/.*$"),
+ Token("comment", "\\/\\*", [
+ Token("comment", ".*?\\*\\/", "start"),
+ Token("comment", ".+")
+ ]),
+
+ Blocks.string("'''"),
+ Blocks.string('"""'),
+ Blocks.string('"'),
+ Blocks.string("'"),
+
+ Blocks.syntax(/(markdown|md)\b/, "md-multiline", "multiline"),
+ Blocks.syntax(/html\b/, "html-multiline", "multiline"),
+ Blocks.syntax(/(slot|event)\b/, "js-block", "block"),
+ Blocks.syntax(/style\b/, "css-block", "block"),
+ Blocks.syntax(/var\b/, "js-statement", "attr"),
+
+ Blocks.tag(),
+
+ Token(token_LPARE, "[[({>]"),
+ Token(token_RPARE, "[\\])};]", "start"),
+ {
+ caseInsensitive: true
+ }
+ ]
+ };
+ var rules = this;
+
+ addJavaScript("interpolation", /\]/, token_RPARE + "." + token_ITALIC);
+ addJavaScript("statement", /\)|}|;/);
+ addJavaScript("block", /\}/);
+ addCss();
+ addMarkdown();
+ addHtml();
+
+ function addJavaScript(name, escape, closeType) {
+ var prfx = "js-" + name + "-",
+ rootTokens = name === "block" ? ["start"] : ["start", "no_regex"];
+ add(
+ JSRules
+ , prfx
+ , escape
+ , rootTokens
+ , closeType
+ );
+ }
+ function addCss() {
+ add(CssRules, "css-block-", /\}/);
+ }
+ function addMarkdown() {
+ add(MDRules, "md-multiline-", /("""|''')/, []);
+ }
+ function addHtml() {
+ add(HTMLRules, "html-multiline-", /("""|''')/);
+ }
+ function add(Rules, strPrfx, rgxEnd, rootTokens, closeType) {
+ var next = "pop";
+ var tokens = rootTokens || [ "start" ];
+ if (tokens.length === 0) {
+ tokens = null;
+ }
+ if (/block|multiline/.test(strPrfx)) {
+ next = strPrfx + "end";
+ rules.$rules[next] = [
+ Token("empty", "", "start")
+ ];
+ }
+ rules.embedRules(
+ Rules
+ , strPrfx
+ , [ Token(closeType || token_RPARE, rgxEnd, next) ]
+ , tokens
+ , tokens == null ? true : false
+ );
+ }
+
+ this.normalizeRules();
+}
+oop.inherits(MaskHighlightRules, TextRules);
+
+var Blocks = {
+ string: function(str, next){
+ var token = Token(
+ "string.start"
+ , str
+ , [
+ Token(token_LPARE + "." + token_ITALIC, /~\[/, Blocks.interpolation()),
+ Token("string.end", str, "pop"),
+ {
+ defaultToken: "string"
+ }
+ ]
+ , next
+ );
+ if (str.length === 1){
+ var escaped = Token("string.escape", "\\\\" + str);
+ token.push.unshift(escaped);
+ }
+ return token;
+ },
+ interpolation: function(){
+ return [
+ Token(token_UTIL, /\s*\w*\s*:/),
+ "js-interpolation-start"
+ ];
+ },
+ tagHead: function (rgx) {
+ return Token(token_ATTR, rgx, [
+ Token(token_ATTR, /[\w\-_]+/),
+ Token(token_LPARE + "." + token_ITALIC, /~\[/, Blocks.interpolation()),
+ Blocks.goUp()
+ ]);
+ },
+ tag: function () {
+ return {
+ token: 'tag',
+ onMatch : function(value) {
+ if (void 0 !== const_KEYWORDS[value])
+ return token_KEYWORD;
+ if (void 0 !== const_CONST[value])
+ return token_LANG;
+ if (void 0 !== const_FUNCTIONS[value])
+ return "support.function";
+ if (void 0 !== const_TAGS[value.toLowerCase()])
+ return token_TAG;
+
+ return token_COMPO;
+ },
+ regex : /([@\w\-_:+]+)|((^|\s)(?=\s*(\.|#)))/,
+ push: [
+ Blocks.tagHead(/\./) ,
+ Blocks.tagHead(/\#/) ,
+ Blocks.expression(),
+ Blocks.attribute(),
+
+ Token(token_LPARE, /[;>{]/, "pop")
+ ]
+ };
+ },
+ syntax: function(rgx, next, type){
+ return {
+ token: token_LANG,
+ regex : rgx,
+ push: ({
+ "attr": [
+ next + "-start",
+ Token(token_PUNKT, /;/, "start")
+ ],
+ "multiline": [
+ Blocks.tagHead(/\./) ,
+ Blocks.tagHead(/\#/) ,
+ Blocks.attribute(),
+ Blocks.expression(),
+ Token(token_LPARE, /[>\{]/),
+ Token(token_PUNKT, /;/, "start"),
+ Token(token_LPARE, /'''|"""/, [ next + "-start" ])
+ ],
+ "block": [
+ Blocks.tagHead(/\./) ,
+ Blocks.tagHead(/\#/) ,
+ Blocks.attribute(),
+ Blocks.expression(),
+ Token(token_LPARE, /\{/, [ next + "-start" ])
+ ]
+ })[type]
+ };
+ },
+ attribute: function(){
+ return Token(function(value){
+ return /^x\-/.test(value)
+ ? token_ATTR + "." + token_BOLD
+ : token_ATTR;
+ }, /[\w_-]+/, [
+ Token(token_PUNKT, /\s*=\s*/, [
+ Blocks.string('"'),
+ Blocks.string("'"),
+ Blocks.word(),
+ Blocks.goUp()
+ ]),
+ Blocks.goUp()
+ ]);
+ },
+ expression: function(){
+ return Token(token_LPARE, /\(/, [ "js-statement-start" ]);
+ },
+ word: function(){
+ return Token("string", /[\w-_]+/);
+ },
+ goUp: function(){
+ return Token("text", "", "pop");
+ },
+ goStart: function(){
+ return Token("text", "", "start");
+ }
+};
+
+
+function Token(token, rgx, mix) {
+ var push, next, onMatch;
+ if (arguments.length === 4) {
+ push = mix;
+ next = arguments[3];
+ }
+ else if (typeof mix === "string") {
+ next = mix;
+ }
+ else {
+ push = mix;
+ }
+ if (typeof token === "function") {
+ onMatch = token;
+ token = "empty";
+ }
+ return {
+ token: token,
+ regex: rgx,
+ push: push,
+ next: next,
+ onMatch: onMatch
+ };
+}
+
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar === ';') {
+ range.end.column ++;
+ return range;
+ }
+ }
+ }
+ });
+
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/mask",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mask_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var MaskHighlightRules = require("./mask_highlight_rules").MaskHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = MaskHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/mask";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-matlab.js b/js/vendor/ace/src-noconflict/mode-matlab.js
index f34ced6..8832ed6 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-matlab.js
+++ b/js/vendor/ace/src-noconflict/mode-matlab.js
@@ -1,60 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/matlab', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/matlab_highlight_rules', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var MatlabHighlightRules = require("./matlab_highlight_rules").MatlabHighlightRules;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new MatlabHighlightRules().getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "%";
- this.blockComment = {start: "%{", end: "%}"};
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/matlab_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/matlab_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -189,15 +134,52 @@ var keywords = (
}, "identifier", true);
this.$rules = {
- "start" : [ {
- token : "comment",
- regex : "^%[^\r\n]*"
+ start: [{
+ token : "string",
+ regex : "'",
+ stateName : "qstring",
+ next : [{
+ token : "constant.language.escape",
+ regex : "''"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }]
}, {
- token : "string", // " string
- regex : '".*?"'
+ token : "text",
+ regex : "\\s+"
+ }, {
+ regex: "",
+ next: "noQstring"
+ }],
+ noQstring : [{
+ regex: "^\\s*%{\\s*$",
+ token: "comment.start",
+ push: "blockComment"
}, {
- token : "string", // ' string
- regex : "'.*?'"
+ token : "comment",
+ regex : "%[^\r\n]*"
+ }, {
+ token : "string",
+ regex : '"',
+ stateName : "qqstring",
+ next : [{
+ token : "constant.language.escape",
+ regex : /\\./
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }]
}, {
token : "constant.numeric", // float
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
@@ -206,24 +188,69 @@ var keywords = (
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
}, {
token : "keyword.operator",
- regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
+ regex : "\\+|\\-|\\/|\\/\\/|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=",
+ next: "start"
}, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\."
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\.",
+ next: "start"
}, {
token : "paren.lparen",
- regex : "[\\(]"
+ regex : "[({\\[]",
+ next: "start"
}, {
token : "paren.rparen",
- regex : "[\\)]"
+ regex : "[\\]})]"
}, {
token : "text",
regex : "\\s+"
- } ]
+ }, {
+ token : "text",
+ regex : "$",
+ next : "start"
+ }],
+ blockComment: [{
+ regex: "^\\s*%{\\s*$",
+ token: "comment.start",
+ push: "blockComment"
+ }, {
+ regex: "^\\s*%}\\s*$",
+ token: "comment.end",
+ next: "pop"
+ }, {
+ defaultToken: "comment"
+ }],
};
+
+ this.normalizeRules();
};
oop.inherits(MatlabHighlightRules, TextHighlightRules);
exports.MatlabHighlightRules = MatlabHighlightRules;
-}); \ No newline at end of file
+});
+
+ace.define("ace/mode/matlab",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matlab_highlight_rules","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var MatlabHighlightRules = require("./matlab_highlight_rules").MatlabHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = MatlabHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "%";
+ this.blockComment = {start: "%{", end: "%}"};
+
+ this.$id = "ace/mode/matlab";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-mavens_mate_log.js b/js/vendor/ace/src-noconflict/mode-mavens_mate_log.js
new file mode 100755
index 0000000..d8634ab
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-mavens_mate_log.js
@@ -0,0 +1,211 @@
+ace.define("ace/mode/mavens_mate_log_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var MavensMateLogHighlightRules = function() {
+
+ this.$rules = {
+ start: [{
+ token: "markup.inserted",
+ regex: /\s*Result: Success/
+ }, {
+ token: "keyword",
+ regex: /[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]\s/
+ }, {
+ token: "string",
+ regex: /\|["USER_DEBUG"]+\|/
+ }, {
+ token: "support.type.exception",
+ regex: /\|["EXCEPTION_THROWN"]+\|/
+ }, {
+ token: "support.type.exception",
+ regex: /\|["FATAL_ERROR"]+\|/
+ }, {
+ token: "variable",
+ regex: /\|[A-Z,_]+\|/
+ }, {
+ token: "variable.language",
+ regex: /\[[0-9]{0,5}\]/
+ }, {
+ token: "keyword",
+ regex: /true|false/
+ }]
+ }
+
+ this.normalizeRules();
+};
+
+MavensMateLogHighlightRules.metaData = {
+ name: "MavensMate Log",
+ fileTypes: ["log"],
+ scopeName: "source.log"
+}
+
+
+oop.inherits(MavensMateLogHighlightRules, TextHighlightRules);
+
+exports.MavensMateLogHighlightRules = MavensMateLogHighlightRules;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/mavens_mate_log",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mavens_mate_log_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var MavensMateLogHighlightRules = require("./mavens_mate_log_highlight_rules").MavensMateLogHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = MavensMateLogHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$id = "ace/mode/mavens_mate_log"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-mel.js b/js/vendor/ace/src-noconflict/mode-mel.js
new file mode 100755
index 0000000..74bd351
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-mel.js
@@ -0,0 +1,613 @@
+ace.define("ace/mode/mel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var MELHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { caseInsensitive: true,
+ token: 'storage.type.mel',
+ regex: '\\b(matrix|string|vector|float|int|void)\\b' },
+ { caseInsensitive: true,
+ token: 'support.function.mel',
+ regex: '\\b((s(h(ow(ManipCtx|S(hadingGroupAttrEditor|electionInTitle)|H(idden|elp)|Window)|el(f(Button|TabLayout|Layout)|lField)|ading(GeometryRelCtx|Node|Connection|LightRelCtx))|y(s(tem|File)|mbol(Button|CheckBox))|nap(shot|Mode|2to2 |TogetherCtx|Key)|c(ulpt|ene(UIReplacement|Editor)|ale(BrushBrightness |Constraint|Key(Ctx)?)?|r(ipt(Node|Ctx|Table|edPanel(Type)?|Job|EditorInfo)|oll(Field|Layout))|mh)|t(itch(Surface(Points)?|AndExplodeShell )|a(ckTrace|rt(sWith |String ))|r(cmp|i(ng(ToStringArray |Array(Remove(Duplicates | )|C(ount |atenate )|ToString |Intersector))|p )|oke))|i(n(gleProfileBirailSurface)?|ze|gn|mplify)|o(u(nd(Control)?|rce)|ft(Mod(Ctx)?)?|rt)|u(perCtx|rface(S(haderList|ampler))?|b(st(itute(Geometry|AllString )?|ring)|d(M(irror|a(tchTopology|p(SewMove|Cut)))|iv(Crease|DisplaySmoothness)?|C(ollapse|leanTopology)|T(o(Blind|Poly)|ransferUVsToCache)|DuplicateAndConnect|EditUV|ListComponentConversion|AutoProjection)))|p(h(ere|rand)|otLight(PreviewPort)?|aceLocator|r(ing|eadSheetEditor))|e(t(s|MenuMode|Sta(te |rtupMessage|mpDensity )|NodeTypeFlag|ConstraintRestPosition |ToolTo|In(putDeviceMapping|finity)|D(ynamic|efaultShadingGroup|rivenKeyframe)|UITemplate|P(ar(ticleAttr|ent)|roject )|E(scapeCtx|dit(or|Ctx))|Key(Ctx|frame|Path)|F(ocus|luidAttr)|Attr(Mapping)?)|parator|ed|l(ect(Mode|ionConnection|Context|Type|edNodes|Pr(iority|ef)|Key(Ctx)?)?|LoadSettings)|archPathArray )|kin(Cluster|Percent)|q(uareSurface|rt)|w(itchTable|atchDisplayPort)|a(ve(Menu|Shelf|ToolSettings|I(nitialState|mage)|Pref(s|Objects)|Fluid|A(ttrPreset |llShelves))|mpleImage)|rtContext|mooth(step|Curve|TangentSurface))|h(sv_to_rgb|yp(ot|er(Graph|Shade|Panel))|i(tTest|de|lite)|ot(Box|key(Check)?)|ud(Button|Slider(Button)?)|e(lp(Line)?|adsUpDisplay|rmite)|wRe(nder(Load)?|flectionMap)|ard(enPointCurve|ware(RenderPanel)?))|n(o(nLinear|ise|de(Type|IconButton|Outliner|Preset)|rmal(ize |Constraint))|urbs(Boolean|S(elect|quare)|C(opyUVSet|ube)|To(Subdiv|Poly(gonsPref)?)|Plane|ViewDirectionVector )|ew(ton|PanelItems)|ame(space(Info)?|Command|Field))|c(h(oice|dir|eck(Box(Grp)?|DefaultRenderGlobals)|a(n(nelBox|geSubdiv(Region|ComponentDisplayLevel))|racter(Map|OutlineEditor)?))|y(cleCheck|linder)|tx(Completion|Traverse|EditMode|Abort)|irc(ularFillet|le)|o(s|n(str(uctionHistory|ain(Value)?)|nect(ionInfo|Control|Dynamic|Joint|Attr)|t(extInfo|rol)|dition|e|vert(SolidTx|Tessellation|Unit|FromOldLayers |Lightmap)|firmDialog)|py(SkinWeights|Key|Flexor|Array )|l(or(Slider(Grp|ButtonGrp)|Index(SliderGrp)?|Editor|AtPoint)?|umnLayout|lision)|arsenSubdivSelectionList|m(p(onentEditor|utePolysetVolume |actHairSystem )|mand(Port|Echo|Line)))|u(tKey|r(ve(MoveEPCtx|SketchCtx|CVCtx|Intersect|OnSurface|E(ditorCtx|PCtx)|AddPtCtx)?|rent(Ctx|Time(Ctx)?|Unit)))|p(GetSolverAttr|Button|S(olver(Types)?|e(t(SolverAttr|Edit)|am))|C(o(nstraint|llision)|ache)|Tool|P(anel|roperty))|eil|l(ip(Schedule(rOutliner)?|TrimBefore |Editor(CurrentTimeCtx)?)?|ose(Surface|Curve)|uster|ear(Cache)?|amp)|a(n(CreateManip|vas)|tch(Quiet)?|pitalizeString |mera(View)?)|r(oss(Product )?|eate(RenderLayer|MotionField |SubdivRegion|N(ode|ewShelf )|D(isplayLayer|rawCtx)|Editor))|md(Shell|FileOutput))|M(R(ender(ShadowData|Callback|Data|Util|View|Line(Array)?)|ampAttribute)|G(eometryData|lobal)|M(odelMessage|essage|a(nipData|t(erial|rix)))|BoundingBox|S(yntax|ceneMessage|t(atus|ring(Array)?)|imple|pace|elect(ion(Mask|List)|Info)|watchRender(Register|Base))|H(ardwareRenderer|WShaderSwatchGenerator)|NodeMessage|C(o(nditionMessage|lor(Array)?|m(putation|mand(Result|Message)))|ursor|loth(Material|S(ystem|olverRegister)|Con(straint|trol)|Triangle|Particle|Edge|Force)|allbackIdArray)|T(ypeId|ime(r(Message)?|Array)?|oolsInfo|esselationParams|r(imBoundaryArray|ansformationMatrix))|I(ntArray|t(Geometry|Mesh(Polygon|Edge|Vertex|FaceVertex)|S(urfaceCV|electionList)|CurveCV|Instancer|eratorType|D(ependency(Graph|Nodes)|ag)|Keyframe)|k(System|HandleGroup)|mage)|3dView|Object(SetMessage|Handle|Array)?|D(G(M(odifier|essage)|Context)|ynSwept(Triangle|Line)|istance|oubleArray|evice(State|Channel)|a(ta(Block|Handle)|g(M(odifier|essage)|Path(Array)?))|raw(Request(Queue)?|Info|Data|ProcedureBase))|U(serEventMessage|i(nt(Array|64Array)|Message))|P(o(int(Array)?|lyMessage)|lug(Array)?|rogressWindow|x(G(eometry(Iterator|Data)|lBuffer)|M(idiInputDevice|odelEditorCommand|anipContainer)|S(urfaceShape(UI)?|pringNode|electionContext)|HwShaderNode|Node|Co(ntext(Command)?|m(ponentShape|mand))|T(oolCommand|ransform(ationMatrix)?)|IkSolver(Node)?|3dModelView|ObjectSet|D(eformerNode|ata|ragAndDropBehavior)|PolyT(weakUVCommand|rg)|EmitterNode|F(i(eldNode|leTranslator)|luidEmitterNode)|LocatorNode))|E(ulerRotation|vent(Message)?)|ayatomr|Vector(Array)?|Quaternion|F(n(R(otateManip|eflectShader|adialField)|G(e(nericAttribute|ometry(Data|Filter))|ravityField)|M(otionPath|es(sageAttribute|h(Data)?)|a(nip3D|trix(Data|Attribute)))|B(l(innShader|endShapeDeformer)|ase)|S(caleManip|t(ateManip|ring(Data|ArrayData))|ingleIndexedComponent|ubd(Names|Data)?|p(hereData|otLight)|et|kinCluster)|HikEffector|N(on(ExtendedLight|AmbientLight)|u(rbs(Surface(Data)?|Curve(Data)?)|meric(Data|Attribute))|ewtonField)|C(haracter|ircleSweepManip|ompo(nent(ListData)?|undAttribute)|urveSegmentManip|lip|amera)|T(ypedAttribute|oggleManip|urbulenceField|r(ipleIndexedComponent|ansform))|I(ntArrayData|k(Solver|Handle|Joint|Effector))|D(ynSweptGeometryData|i(s(cManip|tanceManip)|rection(Manip|alLight))|ouble(IndexedComponent|ArrayData)|ependencyNode|a(ta|gNode)|ragField)|U(ni(tAttribute|formField)|Int64ArrayData)|P(hong(Shader|EShader)|oint(On(SurfaceManip|CurveManip)|Light|ArrayData)|fxGeometry|lugin(Data)?|arti(cleSystem|tion))|E(numAttribute|xpression)|V(o(lume(Light|AxisField)|rtexField)|ectorArrayData)|KeyframeDelta(Move|B(lockAddRemove|reakdown)|Scale|Tangent|InfType|Weighted|AddRemove)?|F(ield|luid|reePointTriadManip)|W(ireDeformer|eightGeometryFilter)|L(ight(DataAttribute)?|a(yeredShader|ttice(D(eformer|ata))?|mbertShader))|A(ni(sotropyShader|mCurve)|ttribute|irField|r(eaLight|rayAttrsData)|mbientLight))?|ile(IO|Object)|eedbackLine|loat(Matrix|Point(Array)?|Vector(Array)?|Array))|L(i(ghtLinks|brary)|ockMessage)|A(n(im(Message|C(ontrol|urveC(hange|lipboard(Item(Array)?)?))|Util)|gle)|ttribute(Spec(Array)?|Index)|r(rayData(Builder|Handle)|g(Database|Parser|List))))|t(hreePointArcCtx|ime(Control|Port|rX)|o(ol(Button|HasOptions|Collection|Dropped|PropertyWindow)|NativePath |upper|kenize(List )?|l(ower|erance)|rus|ggle(WindowVisibility|Axis)?)|u(rbulence|mble(Ctx)?)|ex(RotateContext|M(oveContext|anipContext)|t(ScrollList|Curves|ure(HairColor |DisplacePlane |PlacementContext|Window)|ToShelf |Field(Grp|ButtonGrp)?)?|S(caleContext|electContext|mudgeUVContext)|WinToolCtx)|woPointArcCtx|a(n(gentConstraint)?|bLayout)|r(im|unc(ate(HairCache|FluidCache))?|a(ns(formLimits|lator)|c(e|k(Ctx)?))))|i(s(olateSelect|Connected|True|Dirty|ParentOf |Valid(String |ObjectName |UiName )|AnimCurve )|n(s(tance(r)?|ert(Joint(Ctx)?|K(not(Surface|Curve)|eyCtx)))|heritTransform|t(S(crollBar|lider(Grp)?)|er(sect|nalVar|ToUI )|Field(Grp)?))|conText(Radio(Button|Collection)|Button|StaticLabel|CheckBox)|temFilter(Render|Type|Attr)?|prEngine|k(S(ystem(Info)?|olver|plineHandleCtx)|Handle(Ctx|DisplayScale)?|fkDisplayMethod)|m(portComposerCurves |fPlugins|age))|o(ceanNurbsPreviewPlane |utliner(Panel|Editor)|p(tion(Menu(Grp)?|Var)|en(GLExtension|MayaPref))|verrideModifier|ffset(Surface|Curve(OnSurface)?)|r(ientConstraint|bit(Ctx)?)|b(soleteProc |j(ect(Center|Type(UI)?|Layer )|Exists)))|d(yn(RelEd(itor|Panel)|Globals|C(ontrol|ache)|P(a(intEditor|rticleCtx)|ref)|Exp(ort|ression)|amicLoad)|i(s(connect(Joint|Attr)|tanceDim(Context|ension)|pla(y(RGBColor|S(tats|urface|moothness)|C(olor|ull)|Pref|LevelOfDetail|Affected)|cementToPoly)|kCache|able)|r(name |ect(ionalLight|KeyCtx)|map)|mWhen)|o(cServer|Blur|t(Product )?|ubleProfileBirailSurface|peSheetEditor|lly(Ctx)?)|uplicate(Surface|Curve)?|e(tach(Surface|Curve|DeviceAttr)|vice(Panel|Editor)|f(ine(DataServer|VirtualDevice)|ormer|ault(Navigation|LightListCheckBox))|l(ete(Sh(elfTab |adingGroupsAndMaterials )|U(nusedBrushes |I)|Attr)?|randstr)|g_to_rad)|agPose|r(opoffLocator|ag(gerContext)?)|g(timer|dirty|Info|eval))|CBG |u(serCtx|n(t(angleUV|rim)|i(t|form)|do(Info)?|loadPlugin|assignInputDevice|group)|iTemplate|p(dateAE |Axis)|v(Snapshot|Link))|joint(C(tx|luster)|DisplayScale|Lattice)?|p(sd(ChannelOutliner|TextureFile|E(ditTextureFile|xport))|close|i(c(ture|kWalk)|xelMove)|o(se|int(MatrixMult |C(onstraint|urveConstraint)|On(Surface|Curve)|Position|Light)|p(upMenu|en)|w|l(y(Reduce|GeoSampler|M(irrorFace|ove(UV|Edge|Vertex|Facet(UV)?)|erge(UV|Edge(Ctx)?|Vertex|Facet(Ctx)?)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|l(indData|endColor))|S(traightenUVBorder|oftEdge|u(perCtx|bdivide(Edge|Facet))|p(her(icalProjection|e)|lit(Ring|Ctx|Edge|Vertex)?)|e(tToFaceNormal|parate|wEdge|lect(Constraint(Monitor)?|EditCtx))|mooth)|Normal(izeUV|PerVertex)?|C(hipOff|ylind(er|ricalProjection)|o(ne|pyUV|l(or(BlindData|Set|PerVertex)|lapse(Edge|Facet)))|u(t(Ctx)?|be)|l(ipboard|oseBorder)|acheMonitor|rea(seEdge|teFacet(Ctx)?))|T(o(Subdiv|rus)|r(iangulate|ansfer))|In(stallAction|fo)|Options|D(uplicate(Edge|AndConnect)|el(Edge|Vertex|Facet))|U(nite|VSet)|P(yramid|oke|lan(e|arProjection)|r(ism|ojection))|E(ditUV|valuate|xtrude(Edge|Facet))|Qu(eryBlindData|ad)|F(orceUV|lip(UV|Edge))|WedgeFace|L(istComponentConversion|ayoutUV)|A(utoProjection|ppend(Vertex|FacetCtx)?|verage(Normal|Vertex)))|eVectorConstraint))|utenv|er(cent|formanceOptions)|fxstrokes|wd|l(uginInfo|a(y(b(last|ackOptions))?|n(e|arSrf)))|a(steKey|ne(l(History|Configuration)?|Layout)|thAnimation|irBlend|use|lettePort|r(ti(cle(RenderInfo|Instancer|Exists)?|tion)|ent(Constraint)?|am(Dim(Context|ension)|Locator)))|r(int|o(j(ect(ion(Manip|Context)|Curve|Tangent)|FileViewer)|pMo(dCtx|ve)|gress(Bar|Window)|mptDialog)|eloadRefEd))|e(n(codeString|d(sWith |String )|v|ableDevice)|dit(RenderLayer(Globals|Members)|or(Template)?|DisplayLayer(Globals|Members)|AttrLimits )|v(ent|al(Deferred|Echo)?)|quivalent(Tol | )|ffector|r(f|ror)|x(clusiveLightCheckBox|t(end(Surface|Curve)|rude)|ists|p(ortComposerCurves |ression(EditorListen)?)?|ec(uteForEachObject )?|actWorldBoundingBox)|mit(ter)?)|v(i(sor|ew(Set|HeadOn|2dToolCtx|C(lipPlane|amera)|Place|Fit|LookAt))|o(lumeAxis|rtex)|e(ctorize|rifyCmd )|alidateShelfName )|key(Tangent|frame(Region(MoveKeyCtx|S(caleKeyCtx|e(tKeyCtx|lectKeyCtx))|CurrentTimeCtx|TrackCtx|InsertKeyCtx|D(irectKeyCtx|ollyCtx))|Stats|Outliner)?)|qu(it|erySubdiv)|f(c(heck|lose)|i(nd(RelatedSkinCluster |MenuItem |er|Keyframe|AllIntersections )|tBspline|l(ter(StudioImport|Curve|Expand)?|e(BrowserDialog|test|Info|Dialog|Extension )?|letCurve)|rstParentOf )|o(ntDialog|pen|rmLayout)|print|eof|flush|write|l(o(or|w|at(S(crollBar|lider(Grp|ButtonGrp|2)?)|Eq |Field(Grp)?))|u(shUndo|id(CacheInfo|Emitter|VoxelInfo))|exor)|r(omNativePath |e(eFormFillet|wind|ad)|ameLayout)|get(word|line)|mod)|w(hatIs|i(ndow(Pref)?|re(Context)?)|orkspace|ebBrowser(Prefs)?|a(itCursor|rning)|ri(nkle(Context)?|teTake))|l(s(T(hroughFilter|ype )|UI)?|i(st(Relatives|MenuAnnotation |Sets|History|NodeTypes|C(onnections|ameras)|Transforms |InputDevice(s|Buttons|Axes)|erEditor|DeviceAttachments|Unselected |A(nimatable|ttr))|n(step|eIntersection )|ght(link|List(Panel|Editor)?))|o(ckNode|okThru|ft|ad(NewShelf |P(lugin|refObjects)|Fluid)|g)|a(ssoContext|y(out|er(Button|ed(ShaderPort|TexturePort)))|ttice(DeformKeyCtx)?|unch(ImageEditor)?))|a(ssign(Command|InputDevice)|n(notate|im(C(one|urveEditor)|Display|View)|gle(Between)?)|tt(ach(Surface|Curve|DeviceAttr)|r(ibute(Menu|Info|Exists|Query)|NavigationControlGrp|Co(ntrolGrp|lorSliderGrp|mpatibility)|PresetEditWin|EnumOptionMenu(Grp)?|Field(Grp|SliderGrp)))|i(r|mConstraint)|d(d(NewShelfTab|Dynamic|PP|Attr(ibuteEditorNodeHelp)?)|vanceToNextDrivenKey)|uto(Place|Keyframe)|pp(endStringArray|l(y(Take|AttrPreset)|icationName))|ffect(s|edNet)|l(i(as(Attr)?|gn(Surface|C(tx|urve))?)|lViewFit)|r(c(len|Len(DimContext|gthDimension))|t(BuildPaintMenu|Se(tPaintCtx|lectCtx)|3dPaintCtx|UserPaintCtx|PuttyCtx|FluidAttrCtx|Attr(SkinPaintCtx|Ctx|PaintVertexCtx))|rayMapper)|mbientLight|b(s|out))|r(igid(Body|Solver)|o(t(at(ionInterpolation|e))?|otOf |undConstantRadius|w(ColumnLayout|Layout)|ll(Ctx)?)|un(up|TimeCommand)|e(s(olutionNode|et(Tool|AE )|ampleFluid)|hash|n(der(GlobalsNode|Manip|ThumbnailUpdate|Info|er|Partition|QualityNode|Window(SelectContext|Editor)|LayerButton)?|ame(SelectionList |UI|Attr)?)|cord(Device|Attr)|target|order(Deformers)?|do|v(olve|erse(Surface|Curve))|quires|f(ineSubdivSelectionList|erence(Edit|Query)?|resh(AE )?)|loadImage|adTake|root|move(MultiInstance|Joint)|build(Surface|Curve))|a(n(d(state|omizeFollicles )?|geControl)|d(i(o(MenuItemCollection|Button(Grp)?|Collection)|al)|_to_deg)|mpColorPort)|gb_to_hsv)|g(o(toBindPose |al)|e(t(M(odifiers|ayaPanelTypes )|Classification|InputDeviceRange|pid|env|DefaultBrush|Pa(nel|rticleAttr)|F(ileList|luidAttr)|A(ttr|pplicationVersionAsFloat ))|ometryConstraint)|l(Render(Editor)?|obalStitch)|a(uss|mma)|r(id(Layout)?|oup(ObjectsByName )?|a(dientControl(NoAttr)?|ph(SelectContext|TrackCtx|DollyCtx)|vity|bColor))|match)|x(pmPicker|form|bmLangPathList )|m(i(n(imizeApp)?|rrorJoint)|o(del(CurrentTimeCtx|Panel|Editor)|use|v(In|e(IKtoFK |VertexAlongDirection|KeyCtx)?|Out))|u(te|ltiProfileBirailSurface)|e(ssageLine|nu(BarLayout|Item(ToShelf )?|Editor)?|mory)|a(nip(Rotate(Context|LimitsCtx)|Move(Context|LimitsCtx)|Scale(Context|LimitsCtx)|Options)|tch|ke(Roll |SingleSurface|TubeOn |Identity|Paintable|bot|Live)|rker|g|x))|b(in(Membership|d(Skin|Pose))|o(neLattice|undary|x(ZoomCtx|DollyCtx))|u(tton(Manip)?|ild(BookmarkMenu|KeyframeMenu)|fferCurve)|e(ssel|vel(Plus)?)|l(indDataType|end(Shape(Panel|Editor)?|2|TwoAttr))|a(sename(Ex | )|tchRender|ke(Results|Simulation|Clip|PartialHistory|FluidShading )))))\\b' },
+ { caseInsensitive: true,
+ token: 'support.constant.mel',
+ regex: '\\b(s(h(ellTessellate|a(d(ing(Map|Engine)|erGlow)|pe))|n(ow|apshot(Shape)?)|c(ulpt|aleConstraint|ript)|t(yleCurve|itch(Srf|AsNurbsShell)|u(cco|dioClearCoat)|encil|roke(Globals)?)|i(ngleShadingSwitch|mpleVolumeShader)|o(ftMod(Manip|Handle)?|lidFractal)|u(rface(Sha(der|pe)|Info|EdManip|VarGroup|Luminance)|b(Surface|d(M(odifier(UV|World)?|ap(SewMove|Cut|pingManip))|B(lindData|ase)|iv(ReverseFaces|SurfaceVarGroup|Co(llapse|mponentId)|To(Nurbs|Poly))?|HierBlind|CleanTopology|Tweak(UV)?|P(lanarProj|rojManip)|LayoutUV|A(ddTopology|utoProj))|Curve))|p(BirailSrf|otLight|ring)|e(tRange|lectionListOperator)|k(inCluster|etchPlane)|quareSrf|ampler(Info)?|m(ooth(Curve|TangentSrf)|ear))|h(svToRgb|yper(GraphInfo|View|Layout)|ik(Solver|Handle|Effector)|oldMatrix|eightField|w(Re(nderGlobals|flectionMap)|Shader)|a(ir(System|Constraint|TubeShader)|rd(enPoint|wareRenderGlobals)))|n(o(n(ExtendedLightShapeNode|Linear|AmbientLightShapeNode)|ise|rmalConstraint)|urbs(Surface|Curve|T(oSubdiv(Proc)?|essellate)|DimShape)|e(twork|wtonField))|c(h(o(ice|oser)|ecker|aracter(Map|Offset)?)|o(n(straint|tr(olPoint|ast)|dition)|py(ColorSet|UVSet))|urve(Range|Shape|Normalizer(Linear|Angle)?|In(tersect|fo)|VarGroup|From(Mesh(CoM|Edge)?|Su(rface(Bnd|CoS|Iso)?|bdiv(Edge|Face)?)))|l(ip(Scheduler|Library)|o(se(stPointOnSurface|Surface|Curve)|th|ud)|uster(Handle)?|amp)|amera(View)?|r(eate(BPManip|ColorSet|UVSet)|ater))|t(ime(ToUnitConversion|Function)?|oo(nLineAttributes|lDrawManip)|urbulenceField|ex(BaseDeformManip|ture(BakeSet|2d|ToGeom|3d|Env)|SmudgeUVManip|LatticeDeformManip)|weak|angentConstraint|r(i(pleShadingSwitch|m(WithBoundaries)?)|ansform(Geometry)?))|i(n(s(tancer|ertKnot(Surface|Curve))|tersectSurface)|k(RPsolver|MCsolver|S(ystem|olver|Csolver|plineSolver)|Handle|PASolver|Effector)|m(plicit(Box|Sphere|Cone)|agePlane))|o(cean(Shader)?|pticalFX|ffset(Surface|C(os|urve))|ldBlindDataBase|rient(Constraint|ationMarker)|bject(RenderFilter|MultiFilter|BinFilter|S(criptFilter|et)|NameFilter|TypeFilter|Filter|AttrFilter))|d(yn(Globals|Base)|i(s(tance(Between|DimShape)|pla(yLayer(Manager)?|cementShader)|kCache)|rect(ionalLight|edDisc)|mensionShape)|o(ubleShadingSwitch|f)|pBirailSrf|e(tach(Surface|Curve)|pendNode|f(orm(Bend|S(ine|quash)|Twist|ableShape|F(unc|lare)|Wave)|ault(RenderUtilityList|ShaderList|TextureList|LightList))|lete(Co(lorSet|mponent)|UVSet))|ag(Node|Pose)|r(opoffLocator|agField))|u(seBackground|n(trim|i(t(Conversion|ToTimeConversion)|formField)|known(Transform|Dag)?)|vChooser)|j(iggle|oint(Cluster|Ffd|Lattice)?)|p(sdFileTex|hong(E)?|o(s(tProcessList|itionMarker)|int(MatrixMult|Constraint|On(SurfaceInfo|CurveInfo)|Emitter|Light)|l(y(Reduce|M(irror|o(difier(UV|World)?|ve(UV|Edge|Vertex|Face(tUV)?))|erge(UV|Edge|Vert|Face)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|lindData|ase)|S(traightenUVBorder|oftEdge|ubd(Edge|Face)|p(h(ere|Proj)|lit(Ring|Edge|Vert)?)|e(parate|wEdge)|mooth(Proxy|Face)?)|Normal(izeUV|PerVertex)?|C(hipOff|yl(inder|Proj)|o(ne|pyUV|l(orPerVertex|lapse(Edge|F)))|u(t(Manip(Container)?)?|be)|loseBorder|rea(seEdge|t(or|eFace)))|T(o(Subdiv|rus)|weak(UV)?|r(iangulate|ansfer))|OptUvs|D(uplicateEdge|el(Edge|Vertex|Facet))|Unite|P(yramid|oke(Manip)?|lan(e|arProj)|r(i(sm|mitive)|oj))|Extrude(Edge|Vertex|Face)|VertexNormalManip|Quad|Flip(UV|Edge)|WedgeFace|LayoutUV|A(utoProj|ppend(Vertex)?|verageVertex))|eVectorConstraint))|fx(Geometry|Hair|Toon)|l(usMinusAverage|a(n(e|arTrimSurface)|ce(2dTexture|3dTexture)))|a(ssMatrix|irBlend|r(ti(cle(SamplerInfo|C(olorMapper|loud)|TranspMapper|IncandMapper|AgeMapper)?|tion)|ent(Constraint|Tessellate)|amDimension))|r(imitive|o(ject(ion|Curve|Tangent)|xyManager)))|e(n(tity|v(Ball|ironmentFog|S(phere|ky)|C(hrome|ube)|Fog))|x(t(end(Surface|Curve)|rude)|p(lodeNurbsShell|ression)))|v(iewManip|o(lume(Shader|Noise|Fog|Light|AxisField)|rtexField)|e(ctor(RenderGlobals|Product)|rtexBakeSet))|quadShadingSwitch|f(i(tBspline|eld|l(ter(Resample|Simplify|ClosestSample|Euler)?|e|letCurve))|o(urByFourMatrix|llicle)|urPointOn(MeshInfo|Subd)|f(BlendSrf(Obsolete)?|d|FilletSrf)|l(ow|uid(S(hape|liceManip)|Texture(2D|3D)|Emitter)|exorShape)|ra(ctal|meCache))|w(tAddMatrix|ire|ood|eightGeometryFilter|ater|rap)|l(ight(Info|Fog|Li(st|nker))?|o(cator|okAt|d(Group|Thresholds)|ft)|uminance|ea(stSquaresModifier|ther)|a(yered(Shader|Texture)|ttice|mbert))|a(n(notationShape|i(sotropic|m(Blend(InOut)?|C(urve(T(T|U|L|A)|U(T|U|L|A))?|lip)))|gleBetween)|tt(ach(Surface|Curve)|rHierarchyTest)|i(rField|mConstraint)|dd(Matrix|DoubleLinear)|udio|vg(SurfacePoints|NurbsSurfacePoints|Curves)|lign(Manip|Surface|Curve)|r(cLengthDimension|tAttrPaintTest|eaLight|rayMapper)|mbientLight|bstractBase(NurbsConversion|Create))|r(igid(Body|Solver|Constraint)|o(ck|undConstantRadius)|e(s(olution|ultCurve(TimeTo(Time|Unitless|Linear|Angular))?)|nder(Rect|Globals(List)?|Box|Sphere|Cone|Quality|L(ight|ayer(Manager)?))|cord|v(olve(dPrimitive)?|erse(Surface|Curve)?)|f(erence|lect)|map(Hsv|Color|Value)|build(Surface|Curve))|a(dialField|mp(Shader)?)|gbToHsv|bfSrf)|g(uide|eo(Connect(or|able)|metry(Shape|Constraint|VarGroup|Filter))|lobal(Stitch|CacheControl)|ammaCorrect|r(id|oup(Id|Parts)|a(nite|vityField)))|Fur(Globals|Description|Feedback|Attractors)|xformManip|m(o(tionPath|untain|vie)|u(te|lt(Matrix|i(plyDivide|listerLight)|DoubleLinear))|pBirailSrf|e(sh(VarGroup)?|ntalray(Texture|IblShape))|a(terialInfo|ke(Group|Nurb(sSquare|Sphere|C(ylinder|ircle|one|ube)|Torus|Plane)|CircularArc|T(hreePointCircularArc|extCurves|woPointCircularArc))|rble))|b(irailSrf|o(neLattice|olean|undary(Base)?)|u(lge|mp(2d|3d))|evel(Plus)?|l(in(n|dDataTemplate)|end(Shape|Color(s|Sets)|TwoAttr|Device|Weighted)?)|a(se(GeometryVarGroup|ShadingSwitch|Lattice)|keSet)|r(ownian|ush)))\\b' },
+ { caseInsensitive: true,
+ token: 'keyword.control.mel',
+ regex: '\\b(if|in|else|for|while|break|continue|case|default|do|switch|return|switch|case|source|catch|alias)\\b' },
+ { token: 'keyword.other.mel', regex: '\\b(global)\\b' },
+ { caseInsensitive: true,
+ token: 'constant.language.mel',
+ regex: '\\b(null|undefined)\\b' },
+ { token: 'constant.numeric.mel',
+ regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\\b' },
+ { token: 'punctuation.definition.string.begin.mel',
+ regex: '"',
+ push:
+ [ { token: 'constant.character.escape.mel', regex: '\\\\.' },
+ { token: 'punctuation.definition.string.end.mel',
+ regex: '"',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.double.mel' } ] },
+
+ { token: [ 'variable.other.mel', 'punctuation.definition.variable.mel' ],
+ regex: '(\\$)([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*?\\b)' },
+
+ { token: 'punctuation.definition.string.begin.mel',
+ regex: '\'',
+ push:
+ [ { token: 'constant.character.escape.mel', regex: '\\\\.' },
+ { token: 'punctuation.definition.string.end.mel',
+ regex: '\'',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.single.mel' } ] },
+
+ { token: 'constant.language.mel',
+ regex: '\\b(false|true|yes|no|on|off)\\b' },
+
+ { token: 'punctuation.definition.comment.mel',
+ regex: '/\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.mel',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.mel' } ] },
+
+ { token: [ 'comment.line.double-slash.mel', 'punctuation.definition.comment.mel' ],
+ regex: '(//)(.*$\\n?)' },
+
+ { caseInsensitive: true,
+ token: 'keyword.operator.mel',
+ regex: '\\b(instanceof)\\b' },
+ { token: 'keyword.operator.symbolic.mel',
+ regex: '[-\\!\\%\\&\\*\\+\\=\\/\\?\\:]' },
+
+ { token: [ 'meta.preprocessor.mel', 'punctuation.definition.preprocessor.mel' ],
+ regex: '(^[ \\t]*)((?:#)[a-zA-Z]+)' },
+
+ { token: [ 'meta.function.mel', 'keyword.other.mel', 'storage.type.mel', 'entity.name.function.mel', 'punctuation.section.function.mel' ],
+ regex: '((?:global\\s*)?proc)\\s*(\\w+\\s*\\[?\\]?\\s+|\\s+)([A-Za-z_][A-Za-z0-9_\\.]*)(\\s*(\\())',
+ push:
+ [ { include: '$self' },
+ { token: 'punctuation.section.function.mel',
+ regex: '\\)',
+ next: 'pop' },
+ { defaultToken: 'meta.function.mel' } ] }
+
+ ] }
+
+ this.normalizeRules();
+};
+
+oop.inherits(MELHighlightRules, TextHighlightRules);
+
+exports.MELHighlightRules = MELHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/mel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mel_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var MELHighlightRules = require("./mel_highlight_rules").MELHighlightRules;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = MELHighlightRules;
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/mel";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-mips_assembler.js b/js/vendor/ace/src-noconflict/mode-mips_assembler.js
new file mode 100755
index 0000000..94da6f3
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-mips_assembler.js
@@ -0,0 +1,235 @@
+ace.define("ace/mode/mips_assembler_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var MIPSAssemblerHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token: 'support.function.pseudo.mips',
+ regex: '\\b(?:mul|abs|div|divu|mulo|mulou|neg|negu|not|rem|remu|rol|ror|li|seq|sge|sgeu|sgt|sgtu|sle|sleu|sne|b|beqz|bge|bgeu|bgt|bgtu|ble|bleu|blt|bltu|bnez|la|ld|ulh|ulhu|ulw|sd|ush|usw|move|mfc1\\.d|l\\.d|l\\.s|s\\.d|s\\.s)\\b',
+ comment: 'ok actually this are instructions, but one also could call them funtions…' },
+ { token: 'support.function.mips',
+ regex: '\\b(?:abs\\.d|abs\\.s|add|add\\.d|add\\.s|addi|addiu|addu|and|andi|bc1f|bc1t|beq|bgez|bgezal|bgtz|blez|bltz|bltzal|bne|break|c\\.eq\\.d|c\\.eq\\.s|c\\.le\\.d|c\\.le\\.s|c\\.lt\\.d|c\\.lt\\.s|ceil\\.w\\.d|ceil\\.w\\.s|clo|clz|cvt\\.d\\.s|cvt\\.d\\.w|cvt\\.s\\.d|cvt\\.s\\.w|cvt\\.w\\.d|cvt\\.w\\.s|div|div\\.d|div\\.s|divu|eret|floor\\.w\\.d|floor\\.w\\.s|j|jal|jalr|jr|lb|lbu|lh|lhu|ll|lui|lw|lwc1|lwl|lwr|madd|maddu|mfc0|mfc1|mfhi|mflo|mov\\.d|mov\\.s|movf|movf\\.d|movf\\.s|movn|movn\\.d|movn\\.s|movt|movt\\.d|movt\\.s|movz|movz\\.d|movz\\.s|msub|mtc0|mtc1|mthi|mtlo|mul|mul\\.d|mul\\.s|mult|multu|neg\\.d|neg\\.s|nop|nor|or|ori|round\\.w\\.d|round\\.w\\.s|sb|sc|sdc1|sh|sll|sllv|slt|slti|sltiu|sltu|sqrt\\.d|sqrt\\.s|sra|srav|srl|srlv|sub|sub\\.d|sub\\.s|subu|sw|swc1|swl|swr|syscall|teq|teqi|tge|tgei|tgeiu|tgeu|tlt|tlti|tltiu|tltu|trunc\\.w\\.d|trunc\\.w\\.s|xor|xori)\\b' },
+ { token: 'storage.type.mips',
+ regex: '\\.(?:ascii|asciiz|byte|data|double|float|half|kdata|ktext|space|text|word|set\\s*(?:noat|at))\\b' },
+ { token: 'storage.modifier.mips',
+ regex: '\\.(?:align|extern||globl)\\b' },
+ { token:
+ [ 'entity.name.function.label.mips',
+ 'meta.function.label.mips' ],
+ regex: '\\b([A-Za-z0-9_]+)(:)' },
+ { token:
+ [ 'punctuation.definition.variable.mips',
+ 'variable.other.register.usable.by-number.mips' ],
+ regex: '(\\$)(0|[2-9]|1[0-9]|2[0-5]|2[89]|3[0-1])\\b' },
+ { token:
+ [ 'punctuation.definition.variable.mips',
+ 'variable.other.register.usable.by-name.mips' ],
+ regex: '(\\$)(zero|v[01]|a[0-3]|t[0-9]|s[0-7]|gp|sp|fp|ra)\\b' },
+ { token:
+ [ 'punctuation.definition.variable.mips',
+ 'variable.other.register.reserved.mips' ],
+ regex: '(\\$)(at|k[01]|1|2[67])\\b' },
+ { token:
+ [ 'punctuation.definition.variable.mips',
+ 'variable.other.register.usable.floating-point.mips',
+ 'variable.other.register.usable.floating-point.mips' ],
+ regex: '(\\$)(f)([0-9]|1[0-9]|2[0-9]|3[0-1])\\b' },
+ { token: 'constant.numeric.float.mips',
+ regex: '\\b\\d+\\.\\d+\\b' },
+ { token: 'constant.numeric.integer.mips',
+ regex: '\\b(?:\\d+|0(?:x|X)[a-fA-F0-9]+)\\b' },
+ { token: 'punctuation.definition.string.begin.mips',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.mips',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.mips',
+ regex: '\\\\[rnt\\\\"]' },
+ { defaultToken: 'string.quoted.double.mips' } ] },
+ { token: 'punctuation.definition.comment.mips',
+ regex: '#',
+ push:
+ [ { token: 'comment.line.number-sign.mips',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.number-sign.mips' } ] } ] }
+
+ this.normalizeRules();
+};
+
+MIPSAssemblerHighlightRules.metaData = { fileTypes: [ 's', 'mips', 'spim', 'asm' ],
+ keyEquivalent: '^~M',
+ name: 'MIPS Assembler',
+ scopeName: 'source.mips' }
+
+
+oop.inherits(MIPSAssemblerHighlightRules, TextHighlightRules);
+
+exports.MIPSAssemblerHighlightRules = MIPSAssemblerHighlightRules;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/mips_assembler",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mips_assembler_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var MIPSAssemblerHighlightRules = require("./mips_assembler_highlight_rules").MIPSAssemblerHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = MIPSAssemblerHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$id = "ace/mode/mips_assembler"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-mipsassembler.js b/js/vendor/ace/src-noconflict/mode-mipsassembler.js
new file mode 100755
index 0000000..42ad657
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-mipsassembler.js
@@ -0,0 +1,196 @@
+ace.define("ace/mode/mipsassembler_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var mipsassemblerHighlightRules = function() {
+
+ this.$rules = {
+ start: [{
+ token: "string.start",
+ regex: '"',
+ next: "qstring"
+ }],
+ qstring: [{
+ token: "escape",
+ regex: /\\./,
+ }, {
+ token: "string.end",
+ regex: '"',
+ next: "start"
+ }],
+ }
+
+ this.normalizeRules();
+};
+
+mipsassemblerHighlightRules.metaData =
+
+
+oop.inherits(mipsassemblerHighlightRules, TextHighlightRules);
+
+exports.mipsassemblerHighlightRules = mipsassemblerHighlightRules;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/mipsassembler",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mipsassembler_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var HighlightRules = require("./mipsassembler_highlight_rules").HighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$id = "ace/mode/mipsassembler"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-mushcode.js b/js/vendor/ace/src-noconflict/mode-mushcode.js
index 0aa70c2..2647703 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-mushcode.js
+++ b/js/vendor/ace/src-noconflict/mode-mushcode.js
@@ -1,115 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/mushcode', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/mushcode_high_rules', 'ace/mode/folding/pythonic', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var MushCodeRules = require("./mushcode_high_rules").MushCodeRules;
-var PythonFoldMode = require("./folding/pythonic").FoldMode;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new MushCodeRules().getRules());
- this.foldingRules = new PythonFoldMode("\\:");
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "#";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[\:]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- var outdents = {
- "pass": 1,
- "return": 1,
- "raise": 1,
- "break": 1,
- "continue": 1
- };
-
- this.checkOutdent = function(state, line, input) {
- if (input !== "\r\n" && input !== "\r" && input !== "\n")
- return false;
-
- var tokens = this.$tokenizer.getLineTokens(line.trim(), state).tokens;
-
- if (!tokens)
- return false;
- do {
- var last = tokens.pop();
- } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
-
- if (!last)
- return false;
-
- return (last.type == "keyword" && outdents[last.value]);
- };
-
- this.autoOutdent = function(state, doc, row) {
-
- row += 1;
- var indent = this.$getIndent(doc.getLine(row));
- var tab = doc.getTabString();
- if (indent.slice(-tab.length) == tab)
- doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/mushcode_high_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/mushcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -665,7 +555,7 @@ var MushCodeRules = function() {
}, {
token : "text",
regex : "\\s+"
- } ],
+ } ]
};
};
@@ -674,8 +564,8 @@ oop.inherits(MushCodeRules, TextHighlightRules);
exports.MushCodeRules = MushCodeRules;
});
-ace.define('ace/mode/folding/pythonic', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -702,3 +592,83 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/mushcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mushcode_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var MushCodeRules = require("./mushcode_highlight_rules").MushCodeRules;
+var PythonFoldMode = require("./folding/pythonic").FoldMode;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = MushCodeRules;
+ this.foldingRules = new PythonFoldMode("\\:");
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ var outdents = {
+ "pass": 1,
+ "return": 1,
+ "raise": 1,
+ "break": 1,
+ "continue": 1
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input !== "\r\n" && input !== "\r" && input !== "\n")
+ return false;
+
+ var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens)
+ return false;
+ do {
+ var last = tokens.pop();
+ } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
+
+ if (!last)
+ return false;
+
+ return (last.type == "keyword" && outdents[last.value]);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+
+ row += 1;
+ var indent = this.$getIndent(doc.getLine(row));
+ var tab = doc.getTabString();
+ if (indent.slice(-tab.length) == tab)
+ doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ };
+
+ this.$id = "ace/mode/mushcode";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-mushcode_high_rules.js b/js/vendor/ace/src-noconflict/mode-mushcode_high_rules.js
deleted file mode 100644
index 6ce36e2..0000000
--- a/js/vendor/ace/src-noconflict/mode-mushcode_high_rules.js
+++ /dev/null
@@ -1,569 +0,0 @@
-/*
- * MUSHCodeMode
- */
-
-ace.define('ace/mode/mushcode_high_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var MushCodeRules = function() {
-
-
- var keywords = (
- "@if|"+
- "@ifelse|"+
- "@switch|"+
- "@halt|"+
- "@dolist|"+
- "@create|"+
- "@scent|"+
- "@sound|"+
- "@touch|"+
- "@ataste|"+
- "@osound|"+
- "@ahear|"+
- "@aahear|"+
- "@amhear|"+
- "@otouch|"+
- "@otaste|"+
- "@drop|"+
- "@odrop|"+
- "@adrop|"+
- "@dropfail|"+
- "@odropfail|"+
- "@smell|"+
- "@oemit|"+
- "@emit|"+
- "@pemit|"+
- "@parent|"+
- "@clone|"+
- "@taste|"+
- "whisper|"+
- "page|"+
- "say|"+
- "pose|"+
- "semipose|"+
- "teach|"+
- "touch|"+
- "taste|"+
- "smell|"+
- "listen|"+
- "look|"+
- "move|"+
- "go|"+
- "home|"+
- "follow|"+
- "unfollow|"+
- "desert|"+
- "dismiss|"+
- "@tel"
- );
-
- var builtinConstants = (
- "=#0"
- );
-
- var builtinFunctions = (
- "default|"+
- "edefault|"+
- "eval|"+
- "get_eval|"+
- "get|"+
- "grep|"+
- "grepi|"+
- "hasattr|"+
- "hasattrp|"+
- "hasattrval|"+
- "hasattrpval|"+
- "lattr|"+
- "nattr|"+
- "poss|"+
- "udefault|"+
- "ufun|"+
- "u|"+
- "v|"+
- "uldefault|"+
- "xget|"+
- "zfun|"+
- "band|"+
- "bnand|"+
- "bnot|"+
- "bor|"+
- "bxor|"+
- "shl|"+
- "shr|"+
- "and|"+
- "cand|"+
- "cor|"+
- "eq|"+
- "gt|"+
- "gte|"+
- "lt|"+
- "lte|"+
- "nand|"+
- "neq|"+
- "nor|"+
- "not|"+
- "or|"+
- "t|"+
- "xor|"+
- "con|"+
- "entrances|"+
- "exit|"+
- "followers|"+
- "home|"+
- "lcon|"+
- "lexits|"+
- "loc|"+
- "locate|"+
- "lparent|"+
- "lsearch|"+
- "next|"+
- "num|"+
- "owner|"+
- "parent|"+
- "pmatch|"+
- "rloc|"+
- "rnum|"+
- "room|"+
- "where|"+
- "zone|"+
- "worn|"+
- "held|"+
- "carried|"+
- "acos|"+
- "asin|"+
- "atan|"+
- "ceil|"+
- "cos|"+
- "e|"+
- "exp|"+
- "fdiv|"+
- "fmod|"+
- "floor|"+
- "log|"+
- "ln|"+
- "pi|"+
- "power|"+
- "round|"+
- "sin|"+
- "sqrt|"+
- "tan|"+
- "aposs|"+
- "andflags|"+
- "conn|"+
- "commandssent|"+
- "controls|"+
- "doing|"+
- "elock|"+
- "findable|"+
- "flags|"+
- "fullname|"+
- "hasflag|"+
- "haspower|"+
- "hastype|"+
- "hidden|"+
- "idle|"+
- "isbaker|"+
- "lock|"+
- "lstats|"+
- "money|"+
- "who|"+
- "name|"+
- "nearby|"+
- "obj|"+
- "objflags|"+
- "photo|"+
- "poll|"+
- "powers|"+
- "pendingtext|"+
- "receivedtext|"+
- "restarts|"+
- "restarttime|"+
- "subj|"+
- "shortestpath|"+
- "tmoney|"+
- "type|"+
- "visible|"+
- "cat|"+
- "element|"+
- "elements|"+
- "extract|"+
- "filter|"+
- "filterbool|"+
- "first|"+
- "foreach|"+
- "fold|"+
- "grab|"+
- "graball|"+
- "index|"+
- "insert|"+
- "itemize|"+
- "items|"+
- "iter|"+
- "last|"+
- "ldelete|"+
- "map|"+
- "match|"+
- "matchall|"+
- "member|"+
- "mix|"+
- "munge|"+
- "pick|"+
- "remove|"+
- "replace|"+
- "rest|"+
- "revwords|"+
- "setdiff|"+
- "setinter|"+
- "setunion|"+
- "shuffle|"+
- "sort|"+
- "sortby|"+
- "splice|"+
- "step|"+
- "wordpos|"+
- "words|"+
- "add|"+
- "lmath|"+
- "max|"+
- "mean|"+
- "median|"+
- "min|"+
- "mul|"+
- "percent|"+
- "sign|"+
- "stddev|"+
- "sub|"+
- "val|"+
- "bound|"+
- "abs|"+
- "inc|"+
- "dec|"+
- "dist2d|"+
- "dist3d|"+
- "div|"+
- "floordiv|"+
- "mod|"+
- "modulo|"+
- "remainder|"+
- "vadd|"+
- "vdim|"+
- "vdot|"+
- "vmag|"+
- "vmax|"+
- "vmin|"+
- "vmul|"+
- "vsub|"+
- "vunit|"+
- "regedit|"+
- "regeditall|"+
- "regeditalli|"+
- "regediti|"+
- "regmatch|"+
- "regmatchi|"+
- "regrab|"+
- "regraball|"+
- "regraballi|"+
- "regrabi|"+
- "regrep|"+
- "regrepi|"+
- "after|"+
- "alphamin|"+
- "alphamax|"+
- "art|"+
- "before|"+
- "brackets|"+
- "capstr|"+
- "case|"+
- "caseall|"+
- "center|"+
- "containsfansi|"+
- "comp|"+
- "decompose|"+
- "decrypt|"+
- "delete|"+
- "edit|"+
- "encrypt|"+
- "escape|"+
- "if|"+
- "ifelse|"+
- "lcstr|"+
- "left|"+
- "lit|"+
- "ljust|"+
- "merge|"+
- "mid|"+
- "ostrlen|"+
- "pos|"+
- "repeat|"+
- "reverse|"+
- "right|"+
- "rjust|"+
- "scramble|"+
- "secure|"+
- "space|"+
- "spellnum|"+
- "squish|"+
- "strcat|"+
- "strmatch|"+
- "strinsert|"+
- "stripansi|"+
- "stripfansi|"+
- "strlen|"+
- "switch|"+
- "switchall|"+
- "table|"+
- "tr|"+
- "trim|"+
- "ucstr|"+
- "unsafe|"+
- "wrap|"+
- "ctitle|"+
- "cwho|"+
- "channels|"+
- "clock|"+
- "cflags|"+
- "ilev|"+
- "itext|"+
- "inum|"+
- "convsecs|"+
- "convutcsecs|"+
- "convtime|"+
- "ctime|"+
- "etimefmt|"+
- "isdaylight|"+
- "mtime|"+
- "secs|"+
- "msecs|"+
- "starttime|"+
- "time|"+
- "timefmt|"+
- "timestring|"+
- "utctime|"+
- "atrlock|"+
- "clone|"+
- "create|"+
- "cook|"+
- "dig|"+
- "emit|"+
- "lemit|"+
- "link|"+
- "oemit|"+
- "open|"+
- "pemit|"+
- "remit|"+
- "set|"+
- "tel|"+
- "wipe|"+
- "zemit|"+
- "fbcreate|"+
- "fbdestroy|"+
- "fbwrite|"+
- "fbclear|"+
- "fbcopy|"+
- "fbcopyto|"+
- "fbclip|"+
- "fbdump|"+
- "fbflush|"+
- "fbhset|"+
- "fblist|"+
- "fbstats|"+
- "qentries|"+
- "qentry|"+
- "play|"+
- "ansi|"+
- "break|"+
- "c|"+
- "asc|"+
- "die|"+
- "isdbref|"+
- "isint|"+
- "isnum|"+
- "isletters|"+
- "linecoords|"+
- "localize|"+
- "lnum|"+
- "nameshort|"+
- "null|"+
- "objeval|"+
- "r|"+
- "rand|"+
- "s|"+
- "setq|"+
- "setr|"+
- "soundex|"+
- "soundslike|"+
- "valid|"+
- "vchart|"+
- "vchart2|"+
- "vlabel|"+
- "@@|"+
- "bakerdays|"+
- "bodybuild|"+
- "box|"+
- "capall|"+
- "catalog|"+
- "children|"+
- "ctrailer|"+
- "darttime|"+
- "debt|"+
- "detailbar|"+
- "exploredroom|"+
- "fansitoansi|"+
- "fansitoxansi|"+
- "fullbar|"+
- "halfbar|"+
- "isdarted|"+
- "isnewbie|"+
- "isword|"+
- "lambda|"+
- "lobjects|"+
- "lplayers|"+
- "lthings|"+
- "lvexits|"+
- "lvobjects|"+
- "lvplayers|"+
- "lvthings|"+
- "newswrap|"+
- "numsuffix|"+
- "playerson|"+
- "playersthisweek|"+
- "randomad|"+
- "randword|"+
- "realrandword|"+
- "replacechr|"+
- "second|"+
- "splitamount|"+
- "strlenall|"+
- "text|"+
- "third|"+
- "tofansi|"+
- "totalac|"+
- "unique|"+
- "getaddressroom|"+
- "listpropertycomm|"+
- "listpropertyres|"+
- "lotowner|"+
- "lotrating|"+
- "lotratingcount|"+
- "lotvalue|"+
- "boughtproduct|"+
- "companyabb|"+
- "companyicon|"+
- "companylist|"+
- "companyname|"+
- "companyowners|"+
- "companyvalue|"+
- "employees|"+
- "invested|"+
- "productlist|"+
- "productname|"+
- "productowners|"+
- "productrating|"+
- "productratingcount|"+
- "productsoldat|"+
- "producttype|"+
- "ratedproduct|"+
- "soldproduct|"+
- "topproducts|"+
- "totalspentonproduct|"+
- "totalstock|"+
- "transfermoney|"+
- "uniquebuyercount|"+
- "uniqueproductsbought|"+
- "validcompany|"+
- "deletepicture|"+
- "fbsave|"+
- "getpicturesecurity|"+
- "haspicture|"+
- "listpictures|"+
- "picturesize|"+
- "replacecolor|"+
- "rgbtocolor|"+
- "savepicture|"+
- "setpicturesecurity|"+
- "showpicture|"+
- "piechart|"+
- "piechartlabel|"+
- "createmaze|"+
- "drawmaze|"+
- "drawwireframe"
- );
- var keywordMapper = this.createKeywordMapper({
- "invalid.deprecated": "debugger",
- "support.function": builtinFunctions,
- "constant.language": builtinConstants,
- "keyword": keywords
- }, "identifier");
-
- var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?";
-
- var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
- var octInteger = "(?:0[oO]?[0-7]+)";
- var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
- var binInteger = "(?:0[bB][01]+)";
- var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
-
- var exponent = "(?:[eE][+-]?\\d+)";
- var fraction = "(?:\\.\\d+)";
- var intPart = "(?:\\d+)";
- var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
- var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
- var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
-
- this.$rules = {
- "start" : [
- {
- token : "variable", // mush substitution register
- regex : "%[0-9]{1}"
- },
- {
- token : "variable", // mush substitution register
- regex : "%q[0-9A-Za-z]{1}"
- },
- {
- token : "variable", // mush special character register
- regex : "%[a-zA-Z]{1}"
- },
- {
- token: "variable.language",
- regex: "%[a-z0-9-_]+"
- },
- {
- token : "constant.numeric", // imaginary
- regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
- }, {
- token : "constant.numeric", // float
- regex : floatNumber
- }, {
- token : "constant.numeric", // long integer
- regex : integer + "[lL]\\b"
- }, {
- token : "constant.numeric", // integer
- regex : integer + "\\b"
- }, {
- token : keywordMapper,
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|#|%|<<|>>|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
- }, {
- token : "paren.lparen",
- regex : "[\\[\\(\\{]"
- }, {
- token : "paren.rparen",
- regex : "[\\]\\)\\}]"
- }, {
- token : "text",
- regex : "\\s+"
- } ],
- };
-};
-
-oop.inherits(MushCodeRules, TextHighlightRules);
-
-exports.MushCodeRules = MushCodeRules;
-});
diff --git a/js/vendor/ace/src-noconflict/mode-mysql.js b/js/vendor/ace/src-noconflict/mode-mysql.js
index 4e2be27..e51e45f 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-mysql.js
+++ b/js/vendor/ace/src-noconflict/mode-mysql.js
@@ -1,56 +1,54 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/mysql', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/mysql_highlight_rules', 'ace/range'], function(require, exports, module) {
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("../mode/text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var MysqlHighlightRules = require("./mysql_highlight_rules").MysqlHighlightRules;
-var Range = require("../range").Range;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new MysqlHighlightRules().getRules());
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
};
-oop.inherits(Mode, TextMode);
-(function() {
- this.lineCommentStart = ["--", "#"]; // todo space
- this.blockComment = {start: "/*", end: "*/"};
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-}).call(Mode.prototype);
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/mysql_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/mysql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -127,7 +125,7 @@ var MysqlHighlightRules = function() {
"comment" : [
{token : "comment", regex : "\\*\\/", next : "start"},
{defaultToken : "comment"}
- ],
+ ]
};
this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]);
@@ -139,46 +137,24 @@ oop.inherits(MysqlHighlightRules, TextHighlightRules);
exports.MysqlHighlightRules = MysqlHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/mysql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mysql_highlight_rules","ace/range"], function(require, exports, module) {
var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
+var TextMode = require("../mode/text").Mode;
+var MysqlHighlightRules = require("./mysql_highlight_rules").MysqlHighlightRules;
+var Range = require("../range").Range;
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
+var Mode = function() {
+ this.HighlightRules = MysqlHighlightRules;
};
+oop.inherits(Mode, TextMode);
+(function() {
+ this.lineCommentStart = ["--", "#"]; // todo space
+ this.blockComment = {start: "/*", end: "*/"};
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
+ this.$id = "ace/mode/mysql";
+}).call(Mode.prototype);
+exports.Mode = Mode;
});
diff --git a/js/vendor/ace/src-noconflict/mode-nix.js b/js/vendor/ace/src-noconflict/mode-nix.js
new file mode 100755
index 0000000..f0cddb3
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-nix.js
@@ -0,0 +1,993 @@
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"
+
+var c_cppHighlightRules = function() {
+
+ var keywordControls = (
+ "break|case|continue|default|do|else|for|goto|if|_Pragma|" +
+ "return|switch|while|catch|operator|try|throw|using"
+ );
+
+ var storageType = (
+ "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
+ "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
+ "class|wchar_t|template|char16_t|char32_t"
+ );
+
+ var storageModifiers = (
+ "const|extern|register|restrict|static|volatile|inline|private|" +
+ "protected|public|friend|explicit|virtual|export|mutable|typename|" +
+ "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"
+ );
+
+ var keywordOperators = (
+ "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" +
+ "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"
+ );
+
+ var builtinConstants = (
+ "NULL|true|false|TRUE|FALSE|nullptr"
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword.control" : keywordControls,
+ "storage.type" : storageType,
+ "storage.modifier" : storageModifiers,
+ "keyword.operator" : keywordOperators,
+ "variable.language": "this",
+ "constant.language": builtinConstants
+ }, "identifier");
+
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "//",
+ next : "singleLineComment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ }, {
+ token : "keyword", // pre-compiler directives
+ regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
+ next : "directive"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
+ }, {
+ token : "support.function.C99.c",
+ regex : cFunctions
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "singleLineComment" : [
+ {
+ token : "comment",
+ regex : /\\$/,
+ next : "singleLineComment"
+ }, {
+ token : "comment",
+ regex : /$/,
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }
+ ],
+ "directive" : [
+ {
+ token : "constant.other.multiline",
+ regex : /\\/
+ },
+ {
+ token : "constant.other.multiline",
+ regex : /.*\\/
+ },
+ {
+ token : "constant.other",
+ regex : "\\s*<.+?>",
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",
+ next : "start"
+ },
+ {
+ token : "constant.other",
+ regex : /[^\\\/]+/,
+ next : "start"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(c_cppHighlightRules, TextHighlightRules);
+
+exports.c_cppHighlightRules = c_cppHighlightRules;
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = c_cppHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/c_cpp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/nix_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+ "use strict";
+
+ var oop = require("../lib/oop");
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+ var NixHighlightRules = function() {
+
+ var constantLanguage = "true|false";
+ var keywordControl = "with|import|if|else|then|inherit";
+ var keywordDeclaration = "let|in|rec";
+
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language.nix": constantLanguage,
+ "keyword.control.nix": keywordControl,
+ "keyword.declaration.nix": keywordDeclaration
+ }, "identifier");
+
+ this.$rules = {
+ "start": [{
+ token: "comment",
+ regex: /#.*$/
+ }, {
+ token: "comment",
+ regex: /\/\*/,
+ next: "comment"
+ }, {
+ token: "constant",
+ regex: "<[^>]+>"
+ }, {
+ regex: "(==|!=|<=?|>=?)",
+ token: ["keyword.operator.comparison.nix"]
+ }, {
+ regex: "((?:[+*/%-]|\\~)=)",
+ token: ["keyword.operator.assignment.arithmetic.nix"]
+ }, {
+ regex: "=",
+ token: "keyword.operator.assignment.nix"
+ }, {
+ token: "string",
+ regex: "''",
+ next: "qqdoc"
+ }, {
+ token: "string",
+ regex: "'",
+ next: "qstring"
+ }, {
+ token: "string",
+ regex: '"',
+ push: "qqstring"
+ }, {
+ token: "constant.numeric", // hex
+ regex: "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token: "constant.numeric", // float
+ regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token: keywordMapper,
+ regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ regex: "}",
+ token: function(val, start, stack) {
+ return stack[1] && stack[1].charAt(0) == "q" ? "constant.language.escape" : "text";
+ },
+ next: "pop"
+ }],
+ "comment": [{
+ token: "comment", // closing comment
+ regex: ".*?\\*\\/",
+ next: "start"
+ }, {
+ token: "comment", // comment spanning whole line
+ regex: ".+"
+ }],
+ "qqdoc": [
+ {
+ token: "constant.language.escape",
+ regex: /\$\{/,
+ push: "start"
+ }, {
+ token: "string",
+ regex: "''",
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }],
+ "qqstring": [
+ {
+ token: "constant.language.escape",
+ regex: /\$\{/,
+ push: "start"
+ }, {
+ token: "string",
+ regex: '"',
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }],
+ "qstring": [
+ {
+ token: "constant.language.escape",
+ regex: /\$\{/,
+ push: "start"
+ }, {
+ token: "string",
+ regex: "'",
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ };
+
+ this.normalizeRules();
+ };
+
+ oop.inherits(NixHighlightRules, TextHighlightRules);
+
+ exports.NixHighlightRules = NixHighlightRules;
+});
+
+ace.define("ace/mode/nix",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/nix_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var CMode = require("./c_cpp").Mode;
+var NixHighlightRules = require("./nix_highlight_rules").NixHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ CMode.call(this);
+ this.HighlightRules = NixHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, CMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/nix";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-objectivec.js b/js/vendor/ace/src-noconflict/mode-objectivec.js
index 5db116d..c7bded9 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-objectivec.js
+++ b/js/vendor/ace/src-noconflict/mode-objectivec.js
@@ -1,63 +1,246 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/objectivec', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/objectivec_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ObjectiveCHighlightRules = require("./objectivec_highlight_rules").ObjectiveCHighlightRules;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"
-var Mode = function() {
- var highlighter = new ObjectiveCHighlightRules();
- this.foldingRules = new CStyleFoldMode();
+var c_cppHighlightRules = function() {
+
+ var keywordControls = (
+ "break|case|continue|default|do|else|for|goto|if|_Pragma|" +
+ "return|switch|while|catch|operator|try|throw|using"
+ );
+
+ var storageType = (
+ "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
+ "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
+ "class|wchar_t|template|char16_t|char32_t"
+ );
+
+ var storageModifiers = (
+ "const|extern|register|restrict|static|volatile|inline|private|" +
+ "protected|public|friend|explicit|virtual|export|mutable|typename|" +
+ "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"
+ );
- this.$tokenizer = new Tokenizer(highlighter.getRules());
+ var keywordOperators = (
+ "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" +
+ "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"
+ );
+
+ var builtinConstants = (
+ "NULL|true|false|TRUE|FALSE|nullptr"
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword.control" : keywordControls,
+ "storage.type" : storageType,
+ "storage.modifier" : storageModifiers,
+ "keyword.operator" : keywordOperators,
+ "variable.language": "this",
+ "constant.language": builtinConstants
+ }, "identifier");
+
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "//",
+ next : "singleLineComment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ }, {
+ token : "keyword", // pre-compiler directives
+ regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
+ next : "directive"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
+ }, {
+ token : "support.function.C99.c",
+ regex : cFunctions
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "singleLineComment" : [
+ {
+ token : "comment",
+ regex : /\\$/,
+ next : "singleLineComment"
+ }, {
+ token : "comment",
+ regex : /$/,
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }
+ ],
+ "directive" : [
+ {
+ token : "constant.other.multiline",
+ regex : /\\/
+ },
+ {
+ token : "constant.other.multiline",
+ regex : /.*\\/
+ },
+ {
+ token : "constant.other",
+ regex : "\\s*<.+?>",
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",
+ next : "start"
+ },
+ {
+ token : "constant.other",
+ regex : /[^\\\/]+/,
+ next : "start"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
};
-oop.inherits(Mode, TextMode);
-(function() {
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-}).call(Mode.prototype);
+oop.inherits(c_cppHighlightRules, TextHighlightRules);
-exports.Mode = Mode;
-});ace.define('ace/mode/objectivec_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/c_cpp_highlight_rules'], function(require, exports, module) {
+exports.c_cppHighlightRules = c_cppHighlightRules;
+});
+ace.define("ace/mode/objectivec_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/c_cpp_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
@@ -383,229 +566,8 @@ oop.inherits(ObjectiveCHighlightRules, CHighlightRules);
exports.ObjectiveCHighlightRules = ObjectiveCHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-ace.define('ace/mode/c_cpp_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b"
-
-var c_cppHighlightRules = function() {
-
- var keywordControls = (
- "break|case|continue|default|do|else|for|goto|if|_Pragma|" +
- "return|switch|while|catch|operator|try|throw|using"
- );
-
- var storageType = (
- "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
- "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
- "class|wchar_t|template"
- );
-
- var storageModifiers = (
- "const|extern|register|restrict|static|volatile|inline|private:|" +
- "protected:|public:|friend|explicit|virtual|export|mutable|typename"
- );
-
- var keywordOperators = (
- "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" +
- "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"
- );
-
- var builtinConstants = (
- "NULL|true|false|TRUE|FALSE"
- );
-
- var keywordMapper = this.$keywords = this.createKeywordMapper({
- "keyword.control" : keywordControls,
- "storage.type" : storageType,
- "storage.modifier" : storageModifiers,
- "keyword.operator" : keywordOperators,
- "variable.language": "this",
- "constant.language": builtinConstants
- }, "identifier");
-
- var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b";
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "\\/\\/.*$"
- },
- DocCommentHighlightRules.getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- regex : "\\/\\*",
- next : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // multi line string start
- regex : '["].*\\\\$',
- next : "qqstring"
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "string", // multi line string start
- regex : "['].*\\\\$",
- next : "qstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
- }, {
- token : "keyword", // pre-compiler directives
- regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b",
- next : "directive"
- }, {
- token : "keyword", // special case pre-compiler directive
- regex : "(?:#\\s*endif)\\b"
- }, {
- token : "support.function.C99.c",
- regex : cFunctions
- }, {
- token : keywordMapper,
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
- }, {
- token : "punctuation.operator",
- regex : "\\?|\\:|\\,|\\;|\\."
- }, {
- token : "paren.lparen",
- regex : "[[({]"
- }, {
- token : "paren.rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ],
- "comment" : [
- {
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- regex : ".+"
- }
- ],
- "qqstring" : [
- {
- token : "string",
- regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next : "start"
- }, {
- token : "string",
- regex : '.+'
- }
- ],
- "qstring" : [
- {
- token : "string",
- regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next : "start"
- }, {
- token : "string",
- regex : '.+'
- }
- ],
- "directive" : [
- {
- token : "constant.other.multiline",
- regex : /\\/
- },
- {
- token : "constant.other.multiline",
- regex : /.*\\/
- },
- {
- token : "constant.other",
- regex : "\\s*<.+?>",
- next : "start"
- },
- {
- token : "constant.other", // single line
- regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',
- next : "start"
- },
- {
- token : "constant.other", // single line
- regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",
- next : "start"
- },
- {
- token : "constant.other",
- regex : /[^\\\/]+/,
- next : "start"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ DocCommentHighlightRules.getEndRule("start") ]);
-};
-
-oop.inherits(c_cppHighlightRules, TextHighlightRules);
-
-exports.c_cppHighlightRules = c_cppHighlightRules;
-});
-
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -624,23 +586,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -653,7 +647,84 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/objectivec",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/objectivec_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ObjectiveCHighlightRules = require("./objectivec_highlight_rules").ObjectiveCHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ObjectiveCHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/objectivec";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-ocaml.js b/js/vendor/ace/src-noconflict/mode-ocaml.js
index 1a92433..39f849b 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-ocaml.js
+++ b/js/vendor/ace/src-noconflict/mode-ocaml.js
@@ -1,104 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/ocaml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ocaml_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var OcamlHighlightRules = require("./ocaml_highlight_rules").OcamlHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-
-var Mode = function() {
- var highlighter = new OcamlHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$keywordList = highlighter.$keywordList;
-};
-oop.inherits(Mode, TextMode);
-
-var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/;
-
-(function() {
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var i, line;
- var outdent = true;
- var re = /^\s*\(\*(.*)\*\)/;
-
- for (i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- var range = new Range(0, 0, 0, 0);
- for (i=startRow; i<= endRow; i++) {
- line = doc.getLine(i);
- range.start.row = i;
- range.end.row = i;
- range.end.column = line.length;
-
- doc.replace(range, outdent ? line.match(re)[1] : "(*" + line + "*)");
- }
- };
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
-
- if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') &&
- state === 'start' && indenter.test(line))
- indent += tab;
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/ocaml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/ocaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -405,8 +306,8 @@ oop.inherits(OcamlHighlightRules, TextHighlightRules);
exports.OcamlHighlightRules = OcamlHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -444,3 +345,70 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
+
+ace.define("ace/mode/ocaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ocaml_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var OcamlHighlightRules = require("./ocaml_highlight_rules").OcamlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = OcamlHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/;
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var i, line;
+ var outdent = true;
+ var re = /^\s*\(\*(.*)\*\)/;
+
+ for (i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ var range = new Range(0, 0, 0, 0);
+ for (i=startRow; i<= endRow; i++) {
+ line = doc.getLine(i);
+ range.start.row = i;
+ range.end.row = i;
+ range.end.column = line.length;
+
+ doc.replace(range, outdent ? line.match(re)[1] : "(*" + line + "*)");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+
+ if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') &&
+ state === 'start' && indenter.test(line))
+ indent += tab;
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/ocaml";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-pascal.js b/js/vendor/ace/src-noconflict/mode-pascal.js
index 7a9c092..b74d2b5 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-pascal.js
+++ b/js/vendor/ace/src-noconflict/mode-pascal.js
@@ -1,69 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/pascal', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/pascal_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PascalHighlightRules = require("./pascal_highlight_rules").PascalHighlightRules;
-var FoldMode = require("./folding/coffee").FoldMode;
-
-var Mode = function() {
- var highlighter = new PascalHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = ["--", "//"];
- this.blockComment = [
- {start: "(*", end: "*)"},
- {start: "{", end: "}"}
- ];
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/pascal_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/pascal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -145,8 +81,8 @@ oop.inherits(PascalHighlightRules, TextHighlightRules);
exports.PascalHighlightRules = PascalHighlightRules;
});
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -231,3 +167,31 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/pascal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pascal_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PascalHighlightRules = require("./pascal_highlight_rules").PascalHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PascalHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ["--", "//"];
+ this.blockComment = [
+ {start: "(*", end: "*)"},
+ {start: "{", end: "}"}
+ ];
+
+ this.$id = "ace/mode/pascal";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-perl.js b/js/vendor/ace/src-noconflict/mode-perl.js
index 6149692..b683d13 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-perl.js
+++ b/js/vendor/ace/src-noconflict/mode-perl.js
@@ -1,98 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/perl', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/perl_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new PerlHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode({start: "^=(begin|item)\\b", end: "^=(cut)\\b"});
- this.$keywordList = highlighter.$keywordList;
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "#";
- this.blockComment = [
- {start: "=begin", end: "=cut"},
- {start: "=item", end: "=cut"}
- ];
-
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[\:]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/perl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -224,8 +131,8 @@ oop.inherits(PerlHighlightRules, TextHighlightRules);
exports.PerlHighlightRules = PerlHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -264,8 +171,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -284,23 +191,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -313,7 +252,122 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/perl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/perl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PerlHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode({start: "^=(begin|item)\\b", end: "^=(cut)\\b"});
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+ this.blockComment = [
+ {start: "=begin", end: "=cut"},
+ {start: "=item", end: "=cut"}
+ ];
+
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/perl";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-pgsql.js b/js/vendor/ace/src-noconflict/mode-pgsql.js
index 9159901..fd07709 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-pgsql.js
+++ b/js/vendor/ace/src-noconflict/mode-pgsql.js
@@ -1,626 +1,32 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/pgsql', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/pgsql_highlight_rules', 'ace/range'], function(require, exports, module) {
-
-var oop = require("../lib/oop");
-var TextMode = require("../mode/text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PgsqlHighlightRules = require("./pgsql_highlight_rules").PgsqlHighlightRules;
-var Range = require("../range").Range;
-
-var Mode = function() {
- var highlighter = new PgsqlHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "--";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- if (state == "start" || state == "keyword.statementEnd") {
- return "";
- } else {
- return this.$getIndent(line); // Keep whatever indent the previous line has
- }
- }
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/pgsql_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules', 'ace/mode/perl_highlight_rules', 'ace/mode/python_highlight_rules'], function(require, exports, module) {
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
-var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
-
-var PgsqlHighlightRules = function() {
- var keywords = (
- "abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|" +
- "analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|array|as|asc|assertion|" +
- "assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|bigint|" +
- "binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|" +
- "catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|" +
- "cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|" +
- "configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|" +
- "create|cross|cstring|csv|current|current_catalog|current_date|current_role|" +
- "current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|" +
- "date|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|definer|delete|" +
- "delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|domain|double|" +
- "drop|each|else|enable|encoding|encrypted|end|enum|escape|except|exclude|excluding|exclusive|" +
- "execute|exists|explain|extension|external|extract|false|family|fdw_handler|fetch|first|" +
- "float|float4|float8|following|for|force|foreign|forward|freeze|from|full|function|functions|" +
- "global|grant|granted|greatest|group|gtsvector|handler|having|header|hold|hour|identity|if|" +
- "ilike|immediate|immutable|implicit|in|including|increment|index|indexes|inet|inherit|" +
- "inherits|initially|inline|inner|inout|input|insensitive|insert|instead|int|int2|int2vector|" +
- "int4|int8|integer|internal|intersect|interval|into|invoker|is|isnull|isolation|join|key|label|" +
- "language|language_handler|large|last|lc_collate|lc_ctype|leading|least|left|level|like|" +
- "limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|mapping|" +
- "match|maxvalue|minute|minvalue|mode|money|month|move|name|names|national|natural|nchar|next|no|" +
- "none|not|nothing|notify|notnull|nowait|null|nullif|nulls|numeric|object|of|off|offset|oid|oids|" +
- "oidvector|on|only|opaque|operator|option|options|or|order|out|outer|over|overlaps|overlay|" +
- "owned|owner|parser|partial|partition|passing|password|path|pg_attribute|pg_auth_members|" +
- "pg_authid|pg_class|pg_database|pg_node_tree|pg_proc|pg_type|placing|plans|point|polygon|" +
- "position|preceding|precision|prepare|prepared|preserve|primary|prior|privileges|" +
- "procedural|procedure|quote|range|read|real|reassign|recheck|record|recursive|ref|refcursor|" +
- "references|regclass|regconfig|regdictionary|regoper|regoperator|regproc|regprocedure|" +
- "regtype|reindex|relative|release|reltime|rename|repeatable|replace|replica|reset|restart|" +
- "restrict|returning|returns|revoke|right|role|rollback|row|rows|rule|savepoint|schema|scroll|" +
- "search|second|security|select|sequence|sequences|serializable|server|session|session_user|" +
- "set|setof|share|show|similar|simple|smallint|smgr|some|stable|standalone|start|statement|" +
- "statistics|stdin|stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|" +
- "tablespace|temp|template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|" +
- "tinterval|to|trailing|transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsvector|" +
- "txid_snapshot|type|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|" +
- "unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|" +
- "varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|" +
- "with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|" +
- "xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone"
- );
-
-
- var builtinFunctions = (
- "RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|" +
- "RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|" +
- "RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|" +
- "RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|" +
- "abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|aclexplode|aclinsert|" +
- "aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|anyarray_in|anyarray_out|" +
- "anyarray_recv|anyarray_send|anyelement_in|anyelement_out|anyenum_in|anyenum_out|" +
- "anynonarray_in|anynonarray_out|anytextcat|area|areajoinsel|areasel|array_agg|" +
- "array_agg_finalfn|array_agg_transfn|array_append|array_cat|array_dims|array_eq|" +
- "array_fill|array_ge|array_gt|array_in|array_larger|array_le|array_length|array_lower|" +
- "array_lt|array_ndims|array_ne|array_out|array_prepend|array_recv|array_send|" +
- "array_smaller|array_to_string|array_upper|arraycontained|arraycontains|arrayoverlap|" +
- "ascii|ascii_to_mic|ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|" +
- "big5_to_utf8|bit_and|bit_in|bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|" +
- "bitcmp|biteq|bitge|bitgt|bitle|bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|" +
- "bittypmodin|bittypmodout|bitxor|bool|bool_and|bool_or|booland_statefunc|booleq|boolge|" +
- "boolgt|boolin|boolle|boollt|boolne|boolor_statefunc|boolout|boolrecv|boolsend|box|" +
- "box_above|box_above_eq|box_add|box_below|box_below_eq|box_center|box_contain|" +
- "box_contain_pt|box_contained|box_distance|box_div|box_eq|box_ge|box_gt|box_in|" +
- "box_intersect|box_le|box_left|box_lt|box_mul|box_out|box_overabove|box_overbelow|" +
- "box_overlap|box_overleft|box_overright|box_recv|box_right|box_same|box_send|box_sub|" +
- "bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|bpchar_pattern_le|" +
- "bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|bpchargt|bpchariclike|" +
- "bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|bpcharlike|bpcharlt|" +
- "bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|bpcharregexne|bpcharsend|" +
- "bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|btarraycmp|btbeginscan|btboolcmp|" +
- "btbpchar_pattern_cmp|btbuild|btbuildempty|btbulkdelete|btcharcmp|btcostestimate|" +
- "btendscan|btfloat48cmp|btfloat4cmp|btfloat84cmp|btfloat8cmp|btgetbitmap|btgettuple|" +
- "btinsert|btint24cmp|btint28cmp|btint2cmp|btint42cmp|btint48cmp|btint4cmp|btint82cmp|" +
- "btint84cmp|btint8cmp|btmarkpos|btnamecmp|btoidcmp|btoidvectorcmp|btoptions|btrecordcmp|" +
- "btreltimecmp|btrescan|btrestrpos|btrim|bttext_pattern_cmp|bttextcmp|bttidcmp|" +
- "bttintervalcmp|btvacuumcleanup|byteacat|byteacmp|byteaeq|byteage|byteagt|byteain|byteale|" +
- "bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|cash_cmp|cash_div_cash|" +
- "cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|cash_ge|cash_gt|cash_in|" +
- "cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|cash_mul_int2|cash_mul_int4|cash_ne|" +
- "cash_out|cash_pl|cash_recv|cash_send|cash_words|cashlarger|cashsmaller|cbrt|ceil|ceiling|" +
- "center|char|char_length|character_length|chareq|charge|chargt|charin|charle|charlt|charne|" +
- "charout|charrecv|charsend|chr|cideq|cidin|cidout|cidr|cidr_in|cidr_out|cidr_recv|cidr_send|" +
- "cidrecv|cidsend|circle|circle_above|circle_add_pt|circle_below|circle_center|" +
- "circle_contain|circle_contain_pt|circle_contained|circle_distance|circle_div_pt|" +
- "circle_eq|circle_ge|circle_gt|circle_in|circle_le|circle_left|circle_lt|circle_mul_pt|" +
- "circle_ne|circle_out|circle_overabove|circle_overbelow|circle_overlap|circle_overleft|" +
- "circle_overright|circle_recv|circle_right|circle_same|circle_send|circle_sub_pt|" +
- "clock_timestamp|close_lb|close_ls|close_lseg|close_pb|close_pl|close_ps|close_sb|" +
- "close_sl|col_description|concat|concat_ws|contjoinsel|contsel|convert|convert_from|" +
- "convert_to|corr|cos|cot|count|covar_pop|covar_samp|cstring_in|cstring_out|cstring_recv|" +
- "cstring_send|cume_dist|current_database|current_query|current_schema|current_schemas|" +
- "current_setting|current_user|currtid|currtid2|currval|cursor_to_xml|" +
- "cursor_to_xmlschema|database_to_xml|database_to_xml_and_xmlschema|" +
- "database_to_xmlschema|date|date_cmp|date_cmp_timestamp|date_cmp_timestamptz|date_eq|" +
- "date_eq_timestamp|date_eq_timestamptz|date_ge|date_ge_timestamp|date_ge_timestamptz|" +
- "date_gt|date_gt_timestamp|date_gt_timestamptz|date_in|date_larger|date_le|" +
- "date_le_timestamp|date_le_timestamptz|date_lt|date_lt_timestamp|date_lt_timestamptz|" +
- "date_mi|date_mi_interval|date_mii|date_ne|date_ne_timestamp|date_ne_timestamptz|" +
- "date_out|date_part|date_pl_interval|date_pli|date_recv|date_send|date_smaller|" +
- "date_trunc|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|dense_rank|dexp|diagonal|" +
- "diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|dist_pc|dist_pl|" +
- "dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|dpow|dround|" +
- "dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|dsynonym_init|" +
- "dsynonym_lexize|dtrunc|encode|enum_cmp|enum_eq|enum_first|enum_ge|enum_gt|enum_in|" +
- "enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|enum_range|enum_recv|enum_send|" +
- "enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|euc_cn_to_utf8|" +
- "euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|euc_jp_to_sjis|" +
- "euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|euc_tw_to_mic|" +
- "euc_tw_to_utf8|every|exp|factorial|family|fdw_handler_in|fdw_handler_out|first_value|" +
- "float4|float48div|float48eq|float48ge|float48gt|float48le|float48lt|float48mi|float48mul|" +
- "float48ne|float48pl|float4_accum|float4abs|float4div|float4eq|float4ge|float4gt|float4in|" +
- "float4larger|float4le|float4lt|float4mi|float4mul|float4ne|float4out|float4pl|float4recv|" +
- "float4send|float4smaller|float4um|float4up|float8|float84div|float84eq|float84ge|" +
- "float84gt|float84le|float84lt|float84mi|float84mul|float84ne|float84pl|float8_accum|" +
- "float8_avg|float8_corr|float8_covar_pop|float8_covar_samp|float8_regr_accum|" +
- "float8_regr_avgx|float8_regr_avgy|float8_regr_intercept|float8_regr_r2|" +
- "float8_regr_slope|float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|" +
- "float8_stddev_samp|float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|" +
- "float8ge|float8gt|float8in|float8larger|float8le|float8lt|float8mi|float8mul|float8ne|" +
- "float8out|float8pl|float8recv|float8send|float8smaller|float8um|float8up|floor|" +
- "flt4_mul_cash|flt8_mul_cash|fmgr_c_validator|fmgr_internal_validator|" +
- "fmgr_sql_validator|format|format_type|gb18030_to_utf8|gbk_to_utf8|generate_series|" +
- "generate_subscripts|get_bit|get_byte|get_current_ts_config|getdatabaseencoding|" +
- "getpgusername|gin_cmp_prefix|gin_cmp_tslexeme|gin_extract_tsquery|" +
- "gin_extract_tsvector|gin_tsquery_consistent|ginarrayconsistent|ginarrayextract|" +
- "ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|gincostestimate|ginendscan|" +
- "gingetbitmap|gininsert|ginmarkpos|ginoptions|ginqueryarrayextract|ginrescan|" +
- "ginrestrpos|ginvacuumcleanup|gist_box_compress|gist_box_consistent|" +
- "gist_box_decompress|gist_box_penalty|gist_box_picksplit|gist_box_same|gist_box_union|" +
- "gist_circle_compress|gist_circle_consistent|gist_point_compress|" +
- "gist_point_consistent|gist_point_distance|gist_poly_compress|gist_poly_consistent|" +
- "gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|gistcostestimate|gistendscan|" +
- "gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|gistoptions|gistrescan|gistrestrpos|" +
- "gistvacuumcleanup|gtsquery_compress|gtsquery_consistent|gtsquery_decompress|" +
- "gtsquery_penalty|gtsquery_picksplit|gtsquery_same|gtsquery_union|gtsvector_compress|" +
- "gtsvector_consistent|gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|" +
- "gtsvector_same|gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|" +
- "has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|" +
- "has_function_privilege|has_language_privilege|has_schema_privilege|" +
- "has_sequence_privilege|has_server_privilege|has_table_privilege|" +
- "has_tablespace_privilege|hash_aclitem|hash_array|hash_numeric|hashbeginscan|" +
- "hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|hashcostestimate|" +
- "hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|hashinet|" +
- "hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|hashname|" +
- "hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|hashvacuumcleanup|" +
- "hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|icnlikejoinsel|icnlikesel|" +
- "icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|inet_client_addr|" +
- "inet_client_port|inet_in|inet_out|inet_recv|inet_send|inet_server_addr|" +
- "inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|initcap|int2|int24div|" +
- "int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|int24pl|int28div|int28eq|" +
- "int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|int2_accum|" +
- "int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|int2gt|int2in|" +
- "int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|int2pl|" +
- "int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|int2vectorin|" +
- "int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|int42ge|" +
- "int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|int48gt|" +
- "int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|int4_mul_cash|" +
- "int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|int4larger|int4le|" +
- "int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|int4recv|int4send|" +
- "int4shl|int4shr|int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|" +
- "int82le|int82lt|int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|" +
- "int84lt|int84mi|int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|" +
- "int8abs|int8and|int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|" +
- "int8inc_float8_float8|int8larger|int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|" +
- "int8or|int8out|int8pl|int8pl_inet|int8recv|int8send|int8shl|int8shr|int8smaller|int8um|" +
- "int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|internal_out|" +
- "interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|interval_ge|" +
- "interval_gt|interval_hash|interval_in|interval_larger|interval_le|interval_lt|" +
- "interval_mi|interval_mul|interval_ne|interval_out|interval_pl|interval_pl_date|" +
- "interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|interval_pl_timetz|" +
- "interval_recv|interval_send|interval_smaller|interval_um|intervaltypmodin|" +
- "intervaltypmodout|intinterval|isclosed|isfinite|ishorizontal|iso8859_1_to_utf8|" +
- "iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|iso_to_win866|isopen|isparallel|" +
- "isperp|isvertical|johab_to_utf8|justify_days|justify_hours|justify_interval|" +
- "koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|koi8r_to_win1251|koi8r_to_win866|" +
- "koi8u_to_utf8|lag|language_handler_in|language_handler_out|last_value|lastval|" +
- "latin1_to_mic|latin2_to_mic|latin2_to_win1250|latin3_to_mic|latin4_to_mic|lead|left|" +
- "length|like|like_escape|likejoinsel|likesel|line|line_distance|line_eq|line_horizontal|" +
- "line_in|line_interpt|line_intersect|line_out|line_parallel|line_perp|line_recv|" +
- "line_send|line_vertical|ln|lo_close|lo_creat|lo_create|lo_export|lo_import|lo_lseek|" +
- "lo_open|lo_tell|lo_truncate|lo_unlink|log|loread|lower|lowrite|lpad|lseg|lseg_center|" +
- "lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|" +
- "lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|" +
- "lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_cmp|macaddr_eq|macaddr_ge|macaddr_gt|" +
- "macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_out|macaddr_recv|macaddr_send|" +
- "makeaclitem|masklen|max|md5|mic_to_ascii|mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|" +
- "mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|mic_to_koi8r|mic_to_latin1|mic_to_latin2|" +
- "mic_to_latin3|mic_to_latin4|mic_to_sjis|mic_to_win1250|mic_to_win1251|mic_to_win866|" +
- "min|mktinterval|mod|money|mul_d_interval|name|nameeq|namege|namegt|nameiclike|nameicnlike|" +
- "nameicregexeq|nameicregexne|namein|namele|namelike|namelt|namene|namenlike|nameout|" +
- "namerecv|nameregexeq|nameregexne|namesend|neqjoinsel|neqsel|netmask|network|network_cmp|" +
- "network_eq|network_ge|network_gt|network_le|network_lt|network_ne|network_sub|" +
- "network_subeq|network_sup|network_supeq|nextval|nlikejoinsel|nlikesel|notlike|now|" +
- "npoints|nth_value|ntile|numeric_abs|numeric_accum|numeric_add|numeric_avg|" +
- "numeric_avg_accum|numeric_cmp|numeric_div|numeric_div_trunc|numeric_eq|numeric_exp|" +
- "numeric_fac|numeric_ge|numeric_gt|numeric_in|numeric_inc|numeric_larger|numeric_le|" +
- "numeric_ln|numeric_log|numeric_lt|numeric_mod|numeric_mul|numeric_ne|numeric_out|" +
- "numeric_power|numeric_recv|numeric_send|numeric_smaller|numeric_sqrt|" +
- "numeric_stddev_pop|numeric_stddev_samp|numeric_sub|numeric_uminus|numeric_uplus|" +
- "numeric_var_pop|numeric_var_samp|numerictypmodin|numerictypmodout|numnode|" +
- "obj_description|octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|" +
- "oidrecv|oidsend|oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|" +
- "oidvectorlt|oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|" +
- "on_pl|on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|" +
- "path_add_pt|path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|" +
- "path_length|path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|" +
- "path_out|path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|" +
- "pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|" +
- "pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|" +
- "pg_available_extension_versions|pg_available_extensions|pg_backend_pid|" +
- "pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|pg_collation_is_visible|" +
- "pg_column_size|pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|" +
- "pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|" +
- "pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|" +
- "pg_extension_config_dump|pg_extension_update_paths|pg_function_is_visible|" +
- "pg_get_constraintdef|pg_get_expr|pg_get_function_arguments|" +
- "pg_get_function_identity_arguments|pg_get_function_result|pg_get_functiondef|" +
- "pg_get_indexdef|pg_get_keywords|pg_get_ruledef|pg_get_serial_sequence|" +
- "pg_get_triggerdef|pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_indexes_size|" +
- "pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|" +
- "pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|" +
- "pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|" +
- "pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|" +
- "pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|" +
- "pg_options_to_table|pg_postmaster_start_time|pg_prepared_statement|pg_prepared_xact|" +
- "pg_read_binary_file|pg_read_file|pg_relation_filenode|pg_relation_filepath|" +
- "pg_relation_size|pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|" +
- "pg_show_all_settings|pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|" +
- "pg_stat_file|pg_stat_get_activity|pg_stat_get_analyze_count|" +
- "pg_stat_get_autoanalyze_count|pg_stat_get_autovacuum_count|" +
- "pg_stat_get_backend_activity|pg_stat_get_backend_activity_start|" +
- "pg_stat_get_backend_client_addr|pg_stat_get_backend_client_port|" +
- "pg_stat_get_backend_dbid|pg_stat_get_backend_idset|pg_stat_get_backend_pid|" +
- "pg_stat_get_backend_start|pg_stat_get_backend_userid|pg_stat_get_backend_waiting|" +
- "pg_stat_get_backend_xact_start|pg_stat_get_bgwriter_buf_written_checkpoints|" +
- "pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|" +
- "pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|" +
- "pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|" +
- "pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|" +
- "pg_stat_get_buf_written_backend|pg_stat_get_db_blocks_fetched|" +
- "pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|" +
- "pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|" +
- "pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|" +
- "pg_stat_get_db_conflict_tablespace|pg_stat_get_db_numbackends|" +
- "pg_stat_get_db_stat_reset_time|pg_stat_get_db_tuples_deleted|" +
- "pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|" +
- "pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|" +
- "pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|" +
- "pg_stat_get_function_calls|pg_stat_get_function_self_time|" +
- "pg_stat_get_function_time|pg_stat_get_last_analyze_time|" +
- "pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|" +
- "pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|" +
- "pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|" +
- "pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|" +
- "pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|" +
- "pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|" +
- "pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|" +
- "pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_time|" +
- "pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|" +
- "pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|" +
- "pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|" +
- "pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|" +
- "pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|" +
- "pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|" +
- "pg_tablespace_databases|pg_tablespace_size|pg_terminate_backend|pg_timezone_abbrevs|" +
- "pg_timezone_names|pg_total_relation_size|pg_try_advisory_lock|" +
- "pg_try_advisory_lock_shared|pg_try_advisory_xact_lock|" +
- "pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|pg_ts_dict_is_visible|" +
- "pg_ts_parser_is_visible|pg_ts_template_is_visible|pg_type_is_visible|pg_typeof|" +
- "pg_xlog_replay_pause|pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|" +
- "pi|plainto_tsquery|plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|" +
- "point|point_above|point_add|point_below|point_distance|point_div|point_eq|point_horiz|" +
- "point_in|point_left|point_mul|point_ne|point_out|point_recv|point_right|point_send|" +
- "point_sub|point_vert|poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|" +
- "poly_contained|poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|" +
- "poly_overbelow|poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|" +
- "poly_same|poly_send|polygon|popen|position|positionjoinsel|positionsel|" +
- "postgresql_fdw_validator|pow|power|prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|" +
- "prsd_start|pt_contained_circle|pt_contained_poly|query_to_xml|" +
- "query_to_xml_and_xmlschema|query_to_xmlschema|querytree|quote_ident|quote_literal|" +
- "quote_nullable|radians|radius|random|rank|record_eq|record_ge|record_gt|record_in|" +
- "record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|" +
- "regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|" +
- "regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|" +
- "regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|" +
- "regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|" +
- "regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|" +
- "regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|" +
- "regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|" +
- "regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|" +
- "reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|" +
- "reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|rpad|rtrim|" +
- "scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|" +
- "schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|" +
- "set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|" +
- "shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|" +
- "similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|" +
- "smgrout|split_part|sqrt|statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|" +
- "string_agg_finalfn|string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|" +
- "suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|" +
- "table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|" +
- "text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|" +
- "texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|" +
- "textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|" +
- "thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|" +
- "tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|" +
- "time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|" +
- "time_smaller|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|" +
- "timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|" +
- "timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|" +
- "timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|" +
- "timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|" +
- "timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|" +
- "timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|" +
- "timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|" +
- "timestamptypmodin|timestamptypmodout|timestamptz_cmp|timestamptz_cmp_date|" +
- "timestamptz_cmp_timestamp|timestamptz_eq|timestamptz_eq_date|" +
- "timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|" +
- "timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|" +
- "timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|" +
- "timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|" +
- "timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|" +
- "timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|" +
- "timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|" +
- "timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|" +
- "timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|" +
- "timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|" +
- "timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|" +
- "tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|" +
- "tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|" +
- "tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|" +
- "tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|" +
- "to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|" +
- "trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|" +
- "ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|" +
- "ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|" +
- "tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|" +
- "tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsvector_cmp|" +
- "tsvector_concat|tsvector_eq|tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|" +
- "tsvector_ne|tsvector_update_trigger|tsvector_update_trigger_column|tsvectorin|" +
- "tsvectorout|tsvectorrecv|tsvectorsend|txid_current|txid_current_snapshot|" +
- "txid_snapshot_in|txid_snapshot_out|txid_snapshot_recv|txid_snapshot_send|" +
- "txid_snapshot_xip|txid_snapshot_xmax|txid_snapshot_xmin|txid_visible_in_snapshot|" +
- "uhc_to_utf8|unique_key_recheck|unknownin|unknownout|unknownrecv|unknownsend|unnest|" +
- "upper|utf8_to_ascii|utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|" +
- "utf8_to_euc_kr|utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|" +
- "utf8_to_iso8859_1|utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|" +
- "utf8_to_sjis|utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|" +
- "uuid_le|uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|" +
- "varbit_out|varbit_recv|varbit_send|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|" +
- "varbitlt|varbitne|varbittypmodin|varbittypmodout|varcharin|varcharout|varcharrecv|" +
- "varcharsend|varchartypmodin|varchartypmodout|variance|version|void_in|void_out|" +
- "void_recv|void_send|width|width_bucket|win1250_to_latin2|win1250_to_mic|win1251_to_iso|" +
- "win1251_to_koi8r|win1251_to_mic|win1251_to_win866|win866_to_iso|win866_to_koi8r|" +
- "win866_to_mic|win866_to_win1251|win_to_utf8|xideq|xideqint4|xidin|xidout|xidrecv|xidsend|" +
- "xml|xml_in|xml_is_well_formed|xml_is_well_formed_content|xml_is_well_formed_document|" +
- "xml_out|xml_recv|xml_send|xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|" +
- "xpath_exists"
- );
-
- var keywordMapper = this.createKeywordMapper({
- "support.function": builtinFunctions,
- "keyword": keywords
- }, "identifier", true);
-
-
- var sqlRules = [{
- token : "string", // single line string -- assume dollar strings if multi-line for now
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "variable.language", // pg identifier
- regex : '".*?"'
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : keywordMapper,
- regex : "[a-zA-Z_][a-zA-Z0-9_$]*\\b" // TODO - Unicode in identifiers
- }, {
- token : "keyword.operator",
- regex : "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|" +
- "\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||" +
- "\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|" +
- "~=|~>=~|~>~|~~|~~\\*"
- }, {
- token : "paren.lparen",
- regex : "[\\(]"
- }, {
- token : "paren.rparen",
- regex : "[\\)]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ];
-
-
- this.$rules = {
- "start" : [{
- token : "comment",
- regex : "--.*$"
- },
- DocCommentHighlightRules.getStartRule("doc-start"),
- {
- token : "comment", // multi-line comment
- regex : "\\/\\*",
- next : "comment"
- },{
- token : "keyword.statementBegin",
- regex : "^[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added.
- next : "statement"
- },{
- token : "support.buildin", // psql directive
- regex : "^\\\\[\\S]+.*$"
- }
- ],
-
- "statement" : [{
- token : "comment",
- regex : "--.*$"
- }, {
- token : "comment", // multi-line comment
- regex : "\\/\\*",
- next : "commentStatement"
- }, {
- token : "statementEnd",
- regex : ";",
- next : "start"
- }, {
- token : "string", // perl, python, tcl are in the pg default dist (no tcl highlighter)
- regex : "\\$perl\\$",
- next : "perl-start"
- }, {
- token : "string",
- regex : "\\$python\\$",
- next : "python-start"
- },{
- token : "string",
- regex : "\\$[\\w_0-9]*\\$$", // dollar quote at the end of a line
- next : "dollarSql"
- }, {
- token : "string",
- regex : "\\$[\\w_0-9]*\\$",
- next : "dollarStatementString"
- }
- ].concat(sqlRules),
-
- "dollarSql" : [{
- token : "comment",
- regex : "--.*$"
- }, {
- token : "comment", // multi-line comment
- regex : "\\/\\*",
- next : "commentDollarSql"
- }, {
- token : "string", // end quoting with dollar at the start of a line
- regex : "^\\$[\\w_0-9]*\\$",
- next : "statement"
- }, {
- token : "string",
- regex : "\\$[\\w_0-9]*\\$",
- next : "dollarSqlString"
- }
- ].concat(sqlRules),
-
- "comment" : [{
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "start"
- }, {
- token : "comment", // comment spanning whole line
- regex : ".+"
- }
- ],
-
- "commentStatement" : [{
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "statement"
- }, {
- token : "comment", // comment spanning whole line
- regex : ".+"
- }
- ],
-
- "commentDollarSql" : [{
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
- next : "dollarSql"
- }, {
- token : "comment", // comment spanning whole line
- regex : ".+"
- }
- ],
-
- "dollarStatementString" : [{
- token : "string", // closing dollarstring
- regex : ".*?\\$[\\w_0-9]*\\$",
- next : "statement"
- }, {
- token : "string", // dollarstring spanning whole line
- regex : ".+"
- }
- ],
-
- "dollarSqlString" : [{
- token : "string", // closing dollarstring
- regex : ".*?\\$[\\w_0-9]*\\$",
- next : "dollarSql"
- }, {
- token : "string", // dollarstring spanning whole line
- regex : ".+"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]);
- this.embedRules(PerlHighlightRules, "perl-", [{token : "string", regex : "\\$perl\\$", next : "statement"}]);
- this.embedRules(PythonHighlightRules, "python-", [{token : "string", regex : "\\$python\\$", next : "statement"}]);
-};
-
-oop.inherits(PgsqlHighlightRules, TextHighlightRules);
-
-exports.PgsqlHighlightRules = PgsqlHighlightRules;
-});
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var DocCommentHighlightRules = function() {
-
this.$rules = {
"start" : [ {
token : "comment.doc.tag",
regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
}]
};
};
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
DocCommentHighlightRules.getStartRule = function(start) {
return {
token : "comment.doc", // doc comment
@@ -642,8 +48,8 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules;
});
-ace.define('ace/mode/perl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -775,8 +181,8 @@ oop.inherits(PerlHighlightRules, TextHighlightRules);
exports.PerlHighlightRules = PerlHighlightRules;
});
-ace.define('ace/mode/python_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -930,3 +336,1039 @@ oop.inherits(PythonHighlightRules, TextHighlightRules);
exports.PythonHighlightRules = PythonHighlightRules;
});
+
+ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JsonHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : "variable", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'
+ }, {
+ token : "string", // single line
+ regex : '"',
+ next : "string"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : "invalid.illegal", // single quoted strings are not allowed
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "invalid.illegal", // comments are not allowed
+ regex : "\\/\\/.*$"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "string" : [
+ {
+ token : "constant.language.escape",
+ regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/
+ }, {
+ token : "string",
+ regex : '[^"\\\\]+'
+ }, {
+ token : "string",
+ regex : '"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : "",
+ next : "start"
+ }
+ ]
+ };
+
+};
+
+oop.inherits(JsonHighlightRules, TextHighlightRules);
+
+exports.JsonHighlightRules = JsonHighlightRules;
+});
+
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function(options) {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment_regex_allowed"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex"
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/pgsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/perl_highlight_rules","ace/mode/python_highlight_rules","ace/mode/json_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
+var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
+var JsonHighlightRules = require("./json_highlight_rules").JsonHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+
+var PgsqlHighlightRules = function() {
+ var keywords = (
+ "abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|" +
+ "analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|anyrange|array|as|asc|" +
+ "assertion|assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|" +
+ "bigint|binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|" +
+ "catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|" +
+ "cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|" +
+ "configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|" +
+ "create|cross|cstring|csv|current|current_catalog|current_date|current_role|" +
+ "current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|" +
+ "date|daterange|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|" +
+ "definer|delete|delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|" +
+ "domain|double|drop|each|else|enable|encoding|encrypted|end|enum|escape|event|event_trigger|" +
+ "except|exclude|excluding|exclusive|execute|exists|explain|extension|external|extract|false|" +
+ "family|fdw_handler|fetch|first|float|float4|float8|following|for|force|foreign|forward|" +
+ "freeze|from|full|function|functions|global|grant|granted|greatest|group|gtsvector|handler|" +
+ "having|header|hold|hour|identity|if|ilike|immediate|immutable|implicit|in|including|" +
+ "increment|index|indexes|inet|inherit|inherits|initially|inline|inner|inout|input|" +
+ "insensitive|insert|instead|int|int2|int2vector|int4|int4range|int8|int8range|integer|" +
+ "internal|intersect|interval|into|invoker|is|isnull|isolation|join|json|key|label|language|" +
+ "language_handler|large|last|lateral|lc_collate|lc_ctype|leading|leakproof|least|left|level|" +
+ "like|limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|" +
+ "mapping|match|materialized|maxvalue|minute|minvalue|mode|money|month|move|name|names|" +
+ "national|natural|nchar|next|no|none|not|nothing|notify|notnull|nowait|null|nullif|nulls|" +
+ "numeric|numrange|object|of|off|offset|oid|oids|oidvector|on|only|opaque|operator|option|" +
+ "options|or|order|out|outer|over|overlaps|overlay|owned|owner|parser|partial|partition|passing|" +
+ "password|path|pg_attribute|pg_auth_members|pg_authid|pg_class|pg_database|pg_node_tree|" +
+ "pg_proc|pg_type|placing|plans|point|polygon|position|preceding|precision|prepare|prepared|" +
+ "preserve|primary|prior|privileges|procedural|procedure|program|quote|range|read|real|" +
+ "reassign|recheck|record|recursive|ref|refcursor|references|refresh|regclass|regconfig|" +
+ "regdictionary|regoper|regoperator|regproc|regprocedure|regtype|reindex|relative|release|" +
+ "reltime|rename|repeatable|replace|replica|reset|restart|restrict|returning|returns|revoke|" +
+ "right|role|rollback|row|rows|rule|savepoint|schema|scroll|search|second|security|select|" +
+ "sequence|sequences|serializable|server|session|session_user|set|setof|share|show|similar|" +
+ "simple|smallint|smgr|snapshot|some|stable|standalone|start|statement|statistics|stdin|" +
+ "stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|tablespace|temp|" +
+ "template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|tinterval|to|trailing|" +
+ "transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsrange|tstzrange|tsvector|" +
+ "txid_snapshot|type|types|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|" +
+ "unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|" +
+ "varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|" +
+ "with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|" +
+ "xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone"
+ );
+
+
+ var builtinFunctions = (
+ "RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|" +
+ "RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|" +
+ "RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|" +
+ "RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|" +
+ "abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|acldefault|" +
+ "aclexplode|aclinsert|aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|" +
+ "anyarray_in|anyarray_out|anyarray_recv|anyarray_send|anyelement_in|anyelement_out|" +
+ "anyenum_in|anyenum_out|anynonarray_in|anynonarray_out|anyrange_in|anyrange_out|" +
+ "anytextcat|area|areajoinsel|areasel|array_agg|array_agg_finalfn|array_agg_transfn|" +
+ "array_append|array_cat|array_dims|array_eq|array_fill|array_ge|array_gt|array_in|" +
+ "array_larger|array_le|array_length|array_lower|array_lt|array_ndims|array_ne|array_out|" +
+ "array_prepend|array_recv|array_remove|array_replace|array_send|array_smaller|" +
+ "array_to_json|array_to_string|array_typanalyze|array_upper|arraycontained|" +
+ "arraycontains|arraycontjoinsel|arraycontsel|arrayoverlap|ascii|ascii_to_mic|" +
+ "ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|big5_to_utf8|bit_and|bit_in|" +
+ "bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|bitcmp|biteq|bitge|bitgt|bitle|" +
+ "bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|bittypmodin|bittypmodout|bitxor|bool|" +
+ "bool_and|bool_or|booland_statefunc|booleq|boolge|boolgt|boolin|boolle|boollt|boolne|" +
+ "boolor_statefunc|boolout|boolrecv|boolsend|box|box_above|box_above_eq|box_add|box_below|" +
+ "box_below_eq|box_center|box_contain|box_contain_pt|box_contained|box_distance|box_div|" +
+ "box_eq|box_ge|box_gt|box_in|box_intersect|box_le|box_left|box_lt|box_mul|box_out|" +
+ "box_overabove|box_overbelow|box_overlap|box_overleft|box_overright|box_recv|box_right|" +
+ "box_same|box_send|box_sub|bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|" +
+ "bpchar_pattern_le|bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|" +
+ "bpchargt|bpchariclike|bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|" +
+ "bpcharlike|bpcharlt|bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|" +
+ "bpcharregexne|bpcharsend|bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|" +
+ "btarraycmp|btbeginscan|btboolcmp|btbpchar_pattern_cmp|btbuild|btbuildempty|" +
+ "btbulkdelete|btcanreturn|btcharcmp|btcostestimate|btendscan|btfloat48cmp|btfloat4cmp|" +
+ "btfloat4sortsupport|btfloat84cmp|btfloat8cmp|btfloat8sortsupport|btgetbitmap|" +
+ "btgettuple|btinsert|btint24cmp|btint28cmp|btint2cmp|btint2sortsupport|btint42cmp|" +
+ "btint48cmp|btint4cmp|btint4sortsupport|btint82cmp|btint84cmp|btint8cmp|" +
+ "btint8sortsupport|btmarkpos|btnamecmp|btnamesortsupport|btoidcmp|btoidsortsupport|" +
+ "btoidvectorcmp|btoptions|btrecordcmp|btreltimecmp|btrescan|btrestrpos|btrim|" +
+ "bttext_pattern_cmp|bttextcmp|bttidcmp|bttintervalcmp|btvacuumcleanup|" +
+ "bytea_string_agg_finalfn|bytea_string_agg_transfn|byteacat|byteacmp|byteaeq|byteage|" +
+ "byteagt|byteain|byteale|bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|" +
+ "cash_cmp|cash_div_cash|cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|" +
+ "cash_ge|cash_gt|cash_in|cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|" +
+ "cash_mul_int2|cash_mul_int4|cash_ne|cash_out|cash_pl|cash_recv|cash_send|cash_words|" +
+ "cashlarger|cashsmaller|cbrt|ceil|ceiling|center|char|char_length|character_length|chareq|" +
+ "charge|chargt|charin|charle|charlt|charne|charout|charrecv|charsend|chr|cideq|cidin|cidout|" +
+ "cidr|cidr_in|cidr_out|cidr_recv|cidr_send|cidrecv|cidsend|circle|circle_above|" +
+ "circle_add_pt|circle_below|circle_center|circle_contain|circle_contain_pt|" +
+ "circle_contained|circle_distance|circle_div_pt|circle_eq|circle_ge|circle_gt|circle_in|" +
+ "circle_le|circle_left|circle_lt|circle_mul_pt|circle_ne|circle_out|circle_overabove|" +
+ "circle_overbelow|circle_overlap|circle_overleft|circle_overright|circle_recv|" +
+ "circle_right|circle_same|circle_send|circle_sub_pt|clock_timestamp|close_lb|close_ls|" +
+ "close_lseg|close_pb|close_pl|close_ps|close_sb|close_sl|col_description|concat|concat_ws|" +
+ "contjoinsel|contsel|convert|convert_from|convert_to|corr|cos|cot|count|covar_pop|" +
+ "covar_samp|cstring_in|cstring_out|cstring_recv|cstring_send|cume_dist|current_database|" +
+ "current_query|current_schema|current_schemas|current_setting|current_user|currtid|" +
+ "currtid2|currval|cursor_to_xml|cursor_to_xmlschema|database_to_xml|" +
+ "database_to_xml_and_xmlschema|database_to_xmlschema|date|date_cmp|date_cmp_timestamp|" +
+ "date_cmp_timestamptz|date_eq|date_eq_timestamp|date_eq_timestamptz|date_ge|" +
+ "date_ge_timestamp|date_ge_timestamptz|date_gt|date_gt_timestamp|date_gt_timestamptz|" +
+ "date_in|date_larger|date_le|date_le_timestamp|date_le_timestamptz|date_lt|" +
+ "date_lt_timestamp|date_lt_timestamptz|date_mi|date_mi_interval|date_mii|date_ne|" +
+ "date_ne_timestamp|date_ne_timestamptz|date_out|date_part|date_pl_interval|date_pli|" +
+ "date_recv|date_send|date_smaller|date_sortsupport|date_trunc|daterange|" +
+ "daterange_canonical|daterange_subdiff|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|" +
+ "dense_rank|dexp|diagonal|diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|" +
+ "dist_pc|dist_pl|dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|" +
+ "dpow|dround|dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|" +
+ "dsynonym_init|dsynonym_lexize|dtrunc|elem_contained_by_range|encode|enum_cmp|enum_eq|" +
+ "enum_first|enum_ge|enum_gt|enum_in|enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|" +
+ "enum_range|enum_recv|enum_send|enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|" +
+ "euc_cn_to_utf8|euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|" +
+ "euc_jp_to_sjis|euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|" +
+ "euc_tw_to_mic|euc_tw_to_utf8|event_trigger_in|event_trigger_out|every|exp|factorial|" +
+ "family|fdw_handler_in|fdw_handler_out|first_value|float4|float48div|float48eq|float48ge|" +
+ "float48gt|float48le|float48lt|float48mi|float48mul|float48ne|float48pl|float4_accum|" +
+ "float4abs|float4div|float4eq|float4ge|float4gt|float4in|float4larger|float4le|float4lt|" +
+ "float4mi|float4mul|float4ne|float4out|float4pl|float4recv|float4send|float4smaller|" +
+ "float4um|float4up|float8|float84div|float84eq|float84ge|float84gt|float84le|float84lt|" +
+ "float84mi|float84mul|float84ne|float84pl|float8_accum|float8_avg|float8_corr|" +
+ "float8_covar_pop|float8_covar_samp|float8_regr_accum|float8_regr_avgx|" +
+ "float8_regr_avgy|float8_regr_intercept|float8_regr_r2|float8_regr_slope|" +
+ "float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|float8_stddev_samp|" +
+ "float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|float8ge|float8gt|float8in|" +
+ "float8larger|float8le|float8lt|float8mi|float8mul|float8ne|float8out|float8pl|float8recv|" +
+ "float8send|float8smaller|float8um|float8up|floor|flt4_mul_cash|flt8_mul_cash|" +
+ "fmgr_c_validator|fmgr_internal_validator|fmgr_sql_validator|format|format_type|" +
+ "gb18030_to_utf8|gbk_to_utf8|generate_series|generate_subscripts|get_bit|get_byte|" +
+ "get_current_ts_config|getdatabaseencoding|getpgusername|gin_cmp_prefix|" +
+ "gin_cmp_tslexeme|gin_extract_tsquery|gin_extract_tsvector|gin_tsquery_consistent|" +
+ "ginarrayconsistent|ginarrayextract|ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|" +
+ "gincostestimate|ginendscan|gingetbitmap|gininsert|ginmarkpos|ginoptions|" +
+ "ginqueryarrayextract|ginrescan|ginrestrpos|ginvacuumcleanup|gist_box_compress|" +
+ "gist_box_consistent|gist_box_decompress|gist_box_penalty|gist_box_picksplit|" +
+ "gist_box_same|gist_box_union|gist_circle_compress|gist_circle_consistent|" +
+ "gist_point_compress|gist_point_consistent|gist_point_distance|gist_poly_compress|" +
+ "gist_poly_consistent|gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|" +
+ "gistcostestimate|gistendscan|gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|" +
+ "gistoptions|gistrescan|gistrestrpos|gistvacuumcleanup|gtsquery_compress|" +
+ "gtsquery_consistent|gtsquery_decompress|gtsquery_penalty|gtsquery_picksplit|" +
+ "gtsquery_same|gtsquery_union|gtsvector_compress|gtsvector_consistent|" +
+ "gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|gtsvector_same|" +
+ "gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|" +
+ "has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|" +
+ "has_function_privilege|has_language_privilege|has_schema_privilege|" +
+ "has_sequence_privilege|has_server_privilege|has_table_privilege|" +
+ "has_tablespace_privilege|has_type_privilege|hash_aclitem|hash_array|hash_numeric|" +
+ "hash_range|hashbeginscan|hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|" +
+ "hashcostestimate|hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|" +
+ "hashinet|hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|" +
+ "hashname|hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|" +
+ "hashvacuumcleanup|hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|" +
+ "icnlikejoinsel|icnlikesel|icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|" +
+ "inet_client_addr|inet_client_port|inet_in|inet_out|inet_recv|inet_send|" +
+ "inet_server_addr|inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|" +
+ "initcap|int2|int24div|int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|" +
+ "int24pl|int28div|int28eq|int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|" +
+ "int2_accum|int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|" +
+ "int2gt|int2in|int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|" +
+ "int2pl|int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|" +
+ "int2vectorin|int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|" +
+ "int42ge|int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|" +
+ "int48gt|int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|" +
+ "int4_mul_cash|int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|" +
+ "int4larger|int4le|int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|" +
+ "int4range|int4range_canonical|int4range_subdiff|int4recv|int4send|int4shl|int4shr|" +
+ "int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|int82le|int82lt|" +
+ "int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|int84lt|int84mi|" +
+ "int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|int8abs|int8and|" +
+ "int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|int8inc_float8_float8|int8larger|" +
+ "int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|int8or|int8out|int8pl|int8pl_inet|" +
+ "int8range|int8range_canonical|int8range_subdiff|int8recv|int8send|int8shl|int8shr|" +
+ "int8smaller|int8um|int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|" +
+ "internal_out|interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|" +
+ "interval_ge|interval_gt|interval_hash|interval_in|interval_larger|interval_le|" +
+ "interval_lt|interval_mi|interval_mul|interval_ne|interval_out|interval_pl|" +
+ "interval_pl_date|interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|" +
+ "interval_pl_timetz|interval_recv|interval_send|interval_smaller|interval_transform|" +
+ "interval_um|intervaltypmodin|intervaltypmodout|intinterval|isclosed|isempty|isfinite|" +
+ "ishorizontal|iso8859_1_to_utf8|iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|" +
+ "iso_to_win866|isopen|isparallel|isperp|isvertical|johab_to_utf8|json_agg|" +
+ "json_agg_finalfn|json_agg_transfn|json_array_element|json_array_element_text|" +
+ "json_array_elements|json_array_length|json_each|json_each_text|json_extract_path|" +
+ "json_extract_path_op|json_extract_path_text|json_extract_path_text_op|json_in|" +
+ "json_object_field|json_object_field_text|json_object_keys|json_out|" +
+ "json_populate_record|json_populate_recordset|json_recv|json_send|justify_days|" +
+ "justify_hours|justify_interval|koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|" +
+ "koi8r_to_win1251|koi8r_to_win866|koi8u_to_utf8|lag|language_handler_in|" +
+ "language_handler_out|last_value|lastval|latin1_to_mic|latin2_to_mic|latin2_to_win1250|" +
+ "latin3_to_mic|latin4_to_mic|lead|left|length|like|like_escape|likejoinsel|likesel|line|" +
+ "line_distance|line_eq|line_horizontal|line_in|line_interpt|line_intersect|line_out|" +
+ "line_parallel|line_perp|line_recv|line_send|line_vertical|ln|lo_close|lo_creat|lo_create|" +
+ "lo_export|lo_import|lo_lseek|lo_lseek64|lo_open|lo_tell|lo_tell64|lo_truncate|" +
+ "lo_truncate64|lo_unlink|log|loread|lower|lower_inc|lower_inf|lowrite|lpad|lseg|lseg_center|" +
+ "lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|" +
+ "lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|" +
+ "lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_and|macaddr_cmp|macaddr_eq|macaddr_ge|" +
+ "macaddr_gt|macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_not|macaddr_or|" +
+ "macaddr_out|macaddr_recv|macaddr_send|makeaclitem|masklen|max|md5|mic_to_ascii|" +
+ "mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|" +
+ "mic_to_koi8r|mic_to_latin1|mic_to_latin2|mic_to_latin3|mic_to_latin4|mic_to_sjis|" +
+ "mic_to_win1250|mic_to_win1251|mic_to_win866|min|mktinterval|mod|money|mul_d_interval|" +
+ "name|nameeq|namege|namegt|nameiclike|nameicnlike|nameicregexeq|nameicregexne|namein|" +
+ "namele|namelike|namelt|namene|namenlike|nameout|namerecv|nameregexeq|nameregexne|namesend|" +
+ "neqjoinsel|neqsel|netmask|network|network_cmp|network_eq|network_ge|network_gt|" +
+ "network_le|network_lt|network_ne|network_sub|network_subeq|network_sup|network_supeq|" +
+ "nextval|nlikejoinsel|nlikesel|notlike|now|npoints|nth_value|ntile|numeric_abs|" +
+ "numeric_accum|numeric_add|numeric_avg|numeric_avg_accum|numeric_cmp|numeric_div|" +
+ "numeric_div_trunc|numeric_eq|numeric_exp|numeric_fac|numeric_ge|numeric_gt|numeric_in|" +
+ "numeric_inc|numeric_larger|numeric_le|numeric_ln|numeric_log|numeric_lt|numeric_mod|" +
+ "numeric_mul|numeric_ne|numeric_out|numeric_power|numeric_recv|numeric_send|" +
+ "numeric_smaller|numeric_sqrt|numeric_stddev_pop|numeric_stddev_samp|numeric_sub|" +
+ "numeric_transform|numeric_uminus|numeric_uplus|numeric_var_pop|numeric_var_samp|" +
+ "numerictypmodin|numerictypmodout|numnode|numrange|numrange_subdiff|obj_description|" +
+ "octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|oidrecv|oidsend|" +
+ "oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|oidvectorlt|" +
+ "oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|on_pl|" +
+ "on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|path_add_pt|" +
+ "path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|path_length|" +
+ "path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|path_out|" +
+ "path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|" +
+ "pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|" +
+ "pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|" +
+ "pg_available_extension_versions|pg_available_extensions|pg_backend_pid|" +
+ "pg_backup_start_time|pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|" +
+ "pg_collation_for|pg_collation_is_visible|pg_column_is_updatable|pg_column_size|" +
+ "pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|" +
+ "pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|" +
+ "pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|" +
+ "pg_event_trigger_dropped_objects|pg_export_snapshot|pg_extension_config_dump|" +
+ "pg_extension_update_paths|pg_function_is_visible|pg_get_constraintdef|pg_get_expr|" +
+ "pg_get_function_arguments|pg_get_function_identity_arguments|" +
+ "pg_get_function_result|pg_get_functiondef|pg_get_indexdef|pg_get_keywords|" +
+ "pg_get_multixact_members|pg_get_ruledef|pg_get_serial_sequence|pg_get_triggerdef|" +
+ "pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_identify_object|pg_indexes_size|" +
+ "pg_is_in_backup|pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|" +
+ "pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|" +
+ "pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|" +
+ "pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|" +
+ "pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|" +
+ "pg_opfamily_is_visible|pg_options_to_table|pg_postmaster_start_time|" +
+ "pg_prepared_statement|pg_prepared_xact|pg_read_binary_file|pg_read_file|" +
+ "pg_relation_filenode|pg_relation_filepath|pg_relation_is_updatable|pg_relation_size|" +
+ "pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|pg_show_all_settings|" +
+ "pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|pg_stat_file|" +
+ "pg_stat_get_activity|pg_stat_get_analyze_count|pg_stat_get_autoanalyze_count|" +
+ "pg_stat_get_autovacuum_count|pg_stat_get_backend_activity|" +
+ "pg_stat_get_backend_activity_start|pg_stat_get_backend_client_addr|" +
+ "pg_stat_get_backend_client_port|pg_stat_get_backend_dbid|pg_stat_get_backend_idset|" +
+ "pg_stat_get_backend_pid|pg_stat_get_backend_start|pg_stat_get_backend_userid|" +
+ "pg_stat_get_backend_waiting|pg_stat_get_backend_xact_start|" +
+ "pg_stat_get_bgwriter_buf_written_checkpoints|" +
+ "pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|" +
+ "pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|" +
+ "pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|" +
+ "pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|" +
+ "pg_stat_get_buf_written_backend|pg_stat_get_checkpoint_sync_time|" +
+ "pg_stat_get_checkpoint_write_time|pg_stat_get_db_blk_read_time|" +
+ "pg_stat_get_db_blk_write_time|pg_stat_get_db_blocks_fetched|" +
+ "pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|" +
+ "pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|" +
+ "pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|" +
+ "pg_stat_get_db_conflict_tablespace|pg_stat_get_db_deadlocks|" +
+ "pg_stat_get_db_numbackends|pg_stat_get_db_stat_reset_time|" +
+ "pg_stat_get_db_temp_bytes|pg_stat_get_db_temp_files|pg_stat_get_db_tuples_deleted|" +
+ "pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|" +
+ "pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|" +
+ "pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|" +
+ "pg_stat_get_function_calls|pg_stat_get_function_self_time|" +
+ "pg_stat_get_function_total_time|pg_stat_get_last_analyze_time|" +
+ "pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|" +
+ "pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|" +
+ "pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|" +
+ "pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|" +
+ "pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|" +
+ "pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|" +
+ "pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|" +
+ "pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_total_time|" +
+ "pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|" +
+ "pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|" +
+ "pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|" +
+ "pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|" +
+ "pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|" +
+ "pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|" +
+ "pg_tablespace_databases|pg_tablespace_location|pg_tablespace_size|" +
+ "pg_terminate_backend|pg_timezone_abbrevs|pg_timezone_names|pg_total_relation_size|" +
+ "pg_trigger_depth|pg_try_advisory_lock|pg_try_advisory_lock_shared|" +
+ "pg_try_advisory_xact_lock|pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|" +
+ "pg_ts_dict_is_visible|pg_ts_parser_is_visible|pg_ts_template_is_visible|" +
+ "pg_type_is_visible|pg_typeof|pg_xlog_location_diff|pg_xlog_replay_pause|" +
+ "pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|pi|plainto_tsquery|" +
+ "plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|point|point_above|" +
+ "point_add|point_below|point_distance|point_div|point_eq|point_horiz|point_in|point_left|" +
+ "point_mul|point_ne|point_out|point_recv|point_right|point_send|point_sub|point_vert|" +
+ "poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|poly_contained|" +
+ "poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|poly_overbelow|" +
+ "poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|poly_same|poly_send|" +
+ "polygon|popen|position|positionjoinsel|positionsel|postgresql_fdw_validator|pow|power|" +
+ "prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|prsd_start|pt_contained_circle|" +
+ "pt_contained_poly|query_to_xml|query_to_xml_and_xmlschema|query_to_xmlschema|" +
+ "querytree|quote_ident|quote_literal|quote_nullable|radians|radius|random|range_adjacent|" +
+ "range_after|range_before|range_cmp|range_contained_by|range_contains|" +
+ "range_contains_elem|range_eq|range_ge|range_gist_compress|range_gist_consistent|" +
+ "range_gist_decompress|range_gist_penalty|range_gist_picksplit|range_gist_same|" +
+ "range_gist_union|range_gt|range_in|range_intersect|range_le|range_lt|range_minus|" +
+ "range_ne|range_out|range_overlaps|range_overleft|range_overright|range_recv|range_send|" +
+ "range_typanalyze|range_union|rangesel|rank|record_eq|record_ge|record_gt|record_in|" +
+ "record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|" +
+ "regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|" +
+ "regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|" +
+ "regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|" +
+ "regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|" +
+ "regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|" +
+ "regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|" +
+ "regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|" +
+ "regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|" +
+ "reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|" +
+ "reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|row_to_json|rpad|" +
+ "rtrim|scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|" +
+ "schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|" +
+ "set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|" +
+ "shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|" +
+ "similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|" +
+ "smgrout|spg_kd_choose|spg_kd_config|spg_kd_inner_consistent|spg_kd_picksplit|" +
+ "spg_quad_choose|spg_quad_config|spg_quad_inner_consistent|spg_quad_leaf_consistent|" +
+ "spg_quad_picksplit|spg_range_quad_choose|spg_range_quad_config|" +
+ "spg_range_quad_inner_consistent|spg_range_quad_leaf_consistent|" +
+ "spg_range_quad_picksplit|spg_text_choose|spg_text_config|spg_text_inner_consistent|" +
+ "spg_text_leaf_consistent|spg_text_picksplit|spgbeginscan|spgbuild|spgbuildempty|" +
+ "spgbulkdelete|spgcanreturn|spgcostestimate|spgendscan|spggetbitmap|spggettuple|" +
+ "spginsert|spgmarkpos|spgoptions|spgrescan|spgrestrpos|spgvacuumcleanup|split_part|sqrt|" +
+ "statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|string_agg_finalfn|" +
+ "string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|" +
+ "suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|" +
+ "table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|" +
+ "text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|" +
+ "texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|" +
+ "textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|" +
+ "thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|" +
+ "tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|" +
+ "time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|" +
+ "time_smaller|time_transform|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|" +
+ "timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|" +
+ "timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|" +
+ "timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|" +
+ "timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|" +
+ "timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|" +
+ "timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|" +
+ "timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|" +
+ "timestamp_sortsupport|timestamp_transform|timestamptypmodin|timestamptypmodout|" +
+ "timestamptz_cmp|timestamptz_cmp_date|timestamptz_cmp_timestamp|timestamptz_eq|" +
+ "timestamptz_eq_date|timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|" +
+ "timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|" +
+ "timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|" +
+ "timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|" +
+ "timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|" +
+ "timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|" +
+ "timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|" +
+ "timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|" +
+ "timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|" +
+ "timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|" +
+ "timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|" +
+ "tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|" +
+ "tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|" +
+ "tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|" +
+ "tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|" +
+ "to_json|to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|" +
+ "trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|" +
+ "ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|" +
+ "ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|" +
+ "tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|" +
+ "tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsrange|" +
+ "tsrange_subdiff|tstzrange|tstzrange_subdiff|tsvector_cmp|tsvector_concat|tsvector_eq|" +
+ "tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|tsvector_ne|tsvector_update_trigger|" +
+ "tsvector_update_trigger_column|tsvectorin|tsvectorout|tsvectorrecv|tsvectorsend|" +
+ "txid_current|txid_current_snapshot|txid_snapshot_in|txid_snapshot_out|" +
+ "txid_snapshot_recv|txid_snapshot_send|txid_snapshot_xip|txid_snapshot_xmax|" +
+ "txid_snapshot_xmin|txid_visible_in_snapshot|uhc_to_utf8|unique_key_recheck|unknownin|" +
+ "unknownout|unknownrecv|unknownsend|unnest|upper|upper_inc|upper_inf|utf8_to_ascii|" +
+ "utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|utf8_to_euc_kr|" +
+ "utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|utf8_to_iso8859_1|" +
+ "utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|utf8_to_sjis|" +
+ "utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|uuid_le|" +
+ "uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|varbit_out|" +
+ "varbit_recv|varbit_send|varbit_transform|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|" +
+ "varbitlt|varbitne|varbittypmodin|varbittypmodout|varchar_transform|varcharin|" +
+ "varcharout|varcharrecv|varcharsend|varchartypmodin|varchartypmodout|variance|version|" +
+ "void_in|void_out|void_recv|void_send|width|width_bucket|win1250_to_latin2|" +
+ "win1250_to_mic|win1251_to_iso|win1251_to_koi8r|win1251_to_mic|win1251_to_win866|" +
+ "win866_to_iso|win866_to_koi8r|win866_to_mic|win866_to_win1251|win_to_utf8|xideq|" +
+ "xideqint4|xidin|xidout|xidrecv|xidsend|xml|xml_in|xml_is_well_formed|" +
+ "xml_is_well_formed_content|xml_is_well_formed_document|xml_out|xml_recv|xml_send|" +
+ "xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|xpath_exists"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords
+ }, "identifier", true);
+
+
+ var sqlRules = [{
+ token : "string", // single line string -- assume dollar strings if multi-line for now
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "variable.language", // pg identifier
+ regex : '".*?"'
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_][a-zA-Z0-9_$]*\\b" // TODO - Unicode in identifiers
+ }, {
+ token : "keyword.operator",
+ regex : "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|" +
+ "\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||" +
+ "\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|" +
+ "~=|~>=~|~>~|~~|~~\\*"
+ }, {
+ token : "paren.lparen",
+ regex : "[\\(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ];
+
+
+ this.$rules = {
+ "start" : [{
+ token : "comment",
+ regex : "--.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi-line comment
+ regex : "\\/\\*",
+ next : "comment"
+ },{
+ token : "keyword.statementBegin",
+ regex : "^[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added.
+ next : "statement"
+ },{
+ token : "support.buildin", // psql directive
+ regex : "^\\\\[\\S]+.*$"
+ }
+ ],
+
+ "statement" : [{
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "comment", // multi-line comment
+ regex : "\\/\\*",
+ next : "commentStatement"
+ }, {
+ token : "statementEnd",
+ regex : ";",
+ next : "start"
+ }, {
+ token : "string",
+ regex : "\\$perl\\$",
+ next : "perl-start"
+ }, {
+ token : "string",
+ regex : "\\$python\\$",
+ next : "python-start"
+ }, {
+ token : "string",
+ regex : "\\$json\\$",
+ next : "json-start"
+ }, {
+ token : "string",
+ regex : "\\$(js|javascript)\\$",
+ next : "javascript-start"
+ }, {
+ token : "string",
+ regex : "\\$[\\w_0-9]*\\$$", // dollar quote at the end of a line
+ next : "dollarSql"
+ }, {
+ token : "string",
+ regex : "\\$[\\w_0-9]*\\$",
+ next : "dollarStatementString"
+ }
+ ].concat(sqlRules),
+
+ "dollarSql" : [{
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "comment", // multi-line comment
+ regex : "\\/\\*",
+ next : "commentDollarSql"
+ }, {
+ token : "string", // end quoting with dollar at the start of a line
+ regex : "^\\$[\\w_0-9]*\\$",
+ next : "statement"
+ }, {
+ token : "string",
+ regex : "\\$[\\w_0-9]*\\$",
+ next : "dollarSqlString"
+ }
+ ].concat(sqlRules),
+
+ "comment" : [{
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "commentStatement" : [{
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "statement"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "commentDollarSql" : [{
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "dollarSql"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "dollarStatementString" : [{
+ token : "string", // closing dollarstring
+ regex : ".*?\\$[\\w_0-9]*\\$",
+ next : "statement"
+ }, {
+ token : "string", // dollarstring spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "dollarSqlString" : [{
+ token : "string", // closing dollarstring
+ regex : ".*?\\$[\\w_0-9]*\\$",
+ next : "dollarSql"
+ }, {
+ token : "string", // dollarstring spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.embedRules(PerlHighlightRules, "perl-", [{token : "string", regex : "\\$perl\\$", next : "statement"}]);
+ this.embedRules(PythonHighlightRules, "python-", [{token : "string", regex : "\\$python\\$", next : "statement"}]);
+ this.embedRules(JsonHighlightRules, "json-", [{token : "string", regex : "\\$json\\$", next : "statement"}]);
+ this.embedRules(JavaScriptHighlightRules, "javascript-", [{token : "string", regex : "\\$(js|javascript)\\$", next : "statement"}]);
+};
+
+oop.inherits(PgsqlHighlightRules, TextHighlightRules);
+
+exports.PgsqlHighlightRules = PgsqlHighlightRules;
+});
+
+ace.define("ace/mode/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pgsql_highlight_rules","ace/range"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextMode = require("../mode/text").Mode;
+var PgsqlHighlightRules = require("./pgsql_highlight_rules").PgsqlHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = PgsqlHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ if (state == "start" || state == "keyword.statementEnd") {
+ return "";
+ } else {
+ return this.$getIndent(line); // Keep whatever indent the previous line has
+ }
+ }
+
+ this.$id = "ace/mode/pgsql";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-php.js b/js/vendor/ace/src-noconflict/mode-php.js
index 5958894..61856c2 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-php.js
+++ b/js/vendor/ace/src-noconflict/mode-php.js
@@ -1,141 +1,845 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/php', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/php_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/unicode'], function(require, exports, module) {
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules;
-var PhpLangHighlightRules = require("./php_highlight_rules").PhpLangHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-var unicode = require("../unicode");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
-var Mode = function(opts) {
- var inline = opts && opts.inline;
- var HighlightRules = inline ? PhpLangHighlightRules : PhpHighlightRules;
- this.$tokenizer = new Tokenizer(new HighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ push: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "\\}",
+ next: "pop"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "comment" : [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }],
+
+ "ruleset" : [
+ {
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "pop"
+ }, {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : ["support.function", "string", "support.function"],
+ regex : "(url\\()(.*)(\\))"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }]
+ };
+
+ this.normalizeRules();
};
-oop.inherits(Mode, TextMode);
-(function() {
+oop.inherits(CssHighlightRules, TextHighlightRules);
- this.tokenRe = new RegExp("^["
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\_]+", "g"
- );
-
- this.nonTokenRe = new RegExp("^(?:[^"
- + unicode.packages.L
- + unicode.packages.Mn + unicode.packages.Mc
- + unicode.packages.Nd
- + unicode.packages.Pc + "\_]|\s])+", "g"
- );
+exports.CssHighlightRules = CssHighlightRules;
-
- this.lineCommentStart = ["//", "#"];
- this.blockComment = {start: "/*", end: "*/"};
+});
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var JavaScriptHighlightRules = function(options) {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
- if (state == "php-start") {
- var match = line.match(/^.*[\{\(\[\:]\s*$/);
- if (match) {
- indent += tab;
+ this.$rules = {
+ "no_regex" : [
+ {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
}
- } else if (state == "php-doc-start") {
- if (endState != "php-doc-start") {
- return "";
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment_regex_allowed"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
}
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
}
- }
-
- return indent;
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex"
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
};
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
+ },
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
+ },
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
+ ],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker");
- worker.attachToDocument(session.getDocument());
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
- worker.on("error", function(e) {
- session.setAnnotations(e.data);
- });
- worker.on("ok", function() {
- session.clearAnnotations();
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
});
- return worker;
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
};
-}).call(Mode.prototype);
+}).call(TextHighlightRules.prototype);
-exports.Mode = Mode;
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
});
-ace.define('ace/mode/php_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules', 'ace/mode/html_highlight_rules'], function(require, exports, module) {
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+ace.define("ace/mode/php_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -1064,11 +1768,11 @@ var PhpLangHighlightRules = function() {
else if (value == "debugger")
return "invalid.deprecated";
else
- if(value.match(/^(\$[a-zA-Z][a-zA-Z0-9_]*|self|parent)$/))
+ if(value.match(/^(\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/))
return "variable";
return "identifier";
},
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ regex : /[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/
}, {
onMatch : function(value, currentSate, state) {
value = value.substr(3);
@@ -1081,7 +1785,7 @@ var PhpLangHighlightRules = function() {
next: "heredoc"
}, {
token : "keyword.operator",
- regex : "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ regex : "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|=|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
}, {
token : "paren.lparen",
regex : "[[({]"
@@ -1096,27 +1800,26 @@ var PhpLangHighlightRules = function() {
"heredoc" : [
{
onMatch : function(value, currentSate, stack) {
- if (stack[1] + ";" != value)
+ if (stack[1] != value)
return "string";
stack.shift();
stack.shift();
- return "markup.list"
+ return "markup.list";
},
- regex : "^\\w+;$",
+ regex : "^\\w+(?=;?$)",
next: "start"
}, {
token: "string",
- regex : ".*",
+ regex : ".*"
}
],
"comment" : [
{
- token : "comment", // closing comment
- regex : ".*?\\*\\/",
+ token : "comment",
+ regex : "\\*\\/",
next : "start"
}, {
- token : "comment", // comment spanning whole line
- regex : ".+"
+ defaultToken : "comment"
}
],
"qqstring" : [
@@ -1124,10 +1827,10 @@ var PhpLangHighlightRules = function() {
token : "constant.language.escape",
regex : '\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})'
}, {
- token : "constant.language.escape",
- regex : /\$[\w]+(?:\[[\w\]+]|=>\w+)?/
+ token : "variable",
+ regex : /\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/
}, {
- token : "constant.language.escape",
+ token : "variable",
regex : /\$\{[^"\}]+\}?/ // this is wrong but ok for now
},
{token : "string", regex : '"', next : "start"},
@@ -1180,855 +1883,8 @@ exports.PhpHighlightRules = PhpHighlightRules;
exports.PhpLangHighlightRules = PhpLangHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
-
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
-
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
-
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
-
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
-};
-
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
-
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
-var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
-var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
-var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
-
-var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
-var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
-
-var CssHighlightRules = function() {
-
- var keywordMapper = this.createKeywordMapper({
- "support.function": supportFunction,
- "support.constant": supportConstant,
- "support.type": supportType,
- "support.constant.color": supportConstantColor,
- "support.constant.fonts": supportConstantFonts
- }, "text", true);
-
- this.$rules = {
- "start" : [{
- token : "comment", // multi line comment
- regex : "\\/\\*",
- push : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- push: "ruleset"
- }, {
- token: "string",
- regex: "@.*?{",
- push: "media"
- }, {
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- }, {
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- }, {
- token: "string",
- regex: ":[a-z0-9-_]+"
- }, {
- token: "constant",
- regex: "[a-z0-9-_]+"
- }, {
- caseInsensitive: true
- }],
-
- "media" : [{
- token : "comment", // multi line comment
- regex : "\\/\\*",
- push : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- push: "ruleset"
- }, {
- token: "string",
- regex: "\\}",
- next: "pop"
- }, {
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- }, {
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- }, {
- token: "string",
- regex: ":[a-z0-9-_]+"
- }, {
- token: "constant",
- regex: "[a-z0-9-_]+"
- }, {
- caseInsensitive: true
- }],
-
- "comment" : [{
- token : "comment",
- regex : "\\*\\/",
- next : "pop"
- }, {
- defaultToken : "comment"
- }],
-
- "ruleset" : [
- {
- token : "paren.rparen",
- regex : "\\}",
- next: "pop"
- }, {
- token : "comment", // multi line comment
- regex : "\\/\\*",
- push : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : ["constant.numeric", "keyword"],
- regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
- }, {
- token : "constant.numeric",
- regex : numRe
- }, {
- token : "constant.numeric", // hex6 color
- regex : "#[a-f0-9]{6}"
- }, {
- token : "constant.numeric", // hex3 color
- regex : "#[a-f0-9]{3}"
- }, {
- token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
- regex : pseudoElements
- }, {
- token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
- regex : pseudoClasses
- }, {
- token : ["support.function", "string", "support.function"],
- regex : "(url\\()(.*)(\\))"
- }, {
- token : keywordMapper,
- regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
- }, {
- caseInsensitive: true
- }]
- };
-
- this.normalizeRules();
-};
-
-oop.inherits(CssHighlightRules, TextHighlightRules);
-
-exports.CssHighlightRules = CssHighlightRules;
-
-});
-
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
- var keywordMapper = this.createKeywordMapper({
- "variable.language":
- "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
- "Namespace|QName|XML|XMLList|" + // E4X
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
- "SyntaxError|TypeError|URIError|" +
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
- "isNaN|parseFloat|parseInt|" +
- "JSON|Math|" + // Other
- "this|arguments|prototype|window|document" , // Pseudo
- "keyword":
- "const|yield|import|get|set|" +
- "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
- "__parent__|__count__|escape|unescape|with|__proto__|" +
- "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
- "storage.type":
- "const|let|var|function",
- "constant.language":
- "null|Infinity|NaN|undefined",
- "support.function":
- "alert",
- "constant.language.boolean": "true|false"
- }, "identifier");
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
- var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
-
- var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
- "u[0-9a-fA-F]{4}|" + // unicode
- "[0-2][0-7]{0,2}|" + // oct
- "3[0-6][0-7]?|" + // oct
- "37[0-7]?|" + // oct
- "[4-7][0-7]?|" + //oct
- ".)";
-
- this.$rules = {
- "no_regex" : [
- {
- token : "comment",
- regex : "\\/\\/",
- next : "line_comment"
- },
- DocCommentHighlightRules.getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- regex : /\/\*/,
- next : "comment"
- }, {
- token : "string",
- regex : "'(?=.)",
- next : "qstring"
- }, {
- token : "string",
- regex : '"(?=.)',
- next : "qqstring"
- }, {
- token : "constant.numeric", // hex
- regex : /0[xX][0-9a-fA-F]+\b/
- }, {
- token : "constant.numeric", // float
- regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
- }, {
- token : [
- "storage.type", "punctuation.operator", "support.function",
- "punctuation.operator", "entity.name.function", "text","keyword.operator"
- ],
- regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
- next: "function_arguments"
- }, {
- token : [
- "storage.type", "punctuation.operator", "entity.name.function", "text",
- "keyword.operator", "text", "storage.type", "text", "paren.lparen"
- ],
- regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
- next: "function_arguments"
- }, {
- token : [
- "entity.name.function", "text", "keyword.operator", "text", "storage.type",
- "text", "paren.lparen"
- ],
- regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
- next: "function_arguments"
- }, {
- token : [
- "storage.type", "punctuation.operator", "entity.name.function", "text",
- "keyword.operator", "text",
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
- ],
- regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
- next: "function_arguments"
- }, {
- token : [
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
- ],
- regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
- next: "function_arguments"
- }, {
- token : [
- "entity.name.function", "text", "punctuation.operator",
- "text", "storage.type", "text", "paren.lparen"
- ],
- regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
- next: "function_arguments"
- }, {
- token : [
- "text", "text", "storage.type", "text", "paren.lparen"
- ],
- regex : "(:)(\\s*)(function)(\\s*)(\\()",
- next: "function_arguments"
- }, {
- token : "keyword",
- regex : "(?:" + kwBeforeRe + ")\\b",
- next : "start"
- }, {
- token : ["punctuation.operator", "support.function"],
- regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
- }, {
- token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
- }, {
- token : ["punctuation.operator", "support.constant"],
- regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
- }, {
- token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
- }, {
- token : keywordMapper,
- regex : identifierRe
- }, {
- token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
- next : "start"
- }, {
- token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
- next : "start"
- }, {
- token : "paren.lparen",
- regex : /[\[({]/,
- next : "start"
- }, {
- token : "paren.rparen",
- regex : /[\])}]/
- }, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
- token: "comment",
- regex: /^#!.*$/
- }
- ],
- "start": [
- DocCommentHighlightRules.getStartRule("doc-start"),
- {
- token : "comment", // multi line comment
- regex : "\\/\\*",
- next : "comment_regex_allowed"
- }, {
- token : "comment",
- regex : "\\/\\/",
- next : "line_comment_regex_allowed"
- }, {
- token: "string.regexp",
- regex: "\\/",
- next: "regex"
- }, {
- token : "text",
- regex : "\\s+|^$",
- next : "start"
- }, {
- token: "empty",
- regex: "",
- next: "no_regex"
- }
- ],
- "regex": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
- }, {
- token: "string.regexp",
- regex: "/\\w*",
- next: "no_regex"
- }, {
- token : "invalid",
- regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
- }, {
- token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
- }, {
- token : "constant.language.delimiter",
- regex: /\|/
- }, {
- token: "constant.language.escape",
- regex: /\[\^?/,
- next: "regex_character_class"
- }, {
- token: "empty",
- regex: "$",
- next: "no_regex"
- }, {
- defaultToken: "string.regexp"
- }
- ],
- "regex_character_class": [
- {
- token: "regexp.keyword.operator",
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
- }, {
- token: "constant.language.escape",
- regex: "]",
- next: "regex"
- }, {
- token: "constant.language.escape",
- regex: "-"
- }, {
- token: "empty",
- regex: "$",
- next: "no_regex"
- }, {
- defaultToken: "string.regexp.charachterclass"
- }
- ],
- "function_arguments": [
- {
- token: "variable.parameter",
- regex: identifierRe
- }, {
- token: "punctuation.operator",
- regex: "[, ]+"
- }, {
- token: "punctuation.operator",
- regex: "$"
- }, {
- token: "empty",
- regex: "",
- next: "no_regex"
- }
- ],
- "comment_regex_allowed" : [
- {token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
- ],
- "comment" : [
- {token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
- ],
- "line_comment_regex_allowed" : [
- {token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
- ],
- "line_comment" : [
- {token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
- ],
- "qqstring" : [
- {
- token : "constant.language.escape",
- regex : escapedRe
- }, {
- token : "string",
- regex : "\\\\$",
- next : "qqstring"
- }, {
- token : "string",
- regex : '"|$',
- next : "no_regex"
- }, {
- defaultToken: "string"
- }
- ],
- "qstring" : [
- {
- token : "constant.language.escape",
- regex : escapedRe
- }, {
- token : "string",
- regex : "\\\\$",
- next : "qstring"
- }, {
- token : "string",
- regex : "'|$",
- next : "no_regex"
- }, {
- defaultToken: "string"
- }
- ]
- };
-
- this.embedRules(DocCommentHighlightRules, "doc-",
- [ DocCommentHighlightRules.getEndRule("no_regex") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var XmlHighlightRules = function(normalize) {
- this.$rules = {
- start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
- {
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
- },
- {
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
- },
- {token : "comment", regex : "<\\!--", next : "comment"},
- {
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
- },
- {include : "tag"},
- {include : "reference"}
- ],
-
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
-
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
- ],
-
- doctype : [
- {include : "space"},
- {include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
- ],
-
- declarations : [{
- token : "text",
- regex : "\\s+"
- }, {
- token: "punctuation.end",
- regex: "]",
- next: "pop"
- }, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
- push : [{
- token : "text",
- regex : "\\s+"
- },
- {
- token : "punctuation.end",
- regex : ">",
- next : "pop"
- },
- {include : "string"}]
- }],
-
- cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
- ],
-
- comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
- ],
-
- tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- }],
-
- space : [
- {token : "text", regex : "\\s+"}
- ],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
- string: [{
- token : "string",
- regex : "'",
- push : "qstring_inner"
- }, {
- token : "string",
- regex : '"',
- push : "qqstring_inner"
- }],
-
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
- }, {
- token : "keyword.operator.separator",
- regex : "="
- }, {
- include : "space"
- }, {
- include : "string"
- }]
- };
-
- if (this.constructor === XmlHighlightRules)
- this.normalizeRules();
-};
-
-
-(function() {
-
- this.embedTagRules = function(HighlightRules, prefix, tag){
- this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
- next: [
- {include : "space"},
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
- ]
- });
-
- this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
- onMatch : function(value, currentState, stack) {
- stack.splice(0);
- return this.token;
- }}
- ]
-
- this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
- next: tag + "-end"
- }, {
- token: "string.begin",
- regex : "<\\!\\[CDATA\\["
- }, {
- token: "string.end",
- regex : "\\]\\]>"
- }]);
- };
-
-}).call(TextHighlightRules.prototype);
-
-oop.inherits(XmlHighlightRules, TextHighlightRules);
-
-exports.XmlHighlightRules = XmlHighlightRules;
-});
-
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
-
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -2067,8 +1923,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -2080,92 +1936,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -2180,6 +1997,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -2192,51 +2010,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -2245,6 +2069,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -2261,9 +2086,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -2273,15 +2099,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -2290,6 +2114,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -2306,9 +2131,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -2318,62 +2144,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -2385,13 +2208,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -2410,23 +2300,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -2439,7 +2361,1252 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar === ';') {
+ range.end.column ++;
+ return range;
+ }
+ }
+ }
+ });
+
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
+ this.defaultMode = defaultMode;
+ this.subModes = subModes;
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+
+ this.$getMode = function(state) {
+ if (typeof state != "string")
+ state = state[0];
+ for (var key in this.subModes) {
+ if (state.indexOf(key) === 0)
+ return this.subModes[key];
+ }
+ return null;
+ };
+
+ this.$tryMode = function(state, session, foldStyle, row) {
+ var mode = this.$getMode(state);
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
+ };
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ return (
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
+ );
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var mode = this.$getMode(session.getState(row-1));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.$getMode(session.getState(row));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.defaultMode;
+
+ return mode.getFoldWidgetRange(session, foldStyle, row);
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return "";
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag)
+ return null;
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/php_highlight_rules","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/unicode","ace/mode/html","ace/mode/javascript","ace/mode/css"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules;
+var PhpLangHighlightRules = require("./php_highlight_rules").PhpLangHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var unicode = require("../unicode");
+var HtmlMode = require("./html").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+
+var PhpMode = function(opts) {
+ this.HighlightRules = PhpLangHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(PhpMode, TextMode);
+
+(function() {
+
+ this.tokenRe = new RegExp("^["
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "\_]+", "g"
+ );
+
+ this.nonTokenRe = new RegExp("^(?:[^"
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "\_]|\s])+", "g"
+ );
+
+
+ this.lineCommentStart = ["//", "#"];
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState != "doc-start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/php-inline";
+}).call(PhpMode.prototype);
+
+var Mode = function(opts) {
+ if (opts && opts.inline) {
+ var mode = new PhpMode();
+ mode.createWorker = this.createWorker;
+ mode.inlinePhp = true;
+ return mode;
+ }
+ HtmlMode.call(this);
+ this.HighlightRules = PhpHighlightRules;
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode,
+ "php-": PhpMode
+ });
+ this.foldingRules.subModes["php-"] = new CStyleFoldMode();
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.inlinePhp)
+ worker.call("setOptions", [{inline: true}]);
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/php";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-plain_text.js b/js/vendor/ace/src-noconflict/mode-plain_text.js
index 77419b7..0f0c938 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-plain_text.js
+++ b/js/vendor/ace/src-noconflict/mode-plain_text.js
@@ -1,56 +1,25 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/plain_text', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/behaviour'], function(require, exports, module) {
-
+ace.define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var Behaviour = require("./behaviour").Behaviour;
var Mode = function() {
- this.$tokenizer = new Tokenizer(new TextHighlightRules().getRules());
- this.$behaviour = new Behaviour();
+ this.HighlightRules = TextHighlightRules;
+ this.$behaviour = new Behaviour();
};
oop.inherits(Mode, TextMode);
(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return '';
- };
-
+ this.type = "text";
+ this.getNextLineIndent = function(state, line, tab) {
+ return '';
+ };
+ this.$id = "ace/mode/plain_text";
}).call(Mode.prototype);
exports.Mode = Mode;
-}); \ No newline at end of file
+});
diff --git a/js/vendor/ace/src-noconflict/mode-powershell.js b/js/vendor/ace/src-noconflict/mode-powershell.js
index 91affe3..c4353f2 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-powershell.js
+++ b/js/vendor/ace/src-noconflict/mode-powershell.js
@@ -1,69 +1,5 @@
-ace.define('ace/mode/powershell', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/powershell_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PowershellHighlightRules = require("./powershell_highlight_rules").PowershellHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new PowershellHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode({start: "^\\s*(<#)", end: "^[#\\s]>\\s*$"});
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "#";
- this.blockComment = {start: "<#", end: "#>"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-
- this.createWorker = function(session) {
- return null;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-ace.define('ace/mode/powershell_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/powershell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -203,8 +139,8 @@ oop.inherits(PowershellHighlightRules, TextHighlightRules);
exports.PowershellHighlightRules = PowershellHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -243,8 +179,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -256,92 +192,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -356,6 +253,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -368,51 +266,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -421,6 +325,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -437,9 +342,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -449,15 +355,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -466,6 +370,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -482,9 +387,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -494,62 +400,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -561,13 +464,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -586,23 +556,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -615,7 +617,123 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/powershell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/powershell_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PowershellHighlightRules = require("./powershell_highlight_rules").PowershellHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PowershellHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode({start: "^\\s*(<#)", end: "^[#\\s]>\\s*$"});
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+ this.blockComment = {start: "<#", end: "#>"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.$id = "ace/mode/powershell";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-praat.js b/js/vendor/ace/src-noconflict/mode-praat.js
new file mode 100755
index 0000000..53640a5
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-praat.js
@@ -0,0 +1,463 @@
+ace.define("ace/mode/praat_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var PraatHighlightRules = function() {
+
+ var keywords = (
+ "if|then|else|elsif|elif|endif|fi|" +
+ "endfor|endproc|" + // related keywords specified below
+ "while|endwhile|" +
+ "repeat|until|" +
+ "select|plus|minus|" +
+ "assert"
+ );
+
+ var predefinedVariables = (
+ "macintosh|windows|unix|" +
+ "praatVersion|praatVersion\\$" +
+ "pi|undefined|" +
+ "newline\\$|tab\\$|" +
+ "shellDirectory\\$|homeDirectory\\$|preferencesDirectory\\$|" +
+ "temporaryDirectory\\$|defaultDirectory\\$"
+ );
+ var directives = (
+ "clearinfo|endSendPraat"
+ );
+
+ var functions = (
+ "writeInfo|writeInfoLine|appendInfo|appendInfoLine|" +
+ "writeFile|writeFileLine|appendFile|appendFileLine|" +
+ "abs|round|floor|ceiling|min|max|imin|imax|" +
+ "sqrt|sin|cos|tan|arcsin|arccos|arctan|arctan2|sinc|sincpi|" +
+ "exp|ln|log10|log2|" +
+ "sinh|cosh|tanh|arcsinh|arccosh|actanh|" +
+ "sigmoid|invSigmoid|erf|erfc|" +
+ "randomUniform|randomInteger|randomGauss|randomPoisson|" +
+ "lnGamma|gaussP|gaussQ|invGaussQ|" +
+ "chiSquareP|chiSquareQ|invChiSquareQ|studentP|studentQ|invStudentQ|" +
+ "fisherP|fisherQ|invFisherQ|" +
+ "binomialP|binomialQ|invBinomialP|invBinomialQ|" +
+ "hertzToBark|barkToHerz|" +
+ "hertzToMel|melToHertz|" +
+ "hertzToSemitones|semitonesToHerz|" +
+ "erb|hertzToErb|erbToHertz|" +
+ "phonToDifferenceLimens|differenceLimensToPhon|" +
+ "beta|besselI|besselK|" +
+ "selected|selected\\$|numberOfSelected|variableExists|"+
+ "index|rindex|startsWith|endsWith|"+
+ "index_regex|rindex_regex|replace_regex\\$|"+
+ "length|extractWord\\$|extractLine\\$|extractNumber|" +
+ "left\\$|right\\$|mid\\$|replace\\$|" +
+ "beginPause|endPause|" +
+ "demoShow|demoWindowTitle|demoInput|demoWaitForInput|" +
+ "demoClicked|demoClickedIn|demoX|demoY|" +
+ "demoKeyPressed|demoKey\\$|" +
+ "demoExtraControlKeyPressed|demoShiftKeyPressed|"+
+ "demoCommandKeyPressed|demoOptionKeyPressed|" +
+ "environment\\$|chooseReadFile\\$|" +
+ "chooseDirectory\\$|createDirectory|fileReadable|deleteFile|" +
+ "selectObject|removeObject|plusObject|minusObject|" +
+ "runScript|exitScript|" +
+ "beginSendPraat|endSendPraat"
+ );
+
+ var objectTypes = (
+ "Activation|AffineTransform|AmplitudeTier|Art|Artword|Autosegment|" +
+ "BarkFilter|CCA|Categories|Cepstrum|Cepstrumc|ChebyshevSeries|" +
+ "ClassificationTable|Cochleagram|Collection|Configuration|" +
+ "Confusion|ContingencyTable|Corpus|Correlation|Covariance|" +
+ "CrossCorrelationTable|CrossCorrelationTables|DTW|Diagonalizer|" +
+ "Discriminant|Dissimilarity|Distance|Distributions|DurationTier|" +
+ "EEG|ERP|ERPTier|Eigen|Excitation|Excitations|ExperimentMFC|FFNet|" +
+ "FeatureWeights|Formant|FormantFilter|FormantGrid|FormantPoint|" +
+ "FormantTier|GaussianMixture|HMM|HMM_Observation|" +
+ "HMM_ObservationSequence|HMM_State|HMM_StateSequence|Harmonicity|" +
+ "ISpline|Index|Intensity|IntensityTier|IntervalTier|KNN|KlattGrid|" +
+ "KlattTable|LFCC|LPC|Label|LegendreSeries|LinearRegression|" +
+ "LogisticRegression|LongSound|Ltas|MFCC|MSpline|ManPages|" +
+ "Manipulation|Matrix|MelFilter|MixingMatrix|Movie|Network|" +
+ "OTGrammar|OTHistory|OTMulti|PCA|PairDistribution|ParamCurve|" +
+ "Pattern|Permutation|Pitch|PitchTier|PointProcess|Polygon|" +
+ "Polynomial|Procrustes|RealPoint|RealTier|ResultsMFC|Roots|SPINET|" +
+ "SSCP|SVD|Salience|ScalarProduct|Similarity|SimpleString|" +
+ "SortedSetOfString|Sound|Speaker|Spectrogram|Spectrum|SpectrumTier|" +
+ "SpeechSynthesizer|SpellingChecker|Strings|StringsIndex|Table|" +
+ "TableOfReal|TextGrid|TextInterval|TextPoint|TextTier|Tier|" +
+ "Transition|VocalTract|Weight|WordList"
+ );
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "string.interpolated",
+ regex : /'((?:[a-z][a-zA-Z0-9_]*)(?:\$|#|:[0-9]+)?)'/
+ }, {
+ token : ["text", "text", "keyword.operator", "text", "keyword"],
+ regex : /(^\s*)(?:([a-z][a-zA-Z0-9_]*\$?\s+)(=)(\s+))?(stopwatch)/
+ }, {
+ token : ["text", "keyword", "text", "string"],
+ regex : /(^\s*)(print(?:line)?|echo|exit|pause|sendpraat|include|execute)(\s+)(.*)/
+ }, {
+ token : ["text", "keyword"],
+ regex : "(^\\s*)(" + directives + ")$"
+ }, {
+ token : ["text", "keyword.operator", "text"],
+ regex : /(\s+)((?:\+|-|\/|\*|<|>)=?|==?|!=|%|\^|\||and|or|not)(\s+)/
+ }, {
+ token : ["text", "text", "keyword.operator", "text", "keyword", "text", "keyword"],
+ regex : /(^\s*)(?:([a-z][a-zA-Z0-9_]*\$?\s+)(=)(\s+))?(?:((?:no)?warn|nocheck|noprogress)(\s+))?((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/
+ }, {
+ token : ["text", "keyword", "text", "keyword"],
+ regex : /(^\s*)(?:(demo)?(\s+))((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/
+ }, {
+ token : ["text", "keyword", "text", "keyword"],
+ regex : /^(\s*)(?:(demo)(\s+))?(10|12|14|16|24)$/
+ }, {
+ token : ["text", "support.function", "text"],
+ regex : /(\s*)(do\$?)(\s*:\s*|\s*\(\s*)/
+ }, {
+ token : "entity.name.type",
+ regex : "(" + objectTypes + ")"
+ }, {
+ token : "variable.language",
+ regex : "(" + predefinedVariables + ")"
+ }, {
+ token : ["support.function", "text"],
+ regex : "((?:" + functions + ")\\$?)(\\s*(?::|\\())"
+ }, {
+ token : "keyword",
+ regex : /(\bfor\b)/,
+ next : "for"
+ }, {
+ token : "keyword",
+ regex : "(\\b(?:" + keywords + ")\\b)"
+ }, {
+ token : "string",
+ regex : /"[^"]*"/
+ }, {
+ token : "string",
+ regex : /"[^"]*$/,
+ next : "brokenstring"
+ }, {
+ token : ["text", "keyword", "text", "entity.name.section"],
+ regex : /(^\s*)(\bform\b)(\s+)(.*)/,
+ next : "form"
+ }, {
+ token : "constant.numeric",
+ regex : /\b[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : ["keyword", "text", "entity.name.function"],
+ regex : /(procedure)(\s+)(\S+)/
+ }, {
+ token : ["entity.name.function", "text"],
+ regex : /(@\S+)(:|\s*\()/
+ }, {
+ token : ["text", "keyword", "text", "entity.name.function"],
+ regex : /(^\s*)(call)(\s+)(\S+)/
+ }, {
+ token : "comment",
+ regex : /(^\s*#|;).*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "form" : [
+ {
+ token : ["keyword", "text", "constant.numeric"],
+ regex : /((?:optionmenu|choice)\s+)(\S+:\s+)([0-9]+)/
+ }, {
+ token : ["keyword", "constant.numeric"],
+ regex : /((?:option|button)\s+)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b)/
+ }, {
+ token : ["keyword", "string"],
+ regex : /((?:option|button)\s+)(.*)/
+ }, {
+ token : ["keyword", "text", "string"],
+ regex : /((?:sentence|text)\s+)(\S+\s*)(.*)/
+ }, {
+ token : ["keyword", "text", "string", "invalid.illegal"],
+ regex : /(word\s+)(\S+\s*)(\S+)?(\s.*)?/
+ }, {
+ token : ["keyword", "text", "constant.language"],
+ regex : /(boolean\s+)(\S+\s*)(0|1|"?(?:yes|no)"?)/
+ }, {
+ token : ["keyword", "text", "constant.numeric"],
+ regex : /((?:real|natural|positive|integer)\s+)(\S+\s*)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b)/
+ }, {
+ token : ["keyword", "string"],
+ regex : /(comment\s+)(.*)/
+ }, {
+ token : "keyword",
+ regex : 'endform',
+ next : "start"
+ }
+ ],
+ "for" : [
+ {
+ token : ["keyword", "text", "constant.numeric", "text"],
+ regex : /(from|to)(\s+)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?)(\s*)/
+ }, {
+ token : ["keyword", "text"],
+ regex : /(from|to)(\s+\S+\s*)/
+ }, {
+ token : "text",
+ regex : /$/,
+ next : "start"
+ }
+ ],
+ "brokenstring" : [
+ {
+ token : ["text", "string"],
+ regex : /(\s*\.{3})([^"]*)/
+ }, {
+ token : "string",
+ regex : /"/,
+ next : "start"
+ }
+ ],
+ };
+};
+
+oop.inherits(PraatHighlightRules, TextHighlightRules);
+
+exports.PraatHighlightRules = PraatHighlightRules;
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/praat",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/praat_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PraatHighlightRules = require("./praat_highlight_rules").PraatHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PraatHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/praat";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-prolog.js b/js/vendor/ace/src-noconflict/mode-prolog.js
index 2f80065..d0aded9 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-prolog.js
+++ b/js/vendor/ace/src-noconflict/mode-prolog.js
@@ -1,64 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/prolog', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/prolog_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PrologHighlightRules = require("./prolog_highlight_rules").PrologHighlightRules;
-var FoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new PrologHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "/\\*";
- this.blockComment = {start: "/*", end: "*/"};
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/prolog_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/prolog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -93,7 +34,7 @@ var PrologHighlightRules = function() {
regex: '([a-z]\\w*)(\\.)' } ],
'#builtins':
[ { token: 'support.function.builtin.prolog',
- regex: '\\b(?:\n\t\t\t\t\t\tabolish|abort|ancestors|arg|ascii|assert[az]|\n\t\t\t\t\t\tatom(?:ic)?|body|char|close|conc|concat|consult|\n\t\t\t\t\t\tdefine|definition|dynamic|dump|fail|file|free|\n\t\t\t\t\t\tfree_proc|functor|getc|goal|halt|head|head|integer|\n\t\t\t\t\t\tlength|listing|match_args|member|next_clause|nl|\n\t\t\t\t\t\tnonvar|nth|number|cvars|nvars|offset|op|\n\t\t\t\t\t\tprint?|prompt|putc|quoted|ratom|read|redefine|\n\t\t\t\t\t\trename|retract(?:all)?|see|seeing|seen|skip|spy|\n\t\t\t\t\t\tstatistics|system|tab|tell|telling|term|\n\t\t\t\t\t\ttime|told|univ|unlink_clause|unspy_predicate|\n\t\t\t\t\t\tvar|write\n\t\t\t\t\t)\\b' } ],
+ regex: '\\b(?:abolish|abort|ancestors|arg|ascii|assert[az]|atom(?:ic)?|body|char|close|conc|concat|consult|define|definition|dynamic|dump|fail|file|free|free_proc|functor|getc|goal|halt|head|head|integer|length|listing|match_args|member|next_clause|nl|nonvar|nth|number|cvars|nvars|offset|op|print?|prompt|putc|quoted|ratom|read|redefine|rename|retract(?:all)?|see|seeing|seen|skip|spy|statistics|system|tab|tell|telling|term|time|told|univ|unlink_clause|unspy_predicate|var|write)\\b' } ],
'#comment':
[ { token:
[ 'punctuation.definition.comment.prolog',
@@ -138,7 +79,7 @@ var PrologHighlightRules = function() {
[ { token:
[ 'punctuation.end.fact.parameters.prolog',
'punctuation.end.fact.prolog' ],
- regex: '(\\))(\\.)',
+ regex: '(\\))(\\.?)',
next: 'pop' },
{ include: '#parameter' },
{ defaultToken: 'meta.fact.prolog' } ] } ],
@@ -171,7 +112,7 @@ var PrologHighlightRules = function() {
regex: '\\b[A-Z_]\\w*\\b' },
{ token: 'punctuation.separator.parameters.prolog', regex: ',' },
{ include: '#basic_elem' },
- { token: 'invalid.illegal.invalidchar.prolog', regex: '[^\\s]' } ],
+ { token: 'text', regex: '[^\\s]' } ],
'#rule':
[ { token: 'meta.rule.prolog',
regex: '(?=[a-z]\\w*.*:-)',
@@ -258,8 +199,8 @@ oop.inherits(PrologHighlightRules, TextHighlightRules);
exports.PrologHighlightRules = PrologHighlightRules;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -278,23 +219,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -307,7 +280,84 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/prolog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prolog_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PrologHighlightRules = require("./prolog_highlight_rules").PrologHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PrologHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "%";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/prolog";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-properties.js b/js/vendor/ace/src-noconflict/mode-properties.js
index 143f417..91a2150 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-properties.js
+++ b/js/vendor/ace/src-noconflict/mode-properties.js
@@ -1,52 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/properties', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/properties_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PropertiesHighlightRules = require("./properties_highlight_rules").PropertiesHighlightRules;
-
-var Mode = function() {
- var highlighter = new PropertiesHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/properties_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -69,7 +22,7 @@ var PropertiesHighlightRules = function() {
next : "value"
}, {
token : "constant.language.escape",
- regex : escapeRe,
+ regex : escapeRe
}, {
defaultToken: "variable"
}
@@ -99,3 +52,21 @@ oop.inherits(PropertiesHighlightRules, TextHighlightRules);
exports.PropertiesHighlightRules = PropertiesHighlightRules;
});
+ace.define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PropertiesHighlightRules = require("./properties_highlight_rules").PropertiesHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = PropertiesHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$id = "ace/mode/properties";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-protobuf.js b/js/vendor/ace/src-noconflict/mode-protobuf.js
new file mode 100755
index 0000000..f3bb0a3
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-protobuf.js
@@ -0,0 +1,940 @@
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"
+
+var c_cppHighlightRules = function() {
+
+ var keywordControls = (
+ "break|case|continue|default|do|else|for|goto|if|_Pragma|" +
+ "return|switch|while|catch|operator|try|throw|using"
+ );
+
+ var storageType = (
+ "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
+ "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
+ "class|wchar_t|template|char16_t|char32_t"
+ );
+
+ var storageModifiers = (
+ "const|extern|register|restrict|static|volatile|inline|private|" +
+ "protected|public|friend|explicit|virtual|export|mutable|typename|" +
+ "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"
+ );
+
+ var keywordOperators = (
+ "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" +
+ "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"
+ );
+
+ var builtinConstants = (
+ "NULL|true|false|TRUE|FALSE|nullptr"
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword.control" : keywordControls,
+ "storage.type" : storageType,
+ "storage.modifier" : storageModifiers,
+ "keyword.operator" : keywordOperators,
+ "variable.language": "this",
+ "constant.language": builtinConstants
+ }, "identifier");
+
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "//",
+ next : "singleLineComment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ }, {
+ token : "keyword", // pre-compiler directives
+ regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
+ next : "directive"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
+ }, {
+ token : "support.function.C99.c",
+ regex : cFunctions
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "singleLineComment" : [
+ {
+ token : "comment",
+ regex : /\\$/,
+ next : "singleLineComment"
+ }, {
+ token : "comment",
+ regex : /$/,
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }
+ ],
+ "directive" : [
+ {
+ token : "constant.other.multiline",
+ regex : /\\/
+ },
+ {
+ token : "constant.other.multiline",
+ regex : /.*\\/
+ },
+ {
+ token : "constant.other",
+ regex : "\\s*<.+?>",
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",
+ next : "start"
+ },
+ {
+ token : "constant.other",
+ regex : /[^\\\/]+/,
+ next : "start"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(c_cppHighlightRules, TextHighlightRules);
+
+exports.c_cppHighlightRules = c_cppHighlightRules;
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = c_cppHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/c_cpp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/protobuf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+ "use strict";
+
+ var oop = require("../lib/oop");
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+ var ProtobufHighlightRules = function() {
+
+ var builtinTypes = "double|float|int32|int64|uint32|uint64|sint32|" +
+ "sint64|fixed32|fixed64|sfixed32|sfixed64|bool|" +
+ "string|bytes";
+ var keywordDeclaration = "message|required|optional|repeated|package|" +
+ "import|option|enum";
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword.declaration.protobuf": keywordDeclaration,
+ "support.type": builtinTypes
+ }, "identifier");
+
+ this.$rules = {
+ "start": [{
+ token: "comment",
+ regex: /\/\/.*$/
+ }, {
+ token: "comment",
+ regex: /\/\*/,
+ next: "comment"
+ }, {
+ token: "constant",
+ regex: "<[^>]+>"
+ }, {
+ regex: "=",
+ token: "keyword.operator.assignment.protobuf"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : '[\'](?:(?:\\\\.)|(?:[^\'\\\\]))*?[\']'
+ }, {
+ token: "constant.numeric", // hex
+ regex: "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token: "constant.numeric", // float
+ regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token: keywordMapper,
+ regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }],
+ "comment": [{
+ token: "comment", // closing comment
+ regex: ".*?\\*\\/",
+ next: "start"
+ }, {
+ token: "comment", // comment spanning whole line
+ regex: ".+"
+ }]
+ };
+
+ this.normalizeRules();
+ };
+
+ oop.inherits(ProtobufHighlightRules, TextHighlightRules);
+
+ exports.ProtobufHighlightRules = ProtobufHighlightRules;
+});
+
+ace.define("ace/mode/protobuf",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/protobuf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var CMode = require("./c_cpp").Mode;
+var ProtobufHighlightRules = require("./protobuf_highlight_rules").ProtobufHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ CMode.call(this);
+ this.foldingRules = new CStyleFoldMode();
+ this.HighlightRules = ProtobufHighlightRules;
+};
+oop.inherits(Mode, CMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/protobuf";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-python.js b/js/vendor/ace/src-noconflict/mode-python.js
index bfdf2d5..bd9c647 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-python.js
+++ b/js/vendor/ace/src-noconflict/mode-python.js
@@ -1,117 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/python', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/python_highlight_rules', 'ace/mode/folding/pythonic', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
-var PythonFoldMode = require("./folding/pythonic").FoldMode;
-var Range = require("../range").Range;
-
-var Mode = function() {
- var highlighter = new PythonHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new PythonFoldMode("\\:");
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "#";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[\:]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- var outdents = {
- "pass": 1,
- "return": 1,
- "raise": 1,
- "break": 1,
- "continue": 1
- };
-
- this.checkOutdent = function(state, line, input) {
- if (input !== "\r\n" && input !== "\r" && input !== "\n")
- return false;
-
- var tokens = this.$tokenizer.getLineTokens(line.trim(), state).tokens;
-
- if (!tokens)
- return false;
- do {
- var last = tokens.pop();
- } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
-
- if (!last)
- return false;
-
- return (last.type == "keyword" && outdents[last.value]);
- };
-
- this.autoOutdent = function(state, doc, row) {
-
- row += 1;
- var indent = this.$getIndent(doc.getLine(row));
- var tab = doc.getTabString();
- if (indent.slice(-tab.length) == tab)
- doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/python_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -266,8 +154,8 @@ oop.inherits(PythonHighlightRules, TextHighlightRules);
exports.PythonHighlightRules = PythonHighlightRules;
});
-ace.define('ace/mode/folding/pythonic', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -294,3 +182,83 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
+var PythonFoldMode = require("./folding/pythonic").FoldMode;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = PythonHighlightRules;
+ this.foldingRules = new PythonFoldMode("\\:");
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ var outdents = {
+ "pass": 1,
+ "return": 1,
+ "raise": 1,
+ "break": 1,
+ "continue": 1
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input !== "\r\n" && input !== "\r" && input !== "\n")
+ return false;
+
+ var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens)
+ return false;
+ do {
+ var last = tokens.pop();
+ } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
+
+ if (!last)
+ return false;
+
+ return (last.type == "keyword" && outdents[last.value]);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+
+ row += 1;
+ var indent = this.$getIndent(doc.getLine(row));
+ var tab = doc.getTabString();
+ if (indent.slice(-tab.length) == tab)
+ doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ };
+
+ this.$id = "ace/mode/python";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-r.js b/js/vendor/ace/src-noconflict/mode-r.js
index f39de3f..7953838 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-r.js
+++ b/js/vendor/ace/src-noconflict/mode-r.js
@@ -1,46 +1,84 @@
-/*
- * r.js
- *
- * Copyright (C) 2009-11 by RStudio, Inc.
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * This program is licensed to you under the terms of version 3 of the
- * GNU Affero General Public License. This program is distributed WITHOUT
- * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
- * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
- *
- */
-ace.define('ace/mode/r', ['require', 'exports', 'module' , 'ace/range', 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/r_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/unicode'], function(require, exports, module) {
-
+ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
- var Range = require("../range").Range;
- var oop = require("../lib/oop");
- var TextMode = require("./text").Mode;
- var Tokenizer = require("../tokenizer").Tokenizer;
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- var RHighlightRules = require("./r_highlight_rules").RHighlightRules;
- var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
- var unicode = require("../unicode");
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- var Mode = function()
- {
- this.$tokenizer = new Tokenizer(new RHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- };
- oop.inherits(Mode, TextMode);
+var TexHighlightRules = function(textClass) {
- (function()
- {
- this.lineCommentStart = "#";
- }).call(Mode.prototype);
- exports.Mode = Mode;
+ if (!textClass)
+ textClass = "text";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : textClass, // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",
+ next : "nospell"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])}]"
+ }, {
+ token : textClass,
+ regex : "\\s+"
+ }
+ ],
+ "nospell" : [
+ {
+ token : "comment",
+ regex : "%.*$",
+ next : "start"
+ }, {
+ token : "nospell." + textClass, // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",
+ next : "start"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "}",
+ next : "start"
+ }, {
+ token : "nospell." + textClass,
+ regex : "\\s+"
+ }, {
+ token : "nospell." + textClass,
+ regex : "\\w+"
+ }
+ ]
+ };
+};
+
+oop.inherits(TexHighlightRules, TextHighlightRules);
+
+exports.TexHighlightRules = TexHighlightRules;
});
-ace.define('ace/mode/r_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/tex_highlight_rules'], function(require, exports, module) {
+
+ace.define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"], function(require, exports, module)
+{
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -196,87 +234,9 @@ ace.define('ace/mode/r_highlight_rules', ['require', 'exports', 'module' , 'ace/
exports.RHighlightRules = RHighlightRules;
});
-ace.define('ace/mode/tex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var TexHighlightRules = function(textClass) {
-
- if (!textClass)
- textClass = "text";
-
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "%.*$"
- }, {
- token : textClass, // non-command
- regex : "\\\\[$&%#\\{\\}]"
- }, {
- token : "keyword", // command
- regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",
- next : "nospell"
- }, {
- token : "keyword", // command
- regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"
- }, {
- token : "paren.keyword.operator",
- regex : "[[({]"
- }, {
- token : "paren.keyword.operator",
- regex : "[\\])}]"
- }, {
- token : textClass,
- regex : "\\s+"
- }
- ],
- "nospell" : [
- {
- token : "comment",
- regex : "%.*$",
- next : "start"
- }, {
- token : "nospell." + textClass, // non-command
- regex : "\\\\[$&%#\\{\\}]"
- }, {
- token : "keyword", // command
- regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"
- }, {
- token : "keyword", // command
- regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",
- next : "start"
- }, {
- token : "paren.keyword.operator",
- regex : "[[({]"
- }, {
- token : "paren.keyword.operator",
- regex : "[\\])]"
- }, {
- token : "paren.keyword.operator",
- regex : "}",
- next : "start"
- }, {
- token : "nospell." + textClass,
- regex : "\\s+"
- }, {
- token : "nospell." + textClass,
- regex : "\\w+"
- }
- ]
- };
-};
-
-oop.inherits(TexHighlightRules, TextHighlightRules);
-
-exports.TexHighlightRules = TexHighlightRules;
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -314,3 +274,29 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
+
+ace.define("ace/mode/r",["require","exports","module","ace/range","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/r_highlight_rules","ace/mode/matching_brace_outdent","ace/unicode"], function(require, exports, module) {
+ "use strict";
+
+ var Range = require("../range").Range;
+ var oop = require("../lib/oop");
+ var TextMode = require("./text").Mode;
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+ var RHighlightRules = require("./r_highlight_rules").RHighlightRules;
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+ var unicode = require("../unicode");
+
+ var Mode = function()
+ {
+ this.HighlightRules = RHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ };
+ oop.inherits(Mode, TextMode);
+
+ (function()
+ {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/r";
+ }).call(Mode.prototype);
+ exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-rdoc.js b/js/vendor/ace/src-noconflict/mode-rdoc.js
index f1bd9e9..98d2a27 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-rdoc.js
+++ b/js/vendor/ace/src-noconflict/mode-rdoc.js
@@ -1,41 +1,69 @@
-/*
- * rdoc.js
- *
- * Copyright (C) 2009-11 by RStudio, Inc.
- *
- * This program is licensed to you under the terms of version 3 of the
- * GNU Affero General Public License. This program is distributed WITHOUT
- * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
- * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
- *
- */
-ace.define('ace/mode/rdoc', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/rdoc_highlight_rules', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
-
+ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var RDocHighlightRules = require("./rdoc_highlight_rules").RDocHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Mode = function(suppressHighlighting) {
- this.$tokenizer = new Tokenizer(new RDocHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
-};
-oop.inherits(Mode, TextMode);
+var LatexHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [{
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : ["keyword", "lparen", "variable.parameter", "rparen", "lparen", "storage.type", "rparen"],
+ regex : "(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"
+ }, {
+ token : ["keyword","lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"
+ }, {
+ token : ["storage.type", "lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\(?:begin|end))({)(\\w*)(})"
+ }, {
+ token : "storage.type",
+ regex : "\\\\[a-zA-Z]+"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "constant.character.escape",
+ regex : "\\\\[^a-zA-Z]?"
+ }, {
+ token : "string",
+ regex : "\\${1,2}",
+ next : "equation"
+ }],
+ "equation" : [{
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : "string",
+ regex : "\\${1,2}",
+ next : "start"
+ }, {
+ token : "constant.character.escape",
+ regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
+ }, {
+ token : "error",
+ regex : "^\\s*$",
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }]
-(function() {
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
};
-}).call(Mode.prototype);
+};
+oop.inherits(LatexHighlightRules, TextHighlightRules);
+
+exports.LatexHighlightRules = LatexHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/rdoc_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/latex_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/rdoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/latex_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -110,41 +138,9 @@ oop.inherits(RDocHighlightRules, TextHighlightRules);
exports.RDocHighlightRules = RDocHighlightRules;
});
-ace.define('ace/mode/latex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var LatexHighlightRules = function() {
- this.$rules = {
- "start" : [{
- token : "keyword",
- regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "string",
- regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"
- }, {
- token : "comment",
- regex : "%.*$"
- }]
- };
-};
-
-oop.inherits(LatexHighlightRules, TextHighlightRules);
-
-exports.LatexHighlightRules = LatexHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -182,3 +178,28 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
+
+ace.define("ace/mode/rdoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/rdoc_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var RDocHighlightRules = require("./rdoc_highlight_rules").RDocHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function(suppressHighlighting) {
+ this.HighlightRules = RDocHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+ this.$id = "ace/mode/rdoc";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-rhtml.js b/js/vendor/ace/src-noconflict/mode-rhtml.js
index 1ab5fc5..e1cd79c 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-rhtml.js
+++ b/js/vendor/ace/src-noconflict/mode-rhtml.js
@@ -1,193 +1,61 @@
-/*
- * rhtml.js
- *
- * Copyright (C) 2009-11 by RStudio, Inc.
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * This program is licensed to you under the terms of version 3 of the
- * GNU Affero General Public License. This program is distributed WITHOUT
- * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
- * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
- *
- */
-
-ace.define('ace/mode/rhtml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/rhtml_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var HtmlMode = require("./html").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-
-var RHtmlHighlightRules = require("./rhtml_highlight_rules").RHtmlHighlightRules;
-
-var Mode = function(doc, session) {
- this.$session = session;
- this.$tokenizer = new Tokenizer(new RHtmlHighlightRules().getRules());
-};
-oop.inherits(Mode, HtmlMode);
-
-(function() {
- this.insertChunkInfo = {
- value: "<!--begin.rcode\n\nend.rcode-->\n",
- position: {row: 0, column: 15}
- };
-
- this.getLanguageMode = function(position)
- {
- return this.$session.getState(position.row).match(/^r-/) ? 'R' : 'HTML';
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-
-var Mode = function() {
- var highlighter = new HtmlHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$behaviour = new HtmlBehaviour();
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.blockComment = {start: "<!--", end: "-->"};
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- this.checkOutdent = function(state, line, input) {
- return false;
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
};
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-}).call(Mode.prototype);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -308,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -334,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -372,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -397,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -431,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -479,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -489,52 +400,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -573,8 +440,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -586,92 +453,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -686,6 +514,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -698,51 +527,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -751,6 +586,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -767,9 +603,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -779,15 +616,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -796,6 +631,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -812,9 +648,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -824,62 +661,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -891,13 +725,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -916,23 +817,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -945,48 +878,118 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
- var highlighter = new CssHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.HighlightRules = JavaScriptHighlightRules;
+
this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CssBehaviour();
- this.$keywordList = highlighter.$keywordList;
+ this.$behaviour = new CstyleBehaviour();
this.foldingRules = new CStyleFoldMode();
};
oop.inherits(Mode, TextMode);
(function() {
- this.foldingRules = "cStyle";
+ this.lineCommentStart = "//";
this.blockComment = {start: "/*", end: "*/"};
this.getNextLineIndent = function(state, line, tab) {
var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
if (tokens.length && tokens[tokens.length-1].type == "comment") {
return indent;
}
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
}
return indent;
@@ -1001,11 +1004,11 @@ oop.inherits(Mode, TextMode);
};
this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
worker.attachToDocument(session.getDocument());
- worker.on("csslint", function(e) {
- session.setAnnotations(e.data);
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
});
worker.on("terminate", function() {
@@ -1015,23 +1018,23 @@ oop.inherits(Mode, TextMode);
return worker;
};
+ this.$id = "ace/mode/javascript";
}).call(Mode.prototype);
exports.Mode = Mode;
-
});
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -1165,8 +1168,8 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -1244,160 +1247,152 @@ oop.inherits(CssBehaviour, CstyleBehaviour);
exports.CssBehaviour = CssBehaviour;
});
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
+(function() {
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
-};
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+ return indent;
+ };
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+});
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -1405,75 +1400,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
}, {
- include : "string"
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -1486,18 +1491,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -1505,14 +1509,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -1524,258 +1528,253 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
};
-});
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
-var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var Behaviour = require("../behaviour").Behaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
+var lang = require("../../lib/lang");
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
-var HtmlBehaviour = function () {
+var XmlBehaviour = function () {
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
var token = iterator.getCurrentToken();
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var element = token.value;
- if (atCursor){
- var element = element.substring(0, position.column - token.start);
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
}
- if (voidElements.indexOf(element) !== -1){
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
}
- return {
- text: '>' + '</' + element + '>',
- selection: [1, 1]
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
}
}
});
-}
-oop.inherits(HtmlBehaviour, XmlBehaviour);
-
-exports.HtmlBehaviour = HtmlBehaviour;
-});
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
});
- return hasType;
-}
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
if (text == '>') {
var position = editor.getCursorPosition();
var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
+ if (is(token, "reference.attribute-value"))
return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
}
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
}
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
return {
- text: '>' + '</' + tag + '>',
+ text: ">" + "</" + element + ">",
selection: [1, 1]
- }
+ };
}
});
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
if (text == "\n") {
var cursor = editor.getCursorPosition();
var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
}
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-exports.XmlBehaviour = XmlBehaviour;
-});
+ if (!token) {
+ return;
+ }
-ace.define('ace/mode/folding/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
-var oop = require("../../lib/oop");
-var MixedFoldMode = require("./mixed").FoldMode;
-var XmlFoldMode = require("./xml").FoldMode;
-var CStyleFoldMode = require("./cstyle").FoldMode;
-
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
- "js-": new CStyleFoldMode(),
- "css-": new CStyleFoldMode()
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
});
+
};
-oop.inherits(FoldMode, MixedFoldMode);
+oop.inherits(XmlBehaviour, Behaviour);
+exports.XmlBehaviour = XmlBehaviour;
});
-ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -1828,8 +1827,8 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var lang = require("../../lib/lang");
@@ -1837,91 +1836,118 @@ var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var FoldMode = exports.FoldMode = function(voidElements) {
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
BaseFoldMode.call(this);
this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
};
oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
(function() {
this.getFoldWidget = function(session, foldStyle, row) {
var tag = this._getFirstTagInLine(session, row);
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ if (!tag)
return "";
- if (tag.selfClosing)
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
return "";
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
return "";
return "start";
};
-
this._getFirstTagInLine = function(session, row) {
var tokens = session.getTokens(row);
- var value = "";
+ var tag = new Tag();
+
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
- if (token.type.lastIndexOf("meta.tag", 0) === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
}
-
- return this._parseTag(value);
+
+ return null;
};
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = tag.match(this.tagRe);
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
var column = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
};
this._readTagForward = function(iterator) {
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var start;
-
+
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
}
} while(token = iterator.stepForward());
-
+
return null;
};
@@ -1929,32 +1955,24 @@ oop.inherits(FoldMode, BaseFoldMode);
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var end;
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
}
} while(token = iterator.stepBackward());
-
+
return null;
};
@@ -1965,10 +1983,7 @@ oop.inherits(FoldMode, BaseFoldMode);
if (!tag || top.tagName == tag.tagName) {
return stack.pop();
}
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
stack.pop();
continue;
} else {
@@ -1980,7 +1995,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.getFoldWidgetRange = function(session, foldStyle, row) {
var firstTag = this._getFirstTagInLine(session, row);
- if (!firstTag.match)
+ if (!firstTag)
return null;
var isBackward = firstTag.closing || firstTag.selfClosing;
@@ -1988,11 +2003,13 @@ oop.inherits(FoldMode, BaseFoldMode);
var tag;
if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
var start = {
row: row,
- column: firstTag.column + firstTag.tagName.length + 2
+ column: firstTag.start.column + firstTag.tagName.length + 2
};
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
while (tag = this._readTagForward(iterator)) {
if (tag.selfClosing) {
if (!stack.length) {
@@ -2009,15 +2026,15 @@ oop.inherits(FoldMode, BaseFoldMode);
return Range.fromPoints(start, tag.start);
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
var end = {
row: row,
- column: firstTag.column
+ column: firstTag.start.column
};
while (tag = this._readTagBackward(iterator)) {
@@ -2034,11 +2051,13 @@ oop.inherits(FoldMode, BaseFoldMode);
this._pop(stack, tag);
if (stack.length == 0) {
tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
return Range.fromPoints(tag.start, end);
}
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
@@ -2048,36 +2067,454 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/rhtml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/r_highlight_rules', 'ace/mode/html_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var RHighlightRules = require("./r_highlight_rules").RHighlightRules;
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
-var RHtmlHighlightRules = function() {
- HtmlHighlightRules.call(this);
+(function() {
- this.$rules["start"].unshift({
- token: "support.function.codebegin",
- regex: "^<" + "!--\\s*begin.rcode\\s*(?:.*)",
- next: "r-start"
- });
+ this.blockComment = {start: "<!--", end: "-->"};
- this.embedRules(RHighlightRules, "r-", [{
- token: "support.function.codeend",
- regex: "^\\s*end.rcode\\s*-->",
- next: "start"
- }], ["start"]);
+ this.voidElements = lang.arrayToMap(voidElements);
- this.normalizeRules();
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var TexHighlightRules = function(textClass) {
+
+ if (!textClass)
+ textClass = "text";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : textClass, // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",
+ next : "nospell"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])}]"
+ }, {
+ token : textClass,
+ regex : "\\s+"
+ }
+ ],
+ "nospell" : [
+ {
+ token : "comment",
+ regex : "%.*$",
+ next : "start"
+ }, {
+ token : "nospell." + textClass, // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",
+ next : "start"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "}",
+ next : "start"
+ }, {
+ token : "nospell." + textClass,
+ regex : "\\s+"
+ }, {
+ token : "nospell." + textClass,
+ regex : "\\w+"
+ }
+ ]
+ };
};
-oop.inherits(RHtmlHighlightRules, TextHighlightRules);
-exports.RHtmlHighlightRules = RHtmlHighlightRules;
+oop.inherits(TexHighlightRules, TextHighlightRules);
+
+exports.TexHighlightRules = TexHighlightRules;
});
-ace.define('ace/mode/r_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/tex_highlight_rules'], function(require, exports, module) {
+
+ace.define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"], function(require, exports, module)
+{
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -2233,81 +2670,65 @@ ace.define('ace/mode/r_highlight_rules', ['require', 'exports', 'module' , 'ace/
exports.RHighlightRules = RHighlightRules;
});
-ace.define('ace/mode/tex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/rhtml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/r_highlight_rules","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var lang = require("../lib/lang");
+var RHighlightRules = require("./r_highlight_rules").RHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var TexHighlightRules = function(textClass) {
+var RHtmlHighlightRules = function() {
+ HtmlHighlightRules.call(this);
- if (!textClass)
- textClass = "text";
+ this.$rules["start"].unshift({
+ token: "support.function.codebegin",
+ regex: "^<" + "!--\\s*begin.rcode\\s*(?:.*)",
+ next: "r-start"
+ });
- this.$rules = {
- "start" : [
- {
- token : "comment",
- regex : "%.*$"
- }, {
- token : textClass, // non-command
- regex : "\\\\[$&%#\\{\\}]"
- }, {
- token : "keyword", // command
- regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",
- next : "nospell"
- }, {
- token : "keyword", // command
- regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"
- }, {
- token : "paren.keyword.operator",
- regex : "[[({]"
- }, {
- token : "paren.keyword.operator",
- regex : "[\\])}]"
- }, {
- token : textClass,
- regex : "\\s+"
- }
- ],
- "nospell" : [
- {
- token : "comment",
- regex : "%.*$",
- next : "start"
- }, {
- token : "nospell." + textClass, // non-command
- regex : "\\\\[$&%#\\{\\}]"
- }, {
- token : "keyword", // command
- regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"
- }, {
- token : "keyword", // command
- regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",
- next : "start"
- }, {
- token : "paren.keyword.operator",
- regex : "[[({]"
- }, {
- token : "paren.keyword.operator",
- regex : "[\\])]"
- }, {
- token : "paren.keyword.operator",
- regex : "}",
- next : "start"
- }, {
- token : "nospell." + textClass,
- regex : "\\s+"
- }, {
- token : "nospell." + textClass,
- regex : "\\w+"
- }
- ]
- };
+ this.embedRules(RHighlightRules, "r-", [{
+ token: "support.function.codeend",
+ regex: "^\\s*end.rcode\\s*-->",
+ next: "start"
+ }], ["start"]);
+
+ this.normalizeRules();
};
+oop.inherits(RHtmlHighlightRules, TextHighlightRules);
-oop.inherits(TexHighlightRules, TextHighlightRules);
+exports.RHtmlHighlightRules = RHtmlHighlightRules;
+});
-exports.TexHighlightRules = TexHighlightRules;
+ace.define("ace/mode/rhtml",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/rhtml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+
+var RHtmlHighlightRules = require("./rhtml_highlight_rules").RHtmlHighlightRules;
+
+var Mode = function(doc, session) {
+ HtmlMode.call(this);
+ this.$session = session;
+ this.HighlightRules = RHtmlHighlightRules;
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.insertChunkInfo = {
+ value: "<!--begin.rcode\n\nend.rcode-->\n",
+ position: {row: 0, column: 15}
+ };
+
+ this.getLanguageMode = function(position)
+ {
+ return this.$session.getState(position.row).match(/^r-/) ? 'R' : 'HTML';
+ };
+
+ this.$id = "ace/mode/rhtml";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
});
diff --git a/js/vendor/ace/src-noconflict/mode-ruby.js b/js/vendor/ace/src-noconflict/mode-ruby.js
index f6cdd20..3722f27 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-ruby.js
+++ b/js/vendor/ace/src-noconflict/mode-ruby.js
@@ -1,100 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/ruby', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ruby_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/folding/coffee'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var FoldMode = require("./folding/coffee").FoldMode;
-
-var Mode = function() {
- var highlighter = new RubyHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new FoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.lineCommentStart = "#";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- var startingClassOrMethod = line.match(/^\s*(class|def)\s.*$/);
- var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
- var startingConditional = line.match(/^\s*(if|else)\s*/)
- if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return /^\s+end$/.test(line + input) || /^\s+}$/.test(line + input) || /^\s+else$/.test(line + input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- var indent = this.$getIndent(doc.getLine(row));
- var tab = doc.getTabString();
- if (indent.slice(-tab.length) == tab)
- doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/ruby_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -201,9 +106,70 @@ var RubyHighlightRules = function() {
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
},
- qString,
- qqString,
- tString,
+ [{
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren.lparen";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.start",
+ regex : /"/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /\#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /"/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /\#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /'/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\['\\]/
+ }, {
+ token : "string.end",
+ regex : /'/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
{
token : "text", // namespaces aren't symbols
@@ -246,11 +212,13 @@ var RubyHighlightRules = function() {
rules: {
heredoc: [{
onMatch: function(value, currentState, stack) {
- if (value == stack[1]) {
+ if (value === stack[1]) {
stack.shift();
stack.shift();
+ this.next = stack[0] || "start";
return "support.class";
}
+ this.next = "";
return "string";
},
regex: ".*$",
@@ -261,11 +229,13 @@ var RubyHighlightRules = function() {
regex: "^ +"
}, {
onMatch: function(value, currentState, stack) {
- if (value == stack[1]) {
+ if (value === stack[1]) {
stack.shift();
stack.shift();
+ this.next = stack[0] || "start";
return "support.class";
}
+ this.next = "";
return "string";
},
regex: ".*$",
@@ -273,6 +243,17 @@ var RubyHighlightRules = function() {
}]
}
}, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
+ token : "string.character",
+ regex : "\\B\\?."
+ }, {
token : "keyword.operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
}, {
@@ -306,8 +287,8 @@ oop.inherits(RubyHighlightRules, TextHighlightRules);
exports.RubyHighlightRules = RubyHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -346,8 +327,365 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -432,3 +770,74 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = RubyHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
+ var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
+ var startingConditional = line.match(/^\s*(if|else)\s*/)
+ if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, session, row) {
+ var line = session.getLine(row);
+ if (/}/.test(line))
+ return this.$outdent.autoOutdent(session, row);
+ var indent = this.$getIndent(line);
+ var prevLine = session.getLine(row - 1);
+ var prevIndent = this.$getIndent(prevLine);
+ var tab = session.getTabString();
+ if (prevIndent.length <= indent.length) {
+ if (indent.slice(-tab.length) == tab)
+ session.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ }
+ };
+
+ this.$id = "ace/mode/ruby";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-rust.js b/js/vendor/ace/src-noconflict/mode-rust.js
index 3c9e776..c83abe7 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-rust.js
+++ b/js/vendor/ace/src-noconflict/mode-rust.js
@@ -1,97 +1,62 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/rust', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/rust_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var RustHighlightRules = require("./rust_highlight_rules").RustHighlightRules;
-var FoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new RustHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "/\\*";
- this.blockComment = {start: "/*", end: "*/"};
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/rust_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/rust_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var stringEscape = /\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\})/.source;
var RustHighlightRules = function() {
this.$rules = { start:
[ { token: 'variable.other.source.rust',
regex: '\'[a-zA-Z_][a-zA-Z0-9_]*[^\\\']' },
{ token: 'string.quoted.single.source.rust',
- regex: '\'',
- push:
- [ { token: 'string.quoted.single.source.rust',
- regex: '\'',
- next: 'pop' },
- { include: '#rust_escaped_character' },
- { defaultToken: 'string.quoted.single.source.rust' } ] },
+ regex: "'(?:[^'\\\\]|" + stringEscape + ")'" },
+ {
+ stateName: "bracketedComment",
+ onMatch : function(value, currentState, stack){
+ stack.unshift(this.next, value.length - 1, currentState);
+ return "string.quoted.raw.source.rust";
+ },
+ regex : /r#*"/,
+ next : [
+ {
+ onMatch : function(value, currentState, stack) {
+ var token = "string.quoted.raw.source.rust";
+ if (value.length >= stack[1]) {
+ if (value.length > stack[1])
+ token = "invalid";
+ stack.shift();
+ stack.shift();
+ this.next = stack.shift();
+ } else {
+ this.next = "";
+ }
+ return token;
+ },
+ regex : /"#*/,
+ next : "start"
+ }, {
+ defaultToken : "string.quoted.raw.source.rust"
+ }
+ ]
+ },
{ token: 'string.quoted.double.source.rust',
regex: '"',
push:
[ { token: 'string.quoted.double.source.rust',
regex: '"',
next: 'pop' },
- { include: '#rust_escaped_character' },
+ { token: 'constant.character.escape.source.rust',
+ regex: stringEscape },
{ defaultToken: 'string.quoted.double.source.rust' } ] },
- { token: [ 'keyword.source.rust', 'meta.function.source.rust',
- 'entity.name.function.source.rust', 'meta.function.source.rust' ],
- regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_][\\w\\:,+ \\\'<>]*)(\\s*\\()' },
+ { token: [ 'keyword.source.rust', 'text', 'entity.name.function.source.rust' ],
+ regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_]*)' },
{ token: 'support.constant', regex: '\\b[a-zA-Z_][\\w\\d]*::' },
{ token: 'keyword.source.rust',
- regex: '\\b(?:as|assert|break|claim|const|copy|Copy|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' },
+ regex: '\\b(?:as|assert|break|claim|const|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' },
{ token: 'storage.type.source.rust',
- regex: '\\b(?:Self|m32|m64|m128|f80|f16|f128|int|uint|float|char|bool|u8|u16|u32|u64|f32|f64|i8|i16|i32|i64|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\b' },
+ regex: '\\b(?:Self|m32|m64|m128|f80|f16|f128|int|uint|isize|usize|float|char|bool|u8|u16|u32|u64|f32|f64|i8|i16|i32|i64|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\b' },
{ token: 'variable.language.source.rust', regex: '\\bself\\b' },
{ token: 'keyword.operator',
regex: '!|\\$|\\*|\\-\\-|\\-|\\+\\+|\\+|-->|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|,|;' },
@@ -102,11 +67,11 @@ var RustHighlightRules = function() {
{ token: 'meta.preprocessor.source.rust',
regex: '\\b\\w\\(\\w\\)*!|#\\[[\\w=\\(\\)_]+\\]\\b' },
{ token: 'constant.numeric.integer.source.rust',
- regex: '\\b(?:[0-9][0-9_]*|[0-9][0-9_]*(?:u|u8|u16|u32|u64)|[0-9][0-9_]*(?:i|i8|i16|i32|i64))\\b' },
+ regex: '\\b(?:[0-9][0-9_]*|[0-9][0-9_]*(?:u|us|u8|u16|u32|u64)|[0-9][0-9_]*(?:i|is|i8|i16|i32|i64))\\b' },
{ token: 'constant.numeric.hex.source.rust',
- regex: '\\b(?:0x[a-fA-F0-9_]+|0x[a-fA-F0-9_]+(?:u|u8|u16|u32|u64)|0x[a-fA-F0-9_]+(?:i|i8|i16|i32|i64))\\b' },
+ regex: '\\b(?:0x[a-fA-F0-9_]+|0x[a-fA-F0-9_]+(?:u|us|u8|u16|u32|u64)|0x[a-fA-F0-9_]+(?:i|is|i8|i16|i32|i64))\\b' },
{ token: 'constant.numeric.binary.source.rust',
- regex: '\\b(?:0b[01_]+|0b[01_]+(?:u|u8|u16|u32|u64)|0b[01_]+(?:i|i8|i16|i32|i64))\\b' },
+ regex: '\\b(?:0b[01_]+|0b[01_]+(?:u|us|u8|u16|u32|u64)|0b[01_]+(?:i|is|i8|i16|i32|i64))\\b' },
{ token: 'constant.numeric.float.source.rust',
regex: '[0-9][0-9_]*(?:f32|f64|f)|[0-9][0-9_]*[eE][+-]=[0-9_]+|[0-9][0-9_]*[eE][+-]=[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+|[0-9][0-9_]*\\.[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+(?:f32|f64|f)' },
{ token: 'comment.line.documentation.source.rust',
@@ -123,16 +88,17 @@ var RustHighlightRules = function() {
regex: '$',
next: 'pop' },
{ defaultToken: 'comment.line.double-dash.source.rust' } ] },
- { token: 'comment.block.source.rust',
+ { token: 'comment.start.block.source.rust',
regex: '/\\*',
+ stateName: 'comment',
push:
- [ { token: 'comment.block.source.rust',
+ [ { token: 'comment.start.block.source.rust',
+ regex: '/\\*',
+ push: 'comment' },
+ { token: 'comment.end.block.source.rust',
regex: '\\*/',
next: 'pop' },
- { defaultToken: 'comment.block.source.rust' } ] } ],
- '#rust_escaped_character':
- [ { token: 'constant.character.escape.source.rust',
- regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' } ] }
+ { defaultToken: 'comment.block.source.rust' } ] } ] }
this.normalizeRules();
};
@@ -149,8 +115,8 @@ oop.inherits(RustHighlightRules, TextHighlightRules);
exports.RustHighlightRules = RustHighlightRules;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -169,23 +135,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -198,7 +196,84 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/rust",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rust_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var RustHighlightRules = require("./rust_highlight_rules").RustHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = RustHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/rust";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-sass.js b/js/vendor/ace/src-noconflict/mode-sass.js
index 90a557d..ec994ce 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-sass.js
+++ b/js/vendor/ace/src-noconflict/mode-sass.js
@@ -1,107 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/sass', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/sass_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules;
-var FoldMode = require("./folding/coffee").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new SassHighlightRules().getRules());
- this.foldingRules = new FoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "//";
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/sass_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/scss_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
-
-var SassHighlightRules = function() {
- ScssHighlightRules.call(this);
- var start = this.$rules.start;
- if (start[1].token == "comment") {
- start.splice(1, 1, {
- onMatch: function(value, currentState, stack) {
- stack.unshift(this.next, -1, value.length - 2, currentState);
- return "comment";
- },
- regex: /^\s*\/\*/,
- next: "comment"
- }, {
- token: "error.invalid",
- regex: "/\\*|[{;}]"
- }, {
- token: "support.type",
- regex: /^\s*:[\w\-]+\s/
- });
-
- this.$rules.comment = [
- {regex: /^\s*/, onMatch: function(value, currentState, stack) {
- if (stack[1] === -1)
- stack[1] = Math.max(stack[2], value.length - 1);
- if (value.length <= stack[1]) {stack.shift();stack.shift();stack.shift();
- this.next = stack.shift();
- return "text";
- } else {
- this.next = "";
- return "comment";
- }
- }, next: "start"},
- {defaultToken: "comment"}
- ]
- }
-};
-
-oop.inherits(SassHighlightRules, ScssHighlightRules);
-
-exports.SassHighlightRules = SassHighlightRules;
-
-});
-
-ace.define('ace/mode/scss_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -354,8 +252,57 @@ exports.ScssHighlightRules = ScssHighlightRules;
});
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+ace.define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
+
+var SassHighlightRules = function() {
+ ScssHighlightRules.call(this);
+ var start = this.$rules.start;
+ if (start[1].token == "comment") {
+ start.splice(1, 1, {
+ onMatch: function(value, currentState, stack) {
+ stack.unshift(this.next, -1, value.length - 2, currentState);
+ return "comment";
+ },
+ regex: /^\s*\/\*/,
+ next: "comment"
+ }, {
+ token: "error.invalid",
+ regex: "/\\*|[{;}]"
+ }, {
+ token: "support.type",
+ regex: /^\s*:[\w\-]+\s/
+ });
+
+ this.$rules.comment = [
+ {regex: /^\s*/, onMatch: function(value, currentState, stack) {
+ if (stack[1] === -1)
+ stack[1] = Math.max(stack[2], value.length - 1);
+ if (value.length <= stack[1]) {stack.shift();stack.shift();stack.shift();
+ this.next = stack.shift();
+ return "text";
+ } else {
+ this.next = "";
+ return "comment";
+ }
+ }, next: "start"},
+ {defaultToken: "comment"}
+ ]
+ }
+};
+
+oop.inherits(SassHighlightRules, ScssHighlightRules);
+
+exports.SassHighlightRules = SassHighlightRules;
+
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -440,3 +387,26 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = SassHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.$id = "ace/mode/sass";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-scad.js b/js/vendor/ace/src-noconflict/mode-scad.js
index 9ecc921..9aa0cf3 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-scad.js
+++ b/js/vendor/ace/src-noconflict/mode-scad.js
@@ -1,108 +1,55 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/scad', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/scad_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var scadHighlightRules = require("./scad_highlight_rules").scadHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var Mode = function() {
- var highlighter = new scadHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
-}).call(Mode.prototype);
-exports.Mode = Mode;
-});
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-ace.define('ace/mode/scad_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+});
+ace.define("ace/mode/scad_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -211,52 +158,8 @@ oop.inherits(scadHighlightRules, TextHighlightRules);
exports.scadHighlightRules = scadHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -295,8 +198,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -308,92 +211,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -408,6 +272,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -420,51 +285,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -473,6 +344,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -489,9 +361,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -501,15 +374,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -518,6 +389,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -534,9 +406,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -546,62 +419,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -613,13 +483,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -638,23 +575,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -667,7 +636,131 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var scadHighlightRules = require("./scad_highlight_rules").scadHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = scadHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/scad";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-scala.js b/js/vendor/ace/src-noconflict/mode-scala.js
index 4b9c0d4..4e4a7b0 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-scala.js
+++ b/js/vendor/ace/src-noconflict/mode-scala.js
@@ -1,128 +1,61 @@
-ace.define('ace/mode/scala', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/scala_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var JavaScriptMode = require("./javascript").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules;
-
-var Mode = function() {
- JavaScriptMode.call(this);
-
- var highlighter = new ScalaHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
-};
-oop.inherits(Mode, JavaScriptMode);
-
-(function() {
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- this.createWorker = function(session) {
- return null;
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
};
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-}).call(Mode.prototype);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -243,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -269,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -307,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -332,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -366,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -414,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -424,52 +400,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -508,8 +440,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -521,92 +453,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -621,6 +514,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -633,51 +527,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -686,6 +586,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -702,9 +603,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -714,15 +616,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -731,6 +631,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -747,9 +648,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -759,62 +661,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -826,13 +725,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -851,23 +817,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -880,12 +878,154 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/scala_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/scala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
@@ -1037,3 +1177,29 @@ oop.inherits(ScalaHighlightRules, TextHighlightRules);
exports.ScalaHighlightRules = ScalaHighlightRules;
});
+
+ace.define("ace/mode/scala",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/scala_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+
+ this.HighlightRules = ScalaHighlightRules;
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.$id = "ace/mode/scala";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-scheme.js b/js/vendor/ace/src-noconflict/mode-scheme.js
index 90ce659..856b0db 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-scheme.js
+++ b/js/vendor/ace/src-noconflict/mode-scheme.js
@@ -1,64 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- * NalaGinrut@gmail.com
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/scheme', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/scheme_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var SchemeHighlightRules = require("./scheme_highlight_rules").SchemeHighlightRules;
-
-var Mode = function() {
- var highlighter = new SchemeHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = ";";
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/scheme_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/scheme_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -142,3 +83,25 @@ oop.inherits(SchemeHighlightRules, TextHighlightRules);
exports.SchemeHighlightRules = SchemeHighlightRules;
});
+
+ace.define("ace/mode/scheme",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scheme_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var SchemeHighlightRules = require("./scheme_highlight_rules").SchemeHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = SchemeHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ";";
+
+ this.$id = "ace/mode/scheme";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-scss.js b/js/vendor/ace/src-noconflict/mode-scss.js
index c671daf..3b239e2 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-scss.js
+++ b/js/vendor/ace/src-noconflict/mode-scss.js
@@ -1,88 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/scss', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/scss_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CssBehaviour = require("./behaviour/css").CssBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new ScssHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CssBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/scss_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -335,8 +252,8 @@ exports.ScssHighlightRules = ScssHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -375,87 +292,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-var CssBehaviour = function () {
-
- this.inherit(CstyleBehaviour);
-
- this.add("colon", "insertion", function (state, action, editor, session, text) {
- if (text === ':') {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- var token = iterator.getCurrentToken();
- if (token && token.value.match(/\s+/)) {
- token = iterator.stepBackward();
- }
- if (token && token.type === 'support.type') {
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar === ':') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- if (!line.substring(cursor.column).match(/^\s*;/)) {
- return {
- text: ':;',
- selection: [1, 1]
- }
- }
- }
- }
- });
-
- this.add("colon", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected === ':') {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- var token = iterator.getCurrentToken();
- if (token && token.value.match(/\s+/)) {
- token = iterator.stepBackward();
- }
- if (token && token.type === 'support.type') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar === ';') {
- range.end.column ++;
- return range;
- }
- }
- }
- });
-
- this.add("semicolon", "insertion", function (state, action, editor, session, text) {
- if (text === ';') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar === ';') {
- return {
- text: '',
- selection: [1, 1]
- }
- }
- }
- });
-
-}
-oop.inherits(CssBehaviour, CstyleBehaviour);
-
-exports.CssBehaviour = CssBehaviour;
-});
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -467,92 +305,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -567,6 +366,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -579,51 +379,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -632,6 +438,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -648,9 +455,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -660,15 +468,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -677,6 +483,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -693,9 +500,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -705,62 +513,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -772,13 +577,159 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar === ';') {
+ range.end.column ++;
+ return range;
+ }
+ }
+ }
+ });
+
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -797,23 +748,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -826,7 +809,114 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ScssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/scss";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-sh.js b/js/vendor/ace/src-noconflict/mode-sh.js
index fa7c298..28b944e 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-sh.js
+++ b/js/vendor/ace/src-noconflict/mode-sh.js
@@ -1,117 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/sh', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/sh_highlight_rules', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules;
-var Range = require("../range").Range;
-
-var Mode = function() {
- var highlighter = new ShHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-
- this.lineCommentStart = "#";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[\:]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- var outdents = {
- "pass": 1,
- "return": 1,
- "raise": 1,
- "break": 1,
- "continue": 1
- };
-
- this.checkOutdent = function(state, line, input) {
- if (input !== "\r\n" && input !== "\r" && input !== "\n")
- return false;
-
- var tokens = this.$tokenizer.getLineTokens(line.trim(), state).tokens;
-
- if (!tokens)
- return false;
- do {
- var last = tokens.pop();
- } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
-
- if (!last)
- return false;
-
- return (last.type == "keyword" && outdents[last.value]);
- };
-
- this.autoOutdent = function(state, doc, row) {
-
- row += 1;
- var indent = this.$getIndent(doc.getLine(row));
- var tab = doc.getTabString();
- if (indent.slice(-tab.length) == tab)
- doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/sh_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -150,7 +38,7 @@ var ShHighlightRules = function() {
var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
var fileDescriptor = "(?:&" + intPart + ")";
- var variableName = "[a-zA-Z][a-zA-Z0-9_]*";
+ var variableName = "[a-zA-Z_][a-zA-Z0-9_]*";
var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))";
var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))";
@@ -181,6 +69,65 @@ var ShHighlightRules = function() {
defaultToken: "string"
}]
}, {
+ regex : "<<<",
+ token : "keyword.operator"
+ }, {
+ stateName: "heredoc",
+ regex : "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",
+ onMatch : function(value, currentState, stack) {
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
+ var tokens = value.split(this.splitRegex);
+ stack.push(next, tokens[4]);
+ return [
+ {type:"constant", value: tokens[1]},
+ {type:"text", value: tokens[2]},
+ {type:"string", value: tokens[3]},
+ {type:"support.class", value: tokens[4]},
+ {type:"string", value: tokens[5]}
+ ];
+ },
+ rules: {
+ heredoc: [{
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }],
+ indentedHeredoc: [{
+ token: "string",
+ regex: "^\t+"
+ }, {
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }]
+ }
+ }, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
token : "variable.language",
regex : builtinVariable
}, {
@@ -203,7 +150,7 @@ var ShHighlightRules = function() {
regex : integer + "\\b"
}, {
token : keywordMapper,
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b"
}, {
token : "keyword.operator",
regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="
@@ -223,3 +170,583 @@ oop.inherits(ShHighlightRules, TextHighlightRules);
exports.ShHighlightRules = ShHighlightRules;
});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules;
+var Range = require("../range").Range;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+
+var Mode = function() {
+ this.HighlightRules = ShHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+ this.$behaviour = new CstyleBehaviour();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ var outdents = {
+ "pass": 1,
+ "return": 1,
+ "raise": 1,
+ "break": 1,
+ "continue": 1
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input !== "\r\n" && input !== "\r" && input !== "\n")
+ return false;
+
+ var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens)
+ return false;
+ do {
+ var last = tokens.pop();
+ } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
+
+ if (!last)
+ return false;
+
+ return (last.type == "keyword" && outdents[last.value]);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+
+ row += 1;
+ var indent = this.$getIndent(doc.getLine(row));
+ var tab = doc.getTabString();
+ if (indent.slice(-tab.length) == tab)
+ doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ };
+
+ this.$id = "ace/mode/sh";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-sjs.js b/js/vendor/ace/src-noconflict/mode-sjs.js
new file mode 100755
index 0000000..c448026
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-sjs.js
@@ -0,0 +1,1242 @@
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function(options) {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment_regex_allowed"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex"
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/sjs_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var SJSHighlightRules = function() {
+ var parent = new JavaScriptHighlightRules({noES6: true});
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ var contextAware = function(f) {
+ f.isContextAware = true;
+ return f;
+ };
+
+ var ctxBegin = function(opts) {
+ return {
+ token: opts.token,
+ regex: opts.regex,
+ next: contextAware(function(currentState, stack) {
+ if (stack.length === 0)
+ stack.unshift(currentState);
+ stack.unshift(opts.next);
+ return opts.next;
+ }),
+ };
+ };
+
+ var ctxEnd = function(opts) {
+ return {
+ token: opts.token,
+ regex: opts.regex,
+ next: contextAware(function(currentState, stack) {
+ stack.shift();
+ return stack[0] || "start";
+ }),
+ };
+ };
+
+ this.$rules = parent.$rules;
+ this.$rules.no_regex = [
+ {
+ token: "keyword",
+ regex: "(waitfor|or|and|collapse|spawn|retract)\\b"
+ },
+ {
+ token: "keyword.operator",
+ regex: "(->|=>|\\.\\.)"
+ },
+ {
+ token: "variable.language",
+ regex: "(hold|default)\\b"
+ },
+ ctxBegin({
+ token: "string",
+ regex: "`",
+ next: "bstring"
+ }),
+ ctxBegin({
+ token: "string",
+ regex: '"',
+ next: "qqstring"
+ }),
+ ctxBegin({
+ token: "string",
+ regex: '"',
+ next: "qqstring"
+ }),
+ {
+ token: ["paren.lparen", "text", "paren.rparen"],
+ regex: "(\\{)(\\s*)(\\|)",
+ next: "block_arguments",
+ }
+
+ ].concat(this.$rules.no_regex);
+
+ this.$rules.block_arguments = [
+ {
+ token: "paren.rparen",
+ regex: "\\|",
+ next: "no_regex",
+ }
+ ].concat(this.$rules.function_arguments);
+
+ this.$rules.bstring = [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ },
+ {
+ token : "string",
+ regex : "\\\\$",
+ next: "bstring"
+ },
+ ctxBegin({
+ token : "paren.lparen",
+ regex : "\\$\\{",
+ next: "string_interp"
+ }),
+ ctxBegin({
+ token : "paren.lparen",
+ regex : "\\$",
+ next: "bstring_interp_single"
+ }),
+ ctxEnd({
+ token : "string",
+ regex : "`",
+ }),
+ {
+ defaultToken: "string"
+ }
+ ];
+
+ this.$rules.qqstring = [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ },
+ {
+ token : "string",
+ regex : "\\\\$",
+ next: "qqstring",
+ },
+ ctxBegin({
+ token : "paren.lparen",
+ regex : "#\\{",
+ next: "string_interp"
+ }),
+ ctxEnd({
+ token : "string",
+ regex : '"',
+ }),
+ {
+ defaultToken: "string"
+ }
+ ];
+ var embeddableRules = [];
+ for (var i=0; i < this.$rules.no_regex.length; i++) {
+ var rule = this.$rules.no_regex[i];
+ var token = String(rule.token);
+ if (token.indexOf('paren') == -1 && (!rule.next || rule.next.isContextAware)) {
+ embeddableRules.push(rule);
+ }
+ };
+
+ this.$rules.string_interp = [
+ ctxEnd({
+ token: "paren.rparen",
+ regex: "\\}"
+ }),
+ ctxBegin({
+ token: "paren.lparen",
+ regex: '{',
+ next: "string_interp"
+ })
+ ].concat(embeddableRules);
+ this.$rules.bstring_interp_single = [
+ {
+ token: ["identifier", "paren.lparen"],
+ regex: '(\\w+)(\\()',
+ next: 'bstring_interp_single_call'
+ },
+ ctxEnd({
+ token : "identifier",
+ regex : "\\w*",
+ })
+ ];
+ this.$rules.bstring_interp_single_call = [
+ ctxBegin({
+ token: "paren.lparen",
+ regex: "\\(",
+ next: "bstring_interp_single_call"
+ }),
+ ctxEnd({
+ token: "paren.rparen",
+ regex: "\\)"
+ })
+ ].concat(embeddableRules);
+}
+oop.inherits(SJSHighlightRules, TextHighlightRules);
+
+exports.SJSHighlightRules = SJSHighlightRules;
+});
+
+ace.define("ace/mode/sjs",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/sjs_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var JSMode = require("./javascript").Mode;
+var SJSHighlightRules = require("./sjs_highlight_rules").SJSHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = SJSHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, JSMode);
+(function() {
+ this.createWorker = function(session) {
+ return null;
+ }
+ this.$id = "ace/mode/sjs";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-smarty.js b/js/vendor/ace/src-noconflict/mode-smarty.js
new file mode 100755
index 0000000..04c3a02
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-smarty.js
@@ -0,0 +1,2561 @@
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function(options) {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment_regex_allowed"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex"
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ push: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "\\}",
+ next: "pop"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "comment" : [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }],
+
+ "ruleset" : [
+ {
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "pop"
+ }, {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : ["support.function", "string", "support.function"],
+ regex : "(url\\()(.*)(\\))"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar === ';') {
+ range.end.column ++;
+ return range;
+ }
+ }
+ }
+ });
+
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
+ },
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
+ },
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
+ ],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
+ this.defaultMode = defaultMode;
+ this.subModes = subModes;
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+
+ this.$getMode = function(state) {
+ if (typeof state != "string")
+ state = state[0];
+ for (var key in this.subModes) {
+ if (state.indexOf(key) === 0)
+ return this.subModes[key];
+ }
+ return null;
+ };
+
+ this.$tryMode = function(state, session, foldStyle, row) {
+ var mode = this.$getMode(state);
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
+ };
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ return (
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
+ );
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var mode = this.$getMode(session.getState(row-1));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.$getMode(session.getState(row));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.defaultMode;
+
+ return mode.getFoldWidgetRange(session, foldStyle, row);
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return "";
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag)
+ return null;
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/smarty_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var SmartyHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+ var smartyRules = { start:
+ [ { include: '#comments' },
+ { include: '#blocks' } ],
+ '#blocks':
+ [ { token: 'punctuation.section.embedded.begin.smarty',
+ regex: '\\{%?',
+ push:
+ [ { token: 'punctuation.section.embedded.end.smarty',
+ regex: '%?\\}',
+ next: 'pop' },
+ { include: '#strings' },
+ { include: '#variables' },
+ { include: '#lang' },
+ { defaultToken: 'source.smarty' } ] } ],
+ '#comments':
+ [ { token:
+ [ 'punctuation.definition.comment.smarty',
+ 'comment.block.smarty' ],
+ regex: '(\\{%?)(\\*)',
+ push:
+ [ { token: 'comment.block.smarty', regex: '\\*%?\\}', next: 'pop' },
+ { defaultToken: 'comment.block.smarty' } ] } ],
+ '#lang':
+ [ { token: 'keyword.operator.smarty',
+ regex: '(?:!=|!|<=|>=|<|>|===|==|%|&&|\\|\\|)|\\b(?:and|or|eq|neq|ne|gte|gt|ge|lte|lt|le|not|mod)\\b' },
+ { token: 'constant.language.smarty',
+ regex: '\\b(?:TRUE|FALSE|true|false)\\b' },
+ { token: 'keyword.control.smarty',
+ regex: '\\b(?:if|else|elseif|foreach|foreachelse|section|switch|case|break|default)\\b' },
+ { token: 'variable.parameter.smarty', regex: '\\b[a-zA-Z]+=' },
+ { token: 'support.function.built-in.smarty',
+ regex: '\\b(?:capture|config_load|counter|cycle|debug|eval|fetch|include_php|include|insert|literal|math|strip|rdelim|ldelim|assign|constant|block|html_[a-z_]*)\\b' },
+ { token: 'support.function.variable-modifier.smarty',
+ regex: '\\|(?:capitalize|cat|count_characters|count_paragraphs|count_sentences|count_words|date_format|default|escape|indent|lower|nl2br|regex_replace|replace|spacify|string_format|strip_tags|strip|truncate|upper|wordwrap)' } ],
+ '#strings':
+ [ { token: 'punctuation.definition.string.begin.smarty',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.smarty',
+ regex: '\'',
+ next: 'pop' },
+ { token: 'constant.character.escape.smarty', regex: '\\\\.' },
+ { defaultToken: 'string.quoted.single.smarty' } ] },
+ { token: 'punctuation.definition.string.begin.smarty',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.smarty',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.smarty', regex: '\\\\.' },
+ { defaultToken: 'string.quoted.double.smarty' } ] } ],
+ '#variables':
+ [ { token:
+ [ 'punctuation.definition.variable.smarty',
+ 'variable.other.global.smarty' ],
+ regex: '\\b(\\$)(Smarty\\.)' },
+ { token:
+ [ 'punctuation.definition.variable.smarty',
+ 'variable.other.smarty' ],
+ regex: '(\\$)([a-zA-Z_][a-zA-Z0-9_]*)\\b' },
+ { token: [ 'keyword.operator.smarty', 'variable.other.property.smarty' ],
+ regex: '(->)([a-zA-Z_][a-zA-Z0-9_]*)\\b' },
+ { token:
+ [ 'keyword.operator.smarty',
+ 'meta.function-call.object.smarty',
+ 'punctuation.definition.variable.smarty',
+ 'variable.other.smarty',
+ 'punctuation.definition.variable.smarty' ],
+ regex: '(->)([a-zA-Z_][a-zA-Z0-9_]*)(\\()(.*?)(\\))' } ] }
+
+ var smartyStart = smartyRules.start;
+
+ for (var rule in this.$rules) {
+ this.$rules[rule].unshift.apply(this.$rules[rule], smartyStart);
+ }
+
+ Object.keys(smartyRules).forEach(function(x) {
+ if (!this.$rules[x])
+ this.$rules[x] = smartyRules[x];
+ }, this);
+
+ this.normalizeRules();
+};
+
+SmartyHighlightRules.metaData = { fileTypes: [ 'tpl' ],
+ foldingStartMarker: '\\{%?',
+ foldingStopMarker: '%?\\}',
+ name: 'Smarty',
+ scopeName: 'text.html.smarty' }
+
+
+oop.inherits(SmartyHighlightRules, HtmlHighlightRules);
+
+exports.SmartyHighlightRules = SmartyHighlightRules;
+});
+
+ace.define("ace/mode/smarty",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/smarty_highlight_rules"], function(require, exports, module) {
+ "use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var SmartyHighlightRules = require("./smarty_highlight_rules").SmartyHighlightRules;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = SmartyHighlightRules;
+};
+
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+
+ this.$id = "ace/mode/smarty";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-snippets.js b/js/vendor/ace/src-noconflict/mode-snippets.js
index 1c0d47c..e60ffa7 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-snippets.js
+++ b/js/vendor/ace/src-noconflict/mode-snippets.js
@@ -1,9 +1,95 @@
-ace.define('ace/mode/snippets', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "#")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "#")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/snippets",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var SnippetHighlightRules = function() {
@@ -84,7 +170,7 @@ var SnippetGroupHighlightRules = function() {
{onMatch: function(value, state, stack) {
stack.splice(stack.length);
return this.tokenName;
- }, tokenName: "text", regex: "^(?!\t)", next: "start"},
+ }, tokenName: "text", regex: "^(?!\t)", next: "start"}
])
};
@@ -96,103 +182,17 @@ exports.SnippetGroupHighlightRules = SnippetGroupHighlightRules;
var FoldMode = require("./folding/coffee").FoldMode;
var Mode = function() {
- var highlighter = new SnippetGroupHighlightRules();
+ this.HighlightRules = SnippetGroupHighlightRules;
this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
};
oop.inherits(Mode, TextMode);
(function() {
this.$indentWithTabs = true;
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/snippets";
}).call(Mode.prototype);
exports.Mode = Mode;
});
-
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var BaseFoldMode = require("./fold_mode").FoldMode;
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var range = this.indentationBlock(session, row);
- if (range)
- return range;
-
- var re = /\S/;
- var line = session.getLine(row);
- var startLevel = line.search(re);
- if (startLevel == -1 || line[startLevel] != "#")
- return;
-
- var startColumn = line.length;
- var maxRow = session.getLength();
- var startRow = row;
- var endRow = row;
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.search(re);
-
- if (level == -1)
- continue;
-
- if (line[level] != "#")
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var indent = line.search(/\S/);
- var next = session.getLine(row + 1);
- var prev = session.getLine(row - 1);
- var prevIndent = prev.search(/\S/);
- var nextIndent = next.search(/\S/);
-
- if (indent == -1) {
- session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
- return "";
- }
- if (prevIndent == -1) {
- if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
- session.foldWidgets[row - 1] = "";
- session.foldWidgets[row + 1] = "";
- return "start";
- }
- } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
- if (session.getLine(row - 2).search(/\S/) == -1) {
- session.foldWidgets[row - 1] = "start";
- session.foldWidgets[row + 1] = "";
- return "";
- }
- }
-
- if (prevIndent!= -1 && prevIndent < indent)
- session.foldWidgets[row - 1] = "start";
- else
- session.foldWidgets[row - 1] = "";
-
- if (indent < nextIndent)
- return "start";
- else
- return "";
- };
-
-}).call(FoldMode.prototype);
-
-});
diff --git a/js/vendor/ace/src-noconflict/mode-soy_template.js b/js/vendor/ace/src-noconflict/mode-soy_template.js
new file mode 100755
index 0000000..4491a35
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-soy_template.js
@@ -0,0 +1,2775 @@
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function(options) {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment_regex_allowed"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex"
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : "no_regex"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ push: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "\\}",
+ next: "pop"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "comment" : [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }],
+
+ "ruleset" : [
+ {
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "pop"
+ }, {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : ["support.function", "string", "support.function"],
+ regex : "(url\\()(.*)(\\))"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar === ';') {
+ range.end.column ++;
+ return range;
+ }
+ }
+ }
+ });
+
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
+ },
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
+ },
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
+ ],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
+ this.defaultMode = defaultMode;
+ this.subModes = subModes;
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+
+ this.$getMode = function(state) {
+ if (typeof state != "string")
+ state = state[0];
+ for (var key in this.subModes) {
+ if (state.indexOf(key) === 0)
+ return this.subModes[key];
+ }
+ return null;
+ };
+
+ this.$tryMode = function(state, session, foldStyle, row) {
+ var mode = this.$getMode(state);
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
+ };
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ return (
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
+ );
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var mode = this.$getMode(session.getState(row-1));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.$getMode(session.getState(row));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.defaultMode;
+
+ return mode.getFoldWidgetRange(session, foldStyle, row);
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return "";
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag)
+ return null;
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/soy_template_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var SoyTemplateHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var soyRules = { start:
+ [ { include: '#template' },
+ { include: '#if' },
+ { include: '#comment-line' },
+ { include: '#comment-block' },
+ { include: '#comment-doc' },
+ { include: '#call' },
+ { include: '#css' },
+ { include: '#param' },
+ { include: '#print' },
+ { include: '#msg' },
+ { include: '#for' },
+ { include: '#foreach' },
+ { include: '#switch' },
+ { include: '#tag' },
+ { include: 'text.html.basic' } ],
+ '#call':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.call.soy' ],
+ regex: '(\\{/?)(\\s*)(?=call|delcall)',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' },
+ { token: ['entity.name.tag.soy', 'variable.parameter.soy'],
+ regex: '(call|delcall)(\\s+[\\.\\w]+)'},
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy' ],
+ regex: '\\b(data)(\\s*)(=)' },
+ { defaultToken: 'meta.tag.call.soy' } ] } ],
+ '#comment-line':
+ [ { token:
+ [ 'comment.line.double-slash.soy',
+ 'punctuation.definition.comment.soy',
+ 'comment.line.double-slash.soy' ],
+ regex: '(\\s+)(//)(.*$)' } ],
+ '#comment-block':
+ [ { token: 'punctuation.definition.comment.begin.soy',
+ regex: '/\\*(?!\\*)',
+ push:
+ [ { token: 'punctuation.definition.comment.end.soy',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.soy' } ] } ],
+ '#comment-doc':
+ [ { token: 'punctuation.definition.comment.begin.soy',
+ regex: '/\\*\\*(?!/)',
+ push:
+ [ { token: 'punctuation.definition.comment.end.soy',
+ regex: '\\*/',
+ next: 'pop' },
+ { token: [ 'support.type.soy', 'text', 'variable.parameter.soy' ],
+ regex: '(@param|@param\\?)(\\s+)(\\w+)' },
+ { defaultToken: 'comment.block.documentation.soy' } ] } ],
+ '#css':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.css.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(css)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { token: 'support.constant.soy',
+ regex: '\\b(?:LITERAL|REFERENCE|BACKEND_SPECIFIC|GOOG)\\b' },
+ { defaultToken: 'meta.tag.css.soy' } ] } ],
+ '#for':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.for.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(for)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { token: 'keyword.operator.soy', regex: '\\bin\\b' },
+ { token: 'support.function.soy', regex: '\\brange\\b' },
+ { include: '#variable' },
+ { include: '#number' },
+ { include: '#primitive' },
+ { defaultToken: 'meta.tag.for.soy' } ] } ],
+ '#foreach':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.foreach.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(foreach)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { token: 'keyword.operator.soy', regex: '\\bin\\b' },
+ { include: '#variable' },
+ { defaultToken: 'meta.tag.foreach.soy' } ] } ],
+ '#function':
+ [ { token: 'support.function.soy',
+ regex: '\\b(?:isFirst|isLast|index|hasData|length|keys|round|floor|ceiling|min|max|randomInt)\\b' } ],
+ '#if':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.if.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(if|elseif)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#variable' },
+ { include: '#operator' },
+ { include: '#function' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' },
+ { defaultToken: 'meta.tag.if.soy' } ] } ],
+ '#namespace':
+ [ { token: [ 'entity.name.tag.soy', 'text', 'variable.parameter.soy' ],
+ regex: '(namespace|delpackage)(\\s+)([\\w\\.]+)' } ],
+ '#number': [ { token: 'constant.numeric', regex: '[\\d]+' } ],
+ '#operator':
+ [ { token: 'keyword.operator.soy',
+ regex: '==|!=|\\band\\b|\\bor\\b|\\bnot\\b|-|\\+|/|\\?:' } ],
+ '#param':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.param.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(param)',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#variable' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy' ],
+ regex: '\\b([\\w]+)(\\s*)((?::)?)' },
+ { defaultToken: 'meta.tag.param.soy' } ] } ],
+ '#primitive':
+ [ { token: 'constant.language.soy',
+ regex: '\\b(?:null|false|true)\\b' } ],
+ '#msg':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.msg.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(msg)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy' ],
+ regex: '\\b(meaning|desc)(\\s*)(=)' },
+ { defaultToken: 'meta.tag.msg.soy' } ] } ],
+ '#print':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.print.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(print)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#variable' },
+ { include: '#print-parameter' },
+ { include: '#number' },
+ { include: '#primitive' },
+ { include: '#attribute-lookup' },
+ { defaultToken: 'meta.tag.print.soy' } ] } ],
+ '#print-parameter':
+ [ { token: 'keyword.operator.soy', regex: '\\|' },
+ { token: 'variable.parameter.soy',
+ regex: 'noAutoescape|id|escapeHtml|escapeJs|insertWorkBreaks|truncate' } ],
+ '#special-character':
+ [ { token: 'support.constant.soy',
+ regex: '\\bsp\\b|\\bnil\\b|\\\\r|\\\\n|\\\\t|\\blb\\b|\\brb\\b' } ],
+ '#string-quoted-double': [ { token: 'string.quoted.double', regex: '"[^"]*"' } ],
+ '#string-quoted-single': [ { token: 'string.quoted.single', regex: '\'[^\']*\'' } ],
+ '#switch':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.switch.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(switch|case)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#variable' },
+ { include: '#function' },
+ { include: '#number' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' },
+ { defaultToken: 'meta.tag.switch.soy' } ] } ],
+ '#attribute-lookup':
+ [ { token: 'punctuation.definition.attribute-lookup.begin.soy',
+ regex: '\\[',
+ push:
+ [ { token: 'punctuation.definition.attribute-lookup.end.soy',
+ regex: '\\]',
+ next: 'pop' },
+ { include: '#variable' },
+ { include: '#function' },
+ { include: '#operator' },
+ { include: '#number' },
+ { include: '#primitive' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' } ] } ],
+ '#tag':
+ [ { token: 'punctuation.definition.tag.begin.soy',
+ regex: '\\{',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#namespace' },
+ { include: '#variable' },
+ { include: '#special-character' },
+ { include: '#tag-simple' },
+ { include: '#function' },
+ { include: '#operator' },
+ { include: '#attribute-lookup' },
+ { include: '#number' },
+ { include: '#primitive' },
+ { include: '#print-parameter' } ] } ],
+ '#tag-simple':
+ [ { token: 'entity.name.tag.soy',
+ regex: '{{\\s*(?:literal|else|ifempty|default)\\s*(?=\\})'} ],
+ '#template':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.template.soy' ],
+ regex: '(\\{/?)(\\s*)(?=template|deltemplate)',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { token: ['entity.name.tag.soy', 'text', 'entity.name.function.soy' ],
+ regex: '(template|deltemplate)(\\s+)([\\.\\w]+)',
+ originalRegex: '(?<=template|deltemplate)\\s+([\\.\\w]+)' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy',
+ 'text',
+ 'string.quoted.double.soy' ],
+ regex: '\\b(private)(\\s*)(=)(\\s*)("true"|"false")' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy',
+ 'text',
+ 'string.quoted.single.soy' ],
+ regex: '\\b(private)(\\s*)(=)(\\s*)(\'true\'|\'false\')' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy',
+ 'text',
+ 'string.quoted.double.soy' ],
+ regex: '\\b(autoescape)(\\s*)(=)(\\s*)("true"|"false"|"contextual")' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy',
+ 'text',
+ 'string.quoted.single.soy' ],
+ regex: '\\b(autoescape)(\\s*)(=)(\\s*)(\'true\'|\'false\'|\'contextual\')' },
+ { defaultToken: 'meta.tag.template.soy' } ] } ],
+ '#variable': [ { token: 'variable.other.soy', regex: '\\$[\\w\\.]+' } ] }
+
+
+ for (var i in soyRules) {
+ if (this.$rules[i]) {
+ this.$rules[i].unshift.call(this.$rules[i], soyRules[i]);
+ } else {
+ this.$rules[i] = soyRules[i];
+ }
+ }
+
+ this.normalizeRules();
+};
+
+SoyTemplateHighlightRules.metaData = { comment: 'SoyTemplate',
+ fileTypes: [ 'soy' ],
+ firstLineMatch: '\\{\\s*namespace\\b',
+ foldingStartMarker: '\\{\\s*template\\s+[^\\}]*\\}',
+ foldingStopMarker: '\\{\\s*/\\s*template\\s*\\}',
+ name: 'SoyTemplate',
+ scopeName: 'source.soy' }
+
+
+oop.inherits(SoyTemplateHighlightRules, HtmlHighlightRules);
+
+exports.SoyTemplateHighlightRules = SoyTemplateHighlightRules;
+});
+
+ace.define("ace/mode/soy_template",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/soy_template_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var SoyTemplateHighlightRules = require("./soy_template_highlight_rules").SoyTemplateHighlightRules;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = SoyTemplateHighlightRules;
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/soy_template";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-space.js b/js/vendor/ace/src-noconflict/mode-space.js
new file mode 100755
index 0000000..a790b1c
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-space.js
@@ -0,0 +1,159 @@
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "#")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "#")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/space_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var SpaceHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : "empty_line",
+ regex : / */,
+ next : "key"
+ },
+ {
+ token : "empty_line",
+ regex : /$/,
+ next : "key"
+ }
+ ],
+ "key" : [
+ {
+ token : "variable",
+ regex : /\S+/
+ },
+ {
+ token : "empty_line",
+ regex : /$/,
+ next : "start"
+ },{
+ token : "keyword.operator",
+ regex : / /,
+ next : "value"
+ }
+ ],
+ "value" : [
+ {
+ token : "keyword.operator",
+ regex : /$/,
+ next : "start"
+ },
+ {
+ token : "string",
+ regex : /[^$]/
+ }
+ ]
+ };
+
+};
+
+oop.inherits(SpaceHighlightRules, TextHighlightRules);
+
+exports.SpaceHighlightRules = SpaceHighlightRules;
+});
+
+ace.define("ace/mode/space",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/folding/coffee","ace/mode/space_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var FoldMode = require("./folding/coffee").FoldMode;
+var SpaceHighlightRules = require("./space_highlight_rules").SpaceHighlightRules;
+var Mode = function() {
+ this.HighlightRules = SpaceHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+(function() {
+
+ this.$id = "ace/mode/space";
+}).call(Mode.prototype);
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-sql.js b/js/vendor/ace/src-noconflict/mode-sql.js
index 205be4d..3dced9f 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-sql.js
+++ b/js/vendor/ace/src-noconflict/mode-sql.js
@@ -1,62 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/sql', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/sql_highlight_rules', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var SqlHighlightRules = require("./sql_highlight_rules").SqlHighlightRules;
-var Range = require("../range").Range;
-
-var Mode = function() {
- var highlighter = new SqlHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "--";
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/sql_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -65,27 +8,38 @@ var SqlHighlightRules = function() {
var keywords = (
"select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|" +
- "when|else|end|type|left|right|join|on|outer|desc|asc"
+ "when|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|" +
+ "foreign|not|references|default|null|inner|cross|natural|database|drop|grant"
);
var builtinConstants = (
- "true|false|null"
+ "true|false"
);
var builtinFunctions = (
"count|min|max|avg|sum|rank|now|coalesce"
);
+ var dataTypes = (
+ "int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|" +
+ "money|real|number|integer"
+ );
+
var keywordMapper = this.createKeywordMapper({
"support.function": builtinFunctions,
"keyword": keywords,
- "constant.language": builtinConstants
+ "constant.language": builtinConstants,
+ "storage.type": dataTypes
}, "identifier", true);
this.$rules = {
"start" : [ {
token : "comment",
regex : "--.*$"
+ }, {
+ token : "comment",
+ start : "/\\*",
+ end : "\\*/"
}, {
token : "string", // " string
regex : '".*?"'
@@ -112,6 +66,7 @@ var SqlHighlightRules = function() {
regex : "\\s+"
} ]
};
+ this.normalizeRules();
};
oop.inherits(SqlHighlightRules, TextHighlightRules);
@@ -119,3 +74,26 @@ oop.inherits(SqlHighlightRules, TextHighlightRules);
exports.SqlHighlightRules = SqlHighlightRules;
});
+ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var SqlHighlightRules = require("./sql_highlight_rules").SqlHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = SqlHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+
+ this.$id = "ace/mode/sql";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-sqlserver.js b/js/vendor/ace/src-noconflict/mode-sqlserver.js
new file mode 100755
index 0000000..30d1907
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-sqlserver.js
@@ -0,0 +1,437 @@
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/sqlserver_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var SqlServerHighlightRules = function() {
+ var logicalOperators = "ALL|AND|ANY|BETWEEN|EXISTS|IN|LIKE|NOT|OR|SOME";
+ logicalOperators += "|NULL|IS|APPLY|INNER|OUTER|LEFT|RIGHT|JOIN|CROSS"; //SSMS colors these gray too
+
+
+ var builtinFunctions = (
+ "OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|" +
+ "AVG|CHECKSUM_AGG|COUNT|COUNT_BIG|GROUPING|GROUPING_ID|MAX|MIN|STDEV|STDEVP|SUM|VAR|VARP|" +
+ "DENSE_RANK|NTILE|RANK|ROW_NUMBER" +
+ "@@DATEFIRST|@@DBTS|@@LANGID|@@LANGUAGE|@@LOCK_TIMEOUT|@@MAX_CONNECTIONS|@@MAX_PRECISION|@@NESTLEVEL|@@OPTIONS|@@REMSERVER|@@SERVERNAME|@@SERVICENAME|@@SPID|@@TEXTSIZE|@@VERSION|" +
+ "CAST|CONVERT|PARSE|TRY_CAST|TRY_CONVERT|TRY_PARSE" +
+ "@@CURSOR_ROWS|@@FETCH_STATUS|CURSOR_STATUS|" +
+ "@@DATEFIRST|@@LANGUAGE|CURRENT_TIMESTAMP|DATEADD|DATEDIFF|DATEFROMPARTS|DATENAME|DATEPART|DATETIME2FROMPARTS|DATETIMEFROMPARTS|DATETIMEOFFSETFROMPARTS|DAY|EOMONTH|GETDATE|GETUTCDATE|ISDATE|MONTH|SET DATEFIRST|SET DATEFORMAT|SET LANGUAGE|SMALLDATETIMEFROMPARTS|SP_HELPLANGUAGE|SWITCHOFFSET|SYSDATETIME|SYSDATETIMEOFFSET|SYSUTCDATETIME|TIMEFROMPARTS|TODATETIMEOFFSET|YEAR|" +
+ "CHOOSE|IIF|" +
+ "ABS|ACOS|ASIN|ATAN|ATN2|CEILING|COS|COT|DEGREES|EXP|FLOOR|LOG|LOG10|PI|POWER|RADIANS|RAND|ROUND|SIGN|SIN|SQRT|SQUARE|TAN|" +
+ "@@PROCID|APPLOCK_MODE|APPLOCK_TEST|APP_NAME|ASSEMBLYPROPERTY|COLUMNPROPERTY|COL_LENGTH|COL_NAME|DATABASEPROPERTYEX|DATABASE_PRINCIPAL_ID|DB_ID|DB_NAME|FILEGROUPPROPERTY|FILEGROUP_ID|FILEGROUP_NAME|FILEPROPERTY|FILE_ID|FILE_IDEX|FILE_NAME|FULLTEXTCATALOGPROPERTY|FULLTEXTSERVICEPROPERTY|INDEXKEY_PROPERTY|INDEXPROPERTY|INDEX_COL|OBJECTPROPERTY|OBJECTPROPERTYEX|OBJECT_DEFINITION|OBJECT_ID|OBJECT_NAME|OBJECT_SCHEMA_NAME|ORIGINAL_DB_NAME|PARSENAME|SCHEMA_ID|SCHEMA_NAME|SCOPE_IDENTITY|SERVERPROPERTY|STATS_DATE|TYPEPROPERTY|TYPE_ID|TYPE_NAME|" +
+ "CERTENCODED|CERTPRIVATEKEY|CURRENT_USER|DATABASE_PRINCIPAL_ID|HAS_PERMS_BY_NAME|IS_MEMBER|IS_ROLEMEMBER|IS_SRVROLEMEMBER|ORIGINAL_LOGIN|PERMISSIONS|PWDCOMPARE|PWDENCRYPT|SCHEMA_ID|SCHEMA_NAME|SESSION_USER|SUSER_ID|SUSER_NAME|SUSER_SID|SUSER_SNAME|SYS.FN_BUILTIN_PERMISSIONS|SYS.FN_GET_AUDIT_FILE|SYS.FN_MY_PERMISSIONS|SYSTEM_USER|USER_ID|USER_NAME|" +
+ "ASCII|CHAR|CHARINDEX|CONCAT|DIFFERENCE|FORMAT|LEN|LOWER|LTRIM|NCHAR|PATINDEX|QUOTENAME|REPLACE|REPLICATE|REVERSE|RTRIM|SOUNDEX|SPACE|STR|STUFF|SUBSTRING|UNICODE|UPPER|" +
+ "$PARTITION|@@ERROR|@@IDENTITY|@@PACK_RECEIVED|@@ROWCOUNT|@@TRANCOUNT|BINARY_CHECKSUM|CHECKSUM|CONNECTIONPROPERTY|CONTEXT_INFO|CURRENT_REQUEST_ID|ERROR_LINE|ERROR_MESSAGE|ERROR_NUMBER|ERROR_PROCEDURE|ERROR_SEVERITY|ERROR_STATE|FORMATMESSAGE|GETANSINULL|GET_FILESTREAM_TRANSACTION_CONTEXT|HOST_ID|HOST_NAME|ISNULL|ISNUMERIC|MIN_ACTIVE_ROWVERSION|NEWID|NEWSEQUENTIALID|ROWCOUNT_BIG|XACT_STATE|" +
+ "@@CONNECTIONS|@@CPU_BUSY|@@IDLE|@@IO_BUSY|@@PACKET_ERRORS|@@PACK_RECEIVED|@@PACK_SENT|@@TIMETICKS|@@TOTAL_ERRORS|@@TOTAL_READ|@@TOTAL_WRITE|FN_VIRTUALFILESTATS|" +
+ "PATINDEX|TEXTPTR|TEXTVALID|" +
+ "COALESCE|NULLIF"
+ );
+ var dataTypes = ("BIGINT|BINARY|BIT|CHAR|CURSOR|DATE|DATETIME|DATETIME2|DATETIMEOFFSET|DECIMAL|FLOAT|HIERARCHYID|IMAGE|INTEGER|INT|MONEY|NCHAR|NTEXT|NUMERIC|NVARCHAR|REAL|SMALLDATETIME|SMALLINT|SMALLMONEY|SQL_VARIANT|TABLE|TEXT|TIME|TIMESTAMP|TINYINT|UNIQUEIDENTIFIER|VARBINARY|VARCHAR|XML");
+ var builtInStoredProcedures = "sp_addextendedproc|sp_addextendedproperty|sp_addmessage|sp_addtype|sp_addumpdevice|sp_add_data_file_recover_suspect_db|sp_add_log_file_recover_suspect_db|sp_altermessage|sp_attach_db|sp_attach_single_file_db|sp_autostats|sp_bindefault|sp_bindrule|sp_bindsession|sp_certify_removable|sp_clean_db_file_free_space|sp_clean_db_free_space|sp_configure|sp_control_plan_guide|sp_createstats|sp_create_plan_guide|sp_create_plan_guide_from_handle|sp_create_removable|sp_cycle_errorlog|sp_datatype_info|sp_dbcmptlevel|sp_dbmmonitoraddmonitoring|sp_dbmmonitorchangealert|sp_dbmmonitorchangemonitoring|sp_dbmmonitordropalert|sp_dbmmonitordropmonitoring|sp_dbmmonitorhelpalert|sp_dbmmonitorhelpmonitoring|sp_dbmmonitorresults|sp_db_increased_partitions|sp_delete_backuphistory|sp_depends|sp_describe_first_result_set|sp_describe_undeclared_parameters|sp_detach_db|sp_dropdevice|sp_dropextendedproc|sp_dropextendedproperty|sp_dropmessage|sp_droptype|sp_execute|sp_executesql|sp_getapplock|sp_getbindtoken|sp_help|sp_helpconstraint|sp_helpdb|sp_helpdevice|sp_helpextendedproc|sp_helpfile|sp_helpfilegroup|sp_helpindex|sp_helplanguage|sp_helpserver|sp_helpsort|sp_helpstats|sp_helptext|sp_helptrigger|sp_indexoption|sp_invalidate_textptr|sp_lock|sp_monitor|sp_prepare|sp_prepexec|sp_prepexecrpc|sp_procoption|sp_recompile|sp_refreshview|sp_releaseapplock|sp_rename|sp_renamedb|sp_resetstatus|sp_sequence_get_range|sp_serveroption|sp_setnetname|sp_settriggerorder|sp_spaceused|sp_tableoption|sp_unbindefault|sp_unbindrule|sp_unprepare|sp_updateextendedproperty|sp_updatestats|sp_validname|sp_who|sys.sp_merge_xtp_checkpoint_files|sys.sp_xtp_bind_db_resource_pool|sys.sp_xtp_checkpoint_force_garbage_collection|sys.sp_xtp_control_proc_exec_stats|sys.sp_xtp_control_query_exec_stats|sys.sp_xtp_unbind_db_resource_pool";
+ var keywords = "ABSOLUTE|ACTION|ADA|ADD|ADMIN|AFTER|AGGREGATE|ALIAS|ALL|ALLOCATE|ALTER|AND|ANY|ARE|ARRAY|AS|ASC|ASENSITIVE|ASSERTION|ASYMMETRIC|AT|ATOMIC|AUTHORIZATION|BACKUP|BEFORE|BEGIN|BETWEEN|BIT_LENGTH|BLOB|BOOLEAN|BOTH|BREADTH|BREAK|BROWSE|BULK|BY|CALL|CALLED|CARDINALITY|CASCADE|CASCADED|CASE|CATALOG|CHARACTER|CHARACTER_LENGTH|CHAR_LENGTH|CHECK|CHECKPOINT|CLASS|CLOB|CLOSE|CLUSTERED|COALESCE|COLLATE|COLLATION|COLLECT|COLUMN|COMMIT|COMPLETION|COMPUTE|CONDITION|CONNECT|CONNECTION|CONSTRAINT|CONSTRAINTS|CONSTRUCTOR|CONTAINS|CONTAINSTABLE|CONTINUE|CORR|CORRESPONDING|COVAR_POP|COVAR_SAMP|CREATE|CROSS|CUBE|CUME_DIST|CURRENT|CURRENT_CATALOG|CURRENT_DATE|CURRENT_DEFAULT_TRANSFORM_GROUP|CURRENT_PATH|CURRENT_ROLE|CURRENT_SCHEMA|CURRENT_TIME|CURRENT_TRANSFORM_GROUP_FOR_TYPE|CYCLE|DATA|DATABASE|DBCC|DEALLOCATE|DEC|DECLARE|DEFAULT|DEFERRABLE|DEFERRED|DELETE|DENY|DEPTH|DEREF|DESC|DESCRIBE|DESCRIPTOR|DESTROY|DESTRUCTOR|DETERMINISTIC|DIAGNOSTICS|DICTIONARY|DISCONNECT|DISK|DISTINCT|DISTRIBUTED|DOMAIN|DOUBLE|DROP|DUMP|DYNAMIC|EACH|ELEMENT|ELSE|END|END-EXEC|EQUALS|ERRLVL|ESCAPE|EVERY|EXCEPT|EXCEPTION|EXEC|EXECUTE|EXISTS|EXIT|EXTERNAL|EXTRACT|FETCH|FILE|FILLFACTOR|FILTER|FIRST|FOR|FOREIGN|FORTRAN|FOUND|FREE|FREETEXT|FREETEXTTABLE|FROM|FULL|FULLTEXTTABLE|FUNCTION|FUSION|GENERAL|GET|GLOBAL|GO|GOTO|GRANT|GROUP|HAVING|HOLD|HOLDLOCK|HOST|HOUR|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IGNORE|IMMEDIATE|IN|INCLUDE|INDEX|INDICATOR|INITIALIZE|INITIALLY|INNER|INOUT|INPUT|INSENSITIVE|INSERT|INTEGER|INTERSECT|INTERSECTION|INTERVAL|INTO|IS|ISOLATION|ITERATE|JOIN|KEY|KILL|LANGUAGE|LARGE|LAST|LATERAL|LEADING|LESS|LEVEL|LIKE|LIKE_REGEX|LIMIT|LINENO|LN|LOAD|LOCAL|LOCALTIME|LOCALTIMESTAMP|LOCATOR|MAP|MATCH|MEMBER|MERGE|METHOD|MINUTE|MOD|MODIFIES|MODIFY|MODULE|MULTISET|NAMES|NATIONAL|NATURAL|NCLOB|NEW|NEXT|NO|NOCHECK|NONCLUSTERED|NONE|NORMALIZE|NOT|NULL|NULLIF|OBJECT|OCCURRENCES_REGEX|OCTET_LENGTH|OF|OFF|OFFSETS|OLD|ON|ONLY|OPEN|OPERATION|OPTION|OR|ORDER|ORDINALITY|OUT|OUTER|OUTPUT|OVER|OVERLAPS|OVERLAY|PAD|PARAMETER|PARAMETERS|PARTIAL|PARTITION|PASCAL|PATH|PERCENT|PERCENTILE_CONT|PERCENTILE_DISC|PERCENT_RANK|PIVOT|PLAN|POSITION|POSITION_REGEX|POSTFIX|PRECISION|PREFIX|PREORDER|PREPARE|PRESERVE|PRIMARY|PRINT|PRIOR|PRIVILEGES|PROC|PROCEDURE|PUBLIC|RAISERROR|RANGE|READ|READS|READTEXT|RECONFIGURE|RECURSIVE|REF|REFERENCES|REFERENCING|REGR_AVGX|REGR_AVGY|REGR_COUNT|REGR_INTERCEPT|REGR_R2|REGR_SLOPE|REGR_SXX|REGR_SXY|REGR_SYY|RELATIVE|RELEASE|REPLICATION|RESTORE|RESTRICT|RESULT|RETURN|RETURNS|REVERT|REVOKE|ROLE|ROLLBACK|ROLLUP|ROUTINE|ROW|ROWCOUNT|ROWGUIDCOL|ROWS|RULE|SAVE|SAVEPOINT|SCHEMA|SCOPE|SCROLL|SEARCH|SECOND|SECTION|SECURITYAUDIT|SELECT|SEMANTICKEYPHRASETABLE|SEMANTICSIMILARITYDETAILSTABLE|SEMANTICSIMILARITYTABLE|SENSITIVE|SEQUENCE|SESSION|SET|SETS|SETUSER|SHUTDOWN|SIMILAR|SIZE|SOME|SPECIFIC|SPECIFICTYPE|SQL|SQLCA|SQLCODE|SQLERROR|SQLEXCEPTION|SQLSTATE|SQLWARNING|START|STATE|STATEMENT|STATIC|STATISTICS|STDDEV_POP|STDDEV_SAMP|STRUCTURE|SUBMULTISET|SUBSTRING_REGEX|SYMMETRIC|SYSTEM|TABLESAMPLE|TEMPORARY|TERMINATE|TEXTSIZE|THAN|THEN|TIMEZONE_HOUR|TIMEZONE_MINUTE|TO|TOP|TRAILING|TRAN|TRANSACTION|TRANSLATE|TRANSLATE_REGEX|TRANSLATION|TREAT|TRIGGER|TRIM|TRUNCATE|TSEQUAL|UESCAPE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNPIVOT|UPDATE|UPDATETEXT|USAGE|USE|USER|USING|VALUE|VALUES|VARIABLE|VARYING|VAR_POP|VAR_SAMP|VIEW|WAITFOR|WHEN|WHENEVER|WHERE|WHILE|WIDTH_BUCKET|WINDOW|WITH|WITHIN|WITHIN GROUP|WITHOUT|WORK|WRITE|WRITETEXT|XMLAGG|XMLATTRIBUTES|XMLBINARY|XMLCAST|XMLCOMMENT|XMLCONCAT|XMLDOCUMENT|XMLELEMENT|XMLEXISTS|XMLFOREST|XMLITERATE|XMLNAMESPACES|XMLPARSE|XMLPI|XMLQUERY|XMLSERIALIZE|XMLTABLE|XMLTEXT|XMLVALIDATE|ZONE";
+ keywords += "|KEEPIDENTITY|KEEPDEFAULTS|IGNORE_CONSTRAINTS|IGNORE_TRIGGERS|XLOCK|FORCESCAN|FORCESEEK|HOLDLOCK|NOLOCK|NOWAIT|PAGLOCK|READCOMMITTED|READCOMMITTEDLOCK|READPAST|READUNCOMMITTED|REPEATABLEREAD|ROWLOCK|SERIALIZABLE|SNAPSHOT|SPATIAL_WINDOW_MAX_CELLS|TABLOCK|TABLOCKX|UPDLOCK|XLOCK|IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX|EXPAND|VIEWS|FAST|FORCE|KEEP|KEEPFIXED|MAXDOP|MAXRECURSION|OPTIMIZE|PARAMETERIZATION|SIMPLE|FORCED|RECOMPILE|ROBUST|PLAN|SPATIAL_WINDOW_MAX_CELLS|NOEXPAND|HINT";
+ keywords += "|LOOP|HASH|MERGE|REMOTE";
+ keywords += "|TRY|CATCH|THROW";
+ keywords += "|TYPE";
+ keywords = keywords.split('|');
+ keywords = keywords.filter(function(value, index, self) {
+ return logicalOperators.split('|').indexOf(value) === -1 && builtinFunctions.split('|').indexOf(value) === -1 && dataTypes.split('|').indexOf(value) === -1;
+ });
+ keywords = keywords.sort().join('|');
+
+
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language": logicalOperators,
+ "storage.type": dataTypes,
+ "support.function": builtinFunctions,
+ "support.storedprocedure": builtInStoredProcedures,
+ "keyword": keywords,
+ }, "identifier", true);
+ var setStatements = "SET ANSI_DEFAULTS|SET ANSI_NULLS|SET ANSI_NULL_DFLT_OFF|SET ANSI_NULL_DFLT_ON|SET ANSI_PADDING|SET ANSI_WARNINGS|SET ARITHABORT|SET ARITHIGNORE|SET CONCAT_NULL_YIELDS_NULL|SET CURSOR_CLOSE_ON_COMMIT|SET DATEFIRST|SET DATEFORMAT|SET DEADLOCK_PRIORITY|SET FIPS_FLAGGER|SET FMTONLY|SET FORCEPLAN|SET IDENTITY_INSERT|SET IMPLICIT_TRANSACTIONS|SET LANGUAGE|SET LOCK_TIMEOUT|SET NOCOUNT|SET NOEXEC|SET NUMERIC_ROUNDABORT|SET OFFSETS|SET PARSEONLY|SET QUERY_GOVERNOR_COST_LIMIT|SET QUOTED_IDENTIFIER|SET REMOTE_PROC_TRANSACTIONS|SET ROWCOUNT|SET SHOWPLAN_ALL|SET SHOWPLAN_TEXT|SET SHOWPLAN_XML|SET STATISTICS IO|SET STATISTICS PROFILE|SET STATISTICS TIME|SET STATISTICS XML|SET TEXTSIZE|SET XACT_ABORT".split('|');
+ var isolationLevels = "READ UNCOMMITTED|READ COMMITTED|REPEATABLE READ|SNAPSHOP|SERIALIZABLE".split('|');
+ for (var i = 0; i < isolationLevels.length; i++) {
+ setStatements.push('SET TRANSACTION ISOLATION LEVEL ' + isolationLevels[i]);
+ }
+
+
+ this.$rules = {
+ start: [{
+ token: "string.start",
+ regex: "'",
+ next: [{
+ token: "constant.language.escape",
+ regex: /''/
+ }, {
+ token: "string.end",
+ next: "start",
+ regex: "'"
+ }, {
+ defaultToken: "string"
+ }]
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"), {
+ token: "comment",
+ regex: "--.*$"
+ }, {
+ token: "comment",
+ start: "/\\*",
+ end: "\\*/"
+ }, {
+ token: "constant.numeric", // float
+ regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token: keywordMapper,
+ regex: "@{0,2}[a-zA-Z_$][a-zA-Z0-9_$]*\\b(?!])" //up to 2 @symbols for some built in functions
+ }, {
+ token: "constant.class",
+ regex: "@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token: "keyword.operator",
+ regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=|\\*"
+ }, {
+ token: "paren.lparen",
+ regex: "[\\(]"
+ }, {
+ token: "paren.rparen",
+ regex: "[\\)]"
+ }, {
+ token: "punctuation",
+ regex: ",|;"
+ }, {
+ token: "text",
+ regex: "\\s+"
+ }],
+ comment: [
+ DocCommentHighlightRules.getTagRule(), {
+ token: "comment",
+ regex: "\\*\\/",
+ next: "no_regex"
+ }, {
+ defaultToken: "comment",
+ caseInsensitive: true
+ }],
+ };
+ for (var i = 0; i < setStatements.length; i++) {
+ this.$rules.start.unshift({
+ token: "set.statement",
+ regex: setStatements[i]
+ });
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]);
+ this.normalizeRules();
+ var completions = [];
+ var addCompletions = function(arr, meta) {
+ arr.forEach(function(v) {
+ completions.push({
+ name: v,
+ value: v,
+ score: 0,
+ meta: meta,
+ });
+ });
+ };
+ addCompletions(builtInStoredProcedures.split('|'), 'procedure');
+ addCompletions(logicalOperators.split('|'), 'operator');
+ addCompletions(builtinFunctions.split('|'), 'function');
+ addCompletions(dataTypes.split('|'), 'type');
+ addCompletions(setStatements, 'statement');
+ addCompletions(keywords.split('|'), 'keyword');
+
+ this.completions = completions;
+};
+
+oop.inherits(SqlServerHighlightRules, TextHighlightRules);
+
+exports.SqlHighlightRules = SqlServerHighlightRules;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/sqlserver",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\bCASE\b|\bBEGIN\b)|^\s*(\/\*)/i;
+ this.startRegionRe = /^\s*(\/\*|--)#?region\b/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+ if (match[1]) return this.getBeginEndBlock(session, row, i, match[1]);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ }
+ else if (foldStyle != "all") range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin") return;
+ return;
+ };
+ this.getBeginEndBlock = function(session, row, column, matchSequence) {
+ var start = {
+ row: row,
+ column: column + matchSequence.length
+ };
+ var maxRow = session.getLength();
+ var line;
+
+ var depth = 1;
+ var re = /(\bCASE\b|\bBEGIN\b)|(\bEND\b)/i;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth++;
+ else depth--;
+
+ if (!depth) break;
+ }
+ var endRow = row;
+ if (endRow > start.row) {
+ return new Range(start.row, start.column, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/sqlserver",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sqlserver_highlight_rules","ace/range","ace/mode/folding/sqlserver"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var SqlServerHighlightRules = require("./sqlserver_highlight_rules").SqlHighlightRules;
+var Range = require("../range").Range;
+var SqlServerFoldMode = require("./folding/sqlserver").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = SqlServerHighlightRules;
+ this.foldingRules = new SqlServerFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.getCompletions = function(state, session, pos, prefix) {
+ return session.$mode.$highlightRules.completions;
+ };
+
+ this.$id = "ace/mode/sql";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-stylus.js b/js/vendor/ace/src-noconflict/mode-stylus.js
index 68cf36e..e13f2df 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-stylus.js
+++ b/js/vendor/ace/src-noconflict/mode-stylus.js
@@ -1,64 +1,149 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/stylus', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/stylus_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var StylusHighlightRules = require("./stylus_highlight_rules").StylusHighlightRules;
-var FoldMode = require("./folding/coffee").FoldMode;
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
-var Mode = function() {
- var highlighter = new StylusHighlightRules();
- this.foldingRules = new FoldMode();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$keywordList = highlighter.$keywordList;
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ push: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "\\}",
+ next: "pop"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "comment" : [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }],
+
+ "ruleset" : [
+ {
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "pop"
+ }, {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : ["support.function", "string", "support.function"],
+ regex : "(url\\()(.*)(\\))"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }]
+ };
+
+ this.normalizeRules();
};
-oop.inherits(Mode, TextMode);
-(function() {
-}).call(Mode.prototype);
+oop.inherits(CssHighlightRules, TextHighlightRules);
-exports.Mode = Mode;
-});
+exports.CssHighlightRules = CssHighlightRules;
-ace.define('ace/mode/stylus_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/css_highlight_rules'], function(require, exports, module) {
+});
+ace.define("ace/mode/stylus_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -217,152 +302,8 @@ oop.inherits(StylusHighlightRules, TextHighlightRules);
exports.StylusHighlightRules = StylusHighlightRules;
});
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
-var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
-var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
-var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
-
-var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
-var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
-
-var CssHighlightRules = function() {
-
- var keywordMapper = this.createKeywordMapper({
- "support.function": supportFunction,
- "support.constant": supportConstant,
- "support.type": supportType,
- "support.constant.color": supportConstantColor,
- "support.constant.fonts": supportConstantFonts
- }, "text", true);
-
- this.$rules = {
- "start" : [{
- token : "comment", // multi line comment
- regex : "\\/\\*",
- push : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- push: "ruleset"
- }, {
- token: "string",
- regex: "@.*?{",
- push: "media"
- }, {
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- }, {
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- }, {
- token: "string",
- regex: ":[a-z0-9-_]+"
- }, {
- token: "constant",
- regex: "[a-z0-9-_]+"
- }, {
- caseInsensitive: true
- }],
-
- "media" : [{
- token : "comment", // multi line comment
- regex : "\\/\\*",
- push : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- push: "ruleset"
- }, {
- token: "string",
- regex: "\\}",
- next: "pop"
- }, {
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- }, {
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- }, {
- token: "string",
- regex: ":[a-z0-9-_]+"
- }, {
- token: "constant",
- regex: "[a-z0-9-_]+"
- }, {
- caseInsensitive: true
- }],
-
- "comment" : [{
- token : "comment",
- regex : "\\*\\/",
- next : "pop"
- }, {
- defaultToken : "comment"
- }],
-
- "ruleset" : [
- {
- token : "paren.rparen",
- regex : "\\}",
- next: "pop"
- }, {
- token : "comment", // multi line comment
- regex : "\\/\\*",
- push : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : ["constant.numeric", "keyword"],
- regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
- }, {
- token : "constant.numeric",
- regex : numRe
- }, {
- token : "constant.numeric", // hex6 color
- regex : "#[a-f0-9]{6}"
- }, {
- token : "constant.numeric", // hex3 color
- regex : "#[a-f0-9]{3}"
- }, {
- token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
- regex : pseudoElements
- }, {
- token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
- regex : pseudoClasses
- }, {
- token : ["support.function", "string", "support.function"],
- regex : "(url\\()(.*)(\\))"
- }, {
- token : keywordMapper,
- regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
- }, {
- caseInsensitive: true
- }]
- };
-
- this.normalizeRules();
-};
-
-oop.inherits(CssHighlightRules, TextHighlightRules);
-
-exports.CssHighlightRules = CssHighlightRules;
-
-});
-
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -447,3 +388,27 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/stylus",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/stylus_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var StylusHighlightRules = require("./stylus_highlight_rules").StylusHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = StylusHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.$id = "ace/mode/stylus";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-svg.js b/js/vendor/ace/src-noconflict/mode-svg.js
index 1852de1..3ff4d80 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-svg.js
+++ b/js/vendor/ace/src-noconflict/mode-svg.js
@@ -1,163 +1,80 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/svg', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/svg_highlight_rules', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var XmlMode = require("./xml").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules;
-var MixedFoldMode = require("./folding/mixed").FoldMode;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- XmlMode.call(this);
-
- this.highlighter = new SvgHighlightRules();
- this.$tokenizer = new Tokenizer(this.highlighter.getRules());
-
- this.$embeds = this.highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode
- });
-
- this.foldingRules = new MixedFoldMode(new XmlFoldMode({}), {
- "js-": new CStyleFoldMode()
- });
-};
-
-oop.inherits(Mode, XmlMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
- this.$behaviour = new XmlBehaviour();
- this.foldingRules = new XmlFoldMode();
-};
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.blockComment = {start: "<!--", end: "-->"};
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -165,75 +82,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}, {
- include : "string"
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -246,18 +173,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -265,14 +191,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -284,447 +210,155 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
-
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
- }
- return {
- text: '>' + '</' + tag + '>',
- selection: [1, 1]
- }
- }
- });
-
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
- if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-var lang = require("../../lib/lang");
-
-var SAFE_INSERT_IN_TOKENS =
- ["text", "paren.rparen", "punctuation.operator"];
-var SAFE_INSERT_BEFORE_TOKENS =
- ["text", "paren.rparen", "punctuation.operator", "comment"];
-
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
- };
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
- };
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
return {
- text: '{' + selected + '}',
+ text: quote + selected + quote,
selection: false
};
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
- CstyleBehaviour.recordAutoInsert(editor, session, "}");
- return {
- text: '{}',
- selection: [1, 1]
- };
- } else {
- CstyleBehaviour.recordMaybeInsert(editor, session, "{");
- return {
- text: '{',
- selection: [1, 1]
- };
- }
- }
- } else if (text == '}') {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- } else if (text == "\n" || text == "\r\n") {
- var closing = "";
- if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
- CstyleBehaviour.clearMaybeInsertedClosing();
}
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
- if (!openBracePos)
- return null;
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
- var next_indent = this.$getIndent(line);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
+ text: "",
+ selection: [1, 1]
};
}
- }
- });
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- } else {
- maybeInsertedBrackets--;
- }
- }
- });
+ if (!token)
+ token = iterator.stepBackward();
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
return {
- text: '()',
+ text: quote + quote,
selection: [1, 1]
};
}
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
+ if (rightChar == selected) {
range.end.column++;
return range;
}
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '[') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- CstyleBehaviour.recordAutoInsert(editor, session, "]");
- return {
- text: '[]',
- selection: [1, 1]
- };
- }
- } else if (text == ']') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ']') {
- var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
}
}
- }
- });
-
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '[') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ']') {
- range.end.column++;
- return range;
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
}
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"' || text == "'") {
- var quote = text;
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
- return null;
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
+
+ if (!token) {
+ return;
}
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
return {
- text: '',
- selection: [1, 1]
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
};
}
}
@@ -732,27 +366,15 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == selected) {
- range.end.column++;
- return range;
- }
- }
- });
-
};
-oop.inherits(CstyleBehaviour, Behaviour);
+oop.inherits(XmlBehaviour, Behaviour);
-exports.CstyleBehaviour = CstyleBehaviour;
+exports.XmlBehaviour = XmlBehaviour;
});
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var lang = require("../../lib/lang");
@@ -760,91 +382,118 @@ var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var FoldMode = exports.FoldMode = function(voidElements) {
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
BaseFoldMode.call(this);
this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
};
oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
(function() {
this.getFoldWidget = function(session, foldStyle, row) {
var tag = this._getFirstTagInLine(session, row);
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ if (!tag)
return "";
- if (tag.selfClosing)
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
return "";
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
return "";
return "start";
};
-
this._getFirstTagInLine = function(session, row) {
var tokens = session.getTokens(row);
- var value = "";
+ var tag = new Tag();
+
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
- if (token.type.lastIndexOf("meta.tag", 0) === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
}
-
- return this._parseTag(value);
+
+ return null;
};
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = tag.match(this.tagRe);
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
var column = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
};
this._readTagForward = function(iterator) {
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var start;
-
+
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
}
} while(token = iterator.stepForward());
-
+
return null;
};
@@ -852,32 +501,24 @@ oop.inherits(FoldMode, BaseFoldMode);
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var end;
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
}
} while(token = iterator.stepBackward());
-
+
return null;
};
@@ -888,10 +529,7 @@ oop.inherits(FoldMode, BaseFoldMode);
if (!tag || top.tagName == tag.tagName) {
return stack.pop();
}
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
stack.pop();
continue;
} else {
@@ -903,7 +541,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.getFoldWidgetRange = function(session, foldStyle, row) {
var firstTag = this._getFirstTagInLine(session, row);
- if (!firstTag.match)
+ if (!firstTag)
return null;
var isBackward = firstTag.closing || firstTag.selfClosing;
@@ -911,11 +549,13 @@ oop.inherits(FoldMode, BaseFoldMode);
var tag;
if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
var start = {
row: row,
- column: firstTag.column + firstTag.tagName.length + 2
+ column: firstTag.start.column + firstTag.tagName.length + 2
};
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
while (tag = this._readTagForward(iterator)) {
if (tag.selfClosing) {
if (!stack.length) {
@@ -932,15 +572,15 @@ oop.inherits(FoldMode, BaseFoldMode);
return Range.fromPoints(start, tag.start);
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
var end = {
row: row,
- column: firstTag.column
+ column: firstTag.start.column
};
while (tag = this._readTagBackward(iterator)) {
@@ -957,11 +597,13 @@ oop.inherits(FoldMode, BaseFoldMode);
this._pop(stack, tag);
if (stack.length == 0) {
tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
return Range.fromPoints(tag.start, end);
}
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
@@ -972,81 +614,37 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
+var lang = require("../lib/lang");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var XmlFoldMode = require("./folding/xml").FoldMode;
var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
+ this.HighlightRules = XmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.foldingRules = new XmlFoldMode();
};
+
oop.inherits(Mode, TextMode);
(function() {
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
-
- return indent;
- };
+ this.voidElements = lang.arrayToMap([]);
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
+ this.blockComment = {start: "<!--", end: "-->"};
this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker");
worker.attachToDocument(session.getDocument());
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
});
worker.on("terminate", function() {
@@ -1055,20 +653,71 @@ oop.inherits(Mode, TextMode);
return worker;
};
-
+
+ this.$id = "ace/mode/xml";
}).call(Mode.prototype);
exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -1189,23 +838,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -1215,10 +867,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -1253,14 +901,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -1278,7 +926,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -1312,20 +960,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -1360,9 +1012,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -1370,52 +1062,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -1454,8 +1102,365 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -1474,23 +1479,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -1503,13 +1540,154 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/svg_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
@@ -1528,8 +1706,8 @@ oop.inherits(SvgHighlightRules, XmlHighlightRules);
exports.SvgHighlightRules = SvgHighlightRules;
});
-ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -1581,3 +1759,43 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/svg",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/svg_highlight_rules","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var XmlMode = require("./xml").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules;
+var MixedFoldMode = require("./folding/mixed").FoldMode;
+var XmlFoldMode = require("./folding/xml").FoldMode;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ XmlMode.call(this);
+
+ this.HighlightRules = SvgHighlightRules;
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode
+ });
+
+ this.foldingRules = new MixedFoldMode(new XmlFoldMode(), {
+ "js-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(Mode, XmlMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+
+ this.$id = "ace/mode/svg";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-tcl.js b/js/vendor/ace/src-noconflict/mode-tcl.js
index dc4d6cb..6cd19dc 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-tcl.js
+++ b/js/vendor/ace/src-noconflict/mode-tcl.js
@@ -1,90 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/tcl', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/folding/cstyle', 'ace/mode/tcl_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-var TclHighlightRules = require("./tcl_highlight_rules").TclHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new TclHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "#";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -103,23 +18,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -132,13 +79,67 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/tcl_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/tcl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -278,8 +279,8 @@ oop.inherits(TclHighlightRules, TextHighlightRules);
exports.TclHighlightRules = TclHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -317,3 +318,58 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
+
+ace.define("ace/mode/tcl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/folding/cstyle","ace/mode/tcl_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var TclHighlightRules = require("./tcl_highlight_rules").TclHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = TclHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/tcl";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-tex.js b/js/vendor/ace/src-noconflict/mode-tex.js
index b397c70..951a878 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-tex.js
+++ b/js/vendor/ace/src-noconflict/mode-tex.js
@@ -1,53 +1,5 @@
-/*
- * tex.js
- *
- * Copyright (C) 2009-11 by RStudio, Inc.
- *
- * The Initial Developer of the Original Code is
- * Ajax.org B.V.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * This program is licensed to you under the terms of version 3 of the
- * GNU Affero General Public License. This program is distributed WITHOUT
- * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
- * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
- *
- */
-ace.define('ace/mode/tex', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/tex_highlight_rules', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-
-var Mode = function(suppressHighlighting) {
- if (suppressHighlighting)
- this.$tokenizer = new Tokenizer(new TextHighlightRules().getRules());
- else
- this.$tokenizer = new Tokenizer(new TexHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-
- this.allowAutoInsert = function() {
- return false;
- };
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-ace.define('ace/mode/tex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
@@ -125,8 +77,8 @@ oop.inherits(TexHighlightRules, TextHighlightRules);
exports.TexHighlightRules = TexHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -164,3 +116,35 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
+
+ace.define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function(suppressHighlighting) {
+ if (suppressHighlighting)
+ this.HighlightRules = TextHighlightRules;
+ else
+ this.HighlightRules = TexHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.allowAutoInsert = function() {
+ return false;
+ };
+ this.$id = "ace/mode/tex";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-text.js b/js/vendor/ace/src-noconflict/mode-text.js
index e69de29..8b13789 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-text.js
+++ b/js/vendor/ace/src-noconflict/mode-text.js
@@ -0,0 +1 @@
+
diff --git a/js/vendor/ace/src-noconflict/mode-textile.js b/js/vendor/ace/src-noconflict/mode-textile.js
index 1dbbcd5..4b528e7 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-textile.js
+++ b/js/vendor/ace/src-noconflict/mode-textile.js
@@ -1,72 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/textile', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/textile_highlight_rules', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var TextileHighlightRules = require("./textile_highlight_rules").TextileHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new TextileHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.getNextLineIndent = function(state, line, tab) {
- if (state == "intag")
- return tab;
-
- return "";
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/textile_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -129,8 +62,8 @@ exports.TextileHighlightRules = TextileHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -168,3 +101,41 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
+
+ace.define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var TextileHighlightRules = require("./textile_highlight_rules").TextileHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ this.HighlightRules = TextileHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.type = "text";
+ this.getNextLineIndent = function(state, line, tab) {
+ if (state == "intag")
+ return tab;
+
+ return "";
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/textile";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-tmsnippet.js b/js/vendor/ace/src-noconflict/mode-tmsnippet.js
deleted file mode 100644
index 6dbc79a..0000000
--- a/js/vendor/ace/src-noconflict/mode-tmsnippet.js
+++ /dev/null
@@ -1,200 +0,0 @@
-ace.define('ace/mode/tmsnippet', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var SnippetHighlightRules = function() {
-
- var builtins = "SELECTION|CURRENT_WORD|SELECTED_TEXT|CURRENT_LINE|LINE_INDEX|" +
- "LINE_NUMBER|SOFT_TABS|TAB_SIZE|FILENAME|FILEPATH|FULLNAME";
-
- this.$rules = {
- "start" : [
- {token:"constant.language.escape", regex: /\\[\$}`\\]/},
- {token:"keyword", regex: "\\$(?:TM_)?(?:" + builtins + ")\\b"},
- {token:"variable", regex: "\\$\\w+"},
- {onMatch: function(value, state, stack) {
- if (stack[1])
- stack[1]++;
- else
- stack.unshift(state, 1);
- return this.tokenName;
- }, tokenName: "markup.list", regex: "\\${", next: "varDecl"},
- {onMatch: function(value, state, stack) {
- if (!stack[1])
- return "text";
- stack[1]--;
- if (!stack[1])
- stack.splice(0,2);
- return this.tokenName;
- }, tokenName: "markup.list", regex: "}"},
- {token: "doc.comment", regex:/^\${2}-{5,}$/}
- ],
- "varDecl" : [
- {regex: /\d+\b/, token: "constant.numeric"},
- {token:"keyword", regex: "(?:TM_)?(?:" + builtins + ")\\b"},
- {token:"variable", regex: "\\w+"},
- {regex: /:/, token: "punctuation.operator", next: "start"},
- {regex: /\//, token: "string.regex", next: "regexp"},
- {regex: "", next: "start"}
- ],
- "regexp" : [
- {regex: /\\./, token: "escape"},
- {regex: /\[/, token: "regex.start", next: "charClass"},
- {regex: "/", token: "string.regex", next: "format"},
- {"token": "string.regex", regex:"."}
- ],
- charClass : [
- {regex: "\\.", token: "escape"},
- {regex: "\\]", token: "regex.end", next: "regexp"},
- {"token": "string.regex", regex:"."}
- ],
- "format" : [
- {regex: /\\[ulULE]/, token: "keyword"},
- {regex: /\$\d+/, token: "variable"},
- {regex: "/[gim]*:?", token: "string.regex", next: "start"},
- {"token": "string", regex:"."}
- ]
- };
-};
-oop.inherits(SnippetHighlightRules, TextHighlightRules);
-
-exports.SnippetHighlightRules = SnippetHighlightRules;
-
-var SnippetGroupHighlightRules = function() {
- this.$rules = {
- "start" : [
- {token: "text", regex: "^\\t", next: "sn-start"},
- {token:"invalid", regex: /^ \s*/},
- {token:"comment", regex: /^#.*/},
- {token:"constant.language.escape", regex: "^regex ", next: "regex"},
- {token:"constant.language.escape", regex: "^(trigger|endTrigger|name|snippet|guard|endGuard|tabTrigger|key)\\b"}
- ],
- "regex" : [
- {token:"text", regex: "\\."},
- {token:"keyword", regex: "/"},
- {token:"empty", regex: "$", next: "start"}
- ]
- };
- this.embedRules(SnippetHighlightRules, "sn-", [
- {token: "text", regex: "^\\t", next: "sn-start"},
- {onMatch: function(value, state, stack) {
- stack.splice(stack.length);
- return this.tokenName;
- }, tokenName: "text", regex: "^(?!\t)", next: "start"},
- ])
-
-};
-
-oop.inherits(SnippetGroupHighlightRules, TextHighlightRules);
-
-exports.SnippetGroupHighlightRules = SnippetGroupHighlightRules;
-
-var FoldMode = require("./folding/coffee").FoldMode;
-
-var Mode = function() {
- var highlighter = new SnippetGroupHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.getNextLineIndent = function(state, line, tab) {
- return this.$getIndent(line);
- };
-}).call(Mode.prototype);
-exports.Mode = Mode;
-
-
-});
-
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var BaseFoldMode = require("./fold_mode").FoldMode;
-var Range = require("../../range").Range;
-
-var FoldMode = exports.FoldMode = function() {};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
- this.getFoldWidgetRange = function(session, foldStyle, row) {
- var range = this.indentationBlock(session, row);
- if (range)
- return range;
-
- var re = /\S/;
- var line = session.getLine(row);
- var startLevel = line.search(re);
- if (startLevel == -1 || line[startLevel] != "#")
- return;
-
- var startColumn = line.length;
- var maxRow = session.getLength();
- var startRow = row;
- var endRow = row;
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.search(re);
-
- if (level == -1)
- continue;
-
- if (line[level] != "#")
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
- this.getFoldWidget = function(session, foldStyle, row) {
- var line = session.getLine(row);
- var indent = line.search(/\S/);
- var next = session.getLine(row + 1);
- var prev = session.getLine(row - 1);
- var prevIndent = prev.search(/\S/);
- var nextIndent = next.search(/\S/);
-
- if (indent == -1) {
- session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
- return "";
- }
- if (prevIndent == -1) {
- if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
- session.foldWidgets[row - 1] = "";
- session.foldWidgets[row + 1] = "";
- return "start";
- }
- } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
- if (session.getLine(row - 2).search(/\S/) == -1) {
- session.foldWidgets[row - 1] = "start";
- session.foldWidgets[row + 1] = "";
- return "";
- }
- }
-
- if (prevIndent!= -1 && prevIndent < indent)
- session.foldWidgets[row - 1] = "start";
- else
- session.foldWidgets[row - 1] = "";
-
- if (indent < nextIndent)
- return "start";
- else
- return "";
- };
-
-}).call(FoldMode.prototype);
-
-});
diff --git a/js/vendor/ace/src-noconflict/mode-toml.js b/js/vendor/ace/src-noconflict/mode-toml.js
index af71c45..5d2802c 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-toml.js
+++ b/js/vendor/ace/src-noconflict/mode-toml.js
@@ -1,63 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2013, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- * Garen J. Torikian
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/toml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/toml_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var TomlHighlightRules = require("./toml_highlight_rules").TomlHighlightRules;
-var FoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new TomlHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "#";
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/toml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/toml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -125,56 +67,75 @@ oop.inherits(TomlHighlightRules, TextHighlightRules);
exports.TomlHighlightRules = TomlHighlightRules;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
-var FoldMode = exports.FoldMode = function(commentRegex) {
- if (commentRegex) {
- this.foldingStartMarker = new RegExp(
- this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
- );
- this.foldingStopMarker = new RegExp(
- this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
- );
- }
+var FoldMode = exports.FoldMode = function() {
};
oop.inherits(FoldMode, BaseFoldMode);
(function() {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.foldingStartMarker = /^\s*\[([^\])]*)]\s*(?:$|[;#])/;
this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var re = this.foldingStartMarker;
var line = session.getLine(row);
- var match = line.match(this.foldingStartMarker);
- if (match) {
- var i = match.index;
-
- if (match[1])
- return this.openingBracketBlock(session, match[1], row, i);
+
+ var m = line.match(re);
+
+ if (!m) return;
+
+ var startName = m[1] + ".";
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ if (/^\s*$/.test(line))
+ continue;
+ m = line.match(re);
+ if (m && m[1].lastIndexOf(startName, 0) !== 0)
+ break;
+
+ endRow = row;
+ }
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
}
+ };
- if (foldStyle !== "markbeginend")
- return;
+}).call(FoldMode.prototype);
- var match = line.match(this.foldingStopMarker);
- if (match) {
- var i = match.index + match[0].length;
+});
- if (match[1])
- return this.closingBracketBlock(session, match[1], row, i);
+ace.define("ace/mode/toml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/toml_highlight_rules","ace/mode/folding/ini"], function(require, exports, module) {
+"use strict";
- return session.getCommentFoldRange(row, i, -1);
- }
- };
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var TomlHighlightRules = require("./toml_highlight_rules").TomlHighlightRules;
+var FoldMode = require("./folding/ini").FoldMode;
-}).call(FoldMode.prototype);
+var Mode = function() {
+ this.HighlightRules = TomlHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/toml";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
});
diff --git a/js/vendor/ace/src-noconflict/mode-twig.js b/js/vendor/ace/src-noconflict/mode-twig.js
index e4b9f9b..3106084 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-twig.js
+++ b/js/vendor/ace/src-noconflict/mode-twig.js
@@ -1,195 +1,61 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2013, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/twig', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/twig_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var TwigHighlightRules = require("./twig_highlight_rules").TwigHighlightRules;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-
-var Mode = function() {
- var highlighter = new TwigHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new HtmlBehaviour();
-
- this.$embeds = highlighter.getEmbeds();
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.blockComment = {start: "{#", end: "#}"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
};
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-}).call(Mode.prototype);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -310,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -336,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -374,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -399,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -433,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -481,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -491,52 +400,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -575,8 +440,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -588,92 +453,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -688,6 +514,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -700,51 +527,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -753,6 +586,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -769,9 +603,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -781,15 +616,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -798,6 +631,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -814,9 +648,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -826,62 +661,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -893,13 +725,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -918,23 +817,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -947,48 +878,118 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
-ace.define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
- var highlighter = new CssHighlightRules();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.HighlightRules = JavaScriptHighlightRules;
+
this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CssBehaviour();
- this.$keywordList = highlighter.$keywordList;
+ this.$behaviour = new CstyleBehaviour();
this.foldingRules = new CStyleFoldMode();
};
oop.inherits(Mode, TextMode);
(function() {
- this.foldingRules = "cStyle";
+ this.lineCommentStart = "//";
this.blockComment = {start: "/*", end: "*/"};
this.getNextLineIndent = function(state, line, tab) {
var indent = this.$getIndent(line);
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
if (tokens.length && tokens[tokens.length-1].type == "comment") {
return indent;
}
- var match = line.match(/^.*\{\s*$/);
- if (match) {
- indent += tab;
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
}
return indent;
@@ -1003,11 +1004,11 @@ oop.inherits(Mode, TextMode);
};
this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
worker.attachToDocument(session.getDocument());
- worker.on("csslint", function(e) {
- session.setAnnotations(e.data);
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
});
worker.on("terminate", function() {
@@ -1017,23 +1018,23 @@ oop.inherits(Mode, TextMode);
return worker;
};
+ this.$id = "ace/mode/javascript";
}).call(Mode.prototype);
exports.Mode = Mode;
-
});
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
@@ -1167,8 +1168,8 @@ exports.CssHighlightRules = CssHighlightRules;
});
-ace.define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -1246,292 +1247,152 @@ oop.inherits(CssBehaviour, CstyleBehaviour);
exports.CssBehaviour = CssBehaviour;
});
-ace.define('ace/mode/twig_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/html_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var TwigHighlightRules = function() {
- HtmlHighlightRules.call(this);
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
- var tags = "autoescape|block|do|embed|extends|filter|flush|for|from|if|import|include|macro|sandbox|set|spaceless|use|verbatim";
- tags = tags + "|end" + tags.replace(/\|/g, "|end");
- var filters = "abs|batch|capitalize|convert_encoding|date|date_modify|default|e|escape|first|format|join|json_encode|keys|last|length|lower|merge|nl2br|number_format|raw|replace|reverse|slice|sort|split|striptags|title|trim|upper|url_encode";
- var functions = "attribute|constant|cycle|date|dump|parent|random|range|template_from_string";
- var tests = "constant|divisibleby|sameas|defined|empty|even|iterable|odd";
- var constants = "null|none|true|false";
- var operators = "b-and|b-xor|b-or|in|is|and|or|not"
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
- var keywordMapper = this.createKeywordMapper({
- "keyword.control.twig": tags,
- "support.function.twig": [filters, functions, tests].join("|"),
- "keyword.operator.twig": operators,
- "constant.language.twig": constants
- }, "identifier");
- for (var rule in this.$rules) {
- this.$rules[rule].unshift({
- token : "variable.other.readwrite.local.twig",
- regex : "\\{\\{-?",
- push : "twig-start"
- }, {
- token : "meta.tag.twig",
- regex : "\\{%-?",
- push : "twig-start"
- }, {
- token : "comment.block.twig",
- regex : "\\{#-?",
- push : "twig-comment"
- });
- }
- this.$rules["twig-comment"] = [{
- token : "comment.block.twig",
- regex : ".*-?#\\}",
- next : "pop"
- }];
+(function() {
- this.$rules["twig-start"] = [{
- token : "variable.other.readwrite.local.twig",
- regex : "-?\\}\\}",
- next : "pop"
- }, {
- token : "meta.tag.twig",
- regex : "-?%\\}",
- next : "pop"
- }, {
- token : "string",
- regex : "'",
- next : "twig-qstring"
- }, {
- token : "string",
- regex : '"',
- next : "twig-qqstring"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : keywordMapper,
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator.assignment",
- regex : "=|~"
- }, {
- token : "keyword.operator.comparison",
- regex : "==|!=|<|>|>=|<=|==="
- }, {
- token : "keyword.operator.arithmetic",
- regex : "\\+|-|/|%|//|\\*|\\*\\*"
- }, {
- token : "keyword.operator.other",
- regex : "\\.\\.|\\|"
- }, {
- token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./
- }, {
- token : "paren.lparen",
- regex : /[\[\({]/
- }, {
- token : "paren.rparen",
- regex : /[\])}]/
- }, {
- token : "text",
- regex : "\\s+"
- } ];
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
- this.$rules["twig-qqstring"] = [{
- token : "constant.language.escape",
- regex : /\\[\\"$#ntr]|#{[^"}]*}/
- }, {
- token : "string",
- regex : '"',
- next : "twig-start",
- }, {
- defaultToken : "string"
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
}
- ];
- this.$rules["twig-qstring"] = [{
- token : "constant.language.escape",
- regex : /\\[\\'ntr]}/
- }, {
- token : "string",
- regex : "'",
- next : "twig-start",
- }, {
- defaultToken : "string"
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
}
- ];
-
- this.normalizeRules();
-};
-
-oop.inherits(TwigHighlightRules, TextHighlightRules);
-exports.TwigHighlightRules = TwigHighlightRules;
-});
-
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
+ return indent;
+ };
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+ return worker;
+ };
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
-};
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+exports.Mode = Mode;
-exports.HtmlHighlightRules = HtmlHighlightRules;
});
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -1539,75 +1400,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}, {
- include : "string"
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -1620,18 +1491,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -1639,14 +1509,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -1658,258 +1528,253 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
};
-});
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
-var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var Behaviour = require("../behaviour").Behaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
+var lang = require("../../lib/lang");
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
-var HtmlBehaviour = function () {
+var XmlBehaviour = function () {
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
var token = iterator.getCurrentToken();
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var element = token.value;
- if (atCursor){
- var element = element.substring(0, position.column - token.start);
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
}
- if (voidElements.indexOf(element) !== -1){
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
}
- return {
- text: '>' + '</' + element + '>',
- selection: [1, 1]
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
}
}
});
-}
-oop.inherits(HtmlBehaviour, XmlBehaviour);
-
-exports.HtmlBehaviour = HtmlBehaviour;
-});
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
});
- return hasType;
-}
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
if (text == '>') {
var position = editor.getCursorPosition();
var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
+ if (is(token, "reference.attribute-value"))
return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
}
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
}
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
return {
- text: '>' + '</' + tag + '>',
+ text: ">" + "</" + element + ">",
selection: [1, 1]
- }
+ };
}
});
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
if (text == "\n") {
var cursor = editor.getCursorPosition();
var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
}
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});
-ace.define('ace/mode/folding/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+ if (!token) {
+ return;
+ }
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
-var oop = require("../../lib/oop");
-var MixedFoldMode = require("./mixed").FoldMode;
-var XmlFoldMode = require("./xml").FoldMode;
-var CStyleFoldMode = require("./cstyle").FoldMode;
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
- "js-": new CStyleFoldMode(),
- "css-": new CStyleFoldMode()
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
});
+
};
-oop.inherits(FoldMode, MixedFoldMode);
+oop.inherits(XmlBehaviour, Behaviour);
+exports.XmlBehaviour = XmlBehaviour;
});
-ace.define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -1962,8 +1827,8 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var lang = require("../../lib/lang");
@@ -1971,91 +1836,118 @@ var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var FoldMode = exports.FoldMode = function(voidElements) {
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
BaseFoldMode.call(this);
this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
};
oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
(function() {
this.getFoldWidget = function(session, foldStyle, row) {
var tag = this._getFirstTagInLine(session, row);
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ if (!tag)
return "";
- if (tag.selfClosing)
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
return "";
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
return "";
return "start";
};
-
this._getFirstTagInLine = function(session, row) {
var tokens = session.getTokens(row);
- var value = "";
+ var tag = new Tag();
+
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
- if (token.type.lastIndexOf("meta.tag", 0) === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
}
-
- return this._parseTag(value);
+
+ return null;
};
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = tag.match(this.tagRe);
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
var column = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
};
this._readTagForward = function(iterator) {
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var start;
-
+
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
}
} while(token = iterator.stepForward());
-
+
return null;
};
@@ -2063,32 +1955,24 @@ oop.inherits(FoldMode, BaseFoldMode);
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var end;
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
}
} while(token = iterator.stepBackward());
-
+
return null;
};
@@ -2099,10 +1983,7 @@ oop.inherits(FoldMode, BaseFoldMode);
if (!tag || top.tagName == tag.tagName) {
return stack.pop();
}
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
stack.pop();
continue;
} else {
@@ -2114,7 +1995,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.getFoldWidgetRange = function(session, foldStyle, row) {
var firstTag = this._getFirstTagInLine(session, row);
- if (!firstTag.match)
+ if (!firstTag)
return null;
var isBackward = firstTag.closing || firstTag.selfClosing;
@@ -2122,11 +2003,13 @@ oop.inherits(FoldMode, BaseFoldMode);
var tag;
if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
var start = {
row: row,
- column: firstTag.column + firstTag.tagName.length + 2
+ column: firstTag.start.column + firstTag.tagName.length + 2
};
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
while (tag = this._readTagForward(iterator)) {
if (tag.selfClosing) {
if (!stack.length) {
@@ -2143,15 +2026,15 @@ oop.inherits(FoldMode, BaseFoldMode);
return Range.fromPoints(start, tag.start);
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
var end = {
row: row,
- column: firstTag.column
+ column: firstTag.start.column
};
while (tag = this._readTagBackward(iterator)) {
@@ -2168,11 +2051,13 @@ oop.inherits(FoldMode, BaseFoldMode);
this._pop(stack, tag);
if (stack.length == 0) {
tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
return Range.fromPoints(tag.start, end);
}
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
@@ -2182,3 +2067,553 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/twig_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var TwigHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var tags = "autoescape|block|do|embed|extends|filter|flush|for|from|if|import|include|macro|sandbox|set|spaceless|use|verbatim";
+ tags = tags + "|end" + tags.replace(/\|/g, "|end");
+ var filters = "abs|batch|capitalize|convert_encoding|date|date_modify|default|e|escape|first|format|join|json_encode|keys|last|length|lower|merge|nl2br|number_format|raw|replace|reverse|slice|sort|split|striptags|title|trim|upper|url_encode";
+ var functions = "attribute|constant|cycle|date|dump|parent|random|range|template_from_string";
+ var tests = "constant|divisibleby|sameas|defined|empty|even|iterable|odd";
+ var constants = "null|none|true|false";
+ var operators = "b-and|b-xor|b-or|in|is|and|or|not"
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword.control.twig": tags,
+ "support.function.twig": [filters, functions, tests].join("|"),
+ "keyword.operator.twig": operators,
+ "constant.language.twig": constants
+ }, "identifier");
+ for (var rule in this.$rules) {
+ this.$rules[rule].unshift({
+ token : "variable.other.readwrite.local.twig",
+ regex : "\\{\\{-?",
+ push : "twig-start"
+ }, {
+ token : "meta.tag.twig",
+ regex : "\\{%-?",
+ push : "twig-start"
+ }, {
+ token : "comment.block.twig",
+ regex : "\\{#-?",
+ push : "twig-comment"
+ });
+ }
+ this.$rules["twig-comment"] = [{
+ token : "comment.block.twig",
+ regex : ".*-?#\\}",
+ next : "pop"
+ }];
+
+ this.$rules["twig-start"] = [{
+ token : "variable.other.readwrite.local.twig",
+ regex : "-?\\}\\}",
+ next : "pop"
+ }, {
+ token : "meta.tag.twig",
+ regex : "-?%\\}",
+ next : "pop"
+ }, {
+ token : "string",
+ regex : "'",
+ next : "twig-qstring"
+ }, {
+ token : "string",
+ regex : '"',
+ next : "twig-qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator.assignment",
+ regex : "=|~"
+ }, {
+ token : "keyword.operator.comparison",
+ regex : "==|!=|<|>|>=|<=|==="
+ }, {
+ token : "keyword.operator.arithmetic",
+ regex : "\\+|-|/|%|//|\\*|\\*\\*"
+ }, {
+ token : "keyword.operator.other",
+ regex : "\\.\\.|\\|"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./
+ }, {
+ token : "paren.lparen",
+ regex : /[\[\({]/
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ];
+
+ this.$rules["twig-qqstring"] = [{
+ token : "constant.language.escape",
+ regex : /\\[\\"$#ntr]|#{[^"}]*}/
+ }, {
+ token : "string",
+ regex : '"',
+ next : "twig-start"
+ }, {
+ defaultToken : "string"
+ }
+ ];
+
+ this.$rules["twig-qstring"] = [{
+ token : "constant.language.escape",
+ regex : /\\[\\'ntr]}/
+ }, {
+ token : "string",
+ regex : "'",
+ next : "twig-start"
+ }, {
+ defaultToken : "string"
+ }
+ ];
+
+ this.normalizeRules();
+};
+
+oop.inherits(TwigHighlightRules, TextHighlightRules);
+
+exports.TwigHighlightRules = TwigHighlightRules;
+});
+
+ace.define("ace/mode/twig",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/twig_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var TwigHighlightRules = require("./twig_highlight_rules").TwigHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = TwigHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.blockComment = {start: "{#", end: "#}"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+ this.$id = "ace/mode/twig";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-typescript.js b/js/vendor/ace/src-noconflict/mode-typescript.js
index e4f561c..c8b7db9 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-typescript.js
+++ b/js/vendor/ace/src-noconflict/mode-typescript.js
@@ -1,160 +1,61 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/typescript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/typescript_highlight_rules', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var jsMode = require("./javascript").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-
-var Mode = function() {
- var highlighter = new TypeScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, jsMode);
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-(function() {
- this.createWorker = function(session) {
- return null;
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
};
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
- var highlighter = new JavaScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new CstyleBehaviour();
- this.$keywordList = highlighter.$keywordList;
- this.foldingRules = new CStyleFoldMode();
};
-oop.inherits(Mode, TextMode);
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
- var tokens = tokenizedLine.tokens;
- var endState = tokenizedLine.state;
-
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
- return indent;
- }
-
- if (state == "start" || state == "no_regex") {
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- if (match) {
- indent += tab;
- }
- } else if (state == "doc-start") {
- if (endState == "start" || endState == "no_regex") {
- return "";
- }
- var match = line.match(/^\s*(\/?)\*/);
- if (match) {
- if (match[1]) {
- indent += " ";
- }
- indent += "* ";
- }
- }
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- return indent;
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
};
+}
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
};
+};
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
+};
- this.createWorker = function(session) {
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- worker.attachToDocument(session.getDocument());
-
- worker.on("jslint", function(results) {
- session.setAnnotations(results.data);
- });
-
- worker.on("terminate", function() {
- session.clearAnnotations();
- });
-
- return worker;
- };
-}).call(Mode.prototype);
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
-exports.Mode = Mode;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -275,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -301,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -339,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -364,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -398,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -446,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -456,52 +400,8 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
- this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
- }, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
- }, {
- defaultToken : "comment.doc"
- }]
- };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
- };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -540,8 +440,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -553,92 +453,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -653,6 +514,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -665,51 +527,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -718,6 +586,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -734,9 +603,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -746,15 +616,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -763,6 +631,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -779,9 +648,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -791,62 +661,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -858,13 +725,80 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -883,23 +817,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -912,14 +878,154 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
-ace.define('ace/mode/typescript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript_highlight_rules'], function(require, exports, module) {
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var Mode = function() {
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
@@ -970,4 +1076,33 @@ var TypeScriptHighlightRules = function() {
oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules);
exports.TypeScriptHighlightRules = TypeScriptHighlightRules;
-}); \ No newline at end of file
+});
+
+ace.define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var jsMode = require("./javascript").Mode;
+var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ this.HighlightRules = TypeScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, jsMode);
+
+(function() {
+ this.createWorker = function(session) {
+ return null;
+ };
+ this.$id = "ace/mode/typescript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-vala.js b/js/vendor/ace/src-noconflict/mode-vala.js
new file mode 100755
index 0000000..66473b5
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-vala.js
@@ -0,0 +1,1026 @@
+ace.define("ace/mode/vala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ValaHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token:
+ [ 'meta.using.vala',
+ 'keyword.other.using.vala',
+ 'meta.using.vala',
+ 'storage.modifier.using.vala',
+ 'meta.using.vala',
+ 'punctuation.terminator.vala' ],
+ regex: '^(\\s*)(using)\\b(?:(\\s*)([^ ;$]+)(\\s*)((?:;)?))?' },
+ { include: '#code' } ],
+ '#all-types':
+ [ { include: '#primitive-arrays' },
+ { include: '#primitive-types' },
+ { include: '#object-types' } ],
+ '#annotations':
+ [ { token:
+ [ 'storage.type.annotation.vala',
+ 'punctuation.definition.annotation-arguments.begin.vala' ],
+ regex: '(@[^ (]+)(\\()',
+ push:
+ [ { token: 'punctuation.definition.annotation-arguments.end.vala',
+ regex: '\\)',
+ next: 'pop' },
+ { token:
+ [ 'constant.other.key.vala',
+ 'text',
+ 'keyword.operator.assignment.vala' ],
+ regex: '(\\w*)(\\s*)(=)' },
+ { include: '#code' },
+ { token: 'punctuation.seperator.property.vala', regex: ',' },
+ { defaultToken: 'meta.declaration.annotation.vala' } ] },
+ { token: 'storage.type.annotation.vala', regex: '@\\w*' } ],
+ '#anonymous-classes-and-new':
+ [ { token: 'keyword.control.new.vala',
+ regex: '\\bnew\\b',
+ push_disabled:
+ [ { token: 'text',
+ regex: '(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)',
+ next: 'pop' },
+ { token: [ 'storage.type.vala', 'text' ],
+ regex: '(\\w+)(\\s*)(?=\\[)',
+ push:
+ [ { token: 'text', regex: '}|(?=;|\\))', next: 'pop' },
+ { token: 'text',
+ regex: '\\[',
+ push:
+ [ { token: 'text', regex: '\\]', next: 'pop' },
+ { include: '#code' } ] },
+ { token: 'text',
+ regex: '{',
+ push:
+ [ { token: 'text', regex: '(?=})', next: 'pop' },
+ { include: '#code' } ] } ] },
+ { token: 'text',
+ regex: '(?=\\w.*\\()',
+ push:
+ [ { token: 'text',
+ regex: '(?<=\\))',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<=\\))',
+ next: 'pop' },
+ { include: '#object-types' },
+ { token: 'text',
+ regex: '\\(',
+ push:
+ [ { token: 'text', regex: '\\)', next: 'pop' },
+ { include: '#code' } ] } ] },
+ { token: 'meta.inner-class.vala',
+ regex: '{',
+ push:
+ [ { token: 'meta.inner-class.vala', regex: '}', next: 'pop' },
+ { include: '#class-body' },
+ { defaultToken: 'meta.inner-class.vala' } ] } ] } ],
+ '#assertions':
+ [ { token:
+ [ 'keyword.control.assert.vala',
+ 'meta.declaration.assertion.vala' ],
+ regex: '\\b(assert|requires|ensures)(\\s)',
+ push:
+ [ { token: 'meta.declaration.assertion.vala',
+ regex: '$',
+ next: 'pop' },
+ { token: 'keyword.operator.assert.expression-seperator.vala',
+ regex: ':' },
+ { include: '#code' },
+ { defaultToken: 'meta.declaration.assertion.vala' } ] } ],
+ '#class':
+ [ { token: 'meta.class.vala',
+ regex: '(?=\\w?[\\w\\s]*(?:class|(?:@)?interface|enum|struct|namespace)\\s+\\w+)',
+ push:
+ [ { token: 'paren.vala',
+ regex: '}',
+ next: 'pop' },
+ { include: '#storage-modifiers' },
+ { include: '#comments' },
+ { token:
+ [ 'storage.modifier.vala',
+ 'meta.class.identifier.vala',
+ 'entity.name.type.class.vala' ],
+ regex: '(class|(?:@)?interface|enum|struct|namespace)(\\s+)([\\w\\.]+)' },
+ { token: 'storage.modifier.extends.vala',
+ regex: ':',
+ push:
+ [ { token: 'meta.definition.class.inherited.classes.vala',
+ regex: '(?={|,)',
+ next: 'pop' },
+ { include: '#object-types-inherited' },
+ { include: '#comments' },
+ { defaultToken: 'meta.definition.class.inherited.classes.vala' } ] },
+ { token:
+ [ 'storage.modifier.implements.vala',
+ 'meta.definition.class.implemented.interfaces.vala' ],
+ regex: '(,)(\\s)',
+ push:
+ [ { token: 'meta.definition.class.implemented.interfaces.vala',
+ regex: '(?=\\{)',
+ next: 'pop' },
+ { include: '#object-types-inherited' },
+ { include: '#comments' },
+ { defaultToken: 'meta.definition.class.implemented.interfaces.vala' } ] },
+ { token: 'paren.vala',
+ regex: '{',
+ push:
+ [ { token: 'paren.vala', regex: '(?=})', next: 'pop' },
+ { include: '#class-body' },
+ { defaultToken: 'meta.class.body.vala' } ] },
+ { defaultToken: 'meta.class.vala' } ],
+ comment: 'attempting to put namespace in here.' } ],
+ '#class-body':
+ [ { include: '#comments' },
+ { include: '#class' },
+ { include: '#enums' },
+ { include: '#methods' },
+ { include: '#annotations' },
+ { include: '#storage-modifiers' },
+ { include: '#code' } ],
+ '#code':
+ [ { include: '#comments' },
+ { include: '#class' },
+ { token: 'text',
+ regex: '{',
+ push:
+ [ { token: 'text', regex: '}', next: 'pop' },
+ { include: '#code' } ] },
+ { include: '#assertions' },
+ { include: '#parens' },
+ { include: '#constants-and-special-vars' },
+ { include: '#anonymous-classes-and-new' },
+ { include: '#keywords' },
+ { include: '#storage-modifiers' },
+ { include: '#strings' },
+ { include: '#all-types' } ],
+ '#comments':
+ [ { token: 'punctuation.definition.comment.vala',
+ regex: '/\\*\\*/' },
+ { include: 'text.html.javadoc' },
+ { include: '#comments-inline' } ],
+ '#comments-inline':
+ [ { token: 'punctuation.definition.comment.vala',
+ regex: '/\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.vala',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.vala' } ] },
+ { token:
+ [ 'text',
+ 'punctuation.definition.comment.vala',
+ 'comment.line.double-slash.vala' ],
+ regex: '(\\s*)(//)(.*$)' } ],
+ '#constants-and-special-vars':
+ [ { token: 'constant.language.vala',
+ regex: '\\b(?:true|false|null)\\b' },
+ { token: 'variable.language.vala',
+ regex: '\\b(?:this|base)\\b' },
+ { token: 'constant.numeric.vala',
+ regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\\b' },
+ { token: [ 'keyword.operator.dereference.vala', 'constant.other.vala' ],
+ regex: '((?:\\.)?)\\b([A-Z][A-Z0-9_]+)(?!<|\\.class|\\s*\\w+\\s*=)\\b' } ],
+ '#enums':
+ [ { token: 'text',
+ regex: '^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))',
+ push:
+ [ { token: 'text', regex: '(?=;|})', next: 'pop' },
+ { token: 'constant.other.enum.vala',
+ regex: '\\w+',
+ push:
+ [ { token: 'meta.enum.vala', regex: '(?=,|;|})', next: 'pop' },
+ { include: '#parens' },
+ { token: 'text',
+ regex: '{',
+ push:
+ [ { token: 'text', regex: '}', next: 'pop' },
+ { include: '#class-body' } ] },
+ { defaultToken: 'meta.enum.vala' } ] } ] } ],
+ '#keywords':
+ [ { token: 'keyword.control.catch-exception.vala',
+ regex: '\\b(?:try|catch|finally|throw)\\b' },
+ { token: 'keyword.control.vala', regex: '\\?|:|\\?\\?' },
+ { token: 'keyword.control.vala',
+ regex: '\\b(?:return|break|case|continue|default|do|while|for|foreach|switch|if|else|in|yield|get|set|value)\\b' },
+ { token: 'keyword.operator.vala',
+ regex: '\\b(?:typeof|is|as)\\b' },
+ { token: 'keyword.operator.comparison.vala',
+ regex: '==|!=|<=|>=|<>|<|>' },
+ { token: 'keyword.operator.assignment.vala', regex: '=' },
+ { token: 'keyword.operator.increment-decrement.vala',
+ regex: '\\-\\-|\\+\\+' },
+ { token: 'keyword.operator.arithmetic.vala',
+ regex: '\\-|\\+|\\*|\\/|%' },
+ { token: 'keyword.operator.logical.vala', regex: '!|&&|\\|\\|' },
+ { token: 'keyword.operator.dereference.vala',
+ regex: '\\.(?=\\S)',
+ originalRegex: '(?<=\\S)\\.(?=\\S)' },
+ { token: 'punctuation.terminator.vala', regex: ';' },
+ { token: 'keyword.operator.ownership', regex: 'owned|unowned' } ],
+ '#methods':
+ [ { token: 'meta.method.vala',
+ regex: '(?!new)(?=\\w.*\\s+)(?=[^=]+\\()',
+ push:
+ [ { token: 'paren.vala', regex: '}|(?=;)', next: 'pop' },
+ { include: '#storage-modifiers' },
+ { token: [ 'entity.name.function.vala', 'meta.method.identifier.vala' ],
+ regex: '([\\~\\w\\.]+)(\\s*\\()',
+ push:
+ [ { token: 'meta.method.identifier.vala',
+ regex: '\\)',
+ next: 'pop' },
+ { include: '#parameters' },
+ { defaultToken: 'meta.method.identifier.vala' } ] },
+ { token: 'meta.method.return-type.vala',
+ regex: '(?=\\w.*\\s+\\w+\\s*\\()',
+ push:
+ [ { token: 'meta.method.return-type.vala',
+ regex: '(?=\\w+\\s*\\()',
+ next: 'pop' },
+ { include: '#all-types' },
+ { defaultToken: 'meta.method.return-type.vala' } ] },
+ { include: '#throws' },
+ { token: 'paren.vala',
+ regex: '{',
+ push:
+ [ { token: 'paren.vala', regex: '(?=})', next: 'pop' },
+ { include: '#code' },
+ { defaultToken: 'meta.method.body.vala' } ] },
+ { defaultToken: 'meta.method.vala' } ] } ],
+ '#namespace':
+ [ { token: 'text',
+ regex: '^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))',
+ push:
+ [ { token: 'text', regex: '(?=;|})', next: 'pop' },
+ { token: 'constant.other.namespace.vala',
+ regex: '\\w+',
+ push:
+ [ { token: 'meta.namespace.vala', regex: '(?=,|;|})', next: 'pop' },
+ { include: '#parens' },
+ { token: 'text',
+ regex: '{',
+ push:
+ [ { token: 'text', regex: '}', next: 'pop' },
+ { include: '#code' } ] },
+ { defaultToken: 'meta.namespace.vala' } ] } ],
+ comment: 'This is not quite right. See the class grammar right now' } ],
+ '#object-types':
+ [ { token: 'storage.type.generic.vala',
+ regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<',
+ push:
+ [ { token: 'storage.type.generic.vala',
+ regex: '>|[^\\w\\s,\\?<\\[()\\]]',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '>|[^\\w\\s,\\?<\\[(?:[,]+)\\]]',
+ next: 'pop' },
+ { include: '#object-types' },
+ { token: 'storage.type.generic.vala',
+ regex: '<',
+ push:
+ [ { token: 'storage.type.generic.vala',
+ regex: '>|[^\\w\\s,\\[\\]<]',
+ next: 'pop' },
+ { defaultToken: 'storage.type.generic.vala' } ],
+ comment: 'This is just to support <>\'s with no actual type prefix' },
+ { defaultToken: 'storage.type.generic.vala' } ] },
+ { token: 'storage.type.object.array.vala',
+ regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*(?=\\[)',
+ push:
+ [ { token: 'storage.type.object.array.vala',
+ regex: '(?=[^\\]\\s])',
+ next: 'pop' },
+ { token: 'text',
+ regex: '\\[',
+ push:
+ [ { token: 'text', regex: '\\]', next: 'pop' },
+ { include: '#code' } ] },
+ { defaultToken: 'storage.type.object.array.vala' } ] },
+ { token:
+ [ 'storage.type.vala',
+ 'keyword.operator.dereference.vala',
+ 'storage.type.vala' ],
+ regex: '\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*\\b)' } ],
+ '#object-types-inherited':
+ [ { token: 'entity.other.inherited-class.vala',
+ regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<',
+ push:
+ [ { token: 'entity.other.inherited-class.vala',
+ regex: '>|[^\\w\\s,<]',
+ next: 'pop' },
+ { include: '#object-types' },
+ { token: 'storage.type.generic.vala',
+ regex: '<',
+ push:
+ [ { token: 'storage.type.generic.vala',
+ regex: '>|[^\\w\\s,<]',
+ next: 'pop' },
+ { defaultToken: 'storage.type.generic.vala' } ],
+ comment: 'This is just to support <>\'s with no actual type prefix' },
+ { defaultToken: 'entity.other.inherited-class.vala' } ] },
+ { token:
+ [ 'entity.other.inherited-class.vala',
+ 'keyword.operator.dereference.vala',
+ 'entity.other.inherited-class.vala' ],
+ regex: '\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*)' } ],
+ '#parameters':
+ [ { token: 'storage.modifier.vala', regex: 'final' },
+ { include: '#primitive-arrays' },
+ { include: '#primitive-types' },
+ { include: '#object-types' },
+ { token: 'variable.parameter.vala', regex: '\\w+' } ],
+ '#parens':
+ [ { token: 'text',
+ regex: '\\(',
+ push:
+ [ { token: 'text', regex: '\\)', next: 'pop' },
+ { include: '#code' } ] } ],
+ '#primitive-arrays':
+ [ { token: 'storage.type.primitive.array.vala',
+ regex: '\\b(?:bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|int8|int16|int32|int64|uint8|uint16|uint32|uint64)(?:\\[\\])*\\b' } ],
+ '#primitive-types':
+ [ { token: 'storage.type.primitive.vala',
+ regex: '\\b(?:var|bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64)\\b',
+ comment: 'var is not really a primitive, but acts like one in most cases' } ],
+ '#storage-modifiers':
+ [ { token: 'storage.modifier.vala',
+ regex: '\\b(?:public|private|protected|internal|static|final|sealed|virtual|override|abstract|readonly|volatile|dynamic|async|unsafe|out|ref|weak|owned|unowned|const)\\b',
+ comment: 'Not sure about unsafe and readonly' } ],
+ '#strings':
+ [ { token: 'punctuation.definition.string.begin.vala',
+ regex: '@"',
+ push:
+ [ { token: 'punctuation.definition.string.end.vala',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.vala',
+ regex: '\\\\.|%[\\w\\.\\-]+|\\$(?:\\w+|\\([\\w\\s\\+\\-\\*\\/]+\\))' },
+ { defaultToken: 'string.quoted.interpolated.vala' } ] },
+ { token: 'punctuation.definition.string.begin.vala',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.vala',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.vala', regex: '\\\\.' },
+ { token: 'constant.character.escape.vala',
+ regex: '%[\\w\\.\\-]+' },
+ { defaultToken: 'string.quoted.double.vala' } ] },
+ { token: 'punctuation.definition.string.begin.vala',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.vala',
+ regex: '\'',
+ next: 'pop' },
+ { token: 'constant.character.escape.vala', regex: '\\\\.' },
+ { defaultToken: 'string.quoted.single.vala' } ] },
+ { token: 'punctuation.definition.string.begin.vala',
+ regex: '"""',
+ push:
+ [ { token: 'punctuation.definition.string.end.vala',
+ regex: '"""',
+ next: 'pop' },
+ { token: 'constant.character.escape.vala',
+ regex: '%[\\w\\.\\-]+' },
+ { defaultToken: 'string.quoted.triple.vala' } ] } ],
+ '#throws':
+ [ { token: 'storage.modifier.vala',
+ regex: 'throws',
+ push:
+ [ { token: 'meta.throwables.vala', regex: '(?={|;)', next: 'pop' },
+ { include: '#object-types' },
+ { defaultToken: 'meta.throwables.vala' } ] } ],
+ '#values':
+ [ { include: '#strings' },
+ { include: '#object-types' },
+ { include: '#constants-and-special-vars' } ] }
+
+ this.normalizeRules();
+};
+
+ValaHighlightRules.metaData = {
+ comment: 'Based heavily on the Java bundle\'s language syntax. TODO:\n* Closures\n* Delegates\n* Properties: Better support for properties.\n* Annotations\n* Error domains\n* Named arguments\n* Array slicing, negative indexes, multidimensional\n* construct blocks\n* lock blocks?\n* regex literals\n* DocBlock syntax highlighting. (Currently importing javadoc)\n* Folding rule for comments.\n',
+ fileTypes: [ 'vala' ],
+ foldingStartMarker: '(\\{\\s*(//.*)?$|^\\s*// \\{\\{\\{)',
+ foldingStopMarker: '^\\s*(\\}|// \\}\\}\\}$)',
+ name: 'Vala',
+ scopeName: 'source.vala' }
+
+
+oop.inherits(ValaHighlightRules, TextHighlightRules);
+
+exports.ValaHighlightRules = ValaHighlightRules;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/vala",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/vala_highlight_rules","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ValaHighlightRules = require("./vala_highlight_rules").ValaHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ this.HighlightRules = ValaHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+ this.$id = "ace/mode/vala"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-vbscript.js b/js/vendor/ace/src-noconflict/mode-vbscript.js
index 073e1ca..0eea0e1 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-vbscript.js
+++ b/js/vendor/ace/src-noconflict/mode-vbscript.js
@@ -1,65 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/vbscript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/vbscript_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var VBScriptHighlightRules = require("./vbscript_highlight_rules").VBScriptHighlightRules;
-
-var Mode = function() {
- var highlighter = new VBScriptHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = ["'", "REM"];
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-
-ace.define('ace/mode/vbscript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/vbscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -88,6 +28,7 @@ var VBScriptHighlightRules = function() {
},
{
token: [
+ "text",
"storage.type.function.asp",
"text",
"entity.name.function.asp",
@@ -96,47 +37,43 @@ var VBScriptHighlightRules = function() {
"variable.parameter.function.asp",
"punctuation.definition.parameters.asp"
],
- regex: "^\\s*((?:Function|Sub))(\\s*)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\)).*\\n?"
+ regex: "^(\\s*)(Function|Sub)(\\s*)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\))"
},
{
token: "punctuation.definition.comment.asp",
regex: "'|REM",
- next: "comment"
+ next: "comment",
+ caseInsensitive: true
},
{
token: [
"keyword.control.asp"
],
- regex: "(?:\\b(If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b)"
+ regex: "\\b(?:If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b",
+ caseInsensitive: true
},
{
- token: [
- "keyword.operator.asp"
- ],
- regex: "(?:\\b(Mod|And|Not|Or|Xor|as)\\b)"
+ token: "keyword.operator.asp",
+ regex: "\\b(?:Mod|And|Not|Or|Xor|as)\\b",
+ caseInsensitive: true
},
{
- token: [
- "storage.type.asp"
- ],
- regex: "Dim|Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo"
+ token: "storage.type.asp",
+ regex: "Dim|Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo",
+ caseInsensitive: true
},
{
- token: [
- "storage.modifier.asp"
- ],
- regex: "(?:\\b(Private|Public|Default)\\b)"
+ token: "storage.modifier.asp",
+ regex: "\\b(?:Private|Public|Default)\\b",
+ caseInsensitive: true
},
{
- token: [
- "constant.language.asp"
- ],
- regex: "(?:\\s*\\b(Empty|False|Nothing|Null|True)\\b)"
+ token: "constant.language.asp",
+ regex: "\\b(?:Empty|False|Nothing|Null|True)\\b",
+ caseInsensitive: true
},
{
- token: [
- "punctuation.definition.string.begin.asp"
- ],
+ token: "punctuation.definition.string.begin.asp",
regex: '"',
next: "string"
},
@@ -147,40 +84,34 @@ var VBScriptHighlightRules = function() {
regex: "(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*"
},
{
- token: [
- "support.class.asp"
- ],
- regex: "(?:\\b(Application|ObjectContext|Request|Response|Server|Session)\\b)"
+ token: "support.class.asp",
+ regex: "\\b(?:Application|ObjectContext|Request|Response|Server|Session)\\b",
+ caseInsensitive: true
},
{
- token: [
- "support.class.collection.asp"
- ],
- regex: "(?:\\b(Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b)"
+ token: "support.class.collection.asp",
+ regex: "\\b(?:Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b",
+ caseInsensitive: true
},
{
- token: [
- "support.constant.asp"
- ],
- regex: "(?:\\b(TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b)"
+ token: "support.constant.asp",
+ regex: "\\b(?:TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b",
+ caseInsensitive: true
},
{
- token: [
- "support.function.asp"
- ],
- regex: "(?:\\b(Lock|Unlock|SetAbort|SetComplete|BianryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b)"
+ token: "support.function.asp",
+ regex: "\\b(?:Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b",
+ caseInsensitive: true
},
{
- token: [
- "support.function.event.asp"
- ],
- regex: "(?:\\b(Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b)"
+ token: "support.function.event.asp",
+ regex: "\\b(?:Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b",
+ caseInsensitive: true
},
{
- token: [
- "support.function.vb.asp"
- ],
- regex: "(?:\\b(Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b)"
+ token: "support.function.vb.asp",
+ regex: "\\b(?:Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b",
+ caseInsensitive: true
},
{
token: [
@@ -189,10 +120,9 @@ var VBScriptHighlightRules = function() {
regex: "-?\\b(?:(?:0(?:x|X)[0-9a-fA-F]*)|(?:(?:[0-9]+\\.?[0-9]*)|(?:\\.[0-9]+))(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"
},
{
- token: [
- "support.type.vb.asp"
- ],
- regex: "(?:\\b(vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b)"
+ token: "support.type.vb.asp",
+ regex: "\\b(?:vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b",
+ caseInsensitive: true
},
{
token: [
@@ -228,10 +158,7 @@ var VBScriptHighlightRules = function() {
],
"state_4": [
{
- token: [
- "meta.odd-tab.spaces",
- "meta.even-tab.spaces"
- ],
+ token: ["meta.odd-tab.spaces", "meta.even-tab.spaces"],
regex: "( )( )?"
},
{
@@ -240,9 +167,7 @@ var VBScriptHighlightRules = function() {
next: "start"
},
{
- token: "meta.leading-space",
- regex: ".",
- next: "state_4"
+ defaultToken: "meta.leading-space"
}
],
"comment": [
@@ -252,8 +177,7 @@ var VBScriptHighlightRules = function() {
next: "start"
},
{
- token: "comment.line.apostrophe.asp",
- regex: "."
+ defaultToken: "comment.line.apostrophe.asp"
}
],
"string": [
@@ -267,8 +191,7 @@ var VBScriptHighlightRules = function() {
next: "start"
},
{
- token: "string.quoted.double.asp",
- regex: "."
+ defaultToken: "string.quoted.double.asp"
}
]
}
@@ -278,4 +201,26 @@ var VBScriptHighlightRules = function() {
oop.inherits(VBScriptHighlightRules, TextHighlightRules);
exports.VBScriptHighlightRules = VBScriptHighlightRules;
-}); \ No newline at end of file
+});
+
+ace.define("ace/mode/vbscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vbscript_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var VBScriptHighlightRules = require("./vbscript_highlight_rules").VBScriptHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = VBScriptHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ["'", "REM"];
+
+ this.$id = "ace/mode/vbscript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-velocity.js b/js/vendor/ace/src-noconflict/mode-velocity.js
index 6a3e8b2..d3424f2 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-velocity.js
+++ b/js/vendor/ace/src-noconflict/mode-velocity.js
@@ -1,474 +1,61 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/velocity', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/velocity_highlight_rules', 'ace/mode/folding/velocity', 'ace/mode/behaviour/html'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var VelocityHighlightRules = require("./velocity_highlight_rules").VelocityHighlightRules;
-var FoldMode = require("./folding/velocity").FoldMode;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
-
-var Mode = function() {
- var highlighter = new VelocityHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- this.$behaviour = new HtmlBehaviour();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
- this.lineCommentStart = "##";
- this.blockComment = {start: "#*", end: "*#"};
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});ace.define('ace/mode/velocity_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/html_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-
-var VelocityHighlightRules = function() {
- HtmlHighlightRules.call(this);
-
- var builtinConstants = lang.arrayToMap(
- ('true|false|null').split('|')
- );
-
- var builtinFunctions = lang.arrayToMap(
- ("_DateTool|_DisplayTool|_EscapeTool|_FieldTool|_MathTool|_NumberTool|_SerializerTool|_SortTool|_StringTool|_XPathTool").split('|')
- );
- var builtinVariables = lang.arrayToMap(
- ('$contentRoot|$foreach').split('|')
- );
-
- var keywords = lang.arrayToMap(
- ("#set|#macro|#include|#parse|" +
- "#if|#elseif|#else|#foreach|" +
- "#break|#end|#stop"
- ).split('|')
- );
-
- this.$rules.start.push(
- {
- token : "comment",
- regex : "##.*$"
- },{
- token : "comment.block", // multi line comment
- regex : "#\\*",
- next : "vm_comment"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinVariables.hasOwnProperty(value))
- return "variable.language";
- else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1)))
- return "support.function";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- if(value.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)$/))
- return "variable";
- return "identifier";
- },
- regex : "[a-zA-Z$#][a-zA-Z0-9_]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|"
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- );
-
- this.$rules["vm_comment"] = [
- {
- token : "comment", // closing comment
- regex : "\\*#|-->",
- next : "start"
- }, {
- defaultToken: "comment"
- }
- ];
-
- this.$rules["vm_start"] = [
+var DocCommentHighlightRules = function() {
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ },
+ DocCommentHighlightRules.getTagRule(),
{
- token: "variable",
- regex: "}",
- next: "pop"
- }, {
- token : "string.regexp",
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : "constant.numeric", // hex
- regex : "0[xX][0-9a-fA-F]+\\b"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "constant.language.boolean",
- regex : "(?:true|false)\\b"
- }, {
- token : function(value) {
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (builtinConstants.hasOwnProperty(value))
- return "constant.language";
- else if (builtinVariables.hasOwnProperty(value))
- return "variable.language";
- else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1)))
- return "support.function";
- else if (value == "debugger")
- return "invalid.deprecated";
- else
- if(value.match(/^(\$[a-zA-Z_$][a-zA-Z0-9_]*)$/))
- return "variable";
- return "identifier";
- },
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
- }, {
- token : "keyword.operator",
- regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|"
- }, {
- token : "lparen",
- regex : "[[({]"
- }, {
- token : "rparen",
- regex : "[\\])}]"
- }, {
- token : "text",
- regex : "\\s+"
- }
- ];
-
- for (var i in this.$rules) {
- this.$rules[i].unshift({
- token: "variable",
- regex: "\\${",
- push: "vm_start"
- });
- }
-
- this.normalizeRules();
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
};
-oop.inherits(VelocityHighlightRules, TextHighlightRules);
-
-exports.VelocityHighlightRules = VelocityHighlightRules;
-});
-
-ace.define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-
-var tagMap = lang.createMap({
- a : 'anchor',
- button : 'form',
- form : 'form',
- img : 'image',
- input : 'form',
- label : 'form',
- script : 'script',
- select : 'form',
- textarea : 'form',
- style : 'style',
- table : 'table',
- tbody : 'table',
- td : 'table',
- tfoot : 'table',
- th : 'table',
- tr : 'table'
-});
-
-var HtmlHighlightRules = function() {
- XmlHighlightRules.call(this);
-
- this.addRules({
- attributes: [{
- include : "space"
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "keyword.operator.separator",
- regex : "=",
- push : [{
- include: "space",
- }, {
- token : "string",
- regex : "[^<>='\"`\\s]+",
- next : "pop"
- }, {
- token : "empty",
- regex : "",
- next : "pop"
- }]
- }, {
- include : "string"
- }],
- tag: [{
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "(</)([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
- }],
- start_tag_stuff: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- });
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
- this.embedTagRules(CssHighlightRules, "css-", "style");
- this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
- if (this.constructor === HtmlHighlightRules)
- this.normalizeRules();
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
};
-oop.inherits(HtmlHighlightRules, XmlHighlightRules);
-
-exports.HtmlHighlightRules = HtmlHighlightRules;
-});
-
-ace.define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
-var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
-var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
-var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
-var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
-
-var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
-var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
-
-var CssHighlightRules = function() {
-
- var keywordMapper = this.createKeywordMapper({
- "support.function": supportFunction,
- "support.constant": supportConstant,
- "support.type": supportType,
- "support.constant.color": supportConstantColor,
- "support.constant.fonts": supportConstantFonts
- }, "text", true);
-
- this.$rules = {
- "start" : [{
- token : "comment", // multi line comment
- regex : "\\/\\*",
- push : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- push: "ruleset"
- }, {
- token: "string",
- regex: "@.*?{",
- push: "media"
- }, {
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- }, {
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- }, {
- token: "string",
- regex: ":[a-z0-9-_]+"
- }, {
- token: "constant",
- regex: "[a-z0-9-_]+"
- }, {
- caseInsensitive: true
- }],
-
- "media" : [{
- token : "comment", // multi line comment
- regex : "\\/\\*",
- push : "comment"
- }, {
- token: "paren.lparen",
- regex: "\\{",
- push: "ruleset"
- }, {
- token: "string",
- regex: "\\}",
- next: "pop"
- }, {
- token: "keyword",
- regex: "#[a-z0-9-_]+"
- }, {
- token: "variable",
- regex: "\\.[a-z0-9-_]+"
- }, {
- token: "string",
- regex: ":[a-z0-9-_]+"
- }, {
- token: "constant",
- regex: "[a-z0-9-_]+"
- }, {
- caseInsensitive: true
- }],
-
- "comment" : [{
- token : "comment",
- regex : "\\*\\/",
- next : "pop"
- }, {
- defaultToken : "comment"
- }],
-
- "ruleset" : [
- {
- token : "paren.rparen",
- regex : "\\}",
- next: "pop"
- }, {
- token : "comment", // multi line comment
- regex : "\\/\\*",
- push : "comment"
- }, {
- token : "string", // single line
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- }, {
- token : "string", // single line
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- }, {
- token : ["constant.numeric", "keyword"],
- regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
- }, {
- token : "constant.numeric",
- regex : numRe
- }, {
- token : "constant.numeric", // hex6 color
- regex : "#[a-f0-9]{6}"
- }, {
- token : "constant.numeric", // hex3 color
- regex : "#[a-f0-9]{3}"
- }, {
- token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
- regex : pseudoElements
- }, {
- token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
- regex : pseudoClasses
- }, {
- token : ["support.function", "string", "support.function"],
- regex : "(url\\()(.*)(\\))"
- }, {
- token : keywordMapper,
- regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
- }, {
- caseInsensitive: true
- }]
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
};
-
- this.normalizeRules();
};
-oop.inherits(CssHighlightRules, TextHighlightRules);
-exports.CssHighlightRules = CssHighlightRules;
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
});
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaScriptHighlightRules = function() {
+var JavaScriptHighlightRules = function(options) {
var keywordMapper = this.createKeywordMapper({
"variable.language":
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
@@ -589,23 +176,26 @@ var JavaScriptHighlightRules = function() {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
}, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
}, {
token : keywordMapper,
regex : identifierRe
}, {
token : "keyword.operator",
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
next : "start"
}, {
token : "punctuation.operator",
- regex : /\?|\:|\,|\;|\./,
+ regex : /[?:,;.]/,
next : "start"
}, {
token : "paren.lparen",
@@ -615,10 +205,6 @@ var JavaScriptHighlightRules = function() {
token : "paren.rparen",
regex : /[\])}]/
}, {
- token : "keyword.operator",
- regex : /\/=?/,
- next : "start"
- }, {
token: "comment",
regex: /^#!.*$/
}
@@ -653,14 +239,14 @@ var JavaScriptHighlightRules = function() {
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "string.regexp",
- regex: "/\\w*",
+ regex: "/[sxngimy]*",
next: "no_regex"
}, {
token : "invalid",
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
}, {
token : "constant.language.escape",
- regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
}, {
token : "constant.language.delimiter",
regex: /\|/
@@ -678,7 +264,7 @@ var JavaScriptHighlightRules = function() {
],
"regex_character_class": [
{
- token: "regexp.keyword.operator",
+ token: "regexp.charclass.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, {
token: "constant.language.escape",
@@ -712,20 +298,24 @@ var JavaScriptHighlightRules = function() {
}
],
"comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "\\*\\/", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment_regex_allowed" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "start"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"line_comment" : [
+ DocCommentHighlightRules.getTagRule(),
{token : "comment", regex : "$|^", next : "no_regex"},
- {defaultToken : "comment"}
+ {defaultToken : "comment", caseInsensitive: true}
],
"qqstring" : [
{
@@ -760,9 +350,49 @@ var JavaScriptHighlightRules = function() {
}
]
};
-
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+ }
+
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
};
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
@@ -770,111 +400,999 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
});
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+ if (!openBracePos)
+ return null;
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
+ if (text == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
+var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
-var DocCommentHighlightRules = function() {
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
this.$rules = {
- "start" : [ {
- token : "comment.doc.tag",
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
}, {
- token : "comment.doc.tag",
- regex : "\\bTODO\\b"
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ push: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
}, {
- defaultToken : "comment.doc"
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "\\}",
+ next: "pop"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "comment" : [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }],
+
+ "ruleset" : [
+ {
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "pop"
+ }, {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : ["support.function", "string", "support.function"],
+ regex : "(url\\()(.*)(\\))"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
}]
};
+
+ this.normalizeRules();
};
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+oop.inherits(CssHighlightRules, TextHighlightRules);
-DocCommentHighlightRules.getStartRule = function(start) {
- return {
- token : "comment.doc", // doc comment
- regex : "\\/\\*(?=\\*)",
- next : start
- };
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar === ';') {
+ range.end.column ++;
+ return range;
+ }
+ }
+ }
+ });
+
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
};
+oop.inherits(Mode, TextMode);
-DocCommentHighlightRules.getEndRule = function (start) {
- return {
- token : "comment.doc", // closing comment
- regex : "\\*\\/",
- next : start
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
};
-};
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
-});
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -882,75 +1400,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
}, {
- include : "string"
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -963,18 +1491,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -982,14 +1509,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -1001,78 +1528,1085 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ],
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
+ this.defaultMode = defaultMode;
+ this.subModes = subModes;
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+
+ this.$getMode = function(state) {
+ if (typeof state != "string")
+ state = state[0];
+ for (var key in this.subModes) {
+ if (state.indexOf(key) === 0)
+ return this.subModes[key];
+ }
+ return null;
+ };
+
+ this.$tryMode = function(state, session, foldStyle, row) {
+ var mode = this.$getMode(state);
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
+ };
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ return (
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
+ );
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var mode = this.$getMode(session.getState(row-1));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.$getMode(session.getState(row));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.defaultMode;
+
+ return mode.getFoldWidgetRange(session, foldStyle, row);
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return "";
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag)
+ return null;
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
});
-ace.define('ace/mode/folding/velocity', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
+ace.define("ace/mode/velocity_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var VelocityHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var builtinConstants = lang.arrayToMap(
+ ('true|false|null').split('|')
+ );
+
+ var builtinFunctions = lang.arrayToMap(
+ ("_DateTool|_DisplayTool|_EscapeTool|_FieldTool|_MathTool|_NumberTool|_SerializerTool|_SortTool|_StringTool|_XPathTool").split('|')
+ );
+
+ var builtinVariables = lang.arrayToMap(
+ ('$contentRoot|$foreach').split('|')
+ );
+
+ var keywords = lang.arrayToMap(
+ ("#set|#macro|#include|#parse|" +
+ "#if|#elseif|#else|#foreach|" +
+ "#break|#end|#stop"
+ ).split('|')
+ );
+
+ this.$rules.start.push(
+ {
+ token : "comment",
+ regex : "##.*$"
+ },{
+ token : "comment.block", // multi line comment
+ regex : "#\\*",
+ next : "vm_comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : function(value) {
+ if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (builtinConstants.hasOwnProperty(value))
+ return "constant.language";
+ else if (builtinVariables.hasOwnProperty(value))
+ return "variable.language";
+ else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1)))
+ return "support.function";
+ else if (value == "debugger")
+ return "invalid.deprecated";
+ else
+ if(value.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)$/))
+ return "variable";
+ return "identifier";
+ },
+ regex : "[a-zA-Z$#][a-zA-Z0-9_]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ );
+ this.$rules["vm_comment"] = [
+ {
+ token : "comment", // closing comment
+ regex : "\\*#|-->",
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ];
+
+ this.$rules["vm_start"] = [
+ {
+ token: "variable",
+ regex: "}",
+ next: "pop"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : function(value) {
+ if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (builtinConstants.hasOwnProperty(value))
+ return "constant.language";
+ else if (builtinVariables.hasOwnProperty(value))
+ return "variable.language";
+ else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1)))
+ return "support.function";
+ else if (value == "debugger")
+ return "invalid.deprecated";
+ else
+ if(value.match(/^(\$[a-zA-Z_$][a-zA-Z0-9_]*)$/))
+ return "variable";
+ return "identifier";
+ },
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ];
+
+ for (var i in this.$rules) {
+ this.$rules[i].unshift({
+ token: "variable",
+ regex: "\\${",
+ push: "vm_start"
+ });
+ }
+
+ this.normalizeRules();
+};
+
+oop.inherits(VelocityHighlightRules, TextHighlightRules);
+
+exports.VelocityHighlightRules = VelocityHighlightRules;
+});
+
+ace.define("ace/mode/folding/velocity",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -1158,458 +2692,26 @@ oop.inherits(FoldMode, BaseFoldMode);
});
-ace.define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
-
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
-}
-
-var HtmlBehaviour = function () {
-
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var element = token.value;
- if (atCursor){
- var element = element.substring(0, position.column - token.start);
- }
- if (voidElements.indexOf(element) !== -1){
- return;
- }
- return {
- text: '>' + '</' + element + '>',
- selection: [1, 1]
- }
- }
- });
-}
-oop.inherits(HtmlBehaviour, XmlBehaviour);
-
-exports.HtmlBehaviour = HtmlBehaviour;
-});
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
-}
-
-var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
- }
-
- return {
- text: '>' + '</' + tag + '>',
- selection: [1, 1]
- }
- }
- });
-
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
- if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+ace.define("ace/mode/velocity",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/velocity_highlight_rules","ace/mode/folding/velocity"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var VelocityHighlightRules = require("./velocity_highlight_rules").VelocityHighlightRules;
+var FoldMode = require("./folding/velocity").FoldMode;
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-var lang = require("../../lib/lang");
-
-var SAFE_INSERT_IN_TOKENS =
- ["text", "paren.rparen", "punctuation.operator"];
-var SAFE_INSERT_BEFORE_TOKENS =
- ["text", "paren.rparen", "punctuation.operator", "comment"];
-
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
- };
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
- };
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
- CstyleBehaviour.recordAutoInsert(editor, session, "}");
- return {
- text: '{}',
- selection: [1, 1]
- };
- } else {
- CstyleBehaviour.recordMaybeInsert(editor, session, "{");
- return {
- text: '{',
- selection: [1, 1]
- };
- }
- }
- } else if (text == '}') {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- } else if (text == "\n" || text == "\r\n") {
- var closing = "";
- if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
- CstyleBehaviour.clearMaybeInsertedClosing();
- }
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
- if (!openBracePos)
- return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
- var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
- }
- }
- });
-
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- } else {
- maybeInsertedBrackets--;
- }
- }
- });
-
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- CstyleBehaviour.recordAutoInsert(editor, session, ")");
- return {
- text: '()',
- selection: [1, 1]
- };
- }
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- }
- });
-
- this.add("parens", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '[') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- CstyleBehaviour.recordAutoInsert(editor, session, "]");
- return {
- text: '[]',
- selection: [1, 1]
- };
- }
- } else if (text == ']') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ']') {
- var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- }
- });
-
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '[') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ']') {
- range.end.column++;
- return range;
- }
- }
- });
-
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"' || text == "'") {
- var quote = text;
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
- return null;
- }
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
- }
- }
- });
-
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == selected) {
- range.end.column++;
- return range;
- }
- }
- });
-
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = VelocityHighlightRules;
+ this.foldingRules = new FoldMode();
};
+oop.inherits(Mode, HtmlMode);
-oop.inherits(CstyleBehaviour, Behaviour);
+(function() {
+ this.lineCommentStart = "##";
+ this.blockComment = {start: "#*", end: "*#"};
+ this.$id = "ace/mode/velocity";
+}).call(Mode.prototype);
-exports.CstyleBehaviour = CstyleBehaviour;
+exports.Mode = Mode;
});
diff --git a/js/vendor/ace/src-noconflict/mode-verilog.js b/js/vendor/ace/src-noconflict/mode-verilog.js
index 0756e47..6cebd76 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-verilog.js
+++ b/js/vendor/ace/src-noconflict/mode-verilog.js
@@ -1,61 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/verilog', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/verilog_highlight_rules', 'ace/range'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var VerilogHighlightRules = require("./verilog_highlight_rules").VerilogHighlightRules;
-var Range = require("../range").Range;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new VerilogHighlightRules().getRules());
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "//";
- this.blockComment = {start: "/*", end: "*/"};
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-
-ace.define('ace/mode/verilog_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/verilog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -124,3 +68,28 @@ oop.inherits(VerilogHighlightRules, TextHighlightRules);
exports.VerilogHighlightRules = VerilogHighlightRules;
});
+
+ace.define("ace/mode/verilog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/verilog_highlight_rules","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var VerilogHighlightRules = require("./verilog_highlight_rules").VerilogHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = VerilogHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.$id = "ace/mode/verilog";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-vhdl.js b/js/vendor/ace/src-noconflict/mode-vhdl.js
new file mode 100755
index 0000000..d6d4575
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/mode-vhdl.js
@@ -0,0 +1,110 @@
+ace.define("ace/mode/vhdl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var VHDLHighlightRules = function() {
+
+
+
+ var keywords = "access|after|ailas|all|architecture|assert|attribute|"+
+ "begin|block|buffer|bus|case|component|configuration|"+
+ "disconnect|downto|else|elsif|end|entity|file|for|function|"+
+ "generate|generic|guarded|if|impure|in|inertial|inout|is|"+
+ "label|linkage|literal|loop|mapnew|next|of|on|open|"+
+ "others|out|port|process|pure|range|record|reject|"+
+ "report|return|select|shared|subtype|then|to|transport|"+
+ "type|unaffected|united|until|wait|when|while|with";
+
+ var storageType = "bit|bit_vector|boolean|character|integer|line|natural|"+
+ "positive|real|register|severity|signal|signed|"+
+ "std_logic|std_logic_vector|string||text|time|unsigned|"+
+ "variable";
+
+ var storageModifiers = "array|constant";
+
+ var keywordOperators = "abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|sra"+
+ "srl|xnor|xor";
+
+ var builtinConstants = (
+ "true|false|null"
+ );
+
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword.operator": keywordOperators,
+ "keyword": keywords,
+ "constant.language": builtinConstants,
+ "storage.modifier": storageModifiers,
+ "storage.type": storageType
+ }, "identifier", true);
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "string", // " string
+ regex : '".*?"'
+ }, {
+ token : "string", // ' string
+ regex : "'.*?'"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "keyword", // pre-compiler directives
+ regex : "\\s*(?:library|package|use)\\b",
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\'|\\:|\\,|\\;|\\."
+ },{
+ token : "paren.lparen",
+ regex : "[[(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ],
+
+
+ };
+};
+
+oop.inherits(VHDLHighlightRules, TextHighlightRules);
+
+exports.VHDLHighlightRules = VHDLHighlightRules;
+});
+
+ace.define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var VHDLHighlightRules = require("./vhdl_highlight_rules").VHDLHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = VHDLHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+
+ this.$id = "ace/mode/vhdl";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/mode-xml.js b/js/vendor/ace/src-noconflict/mode-xml.js
index ffae5f1..2fc3c95 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-xml.js
+++ b/js/vendor/ace/src-noconflict/mode-xml.js
@@ -1,121 +1,80 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
-var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
-var XmlFoldMode = require("./folding/xml").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
- this.$behaviour = new XmlBehaviour();
- this.foldingRules = new XmlFoldMode();
-};
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.blockComment = {start: "<!--", end: "-->"};
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
-var xmlUtil = require("./xml_util");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -123,75 +82,85 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
}],
- space : [
- {token : "text", regex : "\\s+"}
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
],
-
- reference : [{
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "invalid.illegal", regex : "&"
- }],
-
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ token : "entity.other.attribute-name.xml",
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}, {
- include : "string"
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -204,18 +173,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(<)(" + tag + ")",
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -223,14 +191,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
- regex : "(</)(" + tag + ")",
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
@@ -242,447 +210,155 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
exports.XmlHighlightRules = XmlHighlightRules;
});
-ace.define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-function string(state) {
- return [{
- token : "string",
- regex : '"',
- next : state + "_qqstring"
- }, {
- token : "string",
- regex : "'",
- next : state + "_qstring"
- }];
-}
-
-function multiLineString(quote, state) {
- return [
- {token : "string", regex : quote, next : state},
- {
- token : "constant.language.escape",
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- },
- {defaultToken : "string"}
- ];
-}
-
-exports.tag = function(states, name, nextState, tagMap) {
- states[name] = [{
- token : "text",
- regex : "\\s+"
- }, {
-
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
- if (tagMap[value])
- return "meta.tag.tag-name." + tagMap[value];
- else
- return "meta.tag.tag-name";
- },
- regex : "[-_a-zA-Z0-9:]+",
- next : name + "_embed_attribute_list"
- }, {
- token: "empty",
- regex: "",
- next : name + "_embed_attribute_list"
- }];
-
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
-
- states[name + "_embed_attribute_list"] = [{
- token : "meta.tag.r",
- regex : "/?>",
- next : nextState
- }, {
- token : "keyword.operator",
- regex : "="
- }, {
- token : "entity.other.attribute-name",
- regex : "[-_a-zA-Z0-9:]+"
- }, {
- token : "constant.numeric", // float
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
- }, {
- token : "text",
- regex : "\\s+"
- }].concat(string(name));
-};
-
-});
-
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
- }
-
- return {
- text: '>' + '</' + tag + '>',
- selection: [1, 1]
- }
- }
- });
-
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
- if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
-
-exports.XmlBehaviour = XmlBehaviour;
-});
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-var lang = require("../../lib/lang");
-
-var SAFE_INSERT_IN_TOKENS =
- ["text", "paren.rparen", "punctuation.operator"];
-var SAFE_INSERT_BEFORE_TOKENS =
- ["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
- };
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
- };
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (text == '{') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
return {
- text: '{' + selected + '}',
+ text: quote + selected + quote,
selection: false
};
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
- CstyleBehaviour.recordAutoInsert(editor, session, "}");
- return {
- text: '{}',
- selection: [1, 1]
- };
- } else {
- CstyleBehaviour.recordMaybeInsert(editor, session, "{");
- return {
- text: '{',
- selection: [1, 1]
- };
- }
- }
- } else if (text == '}') {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}') {
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
}
- } else if (text == "\n" || text == "\r\n") {
- var closing = "";
- if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
- CstyleBehaviour.clearMaybeInsertedClosing();
- }
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
- if (!openBracePos)
- return null;
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
- var next_indent = this.$getIndent(line);
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
+ text: "",
+ selection: [1, 1]
};
}
- }
- });
- this.add("braces", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '{') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.end.column, range.end.column + 1);
- if (rightChar == '}') {
- range.end.column++;
- return range;
- } else {
- maybeInsertedBrackets--;
- }
- }
- });
+ if (!token)
+ token = iterator.stepBackward();
- this.add("parens", "insertion", function (state, action, editor, session, text) {
- if (text == '(') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
return {
- text: '()',
+ text: quote + quote,
selection: [1, 1]
};
}
- } else if (text == ')') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ')') {
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '(') {
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ')') {
+ if (rightChar == selected) {
range.end.column++;
return range;
}
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
- if (text == '[') {
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- CstyleBehaviour.recordAutoInsert(editor, session, "]");
- return {
- text: '[]',
- selection: [1, 1]
- };
- }
- } else if (text == ']') {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == ']') {
- var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
- CstyleBehaviour.popAutoInsertedClosing();
- return {
- text: '',
- selection: [1, 1]
- };
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
}
}
- }
- });
-
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && selected == '[') {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == ']') {
- range.end.column++;
- return range;
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
}
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
- if (text == '"' || text == "'") {
- var quote = text;
- var selection = editor.getSelectionRange();
- var selected = session.doc.getTextRange(selection);
- if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
- return null;
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
+
+ if (!token) {
+ return;
}
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
return {
- text: '',
- selection: [1, 1]
+ text: "\n" + indent
};
}
}
@@ -690,27 +366,15 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
- var selected = session.doc.getTextRange(range);
- if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
- var line = session.doc.getLine(range.start.row);
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
- if (rightChar == selected) {
- range.end.column++;
- return range;
- }
- }
- });
-
};
-oop.inherits(CstyleBehaviour, Behaviour);
+oop.inherits(XmlBehaviour, Behaviour);
-exports.CstyleBehaviour = CstyleBehaviour;
+exports.XmlBehaviour = XmlBehaviour;
});
-ace.define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var lang = require("../../lib/lang");
@@ -718,91 +382,118 @@ var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var FoldMode = exports.FoldMode = function(voidElements) {
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
BaseFoldMode.call(this);
this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
};
oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
(function() {
this.getFoldWidget = function(session, foldStyle, row) {
var tag = this._getFirstTagInLine(session, row);
- if (tag.closing)
- return foldStyle == "markbeginend" ? "end" : "";
-
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ if (!tag)
return "";
- if (tag.selfClosing)
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
return "";
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
return "";
return "start";
};
-
this._getFirstTagInLine = function(session, row) {
var tokens = session.getTokens(row);
- var value = "";
+ var tag = new Tag();
+
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
- if (token.type.lastIndexOf("meta.tag", 0) === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
}
-
- return this._parseTag(value);
+
+ return null;
};
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = tag.match(this.tagRe);
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
var column = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
};
this._readTagForward = function(iterator) {
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var start;
-
+
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
}
} while(token = iterator.stepForward());
-
+
return null;
};
@@ -810,32 +501,24 @@ oop.inherits(FoldMode, BaseFoldMode);
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var end;
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
}
} while(token = iterator.stepBackward());
-
+
return null;
};
@@ -846,10 +529,7 @@ oop.inherits(FoldMode, BaseFoldMode);
if (!tag || top.tagName == tag.tagName) {
return stack.pop();
}
- else if (this.voidElements[tag.tagName]) {
- return;
- }
- else if (this.voidElements[top.tagName]) {
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
stack.pop();
continue;
} else {
@@ -861,7 +541,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.getFoldWidgetRange = function(session, foldStyle, row) {
var firstTag = this._getFirstTagInLine(session, row);
- if (!firstTag.match)
+ if (!firstTag)
return null;
var isBackward = firstTag.closing || firstTag.selfClosing;
@@ -869,11 +549,13 @@ oop.inherits(FoldMode, BaseFoldMode);
var tag;
if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
var start = {
row: row,
- column: firstTag.column + firstTag.tagName.length + 2
+ column: firstTag.start.column + firstTag.tagName.length + 2
};
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
while (tag = this._readTagForward(iterator)) {
if (tag.selfClosing) {
if (!stack.length) {
@@ -890,15 +572,15 @@ oop.inherits(FoldMode, BaseFoldMode);
return Range.fromPoints(start, tag.start);
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
var end = {
row: row,
- column: firstTag.column
+ column: firstTag.start.column
};
while (tag = this._readTagBackward(iterator)) {
@@ -915,11 +597,13 @@ oop.inherits(FoldMode, BaseFoldMode);
this._pop(stack, tag);
if (stack.length == 0) {
tag.start.column += tag.tagName.length + 2;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
return Range.fromPoints(tag.start, end);
}
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
@@ -929,3 +613,49 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var XmlFoldMode = require("./folding/xml").FoldMode;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+
+var Mode = function() {
+ this.HighlightRules = XmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.foldingRules = new XmlFoldMode();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.voidElements = lang.arrayToMap([]);
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/xml";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-xquery.js b/js/vendor/ace/src-noconflict/mode-xquery.js
index d19a481..fafafb7 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-xquery.js
+++ b/js/vendor/ace/src-noconflict/mode-xquery.js
@@ -1,418 +1,6 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-ace.define('ace/mode/xquery', ['require', 'exports', 'module' , 'ace/worker/worker_client', 'ace/lib/oop', 'ace/mode/text', 'ace/mode/xquery/XQueryLexer', 'ace/range', 'ace/mode/behaviour/xquery', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var XQueryLexer = require("./xquery/XQueryLexer").XQueryLexer;
-var Range = require("../range").Range;
-var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-
-var Mode = function() {
- this.$tokenizer = new XQueryLexer();
- this.$behaviour = new XQueryBehaviour();
- this.foldingRules = new CStyleFoldMode();
-};
-
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
- var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);
- if (match)
- indent += tab;
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- if (! /^\s+$/.test(line))
- return false;
-
- return /^\s*[\}\)]/.test(input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- var line = doc.getLine(row);
- var match = line.match(/^(\s*[\}\)])/);
-
- if (!match) return 0;
-
- var column = match[1].length;
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
- if (!openBracePos || openBracePos.row == row) return 0;
-
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
- doc.replace(new Range(row, 0, row, column-1), indent);
- };
-
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
- var i, line;
- var outdent = true;
- var re = /^\s*\(:(.*):\)/;
-
- for (i=startRow; i<= endRow; i++) {
- if (!re.test(doc.getLine(i))) {
- outdent = false;
- break;
- }
- }
-
- var range = new Range(0, 0, 0, 0);
- for (i=startRow; i<= endRow; i++) {
- line = doc.getLine(i);
- range.start.row = i;
- range.end.row = i;
- range.end.column = line.length;
-
- doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)");
- }
- };
-
- this.createWorker = function(session) {
-
- var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker");
- var that = this;
-
- worker.attachToDocument(session.getDocument());
-
- worker.on("error", function(e) {
- session.setAnnotations([e.data]);
- });
-
- worker.on("ok", function(e) {
- session.clearAnnotations();
- });
-
- worker.on("highlight", function(tokens) {
- that.$tokenizer.tokens = tokens.data.tokens;
- that.$tokenizer.lines = session.getDocument().getAllLines();
-
- var rows = Object.keys(that.$tokenizer.tokens);
- for(var i=0; i < rows.length; i++) {
- var row = parseInt(rows[i]);
- delete session.bgTokenizer.lines[row];
- delete session.bgTokenizer.states[row];
- session.bgTokenizer.fireUpdateEvent(row, row);
- }
- });
-
- return worker;
- };
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/xquery/XQueryLexer', ['require', 'exports', 'module' , 'ace/mode/xquery/XQueryTokenizer'], function(require, exports, module) {
-
- var XQueryTokenizer = require("./XQueryTokenizer").XQueryTokenizer;
-
- var TokenHandler = function(code) {
-
- var input = code;
-
- this.tokens = [];
-
- this.reset = function(code) {
- input = input;
- this.tokens = [];
- };
-
- this.startNonterminal = function(name, begin) {};
-
- this.endNonterminal = function(name, end) {};
-
- this.terminal = function(name, begin, end) {
- this.tokens.push({
- name: name,
- value: input.substring(begin, end)
- });
- };
-
- this.whitespace = function(begin, end) {
- this.tokens.push({
- name: "WS",
- value: input.substring(begin, end)
- });
- };
- };
-
- var keys = "after|ancestor|ancestor-or-self|and|as|ascending|attribute|before|case|cast|castable|child|collation|comment|copy|count|declare|default|delete|descendant|descendant-or-self|descending|div|document|document-node|element|else|empty|empty-sequence|end|eq|every|except|first|following|following-sibling|for|function|ge|group|gt|idiv|if|import|insert|instance|intersect|into|is|item|last|le|let|lt|mod|modify|module|namespace|namespace-node|ne|node|only|or|order|ordered|parent|preceding|preceding-sibling|processing-instruction|rename|replace|return|satisfies|schema-attribute|schema-element|self|some|stable|start|switch|text|to|treat|try|typeswitch|union|unordered|validate|where|with|xquery|contains|paragraphs|sentences|times|words|by|collectionreturn|variable|version|option|when|encoding|toswitch|catch|tumbling|sliding|window|at|using|stemming|collection|schema|while|on|nodes|index|external|then|in|updating|value|of|containsbreak|loop|continue|exit|returning|append|json|position|strict".split("|");
- var keywords = keys.map(
- function(val) { return { name: "'" + val + "'", token: "keyword" }; }
- );
-
- var ncnames = keys.map(
- function(val) { return { name: "'" + val + "'", token: "text", next: function(stack){ stack.pop(); } }; }
- );
-
- var cdata = "constant.language";
- var number = "constant";
- var xmlcomment = "comment";
- var pi = "xml-pe";
- var pragma = "constant.buildin";
-
- var Rules = {
- start: [
- { name: "'(#'", token: pragma, next: function(stack){ stack.push("Pragma"); } },
- { name: "'(:'", token: "comment", next: function(stack){ stack.push("Comment"); } },
- { name: "'(:~'", token: "comment.doc", next: function(stack){ stack.push("CommentDoc"); } },
- { name: "'<!--'", token: xmlcomment, next: function(stack){ stack.push("XMLComment"); } },
- { name: "'<?'", token: pi, next: function(stack) { stack.push("PI"); } },
- { name: "''''", token: "string", next: function(stack){ stack.push("AposString"); } },
- { name: "'\"'", token: "string", next: function(stack){ stack.push("QuotString"); } },
- { name: "Annotation", token: "support.function" },
- { name: "ModuleDecl", token: "keyword", next: function(stack){ stack.push("Prefix"); } },
- { name: "OptionDecl", token: "keyword", next: function(stack){ stack.push("_EQName"); } },
- { name: "AttrTest", token: "support.type" },
- { name: "Variable", token: "variable" },
- { name: "'<![CDATA['", token: cdata, next: function(stack){ stack.push("CData"); } },
- { name: "IntegerLiteral", token: number },
- { name: "DecimalLiteral", token: number },
- { name: "DoubleLiteral", token: number },
- { name: "Operator", token: "keyword.operator" },
- { name: "EQName", token: function(val) { return keys.indexOf(val) !== -1 ? "keyword" : "support.function"; } },
- { name: "'('", token:"lparen" },
- { name: "')'", token:"rparen" },
- { name: "Tag", token: "meta.tag", next: function(stack){ stack.push("StartTag"); } },
- { name: "'}'", token: "text", next: function(stack){ if(stack.length > 1) stack.pop(); } },
- { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } } //, next: function(stack){ if(stack.length > 1) { stack.pop(); } } }
- ].concat(keywords),
- _EQName: [
- { name: "EQName", token: "text", next: function(stack) { stack.pop(); } }
- ].concat(ncnames),
- Prefix: [
- { name: "NCName", token: "text", next: function(stack) { stack.pop(); } }
- ].concat(ncnames),
- StartTag: [
- { name: "'>'", token: "meta.tag", next: function(stack){ stack.push("TagContent"); } },
- { name: "QName", token: "entity.other.attribute-name" },
- { name: "'='", token: "text" },
- { name: "''''", token: "string", next: function(stack){ stack.push("AposAttr"); } },
- { name: "'\"'", token: "string", next: function(stack){ stack.push("QuotAttr"); } },
- { name: "'/>'", token: "meta.tag.r", next: function(stack){ stack.pop(); } }
- ],
- TagContent: [
- { name: "ElementContentChar", token: "text" },
- { name: "'<![CDATA['", token: cdata, next: function(stack){ stack.push("CData"); } },
- { name: "'<!--'", token: xmlcomment, next: function(stack){ stack.push("XMLComment"); } },
- { name: "Tag", token: "meta.tag", next: function(stack){ stack.push("StartTag"); } },
- { name: "PredefinedEntityRef", token: "constant.language.escape" },
- { name: "CharRef", token: "constant.language.escape" },
- { name: "'{{'", token: "text" },
- { name: "'}}'", token: "text" },
- { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } },
- { name: "EndTag", token: "meta.tag", next: function(stack){ stack.pop(); stack.pop(); } }
- ],
- AposAttr: [
- { name: "''''", token: "string", next: function(stack){ stack.pop(); } },
- { name: "EscapeApos", token: "constant.language.escape" },
- { name: "AposAttrContentChar", token: "string" },
- { name: "PredefinedEntityRef", token: "constant.language.escape" },
- { name: "CharRef", token: "constant.language.escape" },
- { name: "'{{'", token: "string" },
- { name: "'}}'", token: "string" },
- { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } }
- ],
- QuotAttr: [
- { name: "'\"'", token: "string", next: function(stack){ stack.pop(); } },
- { name: "EscapeQuot", token: "constant.language.escape" },
- { name: "QuotAttrContentChar", token: "string" },
- { name: "PredefinedEntityRef", token: "constant.language.escape" },
- { name: "CharRef", token: "constant.language.escape" },
- { name: "'{{'", token: "string" },
- { name: "'}}'", token: "string" },
- { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } }
- ],
- Pragma: [
- { name: "PragmaContents", token: pragma },
- { name: "'#'", token: pragma },
- { name: "'#)'", token: pragma, next: function(stack){ stack.pop(); } }
- ],
- Comment: [
- { name: "CommentContents", token: "comment" },
- { name: "'(:'", token: "comment", next: function(stack){ stack.push("Comment"); } },
- { name: "':)'", token: "comment", next: function(stack){ stack.pop(); } }
- ],
- CommentDoc: [
- { name: "DocCommentContents", token: "comment.doc" },
- { name: "DocTag", token: "comment.doc.tag" },
- { name: "'(:'", token: "comment.doc", next: function(stack){ stack.push("CommentDoc"); } },
- { name: "':)'", token: "comment.doc", next: function(stack){ stack.pop(); } }
- ],
- XMLComment: [
- { name: "DirCommentContents", token: xmlcomment },
- { name: "'-->'", token: xmlcomment, next: function(stack){ stack.pop(); } }
- ],
- CData: [
- { name: "CDataSectionContents", token: cdata },
- { name: "']]>'", token: cdata, next: function(stack){ stack.pop(); } }
- ],
- PI: [
- { name: "DirPIContents", token: pi },
- { name: "'?'", token: pi },
- { name: "'?>'", token: pi, next: function(stack){ stack.pop(); } }
- ],
- AposString: [
- { name: "''''", token: "string", next: function(stack){ stack.pop(); } },
- { name: "PredefinedEntityRef", token: "constant.language.escape" },
- { name: "CharRef", token: "constant.language.escape" },
- { name: "EscapeApos", token: "constant.language.escape" },
- { name: "AposChar", token: "string" }
- ],
- QuotString: [
- { name: "'\"'", token: "string", next: function(stack){ stack.pop(); } },
- { name: "PredefinedEntityRef", token: "constant.language.escape" },
- { name: "CharRef", token: "constant.language.escape" },
- { name: "EscapeQuot", token: "constant.language.escape" },
- { name: "QuotChar", token: "string" }
- ]
- };
-
-exports.XQueryLexer = function() {
-
- this.tokens = [];
-
- this.getLineTokens = function(line, state, row) {
- state = (state === "start" || !state) ? '["start"]' : state;
- var stack = JSON.parse(state);
- var h = new TokenHandler(line);
- var tokenizer = new XQueryTokenizer(line, h);
- var tokens = [];
-
- while(true) {
- var currentState = stack[stack.length - 1];
- try {
-
- h.tokens = [];
- tokenizer["parse_" + currentState]();
- var info = null;
-
- if(h.tokens.length > 1 && h.tokens[0].name === "WS") {
- tokens.push({
- type: "text",
- value: h.tokens[0].value
- });
- h.tokens.splice(0, 1);
- }
-
- var token = h.tokens[0];
- var rules = Rules[currentState];
- for(var k = 0; k < rules.length; k++) {
- var rule = Rules[currentState][k];
- if((typeof(rule.name) === "function" && rule.name(token)) || rule.name === token.name) {
- info = rule;
- break;
- }
- }
-
- if(token.name === "EOF") { break; }
- if(token.value === "") { throw "Encountered empty string lexical rule."; }
-
- tokens.push({
- type: info === null ? "text" : (typeof(info.token) === "function" ? info.token(token.value) : info.token),
- value: token.value
- });
-
- if(info && info.next) {
- info.next(stack);
- }
-
- } catch(e) {
- if(e instanceof tokenizer.ParseException) {
- var index = 0;
- for(var i=0; i < tokens.length; i++) {
- index += tokens[i].value.length;
- }
- tokens.push({ type: "text", value: line.substring(index) });
- return {
- tokens: tokens,
- state: JSON.stringify(["start"])
- };
- } else {
- throw e;
- }
- }
- }
-
-
- if(this.tokens[row] !== undefined) {
- var cachedLine = this.lines[row];
- var begin = sharedStart([line, cachedLine]);
- var diff = cachedLine.length - line.length;
- var idx = 0;
- var col = 0;
- for(var i = 0; i < tokens.length; i++) {
- var token = tokens[i];
- for(var j = 0; j < this.tokens[row].length; j++) {
- var semanticToken = this.tokens[row][j];
- if(
- ((col + token.value.length) <= begin.length && semanticToken.sc === col && semanticToken.ec === (col + token.value.length)) ||
- (semanticToken.sc === (col + diff) && semanticToken.ec === (col + token.value.length + diff))
- ) {
- idx = i;
- tokens[i].type = semanticToken.type;
- }
- }
- col += token.value.length;
- }
- }
-
- return {
- tokens: tokens,
- state: JSON.stringify(stack)
- };
- };
-
- function sharedStart(A) {
- var tem1, tem2, s, A = A.slice(0).sort();
- tem1 = A[0];
- s = tem1.length;
- tem2 = A.pop();
- while(s && tem2.indexOf(tem1) == -1) {
- tem1 = tem1.substring(0, --s);
- }
- return tem1;
- }
-};
-});
-
- ace.define('ace/mode/xquery/XQueryTokenizer', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/xquery/xquery_lexer",["require","exports","module"], function(require, exports, module) {
+module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({
+1:[function(_dereq_,module,exports){
var XQueryTokenizer = exports.XQueryTokenizer = function XQueryTokenizer(string, parsingEventHandler)
{
init(string, parsingEventHandler);
@@ -2231,73 +1819,257 @@ XQueryTokenizer.TOKEN =
"'}'",
"'}}'"
];
- });
-ace.define('ace/mode/behaviour/xquery', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/mode/behaviour/xml', 'ace/token_iterator'], function(require, exports, module) {
+},
+{}],
+2:[function(_dereq_,module,exports){
+'use strict';
- var oop = require("../../lib/oop");
- var Behaviour = require('../behaviour').Behaviour;
- var CstyleBehaviour = require('./cstyle').CstyleBehaviour;
- var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
- var TokenIterator = require("../../token_iterator").TokenIterator;
-
-function hasType(token, type) {
- var hasType = true;
- var typeList = token.type.split('.');
- var needleList = type.split('.');
- needleList.forEach(function(needle){
- if (typeList.indexOf(needle) == -1) {
- hasType = false;
- return false;
- }
- });
- return hasType;
-}
+var TokenHandler = function(code) {
+ var input = code;
+ this.tokens = [];
- var XQueryBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["braces", "parens", "string_dquotes"]); // Get string behaviour
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
- var atCursor = false;
- var state = JSON.parse(state).pop();
- if ((token && token.value === '>') || state !== "StartTag") return;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- var previous = iterator.stepBackward();
- if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) {
- return
- }
- var tag = token.value.substring(1);
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
- }
+ this.reset = function() {
+ input = input;
+ this.tokens = [];
+ };
+
+ this.startNonterminal = function() {};
+ this.endNonterminal = function() {};
- return {
- text: '>' + '</' + tag + '>',
- selection: [1, 1]
+ this.terminal = function(name, begin, end) {
+ this.tokens.push({
+ name: name,
+ value: input.substring(begin, end)
+ });
+ };
+
+ this.whitespace = function(begin, end) {
+ this.tokens.push({
+ name: 'WS',
+ value: input.substring(begin, end)
+ });
+ };
+};
+
+exports.Lexer = function(Tokenizer, Rules) {
+
+ this.tokens = [];
+
+ this.getLineTokens = function(line, state) {
+ state = (state === 'start' || !state) ? '["start"]' : state;
+ var stack = JSON.parse(state);
+ var h = new TokenHandler(line);
+ var tokenizer = new Tokenizer(line, h);
+ var tokens = [];
+
+ while(true) {
+ var currentState = stack[stack.length - 1];
+ try {
+ h.tokens = [];
+ tokenizer['parse_' + currentState]();
+ var info = null;
+
+ if(h.tokens.length > 1 && h.tokens[0].name === 'WS') {
+ tokens.push({
+ type: 'text',
+ value: h.tokens[0].value
+ });
+ h.tokens.splice(0, 1);
+ }
+
+ var token = h.tokens[0];
+ var rules = Rules[currentState];
+ for(var k = 0; k < rules.length; k++) {
+ var rule = Rules[currentState][k];
+ if((typeof(rule.name) === 'function' && rule.name(token)) || rule.name === token.name) {
+ info = rule;
+ break;
+ }
+ }
+
+ if(token.name === 'EOF') { break; }
+ if(token.value === '') { throw 'Encountered empty string lexical rule.'; }
+
+ tokens.push({
+ type: info === null ? 'text' : (typeof(info.token) === 'function' ? info.token(token.value) : info.token),
+ value: token.value
+ });
+
+ if(info && info.next) {
+ info.next(stack);
+ }
+
+ } catch(e) {
+ if(e instanceof tokenizer.ParseException) {
+ var index = 0;
+ for(var i=0; i < tokens.length; i++) {
+ index += tokens[i].value.length;
+ }
+ tokens.push({ type: 'text', value: line.substring(index) });
+ return {
+ tokens: tokens,
+ state: JSON.stringify(['start'])
+ };
+ } else {
+ throw e;
+ }
}
}
- });
- }
- oop.inherits(XQueryBehaviour, Behaviour);
+ return {
+ tokens: tokens,
+ state: JSON.stringify(stack)
+ };
+ };
+};
+},
+{}],
+3:[function(_dereq_,module,exports){
+'use strict';
+
+var XQueryTokenizer = _dereq_('./XQueryTokenizer').XQueryTokenizer;
+var Lexer = _dereq_('./lexer').Lexer;
+
+var keys = 'after|ancestor|ancestor-or-self|and|as|ascending|attribute|before|case|cast|castable|child|collation|comment|copy|count|declare|default|delete|descendant|descendant-or-self|descending|div|document|document-node|element|else|empty|empty-sequence|end|eq|every|except|first|following|following-sibling|for|function|ge|group|gt|idiv|if|import|insert|instance|intersect|into|is|item|last|le|let|lt|mod|modify|module|namespace|namespace-node|ne|node|only|or|order|ordered|parent|preceding|preceding-sibling|processing-instruction|rename|replace|return|satisfies|schema-attribute|schema-element|self|some|stable|start|switch|text|to|treat|try|typeswitch|union|unordered|validate|where|with|xquery|contains|paragraphs|sentences|times|words|by|collectionreturn|variable|version|option|when|encoding|toswitch|catch|tumbling|sliding|window|at|using|stemming|collection|schema|while|on|nodes|index|external|then|in|updating|value|of|containsbreak|loop|continue|exit|returning|append|json|position|strict'.split('|');
+
+var keywords = keys.map(function(val) { return { name: '\'' + val + '\'', token: 'keyword' }; });
+var ncnames = keys.map(function(val) { return { name: '\'' + val + '\'', token: 'text', next: function(stack){ stack.pop(); } }; });
+
+var cdata = 'constant.language';
+var number = 'constant';
+var xmlcomment = 'comment';
+var pi = 'xml-pe';
+var pragma = 'constant.buildin';
+var n = function(name){
+ return '\'' + name + '\'';
+};
+var Rules = {
+ start: [
+ { name: n('(#'), token: pragma, next: function(stack){ stack.push('Pragma'); } },
+ { name: n('(:'), token: 'comment', next: function(stack){ stack.push('Comment'); } },
+ { name: n('(:~'), token: 'comment.doc', next: function(stack){ stack.push('CommentDoc'); } },
+ { name: n('<!--'), token: xmlcomment, next: function(stack){ stack.push('XMLComment'); } },
+ { name: n('<?'), token: pi, next: function(stack) { stack.push('PI'); } },
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.push('AposString'); } },
+ { name: n('"'), token: 'string', next: function(stack){ stack.push('QuotString'); } },
+ { name: 'Annotation', token: 'support.function' },
+ { name: 'ModuleDecl', token: 'keyword', next: function(stack){ stack.push('Prefix'); } },
+ { name: 'OptionDecl', token: 'keyword', next: function(stack){ stack.push('_EQName'); } },
+ { name: 'AttrTest', token: 'support.type' },
+ { name: 'Variable', token: 'variable' },
+ { name: n('<![CDATA['), token: cdata, next: function(stack){ stack.push('CData'); } },
+ { name: 'IntegerLiteral', token: number },
+ { name: 'DecimalLiteral', token: number },
+ { name: 'DoubleLiteral', token: number },
+ { name: 'Operator', token: 'keyword.operator' },
+ { name: 'EQName', token: function(val) { return keys.indexOf(val) !== -1 ? 'keyword' : 'support.function'; } },
+ { name: n('('), token: 'lparen' },
+ { name: n(')'), token: 'rparen' },
+ { name: 'Tag', token: 'meta.tag', next: function(stack){ stack.push('StartTag'); } },
+ { name: n('}'), token: 'text', next: function(stack){ if(stack.length > 1) { stack.pop(); } } },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } } //, next: function(stack){ if(stack.length > 1) { stack.pop(); } } }
+ ].concat(keywords),
+ _EQName: [
+ { name: 'EQName', token: 'text', next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ Prefix: [
+ { name: 'NCName', token: 'text', next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ StartTag: [
+ { name: n('>'), token: 'meta.tag', next: function(stack){ stack.push('TagContent'); } },
+ { name: 'QName', token: 'entity.other.attribute-name' },
+ { name: n('='), token: 'text' },
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.push('AposAttr'); } },
+ { name: n('"'), token: 'string', next: function(stack){ stack.push('QuotAttr'); } },
+ { name: n('/>'), token: 'meta.tag.r', next: function(stack){ stack.pop(); } }
+ ],
+ TagContent: [
+ { name: 'ElementContentChar', token: 'text' },
+ { name: n('<![CDATA['), token: cdata, next: function(stack){ stack.push('CData'); } },
+ { name: n('<!--'), token: xmlcomment, next: function(stack){ stack.push('XMLComment'); } },
+ { name: 'Tag', token: 'meta.tag', next: function(stack){ stack.push('StartTag'); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'text' },
+ { name: n('}}'), token: 'text' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } },
+ { name: 'EndTag', token: 'meta.tag', next: function(stack){ stack.pop(); stack.pop(); } }
+ ],
+ AposAttr: [
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'EscapeApos', token: 'constant.language.escape' },
+ { name: 'AposAttrContentChar', token: 'string' },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'string' },
+ { name: n('}}'), token: 'string' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } }
+ ],
+ QuotAttr: [
+ { name: n('\"'), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'EscapeQuot', token: 'constant.language.escape' },
+ { name: 'QuotAttrContentChar', token: 'string' },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'string' },
+ { name: n('}}'), token: 'string' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } }
+ ],
+ Pragma: [
+ { name: 'PragmaContents', token: pragma },
+ { name: n('#'), token: pragma },
+ { name: n('#)'), token: pragma, next: function(stack){ stack.pop(); } }
+ ],
+ Comment: [
+ { name: 'CommentContents', token: 'comment' },
+ { name: n('(:'), token: 'comment', next: function(stack){ stack.push('Comment'); } },
+ { name: n(':)'), token: 'comment', next: function(stack){ stack.pop(); } }
+ ],
+ CommentDoc: [
+ { name: 'DocCommentContents', token: 'comment.doc' },
+ { name: 'DocTag', token: 'comment.doc.tag' },
+ { name: n('(:'), token: 'comment.doc', next: function(stack){ stack.push('CommentDoc'); } },
+ { name: n(':)'), token: 'comment.doc', next: function(stack){ stack.pop(); } }
+ ],
+ XMLComment: [
+ { name: 'DirCommentContents', token: xmlcomment },
+ { name: n('-->'), token: xmlcomment, next: function(stack){ stack.pop(); } }
+ ],
+ CData: [
+ { name: 'CDataSectionContents', token: cdata },
+ { name: n(']]>'), token: cdata, next: function(stack){ stack.pop(); } }
+ ],
+ PI: [
+ { name: 'DirPIContents', token: pi },
+ { name: n('?'), token: pi },
+ { name: n('?>'), token: pi, next: function(stack){ stack.pop(); } }
+ ],
+ AposString: [
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: 'EscapeApos', token: 'constant.language.escape' },
+ { name: 'AposChar', token: 'string' }
+ ],
+ QuotString: [
+ { name: n('"'), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: 'EscapeQuot', token: 'constant.language.escape' },
+ { name: 'QuotChar', token: 'string' }
+ ]
+};
+
+exports.XQueryLexer = function(){ return new Lexer(XQueryTokenizer, Rules); };
+},
+{"./XQueryTokenizer":1,"./lexer":2}]},{},[3])
+(3)
- exports.XQueryBehaviour = XQueryBehaviour;
});
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
@@ -2309,92 +2081,53 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
};
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
};
+};
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
- if (/[\]\}\)]/.test(line[cursor.column])) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
return {
text: '{}',
@@ -2409,6 +2142,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -2421,51 +2155,57 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == '}' || closing !== "") {
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (rightChar === '}') {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;
-
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
var next_indent = this.$getIndent(line);
-
- return {
- text: '\n' + indent + '\n' + next_indent + closing,
- selection: [1, indent.length, 1, indent.length]
- };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
}
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -2474,6 +2214,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -2490,9 +2231,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -2502,15 +2244,13 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -2519,6 +2259,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -2535,9 +2276,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -2547,62 +2289,59 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
- if (leftChar == '\\') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
return null;
+
+ var stringBefore = token && /string/.test(token.type);
+ var stringAfter = !rightToken || /string/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
}
- var tokens = session.getTokens(selection.start.row);
- var col = 0, token;
- var quotepos = -1; // Track whether we're inside an open quote.
-
- for (var x = 0; x < tokens.length; x++) {
- token = tokens[x];
- if (token.type == "string") {
- quotepos = -1;
- } else if (quotepos < 0) {
- quotepos = token.value.indexOf(quote);
- }
- if ((token.value.length + col) > selection.start.column) {
- break;
- }
- col += tokens[x].value.length;
- }
- if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
- return;
- return {
- text: quote + quote,
- selection: [1,1]
- };
- } else if (token && token.type === "string") {
- var rightChar = line.substring(cursor.column, cursor.column + 1);
- if (rightChar == quote) {
- return {
- text: '',
- selection: [1, 1]
- };
- }
- }
+ return {
+ text: pair ? quote + quote : "",
+ selection: [1,1]
+ };
}
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -2614,40 +2353,276 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
});
-ace.define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
-
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
if (text == '>') {
var position = editor.getCursorPosition();
var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ }
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define("ace/mode/behaviour/xquery",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+ var oop = require("../../lib/oop");
+ var Behaviour = require('../behaviour').Behaviour;
+ var CstyleBehaviour = require('./cstyle').CstyleBehaviour;
+ var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+ var TokenIterator = require("../../token_iterator").TokenIterator;
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+ var XQueryBehaviour = function () {
+
+ this.inherit(CstyleBehaviour, ["braces", "parens", "string_dquotes"]); // Get string behaviour
+ this.inherit(XmlBehaviour); // Get xml behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
var atCursor = false;
+ var state = JSON.parse(state).pop();
+ if ((token && token.value === '>') || state !== "StartTag") return;
if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
do {
token = iterator.stepBackward();
@@ -2655,10 +2630,11 @@ var XmlBehaviour = function () {
} else {
atCursor = true;
}
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
+ var previous = iterator.stepBackward();
+ if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) {
+ return
}
- var tag = token.value;
+ var tag = token.value.substring(1);
if (atCursor){
var tag = tag.substring(0, position.column - token.start);
}
@@ -2670,31 +2646,14 @@ var XmlBehaviour = function () {
}
});
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
- if (text == "\n") {
- var cursor = editor.getCursorPosition();
- var line = session.getLine(cursor.row);
- var rightChars = line.substring(cursor.column, cursor.column + 2);
- if (rightChars == '</') {
- var next_indent = this.$getIndent(line);
- var indent = next_indent + session.getTabString();
-
- return {
- text: '\n' + indent + '\n' + next_indent,
- selection: [1, indent.length, 1, indent.length]
- }
- }
- }
- });
-
-}
-oop.inherits(XmlBehaviour, Behaviour);
+ }
+ oop.inherits(XQueryBehaviour, Behaviour);
-exports.XmlBehaviour = XmlBehaviour;
+ exports.XQueryBehaviour = XQueryBehaviour;
});
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
@@ -2713,23 +2672,55 @@ var FoldMode = exports.FoldMode = function(commentRegex) {
oop.inherits(FoldMode, BaseFoldMode);
(function() {
-
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
- this.getFoldWidgetRange = function(session, foldStyle, row) {
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, row);
+
var match = line.match(this.foldingStartMarker);
if (match) {
var i = match.index;
if (match[1])
return this.openingBracketBlock(session, match[1], row, i);
-
- return session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
}
- if (foldStyle !== "markbeginend")
+ if (foldStyle === "markbegin")
return;
var match = line.match(this.foldingStopMarker);
@@ -2742,7 +2733,236 @@ oop.inherits(FoldMode, BaseFoldMode);
return session.getCommentFoldRange(row, i, -1);
}
};
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/xquery",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/xquery_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var XQueryLexer = require("./xquery/xquery_lexer").XQueryLexer;
+var Range = require("../range").Range;
+var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var Anchor = require("../anchor").Anchor;
+
+var Mode = function() {
+ this.$tokenizer = new XQueryLexer();
+ this.$behaviour = new XQueryBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+ this.$highlightRules = new TextHighlightRules();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.completer = {
+ getCompletions: function(editor, session, pos, prefix, callback) {
+ if (!session.$worker)
+ return callback();
+ session.$worker.emit("complete", { data: { pos: pos, prefix: prefix } });
+ session.$worker.on("complete", function(e){
+ callback(null, e.data);
+ });
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);
+ if (match)
+ indent += tab;
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return (/^\s*[\}\)]/).test(input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*[\}\)])/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var i, line;
+ var outdent = true;
+ var re = /^\s*\(:(.*):\)/;
+
+ for (i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ var range = new Range(0, 0, 0, 0);
+ for (i=startRow; i<= endRow; i++) {
+ line = doc.getLine(i);
+ range.start.row = i;
+ range.end.row = i;
+ range.end.column = line.length;
+
+ doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)");
+ }
+ };
+
+ this.createWorker = function(session) {
+
+ var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker");
+ var that = this;
+
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("ok", function(e) {
+ session.clearAnnotations();
+ });
+
+ worker.on("markers", function(e) {
+ session.clearAnnotations();
+ that.addMarkers(e.data, session);
+ });
+
+ worker.on("highlight", function(tokens) {
+ that.$tokenizer.tokens = tokens.data.tokens;
+ that.$tokenizer.lines = session.getDocument().getAllLines();
+
+ var rows = Object.keys(that.$tokenizer.tokens);
+ for(var i=0; i < rows.length; i++) {
+ var row = parseInt(rows[i]);
+ delete session.bgTokenizer.lines[row];
+ delete session.bgTokenizer.states[row];
+ session.bgTokenizer.fireUpdateEvent(row, row);
+ }
+ });
+
+ return worker;
+ };
+
+ this.removeMarkers = function(session) {
+ var markers = session.getMarkers(false);
+ for (var id in markers) {
+ if (markers[id].clazz.indexOf('language_highlight_') === 0) {
+ session.removeMarker(id);
+ }
+ }
+ for (var i = 0; i < session.markerAnchors.length; i++) {
+ session.markerAnchors[i].detach();
+ }
+ session.markerAnchors = [];
+ };
+
+ this.addMarkers = function(annos, mySession) {
+ var _self = this;
+
+ if (!mySession.markerAnchors) mySession.markerAnchors = [];
+ this.removeMarkers(mySession);
+ mySession.languageAnnos = [];
+ annos.forEach(function(anno) {
+ var anchor = new Anchor(mySession.getDocument(), anno.pos.sl, anno.pos.sc || 0);
+ mySession.markerAnchors.push(anchor);
+ var markerId;
+ var colDiff = anno.pos.ec - anno.pos.sc;
+ var rowDiff = anno.pos.el - anno.pos.sl;
+ var gutterAnno = {
+ guttertext: anno.message,
+ type: anno.level || "warning",
+ text: anno.message
+ };
+
+ function updateFloat(single) {
+ if (markerId)
+ mySession.removeMarker(markerId);
+ gutterAnno.row = anchor.row;
+ if (anno.pos.sc !== undefined && anno.pos.ec !== undefined) {
+ var range = new Range(anno.pos.sl, anno.pos.sc, anno.pos.el, anno.pos.ec);
+ markerId = mySession.addMarker(range, "language_highlight_" + (anno.type ? anno.type : "default"));
+ }
+ if (single) mySession.setAnnotations(mySession.languageAnnos);
+ }
+ updateFloat();
+ anchor.on("change", function() {
+ updateFloat(true);
+ });
+ if (anno.message) mySession.languageAnnos.push(gutterAnno);
+ });
+ mySession.setAnnotations(mySession.languageAnnos);
+ };
+
+ this.$id = "ace/mode/xquery";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/js/vendor/ace/src-noconflict/mode-yaml.js b/js/vendor/ace/src-noconflict/mode-yaml.js
index d72b623..bb1b164 100644..100755
--- a/js/vendor/ace/src-noconflict/mode-yaml.js
+++ b/js/vendor/ace/src-noconflict/mode-yaml.js
@@ -1,84 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/mode/yaml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/yaml_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/folding/coffee'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var YamlHighlightRules = require("./yaml_highlight_rules").YamlHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var FoldMode = require("./folding/coffee").FoldMode;
-
-var Mode = function() {
- this.$tokenizer = new Tokenizer(new YamlHighlightRules().getRules());
- this.$outdent = new MatchingBraceOutdent();
- this.foldingRules = new FoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
- this.lineCommentStart = "#";
-
- this.getNextLineIndent = function(state, line, tab) {
- var indent = this.$getIndent(line);
-
- if (state == "start") {
- var match = line.match(/^.*[\{\(\[]\s*$/);
- if (match) {
- indent += tab;
- }
- }
-
- return indent;
- };
-
- this.checkOutdent = function(state, line, input) {
- return this.$outdent.checkOutdent(line, input);
- };
-
- this.autoOutdent = function(state, doc, row) {
- this.$outdent.autoOutdent(doc, row);
- };
-
-
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});
-
-ace.define('ace/mode/yaml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
+ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -118,14 +39,14 @@ var YamlHighlightRules = function() {
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
token : "string", // multi line string start
- regex : '[\\|>]\\w*',
+ regex : '[|>][-+\\d\\s]*$',
next : "qqstring"
}, {
token : "string", // single quoted string
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
}, {
token : "constant.numeric", // float
- regex : /[+\-]?[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?\b/
+ regex : /(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)/
}, {
token : "constant.numeric", // other number
regex : /[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/
@@ -133,9 +54,6 @@ var YamlHighlightRules = function() {
token : "constant.language.boolean",
regex : "(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"
}, {
- token : "invalid.illegal", // comments are not allowed
- regex : "\\/\\/.*$"
- }, {
token : "paren.lparen",
regex : "[[({]"
}, {
@@ -161,8 +79,8 @@ oop.inherits(YamlHighlightRules, TextHighlightRules);
exports.YamlHighlightRules = YamlHighlightRules;
});
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
var Range = require("../range").Range;
@@ -201,8 +119,8 @@ var MatchingBraceOutdent = function() {};
exports.MatchingBraceOutdent = MatchingBraceOutdent;
});
-ace.define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
-
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -287,3 +205,52 @@ oop.inherits(FoldMode, BaseFoldMode);
}).call(FoldMode.prototype);
});
+
+ace.define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var YamlHighlightRules = require("./yaml_highlight_rules").YamlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = YamlHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+
+ this.$id = "ace/mode/yaml";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/abap.js b/js/vendor/ace/src-noconflict/snippets/abap.js
index 573deed..0ef2911 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/abap.js
+++ b/js/vendor/ace/src-noconflict/snippets/abap.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/abap', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/abap",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "abap";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/abc.js b/js/vendor/ace/src-noconflict/snippets/abc.js
new file mode 100755
index 0000000..1703076
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/abc.js
@@ -0,0 +1,38 @@
+ace.define("ace/snippets/abc",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "\n\
+snippet zupfnoter.print\n\
+ %%%%hn.print {\"startpos\": ${1:pos_y}, \"t\":\"${2:title}\", \"v\":[${3:voices}], \"s\":[[${4:syncvoices}1,2]], \"f\":[${5:flowlines}], \"sf\":[${6:subflowlines}], \"j\":[${7:jumplines}]}\n\
+\n\
+snippet zupfnoter.note\n\
+ %%%%hn.note {\"pos\": [${1:pos_x},${2:pos_y}], \"text\": \"${3:text}\", \"style\": \"${4:style}\"}\n\
+\n\
+snippet zupfnoter.annotation\n\
+ %%%%hn.annotation {\"id\": \"${1:id}\", \"pos\": [${2:pos}], \"text\": \"${3:text}\"}\n\
+\n\
+snippet zupfnoter.lyrics\n\
+ %%%%hn.lyrics {\"pos\": [${1:x_pos},${2:y_pos}]}\n\
+\n\
+snippet zupfnoter.legend\n\
+ %%%%hn.legend {\"pos\": [${1:x_pos},${2:y_pos}]}\n\
+\n\
+\n\
+\n\
+snippet zupfnoter.target\n\
+ \"^:${1:target}\"\n\
+\n\
+snippet zupfnoter.goto\n\
+ \"^@${1:target}@${2:distance}\"\n\
+\n\
+snippet zupfnoter.annotationref\n\
+ \"^#${1:target}\"\n\
+\n\
+snippet zupfnoter.annotation\n\
+ \"^!${1:text}@${2:x_offset},${3:y_offset}\"\n\
+\n\
+\n\
+";
+exports.scope = "abc";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/actionscript.js b/js/vendor/ace/src-noconflict/snippets/actionscript.js
index 5d14406..04eaf96 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/actionscript.js
+++ b/js/vendor/ace/src-noconflict/snippets/actionscript.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/actionscript', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/actionscript",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet main\n\
package {\n\
@@ -34,13 +34,9 @@ snippet all\n\
${1:public|internal|final} class ${2:name} ${3:extends } {\n\
private|public| static const FOO = \"abc\";\n\
private|public| static var BAR = \"abc\";\n\
-\n\
- // class initializer - no JIT !! one time setup\n\
if Cababilities.os == \"Linux|MacOS\" {\n\
FOO = \"other\";\n\
}\n\
-\n\
- // constructor:\n\
public function $2 ( ){\n\
super2();\n\
trace(\"start\");\n\
@@ -53,7 +49,6 @@ snippet all\n\
}\n\
\n\
function A(){\n\
- // A can only be accessed within this file\n\
}\n\
snippet switch\n\
switch(${1}){\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/ada.js b/js/vendor/ace/src-noconflict/snippets/ada.js
index 2ffb4ac..656608a 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/ada.js
+++ b/js/vendor/ace/src-noconflict/snippets/ada.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/ada', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/ada",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "ada";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/apache_conf.js b/js/vendor/ace/src-noconflict/snippets/apache_conf.js
new file mode 100755
index 0000000..0f38e54
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/apache_conf.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/apache_conf",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "apache_conf";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/applescript.js b/js/vendor/ace/src-noconflict/snippets/applescript.js
new file mode 100755
index 0000000..6b59011
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/applescript.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/applescript",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "applescript";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/asciidoc.js b/js/vendor/ace/src-noconflict/snippets/asciidoc.js
index a0f6d84..ef22c02 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/asciidoc.js
+++ b/js/vendor/ace/src-noconflict/snippets/asciidoc.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/asciidoc', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/asciidoc",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "asciidoc";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/assembly_x86.js b/js/vendor/ace/src-noconflict/snippets/assembly_x86.js
index 13d226c..b3c3cd3 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/assembly_x86.js
+++ b/js/vendor/ace/src-noconflict/snippets/assembly_x86.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/assembly_x86', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/assembly_x86",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "assembly_x86";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/autohotkey.js b/js/vendor/ace/src-noconflict/snippets/autohotkey.js
index 2cc46bc..61c8ad4 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/autohotkey.js
+++ b/js/vendor/ace/src-noconflict/snippets/autohotkey.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/autohotkey', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/autohotkey",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "autohotkey";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/batchfile.js b/js/vendor/ace/src-noconflict/snippets/batchfile.js
index c6dea23..619f57d 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/batchfile.js
+++ b/js/vendor/ace/src-noconflict/snippets/batchfile.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/batchfile', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/batchfile",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "batchfile";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/c9search.js b/js/vendor/ace/src-noconflict/snippets/c9search.js
index fdd051e..78ea3da 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/c9search.js
+++ b/js/vendor/ace/src-noconflict/snippets/c9search.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/c9search', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/c9search",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "c9search";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/c_cpp.js b/js/vendor/ace/src-noconflict/snippets/c_cpp.js
index 95d09c8..a232b56 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/c_cpp.js
+++ b/js/vendor/ace/src-noconflict/snippets/c_cpp.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/c_cpp', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/c_cpp",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "## STL Collections\n\
# std::array\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/cirru.js b/js/vendor/ace/src-noconflict/snippets/cirru.js
new file mode 100755
index 0000000..02ef1f3
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/cirru.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/cirru",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "cirru";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/clojure.js b/js/vendor/ace/src-noconflict/snippets/clojure.js
index a04772f..49f23ca 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/clojure.js
+++ b/js/vendor/ace/src-noconflict/snippets/clojure.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/clojure', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/clojure",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet comm\n\
(comment\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/cobol.js b/js/vendor/ace/src-noconflict/snippets/cobol.js
index 8338738..760727c 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/cobol.js
+++ b/js/vendor/ace/src-noconflict/snippets/cobol.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/cobol', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/cobol",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "cobol";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/coffee.js b/js/vendor/ace/src-noconflict/snippets/coffee.js
index 3c690a4..eb1a76d 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/coffee.js
+++ b/js/vendor/ace/src-noconflict/snippets/coffee.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/coffee', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/coffee",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "# Closure loop\n\
snippet forindo\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/coldfusion.js b/js/vendor/ace/src-noconflict/snippets/coldfusion.js
index f64b607..1a91f96 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/coldfusion.js
+++ b/js/vendor/ace/src-noconflict/snippets/coldfusion.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/coldfusion', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/coldfusion",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "coldfusion";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/csharp.js b/js/vendor/ace/src-noconflict/snippets/csharp.js
index cccf4c5..96b9174 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/csharp.js
+++ b/js/vendor/ace/src-noconflict/snippets/csharp.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/csharp', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/csharp",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "csharp";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/css.js b/js/vendor/ace/src-noconflict/snippets/css.js
index 79fbb1f..db5a8c0 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/css.js
+++ b/js/vendor/ace/src-noconflict/snippets/css.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/css', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/css",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet .\n\
${1} {\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/curly.js b/js/vendor/ace/src-noconflict/snippets/curly.js
index 0b8d507..1b2b687 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/curly.js
+++ b/js/vendor/ace/src-noconflict/snippets/curly.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/curly', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/curly",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "curly";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/d.js b/js/vendor/ace/src-noconflict/snippets/d.js
index bb10755..729741c 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/d.js
+++ b/js/vendor/ace/src-noconflict/snippets/d.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/d', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/d",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "d";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/dart.js b/js/vendor/ace/src-noconflict/snippets/dart.js
index a256ee3..e96cc5d 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/dart.js
+++ b/js/vendor/ace/src-noconflict/snippets/dart.js
@@ -1,17 +1,20 @@
-ace.define('ace/snippets/dart', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/dart",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet lib\n\
- #library('${1}');\n\
+ library ${1};\n\
${2}\n\
snippet im\n\
- #import('${1}');\n\
+ import '${1}';\n\
+ ${2}\n\
+snippet pa\n\
+ part '${1}';\n\
${2}\n\
-snippet so\n\
- #source('${1}');\n\
+snippet pao\n\
+ part of ${1};\n\
${2}\n\
snippet main\n\
- static void main() {\n\
+ void main() {\n\
${1:/* code */}\n\
}\n\
snippet st\n\
@@ -26,8 +29,6 @@ snippet th\n\
throw ${1}\n\
snippet cl\n\
class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\
-snippet in\n\
- interface ${1:`Filename(\"\", \"untitled\")`} ${2}\n\
snippet imp\n\
implements ${1}\n\
snippet ext\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/diff.js b/js/vendor/ace/src-noconflict/snippets/diff.js
index d39023c..8fe075e 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/diff.js
+++ b/js/vendor/ace/src-noconflict/snippets/diff.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/diff', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/diff",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "# DEP-3 (http://dep.debian.net/deps/dep3/) style patch header\n\
snippet header DEP-3 style header\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/django.js b/js/vendor/ace/src-noconflict/snippets/django.js
index 97eefc0..c1dacbe 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/django.js
+++ b/js/vendor/ace/src-noconflict/snippets/django.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/django', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/django",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "# Model Fields\n\
\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/dockerfile.js b/js/vendor/ace/src-noconflict/snippets/dockerfile.js
new file mode 100755
index 0000000..981cee8
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/dockerfile.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/dockerfile",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "dockerfile";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/dot.js b/js/vendor/ace/src-noconflict/snippets/dot.js
index 2a6d2b7..3a09fc7 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/dot.js
+++ b/js/vendor/ace/src-noconflict/snippets/dot.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/dot', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/dot",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "dot";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/eiffel.js b/js/vendor/ace/src-noconflict/snippets/eiffel.js
new file mode 100755
index 0000000..2567278
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/eiffel.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/eiffel",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "eiffel";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/ejs.js b/js/vendor/ace/src-noconflict/snippets/ejs.js
index bdeec6c..fd38fa0 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/ejs.js
+++ b/js/vendor/ace/src-noconflict/snippets/ejs.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/ejs', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/ejs",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "ejs";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/elixir.js b/js/vendor/ace/src-noconflict/snippets/elixir.js
new file mode 100755
index 0000000..d932627
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/elixir.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/elixir",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/elm.js b/js/vendor/ace/src-noconflict/snippets/elm.js
new file mode 100755
index 0000000..a9d06b5
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/elm.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/elm",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "elm";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/erlang.js b/js/vendor/ace/src-noconflict/snippets/erlang.js
index b40f8d1..9598d22 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/erlang.js
+++ b/js/vendor/ace/src-noconflict/snippets/erlang.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/erlang', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/erlang",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "# module and export all\n\
snippet mod\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/forth.js b/js/vendor/ace/src-noconflict/snippets/forth.js
index 831565e..afb1f8a 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/forth.js
+++ b/js/vendor/ace/src-noconflict/snippets/forth.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/forth', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/forth",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "forth";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/ftl.js b/js/vendor/ace/src-noconflict/snippets/ftl.js
index 32c1e78..3b53ad4 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/ftl.js
+++ b/js/vendor/ace/src-noconflict/snippets/ftl.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/ftl', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/ftl",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "ftl";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/gcode.js b/js/vendor/ace/src-noconflict/snippets/gcode.js
new file mode 100755
index 0000000..0ed4a10
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/gcode.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/gcode",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "gcode";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/gherkin.js b/js/vendor/ace/src-noconflict/snippets/gherkin.js
new file mode 100755
index 0000000..2044647
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/gherkin.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/gherkin",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "gherkin";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/gitignore.js b/js/vendor/ace/src-noconflict/snippets/gitignore.js
new file mode 100755
index 0000000..6da54aa
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/gitignore.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/gitignore",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "gitignore";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/glsl.js b/js/vendor/ace/src-noconflict/snippets/glsl.js
index 1098be6..bb8e40d 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/glsl.js
+++ b/js/vendor/ace/src-noconflict/snippets/glsl.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/glsl', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/glsl",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "glsl";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/golang.js b/js/vendor/ace/src-noconflict/snippets/golang.js
index 4c09e14..0a2411d 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/golang.js
+++ b/js/vendor/ace/src-noconflict/snippets/golang.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/golang', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/golang",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "golang";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/groovy.js b/js/vendor/ace/src-noconflict/snippets/groovy.js
index a31dc32..ddeab2c 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/groovy.js
+++ b/js/vendor/ace/src-noconflict/snippets/groovy.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/groovy', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/groovy",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "groovy";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/haml.js b/js/vendor/ace/src-noconflict/snippets/haml.js
index 5019997..2d1c68a 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/haml.js
+++ b/js/vendor/ace/src-noconflict/snippets/haml.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/haml', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/haml",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet t\n\
%table\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/handlebars.js b/js/vendor/ace/src-noconflict/snippets/handlebars.js
new file mode 100755
index 0000000..1764b75
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/handlebars.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/handlebars",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "handlebars";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/haskell.js b/js/vendor/ace/src-noconflict/snippets/haskell.js
index e107ece..2bd8b5a 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/haskell.js
+++ b/js/vendor/ace/src-noconflict/snippets/haskell.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/haskell', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/haskell",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet lang\n\
{-# LANGUAGE ${1:OverloadedStrings} #-}\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/haxe.js b/js/vendor/ace/src-noconflict/snippets/haxe.js
index c7876ea..3769547 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/haxe.js
+++ b/js/vendor/ace/src-noconflict/snippets/haxe.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/haxe', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/haxe",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "haxe";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/html.js b/js/vendor/ace/src-noconflict/snippets/html.js
index 6685767..5b29fd5 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/html.js
+++ b/js/vendor/ace/src-noconflict/snippets/html.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/html', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/html",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "# Some useful Unicode entities\n\
# Non-Breaking Space\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/html_ruby.js b/js/vendor/ace/src-noconflict/snippets/html_ruby.js
index 8e0e753..83676f7 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/html_ruby.js
+++ b/js/vendor/ace/src-noconflict/snippets/html_ruby.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/html_ruby', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/html_ruby",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "html_ruby";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/ini.js b/js/vendor/ace/src-noconflict/snippets/ini.js
index dea4a94..ad9bf52 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/ini.js
+++ b/js/vendor/ace/src-noconflict/snippets/ini.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/ini', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/ini",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "ini";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/io.js b/js/vendor/ace/src-noconflict/snippets/io.js
new file mode 100755
index 0000000..431002b
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/io.js
@@ -0,0 +1,69 @@
+ace.define("ace/snippets/io",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippets = [
+ {
+ "content": "assertEquals(${1:expected}, ${2:expr})",
+ "name": "assertEquals",
+ "scope": "io",
+ "tabTrigger": "ae"
+ },
+ {
+ "content": "${1:${2:newValue} := ${3:Object} }clone do(\n\t$0\n)",
+ "name": "clone do",
+ "scope": "io",
+ "tabTrigger": "cdo"
+ },
+ {
+ "content": "docSlot(\"${1:slotName}\", \"${2:documentation}\")",
+ "name": "docSlot",
+ "scope": "io",
+ "tabTrigger": "ds"
+ },
+ {
+ "content": "(${1:header,}\n\t${2:body}\n)$0",
+ "keyEquivalent": "@(",
+ "name": "Indented Bracketed Line",
+ "scope": "io",
+ "tabTrigger": "("
+ },
+ {
+ "content": "\n\t$0\n",
+ "keyEquivalent": "\r",
+ "name": "Special: Return Inside Empty Parenthesis",
+ "scope": "io meta.empty-parenthesis.io, io meta.comma-parenthesis.io"
+ },
+ {
+ "content": "${1:methodName} := method(${2:args,}\n\t$0\n)",
+ "name": "method",
+ "scope": "io",
+ "tabTrigger": "m"
+ },
+ {
+ "content": "newSlot(\"${1:slotName}\", ${2:defaultValue}, \"${3:docString}\")$0",
+ "name": "newSlot",
+ "scope": "io",
+ "tabTrigger": "ns"
+ },
+ {
+ "content": "${1:name} := Object clone do(\n\t$0\n)",
+ "name": "Object clone do",
+ "scope": "io",
+ "tabTrigger": "ocdo"
+ },
+ {
+ "content": "test${1:SomeFeature} := method(\n\t$0\n)",
+ "name": "testMethod",
+ "scope": "io",
+ "tabTrigger": "ts"
+ },
+ {
+ "content": "${1:Something}Test := ${2:UnitTest} clone do(\n\t$0\n)",
+ "name": "UnitTest",
+ "scope": "io",
+ "tabTrigger": "ut"
+ }
+];
+exports.scope = "io";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/jack.js b/js/vendor/ace/src-noconflict/snippets/jack.js
new file mode 100755
index 0000000..eca7f29
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/jack.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/jack",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "jack";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/jade.js b/js/vendor/ace/src-noconflict/snippets/jade.js
index 964ddf4..f516d0c 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/jade.js
+++ b/js/vendor/ace/src-noconflict/snippets/jade.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/jade', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/jade",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "jade";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/java.js b/js/vendor/ace/src-noconflict/snippets/java.js
index c397205..e8c57c6 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/java.js
+++ b/js/vendor/ace/src-noconflict/snippets/java.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/java', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/java",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "## Access Modifiers\n\
snippet po\n\
@@ -56,9 +56,6 @@ snippet imp\n\
##\n\
## Comments\n\
snippet /*\n\
- /*\n\
- * ${1}\n\
- */\n\
##\n\
## Constants\n\
snippet co\n\
@@ -139,9 +136,6 @@ snippet findbyid\n\
##\n\
## Javadocs\n\
snippet /**\n\
- /**\n\
- * ${1}\n\
- */\n\
snippet @au\n\
@author `system(\"grep \\`id -un\\` /etc/passwd | cut -d \\\":\\\" -f5 | cut -d \\\",\\\" -f1\")`\n\
snippet @br\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/javascript.js b/js/vendor/ace/src-noconflict/snippets/javascript.js
index c8845fb..c6f1876 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/javascript.js
+++ b/js/vendor/ace/src-noconflict/snippets/javascript.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/javascript', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/javascript",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "# Prototype\n\
snippet proto\n\
@@ -13,7 +13,7 @@ snippet fun\n\
}\n\
# Anonymous Function\n\
regex /((=)\\s*|(:)\\s*|(\\()|\\b)/f/(\\))?/\n\
-name f\n\
+snippet f\n\
function${M1?: ${1:functionName}}($2) {\n\
${0:$TM_SELECTED_TEXT}\n\
}${M2?;}${M3?,}${M4?)}\n\
@@ -103,10 +103,6 @@ snippet has\n\
hasOwnProperty(${1})\n\
# docstring\n\
snippet /**\n\
- /**\n\
- * ${1:description}\n\
- *\n\
- */\n\
snippet @par\n\
regex /^\\s*\\*\\s*/@(para?m?)?/\n\
@param {${1:type}} ${2:name} ${3:description}\n\
@@ -130,21 +126,12 @@ snippet sdf\n\
# singleton\n\
snippet sing\n\
function ${1:Singleton} (${2:argument}) {\n\
- // the cached instance\n\
var instance;\n\
-\n\
- // rewrite the constructor\n\
$1 = function $1($2) {\n\
return instance;\n\
};\n\
- \n\
- // carry over the prototype properties\n\
$1.prototype = this;\n\
-\n\
- // the instance\n\
instance = new $1();\n\
-\n\
- // reset the constructor pointer\n\
instance.constructor = $1;\n\
\n\
${3:// code ...}\n\
@@ -152,7 +139,7 @@ snippet sing\n\
return instance;\n\
}\n\
# class\n\
-name class\n\
+snippet class\n\
regex /^\\s*/clas{0,2}/\n\
var ${1:class} = function(${20}) {\n\
$40$0\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/json.js b/js/vendor/ace/src-noconflict/snippets/json.js
index 838cfe3..cc02e65 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/json.js
+++ b/js/vendor/ace/src-noconflict/snippets/json.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/json', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/json",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "json";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/jsoniq.js b/js/vendor/ace/src-noconflict/snippets/jsoniq.js
index 533a361..9c5eaf6 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/jsoniq.js
+++ b/js/vendor/ace/src-noconflict/snippets/jsoniq.js
@@ -1,7 +1,68 @@
-ace.define('ace/snippets/jsoniq', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/jsoniq",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText = "snippet for\n\
+ for $${1:item} in ${2:expr}\n\
+snippet return\n\
+ return ${1:expr}\n\
+snippet import\n\
+ import module namespace ${1:ns} = \"${2:http://www.example.com/}\";\n\
+snippet some\n\
+ some $${1:varname} in ${2:expr} satisfies ${3:expr}\n\
+snippet every\n\
+ every $${1:varname} in ${2:expr} satisfies ${3:expr}\n\
+snippet if\n\
+ if(${1:true}) then ${2:expr} else ${3:true}\n\
+snippet switch\n\
+ switch(${1:\"foo\"})\n\
+ case ${2:\"foo\"}\n\
+ return ${3:true}\n\
+ default return ${4:false}\n\
+snippet try\n\
+ try { ${1:expr} } catch ${2:*} { ${3:expr} }\n\
+snippet tumbling\n\
+ for tumbling window $${1:varname} in ${2:expr}\n\
+ start at $${3:start} when ${4:expr}\n\
+ end at $${5:end} when ${6:expr}\n\
+ return ${7:expr}\n\
+snippet sliding\n\
+ for sliding window $${1:varname} in ${2:expr}\n\
+ start at $${3:start} when ${4:expr}\n\
+ end at $${5:end} when ${6:expr}\n\
+ return ${7:expr}\n\
+snippet let\n\
+ let $${1:varname} := ${2:expr}\n\
+snippet group\n\
+ group by $${1:varname} := ${2:expr}\n\
+snippet order\n\
+ order by ${1:expr} ${2:descending}\n\
+snippet stable\n\
+ stable order by ${1:expr}\n\
+snippet count\n\
+ count $${1:varname}\n\
+snippet ordered\n\
+ ordered { ${1:expr} }\n\
+snippet unordered\n\
+ unordered { ${1:expr} }\n\
+snippet treat \n\
+ treat as ${1:expr}\n\
+snippet castable\n\
+ castable as ${1:atomicType}\n\
+snippet cast\n\
+ cast as ${1:atomicType}\n\
+snippet typeswitch\n\
+ typeswitch(${1:expr})\n\
+ case ${2:type} return ${3:expr}\n\
+ default return ${4:expr}\n\
+snippet var\n\
+ declare variable $${1:varname} := ${2:expr};\n\
+snippet fn\n\
+ declare function ${1:ns}:${2:name}(){\n\
+ ${3:expr}\n\
+ };\n\
+snippet module\n\
+ module namespace ${1:ns} = \"${2:http://www.example.com}\";\n\
+";
exports.scope = "jsoniq";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/jsp.js b/js/vendor/ace/src-noconflict/snippets/jsp.js
index a3989e4..6428e5b 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/jsp.js
+++ b/js/vendor/ace/src-noconflict/snippets/jsp.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/jsp', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/jsp",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet @page\n\
<%@page contentType=\"text/html\" pageEncoding=\"UTF-8\"%>\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/jsx.js b/js/vendor/ace/src-noconflict/snippets/jsx.js
index 2a1194a..9f39a94 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/jsx.js
+++ b/js/vendor/ace/src-noconflict/snippets/jsx.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/jsx', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/jsx",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "jsx";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/julia.js b/js/vendor/ace/src-noconflict/snippets/julia.js
index 90127b8..e81370f 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/julia.js
+++ b/js/vendor/ace/src-noconflict/snippets/julia.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/julia', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/julia",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "julia";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/latex.js b/js/vendor/ace/src-noconflict/snippets/latex.js
index 4544311..e6fe761 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/latex.js
+++ b/js/vendor/ace/src-noconflict/snippets/latex.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/latex', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/latex",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "latex";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/lean.js b/js/vendor/ace/src-noconflict/snippets/lean.js
new file mode 100755
index 0000000..cff1657
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/lean.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/lean",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "lean";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/less.js b/js/vendor/ace/src-noconflict/snippets/less.js
index d781e4f..148aa0c 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/less.js
+++ b/js/vendor/ace/src-noconflict/snippets/less.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/less', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/less",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "less";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/liquid.js b/js/vendor/ace/src-noconflict/snippets/liquid.js
index d65e8de..c7f708d 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/liquid.js
+++ b/js/vendor/ace/src-noconflict/snippets/liquid.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/liquid', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/liquid",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "liquid";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/lisp.js b/js/vendor/ace/src-noconflict/snippets/lisp.js
index 21aa795..410b807 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/lisp.js
+++ b/js/vendor/ace/src-noconflict/snippets/lisp.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/lisp', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/lisp",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "lisp";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/live_script.js b/js/vendor/ace/src-noconflict/snippets/live_script.js
new file mode 100755
index 0000000..80a9da8
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/live_script.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/live_script",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/livescript.js b/js/vendor/ace/src-noconflict/snippets/livescript.js
index 3aee2ef..37ea1c1 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/livescript.js
+++ b/js/vendor/ace/src-noconflict/snippets/livescript.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/livescript', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/livescript",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "livescript";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/logiql.js b/js/vendor/ace/src-noconflict/snippets/logiql.js
index 753fd4f..77943f3 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/logiql.js
+++ b/js/vendor/ace/src-noconflict/snippets/logiql.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/logiql', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/logiql",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "logiql";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/lsl.js b/js/vendor/ace/src-noconflict/snippets/lsl.js
index ce68bbd..2bd9ab0 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/lsl.js
+++ b/js/vendor/ace/src-noconflict/snippets/lsl.js
@@ -1,893 +1,1072 @@
-ace.define('ace/snippets/lsl', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/lsl",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet @\n\
- @${1:label}\n\
+ @${1:label};\n\
snippet CAMERA_ACTIVE\n\
- CAMERA_ACTIVE, ${1:integer isActive},\n\
+ CAMERA_ACTIVE, ${1:integer isActive}, $0\n\
snippet CAMERA_BEHINDNESS_ANGLE\n\
- CAMERA_BEHINDNESS_ANGLE, ${1:float degrees},\n\
+ CAMERA_BEHINDNESS_ANGLE, ${1:float degrees}, $0\n\
snippet CAMERA_BEHINDNESS_LAG\n\
- CAMERA_BEHINDNESS_LAG, ${1:float seconds},\n\
+ CAMERA_BEHINDNESS_LAG, ${1:float seconds}, $0\n\
snippet CAMERA_DISTANCE\n\
- CAMERA_DISTANCE, ${1:float meters},\n\
+ CAMERA_DISTANCE, ${1:float meters}, $0\n\
snippet CAMERA_FOCUS\n\
- CAMERA_FOCUS, ${1:vector position},\n\
+ CAMERA_FOCUS, ${1:vector position}, $0\n\
snippet CAMERA_FOCUS_LAG\n\
- CAMERA_FOCUS_LAG, ${1:float seconds},\n\
+ CAMERA_FOCUS_LAG, ${1:float seconds}, $0\n\
snippet CAMERA_FOCUS_LOCKED\n\
- CAMERA_FOCUS_LOCKED, ${1:integer isLocked},\n\
+ CAMERA_FOCUS_LOCKED, ${1:integer isLocked}, $0\n\
snippet CAMERA_FOCUS_OFFSET\n\
- CAMERA_FOCUS_OFFSET, ${1:vector meters},\n\
+ CAMERA_FOCUS_OFFSET, ${1:vector meters}, $0\n\
snippet CAMERA_FOCUS_THRESHOLD\n\
- CAMERA_FOCUS_THRESHOLD, ${1:float meters},\n\
+ CAMERA_FOCUS_THRESHOLD, ${1:float meters}, $0\n\
snippet CAMERA_PITCH\n\
- CAMERA_PITCH, ${1:float degrees},\n\
+ CAMERA_PITCH, ${1:float degrees}, $0\n\
snippet CAMERA_POSITION\n\
- CAMERA_POSITION, ${1:vector position},\n\
+ CAMERA_POSITION, ${1:vector position}, $0\n\
snippet CAMERA_POSITION_LAG\n\
- CAMERA_POSITION_LAG, ${1:float seconds},\n\
+ CAMERA_POSITION_LAG, ${1:float seconds}, $0\n\
snippet CAMERA_POSITION_LOCKED\n\
- CAMERA_POSITION_LOCKED, ${1:integer isLocked},\n\
+ CAMERA_POSITION_LOCKED, ${1:integer isLocked}, $0\n\
snippet CAMERA_POSITION_THRESHOLD\n\
- CAMERA_POSITION_THRESHOLD, ${1:float meters},\n\
+ CAMERA_POSITION_THRESHOLD, ${1:float meters}, $0\n\
snippet CHARACTER_AVOIDANCE_MODE\n\
- CHARACTER_AVOIDANCE_MODE, ${1:integer flags},\n\
+ CHARACTER_AVOIDANCE_MODE, ${1:integer flags}, $0\n\
snippet CHARACTER_DESIRED_SPEED\n\
- CHARACTER_DESIRED_SPEED, ${1:float speed},\n\
+ CHARACTER_DESIRED_SPEED, ${1:float speed}, $0\n\
snippet CHARACTER_DESIRED_TURN_SPEED\n\
- CHARACTER_DESIRED_TURN_SPEED, ${1:float speed},\n\
+ CHARACTER_DESIRED_TURN_SPEED, ${1:float speed}, $0\n\
snippet CHARACTER_LENGTH\n\
- CHARACTER_LENGTH, ${1:float length},\n\
+ CHARACTER_LENGTH, ${1:float length}, $0\n\
snippet CHARACTER_MAX_TURN_RADIUS\n\
- CHARACTER_MAX_TURN_RADIUS, ${1:float radius},\n\
+ CHARACTER_MAX_TURN_RADIUS, ${1:float radius}, $0\n\
snippet CHARACTER_ORIENTATION\n\
- CHARACTER_ORIENTATION, ${1:integer orientation},\n\
+ CHARACTER_ORIENTATION, ${1:integer orientation}, $0\n\
snippet CHARACTER_RADIUS\n\
- CHARACTER_RADIUS, ${1:float radius},\n\
+ CHARACTER_RADIUS, ${1:float radius}, $0\n\
snippet CHARACTER_STAY_WITHIN_PARCEL\n\
- CHARACTER_STAY_WITHIN_PARCEL, ${1:boolean stay},\n\
+ CHARACTER_STAY_WITHIN_PARCEL, ${1:boolean stay}, $0\n\
snippet CHARACTER_TYPE\n\
- CHARACTER_TYPE, ${1:integer type},\n\
+ CHARACTER_TYPE, ${1:integer type}, $0\n\
snippet HTTP_BODY_MAXLENGTH\n\
- HTTP_BODY_MAXLENGTH, ${1:integer length},\n\
+ HTTP_BODY_MAXLENGTH, ${1:integer length}, $0\n\
snippet HTTP_CUSTOM_HEADER\n\
- HTTP_CUSTOM_HEADER, ${1:string name}, ${2:string value},\n\
+ HTTP_CUSTOM_HEADER, ${1:string name}, ${2:string value}, $0\n\
snippet HTTP_METHOD\n\
- HTTP_METHOD, ${1:string method},\n\
+ HTTP_METHOD, ${1:string method}, $0\n\
snippet HTTP_MIMETYPE\n\
- HTTP_MIMETYPE, ${1:string mimeType},\n\
+ HTTP_MIMETYPE, ${1:string mimeType}, $0\n\
snippet HTTP_PRAGMA_NO_CACHE\n\
- HTTP_PRAGMA_NO_CACHE, ${1:integer send_header},\n\
+ HTTP_PRAGMA_NO_CACHE, ${1:integer send_header}, $0\n\
snippet HTTP_VERBOSE_THROTTLE\n\
- HTTP_VERBOSE_THROTTLE, ${1:integer noisy},\n\
+ HTTP_VERBOSE_THROTTLE, ${1:integer noisy}, $0\n\
snippet HTTP_VERIFY_CERT\n\
- HTTP_VERIFY_CERT, ${1:integer verify},\n\
+ HTTP_VERIFY_CERT, ${1:integer verify}, $0\n\
snippet RC_DATA_FLAGS\n\
- RC_DATA_FLAGS, ${1:integer flags},\n\
+ RC_DATA_FLAGS, ${1:integer flags}, $0\n\
snippet RC_DETECT_PHANTOM\n\
- RC_DETECT_PHANTOM, ${1:integer dectedPhantom},\n\
+ RC_DETECT_PHANTOM, ${1:integer dectedPhantom}, $0\n\
snippet RC_MAX_HITS\n\
- RC_MAX_HITS, ${1:integer maxHits},\n\
+ RC_MAX_HITS, ${1:integer maxHits}, $0\n\
snippet RC_REJECT_TYPES\n\
- RC_REJECT_TYPES, ${1:integer filterMask},\n\
+ RC_REJECT_TYPES, ${1:integer filterMask}, $0\n\
snippet at_rot_target\n\
- at_rot_target(${1:integer handle}, ${2:rotation targetrot}, ${3:rotation ourrot})\n\
- {\n\
- $0\n\
- }\n\
+ at_rot_target(${1:integer handle}, ${2:rotation targetrot}, ${3:rotation ourrot})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet at_target\n\
- at_target(${1:integer tnum}, ${2:vector targetpos}, ${3:vector ourpos})\n\
- {\n\
- $0\n\
- }\n\
+ at_target(${1:integer tnum}, ${2:vector targetpos}, ${3:vector ourpos})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet attach\n\
- attach(${1:key id})\n\
- {\n\
- $0\n\
- }\n\
+ attach(${1:key id})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet changed\n\
- changed(${1:integer change})\n\
- {\n\
- $0\n\
- }\n\
+ changed(${1:integer change})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet collision\n\
- collision(${1:integer index})\n\
- {\n\
- $0\n\
- }\n\
+ collision(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet collision_end\n\
- collision_end(${1:integer index})\n\
- {\n\
- $0\n\
- }\n\
+ collision_end(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet collision_start\n\
- collision_start(${1:integer index})\n\
- {\n\
- $0\n\
- }\n\
+ collision_start(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet control\n\
- control(${1:key id}, ${2:integer level}, ${3:integer edge})\n\
- {\n\
- $0\n\
- }\n\
+ control(${1:key id}, ${2:integer level}, ${3:integer edge})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet dataserver\n\
- dataserver(${1:key query_id}, ${2:string data})\n\
- {\n\
- $0\n\
- }\n\
+ dataserver(${1:key query_id}, ${2:string data})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet do\n\
- do\n\
- {\n\
- $0\n\
- }\n\
- while (${1:condition});\n\
+ do\n\
+ {\n\
+ $0\n\
+ }\n\
+ while (${1:condition});\n\
snippet else\n\
- else\n\
- {\n\
- $0\n\
- }\n\
-snippet else if\n\
- else if (${1:condition})\n\
- {\n\
- $0\n\
- }\n\
+ else\n\
+ {\n\
+ $0\n\
+ }\n\
snippet email\n\
- email(${1:string time}, ${2:string address}, ${3:string subject}, ${4:string message}, ${5:integer num_left})\n\
- {\n\
- $0\n\
- }\n\
+ email(${1:string time}, ${2:string address}, ${3:string subject}, ${4:string message}, ${5:integer num_left})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet experience_permissions\n\
+ experience_permissions(${1:key agent_id})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet experience_permissions_denied\n\
+ experience_permissions_denied(${1:key agent_id}, ${2:integer reason})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet for\n\
- for (${1:start}; ${3:condition}; ${3:step})\n\
- {\n\
- $0\n\
- }\n\
+ for (${1:start}; ${3:condition}; ${3:step})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet http_request\n\
- http_request(${1:key request_id}, ${2:string method}, ${3:string body})\n\
- {\n\
- $0\n\
- }\n\
+ http_request(${1:key request_id}, ${2:string method}, ${3:string body})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet http_response\n\
- http_response(${1:key request_id}, ${2:integer status}, ${3:list metadata}, ${4:string body})\n\
- {\n\
- $0\n\
- }\n\
+ http_response(${1:key request_id}, ${2:integer status}, ${3:list metadata}, ${4:string body})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet if\n\
- if (${1:condition})\n\
- {\n\
- $0\n\
- }\n\
+ if (${1:condition})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet jump\n\
- jump ${1:label};\n\
+ jump ${1:label};\n\
snippet land_collision\n\
- land_collision(${1:vector pos})\n\
- {\n\
- $0\n\
- }\n\
+ land_collision(${1:vector pos})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet land_collision_end\n\
- land_collision_end(${1:vector pos})\n\
- {\n\
- $0\n\
- }\n\
+ land_collision_end(${1:vector pos})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet land_collision_start\n\
- land_collision_start(${1:vector pos})\n\
- {\n\
- $0\n\
- }\n\
+ land_collision_start(${1:vector pos})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet link_message\n\
- link_message(${1:integer sender_num}, ${2:integer num}, ${3:string str}, ${4:key id})\n\
- {\n\
- $0\n\
- }\n\
+ link_message(${1:integer sender_num}, ${2:integer num}, ${3:string str}, ${4:key id})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet listen\n\
- listen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string message})\n\
- {\n\
- $0\n\
- }\n\
+ listen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string message})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet llAbs\n\
- llAbs(${1:integer val})\n\
+ llAbs(${1:integer val})\n\
snippet llAcos\n\
- llAcos(${1:float val})\n\
+ llAcos(${1:float val})\n\
snippet llAddToLandBanList\n\
- llAddToLandBanList(${1:key avatar}, ${2:float hours})\n\
+ llAddToLandBanList(${1:key agent}, ${2:float hours});\n\
snippet llAddToLandPassList\n\
- llAddToLandPassList(${1:key avatar}, ${2:float hours})\n\
+ llAddToLandPassList(${1:key agent}, ${2:float hours});\n\
snippet llAdjustSoundVolume\n\
- llAdjustSoundVolume(${1:float volume})\n\
+ llAdjustSoundVolume(${1:float volume});\n\
+snippet llAgentInExperience\n\
+ llAgentInExperience(${1:key agent})\n\
snippet llAllowInventoryDrop\n\
- llAllowInventoryDrop(${1:integer add})\n\
+ llAllowInventoryDrop(${1:integer add});\n\
snippet llAngleBetween\n\
- llAngleBetween(${1:rotation a}, ${2:rotation b})\n\
+ llAngleBetween(${1:rotation a}, ${2:rotation b})\n\
snippet llApplyImpulse\n\
- llApplyImpulse(${1:vector force}, ${2:integer local})\n\
+ llApplyImpulse(${1:vector force}, ${2:integer local});\n\
snippet llApplyRotationalImpulse\n\
- llApplyRotationalImpulse(${1:vector force}, ${2:integer local})\n\
+ llApplyRotationalImpulse(${1:vector force}, ${2:integer local});\n\
snippet llAsin\n\
- llAsin(${1:float val})\n\
+ llAsin(${1:float val})\n\
snippet llAtan2\n\
- llAtan2(${1:float y}, ${2:float x})\n\
+ llAtan2(${1:float y}, ${2:float x})\n\
snippet llAttachToAvatar\n\
- llAttachToAvatar(${1:integer attach_point})\n\
+ llAttachToAvatar(${1:integer attach_point});\n\
snippet llAttachToAvatarTemp\n\
- llAttachToAvatarTemp(${1:integer attach_point})\n\
+ llAttachToAvatarTemp(${1:integer attach_point});\n\
snippet llAvatarOnLinkSitTarget\n\
- llAvatarOnLinkSitTarget(${1:integer link})\n\
+ llAvatarOnLinkSitTarget(${1:integer link})\n\
+snippet llAvatarOnSitTarget\n\
+ llAvatarOnSitTarget()\n\
snippet llAxes2Rot\n\
- llAxes2Rot(${1:vector fwd}, ${2:vector left}, ${3:vector up})\n\
+ llAxes2Rot(${1:vector fwd}, ${2:vector left}, ${3:vector up})\n\
snippet llAxisAngle2Rot\n\
- llAxisAngle2Rot(${1:vector axis}, ${2:float angle})\n\
+ llAxisAngle2Rot(${1:vector axis}, ${2:float angle})\n\
snippet llBase64ToInteger\n\
- llBase64ToInteger(${1:string str})\n\
+ llBase64ToInteger(${1:string str})\n\
snippet llBase64ToString\n\
- llBase64ToString(${1:string str})\n\
+ llBase64ToString(${1:string str})\n\
+snippet llBreakAllLinks\n\
+ llBreakAllLinks();\n\
snippet llBreakLink\n\
- llBreakLink(${1:integer link})\n\
+ llBreakLink(${1:integer link});\n\
snippet llCastRay\n\
- llCastRay(${1:vector start}, ${2:vector end}, ${3:list options})\n\
+ llCastRay(${1:vector start}, ${2:vector end}, ${3:list options});\n\
snippet llCeil\n\
- llCeil(${1:float val})\n\
+ llCeil(${1:float val})\n\
+snippet llClearCameraParams\n\
+ llClearCameraParams();\n\
snippet llClearLinkMedia\n\
- llClearLinkMedia(${1:integer link}, ${2:integer face})\n\
+ llClearLinkMedia(${1:integer link}, ${2:integer face});\n\
snippet llClearPrimMedia\n\
- llClearPrimMedia(${1:integer link}, ${2:integer face})\n\
+ llClearPrimMedia(${1:integer face});\n\
snippet llCloseRemoteDataChannel\n\
- llCloseRemoteDataChannel(${1:key channel})\n\
+ llCloseRemoteDataChannel(${1:key channel});\n\
snippet llCollisionFilter\n\
- llCollisionFilter(${1:string name}, ${2:key id}, ${3:integer accept})\n\
+ llCollisionFilter(${1:string name}, ${2:key id}, ${3:integer accept});\n\
snippet llCollisionSound\n\
- llCollisionSound(${1:string impact_sound}, ${2:float impact_volume})\n\
-snippet llCollisionSprite\n\
- llCollisionSprite(${1:string impact_sprite})\n\
+ llCollisionSound(${1:string impact_sound}, ${2:float impact_volume});\n\
snippet llCos\n\
- llCos(${1:float theta})\n\
+ llCos(${1:float theta})\n\
snippet llCreateCharacter\n\
- llCreateCharacter(${1:list options})\n\
+ llCreateCharacter(${1:list options});\n\
+snippet llCreateKeyValue\n\
+ llCreateKeyValue(${1:string k})\n\
snippet llCreateLink\n\
- llCreateLink(${1:key target}, ${2:integer parent})\n\
+ llCreateLink(${1:key target}, ${2:integer parent});\n\
snippet llCSV2List\n\
- llCSV2List(${1:string src})\n\
+ llCSV2List(${1:string src})\n\
+snippet llDataSizeKeyValue\n\
+ llDataSizeKeyValue()\n\
+snippet llDeleteCharacter\n\
+ llDeleteCharacter();\n\
+snippet llDeleteKeyValue\n\
+ llDeleteKeyValue(${1:string k})\n\
snippet llDeleteSubList\n\
- llDeleteSubList(${1:list src}, ${2:integer start}, ${3:integer end})\n\
+ llDeleteSubList(${1:list src}, ${2:integer start}, ${3:integer end})\n\
snippet llDeleteSubString\n\
- llDeleteSubString(${1:string src}, ${2:integer start}, ${3:integer end})\n\
+ llDeleteSubString(${1:string src}, ${2:integer start}, ${3:integer end})\n\
+snippet llDetachFromAvatar\n\
+ llDetachFromAvatar();\n\
snippet llDetectedGrab\n\
- llDetectedGrab(${1:integer number})\n\
+ llDetectedGrab(${1:integer number})\n\
snippet llDetectedGroup\n\
- llDetectedGroup(${1:integer number})\n\
+ llDetectedGroup(${1:integer number})\n\
snippet llDetectedKey\n\
- llDetectedKey(${1:integer number})\n\
+ llDetectedKey(${1:integer number})\n\
snippet llDetectedLinkNumber\n\
- llDetectedLinkNumber(${1:integer number})\n\
+ llDetectedLinkNumber(${1:integer number})\n\
snippet llDetectedName\n\
- llDetectedName(${1:integer number})\n\
+ llDetectedName(${1:integer number})\n\
snippet llDetectedOwner\n\
- llDetectedOwner(${1:integer number})\n\
+ llDetectedOwner(${1:integer number})\n\
snippet llDetectedPos\n\
- llDetectedPos(${1:integer number})\n\
+ llDetectedPosl(${1:integer number})\n\
snippet llDetectedRot\n\
- llDetectedRot(${1:integer number})\n\
+ llDetectedRot(${1:integer number})\n\
snippet llDetectedTouchBinormal\n\
- llDetectedTouchBinormal(${1:integer number})\n\
+ llDetectedTouchBinormal(${1:integer number})\n\
snippet llDetectedTouchFace\n\
- llDetectedTouchFace(${1:integer number})\n\
+ llDetectedTouchFace(${1:integer number})\n\
snippet llDetectedTouchNormal\n\
- llDetectedTouchNormal(${1:integer number})\n\
+ llDetectedTouchNormal(${1:integer number})\n\
snippet llDetectedTouchPos\n\
- llDetectedTouchPos(${1:integer number})\n\
+ llDetectedTouchPos(${1:integer number})\n\
snippet llDetectedTouchST\n\
- llDetectedTouchST(${1:integer number})\n\
+ llDetectedTouchST(${1:integer number})\n\
snippet llDetectedTouchUV\n\
- llDetectedTouchUV(${1:integer number})\n\
+ llDetectedTouchUV(${1:integer number})\n\
snippet llDetectedType\n\
- llDetectedType(${1:integer number})\n\
+ llDetectedType(${1:integer number})\n\
snippet llDetectedVel\n\
- llDetectedVel(${1:integer number})\n\
+ llDetectedVel(${1:integer number})\n\
snippet llDialog\n\
- llDialog(${1:key avatar}, ${2:string message}, ${3:list buttons}, ${4:integer channel})\n\
+ llDialog(${1:key agent}, ${2:string message}, ${3:list buttons}, ${4:integer channel});\n\
+snippet llDie\n\
+ llDie();\n\
snippet llDumpList2String\n\
- llDumpList2String(${1:list src}, ${2:string separator})\n\
+ llDumpList2String(${1:list src}, ${2:string separator})\n\
snippet llEdgeOfWorld\n\
- llEdgeOfWorld(${1:vector pos}, ${2:vector dir})\n\
+ llEdgeOfWorld(${1:vector pos}, ${2:vector dir})\n\
snippet llEjectFromLand\n\
- llEjectFromLand(${1:key avatar})\n\
+ llEjectFromLand(${1:key agent});\n\
snippet llEmail\n\
- llEmail(${1:string address}, ${2:string subject}, ${3:string message})\n\
+ llEmail(${1:string address}, ${2:string subject}, ${3:string message});\n\
snippet llEscapeURL\n\
- llEscapeURL(${1:string url})\n\
+ llEscapeURL(${1:string url})\n\
snippet llEuler2Rot\n\
- llEuler2Rot(${1:vector v})\n\
+ llEuler2Rot(${1:vector v})\n\
snippet llExecCharacterCmd\n\
- llExecCharacterCmd(${1:integer command}, ${2:list options})\n\
+ llExecCharacterCmd(${1:integer command}, ${2:list options});\n\
snippet llEvade\n\
- llEvade(${1:key target}, ${2:list options})\n\
+ llEvade(${1:key target}, ${2:list options});\n\
snippet llFabs\n\
- llFabs(${1:float val})\n\
+ llFabs(${1:float val})\n\
snippet llFleeFrom\n\
- llFleeFrom(${1:vector position}, ${2:float distance}, ${3:list options})\n\
+ llFleeFrom(${1:vector position}, ${2:float distance}, ${3:list options});\n\
snippet llFloor\n\
- llFloor(${1:float val})\n\
+ llFloor(${1:float val})\n\
snippet llForceMouselook\n\
- llForceMouselook(${1:integer mouselook})\n\
+ llForceMouselook(${1:integer mouselook});\n\
snippet llFrand\n\
- llFrand(${1:float mag})\n\
+ llFrand(${1:float mag})\n\
+snippet llGenerateKey\n\
+ llGenerateKey()\n\
+snippet llGetAccel\n\
+ llGetAccel()\n\
snippet llGetAgentInfo\n\
- llGetAgentInfo(${1:key id})\n\
+ llGetAgentInfo(${1:key id})\n\
snippet llGetAgentLanguage\n\
- llGetAgentLanguage(${1:key avatar})\n\
+ llGetAgentLanguage(${1:key agent})\n\
snippet llGetAgentList\n\
- llGetAgentList(${1:integer scope}, ${2:list options})\n\
+ llGetAgentList(${1:integer scope}, ${2:list options})\n\
snippet llGetAgentSize\n\
- llGetAgentSize(${1:key avatar})\n\
+ llGetAgentSize(${1:key agent})\n\
snippet llGetAlpha\n\
- llGetAlpha(${1:integer face})\n\
+ llGetAlpha(${1:integer face})\n\
+snippet llGetAndResetTime\n\
+ llGetAndResetTime()\n\
snippet llGetAnimation\n\
- llGetAnimation(${1:key id})\n\
+ llGetAnimation(${1:key id})\n\
snippet llGetAnimationList\n\
- llGetAnimationList(${1:key avatar})\n\
+ llGetAnimationList(${1:key agent})\n\
snippet llGetAnimationOverride\n\
- llGetAnimationOverride(${1:string anim_state})\n\
+ llGetAnimationOverride(${1:string anim_state})\n\
+snippet llGetAttached\n\
+ llGetAttached()\n\
snippet llGetBoundingBox\n\
- llGetBoundingBox(${1:key object})\n\
+ llGetBoundingBox(${1:key object})\n\
+snippet llGetCameraPos\n\
+ llGetCameraPos()\n\
+snippet llGetCameraRot\n\
+ llGetCameraRot()\n\
+snippet llGetCenterOfMass\n\
+ llGetCenterOfMass()\n\
snippet llGetClosestNavPoint\n\
- llGetClosestNavPoint(${1:vector point}, ${2:list options})\n\
+ llGetClosestNavPoint(${1:vector point}, ${2:list options})\n\
snippet llGetColor\n\
- llGetColor(${1:integer face})\n\
+ llGetColor(${1:integer face})\n\
+snippet llGetCreator\n\
+ llGetCreator()\n\
+snippet llGetDate\n\
+ llGetDate()\n\
snippet llGetDisplayName\n\
- llGetDisplayName(${1:key id})\n\
+ llGetDisplayName(${1:key id})\n\
+snippet llGetEnergy\n\
+ llGetEnergy()\n\
snippet llGetEnv\n\
- llGetEnv(${1:string name})\n\
+ llGetEnv(${1:string name})\n\
+snippet llGetExperienceDetails\n\
+ llGetExperienceDetails(${1:key experience_id})\n\
+snippet llGetExperienceErrorMessage\n\
+ llGetExperienceErrorMessage(${1:integer error})\n\
+snippet llGetForce\n\
+ llGetForce()\n\
+snippet llGetFreeMemory\n\
+ llGetFreeMemory()\n\
+snippet llGetFreeURLs\n\
+ llGetFreeURLs()\n\
+snippet llGetGeometricCenter\n\
+ llGetGeometricCenter()\n\
+snippet llGetGMTclock\n\
+ llGetGMTclock()\n\
snippet llGetHTTPHeader\n\
- llGetHTTPHeader(${1:key request_id}, ${2:string header})\n\
+ llGetHTTPHeader(${1:key request_id}, ${2:string header})\n\
snippet llGetInventoryCreator\n\
- llGetInventoryCreator(${1:string item})\n\
+ llGetInventoryCreator(${1:string item})\n\
snippet llGetInventoryKey\n\
- llGetInventoryKey(${1:string name})\n\
+ llGetInventoryKey(${1:string name})\n\
snippet llGetInventoryName\n\
- llGetInventoryName(${1:integer type}, ${2:integer number})\n\
+ llGetInventoryName(${1:integer type}, ${2:integer number})\n\
snippet llGetInventoryNumber\n\
- llGetInventoryNumber(${1:integer type})\n\
+ llGetInventoryNumber(${1:integer type})\n\
snippet llGetInventoryPermMask\n\
- llGetInventoryPermMask(${1:string item}, ${2:integer mask})\n\
+ llGetInventoryPermMask(${1:string item}, ${2:integer mask})\n\
snippet llGetInventoryType\n\
- llGetInventoryType(${1:string name})\n\
+ llGetInventoryType(${1:string name})\n\
+snippet llGetKey\n\
+ llGetKey()\n\
snippet llGetLandOwnerAt\n\
- llGetLandOwnerAt(${1:vector pos})\n\
+ llGetLandOwnerAt(${1:vector pos})\n\
snippet llGetLinkKey\n\
- llGetLinkKey(${1:integer link})\n\
+ llGetLinkKey(${1:integer link})\n\
snippet llGetLinkMedia\n\
- llGetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params})\n\
+ llGetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params})\n\
snippet llGetLinkName\n\
- llGetLinkName(${1:integer link})\n\
+ llGetLinkName(${1:integer link})\n\
+snippet llGetLinkNumber\n\
+ llGetLinkNumber()\n\
snippet llGetLinkNumberOfSides\n\
- llGetLinkNumberOfSides(${1:integer link})\n\
+ llGetLinkNumberOfSides(${1:integer link})\n\
snippet llGetLinkPrimitiveParams\n\
- llGetLinkPrimitiveParams(${1:integer link}, ${2:list params})\n\
+ llGetLinkPrimitiveParams(${1:integer link}, ${2:list params})\n\
snippet llGetListEntryType\n\
- llGetListEntryType(${1:list src}, ${2:integer index})\n\
+ llGetListEntryType(${1:list src}, ${2:integer index})\n\
snippet llGetListLength\n\
- llGetListLength(${1:list src})\n\
+ llGetListLength(${1:list src})\n\
+snippet llGetLocalPos\n\
+ llGetLocalPos()\n\
+snippet llGetLocalRot\n\
+ llGetLocalRot()\n\
+snippet llGetMass\n\
+ llGetMass()\n\
+snippet llGetMassMKS\n\
+ llGetMassMKS()\n\
+snippet llGetMaxScaleFactor\n\
+ llGetMaxScaleFactor()\n\
+snippet llGetMemoryLimit\n\
+ llGetMemoryLimit()\n\
+snippet llGetMinScaleFactor\n\
+ llGetMinScaleFactor()\n\
snippet llGetNextEmail\n\
- llGetNextEmail(${1:string address}, ${2:string subject})\n\
+ llGetNextEmail(${1:string address}, ${2:string subject});\n\
snippet llGetNotecardLine\n\
- llGetNotecardLine(${1:string name}, ${2:integer line})\n\
+ llGetNotecardLine(${1:string name}, ${2:integer line})\n\
snippet llGetNumberOfNotecardLines\n\
- llGetNumberOfNotecardLines(${1:string name})\n\
+ llGetNumberOfNotecardLines(${1:string name})\n\
+snippet llGetNumberOfPrims\n\
+ llGetNumberOfPrims()\n\
+snippet llGetNumberOfSides\n\
+ llGetNumberOfSides()\n\
+snippet llGetObjectDesc\n\
+ llGetObjectDesc()\n\
snippet llGetObjectDetails\n\
- llGetObjectDetails(${1:key id}, ${2:list params})\n\
+ llGetObjectDetails(${1:key id}, ${2:list params})\n\
snippet llGetObjectMass\n\
- llGetObjectMass(${1:key id})\n\
+ llGetObjectMass(${1:key id})\n\
+snippet llGetObjectName\n\
+ llGetObjectName()\n\
snippet llGetObjectPermMask\n\
- llGetObjectPermMask(${1:integer mask})\n\
+ llGetObjectPermMask(${1:integer mask})\n\
snippet llGetObjectPrimCount\n\
- llGetObjectPrimCount(${1:key prim})\n\
+ llGetObjectPrimCount(${1:key prim})\n\
+snippet llGetOmega\n\
+ llGetOmega()\n\
+snippet llGetOwner\n\
+ llGetOwner()\n\
snippet llGetOwnerKey\n\
- llGetOwnerKey(${1:key id})\n\
+ llGetOwnerKey(${1:key id})\n\
snippet llGetParcelDetails\n\
- llGetParcelDetails(${1:vector pos}, ${2:list params})\n\
+ llGetParcelDetails(${1:vector pos}, ${2:list params})\n\
snippet llGetParcelFlags\n\
- llGetParcelFlags(${1:vector pos})\n\
+ llGetParcelFlags(${1:vector pos})\n\
snippet llGetParcelMaxPrims\n\
- llGetParcelMaxPrims(${1:vector pos}, ${2:integer sim_wide})\n\
+ llGetParcelMaxPrims(${1:vector pos}, ${2:integer sim_wide})\n\
+snippet llGetParcelMusicURL\n\
+ llGetParcelMusicURL()\n\
snippet llGetParcelPrimCount\n\
- llGetParcelPrimCount(${1:vector pos}, ${2:integer category}, ${3:integer sim_wide})\n\
+ llGetParcelPrimCount(${1:vector pos}, ${2:integer category}, ${3:integer sim_wide})\n\
snippet llGetParcelPrimOwners\n\
- llGetParcelPrimOwners(${1:vector pos})\n\
+ llGetParcelPrimOwners(${1:vector pos})\n\
+snippet llGetPermissions\n\
+ llGetPermissions()\n\
+snippet llGetPermissionsKey\n\
+ llGetPermissionsKey()\n\
+snippet llGetPhysicsMaterial\n\
+ llGetPhysicsMaterial()\n\
+snippet llGetPos\n\
+ llGetPos()\n\
snippet llGetPrimitiveParams\n\
- llGetPrimitiveParams(${1:list params})\n\
+ llGetPrimitiveParams(${1:list params})\n\
snippet llGetPrimMediaParams\n\
- llGetPrimMediaParams(${1:integer face}, ${2:list params})\n\
+ llGetPrimMediaParams(${1:integer face}, ${2:list params})\n\
+snippet llGetRegionAgentCount\n\
+ llGetRegionAgentCount()\n\
+snippet llGetRegionCorner\n\
+ llGetRegionCorner()\n\
+snippet llGetRegionFlags\n\
+ llGetRegionFlags()\n\
+snippet llGetRegionFPS\n\
+ llGetRegionFPS()\n\
+snippet llGetRegionName\n\
+ llGetRegionName()\n\
+snippet llGetRegionTimeDilation\n\
+ llGetRegionTimeDilation()\n\
+snippet llGetRootPosition\n\
+ llGetRootPosition()\n\
+snippet llGetRootRotation\n\
+ llGetRootRotation()\n\
+snippet llGetRot\n\
+ llGetRot()\n\
+snippet llGetScale\n\
+ llGetScale()\n\
+snippet llGetScriptName\n\
+ llGetScriptName()\n\
snippet llGetScriptState\n\
- llGetScriptState(${1:string script})\n\
+ llGetScriptState(${1:string script})\n\
snippet llGetSimStats\n\
- llGetSimStats(${1:integer stat_type})\n\
+ llGetSimStats(${1:integer stat_type})\n\
+snippet llGetSimulatorHostname\n\
+ llGetSimulatorHostname()\n\
+snippet llGetSPMaxMemory\n\
+ llGetSPMaxMemory()\n\
+snippet llGetStartParameter\n\
+ llGetStartParameter()\n\
snippet llGetStaticPath\n\
- llGetStaticPath(${1:vector start}, ${2:vector end}, ${3:float radius}, ${4:list params})\n\
+ llGetStaticPath(${1:vector start}, ${2:vector end}, ${3:float radius}, ${4:list params})\n\
snippet llGetStatus\n\
- llGetStatus(${1:integer status})\n\
+ llGetStatus(${1:integer status})\n\
snippet llGetSubString\n\
- llGetSubString(${1:string src}, ${2:integer start}, ${3:integer end})\n\
+ llGetSubString(${1:string src}, ${2:integer start}, ${3:integer end})\n\
+snippet llGetSunDirection\n\
+ llGetSunDirection()\n\
snippet llGetTexture\n\
- llGetTexture(${1:integer face})\n\
+ llGetTexture(${1:integer face})\n\
snippet llGetTextureOffset\n\
- llGetTextureOffset(${1:integer face})\n\
+ llGetTextureOffset(${1:integer face})\n\
snippet llGetTextureRot\n\
- llGetTextureRot(${1:integer face})\n\
+ llGetTextureRot(${1:integer face})\n\
snippet llGetTextureScale\n\
- llGetTextureScale(${1:integer face})\n\
+ llGetTextureScale(${1:integer face})\n\
+snippet llGetTime\n\
+ llGetTime()\n\
+snippet llGetTimeOfDay\n\
+ llGetTimeOfDay()\n\
+snippet llGetTimestamp\n\
+ llGetTimestamp()\n\
+snippet llGetTorque\n\
+ llGetTorque()\n\
+snippet llGetUnixTime\n\
+ llGetUnixTime()\n\
+snippet llGetUsedMemory\n\
+ llGetUsedMemory()\n\
snippet llGetUsername\n\
- llGetUsername(${1:key id})\n\
+ llGetUsername(${1:key id})\n\
+snippet llGetVel\n\
+ llGetVel()\n\
+snippet llGetWallclock\n\
+ llGetWallclock()\n\
snippet llGiveInventory\n\
- llGiveInventory(${1:key destination}, ${2:string inventory})\n\
+ llGiveInventory(${1:key destination}, ${2:string inventory});\n\
snippet llGiveInventoryList\n\
- llGiveInventoryList(${1:key target}, ${2:string folder}, ${3:list inventory})\n\
+ llGiveInventoryList(${1:key target}, ${2:string folder}, ${3:list inventory});\n\
snippet llGiveMoney\n\
- llGiveMoney(${1:key destination}, ${2:integer amount})\n\
+ llGiveMoney(${1:key destination}, ${2:integer amount})\n\
snippet llGround\n\
- llGround(${1:vector offset})\n\
+ llGround(${1:vector offset})\n\
snippet llGroundContour\n\
- llGroundContour(${1:vector offset})\n\
+ llGroundContour(${1:vector offset})\n\
snippet llGroundNormal\n\
- llGroundNormal(${1:vector offset})\n\
+ llGroundNormal(${1:vector offset})\n\
snippet llGroundRepel\n\
- llGroundRepel(${1:float height}, ${2:integer water}, ${3:float tau})\n\
+ llGroundRepel(${1:float height}, ${2:integer water}, ${3:float tau});\n\
snippet llGroundSlope\n\
- llGroundSlope(${1:vector offset})\n\
+ llGroundSlope(${1:vector offset})\n\
snippet llHTTPRequest\n\
- llHTTPRequest(${1:string url}, ${2:list parameters}, ${3:string body})\n\
+ llHTTPRequest(${1:string url}, ${2:list parameters}, ${3:string body})\n\
snippet llHTTPResponse\n\
- llHTTPResponse(${1:key request_id}, ${2:integer status}, ${3:string body})\n\
+ llHTTPResponse(${1:key request_id}, ${2:integer status}, ${3:string body});\n\
snippet llInsertString\n\
- llInsertString(${1:string dst}, ${2:integer pos}, ${3:string src})\n\
+ llInsertString(${1:string dst}, ${2:integer pos}, ${3:string src})\n\
snippet llInstantMessage\n\
- llInstantMessage(${1:key user}, ${2:string message})\n\
+ llInstantMessage(${1:key user}, ${2:string message});\n\
snippet llIntegerToBase64\n\
- llIntegerToBase64(${1:integer number})\n\
+ llIntegerToBase64(${1:integer number})\n\
snippet llJson2List\n\
- llJson2List(${1:string json})\n\
+ llJson2List(${1:string json})\n\
snippet llJsonGetValue\n\
- llJsonGetValue(${1:string json}, ${2:list specifiers})\n\
+ llJsonGetValue(${1:string json}, ${2:list specifiers})\n\
snippet llJsonSetValue\n\
- llJsonSetValue(${1:string json}, ${2:list specifiers}, ${3:string newValue})\n\
+ llJsonSetValue(${1:string json}, ${2:list specifiers}, ${3:string newValue})\n\
snippet llJsonValueType\n\
- llJsonValueType(${1:string json}, ${2:list specifiers})\n\
+ llJsonValueType(${1:string json}, ${2:list specifiers})\n\
snippet llKey2Name\n\
- llKey2Name(${1:key id})\n\
+ llKey2Name(${1:key id})\n\
+snippet llKeyCountKeyValue\n\
+ llKeyCountKeyValue()\n\
+snippet llKeysKeyValue\n\
+ llKeysKeyValue(${1:integer first}, ${2:integer count})\n\
snippet llLinkParticleSystem\n\
- llLinkParticleSystem(${1:integer link}, ${2:list rules})\n\
+ llLinkParticleSystem(${1:integer link}, ${2:list rules});\n\
snippet llLinkSitTarget\n\
- llLinkSitTarget(${1:integer link}, ${2:vector offset}, ${3:rotation rot})\n\
+ llLinkSitTarget(${1:integer link}, ${2:vector offset}, ${3:rotation rot});\n\
snippet llList2CSV\n\
- llList2CSV(${1:list src})\n\
+ llList2CSV(${1:list src})\n\
snippet llList2Float\n\
- llList2Float(${1:list src}, ${2:integer index})\n\
+ llList2Float(${1:list src}, ${2:integer index})\n\
snippet llList2Integer\n\
- llList2Integer(${1:list src}, ${2:integer index})\n\
+ llList2Integer(${1:list src}, ${2:integer index})\n\
snippet llList2Json\n\
- llList2Json(${1:string type}, ${2:list values})\n\
+ llList2Json(${1:string type}, ${2:list values})\n\
snippet llList2Key\n\
- llList2Key(${1:list src}, ${2:integer index})\n\
+ llList2Key(${1:list src}, ${2:integer index})\n\
snippet llList2List\n\
- llList2List(${1:list src}, ${2:integer start}, ${3:integer end})\n\
+ llList2List(${1:list src}, ${2:integer start}, ${3:integer end})\n\
snippet llList2ListStrided\n\
- llList2ListStrided(${1:list src}, ${2:integer start}, ${3:integer end}, ${4:integer stride})\n\
+ llList2ListStrided(${1:list src}, ${2:integer start}, ${3:integer end}, ${4:integer stride})\n\
snippet llList2Rot\n\
- llList2Rot(${1:list src}, ${2:integer index})\n\
+ llList2Rot(${1:list src}, ${2:integer index})\n\
snippet llList2String\n\
- llList2String(${1:list src}, ${2:integer index})\n\
+ llList2String(${1:list src}, ${2:integer index})\n\
snippet llList2Vector\n\
- llList2Vector(${1:list src}, ${2:integer index})\n\
+ llList2Vector(${1:list src}, ${2:integer index})\n\
snippet llListen\n\
- llListen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string msg})\n\
+ llListen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string msg})\n\
snippet llListenControl\n\
- llListenControl(${1:integer handle}, ${2:integer active})\n\
+ llListenControl(${1:integer handle}, ${2:integer active});\n\
snippet llListenRemove\n\
- llListenRemove(${1:integer handle})\n\
+ llListenRemove(${1:integer handle});\n\
snippet llListFindList\n\
- llListFindList(${1:list src}, ${2:list test})\n\
+ llListFindList(${1:list src}, ${2:list test})\n\
snippet llListInsertList\n\
- llListInsertList(${1:list dest}, ${2:list src}, ${3:integer start})\n\
+ llListInsertList(${1:list dest}, ${2:list src}, ${3:integer start})\n\
snippet llListRandomize\n\
- llListRandomize(${1:list src}, ${2:integer stride})\n\
+ llListRandomize(${1:list src}, ${2:integer stride})\n\
snippet llListReplaceList\n\
- llListReplaceList(${1:list dest}, ${2:list src}, ${3:integer start}, ${4:integer end})\n\
+ llListReplaceList(${1:list dest}, ${2:list src}, ${3:integer start}, ${4:integer end})\n\
snippet llListSort\n\
- llListSort(${1:list src}, ${2:integer stride}, ${3:integer ascending})\n\
+ llListSort(${1:list src}, ${2:integer stride}, ${3:integer ascending})\n\
snippet llListStatistics\n\
- llListStatistics(${1:integer operation}, ${2:list src})\n\
+ llListStatistics(${1:integer operation}, ${2:list src})\n\
snippet llLoadURL\n\
- llLoadURL(${1:key avatar}, ${2:string message}, ${3:string url})\n\
+ llLoadURL(${1:key agent}, ${2:string message}, ${3:string url});\n\
snippet llLog\n\
- llLog(${1:float val})\n\
+ llLog(${1:float val})\n\
snippet llLog10\n\
- llLog10(${1:float val})\n\
+ llLog10(${1:float val})\n\
snippet llLookAt\n\
- llLookAt(${1:vector target}, ${2:float strength}, ${3:float damping})\n\
+ llLookAt(${1:vector target}, ${2:float strength}, ${3:float damping});\n\
snippet llLoopSound\n\
- llLoopSound(${1:string sound}, ${2:float volume})\n\
+ llLoopSound(${1:string sound}, ${2:float volume});\n\
snippet llLoopSoundMaster\n\
- llLoopSoundMaster(${1:string sound}, ${2:float volume})\n\
+ llLoopSoundMaster(${1:string sound}, ${2:float volume});\n\
snippet llLoopSoundSlave\n\
- llLoopSoundSlave(${1:string sound}, ${2:float volume})\n\
+ llLoopSoundSlave(${1:string sound}, ${2:float volume});\n\
snippet llManageEstateAccess\n\
- llManageEstateAccess(${1:integer action}, ${2:key avatar})\n\
+ llManageEstateAccess(${1:integer action}, ${2:key agent})\n\
snippet llMapDestination\n\
- llMapDestination(${1:string simname}, ${2:vector pos}, ${3:vector look_at})\n\
+ llMapDestination(${1:string simname}, ${2:vector pos}, ${3:vector look_at});\n\
snippet llMD5String\n\
- llMD5String(${1:string src}, ${2:integer nonce})\n\
+ llMD5String(${1:string src}, ${2:integer nonce})\n\
snippet llMessageLinked\n\
- llMessageLinked(${1:integer link}, ${2:integer num}, ${3:string str}, ${4:key id})\n\
+ llMessageLinked(${1:integer link}, ${2:integer num}, ${3:string str}, ${4:key id});\n\
snippet llMinEventDelay\n\
- llMinEventDelay(${1:float delay})\n\
+ llMinEventDelay(${1:float delay});\n\
snippet llModifyLand\n\
- llModifyLand(${1:integer action}, ${2:integer brush})\n\
+ llModifyLand(${1:integer action}, ${2:integer brush});\n\
snippet llModPow\n\
- llModPow(${1:integer a}, ${2:integer b}, ${3:integer c})\n\
+ llModPow(${1:integer a}, ${2:integer b}, ${3:integer c})\n\
snippet llMoveToTarget\n\
- llMoveToTarget(${1:vector target}, ${2:float tau})\n\
+ llMoveToTarget(${1:vector target}, ${2:float tau});\n\
snippet llNavigateTo\n\
- llNavigateTo(${1:vector pos}, ${2:list options})\n\
+ llNavigateTo(${1:vector pos}, ${2:list options});\n\
snippet llOffsetTexture\n\
- llOffsetTexture(${1:float u}, ${2:float v}, ${3:integer face})\n\
+ llOffsetTexture(${1:float u}, ${2:float v}, ${3:integer face});\n\
+snippet llOpenRemoteDataChannel\n\
+ llOpenRemoteDataChannel();\n\
snippet llOverMyLand\n\
- llOverMyLand(${1:key id})\n\
+ llOverMyLand(${1:key id})\n\
snippet llOwnerSay\n\
- llOwnerSay(${1:string msg})\n\
+ llOwnerSay(${1:string msg});\n\
snippet llParcelMediaCommandList\n\
- llParcelMediaCommandList(${1:list commandList})\n\
+ llParcelMediaCommandList(${1:list commandList});\n\
snippet llParcelMediaQuery\n\
- llParcelMediaQuery(${1:list query})\n\
+ llParcelMediaQuery(${1:list query})\n\
snippet llParseString2List\n\
- llParseString2List(${1:string src}, ${2:list separators}, ${3:list spacers})\n\
+ llParseString2List(${1:string src}, ${2:list separators}, ${3:list spacers})\n\
snippet llParseStringKeepNulls\n\
- llParseStringKeepNulls(${1:string src}, ${2:list separators}, ${3:list spacers})\n\
+ llParseStringKeepNulls(${1:string src}, ${2:list separators}, ${3:list spacers})\n\
snippet llParticleSystem\n\
- llParticleSystem(${1:list rules})\n\
+ llParticleSystem(${1:list rules});\n\
snippet llPassCollisions\n\
- llPassCollisions(${1:integer pass})\n\
+ llPassCollisions(${1:integer pass});\n\
snippet llPassTouches\n\
- llPassTouches(${1:integer pass})\n\
+ llPassTouches(${1:integer pass});\n\
snippet llPatrolPoints\n\
- llPatrolPoints(${1:list patrolPoints}, ${2:list options})\n\
+ llPatrolPoints(${1:list patrolPoints}, ${2:list options});\n\
snippet llPlaySound\n\
- llPlaySound(${1:string sound}, ${2:float volume})\n\
+ llPlaySound(${1:string sound}, ${2:float volume});\n\
snippet llPlaySoundSlave\n\
- llPlaySoundSlave(${1:string sound}, ${2:float volume})\n\
+ llPlaySoundSlave(${1:string sound}, ${2:float volume});\n\
snippet llPow\n\
- llPow(${1:float base}, ${2:float exponent})\n\
+ llPow(${1:float base}, ${2:float exponent})\n\
snippet llPreloadSound\n\
- llPreloadSound(${1:string sound})\n\
+ llPreloadSound(${1:string sound});\n\
snippet llPursue\n\
- llPursue(${1:key target}, ${2:list options})\n\
+ llPursue(${1:key target}, ${2:list options});\n\
snippet llPushObject\n\
- llPushObject(${1:key target}, ${2:vector impulse}, ${3:vector ang_impulse}, ${4:integer local})\n\
+ llPushObject(${1:key target}, ${2:vector impulse}, ${3:vector ang_impulse}, ${4:integer local});\n\
+snippet llReadKeyValue\n\
+ llReadKeyValue(${1:string k})\n\
snippet llRegionSay\n\
- llRegionSay(${1:integer channel}, ${2:string msg})\n\
+ llRegionSay(${1:integer channel}, ${2:string msg});\n\
snippet llRegionSayTo\n\
- llRegionSayTo(${1:key target}, ${2:integer channel}, ${3:string msg})\n\
+ llRegionSayTo(${1:key target}, ${2:integer channel}, ${3:string msg});\n\
+snippet llReleaseControls\n\
+ llReleaseControls();\n\
snippet llReleaseURL\n\
- llReleaseURL(${1:string url})\n\
+ llReleaseURL(${1:string url});\n\
snippet llRemoteDataReply\n\
- llRemoteDataReply(${1:key channel}, ${2:key message_id}, ${3:string sdata}, ${4:integer idata})\n\
+ llRemoteDataReply(${1:key channel}, ${2:key message_id}, ${3:string sdata}, ${4:integer idata});\n\
snippet llRemoteLoadScriptPin\n\
- llRemoteLoadScriptPin(${1:key target}, ${2:string name}, ${3:integer pin}, ${4:integer running}, ${5:integer start_param})\n\
+ llRemoteLoadScriptPin(${1:key target}, ${2:string name}, ${3:integer pin}, ${4:integer running}, ${5:integer start_param});\n\
snippet llRemoveFromLandBanList\n\
- llRemoveFromLandBanList(${1:key avatar})\n\
+ llRemoveFromLandBanList(${1:key agent});\n\
snippet llRemoveFromLandPassList\n\
- llRemoveFromLandPassList(${1:key avatar})\n\
+ llRemoveFromLandPassList(${1:key agent});\n\
snippet llRemoveInventory\n\
- llRemoveInventory(${1:string item})\n\
+ llRemoveInventory(${1:string item});\n\
snippet llRemoveVehicleFlags\n\
- llRemoveVehicleFlags(${1:integer flags})\n\
+ llRemoveVehicleFlags(${1:integer flags});\n\
snippet llRequestAgentData\n\
- llRequestAgentData(${1:key id}, ${2:integer data})\n\
+ llRequestAgentData(${1:key id}, ${2:integer data})\n\
snippet llRequestDisplayName\n\
- llRequestDisplayName(${1:key id})\n\
+ llRequestDisplayName(${1:key id})\n\
+snippet llRequestExperiencePermissions\n\
+ llRequestExperiencePermissions(${1:key agent}, ${2:string name})\n\
snippet llRequestInventoryData\n\
- llRequestInventoryData(${1:string name})\n\
+ llRequestInventoryData(${1:string name})\n\
snippet llRequestPermissions\n\
- llRequestPermissions(${1:key agent}, ${2:integer permissions})\n\
+ llRequestPermissions(${1:key agent}, ${2:integer permissions})\n\
+snippet llRequestSecureURL\n\
+ llRequestSecureURL()\n\
snippet llRequestSimulatorData\n\
- llRequestSimulatorData(${1:string region}, ${2:integer data})\n\
+ llRequestSimulatorData(${1:string region}, ${2:integer data})\n\
+snippet llRequestURL\n\
+ llRequestURL()\n\
snippet llRequestUsername\n\
- llRequestUsername(${1:key id})\n\
+ llRequestUsername(${1:key id})\n\
snippet llResetAnimationOverride\n\
- llResetAnimationOverride(${1:string anim_state})\n\
+ llResetAnimationOverride(${1:string anim_state});\n\
+snippet llResetLandBanList\n\
+ llResetLandBanList();\n\
+snippet llResetLandPassList\n\
+ llResetLandPassList();\n\
snippet llResetOtherScript\n\
- llResetOtherScript(${1:string name})\n\
+ llResetOtherScript(${1:string name});\n\
+snippet llResetScript\n\
+ llResetScript();\n\
+snippet llResetTime\n\
+ llResetTime();\n\
snippet llReturnObjectsByID\n\
- llReturnObjectsByID(${1:list objects})\n\
+ llReturnObjectsByID(${1:list objects})\n\
snippet llReturnObjectsByOwner\n\
- llReturnObjectsByOwner(${1:key owner}, ${2:integer scope})\n\
+ llReturnObjectsByOwner(${1:key owner}, ${2:integer scope})\n\
snippet llRezAtRoot\n\
- llRezAtRoot(${1:string inventory}, ${2:vector position}, ${3:vector velocity}, ${4:rotation rot}, ${5:integer param})\n\
+ llRezAtRoot(${1:string inventory}, ${2:vector position}, ${3:vector velocity}, ${4:rotation rot}, ${5:integer param});\n\
snippet llRezObject\n\
- llRezObject(${1:string inventory}, ${2:vector pos}, ${3:vector vel}, ${4:rotation rot}, ${5:integer param})\n\
+ llRezObject(${1:string inventory}, ${2:vector pos}, ${3:vector vel}, ${4:rotation rot}, ${5:integer param});\n\
snippet llRot2Angle\n\
- llRot2Angle(${1:rotation rot})\n\
+ llRot2Angle(${1:rotation rot})\n\
snippet llRot2Axis\n\
- llRot2Axis(${1:rotation rot})\n\
+ llRot2Axis(${1:rotation rot})\n\
snippet llRot2Euler\n\
- llRot2Euler(${1:rotation quat})\n\
+ llRot2Euler(${1:rotation quat})\n\
snippet llRot2Fwd\n\
- llRot2Fwd(${1:rotation q})\n\
+ llRot2Fwd(${1:rotation q})\n\
snippet llRot2Left\n\
- llRot2Left(${1:rotation q})\n\
+ llRot2Left(${1:rotation q})\n\
snippet llRot2Up\n\
- llRot2Up(${1:rotation q})\n\
+ llRot2Up(${1:rotation q})\n\
snippet llRotateTexture\n\
- llRotateTexture(${1:float angle}, ${2:integer face})\n\
+ llRotateTexture(${1:float angle}, ${2:integer face});\n\
snippet llRotBetween\n\
- llRotBetween(${1:vector start}, ${2:vector end})\n\
+ llRotBetween(${1:vector start}, ${2:vector end})\n\
snippet llRotLookAt\n\
- llRotLookAt(${1:rotation target_direction}, ${2:float strength}, ${3:float damping})\n\
+ llRotLookAt(${1:rotation target_direction}, ${2:float strength}, ${3:float damping});\n\
snippet llRotTarget\n\
- llRotTarget(${1:rotation rot}, ${2:float error})\n\
+ llRotTarget(${1:rotation rot}, ${2:float error})\n\
snippet llRotTargetRemove\n\
- llRotTargetRemove(${1:integer handle})\n\
+ llRotTargetRemove(${1:integer handle});\n\
snippet llRound\n\
- llRound(${1:float val})\n\
+ llRound(${1:float val})\n\
snippet llSameGroup\n\
- llSameGroup(${1:key uuid})\n\
+ llSameGroup(${1:key group})\n\
snippet llSay\n\
- llSay(${1:integer channel}, ${2:string msg})\n\
+ llSay(${1:integer channel}, ${2:string msg});\n\
+snippet llScaleByFactor\n\
+ llScaleByFactor(${1:float scaling_factor})\n\
snippet llScaleTexture\n\
- llScaleTexture(${1:float u}, ${2:float v}, ${3:integer face})\n\
+ llScaleTexture(${1:float u}, ${2:float v}, ${3:integer face});\n\
snippet llScriptDanger\n\
- llScriptDanger(${1:vector pos})\n\
+ llScriptDanger(${1:vector pos})\n\
snippet llScriptProfiler\n\
- llScriptProfiler(${1:integer flags})\n\
+ llScriptProfiler(${1:integer flags});\n\
snippet llSendRemoteData\n\
- llSendRemoteData(${1:key channel}, ${2:string dest}, ${3:integer idata}, ${4:string sdata})\n\
+ llSendRemoteData(${1:key channel}, ${2:string dest}, ${3:integer idata}, ${4:string sdata})\n\
snippet llSensor\n\
- llSensor(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc})\n\
+ llSensor(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc});\n\
snippet llSensorRepeat\n\
- llSensorRepeat(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc}, ${6:float rate})\n\
+ llSensorRepeat(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc}, ${6:float rate});\n\
snippet llSetAlpha\n\
- llSetAlpha(${1:float alpha}, ${2:integer face})\n\
+ llSetAlpha(${1:float alpha}, ${2:integer face});\n\
snippet llSetAngularVelocity\n\
- llSetAngularVelocity(${1:vector force}, ${2:integer local})\n\
+ llSetAngularVelocity(${1:vector force}, ${2:integer local});\n\
snippet llSetAnimationOverride\n\
- llSetAnimationOverride(${1:string anim_state}, ${2:string anim})\n\
+ llSetAnimationOverride(${1:string anim_state}, ${2:string anim})\n\
snippet llSetBuoyancy\n\
- llSetBuoyancy(${1:float buoyancy})\n\
+ llSetBuoyancy(${1:float buoyancy});\n\
snippet llSetCameraAtOffset\n\
- llSetCameraAtOffset(${1:vector offset})\n\
+ llSetCameraAtOffset(${1:vector offset});\n\
snippet llSetCameraEyeOffset\n\
- llSetCameraEyeOffset(${1:vector offset})\n\
+ llSetCameraEyeOffset(${1:vector offset});\n\
snippet llSetCameraParams\n\
- llSetCameraParams(${1:list rules})\n\
+ llSetCameraParams(${1:list rules});\n\
snippet llSetClickAction\n\
- llSetClickAction(${1:integer action})\n\
+ llSetClickAction(${1:integer action});\n\
snippet llSetColor\n\
- llSetColor(${1:vector color}, ${2:integer face})\n\
+ llSetColor(${1:vector color}, ${2:integer face});\n\
snippet llSetContentType\n\
- llSetContentType(${1:key request_id}, ${2:integer content_type})\n\
+ llSetContentType(${1:key request_id}, ${2:integer content_type});\n\
snippet llSetDamage\n\
- llSetDamage(${1:float damage})\n\
+ llSetDamage(${1:float damage});\n\
snippet llSetForce\n\
- llSetForce(${1:vector force}, ${2:integer local})\n\
+ llSetForce(${1:vector force}, ${2:integer local});\n\
snippet llSetForceAndTorque\n\
- llSetForceAndTorque(${1:vector force}, ${2:vector torque}, ${3:integer local})\n\
+ llSetForceAndTorque(${1:vector force}, ${2:vector torque}, ${3:integer local});\n\
snippet llSetHoverHeight\n\
- llSetHoverHeight(${1:float height}, ${2:integer water}, ${3:float tau})\n\
+ llSetHoverHeight(${1:float height}, ${2:integer water}, ${3:float tau});\n\
snippet llSetKeyframedMotion\n\
- llSetKeyframedMotion(${1:list keyframes}, ${2:list options})\n\
+ llSetKeyframedMotion(${1:list keyframes}, ${2:list options});\n\
snippet llSetLinkAlpha\n\
- llSetLinkAlpha(${1:integer link}, ${2:float alpha}, ${3:integer face})\n\
+ llSetLinkAlpha(${1:integer link}, ${2:float alpha}, ${3:integer face});\n\
snippet llSetLinkCamera\n\
- llSetLinkCamera(${1:integer link}, ${2:vector eye}, ${3:vector at})\n\
+ llSetLinkCamera(${1:integer link}, ${2:vector eye}, ${3:vector at});\n\
snippet llSetLinkColor\n\
- llSetLinkColor(${1:integer link}, ${2:vector color}, ${3:integer face})\n\
+ llSetLinkColor(${1:integer link}, ${2:vector color}, ${3:integer face});\n\
snippet llSetLinkMedia\n\
- llSetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params})\n\
+ llSetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params});\n\
snippet llSetLinkPrimitiveParams\n\
- llSetLinkPrimitiveParams(${1:integer link}, ${2:list rules})\n\
+ llSetLinkPrimitiveParams(${1:integer link}, ${2:list rules});\n\
snippet llSetLinkPrimitiveParamsFast\n\
- llSetLinkPrimitiveParamsFast(${1:integer link}, ${2:list rules})\n\
+ llSetLinkPrimitiveParamsFast(${1:integer link}, ${2:list rules});\n\
snippet llSetLinkTexture\n\
- llSetLinkTexture(${1:integer link}, ${2:string texture}, ${3:integer face})\n\
+ llSetLinkTexture(${1:integer link}, ${2:string texture}, ${3:integer face});\n\
snippet llSetLinkTextureAnim\n\
- llSetLinkTextureAnim(${1:integer link}, ${2:integer mode}, ${3:integer face}, ${4:integer sizex}, ${5:integer sizey}, ${6:float start}, ${7:float length}, ${8:float rate})\n\
+ llSetLinkTextureAnim(${1:integer link}, ${2:integer mode}, ${3:integer face}, ${4:integer sizex}, ${5:integer sizey}, ${6:float start}, ${7:float length}, ${8:float rate});\n\
snippet llSetLocalRot\n\
- llSetLocalRot(${1:rotation rot})\n\
+ llSetLocalRot(${1:rotation rot});\n\
snippet llSetMemoryLimit\n\
- llSetMemoryLimit(${1:integer limit})\n\
+ llSetMemoryLimit(${1:integer limit})\n\
snippet llSetObjectDesc\n\
- llSetObjectDesc(${1:string description})\n\
+ llSetObjectDesc(${1:string description});\n\
snippet llSetObjectName\n\
- llSetObjectName(${1:string name})\n\
+ llSetObjectName(${1:string name});\n\
snippet llSetParcelMusicURL\n\
- llSetParcelMusicURL(${1:string url})\n\
+ llSetParcelMusicURL(${1:string url});\n\
snippet llSetPayPrice\n\
- llSetPayPrice(${1:integer price}, ${2:list quick_pay_buttons})\n\
+ llSetPayPrice(${1:integer price}, [${2:integer price_button_a}, ${3:integer price_button_b}, ${4:integer price_button_c}, ${5:integer price_button_d}]);\n\
snippet llSetPhysicsMaterial\n\
- llSetPhysicsMaterial(${1:integer mask}, ${2:float gravity_multiplier}, ${3:float restitution}, ${4:float friction}, ${5:float density})\n\
+ llSetPhysicsMaterial(${1:integer mask}, ${2:float gravity_multiplier}, ${3:float restitution}, ${4:float friction}, ${5:float density});\n\
snippet llSetPos\n\
- llSetPos(${1:vector pos})\n\
+ llSetPos(${1:vector pos});\n\
snippet llSetPrimitiveParams\n\
- llSetPrimitiveParams(${1:list rules})\n\
+ llSetPrimitiveParams(${1:list rules});\n\
snippet llSetPrimMediaParams\n\
- llSetPrimMediaParams(${1:integer face}, ${2:list params})\n\
+ llSetPrimMediaParams(${1:integer face}, ${2:list params});\n\
snippet llSetRegionPos\n\
- llSetRegionPos(${1:vector position})\n\
+ llSetRegionPos(${1:vector position})\n\
snippet llSetRemoteScriptAccessPin\n\
- llSetRemoteScriptAccessPin(${1:integer pin})\n\
+ llSetRemoteScriptAccessPin(${1:integer pin});\n\
snippet llSetRot\n\
- llSetRot(${1:rotation rot})\n\
+ llSetRot(${1:rotation rot});\n\
snippet llSetScale\n\
- llSetScale(${1:vector size})\n\
+ llSetScale(${1:vector size});\n\
snippet llSetScriptState\n\
- llSetScriptState(${1:string name}, ${2:integer run})\n\
+ llSetScriptState(${1:string name}, ${2:integer run});\n\
snippet llSetSitText\n\
- llSetSitText(${1:string text})\n\
+ llSetSitText(${1:string text});\n\
snippet llSetSoundQueueing\n\
- llSetSoundQueueing(${1:integer queue})\n\
+ llSetSoundQueueing(${1:integer queue});\n\
snippet llSetSoundRadius\n\
- llSetSoundRadius(${1:float radius})\n\
+ llSetSoundRadius(${1:float radius});\n\
snippet llSetStatus\n\
- llSetStatus(${1:integer status}, ${2:integer value})\n\
+ llSetStatus(${1:integer status}, ${2:integer value});\n\
snippet llSetText\n\
- llSetText(${1:string text}, ${2:vector color}, ${3:float alpha})\n\
+ llSetText(${1:string text}, ${2:vector color}, ${3:float alpha});\n\
snippet llSetTexture\n\
- llSetTexture(${1:string texture}, ${2:integer face})\n\
+ llSetTexture(${1:string texture}, ${2:integer face});\n\
snippet llSetTextureAnim\n\
- llSetTextureAnim(${1:integer mode}, ${2:integer face}, ${3:integer sizex}, ${4:integer sizey}, ${5:float start}, ${6:float length}, ${7:float rate})\n\
+ llSetTextureAnim(${1:integer mode}, ${2:integer face}, ${3:integer sizex}, ${4:integer sizey}, ${5:float start}, ${6:float length}, ${7:float rate});\n\
snippet llSetTimerEvent\n\
- llSetTimerEvent(${1:float sec})\n\
+ llSetTimerEvent(${1:float sec});\n\
snippet llSetTorque\n\
- llSetTorque(${1:vector torque}, ${2:integer local})\n\
+ llSetTorque(${1:vector torque}, ${2:integer local});\n\
snippet llSetTouchText\n\
- llSetTouchText(${1:string text})\n\
+ llSetTouchText(${1:string text});\n\
snippet llSetVehicleFlags\n\
- llSetVehicleFlags(${1:integer flags})\n\
+ llSetVehicleFlags(${1:integer flags});\n\
snippet llSetVehicleFloatParam\n\
- llSetVehicleFloatParam(${1:integer param}, ${2:float value})\n\
+ llSetVehicleFloatParam(${1:integer param}, ${2:float value});\n\
snippet llSetVehicleRotationParam\n\
- llSetVehicleRotationParam(${1:integer param}, ${2:rotation rot})\n\
+ llSetVehicleRotationParam(${1:integer param}, ${2:rotation rot});\n\
snippet llSetVehicleType\n\
- llSetVehicleType(${1:integer type})\n\
+ llSetVehicleType(${1:integer type});\n\
snippet llSetVehicleVectorParam\n\
- llSetVehicleVectorParam(${1:integer param}, ${2:vector vec})\n\
+ llSetVehicleVectorParam(${1:integer param}, ${2:vector vec});\n\
snippet llSetVelocity\n\
- llSetVelocity(${1:vector force}, ${2:integer local})\n\
+ llSetVelocity(${1:vector force}, ${2:integer local});\n\
snippet llSHA1String\n\
- llSHA1String(${1:string src})\n\
+ llSHA1String(${1:string src})\n\
snippet llShout\n\
- llShout(${1:integer channel}, ${2:string msg})\n\
+ llShout(${1:integer channel}, ${2:string msg});\n\
snippet llSin\n\
- llSin(${1:float theta})\n\
+ llSin(${1:float theta})\n\
snippet llSitTarget\n\
- llSitTarget(${1:vector offset}, ${2:rotation rot})\n\
+ llSitTarget(${1:vector offset}, ${2:rotation rot});\n\
snippet llSleep\n\
- llSleep(${1:float sec})\n\
+ llSleep(${1:float sec});\n\
snippet llSqrt\n\
- llSqrt(${1:float val})\n\
+ llSqrt(${1:float val})\n\
snippet llStartAnimation\n\
- llStartAnimation(${1:string anim})\n\
+ llStartAnimation(${1:string anim});\n\
snippet llStopAnimation\n\
- llStopAnimation(${1:string anim})\n\
+ llStopAnimation(${1:string anim});\n\
+snippet llStopHover\n\
+ llStopHover();\n\
+snippet llStopLookAt\n\
+ llStopLookAt();\n\
+snippet llStopMoveToTarget\n\
+ llStopMoveToTarget();\n\
+snippet llStopSound\n\
+ llStopSound();\n\
snippet llStringLength\n\
- llStringLength(${1:string str})\n\
+ llStringLength(${1:string str})\n\
snippet llStringToBase64\n\
- llStringToBase64(${1:string str})\n\
+ llStringToBase64(${1:string str})\n\
snippet llStringTrim\n\
- llStringTrim(${1:string src}, ${2:integer type})\n\
+ llStringTrim(${1:string src}, ${2:integer type})\n\
snippet llSubStringIndex\n\
- llSubStringIndex(${1:string source}, ${2:string pattern})\n\
+ llSubStringIndex(${1:string source}, ${2:string pattern})\n\
snippet llTakeControls\n\
- llTakeControls(${1:integer controls}, ${2:integer accept}, ${3:integer pass_on})\n\
+ llTakeControls(${1:integer controls}, ${2:integer accept}, ${3:integer pass_on});\n\
snippet llTan\n\
- llTan(${1:float theta})\n\
+ llTan(${1:float theta})\n\
snippet llTarget\n\
- llTarget(${1:vector position}, ${2:float range})\n\
+ llTarget(${1:vector position}, ${2:float range})\n\
snippet llTargetOmega\n\
- llTargetOmega(${1:vector axis}, ${2:float spinrate}, ${3:float gain})\n\
+ llTargetOmega(${1:vector axis}, ${2:float spinrate}, ${3:float gain});\n\
snippet llTargetRemove\n\
- llTargetRemove(${1:integer handle})\n\
+ llTargetRemove(${1:integer handle});\n\
snippet llTeleportAgent\n\
- llTeleportAgent(${1:key avatar}, ${2:string landmark}, ${3:vector position}, ${4:vector look_at})\n\
+ llTeleportAgent(${1:key agent}, ${2:string landmark}, ${3:vector position}, ${4:vector look_at});\n\
snippet llTeleportAgentGlobalCoords\n\
- llTeleportAgentGlobalCoords(${1:key agent}, ${2:vector global_coordinates}, ${3:vector region_coordinates}, ${4:vector look_at})\n\
+ llTeleportAgentGlobalCoords(${1:key agent}, ${2:vector global_coordinates}, ${3:vector region_coordinates}, ${4:vector look_at});\n\
snippet llTeleportAgentHome\n\
- llTeleportAgentHome(${1:key avatar})\n\
+ llTeleportAgentHome(${1:key agent});\n\
snippet llTextBox\n\
- llTextBox(${1:key avatar}, ${2:string message}, ${3:integer channel})\n\
+ llTextBox(${1:key agent}, ${2:string message}, ${3:integer channel});\n\
snippet llToLower\n\
- llToLower(${1:string src})\n\
+ llToLower(${1:string src})\n\
snippet llToUpper\n\
- llToUpper(${1:string src})\n\
+ llToUpper(${1:string src})\n\
snippet llTransferLindenDollars\n\
- llTransferLindenDollars(${1:key destination}, ${2:integer amount})\n\
+ llTransferLindenDollars(${1:key destination}, ${2:integer amount})\n\
snippet llTriggerSound\n\
- llTriggerSound(${1:string sound}, ${2:float volume})\n\
+ llTriggerSound(${1:string sound}, ${2:float volume});\n\
snippet llTriggerSoundLimited\n\
- llTriggerSoundLimited(${1:string sound}, ${2:float volume}, ${3:vector top_north_east}, ${4:vector bottom_south_west})\n\
+ llTriggerSoundLimited(${1:string sound}, ${2:float volume}, ${3:vector top_north_east}, ${4:vector bottom_south_west});\n\
snippet llUnescapeURL\n\
- llUnescapeURL(${1:string url})\n\
+ llUnescapeURL(${1:string url})\n\
snippet llUnSit\n\
- llUnSit(${1:key id})\n\
+ llUnSit(${1:key id});\n\
snippet llUpdateCharacter\n\
- llUpdateCharacter(${1:list options})\n\
+ llUpdateCharacter(${1:list options})\n\
+snippet llUpdateKeyValue\n\
+ llUpdateKeyValue(${1:string k}, ${2:string v}, ${3:integer checked}, ${4:string ov})\n\
snippet llVecDist\n\
- llVecDist(${1:vector vec_a}, ${2:vector vec_b})\n\
+ llVecDist(${1:vector vec_a}, ${2:vector vec_b})\n\
snippet llVecMag\n\
- llVecMag(${1:vector vec})\n\
+ llVecMag(${1:vector vec})\n\
snippet llVecNorm\n\
- llVecNorm(${1:vector vec})\n\
+ llVecNorm(${1:vector vec})\n\
snippet llVolumeDetect\n\
- llVolumeDetect(${1:integer detect})\n\
+ llVolumeDetect(${1:integer detect});\n\
snippet llWanderWithin\n\
- llWanderWithin(${1:vector origin}, ${2:vector dist}, ${3:list options})\n\
+ llWanderWithin(${1:vector origin}, ${2:vector dist}, ${3:list options});\n\
snippet llWater\n\
- llWater(${1:vector offset})\n\
+ llWater(${1:vector offset});\n\
snippet llWhisper\n\
- llWhisper(${1:integer channel}, ${2:string msg})\n\
+ llWhisper(${1:integer channel}, ${2:string msg});\n\
snippet llWind\n\
- llWind(${1:vector offset})\n\
+ llWind(${1:vector offset});\n\
snippet llXorBase64\n\
- llXorBase64(${1:string str1}, ${2:string str2}\n\
+ llXorBase64(${1:string str1}, ${2:string str2})\n\
snippet money\n\
- money(${1:key id}, ${2:integer amount})\n\
- {\n\
- $0\n\
- }\n\
+ money(${1:key id}, ${2:integer amount})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet object_rez\n\
- object_rez(${1:key id})\n\
- {\n\
- $0\n\
- }\n\
+ object_rez(${1:key id})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet on_rez\n\
- on_rez(${1:integer start_param})\n\
- {\n\
- $0\n\
- }\n\
+ on_rez(${1:integer start_param})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet path_update\n\
- path_update(${1:integer type}, ${2:list reserved})\n\
- {\n\
- $0\n\
- }\n\
+ path_update(${1:integer type}, ${2:list reserved})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet remote_data\n\
- remote_data(${1:integer event_type}, ${2:key channel}, ${3:key message_id}, ${4:string sender}, ${5:integer idata}, ${6:string sdata})\n\
- {\n\
- $0\n\
- }\n\
+ remote_data(${1:integer event_type}, ${2:key channel}, ${3:key message_id}, ${4:string sender}, ${5:integer idata}, ${6:string sdata})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet run_time_permissions\n\
- run_time_permissions(${1:integer perm})\n\
- {\n\
- $0\n\
- }\n\
+ run_time_permissions(${1:integer perm})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet sensor\n\
- sensor(${1:integer index})\n\
- {\n\
- $0\n\
- }\n\
+ sensor(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet state\n\
- state ${1:name}\n\
+ state ${1:name}\n\
snippet touch\n\
- touch(${1:integer index})\n\
- {\n\
- $0\n\
- }\n\
+ touch(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet touch_end\n\
- touch_end(${1:integer index})\n\
- {\n\
- $0\n\
- }\n\
+ touch_end(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet touch_start\n\
- touch_start(${1:integer index})\n\
- {\n\
- $0\n\
- }\n\
+ touch_start(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet transaction_result\n\
- transaction_result(${1:key id}, ${2:integer success}, ${3:string data})\n\
- {\n\
- $0\n\
- }\n\
+ transaction_result(${1:key id}, ${2:integer success}, ${3:string data})\n\
+ {\n\
+ $0\n\
+ }\n\
snippet while\n\
- while (${1:condition})\n\
- {\n\
- $0\n\
- }\n\
+ while (${1:condition})\n\
+ {\n\
+ $0\n\
+ }\n\
";
exports.scope = "lsl";
diff --git a/js/vendor/ace/src-noconflict/snippets/lua.js b/js/vendor/ace/src-noconflict/snippets/lua.js
index 92b0b74..c369b64 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/lua.js
+++ b/js/vendor/ace/src-noconflict/snippets/lua.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/lua', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/lua",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet #!\n\
#!/usr/bin/env lua\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/luapage.js b/js/vendor/ace/src-noconflict/snippets/luapage.js
index 1beeeed..f1bcf09 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/luapage.js
+++ b/js/vendor/ace/src-noconflict/snippets/luapage.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/luapage', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/luapage",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "luapage";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/lucene.js b/js/vendor/ace/src-noconflict/snippets/lucene.js
index 5780fc6..8795919 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/lucene.js
+++ b/js/vendor/ace/src-noconflict/snippets/lucene.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/lucene', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/lucene",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "lucene";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/makefile.js b/js/vendor/ace/src-noconflict/snippets/makefile.js
index 3e6215b..6c02e0d 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/makefile.js
+++ b/js/vendor/ace/src-noconflict/snippets/makefile.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/makefile', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/makefile",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet ifeq\n\
ifeq (${1:cond0},${2:cond1})\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/markdown.js b/js/vendor/ace/src-noconflict/snippets/markdown.js
index e536f00..d05f16b 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/markdown.js
+++ b/js/vendor/ace/src-noconflict/snippets/markdown.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/markdown', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/markdown",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "# Markdown\n\
\n\
@@ -26,14 +26,15 @@ snippet ![:*\n\
![${1:id}]: ${2:`@*`} \"${3:title}\"\n\
\n\
snippet ===\n\
- `repeat('=', strlen(getline(line(\".\") - 1)))`\n\
+regex /^/=+/=*//\n\
+ ${PREV_LINE/./=/g}\n\
\n\
- ${1}\n\
+ ${0}\n\
snippet ---\n\
- `repeat('-', strlen(getline(line(\".\") - 1)))`\n\
+regex /^/-+/-*//\n\
+ ${PREV_LINE/./-/g}\n\
\n\
- ${1}\n\
-\n\
+ ${0}\n\
snippet blockquote\n\
{% blockquote %}\n\
${1:quote}\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/mask.js b/js/vendor/ace/src-noconflict/snippets/mask.js
new file mode 100755
index 0000000..2811ad2
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/mask.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/mask",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "mask";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/matlab.js b/js/vendor/ace/src-noconflict/snippets/matlab.js
index 8e4a403..ce298c3 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/matlab.js
+++ b/js/vendor/ace/src-noconflict/snippets/matlab.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/matlab', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/matlab",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "matlab";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/mel.js b/js/vendor/ace/src-noconflict/snippets/mel.js
new file mode 100755
index 0000000..537cc25
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/mel.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/mel",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "mel";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/mips_assembler.js b/js/vendor/ace/src-noconflict/snippets/mips_assembler.js
new file mode 100755
index 0000000..08fbb81
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/mips_assembler.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/mips_assembler",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "mips_assembler";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/mipsassembler.js b/js/vendor/ace/src-noconflict/snippets/mipsassembler.js
new file mode 100755
index 0000000..3e997aa
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/mipsassembler.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/mipsassembler",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/mushcode.js b/js/vendor/ace/src-noconflict/snippets/mushcode.js
index 1c4e0a5..1f0fe24 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/mushcode.js
+++ b/js/vendor/ace/src-noconflict/snippets/mushcode.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/mushcode', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/mushcode",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "mushcode";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/mushcode_high_rules.js b/js/vendor/ace/src-noconflict/snippets/mushcode_high_rules.js
deleted file mode 100644
index 08c47c2..0000000
--- a/js/vendor/ace/src-noconflict/snippets/mushcode_high_rules.js
+++ /dev/null
@@ -1,7 +0,0 @@
-ace.define('ace/snippets/mushcode_high_rules', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-exports.snippetText = "";
-exports.scope = "mushcode_high_rules";
-
-});
diff --git a/js/vendor/ace/src-noconflict/snippets/mysql.js b/js/vendor/ace/src-noconflict/snippets/mysql.js
index 3a49569..bfb3a42 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/mysql.js
+++ b/js/vendor/ace/src-noconflict/snippets/mysql.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/mysql', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/mysql",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "mysql";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/nix.js b/js/vendor/ace/src-noconflict/snippets/nix.js
new file mode 100755
index 0000000..4fb6e70
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/nix.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/nix",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "nix";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/objectivec.js b/js/vendor/ace/src-noconflict/snippets/objectivec.js
index a74db18..f93e6ae 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/objectivec.js
+++ b/js/vendor/ace/src-noconflict/snippets/objectivec.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/objectivec', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/objectivec",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "objectivec";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/ocaml.js b/js/vendor/ace/src-noconflict/snippets/ocaml.js
index ea5ab8a..06e0940 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/ocaml.js
+++ b/js/vendor/ace/src-noconflict/snippets/ocaml.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/ocaml', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/ocaml",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "ocaml";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/pascal.js b/js/vendor/ace/src-noconflict/snippets/pascal.js
index 5b4721c..70aa2ee 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/pascal.js
+++ b/js/vendor/ace/src-noconflict/snippets/pascal.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/pascal', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/pascal",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "pascal";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/perl.js b/js/vendor/ace/src-noconflict/snippets/perl.js
index 16f2d3f..9f81843 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/perl.js
+++ b/js/vendor/ace/src-noconflict/snippets/perl.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/perl', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/perl",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "# #!/usr/bin/perl\n\
snippet #!\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/pgsql.js b/js/vendor/ace/src-noconflict/snippets/pgsql.js
index 3e96da1..5914fe1 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/pgsql.js
+++ b/js/vendor/ace/src-noconflict/snippets/pgsql.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/pgsql', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/pgsql",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "pgsql";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/php.js b/js/vendor/ace/src-noconflict/snippets/php.js
index 9482be3..1710b3c 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/php.js
+++ b/js/vendor/ace/src-noconflict/snippets/php.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/php', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/php",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet <?\n\
<?php\n\
@@ -19,12 +19,12 @@ snippet use\n\
use ${1:Foo\\Bar\\Baz};\n\
${2}\n\
snippet c\n\
- ${1:abstract }class ${2:`Filename()`}\n\
+ ${1:abstract }class ${2:$FILENAME}\n\
{\n\
${3}\n\
}\n\
snippet i\n\
- interface ${1:`Filename()`}\n\
+ interface ${1:$FILENAME}\n\
{\n\
${2}\n\
}\n\
@@ -43,13 +43,6 @@ snippet m\n\
}\n\
# setter method\n\
snippet sm \n\
- /**\n\
- * Sets the value of ${1:foo}\n\
- *\n\
- * @param ${2:$1} $$1 ${3:description}\n\
- *\n\
- * @return ${4:`Filename()`}\n\
- */\n\
${5:public} function set${6:$2}(${7:$2 }$$1)\n\
{\n\
$this->${8:$1} = $$1;\n\
@@ -57,11 +50,6 @@ snippet sm \n\
}${9}\n\
# getter method\n\
snippet gm\n\
- /**\n\
- * Gets the value of ${1:foo}\n\
- *\n\
- * @return ${2:$1}\n\
- */\n\
${3:public} function get${4:$2}()\n\
{\n\
return $this->${5:$1};\n\
@@ -107,119 +95,48 @@ snippet req1\n\
require_once '${1:file}';${2}\n\
# Start Docblock\n\
snippet /*\n\
- /**\n\
- * ${1}\n\
- */\n\
# Class - post doc\n\
-snippet doc_cp\n\
- /**\n\
- * ${1:undocumented class}\n\
- *\n\
- * @package ${2:default}\n\
- * @subpackage ${3:default}\n\
- * @author ${4:`g:snips_author`}\n\
- */${5}\n\
+snippet doc_cp${5}\n\
# Class Variable - post doc\n\
-snippet doc_vp\n\
- /**\n\
- * ${1:undocumented class variable}\n\
- *\n\
- * @var ${2:string}\n\
- */${3}\n\
+snippet doc_vp${3}\n\
# Class Variable\n\
snippet doc_v\n\
- /**\n\
- * ${3:undocumented class variable}\n\
- *\n\
- * @var ${4:string}\n\
- */\n\
${1:var} $${2};${5}\n\
# Class\n\
snippet doc_c\n\
- /**\n\
- * ${3:undocumented class}\n\
- *\n\
- * @package ${4:default}\n\
- * @subpackage ${5:default}\n\
- * @author ${6:`g:snips_author`}\n\
- */\n\
${1:}class ${2:}\n\
{\n\
${7}\n\
} // END $1class $2\n\
# Constant Definition - post doc\n\
-snippet doc_dp\n\
- /**\n\
- * ${1:undocumented constant}\n\
- */${2}\n\
+snippet doc_dp${2}\n\
# Constant Definition\n\
snippet doc_d\n\
- /**\n\
- * ${3:undocumented constant}\n\
- */\n\
ace.define(${1}, ${2});${4}\n\
# Function - post doc\n\
-snippet doc_fp\n\
- /**\n\
- * ${1:undocumented function}\n\
- *\n\
- * @return ${2:void}\n\
- * @author ${3:`g:snips_author`}\n\
- */${4}\n\
+snippet doc_fp${4}\n\
# Function signature\n\
snippet doc_s\n\
- /**\n\
- * ${4:undocumented function}\n\
- *\n\
- * @return ${5:void}\n\
- * @author ${6:`g:snips_author`}\n\
- */\n\
${1}function ${2}(${3});${7}\n\
# Function\n\
snippet doc_f\n\
- /**\n\
- * ${4:undocumented function}\n\
- *\n\
- * @return ${5:void}\n\
- * @author ${6:`g:snips_author`}\n\
- */\n\
${1}function ${2}(${3})\n\
{${7}\n\
}\n\
# Header\n\
snippet doc_h\n\
- /**\n\
- * ${1}\n\
- *\n\
- * @author ${2:`g:snips_author`}\n\
- * @version ${3:$Id$}\n\
- * @copyright ${4:$2}, `strftime('%d %B, %Y')`\n\
- * @package ${5:default}\n\
- */\n\
\n\
# Interface\n\
snippet interface\n\
- /**\n\
- * ${2:undocumented class}\n\
- *\n\
- * @package ${3:default}\n\
- * @author ${4:`g:snips_author`}\n\
- */\n\
- interface ${1:`Filename()`}\n\
+ interface ${1:$FILENAME}\n\
{\n\
${5}\n\
}\n\
# class ...\n\
snippet class\n\
- /**\n\
- * ${1}\n\
- */\n\
- class ${2:`Filename()`}\n\
+ class ${2:$FILENAME}\n\
{\n\
${3}\n\
- /**\n\
- * ${4}\n\
- */\n\
${5:public} function ${6:__construct}(${7:argument})\n\
{\n\
${8:// code...}\n\
@@ -333,23 +250,10 @@ snippet http_redirect\n\
exit();\n\
# Getters & Setters\n\
snippet gs\n\
- /**\n\
- * Gets the value of ${1:foo}\n\
- *\n\
- * @return ${2:$1}\n\
- */\n\
public function get${3:$2}()\n\
{\n\
return $this->${4:$1};\n\
}\n\
-\n\
- /**\n\
- * Sets the value of $1\n\
- *\n\
- * @param $2 $$1 ${5:description}\n\
- *\n\
- * @return ${6:`Filename()`}\n\
- */\n\
public function set$3(${7:$2 }$$1)\n\
{\n\
$this->$4 = $$1;\n\
@@ -357,11 +261,6 @@ snippet gs\n\
}${8}\n\
# anotation, get, and set, useful for doctrine\n\
snippet ags\n\
- /**\n\
- * ${1:description}\n\
- * \n\
- * @${7}\n\
- */\n\
${2:protected} $${3:foo};\n\
\n\
public function get${4:$3}()\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/plain_text.js b/js/vendor/ace/src-noconflict/snippets/plain_text.js
index 1c76fdd..24223a6 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/plain_text.js
+++ b/js/vendor/ace/src-noconflict/snippets/plain_text.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/plain_text', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/plain_text",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "plain_text";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/powershell.js b/js/vendor/ace/src-noconflict/snippets/powershell.js
index c7bc2d3..a8e7310 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/powershell.js
+++ b/js/vendor/ace/src-noconflict/snippets/powershell.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/powershell', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/powershell",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "powershell";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/praat.js b/js/vendor/ace/src-noconflict/snippets/praat.js
new file mode 100755
index 0000000..dcf6826
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/praat.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/praat",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "praat";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/prolog.js b/js/vendor/ace/src-noconflict/snippets/prolog.js
index 7e75d51..2d63cb8 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/prolog.js
+++ b/js/vendor/ace/src-noconflict/snippets/prolog.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/prolog', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/prolog",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "prolog";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/properties.js b/js/vendor/ace/src-noconflict/snippets/properties.js
index ec389d5..44c1ada 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/properties.js
+++ b/js/vendor/ace/src-noconflict/snippets/properties.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/properties', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/properties",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "properties";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/protobuf.js b/js/vendor/ace/src-noconflict/snippets/protobuf.js
new file mode 100755
index 0000000..d00d57a
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/protobuf.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/protobuf",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "";
+exports.scope = "protobuf";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/python.js b/js/vendor/ace/src-noconflict/snippets/python.js
index 1a0be2a..182b340 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/python.js
+++ b/js/vendor/ace/src-noconflict/snippets/python.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/python', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/python",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet #!\n\
#!/usr/bin/env python\n\
@@ -10,8 +10,8 @@ snippet from\n\
# Module Docstring\n\
snippet docs\n\
'''\n\
- File: ${1:`Filename('$1.py', 'foo.py')`}\n\
- Author: ${2:`g:snips_author`}\n\
+ File: ${1:FILENAME:file_name}\n\
+ Author: ${2:author}\n\
Description: ${3}\n\
'''\n\
snippet wh\n\
@@ -132,7 +132,7 @@ snippet \"\n\
\"\"\"\n\
# test function/method\n\
snippet test\n\
- def test_${1:description}(${2:`indent('.') ? 'self' : ''`}):\n\
+ def test_${1:description}(${2:self}):\n\
${3:# TODO: write code...}\n\
# test case\n\
snippet testcase\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/r.js b/js/vendor/ace/src-noconflict/snippets/r.js
index 636ccc4..24c02a0 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/r.js
+++ b/js/vendor/ace/src-noconflict/snippets/r.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/r', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/r",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet #!\n\
#!/usr/bin/env Rscript\n\
@@ -50,7 +50,7 @@ snippet apply\n\
snippet lapply\n\
lapply(${1:list}, ${2:function})\n\
snippet sapply\n\
- lapply(${1:list}, ${2:function})\n\
+ sapply(${1:list}, ${2:function})\n\
snippet vapply\n\
vapply(${1:list}, ${2:function}, ${3:type})\n\
snippet mapply\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/rdoc.js b/js/vendor/ace/src-noconflict/snippets/rdoc.js
index 6cc1df9..956de47 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/rdoc.js
+++ b/js/vendor/ace/src-noconflict/snippets/rdoc.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/rdoc', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/rdoc",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "rdoc";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/rhtml.js b/js/vendor/ace/src-noconflict/snippets/rhtml.js
index 3323ea6..e62ce87 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/rhtml.js
+++ b/js/vendor/ace/src-noconflict/snippets/rhtml.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/rhtml', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/rhtml",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "rhtml";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/ruby.js b/js/vendor/ace/src-noconflict/snippets/ruby.js
index 7830e20..18bc409 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/ruby.js
+++ b/js/vendor/ace/src-noconflict/snippets/ruby.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/ruby', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/ruby",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "########################################\n\
# Ruby snippets - for Rails, see below #\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/rust.js b/js/vendor/ace/src-noconflict/snippets/rust.js
index 5936843..0411c63 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/rust.js
+++ b/js/vendor/ace/src-noconflict/snippets/rust.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/rust', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/rust",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "rust";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/sass.js b/js/vendor/ace/src-noconflict/snippets/sass.js
index b17eb4d..b9adc9d 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/sass.js
+++ b/js/vendor/ace/src-noconflict/snippets/sass.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/sass', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/sass",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "sass";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/scad.js b/js/vendor/ace/src-noconflict/snippets/scad.js
index 10aecfa..998a98a 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/scad.js
+++ b/js/vendor/ace/src-noconflict/snippets/scad.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/scad', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/scad",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "scad";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/scala.js b/js/vendor/ace/src-noconflict/snippets/scala.js
index e9f7d03..4051d98 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/scala.js
+++ b/js/vendor/ace/src-noconflict/snippets/scala.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/scala', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/scala",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "scala";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/scheme.js b/js/vendor/ace/src-noconflict/snippets/scheme.js
index d275591..202d074 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/scheme.js
+++ b/js/vendor/ace/src-noconflict/snippets/scheme.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/scheme', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/scheme",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "scheme";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/scss.js b/js/vendor/ace/src-noconflict/snippets/scss.js
index 14b77de..fbd98f7 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/scss.js
+++ b/js/vendor/ace/src-noconflict/snippets/scss.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/scss', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/scss",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "scss";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/sh.js b/js/vendor/ace/src-noconflict/snippets/sh.js
index b052e85..12074a6 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/sh.js
+++ b/js/vendor/ace/src-noconflict/snippets/sh.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/sh', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/sh",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "# Shebang. Executing bash via /usr/bin/env makes scripts more portable.\n\
snippet #!\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/sjs.js b/js/vendor/ace/src-noconflict/snippets/sjs.js
new file mode 100755
index 0000000..cf39a34
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/sjs.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/sjs",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "sjs";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/smarty.js b/js/vendor/ace/src-noconflict/snippets/smarty.js
new file mode 100755
index 0000000..47319a2
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/smarty.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/smarty",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "smarty";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/snippets.js b/js/vendor/ace/src-noconflict/snippets/snippets.js
index 25b10ec..b81605c 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/snippets.js
+++ b/js/vendor/ace/src-noconflict/snippets/snippets.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/snippets', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/snippets",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "# snippets for making snippets :)\n\
snippet snip\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/soy_template.js b/js/vendor/ace/src-noconflict/snippets/soy_template.js
new file mode 100755
index 0000000..908f5fd
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/soy_template.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/soy_template",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "soy_template";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/space.js b/js/vendor/ace/src-noconflict/snippets/space.js
new file mode 100755
index 0000000..302b84e
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/space.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/space",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "space";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/sql.js b/js/vendor/ace/src-noconflict/snippets/sql.js
index a9b359b..1822126 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/sql.js
+++ b/js/vendor/ace/src-noconflict/snippets/sql.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/sql', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/sql",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "snippet tbl\n\
create table ${1:table} (\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/sqlserver.js b/js/vendor/ace/src-noconflict/snippets/sqlserver.js
new file mode 100755
index 0000000..7dfa2d0
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/sqlserver.js
@@ -0,0 +1,76 @@
+ace.define("ace/snippets/sqlserver",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# ISNULL\n\
+snippet isnull\n\
+ ISNULL(${1:check_expression}, ${2:replacement_value})\n\
+# FORMAT\n\
+snippet format\n\
+ FORMAT(${1:value}, ${2:format})\n\
+# CAST\n\
+snippet cast\n\
+ CAST(${1:expression} AS ${2:data_type})\n\
+# CONVERT\n\
+snippet convert\n\
+ CONVERT(${1:data_type}, ${2:expression})\n\
+# DATEPART\n\
+snippet datepart\n\
+ DATEPART(${1:datepart}, ${2:date})\n\
+# DATEDIFF\n\
+snippet datediff\n\
+ DATEDIFF(${1:datepart}, ${2:startdate}, ${3:enddate})\n\
+# DATEADD\n\
+snippet dateadd\n\
+ DATEADD(${1:datepart}, ${2:number}, ${3:date})\n\
+# DATEFROMPARTS \n\
+snippet datefromparts\n\
+ DATEFROMPARTS(${1:year}, ${2:month}, ${3:day})\n\
+# OBJECT_DEFINITION\n\
+snippet objectdef\n\
+ SELECT OBJECT_DEFINITION(OBJECT_ID('${1:sys.server_permissions /*object name*/}'))\n\
+# STUFF XML\n\
+snippet stuffxml\n\
+ STUFF((SELECT ', ' + ${1:ColumnName}\n\
+ FROM ${2:TableName}\n\
+ WHERE ${3:WhereClause}\n\
+ FOR XML PATH('')), 1, 1, '') AS ${4:Alias}\n\
+ ${5:/*https://msdn.microsoft.com/en-us/library/ms188043.aspx*/}\n\
+# Create Procedure\n\
+snippet createproc\n\
+ -- =============================================\n\
+ -- Author: ${1:Author}\n\
+ -- Create date: ${2:Date}\n\
+ -- Description: ${3:Description}\n\
+ -- =============================================\n\
+ CREATE PROCEDURE ${4:Procedure_Name}\n\
+ ${5:/*Add the parameters for the stored procedure here*/}\n\
+ AS\n\
+ BEGIN\n\
+ -- SET NOCOUNT ON added to prevent extra result sets from interfering with SELECT statements.\n\
+ SET NOCOUNT ON;\n\
+ \n\
+ ${6:/*Add the T-SQL statements to compute the return value here*/}\n\
+ \n\
+ END\n\
+ GO\n\
+# Create Scalar Function\n\
+snippet createfn\n\
+ -- =============================================\n\
+ -- Author: ${1:Author}\n\
+ -- Create date: ${2:Date}\n\
+ -- Description: ${3:Description}\n\
+ -- =============================================\n\
+ CREATE FUNCTION ${4:Scalar_Function_Name}\n\
+ -- Add the parameters for the function here\n\
+ RETURNS ${5:Function_Data_Type}\n\
+ AS\n\
+ BEGIN\n\
+ DECLARE @Result ${5:Function_Data_Type}\n\
+ \n\
+ ${6:/*Add the T-SQL statements to compute the return value here*/}\n\
+ \n\
+ END\n\
+ GO";
+exports.scope = "sqlserver";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/stylus.js b/js/vendor/ace/src-noconflict/snippets/stylus.js
index 3369c4c..5f700ba 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/stylus.js
+++ b/js/vendor/ace/src-noconflict/snippets/stylus.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/stylus', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/stylus",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "stylus";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/svg.js b/js/vendor/ace/src-noconflict/snippets/svg.js
index 24ff8ed..69a3408 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/svg.js
+++ b/js/vendor/ace/src-noconflict/snippets/svg.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/svg', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/svg",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "svg";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/tcl.js b/js/vendor/ace/src-noconflict/snippets/tcl.js
index 4347cbc..4d116da 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/tcl.js
+++ b/js/vendor/ace/src-noconflict/snippets/tcl.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/tcl', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/tcl",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "# #!/usr/bin/env tclsh\n\
snippet #!\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/tex.js b/js/vendor/ace/src-noconflict/snippets/tex.js
index ce49077..2bd3f10 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/tex.js
+++ b/js/vendor/ace/src-noconflict/snippets/tex.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/tex', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/tex",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "#PREAMBLE\n\
#newcommand\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/text.js b/js/vendor/ace/src-noconflict/snippets/text.js
index 0834cfc..57b897b 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/text.js
+++ b/js/vendor/ace/src-noconflict/snippets/text.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/text', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/text",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "text";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/textile.js b/js/vendor/ace/src-noconflict/snippets/textile.js
index 106849b..a6fd711 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/textile.js
+++ b/js/vendor/ace/src-noconflict/snippets/textile.js
@@ -1,5 +1,5 @@
-ace.define('ace/snippets/textile', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/snippets/textile",["require","exports","module"], function(require, exports, module) {
+"use strict";
exports.snippetText = "# Jekyll post header\n\
snippet header\n\
diff --git a/js/vendor/ace/src-noconflict/snippets/toml.js b/js/vendor/ace/src-noconflict/snippets/toml.js
index 724bea9..0c1a857 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/toml.js
+++ b/js/vendor/ace/src-noconflict/snippets/toml.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/toml', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/toml",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "toml";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/twig.js b/js/vendor/ace/src-noconflict/snippets/twig.js
index 0d8b680..ccc6073 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/twig.js
+++ b/js/vendor/ace/src-noconflict/snippets/twig.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/twig', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/twig",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "twig";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/typescript.js b/js/vendor/ace/src-noconflict/snippets/typescript.js
index 0c0affd..5f6217d 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/typescript.js
+++ b/js/vendor/ace/src-noconflict/snippets/typescript.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/typescript', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/typescript",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "typescript";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/vala.js b/js/vendor/ace/src-noconflict/snippets/vala.js
new file mode 100755
index 0000000..3b49342
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/vala.js
@@ -0,0 +1,193 @@
+ace.define("ace/snippets/vala",["require","exports","module"], function(require, exports, module) {
+"use strict";
+exports.snippets = [
+ {
+ "content": "case ${1:condition}:\n\t$0\n\tbreak;\n",
+ "name": "case",
+ "scope": "vala",
+ "tabTrigger": "case"
+ },
+ {
+ "content": "/**\n * ${6}\n */\n${1:public} class ${2:MethodName}${3: : GLib.Object} {\n\n\t/**\n\t * ${7}\n\t */\n\tpublic ${2}(${4}) {\n\t\t${5}\n\t}\n\n\t$0\n}",
+ "name": "class",
+ "scope": "vala",
+ "tabTrigger": "class"
+ },
+ {
+ "content": "(${1}) => {\n\t${0}\n}\n",
+ "name": "closure",
+ "scope": "vala",
+ "tabTrigger": "=>"
+ },
+ {
+ "content": "/*\n * $0\n */",
+ "name": "Comment (multiline)",
+ "scope": "vala",
+ "tabTrigger": "/*"
+ },
+ {
+ "content": "Console.WriteLine($1);\n$0",
+ "name": "Console.WriteLine (writeline)",
+ "scope": "vala",
+ "tabTrigger": "writeline"
+ },
+ {
+ "content": "[DBus(name = \"$0\")]",
+ "name": "DBus annotation",
+ "scope": "vala",
+ "tabTrigger": "[DBus"
+ },
+ {
+ "content": "delegate ${1:void} ${2:DelegateName}($0);",
+ "name": "delegate",
+ "scope": "vala",
+ "tabTrigger": "delegate"
+ },
+ {
+ "content": "do {\n\t$0\n} while ($1);\n",
+ "name": "do while",
+ "scope": "vala",
+ "tabTrigger": "dowhile"
+ },
+ {
+ "content": "/**\n * $0\n */",
+ "name": "DocBlock",
+ "scope": "vala",
+ "tabTrigger": "/**"
+ },
+ {
+ "content": "else if ($1) {\n\t$0\n}\n",
+ "name": "else if (elseif)",
+ "scope": "vala",
+ "tabTrigger": "elseif"
+ },
+ {
+ "content": "else {\n\t$0\n}",
+ "name": "else",
+ "scope": "vala",
+ "tabTrigger": "else"
+ },
+ {
+ "content": "enum {$1:EnumName} {\n\t$0\n}",
+ "name": "enum",
+ "scope": "vala",
+ "tabTrigger": "enum"
+ },
+ {
+ "content": "public errordomain ${1:Error} {\n\t$0\n}",
+ "name": "error domain",
+ "scope": "vala",
+ "tabTrigger": "errordomain"
+ },
+ {
+ "content": "for ($1;$2;$3) {\n\t$0\n}",
+ "name": "for",
+ "scope": "vala",
+ "tabTrigger": "for"
+ },
+ {
+ "content": "foreach ($1 in $2) {\n\t$0\n}",
+ "name": "foreach",
+ "scope": "vala",
+ "tabTrigger": "foreach"
+ },
+ {
+ "content": "Gee.ArrayList<${1:G}>($0);",
+ "name": "Gee.ArrayList",
+ "scope": "vala",
+ "tabTrigger": "ArrayList"
+ },
+ {
+ "content": "Gee.HashMap<${1:K},${2:V}>($0);",
+ "name": "Gee.HashMap",
+ "scope": "vala",
+ "tabTrigger": "HashMap"
+ },
+ {
+ "content": "Gee.HashSet<${1:G}>($0);",
+ "name": "Gee.HashSet",
+ "scope": "vala",
+ "tabTrigger": "HashSet"
+ },
+ {
+ "content": "if ($1) {\n\t$0\n}",
+ "name": "if",
+ "scope": "vala",
+ "tabTrigger": "if"
+ },
+ {
+ "content": "interface ${1:InterfaceName}{$2: : SuperInterface} {\n\t$0\n}",
+ "name": "interface",
+ "scope": "vala",
+ "tabTrigger": "interface"
+ },
+ {
+ "content": "public static int main(string [] argv) {\n\t${0}\n\treturn 0;\n}",
+ "name": "Main function",
+ "scope": "vala",
+ "tabTrigger": "main"
+ },
+ {
+ "content": "namespace $1 {\n\t$0\n}\n",
+ "name": "namespace (ns)",
+ "scope": "vala",
+ "tabTrigger": "ns"
+ },
+ {
+ "content": "stdout.printf($0);",
+ "name": "printf",
+ "scope": "vala",
+ "tabTrigger": "printf"
+ },
+ {
+ "content": "${1:public} ${2:Type} ${3:Name} {\n\tset {\n\t\t$0\n\t}\n\tget {\n\n\t}\n}",
+ "name": "property (prop)",
+ "scope": "vala",
+ "tabTrigger": "prop"
+ },
+ {
+ "content": "${1:public} ${2:Type} ${3:Name} {\n\tget {\n\t\t$0\n\t}\n}",
+ "name": "read-only property (roprop)",
+ "scope": "vala",
+ "tabTrigger": "roprop"
+ },
+ {
+ "content": "@\"${1:\\$var}\"",
+ "name": "String template (@)",
+ "scope": "vala",
+ "tabTrigger": "@"
+ },
+ {
+ "content": "struct ${1:StructName} {\n\t$0\n}",
+ "name": "struct",
+ "scope": "vala",
+ "tabTrigger": "struct"
+ },
+ {
+ "content": "switch ($1) {\n\t$0\n}",
+ "name": "switch",
+ "scope": "vala",
+ "tabTrigger": "switch"
+ },
+ {
+ "content": "try {\n\t$2\n} catch (${1:Error} e) {\n\t$0\n}",
+ "name": "try/catch",
+ "scope": "vala",
+ "tabTrigger": "try"
+ },
+ {
+ "content": "\"\"\"$0\"\"\";",
+ "name": "Verbatim string (\"\"\")",
+ "scope": "vala",
+ "tabTrigger": "verbatim"
+ },
+ {
+ "content": "while ($1) {\n\t$0\n}",
+ "name": "while",
+ "scope": "vala",
+ "tabTrigger": "while"
+ }
+];
+exports.scope = "";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/vbscript.js b/js/vendor/ace/src-noconflict/snippets/vbscript.js
index c05c1f8..38ca68f 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/vbscript.js
+++ b/js/vendor/ace/src-noconflict/snippets/vbscript.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/vbscript', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/vbscript",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "vbscript";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/velocity.js b/js/vendor/ace/src-noconflict/snippets/velocity.js
index 0ab074e..e2b12a4 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/velocity.js
+++ b/js/vendor/ace/src-noconflict/snippets/velocity.js
@@ -1,7 +1,36 @@
-ace.define('ace/snippets/velocity', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/velocity",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText = "# macro\n\
+snippet #macro\n\
+ #macro ( ${1:macroName} ${2:\\$var1, [\\$var2, ...]} )\n\
+ ${3:## macro code}\n\
+ #end\n\
+# foreach\n\
+snippet #foreach\n\
+ #foreach ( ${1:\\$item} in ${2:\\$collection} )\n\
+ ${3:## foreach code}\n\
+ #end\n\
+# if\n\
+snippet #if\n\
+ #if ( ${1:true} )\n\
+ ${0}\n\
+ #end\n\
+# if ... else\n\
+snippet #ife\n\
+ #if ( ${1:true} )\n\
+ ${2}\n\
+ #else\n\
+ ${0}\n\
+ #end\n\
+#import\n\
+snippet #import\n\
+ #import ( \"${1:path/to/velocity/format}\" )\n\
+# set\n\
+snippet #set\n\
+ #set ( $${1:var} = ${0} )\n\
+";
exports.scope = "velocity";
+exports.includeScopes = ["html", "javascript", "css"];
});
diff --git a/js/vendor/ace/src-noconflict/snippets/verilog.js b/js/vendor/ace/src-noconflict/snippets/verilog.js
index ad123a3..8103ff6 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/verilog.js
+++ b/js/vendor/ace/src-noconflict/snippets/verilog.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/verilog', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/verilog",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "verilog";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/vhdl.js b/js/vendor/ace/src-noconflict/snippets/vhdl.js
new file mode 100755
index 0000000..10d8ca0
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/snippets/vhdl.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/vhdl",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "vhdl";
+
+});
diff --git a/js/vendor/ace/src-noconflict/snippets/xml.js b/js/vendor/ace/src-noconflict/snippets/xml.js
index d26f8fd..ee4b688 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/xml.js
+++ b/js/vendor/ace/src-noconflict/snippets/xml.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/xml', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/xml",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "xml";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/xquery.js b/js/vendor/ace/src-noconflict/snippets/xquery.js
index aeb24d8..c880abc 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/xquery.js
+++ b/js/vendor/ace/src-noconflict/snippets/xquery.js
@@ -1,7 +1,68 @@
-ace.define('ace/snippets/xquery', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/xquery",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText = "snippet for\n\
+ for $${1:item} in ${2:expr}\n\
+snippet return\n\
+ return ${1:expr}\n\
+snippet import\n\
+ import module namespace ${1:ns} = \"${2:http://www.example.com/}\";\n\
+snippet some\n\
+ some $${1:varname} in ${2:expr} satisfies ${3:expr}\n\
+snippet every\n\
+ every $${1:varname} in ${2:expr} satisfies ${3:expr}\n\
+snippet if\n\
+ if(${1:true}) then ${2:expr} else ${3:true}\n\
+snippet switch\n\
+ switch(${1:\"foo\"})\n\
+ case ${2:\"foo\"}\n\
+ return ${3:true}\n\
+ default return ${4:false}\n\
+snippet try\n\
+ try { ${1:expr} } catch ${2:*} { ${3:expr} }\n\
+snippet tumbling\n\
+ for tumbling window $${1:varname} in ${2:expr}\n\
+ start at $${3:start} when ${4:expr}\n\
+ end at $${5:end} when ${6:expr}\n\
+ return ${7:expr}\n\
+snippet sliding\n\
+ for sliding window $${1:varname} in ${2:expr}\n\
+ start at $${3:start} when ${4:expr}\n\
+ end at $${5:end} when ${6:expr}\n\
+ return ${7:expr}\n\
+snippet let\n\
+ let $${1:varname} := ${2:expr}\n\
+snippet group\n\
+ group by $${1:varname} := ${2:expr}\n\
+snippet order\n\
+ order by ${1:expr} ${2:descending}\n\
+snippet stable\n\
+ stable order by ${1:expr}\n\
+snippet count\n\
+ count $${1:varname}\n\
+snippet ordered\n\
+ ordered { ${1:expr} }\n\
+snippet unordered\n\
+ unordered { ${1:expr} }\n\
+snippet treat \n\
+ treat as ${1:expr}\n\
+snippet castable\n\
+ castable as ${1:atomicType}\n\
+snippet cast\n\
+ cast as ${1:atomicType}\n\
+snippet typeswitch\n\
+ typeswitch(${1:expr})\n\
+ case ${2:type} return ${3:expr}\n\
+ default return ${4:expr}\n\
+snippet var\n\
+ declare variable $${1:varname} := ${2:expr};\n\
+snippet fn\n\
+ declare function ${1:ns}:${2:name}(){\n\
+ ${3:expr}\n\
+ };\n\
+snippet module\n\
+ module namespace ${1:ns} = \"${2:http://www.example.com}\";\n\
+";
exports.scope = "xquery";
});
diff --git a/js/vendor/ace/src-noconflict/snippets/yaml.js b/js/vendor/ace/src-noconflict/snippets/yaml.js
index 1c2df80..1adceab 100644..100755
--- a/js/vendor/ace/src-noconflict/snippets/yaml.js
+++ b/js/vendor/ace/src-noconflict/snippets/yaml.js
@@ -1,7 +1,7 @@
-ace.define('ace/snippets/yaml', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/snippets/yaml",["require","exports","module"], function(require, exports, module) {
+"use strict";
-
-exports.snippetText = "";
+exports.snippetText =undefined;
exports.scope = "yaml";
});
diff --git a/js/vendor/ace/src-noconflict/theme-ambiance.js b/js/vendor/ace/src-noconflict/theme-ambiance.js
index 06dde3b..1e53ecd 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-ambiance.js
+++ b/js/vendor/ace/src-noconflict/theme-ambiance.js
@@ -1,27 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright 2011 Irakli Gozalishvili. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/ambiance', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/ambiance",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-ambiance";
@@ -41,6 +18,9 @@ color: #222;\
.ace-ambiance .ace_gutter-layer {\
background: repeat left top;\
}\
+.ace-ambiance .ace_gutter-active-line {\
+background-color: #3F3F3F;\
+}\
.ace-ambiance .ace_fold-widget {\
text-align: center;\
}\
diff --git a/js/vendor/ace/src-noconflict/theme-chaos.js b/js/vendor/ace/src-noconflict/theme-chaos.js
index 4154499..97ec7fb 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-chaos.js
+++ b/js/vendor/ace/src-noconflict/theme-chaos.js
@@ -1,27 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright 2011 Irakli Gozalishvili. All rights reserved.
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/chaos', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/chaos",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-chaos";
@@ -176,4 +153,4 @@ color: #000;\
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
-}); \ No newline at end of file
+});
diff --git a/js/vendor/ace/src-noconflict/theme-chrome.js b/js/vendor/ace/src-noconflict/theme-chrome.js
index 18e0f3a..83742aa 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-chrome.js
+++ b/js/vendor/ace/src-noconflict/theme-chrome.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/chrome', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/chrome",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-chrome";
@@ -43,13 +13,10 @@ background: #e8e8e8;\
}\
.ace-chrome {\
background-color: #FFFFFF;\
+color: black;\
}\
.ace-chrome .ace_cursor {\
-border-left: 2px solid black;\
-}\
-.ace-chrome .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid black;\
+color: black;\
}\
.ace-chrome .ace_invisible {\
color: rgb(191, 191, 191);\
diff --git a/js/vendor/ace/src-noconflict/theme-clouds.js b/js/vendor/ace/src-noconflict/theme-clouds.js
index fba3f1f..1fa12d6 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-clouds.js
+++ b/js/vendor/ace/src-noconflict/theme-clouds.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/clouds', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/clouds",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-clouds";
@@ -45,11 +15,7 @@ background-color: #FFFFFF;\
color: #000000\
}\
.ace-clouds .ace_cursor {\
-border-left: 2px solid #000000\
-}\
-.ace-clouds .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #000000\
+color: #000000\
}\
.ace-clouds .ace_marker-layer .ace_selection {\
background: #BDD5FC\
diff --git a/js/vendor/ace/src-noconflict/theme-clouds_midnight.js b/js/vendor/ace/src-noconflict/theme-clouds_midnight.js
index 5dd4072..b1c6fd2 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-clouds_midnight.js
+++ b/js/vendor/ace/src-noconflict/theme-clouds_midnight.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/clouds_midnight', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/clouds_midnight",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-clouds-midnight";
@@ -40,16 +10,12 @@ color: #929292\
width: 1px;\
background: #232323\
}\
-.ace-clouds-midnight{\
+.ace-clouds-midnight {\
background-color: #191919;\
color: #929292\
}\
.ace-clouds-midnight .ace_cursor {\
-border-left: 2px solid #7DA5DC\
-}\
-.ace-clouds-midnight .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #7DA5DC\
+color: #7DA5DC\
}\
.ace-clouds-midnight .ace_marker-layer .ace_selection {\
background: #000000\
@@ -75,7 +41,7 @@ background-color: rgba(215, 215, 215, 0.031)\
border: 1px solid #000000\
}\
.ace-clouds-midnight .ace_invisible {\
-color: #BFBFBF\
+color: #666\
}\
.ace-clouds-midnight .ace_keyword,\
.ace-clouds-midnight .ace_meta,\
@@ -123,7 +89,7 @@ color: #3C403B\
color: #606060\
}\
.ace-clouds-midnight .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-cobalt.js b/js/vendor/ace/src-noconflict/theme-cobalt.js
index bd1890f..9aac8f5 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-cobalt.js
+++ b/js/vendor/ace/src-noconflict/theme-cobalt.js
@@ -1,55 +1,21 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/cobalt', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/cobalt",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-cobalt";
exports.cssText = ".ace-cobalt .ace_gutter {\
background: #011e3a;\
-color: #fff\
+color: rgb(128,145,160)\
}\
.ace-cobalt .ace_print-margin {\
width: 1px;\
-background: #011e3a\
+background: #555555\
}\
.ace-cobalt {\
background-color: #002240;\
color: #FFFFFF\
}\
.ace-cobalt .ace_cursor {\
-border-left: 2px solid #FFFFFF\
-}\
-.ace-cobalt .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #FFFFFF\
+color: #FFFFFF\
}\
.ace-cobalt .ace_marker-layer .ace_selection {\
background: rgba(179, 101, 57, 0.75)\
@@ -120,6 +86,15 @@ color: #80FFC2\
font-style: italic;\
color: #0088FF\
}\
+.ace-cobalt .ace_heading,\
+.ace-cobalt .ace_markup.ace_heading {\
+color: #C8E4FD;\
+background-color: #001221\
+}\
+.ace-cobalt .ace_list,\
+.ace-cobalt .ace_markup.ace_list {\
+background-color: #130D26\
+}\
.ace-cobalt .ace_variable {\
color: #CCCCCC\
}\
@@ -129,16 +104,10 @@ color: #FF80E1\
.ace-cobalt .ace_meta.ace_tag {\
color: #9EFFFF\
}\
-.ace-cobalt .ace_heading {\
-color: #C8E4FD;\
-background-color: #001221\
-}\
-.ace-cobalt .ace_list {\
-background-color: #130D26\
-}\
.ace-cobalt .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHCLSvkPAAP3AgSDTRd4AAAAAElFTkSuQmCC) right repeat-y;\
-}";
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHCLSvkPAAP3AgSDTRd4AAAAAElFTkSuQmCC) right repeat-y\
+}\
+";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
diff --git a/js/vendor/ace/src-noconflict/theme-crimson_editor.js b/js/vendor/ace/src-noconflict/theme-crimson_editor.js
index 539b104..a188552 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-crimson_editor.js
+++ b/js/vendor/ace/src-noconflict/theme-crimson_editor.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/crimson_editor', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/crimson_editor",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = false;
exports.cssText = ".ace-crimson-editor .ace_gutter {\
background: #ebebeb;\
@@ -48,11 +18,7 @@ background-color: #FFFFFF;\
color: rgb(64, 64, 64);\
}\
.ace-crimson-editor .ace_cursor {\
-border-left: 2px solid black;\
-}\
-.ace-crimson-editor .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid black;\
+color: black;\
}\
.ace-crimson-editor .ace_invisible {\
color: rgb(191, 191, 191);\
diff --git a/js/vendor/ace/src-noconflict/theme-dawn.js b/js/vendor/ace/src-noconflict/theme-dawn.js
index cea6b57..38c8f2b 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-dawn.js
+++ b/js/vendor/ace/src-noconflict/theme-dawn.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/dawn', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/dawn",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-dawn";
@@ -45,11 +15,7 @@ background-color: #F9F9F9;\
color: #080808\
}\
.ace-dawn .ace_cursor {\
-border-left: 2px solid #000000\
-}\
-.ace-dawn .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #000000\
+color: #000000\
}\
.ace-dawn .ace_marker-layer .ace_selection {\
background: rgba(39, 95, 255, 0.30)\
@@ -109,6 +75,7 @@ background-color: #794938;\
border-color: #080808\
}\
.ace-dawn .ace_list,\
+.ace-dawn .ace_markup.ace_list,\
.ace-dawn .ace_support.ace_function {\
color: #693A17\
}\
@@ -126,14 +93,15 @@ color: #CF5628\
font-style: italic;\
color: #5A525F\
}\
+.ace-dawn .ace_heading,\
+.ace-dawn .ace_markup.ace_heading {\
+color: #19356D\
+}\
.ace-dawn .ace_variable {\
color: #234A97\
}\
-.ace-dawn .ace_heading {\
-color: #19356D\
-}\
.ace-dawn .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLh/5+x/AAizA4hxNNsZAAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLh/5+x/AAizA4hxNNsZAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-dreamweaver.js b/js/vendor/ace/src-noconflict/theme-dreamweaver.js
index c281f36..632b1ea 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-dreamweaver.js
+++ b/js/vendor/ace/src-noconflict/theme-dreamweaver.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/dreamweaver', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/dreamweaver",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-dreamweaver";
exports.cssText = ".ace-dreamweaver .ace_gutter {\
@@ -41,16 +11,13 @@ background: #e8e8e8;\
}\
.ace-dreamweaver {\
background-color: #FFFFFF;\
+color: black;\
}\
.ace-dreamweaver .ace_fold {\
background-color: #757AD8;\
}\
.ace-dreamweaver .ace_cursor {\
-border-left: 2px solid black;\
-}\
-.ace-dreamweaver .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid black;\
+color: black;\
}\
.ace-dreamweaver .ace_invisible {\
color: rgb(191, 191, 191);\
@@ -134,6 +101,9 @@ border: 1px solid rgb(192, 192, 192);\
.ace-dreamweaver .ace_marker-layer .ace_active-line {\
background: rgba(0, 0, 0, 0.07);\
}\
+.ace-dreamweaver .ace_gutter-active-line {\
+background-color : #DCDCDC;\
+}\
.ace-dreamweaver .ace_marker-layer .ace_selected-word {\
background: rgb(250, 250, 255);\
border: 1px solid rgb(200, 200, 250);\
diff --git a/js/vendor/ace/src-noconflict/theme-eclipse.js b/js/vendor/ace/src-noconflict/theme-eclipse.js
index 90474c9..63aa334 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-eclipse.js
+++ b/js/vendor/ace/src-noconflict/theme-eclipse.js
@@ -1,35 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/eclipse', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
-
+ace.define("ace/theme/eclipse",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+"use strict";
exports.isDark = false;
exports.cssText = ".ace-eclipse .ace_gutter {\
@@ -43,12 +13,13 @@ background: #ebebeb;\
}\
.ace-eclipse {\
background-color: #FFFFFF;\
+color: black;\
}\
.ace-eclipse .ace_fold {\
background-color: rgb(60, 76, 114);\
}\
.ace-eclipse .ace_cursor {\
-border-left: 2px solid black;\
+color: black;\
}\
.ace-eclipse .ace_storage,\
.ace-eclipse .ace_keyword,\
@@ -107,9 +78,12 @@ color:rgb(127, 0, 127);\
.ace-eclipse .ace_marker-layer .ace_step {\
background: rgb(255, 255, 0);\
}\
-.ace-eclipse .ace_marker-layer .ace_active-line {\
+.ace-eclipse .ace_active-line {\
background: rgb(232, 242, 254);\
}\
+.ace-eclipse .ace_gutter-active-line {\
+background-color : #DADADA;\
+}\
.ace-eclipse .ace_marker-layer .ace_selected-word {\
border: 1px solid rgb(181, 213, 255);\
}\
diff --git a/js/vendor/ace/src-noconflict/theme-github.js b/js/vendor/ace/src-noconflict/theme-github.js
index e2685f7..5ae86ce 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-github.js
+++ b/js/vendor/ace/src-noconflict/theme-github.js
@@ -1,39 +1,8 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/github', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/github",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-github";
-exports.cssText = "/* CSS style content from github's default pygments highlighter template.\
-Cursor and selection styles from textmate.css. */\
+exports.cssText = "\
.ace-github .ace_gutter {\
background: #e8e8e8;\
color: #AAA;\
@@ -84,14 +53,13 @@ color: teal;\
font-weight: bold;\
}\
.ace-github .ace_cursor {\
-border-left: 2px solid black;\
+color: black;\
}\
-.ace-github .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid black;\
+.ace-github.ace_focus .ace_marker-layer .ace_active-line {\
+background: rgb(255, 255, 204);\
}\
.ace-github .ace_marker-layer .ace_active-line {\
-background: rgb(255, 255, 204);\
+background: rgb(245, 245, 245);\
}\
.ace-github .ace_marker-layer .ace_selection {\
background: rgb(181, 213, 255);\
@@ -100,8 +68,6 @@ background: rgb(181, 213, 255);\
box-shadow: 0 0 3px 0px white;\
border-radius: 2px;\
}\
-/* bold keywords cause cursor issues for some fonts */\
-/* this disables bold style for editor and keeps for static highlighter */\
.ace-github.ace_nobold .ace_line > span {\
font-weight: normal !important;\
}\
@@ -122,6 +88,9 @@ background-color : rgba(0, 0, 0, 0.07);\
background: rgb(250, 250, 255);\
border: 1px solid rgb(200, 200, 250);\
}\
+.ace-github .ace_invisible {\
+color: #BFBFBF\
+}\
.ace-github .ace_print-margin {\
width: 1px;\
background: #e8e8e8;\
diff --git a/js/vendor/ace/src-noconflict/theme-idle_fingers.js b/js/vendor/ace/src-noconflict/theme-idle_fingers.js
index 50e6230..93f7ad4 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-idle_fingers.js
+++ b/js/vendor/ace/src-noconflict/theme-idle_fingers.js
@@ -1,40 +1,10 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/idle_fingers', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/idle_fingers",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-idle-fingers";
exports.cssText = ".ace-idle-fingers .ace_gutter {\
background: #3b3b3b;\
-color: #fff\
+color: rgb(153,153,153)\
}\
.ace-idle-fingers .ace_print-margin {\
width: 1px;\
@@ -45,11 +15,7 @@ background-color: #323232;\
color: #FFFFFF\
}\
.ace-idle-fingers .ace_cursor {\
-border-left: 2px solid #91FF00\
-}\
-.ace-idle-fingers .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #91FF00\
+color: #91FF00\
}\
.ace-idle-fingers .ace_marker-layer .ace_selection {\
background: rgba(90, 100, 126, 0.88)\
@@ -123,7 +89,7 @@ color: #323232;\
background-color: #FFF980\
}\
.ace-idle-fingers .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjLyZYiPj/8PAAreAwAI1+g0AAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjLyZYiPj/8PAAreAwAI1+g0AAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-iplastic.js b/js/vendor/ace/src-noconflict/theme-iplastic.js
new file mode 100755
index 0000000..593aa00
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/theme-iplastic.js
@@ -0,0 +1,121 @@
+ace.define("ace/theme/iplastic",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-iplastic";
+exports.cssText = ".ace-iplastic .ace_gutter {\
+background: #dddddd;\
+color: #666666\
+}\
+.ace-iplastic .ace_print-margin {\
+width: 1px;\
+background: #bbbbbb\
+}\
+.ace-iplastic {\
+background-color: #eeeeee;\
+color: #333333\
+}\
+.ace-iplastic .ace_cursor {\
+color: #333\
+}\
+.ace-iplastic .ace_marker-layer .ace_selection {\
+background: #BAD6FD;\
+}\
+.ace-iplastic.ace_multiselect .ace_selection.ace_start {\
+border-radius: 4px\
+}\
+.ace-iplastic .ace_marker-layer .ace_step {\
+background: #444444\
+}\
+.ace-iplastic .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #49483E;\
+background: #FFF799\
+}\
+.ace-iplastic .ace_marker-layer .ace_active-line {\
+background: #e5e5e5\
+}\
+.ace-iplastic .ace_gutter-active-line {\
+background-color: #eeeeee\
+}\
+.ace-iplastic .ace_marker-layer .ace_selected-word {\
+border: 1px solid #555555;\
+border-radius:4px\
+}\
+.ace-iplastic .ace_invisible {\
+color: #999999\
+}\
+.ace-iplastic .ace_entity.ace_name.ace_tag,\
+.ace-iplastic .ace_keyword,\
+.ace-iplastic .ace_meta.ace_tag,\
+.ace-iplastic .ace_storage {\
+color: #0000FF\
+}\
+.ace-iplastic .ace_punctuation,\
+.ace-iplastic .ace_punctuation.ace_tag {\
+color: #000\
+}\
+.ace-iplastic .ace_constant {\
+color: #333333;\
+font-weight: 700\
+}\
+.ace-iplastic .ace_constant.ace_character,\
+.ace-iplastic .ace_constant.ace_language,\
+.ace-iplastic .ace_constant.ace_numeric,\
+.ace-iplastic .ace_constant.ace_other {\
+color: #0066FF;\
+font-weight: 700\
+}\
+.ace-iplastic .ace_constant.ace_numeric{\
+font-weight: 100\
+}\
+.ace-iplastic .ace_invalid {\
+color: #F8F8F0;\
+background-color: #F92672\
+}\
+.ace-iplastic .ace_invalid.ace_deprecated {\
+color: #F8F8F0;\
+background-color: #AE81FF\
+}\
+.ace-iplastic .ace_support.ace_constant,\
+.ace-iplastic .ace_support.ace_function {\
+color: #333333;\
+font-weight: 700\
+}\
+.ace-iplastic .ace_fold {\
+background-color: #464646;\
+border-color: #F8F8F2\
+}\
+.ace-iplastic .ace_storage.ace_type,\
+.ace-iplastic .ace_support.ace_class,\
+.ace-iplastic .ace_support.ace_type {\
+color: #3333fc;\
+font-weight: 700\
+}\
+.ace-iplastic .ace_entity.ace_name.ace_function,\
+.ace-iplastic .ace_entity.ace_other,\
+.ace-iplastic .ace_entity.ace_other.ace_attribute-name,\
+.ace-iplastic .ace_variable {\
+color: #3366cc;\
+font-style: italic\
+}\
+.ace-iplastic .ace_variable.ace_parameter {\
+font-style: italic;\
+color: #2469E0\
+}\
+.ace-iplastic .ace_string {\
+color: #a55f03\
+}\
+.ace-iplastic .ace_comment {\
+color: #777777;\
+font-style: italic\
+}\
+.ace-iplastic .ace_fold-widget {\
+background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==);\
+}\
+.ace-iplastic .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAABlJREFUeNpi+P//PwMzMzPzfwAAAAD//wMAGRsECSML/RIAAAAASUVORK5CYII=) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/js/vendor/ace/src-noconflict/theme-katzenmilch.js b/js/vendor/ace/src-noconflict/theme-katzenmilch.js
new file mode 100755
index 0000000..88ed70c
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/theme-katzenmilch.js
@@ -0,0 +1,122 @@
+ace.define("ace/theme/katzenmilch",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-katzenmilch";
+exports.cssText = ".ace-katzenmilch .ace_gutter,\
+.ace-katzenmilch .ace_gutter {\
+background: #e8e8e8;\
+color: #333\
+}\
+.ace-katzenmilch .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8\
+}\
+.ace-katzenmilch {\
+background-color: #f3f2f3;\
+color: rgba(15, 0, 9, 1.0)\
+}\
+.ace-katzenmilch .ace_cursor {\
+border-left: 2px solid #100011\
+}\
+.ace-katzenmilch .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #100011\
+}\
+.ace-katzenmilch .ace_marker-layer .ace_selection {\
+background: rgba(100, 5, 208, 0.27)\
+}\
+.ace-katzenmilch.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #f3f2f3;\
+border-radius: 2px\
+}\
+.ace-katzenmilch .ace_marker-layer .ace_step {\
+background: rgb(198, 219, 174)\
+}\
+.ace-katzenmilch .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #000000\
+}\
+.ace-katzenmilch .ace_marker-layer .ace_active-line {\
+background: rgb(232, 242, 254)\
+}\
+.ace-katzenmilch .ace_gutter-active-line {\
+background-color: rgb(232, 242, 254)\
+}\
+.ace-katzenmilch .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgba(100, 5, 208, 0.27)\
+}\
+.ace-katzenmilch .ace_invisible {\
+color: #BFBFBF\
+}\
+.ace-katzenmilch .ace_fold {\
+background-color: rgba(2, 95, 73, 0.97);\
+border-color: rgba(15, 0, 9, 1.0)\
+}\
+.ace-katzenmilch .ace_keyword {\
+color: #674Aa8;\
+rbackground-color: rgba(163, 170, 216, 0.055)\
+}\
+.ace-katzenmilch .ace_constant.ace_language {\
+color: #7D7e52;\
+rbackground-color: rgba(189, 190, 130, 0.059)\
+}\
+.ace-katzenmilch .ace_constant.ace_numeric {\
+color: rgba(79, 130, 123, 0.93);\
+rbackground-color: rgba(119, 194, 187, 0.059)\
+}\
+.ace-katzenmilch .ace_constant.ace_character,\
+.ace-katzenmilch .ace_constant.ace_other {\
+color: rgba(2, 95, 105, 1.0);\
+rbackground-color: rgba(127, 34, 153, 0.063)\
+}\
+.ace-katzenmilch .ace_support.ace_function {\
+color: #9D7e62;\
+rbackground-color: rgba(189, 190, 130, 0.039)\
+}\
+.ace-katzenmilch .ace_support.ace_class {\
+color: rgba(239, 106, 167, 1.0);\
+rbackground-color: rgba(239, 106, 167, 0.063)\
+}\
+.ace-katzenmilch .ace_storage {\
+color: rgba(123, 92, 191, 1.0);\
+rbackground-color: rgba(139, 93, 223, 0.051)\
+}\
+.ace-katzenmilch .ace_invalid {\
+color: #DFDFD5;\
+rbackground-color: #CC1B27\
+}\
+.ace-katzenmilch .ace_string {\
+color: #5a5f9b;\
+rbackground-color: rgba(170, 175, 219, 0.035)\
+}\
+.ace-katzenmilch .ace_comment {\
+font-style: italic;\
+color: rgba(64, 79, 80, 0.67);\
+rbackground-color: rgba(95, 15, 255, 0.0078)\
+}\
+.ace-katzenmilch .ace_entity.ace_name.ace_function,\
+.ace-katzenmilch .ace_variable {\
+color: rgba(2, 95, 73, 0.97);\
+rbackground-color: rgba(34, 255, 73, 0.12)\
+}\
+.ace-katzenmilch .ace_variable.ace_language {\
+color: #316fcf;\
+rbackground-color: rgba(58, 175, 255, 0.039)\
+}\
+.ace-katzenmilch .ace_variable.ace_parameter {\
+font-style: italic;\
+color: rgba(51, 150, 159, 0.87);\
+rbackground-color: rgba(5, 214, 249, 0.043)\
+}\
+.ace-katzenmilch .ace_entity.ace_other.ace_attribute-name {\
+color: rgba(73, 70, 194, 0.93);\
+rbackground-color: rgba(73, 134, 194, 0.035)\
+}\
+.ace-katzenmilch .ace_entity.ace_name.ace_tag {\
+color: #3976a2;\
+rbackground-color: rgba(73, 166, 210, 0.039)\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/js/vendor/ace/src-noconflict/theme-kr.js b/js/vendor/ace/src-noconflict/theme-kr_theme.js
index 7246e02..27dff6e 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-kr.js
+++ b/js/vendor/ace/src-noconflict/theme-kr_theme.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/kr_theme', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/kr_theme",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-kr-theme";
@@ -45,11 +15,7 @@ background-color: #0B0A09;\
color: #FCFFE0\
}\
.ace-kr-theme .ace_cursor {\
-border-left: 2px solid #FF9900\
-}\
-.ace-kr-theme .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #FF9900\
+color: #FF9900\
}\
.ace-kr-theme .ace_marker-layer .ace_selection {\
background: rgba(170, 0, 255, 0.45)\
@@ -120,17 +86,18 @@ color: #706D5B\
.ace-kr-theme .ace_variable {\
color: #D1A796\
}\
+.ace-kr-theme .ace_list,\
+.ace-kr-theme .ace_markup.ace_list {\
+background-color: #0F0040\
+}\
.ace-kr-theme .ace_variable.ace_language {\
color: #FF80E1\
}\
.ace-kr-theme .ace_meta.ace_tag {\
color: #BABD9C\
}\
-.ace-kr-theme .ace_list {\
-background-color: #0F0040\
-}\
.ace-kr-theme .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-kuroir.js b/js/vendor/ace/src-noconflict/theme-kuroir.js
new file mode 100755
index 0000000..a74c29d
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/theme-kuroir.js
@@ -0,0 +1,62 @@
+ace.define("ace/theme/kuroir",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-kuroir";
+exports.cssText = "\
+.ace-kuroir .ace_gutter {\
+background: #e8e8e8;\
+color: #333;\
+}\
+.ace-kuroir .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-kuroir {\
+background-color: #E8E9E8;\
+color: #363636;\
+}\
+.ace-kuroir .ace_cursor {\
+color: #202020;\
+}\
+.ace-kuroir .ace_marker-layer .ace_selection {\
+background: rgba(245, 170, 0, 0.57);\
+}\
+.ace-kuroir.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #E8E9E8;\
+border-radius: 2px;\
+}\
+.ace-kuroir .ace_marker-layer .ace_step {\
+background: rgb(198, 219, 174);\
+}\
+.ace-kuroir .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(0, 0, 0, 0.29);\
+}\
+.ace-kuroir .ace_marker-layer .ace_active-line {\
+background: rgba(203, 220, 47, 0.22);\
+}\
+.ace-kuroir .ace_gutter-active-line {\
+background-color: rgba(203, 220, 47, 0.22);\
+}\
+.ace-kuroir .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgba(245, 170, 0, 0.57);\
+}\
+.ace-kuroir .ace_invisible {\
+color: #BFBFBF\
+}\
+.ace-kuroir .ace_fold {\
+border-color: #363636;\
+}\
+.ace-kuroir .ace_constant{color:#CD6839;}.ace-kuroir .ace_constant.ace_numeric{color:#9A5925;}.ace-kuroir .ace_support{color:#104E8B;}.ace-kuroir .ace_support.ace_function{color:#005273;}.ace-kuroir .ace_support.ace_constant{color:#CF6A4C;}.ace-kuroir .ace_storage{color:#A52A2A;}.ace-kuroir .ace_invalid.ace_illegal{color:#FD1224;\
+background-color:rgba(255, 6, 0, 0.15);}.ace-kuroir .ace_invalid.ace_deprecated{text-decoration:underline;\
+font-style:italic;\
+color:#FD1732;\
+background-color:#E8E9E8;}.ace-kuroir .ace_string{color:#639300;}.ace-kuroir .ace_string.ace_regexp{color:#417E00;\
+background-color:#C9D4BE;}.ace-kuroir .ace_comment{color:rgba(148, 148, 148, 0.91);\
+background-color:rgba(220, 220, 220, 0.56);}.ace-kuroir .ace_variable{color:#009ACD;}.ace-kuroir .ace_meta.ace_tag{color:#005273;}.ace-kuroir .ace_markup.ace_heading{color:#B8012D;\
+background-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;}\
+";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/js/vendor/ace/src-noconflict/theme-merbivore.js b/js/vendor/ace/src-noconflict/theme-merbivore.js
index 45ead2b..faa43ea 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-merbivore.js
+++ b/js/vendor/ace/src-noconflict/theme-merbivore.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/merbivore', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/merbivore",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-merbivore";
@@ -45,11 +15,7 @@ background-color: #161616;\
color: #E6E1DC\
}\
.ace-merbivore .ace_cursor {\
-border-left: 2px solid #FFFFFF\
-}\
-.ace-merbivore .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #FFFFFF\
+color: #FFFFFF\
}\
.ace-merbivore .ace_marker-layer .ace_selection {\
background: #454545\
@@ -122,7 +88,7 @@ color: #AD2EA4\
color: #FFFF89\
}\
.ace-merbivore .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQFxf3ZXB1df0PAAdsAmERTkEHAAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQFxf3ZXB1df0PAAdsAmERTkEHAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-merbivore_soft.js b/js/vendor/ace/src-noconflict/theme-merbivore_soft.js
index 635b823..2adf44a 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-merbivore_soft.js
+++ b/js/vendor/ace/src-noconflict/theme-merbivore_soft.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/merbivore_soft', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/merbivore_soft",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-merbivore-soft";
@@ -45,11 +15,7 @@ background-color: #1C1C1C;\
color: #E6E1DC\
}\
.ace-merbivore-soft .ace_cursor {\
-border-left: 2px solid #FFFFFF\
-}\
-.ace-merbivore-soft .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #FFFFFF\
+color: #FFFFFF\
}\
.ace-merbivore-soft .ace_marker-layer .ace_selection {\
background: #494949\
@@ -123,7 +89,7 @@ color: #AC4BB8\
color: #EAF1A3\
}\
.ace-merbivore-soft .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQkpLyZfD09PwPAAfYAnaStpHRAAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQkpLyZfD09PwPAAfYAnaStpHRAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-mono_industrial.js b/js/vendor/ace/src-noconflict/theme-mono_industrial.js
index 39be899..277963b 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-mono_industrial.js
+++ b/js/vendor/ace/src-noconflict/theme-mono_industrial.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/mono_industrial', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/mono_industrial",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-mono-industrial";
@@ -45,11 +15,7 @@ background-color: #222C28;\
color: #FFFFFF\
}\
.ace-mono-industrial .ace_cursor {\
-border-left: 2px solid #FFFFFF\
-}\
-.ace-mono-industrial .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #FFFFFF\
+color: #FFFFFF\
}\
.ace-mono-industrial .ace_marker-layer .ace_selection {\
background: rgba(145, 153, 148, 0.40)\
@@ -134,7 +100,7 @@ color: #909993\
color: #A65EFF\
}\
.ace-mono-industrial .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ1NbwZfALD/4PAAlTArlEC4r/AAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ1NbwZfALD/4PAAlTArlEC4r/AAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-monokai.js b/js/vendor/ace/src-noconflict/theme-monokai.js
index 84d1157..13f328d 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-monokai.js
+++ b/js/vendor/ace/src-noconflict/theme-monokai.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/monokai', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/monokai",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-monokai";
@@ -45,11 +15,7 @@ background-color: #272822;\
color: #F8F8F2\
}\
.ace-monokai .ace_cursor {\
-border-left: 2px solid #F8F8F0\
-}\
-.ace-monokai .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #F8F8F0\
+color: #F8F8F0\
}\
.ace-monokai .ace_marker-layer .ace_selection {\
background: #49483E\
@@ -132,7 +98,7 @@ color: #E6DB74\
color: #75715E\
}\
.ace-monokai .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-pastel_on_dark.js b/js/vendor/ace/src-noconflict/theme-pastel_on_dark.js
index 1b43b67..f49e3af 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-pastel_on_dark.js
+++ b/js/vendor/ace/src-noconflict/theme-pastel_on_dark.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/pastel_on_dark', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/pastel_on_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-pastel-on-dark";
@@ -45,11 +15,7 @@ background-color: #2C2828;\
color: #8F938F\
}\
.ace-pastel-on-dark .ace_cursor {\
-border-left: 2px solid #A7A7A7\
-}\
-.ace-pastel-on-dark .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #A7A7A7\
+color: #A7A7A7\
}\
.ace-pastel-on-dark .ace_marker-layer .ace_selection {\
background: rgba(221, 240, 255, 0.20)\
@@ -135,7 +101,7 @@ color: #C1C144\
color: #494949\
}\
.ace-pastel-on-dark .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYIiPj/8PAARgAh2NTMh8AAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYIiPj/8PAARgAh2NTMh8AAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-solarized_dark.js b/js/vendor/ace/src-noconflict/theme-solarized_dark.js
index 776d401..a887306 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-solarized_dark.js
+++ b/js/vendor/ace/src-noconflict/theme-solarized_dark.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/solarized_dark', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/solarized_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-solarized-dark";
@@ -48,12 +18,9 @@ color: #93A1A1\
.ace-solarized-dark .ace_storage {\
color: #93A1A1\
}\
-.ace-solarized-dark .ace_cursor {\
-border-left: 2px solid #D30102\
-}\
-.ace-solarized-dark .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #D30102\
+.ace-solarized-dark .ace_cursor,\
+.ace-solarized-dark .ace_string.ace_regexp {\
+color: #D30102\
}\
.ace-solarized-dark .ace_marker-layer .ace_active-line,\
.ace-solarized-dark .ace_marker-layer .ace_selection {\
@@ -109,15 +76,12 @@ color: #268BD2\
.ace-solarized-dark .ace_string {\
color: #2AA198\
}\
-.ace-solarized-dark .ace_string.ace_regexp {\
-color: #D30102\
-}\
.ace-solarized-dark .ace_comment {\
font-style: italic;\
color: #657B83\
}\
.ace-solarized-dark .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-solarized_light.js b/js/vendor/ace/src-noconflict/theme-solarized_light.js
index 1959add..73d8996 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-solarized_light.js
+++ b/js/vendor/ace/src-noconflict/theme-solarized_light.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/solarized_light', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/solarized_light",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-solarized-light";
@@ -45,14 +15,10 @@ background-color: #FDF6E3;\
color: #586E75\
}\
.ace-solarized-light .ace_cursor {\
-border-left: 2px solid #000000\
-}\
-.ace-solarized-light .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #000000\
+color: #000000\
}\
.ace-solarized-light .ace_marker-layer .ace_selection {\
-background: rgba(7, 54, 67, 0.09)\
+background: rgba(7, 54, 67, 0.09)\
}\
.ace-solarized-light.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #FDF6E3;\
@@ -118,7 +84,7 @@ color: #D30102\
color: #93A1A1\
}\
.ace-solarized-light .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-sqlserver.js b/js/vendor/ace/src-noconflict/theme-sqlserver.js
new file mode 100755
index 0000000..311992b
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/theme-sqlserver.js
@@ -0,0 +1,141 @@
+ace.define("ace/theme/sqlserver",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-sqlserver";
+exports.cssText = ".ace_line {\
+font-family: Consolas;\
+}\
+.ace-sqlserver .ace_gutter {\
+background: #ebebeb;\
+color: #333;\
+overflow: hidden;\
+}\
+.ace-sqlserver .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-sqlserver {\
+background-color: #FFFFFF;\
+color: black;\
+}\
+.ace-sqlserver .ace_identifier {\
+color: black;\
+}\
+.ace-sqlserver .ace_keyword {\
+color: #0000FF;\
+}\
+.ace-sqlserver .ace_numeric {\
+color: black;\
+}\
+.ace-sqlserver .ace_storage {\
+color: #11B7BE;\
+}\
+.ace-sqlserver .ace_keyword.ace_operator,\
+.ace-sqlserver .ace_lparen,\
+.ace-sqlserver .ace_rparen,\
+.ace-sqlserver .ace_punctuation {\
+color: #808080;\
+}\
+.ace-sqlserver .ace_set.ace_statement {\
+color: #0000FF;\
+text-decoration: underline;\
+}\
+.ace-sqlserver .ace_cursor {\
+color: black;\
+}\
+.ace-sqlserver .ace_invisible {\
+color: rgb(191, 191, 191);\
+}\
+.ace-sqlserver .ace_constant.ace_buildin {\
+color: rgb(88, 72, 246);\
+}\
+.ace-sqlserver .ace_constant.ace_language {\
+color: #979797;\
+}\
+.ace-sqlserver .ace_constant.ace_library {\
+color: rgb(6, 150, 14);\
+}\
+.ace-sqlserver .ace_invalid {\
+background-color: rgb(153, 0, 0);\
+color: white;\
+}\
+.ace-sqlserver .ace_support.ace_function {\
+color: #FF00FF;\
+}\
+.ace-sqlserver .ace_support.ace_constant {\
+color: rgb(6, 150, 14);\
+}\
+.ace-sqlserver .ace_class {\
+color: #008080;\
+}\
+.ace-sqlserver .ace_support.ace_other {\
+color: #6D79DE;\
+}\
+.ace-sqlserver .ace_variable.ace_parameter {\
+font-style: italic;\
+color: #FD971F;\
+}\
+.ace-sqlserver .ace_comment {\
+color: #008000;\
+}\
+.ace-sqlserver .ace_constant.ace_numeric {\
+color: black;\
+}\
+.ace-sqlserver .ace_variable {\
+color: rgb(49, 132, 149);\
+}\
+.ace-sqlserver .ace_xml-pe {\
+color: rgb(104, 104, 91);\
+}\
+.ace-sqlserver .ace_support.ace_storedprocedure {\
+color: #800000;\
+}\
+.ace-sqlserver .ace_heading {\
+color: rgb(12, 7, 255);\
+}\
+.ace-sqlserver .ace_list {\
+color: rgb(185, 6, 144);\
+}\
+.ace-sqlserver .ace_marker-layer .ace_selection {\
+background: rgb(181, 213, 255);\
+}\
+.ace-sqlserver .ace_marker-layer .ace_step {\
+background: rgb(252, 255, 0);\
+}\
+.ace-sqlserver .ace_marker-layer .ace_stack {\
+background: rgb(164, 229, 101);\
+}\
+.ace-sqlserver .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgb(192, 192, 192);\
+}\
+.ace-sqlserver .ace_marker-layer .ace_active-line {\
+background: rgba(0, 0, 0, 0.07);\
+}\
+.ace-sqlserver .ace_gutter-active-line {\
+background-color: #dcdcdc;\
+}\
+.ace-sqlserver .ace_marker-layer .ace_selected-word {\
+background: rgb(250, 250, 255);\
+border: 1px solid rgb(200, 200, 250);\
+}\
+.ace-sqlserver .ace_meta.ace_tag {\
+color: #0000FF;\
+}\
+.ace-sqlserver .ace_string.ace_regex {\
+color: #FF0000;\
+}\
+.ace-sqlserver .ace_string {\
+color: #FF0000;\
+}\
+.ace-sqlserver .ace_entity.ace_other.ace_attribute-name {\
+color: #994409;\
+}\
+.ace-sqlserver .ace_indent-guide {\
+background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
+}\
+";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/js/vendor/ace/src-noconflict/theme-terminal.js b/js/vendor/ace/src-noconflict/theme-terminal.js
index 628272a..577ec49 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-terminal.js
+++ b/js/vendor/ace/src-noconflict/theme-terminal.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/terminal', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/terminal",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-terminal-theme";
@@ -45,11 +15,7 @@ background-color: black;\
color: #DEDEDE\
}\
.ace-terminal-theme .ace_cursor {\
-border-left: 2px solid springgreen\
-}\
-.ace-terminal-theme .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #9F9F9F\
+color: #9F9F9F\
}\
.ace-terminal-theme .ace_marker-layer .ace_selection {\
background: #424242\
diff --git a/js/vendor/ace/src-noconflict/theme-textmate.js b/js/vendor/ace/src-noconflict/theme-textmate.js
index 35a80c2..7deba50 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-textmate.js
+++ b/js/vendor/ace/src-noconflict/theme-textmate.js
@@ -1,35 +1,5 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/textmate', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
-
+ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+"use strict";
exports.isDark = false;
exports.cssClass = "ace-tm";
@@ -46,13 +16,10 @@ background-color: #6B72E6;\
}\
.ace-tm {\
background-color: #FFFFFF;\
+color: black;\
}\
.ace-tm .ace_cursor {\
-border-left: 2px solid black;\
-}\
-.ace-tm .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid black;\
+color: black;\
}\
.ace-tm .ace_invisible {\
color: rgb(191, 191, 191);\
diff --git a/js/vendor/ace/src-noconflict/theme-tomorrow.js b/js/vendor/ace/src-noconflict/theme-tomorrow.js
index 9008912..e44142b 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-tomorrow.js
+++ b/js/vendor/ace/src-noconflict/theme-tomorrow.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/tomorrow', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-tomorrow";
@@ -40,17 +10,12 @@ color: #4D4D4C\
width: 1px;\
background: #f6f6f6\
}\
-.ace-tomorrow,\
-.ace-tomorrow .ace_scroller {\
+.ace-tomorrow {\
background-color: #FFFFFF;\
color: #4D4D4C\
}\
.ace-tomorrow .ace_cursor {\
-border-left: 2px solid #AEAFAD\
-}\
-.ace-tomorrow .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #AEAFAD\
+color: #AEAFAD\
}\
.ace-tomorrow .ace_marker-layer .ace_selection {\
background: #D6D6D6\
@@ -121,6 +86,7 @@ color: #4271AE\
color: #C99E00\
}\
.ace-tomorrow .ace_heading,\
+.ace-tomorrow .ace_markup.ace_heading,\
.ace-tomorrow .ace_string {\
color: #718C00\
}\
diff --git a/js/vendor/ace/src-noconflict/theme-tomorrow_night.js b/js/vendor/ace/src-noconflict/theme-tomorrow_night.js
index 4f17f11..dacc007 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-tomorrow_night.js
+++ b/js/vendor/ace/src-noconflict/theme-tomorrow_night.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/tomorrow_night', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/tomorrow_night",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-tomorrow-night";
@@ -40,16 +10,12 @@ color: #C5C8C6\
width: 1px;\
background: #25282c\
}\
-.ace-tomorrow-night {\
+.ace-tomorrow-night {\
background-color: #1D1F21;\
color: #C5C8C6\
}\
.ace-tomorrow-night .ace_cursor {\
-border-left: 2px solid #AEAFAD\
-}\
-.ace-tomorrow-night .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #AEAFAD\
+color: #AEAFAD\
}\
.ace-tomorrow-night .ace_marker-layer .ace_selection {\
background: #373B41\
@@ -120,6 +86,7 @@ color: #81A2BE\
color: #F0C674\
}\
.ace-tomorrow-night .ace_heading,\
+.ace-tomorrow-night .ace_markup.ace_heading,\
.ace-tomorrow-night .ace_string {\
color: #B5BD68\
}\
@@ -134,7 +101,7 @@ color: #CC6666\
color: #969896\
}\
.ace-tomorrow-night .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-tomorrow_night_blue.js b/js/vendor/ace/src-noconflict/theme-tomorrow_night_blue.js
index 30e1146..a449189 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-tomorrow_night_blue.js
+++ b/js/vendor/ace/src-noconflict/theme-tomorrow_night_blue.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/tomorrow_night_blue', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/tomorrow_night_blue",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-tomorrow-night-blue";
@@ -44,15 +14,9 @@ background: #00204b\
background-color: #002451;\
color: #FFFFFF\
}\
-.ace-tomorrow-night-blue .ace_constant.ace_other {\
-color: #FFFFFF\
-}\
+.ace-tomorrow-night-blue .ace_constant.ace_other,\
.ace-tomorrow-night-blue .ace_cursor {\
-border-left: 2px solid #FFFFFF\
-}\
-.ace-tomorrow-night-blue .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #FFFFFF\
+color: #FFFFFF\
}\
.ace-tomorrow-night-blue .ace_marker-layer .ace_selection {\
background: #003F8E\
@@ -120,6 +84,7 @@ color: #BBDAFF\
color: #FFEEAD\
}\
.ace-tomorrow-night-blue .ace_heading,\
+.ace-tomorrow-night-blue .ace_markup.ace_heading,\
.ace-tomorrow-night-blue .ace_string {\
color: #D1F1A9\
}\
@@ -134,7 +99,7 @@ color: #FF9DA4\
color: #7285B7\
}\
.ace-tomorrow-night-blue .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-tomorrow_night_bright.js b/js/vendor/ace/src-noconflict/theme-tomorrow_night_bright.js
index 328e9c6..a532950 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-tomorrow_night_bright.js
+++ b/js/vendor/ace/src-noconflict/theme-tomorrow_night_bright.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/tomorrow_night_bright', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/tomorrow_night_bright",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-tomorrow-night-bright";
@@ -45,11 +15,7 @@ background-color: #000000;\
color: #DEDEDE\
}\
.ace-tomorrow-night-bright .ace_cursor {\
-border-left: 2px solid #9F9F9F\
-}\
-.ace-tomorrow-night-bright .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #9F9F9F\
+color: #9F9F9F\
}\
.ace-tomorrow-night-bright .ace_marker-layer .ace_selection {\
background: #424242\
@@ -63,7 +29,14 @@ background: rgb(102, 82, 0)\
}\
.ace-tomorrow-night-bright .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
-border: 1px solid #343434\
+border: 1px solid #888888\
+}\
+.ace-tomorrow-night-bright .ace_marker-layer .ace_highlight {\
+border: 1px solid rgb(110, 119, 0);\
+border-bottom: 0;\
+box-shadow: inset 0 -1px rgb(110, 119, 0);\
+margin: -1px 0 0 -1px;\
+background: rgba(255, 235, 0, 0.1)\
}\
.ace-tomorrow-night-bright .ace_marker-layer .ace_active-line {\
background: #2A2A2A\
@@ -71,8 +44,11 @@ background: #2A2A2A\
.ace-tomorrow-night-bright .ace_gutter-active-line {\
background-color: #2A2A2A\
}\
+.ace-tomorrow-night-bright .ace_stack {\
+background-color: rgb(66, 90, 44)\
+}\
.ace-tomorrow-night-bright .ace_marker-layer .ace_selected-word {\
-border: 1px solid #424242\
+border: 1px solid #888888\
}\
.ace-tomorrow-night-bright .ace_invisible {\
color: #343434\
@@ -120,6 +96,7 @@ color: #7AA6DA\
color: #E7C547\
}\
.ace-tomorrow-night-bright .ace_heading,\
+.ace-tomorrow-night-bright .ace_markup.ace_heading,\
.ace-tomorrow-night-bright .ace_string {\
color: #B9CA4A\
}\
@@ -133,8 +110,11 @@ color: #D54E53\
.ace-tomorrow-night-bright .ace_comment {\
color: #969896\
}\
+.ace-tomorrow-night-bright .ace_c9searchresults.ace_keyword {\
+color: #C2C280\
+}\
.ace-tomorrow-night-bright .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-tomorrow_night_eighties.js b/js/vendor/ace/src-noconflict/theme-tomorrow_night_eighties.js
index 9128390..7e2e9d2 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-tomorrow_night_eighties.js
+++ b/js/vendor/ace/src-noconflict/theme-tomorrow_night_eighties.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/tomorrow_night_eighties', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/tomorrow_night_eighties",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-tomorrow-night-eighties";
@@ -44,15 +14,9 @@ background: #272727\
background-color: #2D2D2D;\
color: #CCCCCC\
}\
-.ace-tomorrow-night-eighties .ace_constant.ace_other {\
-color: #CCCCCC\
-}\
+.ace-tomorrow-night-eighties .ace_constant.ace_other,\
.ace-tomorrow-night-eighties .ace_cursor {\
-border-left: 2px solid #CCCCCC\
-}\
-.ace-tomorrow-night-eighties .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #CCCCCC\
+color: #CCCCCC\
}\
.ace-tomorrow-night-eighties .ace_marker-layer .ace_selection {\
background: #515151\
@@ -68,6 +32,9 @@ background: rgb(102, 82, 0)\
margin: -1px 0 0 -1px;\
border: 1px solid #6A6A6A\
}\
+.ace-tomorrow-night-bright .ace_stack {\
+background: rgb(66, 90, 44)\
+}\
.ace-tomorrow-night-eighties .ace_marker-layer .ace_active-line {\
background: #393939\
}\
@@ -120,6 +87,7 @@ color: #6699CC\
color: #FFCC66\
}\
.ace-tomorrow-night-eighties .ace_heading,\
+.ace-tomorrow-night-eighties .ace_markup.ace_heading,\
.ace-tomorrow-night-eighties .ace_string {\
color: #99CC99\
}\
diff --git a/js/vendor/ace/src-noconflict/theme-twilight.js b/js/vendor/ace/src-noconflict/theme-twilight.js
index 2609874..4a25973 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-twilight.js
+++ b/js/vendor/ace/src-noconflict/theme-twilight.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/twilight', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/twilight",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-twilight";
@@ -45,11 +15,7 @@ background-color: #141414;\
color: #F8F8F8\
}\
.ace-twilight .ace_cursor {\
-border-left: 2px solid #A7A7A7\
-}\
-.ace-twilight .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #A7A7A7\
+color: #A7A7A7\
}\
.ace-twilight .ace_marker-layer .ace_selection {\
background: rgba(221, 240, 255, 0.20)\
@@ -86,6 +52,7 @@ color: #CDA869\
.ace-twilight .ace_constant.ace_character.ace_escape,\
.ace-twilight .ace_constant.ace_other,\
.ace-twilight .ace_heading,\
+.ace-twilight .ace_markup.ace_heading,\
.ace-twilight .ace_support.ace_constant {\
color: #CF6A4C\
}\
@@ -109,6 +76,7 @@ border-color: #F8F8F8\
color: #DAD085\
}\
.ace-twilight .ace_list,\
+.ace-twilight .ace_markup.ace_list,\
.ace-twilight .ace_storage {\
color: #F9EE98\
}\
@@ -134,7 +102,7 @@ color: #7587A6\
color: #494949\
}\
.ace-twilight .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-vibrant_ink.js b/js/vendor/ace/src-noconflict/theme-vibrant_ink.js
index 6cf7aaa..d362b84 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-vibrant_ink.js
+++ b/js/vendor/ace/src-noconflict/theme-vibrant_ink.js
@@ -1,34 +1,4 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/vibrant_ink', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/vibrant_ink",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-vibrant-ink";
@@ -45,11 +15,7 @@ background-color: #0F0F0F;\
color: #FFFFFF\
}\
.ace-vibrant-ink .ace_cursor {\
-border-left: 2px solid #FFFFFF\
-}\
-.ace-vibrant-ink .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #FFFFFF\
+color: #FFFFFF\
}\
.ace-vibrant-ink .ace_marker-layer .ace_selection {\
background: #6699CC\
@@ -121,7 +87,7 @@ font-style: italic;\
color: #99CC99\
}\
.ace-vibrant-ink .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYNDTc/oPAALPAZ7hxlbYAAAAAElFTkSuQmCC) right repeat-y;\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYNDTc/oPAALPAZ7hxlbYAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
diff --git a/js/vendor/ace/src-noconflict/theme-xcode.js b/js/vendor/ace/src-noconflict/theme-xcode.js
index 88fba08..f3b3753 100644..100755
--- a/js/vendor/ace/src-noconflict/theme-xcode.js
+++ b/js/vendor/ace/src-noconflict/theme-xcode.js
@@ -1,38 +1,8 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-ace.define('ace/theme/xcode', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+ace.define("ace/theme/xcode",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-xcode";
-exports.cssText = "/* THIS THEME WAS AUTOGENERATED BY Theme.tmpl.css (UUID: EE3AD170-2B7F-4DE1-B724-C75F13FE0085) */\
+exports.cssText = "\
.ace-xcode .ace_gutter {\
background: #e8e8e8;\
color: #333\
@@ -46,11 +16,7 @@ background-color: #FFFFFF;\
color: #000000\
}\
.ace-xcode .ace_cursor {\
-border-left: 2px solid #000000\
-}\
-.ace-xcode .ace_overwrite-cursors .ace_cursor {\
-border-left: 0px;\
-border-bottom: 1px solid #000000\
+color: #000000\
}\
.ace-xcode .ace_marker-layer .ace_selection {\
background: #B5D5FF\
diff --git a/js/vendor/ace/src-noconflict/worker-coffee.js b/js/vendor/ace/src-noconflict/worker-coffee.js
index e8e3484..ed7e9c9 100644..100755
--- a/js/vendor/ace/src-noconflict/worker-coffee.js
+++ b/js/vendor/ace/src-noconflict/worker-coffee.js
@@ -16,18 +16,30 @@ window.console.trace = window.console;
window.window = window;
window.ace = window;
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
if (moduleName.indexOf("!") !== -1) {
var chunks = moduleName.split("!");
- return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
}
+ // normalize relative requires
if (moduleName.charAt(0) == ".") {
var base = parentId.split("/").slice(0, -1).join("/");
- moduleName = base + "/" + moduleName;
+ moduleName = (base ? base + "/" : "") + moduleName;
while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
var previous = moduleName;
- moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
@@ -36,15 +48,15 @@ window.normalizeModule = function(parentId, moduleName) {
window.require = function(parentId, id) {
if (!id) {
- id = parentId
+ id = parentId;
parentId = null;
}
if (!id.charAt)
throw new Error("worker.js require() accepts only (parentId, id) as arguments");
- id = normalizeModule(parentId, id);
+ id = window.normalizeModule(parentId, id);
- var module = require.modules[id];
+ var module = window.require.modules[id];
if (module) {
if (!module.initialized) {
module.initialized = true;
@@ -54,56 +66,80 @@ window.require = function(parentId, id) {
}
var chunks = id.split("/");
- chunks[0] = require.tlns[chunks[0]] || chunks[0];
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+ chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
var path = chunks.join("/") + ".js";
- require.id = id;
+ window.require.id = id;
importScripts(path);
- return require(parentId, id);
+ return window.require(parentId, id);
};
-
-require.modules = {};
-require.tlns = {};
+window.require.modules = {};
+window.require.tlns = {};
window.define = function(id, deps, factory) {
if (arguments.length == 2) {
factory = deps;
if (typeof id != "string") {
deps = id;
- id = require.id;
+ id = window.require.id;
}
} else if (arguments.length == 1) {
factory = id;
- id = require.id;
+ deps = [];
+ id = window.require.id;
}
-
- if (id.indexOf("text!") === 0)
- return;
- var req = function(deps, factory) {
- return require(id, deps, factory);
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject 'require', 'exports' and
+ // 'module' as dependencies, to provide CommonJS compatibility.
+ deps = ['require', 'exports', 'module'];
+
+ var req = function(childId) {
+ return window.require(id, childId);
};
- require.modules[id] = {
+ window.require.modules[id] = {
exports: {},
factory: function() {
var module = this;
- var returnExports = factory(req, module.exports, module);
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch(dep) {
+ // Because 'require', 'exports' and 'module' aren't actual
+ // dependencies, we must handle them seperately.
+ case 'require': return req;
+ case 'exports': return module.exports;
+ case 'module': return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
if (returnExports)
module.exports = returnExports;
return module;
}
};
};
+window.define.amd = {};
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
require.tlns = topLevelNamespaces;
-}
+};
window.initSender = function initSender() {
- var EventEmitter = require("ace/lib/event_emitter").EventEmitter;
- var oop = require("ace/lib/oop");
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("ace/lib/oop");
var Sender = function() {};
@@ -130,10 +166,10 @@ window.initSender = function initSender() {
}).call(Sender.prototype);
return new Sender();
-}
+};
-window.main = null;
-window.sender = null;
+var main = window.main = null;
+var sender = window.sender = null;
window.onmessage = function(e) {
var msg = e.data;
@@ -146,18 +182,46 @@ window.onmessage = function(e) {
else if (msg.init) {
initBaseUrls(msg.tlns);
require("ace/lib/es5-shim");
- sender = initSender();
+ sender = window.sender = initSender();
var clazz = require(msg.module)[msg.classname];
- main = new clazz(sender);
+ main = window.main = new clazz(sender);
}
else if (msg.event && sender) {
- sender._emit(msg.event, msg.data);
+ sender._signal(msg.event, msg.data);
}
};
})(this);
-ace.define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
var EventEmitter = {};
var stopPropagation = function() { this.propagationStopped = true; };
@@ -183,6 +247,7 @@ EventEmitter._dispatchEvent = function(eventName, e) {
if (!e.preventDefault)
e.preventDefault = preventDefault;
+ listeners = listeners.slice();
for (var i=0; i<listeners.length; i++) {
listeners[i](e, this);
if (e.propagationStopped)
@@ -198,7 +263,7 @@ EventEmitter._signal = function(eventName, e) {
var listeners = (this._eventRegistry || {})[eventName];
if (!listeners)
return;
-
+ listeners = listeners.slice();
for (var i=0; i<listeners.length; i++)
listeners[i](e, this);
};
@@ -281,818 +346,396 @@ exports.EventEmitter = EventEmitter;
});
-ace.define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-exports.inherits = (function() {
- var tempCtor = function() {};
- return function(ctor, superCtor) {
- tempCtor.prototype = superCtor.prototype;
- ctor.super_ = superCtor.prototype;
- ctor.prototype = new tempCtor();
- ctor.prototype.constructor = ctor;
- };
-}());
-
-exports.mixin = function(obj, mixin) {
- for (var key in mixin) {
- obj[key] = mixin[key];
- }
- return obj;
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
};
+var Range = function(startRow, startColumn, endRow, endColumn) {
+ this.start = {
+ row: startRow,
+ column: startColumn
+ };
-exports.implement = function(proto, mixin) {
- exports.mixin(proto, mixin);
+ this.end = {
+ row: endRow,
+ column: endColumn
+ };
};
-});
-
-ace.define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-function Empty() {}
-
-if (!Function.prototype.bind) {
- Function.prototype.bind = function bind(that) { // .length is 1
- var target = this;
- if (typeof target != "function") {
- throw new TypeError("Function.prototype.bind called on incompatible " + target);
- }
- var args = slice.call(arguments, 1); // for normal call
- var bound = function () {
-
- if (this instanceof bound) {
-
- var result = target.apply(
- this,
- args.concat(slice.call(arguments))
- );
- if (Object(result) === result) {
- return result;
- }
- return this;
-
- } else {
- return target.apply(
- that,
- args.concat(slice.call(arguments))
- );
-
- }
-
- };
- if(target.prototype) {
- Empty.prototype = target.prototype;
- bound.prototype = new Empty();
- Empty.prototype = null;
- }
- return bound;
+(function() {
+ this.isEqual = function(range) {
+ return this.start.row === range.start.row &&
+ this.end.row === range.end.row &&
+ this.start.column === range.start.column &&
+ this.end.column === range.end.column;
+ };
+ this.toString = function() {
+ return ("Range: [" + this.start.row + "/" + this.start.column +
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
};
-}
-var call = Function.prototype.call;
-var prototypeOfArray = Array.prototype;
-var prototypeOfObject = Object.prototype;
-var slice = prototypeOfArray.slice;
-var _toString = call.bind(prototypeOfObject.toString);
-var owns = call.bind(prototypeOfObject.hasOwnProperty);
-var defineGetter;
-var defineSetter;
-var lookupGetter;
-var lookupSetter;
-var supportsAccessors;
-if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
- defineGetter = call.bind(prototypeOfObject.__defineGetter__);
- defineSetter = call.bind(prototypeOfObject.__defineSetter__);
- lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
- lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
-}
-if ([1,2].splice(0).length != 2) {
- if(function() { // test IE < 9 to splice bug - see issue #138
- function makeArray(l) {
- var a = new Array(l+2);
- a[0] = a[1] = 0;
- return a;
- }
- var array = [], lengthBefore;
-
- array.splice.apply(array, makeArray(20));
- array.splice.apply(array, makeArray(26));
-
- lengthBefore = array.length; //46
- array.splice(5, 0, "XXX"); // add one element
- lengthBefore + 1 == array.length
+ this.contains = function(row, column) {
+ return this.compare(row, column) == 0;
+ };
+ this.compareRange = function(range) {
+ var cmp,
+ end = range.end,
+ start = range.start;
- if (lengthBefore + 1 == array.length) {
- return true;// has right splice implementation without bugs
- }
- }()) {//IE 6/7
- var array_splice = Array.prototype.splice;
- Array.prototype.splice = function(start, deleteCount) {
- if (!arguments.length) {
- return [];
+ cmp = this.compare(end.row, end.column);
+ if (cmp == 1) {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == 1) {
+ return 2;
+ } else if (cmp == 0) {
+ return 1;
} else {
- return array_splice.apply(this, [
- start === void 0 ? 0 : start,
- deleteCount === void 0 ? (this.length - start) : deleteCount
- ].concat(slice.call(arguments, 2)))
- }
- };
- } else {//IE8
- Array.prototype.splice = function(pos, removeCount){
- var length = this.length;
- if (pos > 0) {
- if (pos > length)
- pos = length;
- } else if (pos == void 0) {
- pos = 0;
- } else if (pos < 0) {
- pos = Math.max(length + pos, 0);
+ return 0;
}
-
- if (!(pos+removeCount < length))
- removeCount = length - pos;
-
- var removed = this.slice(pos, pos+removeCount);
- var insert = slice.call(arguments, 2);
- var add = insert.length;
- if (pos === length) {
- if (add) {
- this.push.apply(this, insert);
- }
+ } else if (cmp == -1) {
+ return -2;
+ } else {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == -1) {
+ return -1;
+ } else if (cmp == 1) {
+ return 42;
} else {
- var remove = Math.min(removeCount, length - pos);
- var tailOldPos = pos + remove;
- var tailNewPos = tailOldPos + add - remove;
- var tailCount = length - tailOldPos;
- var lengthAfterRemove = length - remove;
-
- if (tailNewPos < tailOldPos) { // case A
- for (var i = 0; i < tailCount; ++i) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } else if (tailNewPos > tailOldPos) { // case B
- for (i = tailCount; i--; ) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } // else, add == remove (nothing to do)
-
- if (add && pos === lengthAfterRemove) {
- this.length = lengthAfterRemove; // truncate array
- this.push.apply(this, insert);
- } else {
- this.length = lengthAfterRemove + add; // reserves space
- for (i = 0; i < add; ++i) {
- this[pos+i] = insert[i];
- }
- }
- }
- return removed;
- };
- }
-}
-if (!Array.isArray) {
- Array.isArray = function isArray(obj) {
- return _toString(obj) == "[object Array]";
- };
-}
-var boxedString = Object("a"),
- splitString = boxedString[0] != "a" || !(0 in boxedString);
-
-if (!Array.prototype.forEach) {
- Array.prototype.forEach = function forEach(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- thisp = arguments[1],
- i = -1,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- while (++i < length) {
- if (i in self) {
- fun.call(thisp, self[i], i, object);
+ return 0;
}
}
};
-}
-if (!Array.prototype.map) {
- Array.prototype.map = function map(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = Array(length),
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self)
- result[i] = fun.call(thisp, self[i], i, object);
- }
- return result;
+ this.comparePoint = function(p) {
+ return this.compare(p.row, p.column);
};
-}
-if (!Array.prototype.filter) {
- Array.prototype.filter = function filter(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = [],
- value,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self) {
- value = self[i];
- if (fun.call(thisp, value, i, object)) {
- result.push(value);
- }
- }
+ this.containsRange = function(range) {
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
+ this.isEnd = function(row, column) {
+ return this.end.row == row && this.end.column == column;
+ };
+ this.isStart = function(row, column) {
+ return this.start.row == row && this.start.column == column;
+ };
+ this.setStart = function(row, column) {
+ if (typeof row == "object") {
+ this.start.column = row.column;
+ this.start.row = row.row;
+ } else {
+ this.start.row = row;
+ this.start.column = column;
}
- return result;
};
-}
-if (!Array.prototype.every) {
- Array.prototype.every = function every(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
+ this.setEnd = function(row, column) {
+ if (typeof row == "object") {
+ this.end.column = row.column;
+ this.end.row = row.row;
+ } else {
+ this.end.row = row;
+ this.end.column = column;
}
-
- for (var i = 0; i < length; i++) {
- if (i in self && !fun.call(thisp, self[i], i, object)) {
+ };
+ this.inside = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
return false;
+ } else {
+ return true;
}
}
- return true;
+ return false;
};
-}
-if (!Array.prototype.some) {
- Array.prototype.some = function some(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, object)) {
+ this.insideStart = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column)) {
+ return false;
+ } else {
return true;
}
}
return false;
};
-}
-if (!Array.prototype.reduce) {
- Array.prototype.reduce = function reduce(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduce of empty array with no initial value");
- }
-
- var i = 0;
- var result;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i++];
- break;
- }
- if (++i >= length) {
- throw new TypeError("reduce of empty array with no initial value");
- }
- } while (true);
- }
-
- for (; i < length; i++) {
- if (i in self) {
- result = fun.call(void 0, result, self[i], i, object);
+ this.insideEnd = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
}
}
-
- return result;
+ return false;
};
-}
-if (!Array.prototype.reduceRight) {
- Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduceRight of empty array with no initial value");
+ this.compare = function(row, column) {
+ if (!this.isMultiLine()) {
+ if (row === this.start.row) {
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+ };
}
- var result, i = length - 1;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i--];
- break;
- }
- if (--i < 0) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
- } while (true);
- }
+ if (row < this.start.row)
+ return -1;
- do {
- if (i in this) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- } while (i--);
+ if (row > this.end.row)
+ return 1;
- return result;
- };
-}
-if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
- Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
+ if (this.start.row === row)
+ return column >= this.start.column ? 0 : -1;
- if (!length) {
- return -1;
- }
+ if (this.end.row === row)
+ return column <= this.end.column ? 0 : 1;
- var i = 0;
- if (arguments.length > 1) {
- i = toInteger(arguments[1]);
- }
- i = i >= 0 ? i : Math.max(0, length + i);
- for (; i < length; i++) {
- if (i in self && self[i] === sought) {
- return i;
- }
- }
- return -1;
+ return 0;
};
-}
-if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
- Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
-
- if (!length) {
+ this.compareStart = function(row, column) {
+ if (this.start.row == row && this.start.column == column) {
return -1;
+ } else {
+ return this.compare(row, column);
}
- var i = length - 1;
- if (arguments.length > 1) {
- i = Math.min(i, toInteger(arguments[1]));
- }
- i = i >= 0 ? i : length - Math.abs(i);
- for (; i >= 0; i--) {
- if (i in self && sought === self[i]) {
- return i;
- }
- }
- return -1;
- };
-}
-if (!Object.getPrototypeOf) {
- Object.getPrototypeOf = function getPrototypeOf(object) {
- return object.__proto__ || (
- object.constructor ?
- object.constructor.prototype :
- prototypeOfObject
- );
};
-}
-if (!Object.getOwnPropertyDescriptor) {
- var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
- "non-object: ";
- Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT + object);
- if (!owns(object, property))
- return;
-
- var descriptor, getter, setter;
- descriptor = { enumerable: true, configurable: true };
- if (supportsAccessors) {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
-
- var getter = lookupGetter(object, property);
- var setter = lookupSetter(object, property);
- object.__proto__ = prototype;
-
- if (getter || setter) {
- if (getter) descriptor.get = getter;
- if (setter) descriptor.set = setter;
- return descriptor;
- }
+ this.compareEnd = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else {
+ return this.compare(row, column);
}
- descriptor.value = object[property];
- return descriptor;
- };
-}
-if (!Object.getOwnPropertyNames) {
- Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
- return Object.keys(object);
};
-}
-if (!Object.create) {
- var createEmpty;
- if (Object.prototype.__proto__ === null) {
- createEmpty = function () {
- return { "__proto__": null };
- };
- } else {
- createEmpty = function () {
- var empty = {};
- for (var i in empty)
- empty[i] = null;
- empty.constructor =
- empty.hasOwnProperty =
- empty.propertyIsEnumerable =
- empty.isPrototypeOf =
- empty.toLocaleString =
- empty.toString =
- empty.valueOf =
- empty.__proto__ = null;
- return empty;
- }
- }
-
- Object.create = function create(prototype, properties) {
- var object;
- if (prototype === null) {
- object = createEmpty();
+ this.compareInside = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else if (this.start.row == row && this.start.column == column) {
+ return -1;
} else {
- if (typeof prototype != "object")
- throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
- var Type = function () {};
- Type.prototype = prototype;
- object = new Type();
- object.__proto__ = prototype;
+ return this.compare(row, column);
}
- if (properties !== void 0)
- Object.defineProperties(object, properties);
- return object;
};
-}
-
-function doesDefinePropertyWork(object) {
- try {
- Object.defineProperty(object, "sentinel", {});
- return "sentinel" in object;
- } catch (exception) {
- }
-}
-if (Object.defineProperty) {
- var definePropertyWorksOnObject = doesDefinePropertyWork({});
- var definePropertyWorksOnDom = typeof document == "undefined" ||
- doesDefinePropertyWork(document.createElement("div"));
- if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
- var definePropertyFallback = Object.defineProperty;
- }
-}
+ this.clipRows = function(firstRow, lastRow) {
+ if (this.end.row > lastRow)
+ var end = {row: lastRow + 1, column: 0};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
-if (!Object.defineProperty || definePropertyFallback) {
- var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
- var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
- var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
- "on this javascript engine";
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {row: firstRow, column: 0};
- Object.defineProperty = function defineProperty(object, property, descriptor) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT_TARGET + object);
- if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
- throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
- if (definePropertyFallback) {
- try {
- return definePropertyFallback.call(Object, object, property, descriptor);
- } catch (exception) {
- }
- }
- if (owns(descriptor, "value")) {
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+ this.extend = function(row, column) {
+ var cmp = this.compare(row, column);
- if (supportsAccessors && (lookupGetter(object, property) ||
- lookupSetter(object, property)))
- {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
- delete object[property];
- object[property] = descriptor.value;
- object.__proto__ = prototype;
- } else {
- object[property] = descriptor.value;
- }
- } else {
- if (!supportsAccessors)
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- if (owns(descriptor, "get"))
- defineGetter(object, property, descriptor.get);
- if (owns(descriptor, "set"))
- defineSetter(object, property, descriptor.set);
- }
+ if (cmp == 0)
+ return this;
+ else if (cmp == -1)
+ var start = {row: row, column: column};
+ else
+ var end = {row: row, column: column};
- return object;
- };
-}
-if (!Object.defineProperties) {
- Object.defineProperties = function defineProperties(object, properties) {
- for (var property in properties) {
- if (owns(properties, property))
- Object.defineProperty(object, property, properties[property]);
- }
- return object;
- };
-}
-if (!Object.seal) {
- Object.seal = function seal(object) {
- return object;
- };
-}
-if (!Object.freeze) {
- Object.freeze = function freeze(object) {
- return object;
- };
-}
-try {
- Object.freeze(function () {});
-} catch (exception) {
- Object.freeze = (function freeze(freezeObject) {
- return function freeze(object) {
- if (typeof object == "function") {
- return object;
- } else {
- return freezeObject(object);
- }
- };
- })(Object.freeze);
-}
-if (!Object.preventExtensions) {
- Object.preventExtensions = function preventExtensions(object) {
- return object;
+ return Range.fromPoints(start || this.start, end || this.end);
};
-}
-if (!Object.isSealed) {
- Object.isSealed = function isSealed(object) {
- return false;
+
+ this.isEmpty = function() {
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
};
-}
-if (!Object.isFrozen) {
- Object.isFrozen = function isFrozen(object) {
- return false;
+ this.isMultiLine = function() {
+ return (this.start.row !== this.end.row);
};
-}
-if (!Object.isExtensible) {
- Object.isExtensible = function isExtensible(object) {
- if (Object(object) === object) {
- throw new TypeError(); // TODO message
- }
- var name = '';
- while (owns(object, name)) {
- name += '?';
- }
- object[name] = true;
- var returnValue = owns(object, name);
- delete object[name];
- return returnValue;
+ this.clone = function() {
+ return Range.fromPoints(this.start, this.end);
};
-}
-if (!Object.keys) {
- var hasDontEnumBug = true,
- dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor"
- ],
- dontEnumsLength = dontEnums.length;
-
- for (var key in {"toString": null}) {
- hasDontEnumBug = false;
- }
-
- Object.keys = function keys(object) {
-
- if (
- (typeof object != "object" && typeof object != "function") ||
- object === null
- ) {
- throw new TypeError("Object.keys called on a non-object");
- }
-
- var keys = [];
- for (var name in object) {
- if (owns(object, name)) {
- keys.push(name);
- }
- }
-
- if (hasDontEnumBug) {
- for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
- var dontEnum = dontEnums[i];
- if (owns(object, dontEnum)) {
- keys.push(dontEnum);
- }
- }
- }
- return keys;
+ this.collapseRows = function() {
+ if (this.end.column == 0)
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+ else
+ return new Range(this.start.row, 0, this.end.row, 0)
};
+ this.toScreenRange = function(session) {
+ var screenPosStart = session.documentToScreenPosition(this.start);
+ var screenPosEnd = session.documentToScreenPosition(this.end);
-}
-if (!Date.now) {
- Date.now = function now() {
- return new Date().getTime();
+ return new Range(
+ screenPosStart.row, screenPosStart.column,
+ screenPosEnd.row, screenPosEnd.column
+ );
};
-}
-var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
- "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
- "\u2029\uFEFF";
-if (!String.prototype.trim || ws.trim()) {
- ws = "[" + ws + "]";
- var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
- trimEndRegexp = new RegExp(ws + ws + "*$");
- String.prototype.trim = function trim() {
- return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
};
-}
-function toInteger(n) {
- n = +n;
- if (n !== n) { // isNaN
- n = 0;
- } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- }
- return n;
-}
-
-function isPrimitive(input) {
- var type = typeof input;
- return (
- input === null ||
- type === "undefined" ||
- type === "boolean" ||
- type === "number" ||
- type === "string"
- );
-}
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
-function toPrimitive(input) {
- var val, valueOf, toString;
- if (isPrimitive(input)) {
- return input;
- }
- valueOf = input.valueOf;
- if (typeof valueOf === "function") {
- val = valueOf.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- toString = input.toString;
- if (typeof toString === "function") {
- val = toString.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- throw new TypeError();
-}
-var toObject = function (o) {
- if (o == null) { // this matches both null and undefined
- throw new TypeError("can't convert "+o+" to object");
- }
- return Object(o);
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
};
+
+exports.Range = Range;
});
-ace.define('ace/mode/coffee_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/coffee/coffee-script'], function(require, exports, module) {
+ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var oop = require("../lib/oop");
-var Mirror = require("../worker/mirror").Mirror;
-var coffee = require("../mode/coffee/coffee-script");
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
-window.addEventListener = function() {};
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+ if (range.start.row == range.end.row && range.start.row != this.row)
+ return;
-var Worker = exports.Worker = function(sender) {
- Mirror.call(this, sender);
- this.setTimeout(250);
-};
+ if (range.start.row > this.row)
+ return;
-oop.inherits(Worker, Mirror);
+ if (range.start.row == this.row && range.start.column > this.column)
+ return;
-(function() {
+ var row = this.row;
+ var column = this.column;
+ var start = range.start;
+ var end = range.end;
- this.onUpdate = function() {
- var value = this.doc.getValue();
+ if (delta.action === "insertText") {
+ if (start.row === row && start.column <= column) {
+ if (start.column === column && this.$insertRight) {
+ } else if (start.row === end.row) {
+ column += end.column - start.column;
+ } else {
+ column -= start.column;
+ row += end.row - start.row;
+ }
+ } else if (start.row !== end.row && start.row < row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "insertLines") {
+ if (start.row === row && column === 0 && this.$insertRight) {
+ }
+ else if (start.row <= row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "removeText") {
+ if (start.row === row && start.column < column) {
+ if (end.column >= column)
+ column = start.column;
+ else
+ column = Math.max(0, column - (end.column - start.column));
- try {
- coffee.parse(value).compile();
- } catch(e) {
- var loc = e.location;
- if (loc) {
- this.sender.emit("error", {
- row: loc.first_line,
- column: loc.first_column,
- endRow: loc.last_line,
- endColumn: loc.last_column,
- text: e.message,
- type: "error"
- });
+ } else if (start.row !== end.row && start.row < row) {
+ if (end.row === row)
+ column = Math.max(0, column - end.column) + start.column;
+ row -= (end.row - start.row);
+ } else if (end.row === row) {
+ row -= end.row - start.row;
+ column = Math.max(0, column - end.column) + start.column;
+ }
+ } else if (delta.action == "removeLines") {
+ if (start.row <= row) {
+ if (end.row <= row)
+ row -= end.row - start.row;
+ else {
+ row = start.row;
+ column = 0;
+ }
}
- return;
}
- this.sender.emit("ok");
- };
-
-}).call(Worker.prototype);
-});
-ace.define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
+ this.setPosition(row, column, true);
+ };
+ this.setPosition = function(row, column, noClip) {
+ var pos;
+ if (noClip) {
+ pos = {
+ row: row,
+ column: column
+ };
+ } else {
+ pos = this.$clipPositionToDocument(row, column);
+ }
+ if (this.row == pos.row && this.column == pos.column)
+ return;
-var Document = require("../document").Document;
-var lang = require("../lib/lang");
-
-var Mirror = exports.Mirror = function(sender) {
- this.sender = sender;
- var doc = this.doc = new Document("");
-
- var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
-
- var _self = this;
- sender.on("change", function(e) {
- doc.applyDeltas(e.data);
- deferredUpdate.schedule(_self.$timeout);
- });
-};
+ var old = {
+ row: this.row,
+ column: this.column
+ };
-(function() {
-
- this.$timeout = 500;
-
- this.setTimeout = function(timeout) {
- this.$timeout = timeout;
+ this.row = pos.row;
+ this.column = pos.column;
+ this._signal("change", {
+ old: old,
+ value: pos
+ });
};
-
- this.setValue = function(value) {
- this.doc.setValue(value);
- this.deferredUpdate.schedule(this.$timeout);
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
};
-
- this.getValue = function(callbackId) {
- this.sender.callback(this.doc.getValue(), callbackId);
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("change", this.$onChange);
};
-
- this.onUpdate = function() {
+ this.$clipPositionToDocument = function(row, column) {
+ var pos = {};
+
+ if (row >= this.document.getLength()) {
+ pos.row = Math.max(0, this.document.getLength() - 1);
+ pos.column = this.document.getLine(pos.row).length;
+ }
+ else if (row < 0) {
+ pos.row = 0;
+ pos.column = 0;
+ }
+ else {
+ pos.row = row;
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+ }
+
+ if (column < 0)
+ pos.column = 0;
+
+ return pos;
};
-
-}).call(Mirror.prototype);
-});
+}).call(Anchor.prototype);
-ace.define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
+});
+ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
@@ -1101,7 +744,7 @@ var Anchor = require("./anchor").Anchor;
var Document = function(text) {
this.$lines = [];
- if (text.length == 0) {
+ if (text.length === 0) {
this.$lines = [""];
} else if (Array.isArray(text)) {
this._insertLines(0, text);
@@ -1124,10 +767,10 @@ var Document = function(text) {
this.createAnchor = function(row, column) {
return new Anchor(this, row, column);
};
- if ("aaa".split(/a/).length == 0)
+ if ("aaa".split(/a/).length === 0)
this.$split = function(text) {
return text.replace(/\r\n|\r/g, "\n").split("\n");
- }
+ };
else
this.$split = function(text) {
return text.split(/\r\n|\r|\n/);
@@ -1137,6 +780,7 @@ var Document = function(text) {
this.$detectNewLine = function(text) {
var match = text.match(/^.*?(\r\n|\r|\n)/m);
this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
};
this.getNewLineCharacter = function() {
switch (this.$newLineMode) {
@@ -1145,17 +789,18 @@ var Document = function(text) {
case "unix":
return "\n";
default:
- return this.$autoNewLine;
+ return this.$autoNewLine || "\n";
}
};
- this.$autoNewLine = "\n";
+ this.$autoNewLine = "";
this.$newLineMode = "auto";
this.setNewLineMode = function(newLineMode) {
if (this.$newLineMode === newLineMode)
return;
this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
};
this.getNewLineMode = function() {
return this.$newLineMode;
@@ -1225,9 +870,10 @@ var Document = function(text) {
this._insertLines = function(row, lines) {
if (lines.length == 0)
return {row: row, column: 0};
- if (lines.length > 0xFFFF) {
- var end = this._insertLines(row, lines.slice(0xFFFF));
- lines = lines.slice(0, 0xFFFF);
+ while (lines.length > 20000) {
+ var end = this._insertLines(row, lines.slice(0, 20000));
+ lines = lines.slice(20000);
+ row = end.row;
}
var args = [row, 0];
@@ -1240,8 +886,8 @@ var Document = function(text) {
range: range,
lines: lines
};
- this._emit("change", { data: delta });
- return end || range.end;
+ this._signal("change", { data: delta });
+ return range.end;
};
this.insertNewLine = function(position) {
position = this.$clipPosition(position);
@@ -1260,7 +906,7 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
@@ -1283,11 +929,13 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: text
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
this.remove = function(range) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
range.start = this.$clipPosition(range.start);
range.end = this.$clipPosition(range.end);
@@ -1332,7 +980,7 @@ var Document = function(text) {
range: range,
text: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return range.start;
};
this.removeLines = function(firstRow, lastRow) {
@@ -1351,7 +999,7 @@ var Document = function(text) {
nl: this.getNewLineCharacter(),
lines: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return removed;
};
this.removeNewLine = function(row) {
@@ -1368,9 +1016,11 @@ var Document = function(text) {
range: range,
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
};
this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
if (text.length == 0 && range.isEmpty())
return range.start;
if (text == this.getTextRange(range))
@@ -1443,393 +1093,13 @@ var Document = function(text) {
exports.Document = Document;
});
-ace.define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-var comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function(startRow, startColumn, endRow, endColumn) {
- this.start = {
- row: startRow,
- column: startColumn
- };
-
- this.end = {
- row: endRow,
- column: endColumn
- };
-};
-
-(function() {
- this.isEqual = function(range) {
- return this.start.row === range.start.row &&
- this.end.row === range.end.row &&
- this.start.column === range.start.column &&
- this.end.column === range.end.column;
- };
- this.toString = function() {
- return ("Range: [" + this.start.row + "/" + this.start.column +
- "] -> [" + this.end.row + "/" + this.end.column + "]");
- };
-
- this.contains = function(row, column) {
- return this.compare(row, column) == 0;
- };
- this.compareRange = function(range) {
- var cmp,
- end = range.end,
- start = range.start;
-
- cmp = this.compare(end.row, end.column);
- if (cmp == 1) {
- cmp = this.compare(start.row, start.column);
- if (cmp == 1) {
- return 2;
- } else if (cmp == 0) {
- return 1;
- } else {
- return 0;
- }
- } else if (cmp == -1) {
- return -2;
- } else {
- cmp = this.compare(start.row, start.column);
- if (cmp == -1) {
- return -1;
- } else if (cmp == 1) {
- return 42;
- } else {
- return 0;
- }
- }
- };
- this.comparePoint = function(p) {
- return this.compare(p.row, p.column);
- };
- this.containsRange = function(range) {
- return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- };
- this.intersects = function(range) {
- var cmp = this.compareRange(range);
- return (cmp == -1 || cmp == 0 || cmp == 1);
- };
- this.isEnd = function(row, column) {
- return this.end.row == row && this.end.column == column;
- };
- this.isStart = function(row, column) {
- return this.start.row == row && this.start.column == column;
- };
- this.setStart = function(row, column) {
- if (typeof row == "object") {
- this.start.column = row.column;
- this.start.row = row.row;
- } else {
- this.start.row = row;
- this.start.column = column;
- }
- };
- this.setEnd = function(row, column) {
- if (typeof row == "object") {
- this.end.column = row.column;
- this.end.row = row.row;
- } else {
- this.end.row = row;
- this.end.column = column;
- }
- };
- this.inside = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column) || this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideStart = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideEnd = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.compare = function(row, column) {
- if (!this.isMultiLine()) {
- if (row === this.start.row) {
- return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
- };
- }
-
- if (row < this.start.row)
- return -1;
-
- if (row > this.end.row)
- return 1;
-
- if (this.start.row === row)
- return column >= this.start.column ? 0 : -1;
-
- if (this.end.row === row)
- return column <= this.end.column ? 0 : 1;
-
- return 0;
- };
- this.compareStart = function(row, column) {
- if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareEnd = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareInside = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.clipRows = function(firstRow, lastRow) {
- if (this.end.row > lastRow)
- var end = {row: lastRow + 1, column: 0};
- else if (this.end.row < firstRow)
- var end = {row: firstRow, column: 0};
-
- if (this.start.row > lastRow)
- var start = {row: lastRow + 1, column: 0};
- else if (this.start.row < firstRow)
- var start = {row: firstRow, column: 0};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
- this.extend = function(row, column) {
- var cmp = this.compare(row, column);
-
- if (cmp == 0)
- return this;
- else if (cmp == -1)
- var start = {row: row, column: column};
- else
- var end = {row: row, column: column};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.isEmpty = function() {
- return (this.start.row === this.end.row && this.start.column === this.end.column);
- };
- this.isMultiLine = function() {
- return (this.start.row !== this.end.row);
- };
- this.clone = function() {
- return Range.fromPoints(this.start, this.end);
- };
- this.collapseRows = function() {
- if (this.end.column == 0)
- return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
- else
- return new Range(this.start.row, 0, this.end.row, 0)
- };
- this.toScreenRange = function(session) {
- var screenPosStart = session.documentToScreenPosition(this.start);
- var screenPosEnd = session.documentToScreenPosition(this.end);
-
- return new Range(
- screenPosStart.row, screenPosStart.column,
- screenPosEnd.row, screenPosEnd.column
- );
- };
- this.moveBy = function(row, column) {
- this.start.row += row;
- this.start.column += column;
- this.end.row += row;
- this.end.column += column;
- };
-
-}).call(Range.prototype);
-Range.fromPoints = function(start, end) {
- return new Range(start.row, start.column, end.row, end.column);
-};
-Range.comparePoints = comparePoints;
-
-Range.comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-
-
-exports.Range = Range;
-});
-
-ace.define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-
-var Anchor = exports.Anchor = function(doc, row, column) {
- this.$onChange = this.onChange.bind(this);
- this.attach(doc);
-
- if (typeof column == "undefined")
- this.setPosition(row.row, row.column);
- else
- this.setPosition(row, column);
+exports.last = function(a) {
+ return a[a.length - 1];
};
-(function() {
-
- oop.implement(this, EventEmitter);
- this.getPosition = function() {
- return this.$clipPositionToDocument(this.row, this.column);
- };
- this.getDocument = function() {
- return this.document;
- };
- this.onChange = function(e) {
- var delta = e.data;
- var range = delta.range;
-
- if (range.start.row == range.end.row && range.start.row != this.row)
- return;
-
- if (range.start.row > this.row)
- return;
-
- if (range.start.row == this.row && range.start.column > this.column)
- return;
-
- var row = this.row;
- var column = this.column;
- var start = range.start;
- var end = range.end;
-
- if (delta.action === "insertText") {
- if (start.row === row && start.column <= column) {
- if (start.row === end.row) {
- column += end.column - start.column;
- } else {
- column -= start.column;
- row += end.row - start.row;
- }
- } else if (start.row !== end.row && start.row < row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "insertLines") {
- if (start.row <= row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "removeText") {
- if (start.row === row && start.column < column) {
- if (end.column >= column)
- column = start.column;
- else
- column = Math.max(0, column - (end.column - start.column));
-
- } else if (start.row !== end.row && start.row < row) {
- if (end.row === row)
- column = Math.max(0, column - end.column) + start.column;
- row -= (end.row - start.row);
- } else if (end.row === row) {
- row -= end.row - start.row;
- column = Math.max(0, column - end.column) + start.column;
- }
- } else if (delta.action == "removeLines") {
- if (start.row <= row) {
- if (end.row <= row)
- row -= end.row - start.row;
- else {
- row = start.row;
- column = 0;
- }
- }
- }
-
- this.setPosition(row, column, true);
- };
- this.setPosition = function(row, column, noClip) {
- var pos;
- if (noClip) {
- pos = {
- row: row,
- column: column
- };
- } else {
- pos = this.$clipPositionToDocument(row, column);
- }
-
- if (this.row == pos.row && this.column == pos.column)
- return;
-
- var old = {
- row: this.row,
- column: this.column
- };
-
- this.row = pos.row;
- this.column = pos.column;
- this._emit("change", {
- old: old,
- value: pos
- });
- };
- this.detach = function() {
- this.document.removeEventListener("change", this.$onChange);
- };
- this.attach = function(doc) {
- this.document = doc || this.document;
- this.document.on("change", this.$onChange);
- };
- this.$clipPositionToDocument = function(row, column) {
- var pos = {};
-
- if (row >= this.document.getLength()) {
- pos.row = Math.max(0, this.document.getLength() - 1);
- pos.column = this.document.getLine(pos.row).length;
- }
- else if (row < 0) {
- pos.row = 0;
- pos.column = 0;
- }
- else {
- pos.row = row;
- pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
- }
-
- if (column < 0)
- pos.column = 0;
-
- return pos;
- };
-
-}).call(Anchor.prototype);
-
-});
-
-ace.define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
exports.stringReverse = function(string) {
return string.split("").reverse().join("");
};
@@ -1876,18 +1146,24 @@ exports.copyArray = function(array){
return copy;
};
-exports.deepCopy = function (obj) {
- if (typeof obj != "object") {
+exports.deepCopy = function deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
}
+ var cons = obj.constructor;
+ if (cons === RegExp)
+ return obj;
- var copy = obj.constructor();
+ copy = cons();
for (var key in obj) {
- if (typeof obj[key] == "object") {
- copy[key] = this.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
+ copy[key] = deepCopy(obj[key]);
}
return copy;
};
@@ -1937,7 +1213,6 @@ exports.getMatchOffsets = function(string, regExp) {
return matches;
};
exports.deferredCall = function(fcn) {
-
var timer = null;
var callback = function() {
timer = null;
@@ -1963,6 +1238,10 @@ exports.deferredCall = function(fcn) {
timer = null;
return deferred;
};
+
+ deferred.isPending = function() {
+ return timer;
+ };
return deferred;
};
@@ -1976,15 +1255,15 @@ exports.delayedCall = function(fcn, defaultTimeout) {
};
var _self = function(timeout) {
- timer && clearTimeout(timer);
- timer = setTimeout(callback, timeout || defaultTimeout);
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
- _self.delay = _self;
- _self.schedule = function(timeout) {
- if (timer == null)
- timer = setTimeout(callback, timeout || 0);
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
+ _self.schedule = _self;
_self.call = function() {
this.cancel();
@@ -2004,40 +1283,791 @@ exports.delayedCall = function(fcn, defaultTimeout) {
};
});
-ace.define('ace/mode/coffee/coffee-script', ['require', 'exports', 'module' , 'ace/mode/coffee/lexer', 'ace/mode/coffee/parser', 'ace/mode/coffee/nodes'], function(require, exports, module) {
+ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
- var Lexer = require("./lexer").Lexer;
- var parser = require("./parser");
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+
+var Mirror = exports.Mirror = function(sender) {
+ this.sender = sender;
+ var doc = this.doc = new Document("");
+
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ doc.applyDeltas(e.data);
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
- var lexer = new Lexer();
- parser.lexer = {
- lex: function() {
- var tag, token;
- token = this.tokens[this.pos++];
- if (token) {
- tag = token[0], this.yytext = token[1], this.yylloc = token[2];
- this.yylineno = this.yylloc.first_line;
+(function() {
+
+ this.$timeout = 500;
+
+ this.setTimeout = function(timeout) {
+ this.$timeout = timeout;
+ };
+
+ this.setValue = function(value) {
+ this.doc.setValue(value);
+ this.deferredUpdate.schedule(this.$timeout);
+ };
+
+ this.getValue = function(callbackId) {
+ this.sender.callback(this.doc.getValue(), callbackId);
+ };
+
+ this.onUpdate = function() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/coffee/rewriter",["require","exports","module"], function(require, exports, module) {
+
+ var BALANCED_PAIRS, CALL_CLOSERS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref,
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
+ __slice = [].slice;
+
+ generate = function(tag, value) {
+ var tok;
+ tok = [tag, value];
+ tok.generated = true;
+ return tok;
+ };
+
+ exports.Rewriter = (function() {
+ function Rewriter() {}
+
+ Rewriter.prototype.rewrite = function(tokens) {
+ this.tokens = tokens;
+ this.removeLeadingNewlines();
+ this.closeOpenCalls();
+ this.closeOpenIndexes();
+ this.normalizeLines();
+ this.tagPostfixConditionals();
+ this.addImplicitBracesAndParens();
+ this.addLocationDataToGeneratedTokens();
+ return this.tokens;
+ };
+
+ Rewriter.prototype.scanTokens = function(block) {
+ var i, token, tokens;
+ tokens = this.tokens;
+ i = 0;
+ while (token = tokens[i]) {
+ i += block.call(this, token, i, tokens);
+ }
+ return true;
+ };
+
+ Rewriter.prototype.detectEnd = function(i, condition, action) {
+ var levels, token, tokens, _ref, _ref1;
+ tokens = this.tokens;
+ levels = 0;
+ while (token = tokens[i]) {
+ if (levels === 0 && condition.call(this, token, i)) {
+ return action.call(this, token, i);
+ }
+ if (!token || levels < 0) {
+ return action.call(this, token, i - 1);
+ }
+ if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) {
+ levels += 1;
+ } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) {
+ levels -= 1;
+ }
+ i += 1;
+ }
+ return i - 1;
+ };
+
+ Rewriter.prototype.removeLeadingNewlines = function() {
+ var i, tag, _i, _len, _ref;
+ _ref = this.tokens;
+ for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
+ tag = _ref[i][0];
+ if (tag !== 'TERMINATOR') {
+ break;
+ }
+ }
+ if (i) {
+ return this.tokens.splice(0, i);
+ }
+ };
+
+ Rewriter.prototype.closeOpenCalls = function() {
+ var action, condition;
+ condition = function(token, i) {
+ var _ref;
+ return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')';
+ };
+ action = function(token, i) {
+ return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END';
+ };
+ return this.scanTokens(function(token, i) {
+ if (token[0] === 'CALL_START') {
+ this.detectEnd(i + 1, condition, action);
+ }
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.closeOpenIndexes = function() {
+ var action, condition;
+ condition = function(token, i) {
+ var _ref;
+ return (_ref = token[0]) === ']' || _ref === 'INDEX_END';
+ };
+ action = function(token, i) {
+ return token[0] = 'INDEX_END';
+ };
+ return this.scanTokens(function(token, i) {
+ if (token[0] === 'INDEX_START') {
+ this.detectEnd(i + 1, condition, action);
+ }
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.matchTags = function() {
+ var fuzz, i, j, pattern, _i, _ref, _ref1;
+ i = arguments[0], pattern = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ fuzz = 0;
+ for (j = _i = 0, _ref = pattern.length; 0 <= _ref ? _i < _ref : _i > _ref; j = 0 <= _ref ? ++_i : --_i) {
+ while (this.tag(i + j + fuzz) === 'HERECOMMENT') {
+ fuzz += 2;
+ }
+ if (pattern[j] == null) {
+ continue;
+ }
+ if (typeof pattern[j] === 'string') {
+ pattern[j] = [pattern[j]];
+ }
+ if (_ref1 = this.tag(i + j + fuzz), __indexOf.call(pattern[j], _ref1) < 0) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ Rewriter.prototype.looksObjectish = function(j) {
+ return this.matchTags(j, '@', null, ':') || this.matchTags(j, null, ':');
+ };
+
+ Rewriter.prototype.findTagsBackwards = function(i, tags) {
+ var backStack, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
+ backStack = [];
+ while (i >= 0 && (backStack.length || (_ref2 = this.tag(i), __indexOf.call(tags, _ref2) < 0) && ((_ref3 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref3) < 0) || this.tokens[i].generated) && (_ref4 = this.tag(i), __indexOf.call(LINEBREAKS, _ref4) < 0))) {
+ if (_ref = this.tag(i), __indexOf.call(EXPRESSION_END, _ref) >= 0) {
+ backStack.push(this.tag(i));
+ }
+ if ((_ref1 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref1) >= 0) && backStack.length) {
+ backStack.pop();
+ }
+ i -= 1;
+ }
+ return _ref5 = this.tag(i), __indexOf.call(tags, _ref5) >= 0;
+ };
+
+ Rewriter.prototype.addImplicitBracesAndParens = function() {
+ var stack;
+ stack = [];
+ return this.scanTokens(function(token, i, tokens) {
+ var endAllImplicitCalls, endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, nextTag, offset, prevTag, prevToken, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
+ tag = token[0];
+ prevTag = (prevToken = i > 0 ? tokens[i - 1] : [])[0];
+ nextTag = (i < tokens.length - 1 ? tokens[i + 1] : [])[0];
+ stackTop = function() {
+ return stack[stack.length - 1];
+ };
+ startIdx = i;
+ forward = function(n) {
+ return i - startIdx + n;
+ };
+ inImplicit = function() {
+ var _ref, _ref1;
+ return (_ref = stackTop()) != null ? (_ref1 = _ref[2]) != null ? _ref1.ours : void 0 : void 0;
+ };
+ inImplicitCall = function() {
+ var _ref;
+ return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '(';
+ };
+ inImplicitObject = function() {
+ var _ref;
+ return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '{';
+ };
+ inImplicitControl = function() {
+ var _ref;
+ return inImplicit && ((_ref = stackTop()) != null ? _ref[0] : void 0) === 'CONTROL';
+ };
+ startImplicitCall = function(j) {
+ var idx;
+ idx = j != null ? j : i;
+ stack.push([
+ '(', idx, {
+ ours: true
+ }
+ ]);
+ tokens.splice(idx, 0, generate('CALL_START', '('));
+ if (j == null) {
+ return i += 1;
+ }
+ };
+ endImplicitCall = function() {
+ stack.pop();
+ tokens.splice(i, 0, generate('CALL_END', ')'));
+ return i += 1;
+ };
+ endAllImplicitCalls = function() {
+ while (inImplicitCall()) {
+ endImplicitCall();
+ }
+ };
+ startImplicitObject = function(j, startsLine) {
+ var idx;
+ if (startsLine == null) {
+ startsLine = true;
+ }
+ idx = j != null ? j : i;
+ stack.push([
+ '{', idx, {
+ sameLine: true,
+ startsLine: startsLine,
+ ours: true
+ }
+ ]);
+ tokens.splice(idx, 0, generate('{', generate(new String('{'))));
+ if (j == null) {
+ return i += 1;
+ }
+ };
+ endImplicitObject = function(j) {
+ j = j != null ? j : i;
+ stack.pop();
+ tokens.splice(j, 0, generate('}', '}'));
+ return i += 1;
+ };
+ if (inImplicitCall() && (tag === 'IF' || tag === 'TRY' || tag === 'FINALLY' || tag === 'CATCH' || tag === 'CLASS' || tag === 'SWITCH')) {
+ stack.push([
+ 'CONTROL', i, {
+ ours: true
+ }
+ ]);
+ return forward(1);
+ }
+ if (tag === 'INDENT' && inImplicit()) {
+ if (prevTag !== '=>' && prevTag !== '->' && prevTag !== '[' && prevTag !== '(' && prevTag !== ',' && prevTag !== '{' && prevTag !== 'TRY' && prevTag !== 'ELSE' && prevTag !== '=') {
+ while (inImplicitCall()) {
+ endImplicitCall();
+ }
+ }
+ if (inImplicitControl()) {
+ stack.pop();
+ }
+ stack.push([tag, i]);
+ return forward(1);
+ }
+ if (__indexOf.call(EXPRESSION_START, tag) >= 0) {
+ stack.push([tag, i]);
+ return forward(1);
+ }
+ if (__indexOf.call(EXPRESSION_END, tag) >= 0) {
+ while (inImplicit()) {
+ if (inImplicitCall()) {
+ endImplicitCall();
+ } else if (inImplicitObject()) {
+ endImplicitObject();
} else {
- tag = '';
+ stack.pop();
}
- return tag;
- },
- setInput: function(tokens) {
- this.tokens = tokens;
- return this.pos = 0;
- },
- upcomingInput: function() {
- return "";
+ }
+ stack.pop();
+ }
+ if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced && !token.stringEnd || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) {
+ if (tag === '?') {
+ tag = token[0] = 'FUNC_EXIST';
+ }
+ startImplicitCall(i + 1);
+ return forward(2);
+ }
+ if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) {
+ startImplicitCall(i + 1);
+ stack.push(['INDENT', i + 2]);
+ return forward(3);
+ }
+ if (tag === ':') {
+ if (this.tag(i - 2) === '@') {
+ s = i - 2;
+ } else {
+ s = i - 1;
+ }
+ while (this.tag(s - 2) === 'HERECOMMENT') {
+ s -= 2;
+ }
+ startsLine = s === 0 || (_ref2 = this.tag(s - 1), __indexOf.call(LINEBREAKS, _ref2) >= 0) || tokens[s - 1].newLine;
+ if (stackTop()) {
+ _ref3 = stackTop(), stackTag = _ref3[0], stackIdx = _ref3[1];
+ if ((stackTag === '{' || stackTag === 'INDENT' && this.tag(stackIdx - 1) === '{') && (startsLine || this.tag(s - 1) === ',' || this.tag(s - 1) === '{')) {
+ return forward(1);
+ }
+ }
+ startImplicitObject(s, !!startsLine);
+ return forward(2);
+ }
+ if (inImplicitCall() && __indexOf.call(CALL_CLOSERS, tag) >= 0) {
+ if (prevTag === 'OUTDENT') {
+ endImplicitCall();
+ return forward(1);
+ }
+ if (prevToken.newLine) {
+ endAllImplicitCalls();
+ return forward(1);
+ }
+ }
+ if (inImplicitObject() && __indexOf.call(LINEBREAKS, tag) >= 0) {
+ stackTop()[2].sameLine = false;
}
+ if (__indexOf.call(IMPLICIT_END, tag) >= 0) {
+ while (inImplicit()) {
+ _ref4 = stackTop(), stackTag = _ref4[0], stackIdx = _ref4[1], (_ref5 = _ref4[2], sameLine = _ref5.sameLine, startsLine = _ref5.startsLine);
+ if (inImplicitCall() && prevTag !== ',') {
+ endImplicitCall();
+ } else if (inImplicitObject() && sameLine && !startsLine) {
+ endImplicitObject();
+ } else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) {
+ endImplicitObject();
+ } else {
+ break;
+ }
+ }
+ }
+ if (tag === ',' && !this.looksObjectish(i + 1) && inImplicitObject() && (nextTag !== 'TERMINATOR' || !this.looksObjectish(i + 2))) {
+ offset = nextTag === 'OUTDENT' ? 1 : 0;
+ while (inImplicitObject()) {
+ endImplicitObject(i + offset);
+ }
+ }
+ return forward(1);
+ });
};
- parser.yy = require('./nodes');
- exports.parse = function(code) {
- return parser.parse(lexer.tokenize(code));
+ Rewriter.prototype.addLocationDataToGeneratedTokens = function() {
+ return this.scanTokens(function(token, i, tokens) {
+ var column, line, nextLocation, prevLocation, _ref, _ref1;
+ if (token[2]) {
+ return 1;
+ }
+ if (!(token.generated || token.explicit)) {
+ return 1;
+ }
+ if (token[0] === '{' && (nextLocation = (_ref = tokens[i + 1]) != null ? _ref[2] : void 0)) {
+ line = nextLocation.first_line, column = nextLocation.first_column;
+ } else if (prevLocation = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) {
+ line = prevLocation.last_line, column = prevLocation.last_column;
+ } else {
+ line = column = 0;
+ }
+ token[2] = {
+ first_line: line,
+ first_column: column,
+ last_line: line,
+ last_column: column
+ };
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.normalizeLines = function() {
+ var action, condition, indent, outdent, starter;
+ starter = indent = outdent = null;
+ condition = function(token, i) {
+ var _ref, _ref1, _ref2, _ref3;
+ return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'TERMINATOR' && (_ref1 = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref1) >= 0)) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref2 = token[0]) === 'CATCH' || _ref2 === 'FINALLY') && (starter === '->' || starter === '=>')) || (_ref3 = token[0], __indexOf.call(CALL_CLOSERS, _ref3) >= 0) && this.tokens[i - 1].newLine;
+ };
+ action = function(token, i) {
+ return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent);
+ };
+ return this.scanTokens(function(token, i, tokens) {
+ var j, tag, _i, _ref, _ref1, _ref2;
+ tag = token[0];
+ if (tag === 'TERMINATOR') {
+ if (this.tag(i + 1) === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') {
+ tokens.splice.apply(tokens, [i, 1].concat(__slice.call(this.indentation())));
+ return 1;
+ }
+ if (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0) {
+ tokens.splice(i, 1);
+ return 0;
+ }
+ }
+ if (tag === 'CATCH') {
+ for (j = _i = 1; _i <= 2; j = ++_i) {
+ if (!((_ref1 = this.tag(i + j)) === 'OUTDENT' || _ref1 === 'TERMINATOR' || _ref1 === 'FINALLY')) {
+ continue;
+ }
+ tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation())));
+ return 2 + j;
+ }
+ }
+ if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) {
+ starter = tag;
+ _ref2 = this.indentation(true), indent = _ref2[0], outdent = _ref2[1];
+ if (starter === 'THEN') {
+ indent.fromThen = true;
+ }
+ tokens.splice(i + 1, 0, indent);
+ this.detectEnd(i + 2, condition, action);
+ if (tag === 'THEN') {
+ tokens.splice(i, 1);
+ }
+ return 1;
+ }
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.tagPostfixConditionals = function() {
+ var action, condition, original;
+ original = null;
+ condition = function(token, i) {
+ var prevTag, tag;
+ tag = token[0];
+ prevTag = this.tokens[i - 1][0];
+ return tag === 'TERMINATOR' || (tag === 'INDENT' && __indexOf.call(SINGLE_LINERS, prevTag) < 0);
+ };
+ action = function(token, i) {
+ if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) {
+ return original[0] = 'POST_' + original[0];
+ }
+ };
+ return this.scanTokens(function(token, i) {
+ if (token[0] !== 'IF') {
+ return 1;
+ }
+ original = token;
+ this.detectEnd(i + 1, condition, action);
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.indentation = function(implicit) {
+ var indent, outdent;
+ if (implicit == null) {
+ implicit = false;
+ }
+ indent = ['INDENT', 2];
+ outdent = ['OUTDENT', 2];
+ if (implicit) {
+ indent.generated = outdent.generated = true;
+ }
+ if (!implicit) {
+ indent.explicit = outdent.explicit = true;
+ }
+ return [indent, outdent];
+ };
+
+ Rewriter.prototype.generate = generate;
+
+ Rewriter.prototype.tag = function(i) {
+ var _ref;
+ return (_ref = this.tokens[i]) != null ? _ref[0] : void 0;
+ };
+
+ return Rewriter;
+
+ })();
+
+ BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']];
+
+ exports.INVERSES = INVERSES = {};
+
+ EXPRESSION_START = [];
+
+ EXPRESSION_END = [];
+
+ for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) {
+ _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1];
+ EXPRESSION_START.push(INVERSES[rite] = left);
+ EXPRESSION_END.push(INVERSES[left] = rite);
+ }
+
+ EXPRESSION_CLOSE = ['CATCH', 'THEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END);
+
+ IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS'];
+
+ IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++'];
+
+ IMPLICIT_UNSPACED_CALL = ['+', '-'];
+
+ IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR'];
+
+ SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN'];
+
+ SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN'];
+
+ LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT'];
+
+ CALL_CLOSERS = ['.', '?.', '::', '?::'];
+
+
+});
+
+ace.define("ace/mode/coffee/helpers",["require","exports","module"], function(require, exports, module) {
+
+ var buildLocationData, extend, flatten, last, repeat, syntaxErrorToString, _ref;
+
+ exports.starts = function(string, literal, start) {
+ return literal === string.substr(start, literal.length);
+ };
+
+ exports.ends = function(string, literal, back) {
+ var len;
+ len = literal.length;
+ return literal === string.substr(string.length - len - (back || 0), len);
+ };
+
+ exports.repeat = repeat = function(str, n) {
+ var res;
+ res = '';
+ while (n > 0) {
+ if (n & 1) {
+ res += str;
+ }
+ n >>>= 1;
+ str += str;
+ }
+ return res;
+ };
+
+ exports.compact = function(array) {
+ var item, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = array.length; _i < _len; _i++) {
+ item = array[_i];
+ if (item) {
+ _results.push(item);
+ }
+ }
+ return _results;
+ };
+
+ exports.count = function(string, substr) {
+ var num, pos;
+ num = pos = 0;
+ if (!substr.length) {
+ return 1 / 0;
+ }
+ while (pos = 1 + string.indexOf(substr, pos)) {
+ num++;
+ }
+ return num;
+ };
+
+ exports.merge = function(options, overrides) {
+ return extend(extend({}, options), overrides);
+ };
+
+ extend = exports.extend = function(object, properties) {
+ var key, val;
+ for (key in properties) {
+ val = properties[key];
+ object[key] = val;
+ }
+ return object;
+ };
+
+ exports.flatten = flatten = function(array) {
+ var element, flattened, _i, _len;
+ flattened = [];
+ for (_i = 0, _len = array.length; _i < _len; _i++) {
+ element = array[_i];
+ if (element instanceof Array) {
+ flattened = flattened.concat(flatten(element));
+ } else {
+ flattened.push(element);
+ }
+ }
+ return flattened;
+ };
+
+ exports.del = function(obj, key) {
+ var val;
+ val = obj[key];
+ delete obj[key];
+ return val;
+ };
+
+ exports.last = last = function(array, back) {
+ return array[array.length - (back || 0) - 1];
+ };
+
+ exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) {
+ var e, _i, _len;
+ for (_i = 0, _len = this.length; _i < _len; _i++) {
+ e = this[_i];
+ if (fn(e)) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ exports.invertLiterate = function(code) {
+ var line, lines, maybe_code;
+ maybe_code = true;
+ lines = (function() {
+ var _i, _len, _ref1, _results;
+ _ref1 = code.split('\n');
+ _results = [];
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ line = _ref1[_i];
+ if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) {
+ _results.push(line);
+ } else if (maybe_code = /^\s*$/.test(line)) {
+ _results.push(line);
+ } else {
+ _results.push('# ' + line);
+ }
+ }
+ return _results;
+ })();
+ return lines.join('\n');
+ };
+
+ buildLocationData = function(first, last) {
+ if (!last) {
+ return first;
+ } else {
+ return {
+ first_line: first.first_line,
+ first_column: first.first_column,
+ last_line: last.last_line,
+ last_column: last.last_column
+ };
+ }
+ };
+
+ exports.addLocationDataFn = function(first, last) {
+ return function(obj) {
+ if (((typeof obj) === 'object') && (!!obj['updateLocationDataIfMissing'])) {
+ obj.updateLocationDataIfMissing(buildLocationData(first, last));
+ }
+ return obj;
};
+ };
+
+ exports.locationDataToString = function(obj) {
+ var locationData;
+ if (("2" in obj) && ("first_line" in obj[2])) {
+ locationData = obj[2];
+ } else if ("first_line" in obj) {
+ locationData = obj;
+ }
+ if (locationData) {
+ return ("" + (locationData.first_line + 1) + ":" + (locationData.first_column + 1) + "-") + ("" + (locationData.last_line + 1) + ":" + (locationData.last_column + 1));
+ } else {
+ return "No location data";
+ }
+ };
+
+ exports.baseFileName = function(file, stripExt, useWinPathSep) {
+ var parts, pathSep;
+ if (stripExt == null) {
+ stripExt = false;
+ }
+ if (useWinPathSep == null) {
+ useWinPathSep = false;
+ }
+ pathSep = useWinPathSep ? /\\|\// : /\//;
+ parts = file.split(pathSep);
+ file = parts[parts.length - 1];
+ if (!(stripExt && file.indexOf('.') >= 0)) {
+ return file;
+ }
+ parts = file.split('.');
+ parts.pop();
+ if (parts[parts.length - 1] === 'coffee' && parts.length > 1) {
+ parts.pop();
+ }
+ return parts.join('.');
+ };
+
+ exports.isCoffee = function(file) {
+ return /\.((lit)?coffee|coffee\.md)$/.test(file);
+ };
+
+ exports.isLiterate = function(file) {
+ return /\.(litcoffee|coffee\.md)$/.test(file);
+ };
+
+ exports.throwSyntaxError = function(message, location) {
+ var error;
+ if (location.last_line == null) {
+ location.last_line = location.first_line;
+ }
+ if (location.last_column == null) {
+ location.last_column = location.first_column;
+ }
+ error = new SyntaxError(message);
+ error.location = location;
+ error.toString = syntaxErrorToString;
+ error.stack = error.toString();
+ throw error;
+ };
+
+ exports.updateSyntaxError = function(error, code, filename) {
+ if (error.toString === syntaxErrorToString) {
+ error.code || (error.code = code);
+ error.filename || (error.filename = filename);
+ error.stack = error.toString();
+ }
+ return error;
+ };
+
+ syntaxErrorToString = function() {
+ var codeLine, colorize, colorsEnabled, end, filename, first_column, first_line, last_column, last_line, marker, start, _ref1, _ref2;
+ if (!(this.code && this.location)) {
+ return Error.prototype.toString.call(this);
+ }
+ _ref1 = this.location, first_line = _ref1.first_line, first_column = _ref1.first_column, last_line = _ref1.last_line, last_column = _ref1.last_column;
+ if (last_line == null) {
+ last_line = first_line;
+ }
+ if (last_column == null) {
+ last_column = first_column;
+ }
+ filename = this.filename || '[stdin]';
+ codeLine = this.code.split('\n')[first_line];
+ start = first_column;
+ end = first_line === last_line ? last_column + 1 : codeLine.length;
+ marker = repeat(' ', start) + repeat('^', end - start);
+ if (typeof process !== "undefined" && process !== null) {
+ colorsEnabled = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS;
+ }
+ if ((_ref2 = this.colorful) != null ? _ref2 : colorsEnabled) {
+ colorize = function(str) {
+ return "\x1B[1;31m" + str + "\x1B[0m";
+ };
+ codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end);
+ marker = colorize(marker);
+ }
+ return "" + filename + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + this.message + "\n" + codeLine + "\n" + marker;
+ };
+
+
});
-ace.define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/coffee/rewriter', 'ace/mode/coffee/helpers'], function(require, exports, module) {
+ace.define("ace/mode/coffee/lexer",["require","exports","module","ace/mode/coffee/rewriter","ace/mode/coffee/helpers"], function(require, exports, module) {
var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, repeat, starts, throwSyntaxError, _ref, _ref1,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
@@ -2056,6 +2086,7 @@ ace.define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/
}
this.literate = opts.literate;
this.indent = 0;
+ this.baseIndent = 0;
this.indebt = 0;
this.outdebt = 0;
this.indents = [];
@@ -2204,30 +2235,25 @@ ace.define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/
};
Lexer.prototype.stringToken = function() {
- var match, octalEsc, string;
- switch (this.chunk.charAt(0)) {
+ var octalEsc, quote, string, trimmed;
+ switch (quote = this.chunk.charAt(0)) {
case "'":
- if (!(match = SIMPLESTR.exec(this.chunk))) {
- return 0;
- }
- string = match[0];
- this.token('STRING', string.replace(MULTILINER, '\\\n'), 0, string.length);
+ string = SIMPLESTR.exec(this.chunk)[0];
break;
case '"':
- if (!(string = this.balancedString(this.chunk, '"'))) {
- return 0;
- }
- if (0 < string.indexOf('#{', 1)) {
- this.interpolateString(string.slice(1, -1), {
- strOffset: 1,
- lexedLength: string.length
- });
- } else {
- this.token('STRING', this.escapeLines(string, 0, string.length));
- }
- break;
- default:
- return 0;
+ string = this.balancedString(this.chunk, '"');
+ }
+ if (!string) {
+ return 0;
+ }
+ trimmed = this.removeNewlines(string.slice(1, -1));
+ if (quote === '"' && 0 < string.indexOf('#{', 1)) {
+ this.interpolateString(trimmed, {
+ strOffset: 1,
+ lexedLength: string.length
+ });
+ } else {
+ this.token('STRING', quote + this.escapeLines(trimmed) + quote, 0, string.length);
}
if (octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(string)) {
this.error("octal escape sequences " + string + " are not allowed");
@@ -2313,7 +2339,7 @@ ace.define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/
var body, flags, flagsOffset, heregex, plusToken, prev, re, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4;
heregex = match[0], body = match[1], flags = match[2];
if (0 > body.indexOf('#{')) {
- re = body.replace(HEREGEX_OMIT, '').replace(/\//g, '\\/');
+ re = this.escapeLines(body.replace(HEREGEX_OMIT, '$1$2').replace(/\//g, '\\/'), true);
if (re.match(/^\*/)) {
this.error('regular expressions cannot begin with `*`');
}
@@ -2332,7 +2358,7 @@ ace.define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/
if (tag === 'TOKENS') {
tokens.push.apply(tokens, value);
} else if (tag === 'NEOSTRING') {
- if (!(value = value.replace(HEREGEX_OMIT, ''))) {
+ if (!(value = value.replace(HEREGEX_OMIT, '$1$2'))) {
continue;
}
value = value.replace(/\\/g, '\\\\');
@@ -2385,11 +2411,17 @@ ace.define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/
this.suppressNewlines();
return indent.length;
}
+ if (!this.tokens.length) {
+ this.baseIndent = this.indent = size;
+ return indent.length;
+ }
diff = size - this.indent + this.outdebt;
this.token('INDENT', diff, indent.length - size, size);
this.indents.push(diff);
this.ends.push('OUTDENT');
this.outdebt = this.indebt = 0;
+ } else if (size < this.baseIndent) {
+ this.error('missing indentation', indent.length);
} else {
this.indebt = 0;
this.outdentToken(this.indent - size, noNewlines, indent.length);
@@ -2633,10 +2665,6 @@ ace.define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/
offsetInChunk = offsetInChunk || 0;
strOffset = strOffset || 0;
lexedLength = lexedLength || str.length;
- if (heredoc && str.length > 0 && str[0] === '\n') {
- str = str.slice(1);
- strOffset++;
- }
tokens = [];
pi = 0;
i = -1;
@@ -2794,16 +2822,31 @@ ace.define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/
return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === '?::' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS');
};
+ Lexer.prototype.removeNewlines = function(str) {
+ return str.replace(/^\s*\n\s*/, '').replace(/([^\\]|\\\\)\s*\n\s*$/, '$1');
+ };
+
Lexer.prototype.escapeLines = function(str, heredoc) {
- return str.replace(MULTILINER, heredoc ? '\\n' : '');
+ str = str.replace(/\\[^\S\n]*(\n|\\)\s*/g, function(escaped, character) {
+ if (character === '\n') {
+ return '';
+ } else {
+ return escaped;
+ }
+ });
+ if (heredoc) {
+ return str.replace(MULTILINER, '\\n');
+ } else {
+ return str.replace(/\s*\n\s*/g, ' ');
+ }
};
Lexer.prototype.makeString = function(body, quote, heredoc) {
if (!body) {
return quote + quote;
}
- body = body.replace(/\\([\s\S])/g, function(match, contents) {
- if (contents === '\n' || contents === quote) {
+ body = body.replace(RegExp("\\\\(" + quote + "|\\\\)", "g"), function(match, contents) {
+ if (contents === quote) {
return contents;
} else {
return match;
@@ -2813,10 +2856,15 @@ ace.define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/
return quote + this.escapeLines(body, heredoc) + quote;
};
- Lexer.prototype.error = function(message) {
+ Lexer.prototype.error = function(message, offset) {
+ var first_column, first_line, _ref2;
+ if (offset == null) {
+ offset = 0;
+ }
+ _ref2 = this.getLineAndColumnFromChunk(offset), first_line = _ref2[0], first_column = _ref2[1];
return throwSyntaxError(message, {
- first_line: this.chunkLine,
- first_column: this.chunkColumn
+ first_line: first_line,
+ first_column: first_column
});
};
@@ -2867,27 +2915,27 @@ ace.define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/
NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;
- HEREDOC = /^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/;
+ HEREDOC = /^("""|''')((?:\\[\s\S]|[^\\])*?)(?:\n[^\n\S]*)?\1/;
OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/;
WHITESPACE = /^[^\n\S]+/;
- COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/;
+ COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/;
CODE = /^[-=]>/;
MULTI_DENT = /^(?:\n[^\n\S]*)+/;
- SIMPLESTR = /^'[^\\']*(?:\\.[^\\']*)*'/;
+ SIMPLESTR = /^'[^\\']*(?:\\[\s\S][^\\']*)*'/;
JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/;
REGEX = /^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/;
- HEREGEX = /^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/;
+ HEREGEX = /^\/{3}((?:\\?[\s\S])+?)\/{3}([imgy]{0,4})(?!\w)/;
- HEREGEX_OMIT = /\s+(?:#.*)?/g;
+ HEREGEX_OMIT = /((?:\\\\)+)|\\(\s|\/)|\s+(?:#.*)?/g;
MULTILINER = /\n/g;
@@ -2928,728 +2976,14 @@ ace.define('ace/mode/coffee/lexer', ['require', 'exports', 'module' , 'ace/mode/
});
-ace.define('ace/mode/coffee/rewriter', ['require', 'exports', 'module' ], function(require, exports, module) {
-
- var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref,
- __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
- __slice = [].slice;
-
- generate = function(tag, value) {
- var tok;
- tok = [tag, value];
- tok.generated = true;
- return tok;
- };
-
- exports.Rewriter = (function() {
- function Rewriter() {}
-
- Rewriter.prototype.rewrite = function(tokens) {
- this.tokens = tokens;
- this.removeLeadingNewlines();
- this.removeMidExpressionNewlines();
- this.closeOpenCalls();
- this.closeOpenIndexes();
- this.addImplicitIndentation();
- this.tagPostfixConditionals();
- this.addImplicitBracesAndParens();
- this.addLocationDataToGeneratedTokens();
- return this.tokens;
- };
-
- Rewriter.prototype.scanTokens = function(block) {
- var i, token, tokens;
- tokens = this.tokens;
- i = 0;
- while (token = tokens[i]) {
- i += block.call(this, token, i, tokens);
- }
- return true;
- };
-
- Rewriter.prototype.detectEnd = function(i, condition, action) {
- var levels, token, tokens, _ref, _ref1;
- tokens = this.tokens;
- levels = 0;
- while (token = tokens[i]) {
- if (levels === 0 && condition.call(this, token, i)) {
- return action.call(this, token, i);
- }
- if (!token || levels < 0) {
- return action.call(this, token, i - 1);
- }
- if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) {
- levels += 1;
- } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) {
- levels -= 1;
- }
- i += 1;
- }
- return i - 1;
- };
-
- Rewriter.prototype.removeLeadingNewlines = function() {
- var i, tag, _i, _len, _ref;
- _ref = this.tokens;
- for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
- tag = _ref[i][0];
- if (tag !== 'TERMINATOR') {
- break;
- }
- }
- if (i) {
- return this.tokens.splice(0, i);
- }
- };
-
- Rewriter.prototype.removeMidExpressionNewlines = function() {
- return this.scanTokens(function(token, i, tokens) {
- var _ref;
- if (!(token[0] === 'TERMINATOR' && (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0))) {
- return 1;
- }
- tokens.splice(i, 1);
- return 0;
- });
- };
-
- Rewriter.prototype.closeOpenCalls = function() {
- var action, condition;
- condition = function(token, i) {
- var _ref;
- return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')';
- };
- action = function(token, i) {
- return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END';
- };
- return this.scanTokens(function(token, i) {
- if (token[0] === 'CALL_START') {
- this.detectEnd(i + 1, condition, action);
- }
- return 1;
- });
- };
-
- Rewriter.prototype.closeOpenIndexes = function() {
- var action, condition;
- condition = function(token, i) {
- var _ref;
- return (_ref = token[0]) === ']' || _ref === 'INDEX_END';
- };
- action = function(token, i) {
- return token[0] = 'INDEX_END';
- };
- return this.scanTokens(function(token, i) {
- if (token[0] === 'INDEX_START') {
- this.detectEnd(i + 1, condition, action);
- }
- return 1;
- });
- };
-
- Rewriter.prototype.matchTags = function() {
- var fuzz, i, j, pattern, _i, _ref, _ref1;
- i = arguments[0], pattern = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
- fuzz = 0;
- for (j = _i = 0, _ref = pattern.length; 0 <= _ref ? _i < _ref : _i > _ref; j = 0 <= _ref ? ++_i : --_i) {
- while (this.tag(i + j + fuzz) === 'HERECOMMENT') {
- fuzz += 2;
- }
- if (pattern[j] == null) {
- continue;
- }
- if (typeof pattern[j] === 'string') {
- pattern[j] = [pattern[j]];
- }
- if (_ref1 = this.tag(i + j + fuzz), __indexOf.call(pattern[j], _ref1) < 0) {
- return false;
- }
- }
- return true;
- };
-
- Rewriter.prototype.looksObjectish = function(j) {
- return this.matchTags(j, '@', null, ':') || this.matchTags(j, null, ':');
- };
-
- Rewriter.prototype.findTagsBackwards = function(i, tags) {
- var backStack, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
- backStack = [];
- while (i >= 0 && (backStack.length || (_ref2 = this.tag(i), __indexOf.call(tags, _ref2) < 0) && ((_ref3 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref3) < 0) || this.tokens[i].generated) && (_ref4 = this.tag(i), __indexOf.call(LINEBREAKS, _ref4) < 0))) {
- if (_ref = this.tag(i), __indexOf.call(EXPRESSION_END, _ref) >= 0) {
- backStack.push(this.tag(i));
- }
- if ((_ref1 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref1) >= 0) && backStack.length) {
- backStack.pop();
- }
- i -= 1;
- }
- return _ref5 = this.tag(i), __indexOf.call(tags, _ref5) >= 0;
- };
-
- Rewriter.prototype.addImplicitBracesAndParens = function() {
- var stack;
- stack = [];
- return this.scanTokens(function(token, i, tokens) {
- var endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, nextTag, offset, prevTag, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
- tag = token[0];
- prevTag = (i > 0 ? tokens[i - 1] : [])[0];
- nextTag = (i < tokens.length - 1 ? tokens[i + 1] : [])[0];
- stackTop = function() {
- return stack[stack.length - 1];
- };
- startIdx = i;
- forward = function(n) {
- return i - startIdx + n;
- };
- inImplicit = function() {
- var _ref, _ref1;
- return (_ref = stackTop()) != null ? (_ref1 = _ref[2]) != null ? _ref1.ours : void 0 : void 0;
- };
- inImplicitCall = function() {
- var _ref;
- return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '(';
- };
- inImplicitObject = function() {
- var _ref;
- return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '{';
- };
- inImplicitControl = function() {
- var _ref;
- return inImplicit && ((_ref = stackTop()) != null ? _ref[0] : void 0) === 'CONTROL';
- };
- startImplicitCall = function(j) {
- var idx;
- idx = j != null ? j : i;
- stack.push([
- '(', idx, {
- ours: true
- }
- ]);
- tokens.splice(idx, 0, generate('CALL_START', '('));
- if (j == null) {
- return i += 1;
- }
- };
- endImplicitCall = function() {
- stack.pop();
- tokens.splice(i, 0, generate('CALL_END', ')'));
- return i += 1;
- };
- startImplicitObject = function(j, startsLine) {
- var idx;
- if (startsLine == null) {
- startsLine = true;
- }
- idx = j != null ? j : i;
- stack.push([
- '{', idx, {
- sameLine: true,
- startsLine: startsLine,
- ours: true
- }
- ]);
- tokens.splice(idx, 0, generate('{', generate(new String('{'))));
- if (j == null) {
- return i += 1;
- }
- };
- endImplicitObject = function(j) {
- j = j != null ? j : i;
- stack.pop();
- tokens.splice(j, 0, generate('}', '}'));
- return i += 1;
- };
- if (inImplicitCall() && (tag === 'IF' || tag === 'TRY' || tag === 'FINALLY' || tag === 'CATCH' || tag === 'CLASS' || tag === 'SWITCH')) {
- stack.push([
- 'CONTROL', i, {
- ours: true
- }
- ]);
- return forward(1);
- }
- if (tag === 'INDENT' && inImplicit()) {
- if (prevTag !== '=>' && prevTag !== '->' && prevTag !== '[' && prevTag !== '(' && prevTag !== ',' && prevTag !== '{' && prevTag !== 'TRY' && prevTag !== 'ELSE' && prevTag !== '=') {
- while (inImplicitCall()) {
- endImplicitCall();
- }
- }
- if (inImplicitControl()) {
- stack.pop();
- }
- stack.push([tag, i]);
- return forward(1);
- }
- if (__indexOf.call(EXPRESSION_START, tag) >= 0) {
- stack.push([tag, i]);
- return forward(1);
- }
- if (__indexOf.call(EXPRESSION_END, tag) >= 0) {
- while (inImplicit()) {
- if (inImplicitCall()) {
- endImplicitCall();
- } else if (inImplicitObject()) {
- endImplicitObject();
- } else {
- stack.pop();
- }
- }
- stack.pop();
- }
- if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced && !token.stringEnd || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) {
- if (tag === '?') {
- tag = token[0] = 'FUNC_EXIST';
- }
- startImplicitCall(i + 1);
- return forward(2);
- }
- if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) {
- startImplicitCall(i + 1);
- stack.push(['INDENT', i + 2]);
- return forward(3);
- }
- if (tag === ':') {
- if (this.tag(i - 2) === '@') {
- s = i - 2;
- } else {
- s = i - 1;
- }
- while (this.tag(s - 2) === 'HERECOMMENT') {
- s -= 2;
- }
- startsLine = s === 0 || (_ref2 = this.tag(s - 1), __indexOf.call(LINEBREAKS, _ref2) >= 0) || tokens[s - 1].newLine;
- if (stackTop()) {
- _ref3 = stackTop(), stackTag = _ref3[0], stackIdx = _ref3[1];
- if ((stackTag === '{' || stackTag === 'INDENT' && this.tag(stackIdx - 1) === '{') && (startsLine || this.tag(s - 1) === ',' || this.tag(s - 1) === '{')) {
- return forward(1);
- }
- }
- startImplicitObject(s, !!startsLine);
- return forward(2);
- }
- if (prevTag === 'OUTDENT' && inImplicitCall() && (tag === '.' || tag === '?.' || tag === '::' || tag === '?::')) {
- endImplicitCall();
- return forward(1);
- }
- if (inImplicitObject() && __indexOf.call(LINEBREAKS, tag) >= 0) {
- stackTop()[2].sameLine = false;
- }
- if (__indexOf.call(IMPLICIT_END, tag) >= 0) {
- while (inImplicit()) {
- _ref4 = stackTop(), stackTag = _ref4[0], stackIdx = _ref4[1], (_ref5 = _ref4[2], sameLine = _ref5.sameLine, startsLine = _ref5.startsLine);
- if (inImplicitCall() && prevTag !== ',') {
- endImplicitCall();
- } else if (inImplicitObject() && sameLine && !startsLine) {
- endImplicitObject();
- } else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) {
- endImplicitObject();
- } else {
- break;
- }
- }
- }
- if (tag === ',' && !this.looksObjectish(i + 1) && inImplicitObject() && (nextTag !== 'TERMINATOR' || !this.looksObjectish(i + 2))) {
- offset = nextTag === 'OUTDENT' ? 1 : 0;
- while (inImplicitObject()) {
- endImplicitObject(i + offset);
- }
- }
- return forward(1);
- });
- };
-
- Rewriter.prototype.addLocationDataToGeneratedTokens = function() {
- return this.scanTokens(function(token, i, tokens) {
- var column, line, nextLocation, prevLocation, _ref, _ref1;
- if (token[2]) {
- return 1;
- }
- if (!(token.generated || token.explicit)) {
- return 1;
- }
- if (token[0] === '{' && (nextLocation = (_ref = tokens[i + 1]) != null ? _ref[2] : void 0)) {
- line = nextLocation.first_line, column = nextLocation.first_column;
- } else if (prevLocation = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) {
- line = prevLocation.last_line, column = prevLocation.last_column;
- } else {
- line = column = 0;
- }
- token[2] = {
- first_line: line,
- first_column: column,
- last_line: line,
- last_column: column
- };
- return 1;
- });
- };
-
- Rewriter.prototype.addImplicitIndentation = function() {
- var action, condition, indent, outdent, starter;
- starter = indent = outdent = null;
- condition = function(token, i) {
- var _ref, _ref1;
- return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref1 = token[0]) === 'CATCH' || _ref1 === 'FINALLY') && (starter === '->' || starter === '=>'));
- };
- action = function(token, i) {
- return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent);
- };
- return this.scanTokens(function(token, i, tokens) {
- var j, tag, _i, _ref, _ref1;
- tag = token[0];
- if (tag === 'TERMINATOR' && this.tag(i + 1) === 'THEN') {
- tokens.splice(i, 1);
- return 0;
- }
- if (tag === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') {
- tokens.splice.apply(tokens, [i, 0].concat(__slice.call(this.indentation())));
- return 2;
- }
- if (tag === 'CATCH') {
- for (j = _i = 1; _i <= 2; j = ++_i) {
- if (!((_ref = this.tag(i + j)) === 'OUTDENT' || _ref === 'TERMINATOR' || _ref === 'FINALLY')) {
- continue;
- }
- tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation())));
- return 2 + j;
- }
- }
- if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) {
- starter = tag;
- _ref1 = this.indentation(true), indent = _ref1[0], outdent = _ref1[1];
- if (starter === 'THEN') {
- indent.fromThen = true;
- }
- tokens.splice(i + 1, 0, indent);
- this.detectEnd(i + 2, condition, action);
- if (tag === 'THEN') {
- tokens.splice(i, 1);
- }
- return 1;
- }
- return 1;
- });
- };
-
- Rewriter.prototype.tagPostfixConditionals = function() {
- var action, condition, original;
- original = null;
- condition = function(token, i) {
- var prevTag, tag;
- tag = token[0];
- prevTag = this.tokens[i - 1][0];
- return tag === 'TERMINATOR' || (tag === 'INDENT' && __indexOf.call(SINGLE_LINERS, prevTag) < 0);
- };
- action = function(token, i) {
- if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) {
- return original[0] = 'POST_' + original[0];
- }
- };
- return this.scanTokens(function(token, i) {
- if (token[0] !== 'IF') {
- return 1;
- }
- original = token;
- this.detectEnd(i + 1, condition, action);
- return 1;
- });
- };
-
- Rewriter.prototype.indentation = function(implicit) {
- var indent, outdent;
- if (implicit == null) {
- implicit = false;
- }
- indent = ['INDENT', 2];
- outdent = ['OUTDENT', 2];
- if (implicit) {
- indent.generated = outdent.generated = true;
- }
- if (!implicit) {
- indent.explicit = outdent.explicit = true;
- }
- return [indent, outdent];
- };
-
- Rewriter.prototype.generate = generate;
-
- Rewriter.prototype.tag = function(i) {
- var _ref;
- return (_ref = this.tokens[i]) != null ? _ref[0] : void 0;
- };
-
- return Rewriter;
-
- })();
-
- BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']];
-
- exports.INVERSES = INVERSES = {};
-
- EXPRESSION_START = [];
-
- EXPRESSION_END = [];
-
- for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) {
- _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1];
- EXPRESSION_START.push(INVERSES[rite] = left);
- EXPRESSION_END.push(INVERSES[left] = rite);
- }
-
- EXPRESSION_CLOSE = ['CATCH', 'WHEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END);
-
- IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS'];
-
- IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++'];
-
- IMPLICIT_UNSPACED_CALL = ['+', '-'];
-
- IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR'];
-
- SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN'];
-
- SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN'];
-
- LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT'];
-
-
-});
-
-ace.define('ace/mode/coffee/helpers', ['require', 'exports', 'module' ], function(require, exports, module) {
-
- var buildLocationData, extend, flatten, last, repeat, _ref;
-
- exports.starts = function(string, literal, start) {
- return literal === string.substr(start, literal.length);
- };
-
- exports.ends = function(string, literal, back) {
- var len;
- len = literal.length;
- return literal === string.substr(string.length - len - (back || 0), len);
- };
-
- exports.repeat = repeat = function(str, n) {
- var res;
- res = '';
- while (n > 0) {
- if (n & 1) {
- res += str;
- }
- n >>>= 1;
- str += str;
- }
- return res;
- };
-
- exports.compact = function(array) {
- var item, _i, _len, _results;
- _results = [];
- for (_i = 0, _len = array.length; _i < _len; _i++) {
- item = array[_i];
- if (item) {
- _results.push(item);
- }
- }
- return _results;
- };
-
- exports.count = function(string, substr) {
- var num, pos;
- num = pos = 0;
- if (!substr.length) {
- return 1 / 0;
- }
- while (pos = 1 + string.indexOf(substr, pos)) {
- num++;
- }
- return num;
- };
-
- exports.merge = function(options, overrides) {
- return extend(extend({}, options), overrides);
- };
-
- extend = exports.extend = function(object, properties) {
- var key, val;
- for (key in properties) {
- val = properties[key];
- object[key] = val;
- }
- return object;
- };
-
- exports.flatten = flatten = function(array) {
- var element, flattened, _i, _len;
- flattened = [];
- for (_i = 0, _len = array.length; _i < _len; _i++) {
- element = array[_i];
- if (element instanceof Array) {
- flattened = flattened.concat(flatten(element));
- } else {
- flattened.push(element);
- }
- }
- return flattened;
- };
-
- exports.del = function(obj, key) {
- var val;
- val = obj[key];
- delete obj[key];
- return val;
- };
-
- exports.last = last = function(array, back) {
- return array[array.length - (back || 0) - 1];
- };
-
- exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) {
- var e, _i, _len;
- for (_i = 0, _len = this.length; _i < _len; _i++) {
- e = this[_i];
- if (fn(e)) {
- return true;
- }
- }
- return false;
- };
-
- exports.invertLiterate = function(code) {
- var line, lines, maybe_code;
- maybe_code = true;
- lines = (function() {
- var _i, _len, _ref1, _results;
- _ref1 = code.split('\n');
- _results = [];
- for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
- line = _ref1[_i];
- if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) {
- _results.push(line);
- } else if (maybe_code = /^\s*$/.test(line)) {
- _results.push(line);
- } else {
- _results.push('# ' + line);
- }
- }
- return _results;
- })();
- return lines.join('\n');
- };
-
- buildLocationData = function(first, last) {
- if (!last) {
- return first;
- } else {
- return {
- first_line: first.first_line,
- first_column: first.first_column,
- last_line: last.last_line,
- last_column: last.last_column
- };
- }
- };
-
- exports.addLocationDataFn = function(first, last) {
- return function(obj) {
- if (((typeof obj) === 'object') && (!!obj['updateLocationDataIfMissing'])) {
- obj.updateLocationDataIfMissing(buildLocationData(first, last));
- }
- return obj;
- };
- };
-
- exports.locationDataToString = function(obj) {
- var locationData;
- if (("2" in obj) && ("first_line" in obj[2])) {
- locationData = obj[2];
- } else if ("first_line" in obj) {
- locationData = obj;
- }
- if (locationData) {
- return ("" + (locationData.first_line + 1) + ":" + (locationData.first_column + 1) + "-") + ("" + (locationData.last_line + 1) + ":" + (locationData.last_column + 1));
- } else {
- return "No location data";
- }
- };
-
- exports.baseFileName = function(file, stripExt, useWinPathSep) {
- var parts, pathSep;
- if (stripExt == null) {
- stripExt = false;
- }
- if (useWinPathSep == null) {
- useWinPathSep = false;
- }
- pathSep = useWinPathSep ? /\\|\// : /\//;
- parts = file.split(pathSep);
- file = parts[parts.length - 1];
- if (!stripExt) {
- return file;
- }
- parts = file.split('.');
- parts.pop();
- if (parts[parts.length - 1] === 'coffee' && parts.length > 1) {
- parts.pop();
- }
- return parts.join('.');
- };
-
- exports.isCoffee = function(file) {
- return /\.((lit)?coffee|coffee\.md)$/.test(file);
- };
-
- exports.isLiterate = function(file) {
- return /\.(litcoffee|coffee\.md)$/.test(file);
- };
-
- exports.throwSyntaxError = function(message, location) {
- var error;
- if (location.last_line == null) {
- location.last_line = location.first_line;
- }
- if (location.last_column == null) {
- location.last_column = location.first_column;
- }
- error = new SyntaxError(message);
- error.location = location;
- throw error;
- };
-
- exports.prettyErrorMessage = function(error, filename, code, useColors) {
- var codeLine, colorize, end, first_column, first_line, last_column, last_line, marker, message, start, _ref1;
- if (!error.location) {
- return error.stack || ("" + error);
- }
- filename = error.filename || filename;
- code = error.code || code;
- _ref1 = error.location, first_line = _ref1.first_line, first_column = _ref1.first_column, last_line = _ref1.last_line, last_column = _ref1.last_column;
- codeLine = code.split('\n')[first_line];
- start = first_column;
- end = first_line === last_line ? last_column + 1 : codeLine.length;
- marker = repeat(' ', start) + repeat('^', end - start);
- if (useColors) {
- colorize = function(str) {
- return "\x1B[1;31m" + str + "\x1B[0m";
- };
- codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end);
- marker = colorize(marker);
- }
- message = "" + filename + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + error.message + "\n" + codeLine + "\n" + marker;
- return message;
- };
-
-
-});
-
-ace.define('ace/mode/coffee/parser', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/mode/coffee/parser",["require","exports","module"], function(require, exports, module) {
var parser = {trace: function trace() { },
yy: {},
-symbols_: {"error":2,"Root":3,"Body":4,"Block":5,"TERMINATOR":6,"Line":7,"Expression":8,"Statement":9,"Return":10,"Comment":11,"STATEMENT":12,"Value":13,"Invocation":14,"Code":15,"Operation":16,"Assign":17,"If":18,"Try":19,"While":20,"For":21,"Switch":22,"Class":23,"Throw":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"?::":69,"Index":70,"INDEX_START":71,"IndexValue":72,"INDEX_END":73,"INDEX_SOAK":74,"Slice":75,"{":76,"AssignList":77,"}":78,"CLASS":79,"EXTENDS":80,"OptFuncExist":81,"Arguments":82,"SUPER":83,"FUNC_EXIST":84,"CALL_START":85,"CALL_END":86,"ArgList":87,"THIS":88,"@":89,"[":90,"]":91,"RangeDots":92,"..":93,"Arg":94,"SimpleArgs":95,"TRY":96,"Catch":97,"FINALLY":98,"CATCH":99,"THROW":100,"(":101,")":102,"WhileSource":103,"WHILE":104,"WHEN":105,"UNTIL":106,"Loop":107,"LOOP":108,"ForBody":109,"FOR":110,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"-":128,"+":129,"--":130,"++":131,"?":132,"MATH":133,"SHIFT":134,"COMPARE":135,"LOGIC":136,"RELATION":137,"COMPOUND_ASSIGN":138,"$accept":0,"$end":1},
-terminals_: {2:"error",6:"TERMINATOR",12:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"},
-productions_: [0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[17,3],[17,4],[17,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[10,2],[10,1],[11,1],[15,5],[15,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[13,1],[13,1],[13,1],[13,1],[13,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[23,1],[23,2],[23,3],[23,4],[23,2],[23,3],[23,4],[23,5],[14,3],[14,3],[14,1],[14,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[19,2],[19,3],[19,4],[19,5],[97,3],[97,3],[97,2],[24,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[20,2],[20,2],[20,2],[20,1],[107,2],[107,2],[21,2],[21,2],[21,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[22,5],[22,7],[22,4],[22,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[18,1],[18,3],[18,3],[18,3],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,5],[16,4],[16,3]],
-performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
+symbols_: {"error":2,"Root":3,"Body":4,"Line":5,"TERMINATOR":6,"Expression":7,"Statement":8,"Return":9,"Comment":10,"STATEMENT":11,"Value":12,"Invocation":13,"Code":14,"Operation":15,"Assign":16,"If":17,"Try":18,"While":19,"For":20,"Switch":21,"Class":22,"Throw":23,"Block":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"?::":69,"Index":70,"INDEX_START":71,"IndexValue":72,"INDEX_END":73,"INDEX_SOAK":74,"Slice":75,"{":76,"AssignList":77,"}":78,"CLASS":79,"EXTENDS":80,"OptFuncExist":81,"Arguments":82,"SUPER":83,"FUNC_EXIST":84,"CALL_START":85,"CALL_END":86,"ArgList":87,"THIS":88,"@":89,"[":90,"]":91,"RangeDots":92,"..":93,"Arg":94,"SimpleArgs":95,"TRY":96,"Catch":97,"FINALLY":98,"CATCH":99,"THROW":100,"(":101,")":102,"WhileSource":103,"WHILE":104,"WHEN":105,"UNTIL":106,"Loop":107,"LOOP":108,"ForBody":109,"FOR":110,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"-":128,"+":129,"--":130,"++":131,"?":132,"MATH":133,"SHIFT":134,"COMPARE":135,"LOGIC":136,"RELATION":137,"COMPOUND_ASSIGN":138,"$accept":0,"$end":1},
+terminals_: {2:"error",6:"TERMINATOR",11:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"},
+productions_: [0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[24,2],[24,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[16,3],[16,4],[16,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[9,2],[9,1],[10,1],[14,5],[14,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[12,1],[12,1],[12,1],[12,1],[12,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[22,1],[22,2],[22,3],[22,4],[22,2],[22,3],[22,4],[22,5],[13,3],[13,3],[13,1],[13,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[18,2],[18,3],[18,4],[18,5],[97,3],[97,3],[97,2],[23,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[19,2],[19,2],[19,2],[19,1],[107,2],[107,2],[20,2],[20,2],[20,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[21,5],[21,7],[21,4],[21,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[17,1],[17,3],[17,3],[17,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,5],[15,4],[15,3]],
+performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
var $0 = $$.length - 1;
switch (yystate) {
@@ -3657,13 +2991,13 @@ case 1:return this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Block);
break;
case 2:return this.$ = $$[$0];
break;
-case 3:return this.$ = $$[$0-1];
+case 3:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(yy.Block.wrap([$$[$0]]));
break;
-case 4:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(yy.Block.wrap([$$[$0]]));
+case 4:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].push($$[$0]));
break;
-case 5:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].push($$[$0]));
+case 5:this.$ = $$[$0-1];
break;
-case 6:this.$ = $$[$0-1];
+case 6:this.$ = $$[$0];
break;
case 7:this.$ = $$[$0];
break;
@@ -3671,9 +3005,9 @@ case 8:this.$ = $$[$0];
break;
case 9:this.$ = $$[$0];
break;
-case 10:this.$ = $$[$0];
+case 10:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
break;
-case 11:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+case 11:this.$ = $$[$0];
break;
case 12:this.$ = $$[$0];
break;
@@ -3697,43 +3031,43 @@ case 21:this.$ = $$[$0];
break;
case 22:this.$ = $$[$0];
break;
-case 23:this.$ = $$[$0];
+case 23:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Block);
break;
-case 24:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Block);
+case 24:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]);
break;
-case 25:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]);
+case 25:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
break;
case 26:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
break;
case 27:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
break;
-case 28:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+case 28:this.$ = $$[$0];
break;
-case 29:this.$ = $$[$0];
+case 29:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
break;
case 30:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
break;
case 31:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
break;
-case 32:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+case 32:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Undefined);
break;
-case 33:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Undefined);
+case 33:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Null);
break;
-case 34:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Null);
+case 34:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Bool($$[$0]));
break;
-case 35:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Bool($$[$0]));
+case 35:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0]));
break;
-case 36:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0]));
+case 36:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0]));
break;
-case 37:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0]));
+case 37:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1]));
break;
-case 38:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1]));
+case 38:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
break;
-case 39:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+case 39:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], 'object'));
break;
-case 40:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], 'object'));
+case 40:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], 'object'));
break;
-case 41:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], 'object'));
+case 41:this.$ = $$[$0];
break;
case 42:this.$ = $$[$0];
break;
@@ -3741,41 +3075,41 @@ case 43:this.$ = $$[$0];
break;
case 44:this.$ = $$[$0];
break;
-case 45:this.$ = $$[$0];
+case 45:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Return($$[$0]));
break;
-case 46:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Return($$[$0]));
+case 46:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Return);
break;
-case 47:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Return);
+case 47:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Comment($$[$0]));
break;
-case 48:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Comment($$[$0]));
+case 48:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Code($$[$0-3], $$[$0], $$[$0-1]));
break;
-case 49:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Code($$[$0-3], $$[$0], $$[$0-1]));
+case 49:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Code([], $$[$0], $$[$0-1]));
break;
-case 50:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Code([], $$[$0], $$[$0-1]));
+case 50:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('func');
break;
-case 51:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('func');
+case 51:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('boundfunc');
break;
-case 52:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('boundfunc');
+case 52:this.$ = $$[$0];
break;
case 53:this.$ = $$[$0];
break;
-case 54:this.$ = $$[$0];
+case 54:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]);
break;
-case 55:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]);
+case 55:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
break;
-case 56:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
+case 56:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
break;
-case 57:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
+case 57:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
break;
-case 58:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
+case 58:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
break;
-case 59:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
+case 59:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Param($$[$0]));
break;
-case 60:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Param($$[$0]));
+case 60:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Param($$[$0-1], null, true));
break;
-case 61:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Param($$[$0-1], null, true));
+case 61:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Param($$[$0-2], $$[$0]));
break;
-case 62:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Param($$[$0-2], $$[$0]));
+case 62:this.$ = $$[$0];
break;
case 63:this.$ = $$[$0];
break;
@@ -3783,319 +3117,319 @@ case 64:this.$ = $$[$0];
break;
case 65:this.$ = $$[$0];
break;
-case 66:this.$ = $$[$0];
+case 66:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Splat($$[$0-1]));
break;
-case 67:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Splat($$[$0-1]));
+case 67:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
break;
-case 68:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+case 68:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].add($$[$0]));
break;
-case 69:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].add($$[$0]));
+case 69:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value($$[$0-1], [].concat($$[$0])));
break;
-case 70:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value($$[$0-1], [].concat($$[$0])));
+case 70:this.$ = $$[$0];
break;
case 71:this.$ = $$[$0];
break;
-case 72:this.$ = $$[$0];
+case 72:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
break;
case 73:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
break;
-case 74:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+case 74:this.$ = $$[$0];
break;
-case 75:this.$ = $$[$0];
+case 75:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
break;
case 76:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
break;
case 77:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
break;
-case 78:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
-break;
-case 79:this.$ = $$[$0];
+case 78:this.$ = $$[$0];
break;
-case 80:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0]));
+case 79:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0]));
break;
-case 81:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0], 'soak'));
+case 80:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0], 'soak'));
break;
-case 82:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'))), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]);
+case 81:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'))), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]);
break;
-case 83:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'), 'soak')), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]);
+case 82:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'), 'soak')), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]);
break;
-case 84:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Access(new yy.Literal('prototype')));
+case 83:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Access(new yy.Literal('prototype')));
break;
-case 85:this.$ = $$[$0];
+case 84:this.$ = $$[$0];
break;
-case 86:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]);
+case 85:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]);
break;
-case 87:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(yy.extend($$[$0], {
+case 86:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(yy.extend($$[$0], {
soak: true
}));
break;
-case 88:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Index($$[$0]));
+case 87:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Index($$[$0]));
break;
-case 89:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Slice($$[$0]));
+case 88:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Slice($$[$0]));
break;
-case 90:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Obj($$[$0-2], $$[$0-3].generated));
+case 89:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Obj($$[$0-2], $$[$0-3].generated));
break;
-case 91:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]);
+case 90:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]);
break;
-case 92:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
+case 91:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
break;
-case 93:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
+case 92:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
break;
-case 94:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
+case 93:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
break;
-case 95:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
+case 94:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
break;
-case 96:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Class);
+case 95:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Class);
break;
-case 97:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class(null, null, $$[$0]));
+case 96:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class(null, null, $$[$0]));
break;
-case 98:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class(null, $$[$0]));
+case 97:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class(null, $$[$0]));
break;
-case 99:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class(null, $$[$0-1], $$[$0]));
+case 98:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class(null, $$[$0-1], $$[$0]));
break;
-case 100:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class($$[$0]));
+case 99:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class($$[$0]));
break;
-case 101:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class($$[$0-1], null, $$[$0]));
+case 100:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class($$[$0-1], null, $$[$0]));
break;
-case 102:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class($$[$0-2], $$[$0]));
+case 101:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class($$[$0-2], $$[$0]));
break;
-case 103:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Class($$[$0-3], $$[$0-1], $$[$0]));
+case 102:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Class($$[$0-3], $$[$0-1], $$[$0]));
+break;
+case 103:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1]));
break;
case 104:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1]));
break;
-case 105:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1]));
+case 105:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))]));
break;
-case 106:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))]));
+case 106:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Call('super', $$[$0]));
break;
-case 107:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Call('super', $$[$0]));
+case 107:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(false);
break;
-case 108:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(false);
+case 108:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(true);
break;
-case 109:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(true);
+case 109:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([]);
break;
-case 110:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([]);
+case 110:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]);
break;
-case 111:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]);
+case 111:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this')));
break;
case 112:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this')));
break;
-case 113:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this')));
+case 113:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('this')), [yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))], 'this'));
break;
-case 114:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('this')), [yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))], 'this'));
+case 114:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Arr([]));
break;
-case 115:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Arr([]));
+case 115:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Arr($$[$0-2]));
break;
-case 116:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Arr($$[$0-2]));
+case 116:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('inclusive');
break;
-case 117:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('inclusive');
+case 117:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('exclusive');
break;
-case 118:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('exclusive');
+case 118:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Range($$[$0-3], $$[$0-1], $$[$0-2]));
break;
-case 119:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Range($$[$0-3], $$[$0-1], $$[$0-2]));
+case 119:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Range($$[$0-2], $$[$0], $$[$0-1]));
break;
-case 120:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Range($$[$0-2], $$[$0], $$[$0-1]));
+case 120:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range($$[$0-1], null, $$[$0]));
break;
-case 121:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range($$[$0-1], null, $$[$0]));
+case 121:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range(null, $$[$0], $$[$0-1]));
break;
-case 122:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range(null, $$[$0], $$[$0-1]));
+case 122:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Range(null, null, $$[$0]));
break;
-case 123:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Range(null, null, $$[$0]));
+case 123:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
break;
-case 124:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
+case 124:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
break;
-case 125:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
+case 125:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
break;
-case 126:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
+case 126:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]);
break;
-case 127:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]);
+case 127:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
break;
-case 128:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
+case 128:this.$ = $$[$0];
break;
case 129:this.$ = $$[$0];
break;
case 130:this.$ = $$[$0];
break;
-case 131:this.$ = $$[$0];
-break;
-case 132:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([].concat($$[$0-2], $$[$0]));
+case 131:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([].concat($$[$0-2], $$[$0]));
break;
-case 133:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Try($$[$0]));
+case 132:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Try($$[$0]));
break;
-case 134:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Try($$[$0-1], $$[$0][0], $$[$0][1]));
+case 133:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Try($$[$0-1], $$[$0][0], $$[$0][1]));
break;
-case 135:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Try($$[$0-2], null, null, $$[$0]));
+case 134:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Try($$[$0-2], null, null, $$[$0]));
break;
-case 136:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0]));
+case 135:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0]));
break;
-case 137:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]);
+case 136:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]);
break;
-case 138:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]);
+case 137:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]);
break;
-case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]);
+case 138:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]);
break;
-case 140:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0]));
+case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0]));
break;
-case 141:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1]));
+case 140:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1]));
break;
-case 142:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2]));
+case 141:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2]));
break;
-case 143:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0]));
+case 142:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0]));
break;
-case 144:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], {
+case 143:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], {
guard: $$[$0]
}));
break;
-case 145:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], {
+case 144:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], {
invert: true
}));
break;
-case 146:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], {
+case 145:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], {
invert: true,
guard: $$[$0]
}));
break;
-case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0]));
+case 146:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0]));
+break;
+case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]]))));
break;
case 148:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]]))));
break;
-case 149:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]]))));
+case 149:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]);
break;
-case 150:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]);
+case 150:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0]));
break;
-case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0]));
+case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]]))));
break;
-case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]]))));
+case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0]));
break;
case 153:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0]));
break;
-case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0]));
-break;
-case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1]));
+case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1]));
break;
-case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
+case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0]))
});
break;
-case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () {
+case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () {
$$[$0].own = $$[$0-1].own;
$$[$0].name = $$[$0-1][0];
$$[$0].index = $$[$0-1][1];
return $$[$0];
}()));
break;
-case 158:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]);
+case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]);
break;
-case 159:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {
+case 158:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {
$$[$0].own = true;
return $$[$0];
}()));
break;
+case 159:this.$ = $$[$0];
+break;
case 160:this.$ = $$[$0];
break;
-case 161:this.$ = $$[$0];
+case 161:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
break;
case 162:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
break;
-case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
-break;
-case 164:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
+case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
break;
-case 165:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]);
+case 164:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]);
break;
-case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
+case 165:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
source: $$[$0]
});
break;
-case 167:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
+case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
source: $$[$0],
object: true
});
break;
-case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
+case 167:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
source: $$[$0-2],
guard: $$[$0]
});
break;
-case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
+case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
source: $$[$0-2],
guard: $$[$0],
object: true
});
break;
-case 170:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
+case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
source: $$[$0-2],
step: $$[$0]
});
break;
-case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({
+case 170:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({
source: $$[$0-4],
guard: $$[$0-2],
step: $$[$0]
});
break;
-case 172:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({
+case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({
source: $$[$0-4],
step: $$[$0-2],
guard: $$[$0]
});
break;
-case 173:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1]));
+case 172:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1]));
break;
-case 174:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1]));
+case 173:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1]));
break;
-case 175:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1]));
+case 174:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1]));
break;
-case 176:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1]));
+case 175:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1]));
break;
-case 177:this.$ = $$[$0];
+case 176:this.$ = $$[$0];
break;
-case 178:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0]));
+case 177:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0]));
break;
-case 179:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]);
+case 178:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]);
break;
-case 180:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]);
+case 179:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]);
break;
-case 181:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], {
+case 180:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], {
type: $$[$0-2]
}));
break;
-case 182:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(new yy.If($$[$0-1], $$[$0], {
+case 181:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], {
type: $$[$0-2]
- })));
+ }))));
break;
-case 183:this.$ = $$[$0];
+case 182:this.$ = $$[$0];
break;
-case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0]));
+case 183:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0]));
break;
-case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), {
+case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), {
type: $$[$0-1],
statement: true
}));
break;
-case 186:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), {
+case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), {
type: $$[$0-1],
statement: true
}));
break;
-case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0]));
+case 186:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0]));
break;
-case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0]));
+case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0]));
break;
-case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0]));
+case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0]));
break;
-case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0]));
+case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0]));
break;
-case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0]));
+case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0]));
break;
-case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true));
+case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true));
break;
-case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true));
+case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true));
break;
-case 194:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1]));
+case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1]));
break;
-case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0]));
+case 194:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0]));
break;
-case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0]));
+case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0]));
+break;
+case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
break;
case 197:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
break;
@@ -4103,9 +3437,7 @@ case 198:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[
break;
case 199:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
break;
-case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
-break;
-case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {
+case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {
if ($$[$0-1].charAt(0) === '!') {
return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert();
} else {
@@ -4113,36 +3445,44 @@ case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {
}
}()));
break;
-case 202:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1]));
+case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1]));
break;
-case 203:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3]));
+case 202:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3]));
break;
-case 204:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2]));
+case 203:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2]));
break;
-case 205:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0]));
+case 204:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0]));
break;
}
},
-table: [{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[3]},{1:[2,2],6:[1,74]},{6:[1,75]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{4:77,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[1,76],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,12],74:[1,101],78:[2,12],81:92,84:[1,94],85:[2,108],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,13],74:[1,101],78:[2,13],81:102,84:[1,94],85:[2,108],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,11],6:[2,11],26:[2,11],102:[2,11],104:[2,11],106:[2,11],110:[2,11],126:[2,11]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],40:[1,104],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],82:105,84:[2,106],85:[1,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{6:[2,55],25:[2,55],27:110,28:[1,73],44:111,48:107,49:[2,55],54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{5:116,25:[1,5]},{8:117,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:119,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:120,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:121,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:125,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],80:[1,129],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],130:[1,126],131:[1,127],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72],138:[1,128]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],121:[1,130],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{5:131,25:[1,5]},{5:132,25:[1,5]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{5:133,25:[1,5]},{8:134,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,135],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,96],5:136,6:[2,96],13:122,14:123,25:[1,5],26:[2,96],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,49:[2,96],54:[2,96],57:[2,96],58:47,59:48,61:138,63:25,64:26,65:27,73:[2,96],76:[1,70],78:[2,96],80:[1,137],83:[1,28],86:[2,96],88:[1,58],89:[1,59],90:[1,57],91:[2,96],93:[2,96],101:[1,56],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{8:139,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,47],6:[2,47],8:140,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,47],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,47],103:39,104:[2,47],106:[2,47],107:40,108:[1,67],109:41,110:[2,47],111:69,119:[1,42],124:37,125:[1,64],126:[2,47],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],54:[2,48],78:[2,48],102:[2,48],104:[2,48],106:[2,48],110:[2,48],126:[2,48]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[2,74],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],66:[2,35],67:[2,35],68:[2,35],69:[2,35],71:[2,35],73:[2,35],74:[2,35],78:[2,35],84:[2,35],85:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],104:[2,35],105:[2,35],106:[2,35],110:[2,35],118:[2,35],126:[2,35],128:[2,35],129:[2,35],132:[2,35],133:[2,35],134:[2,35],135:[2,35],136:[2,35],137:[2,35]},{4:141,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,142],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:143,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],27:149,28:[1,73],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113]},{25:[2,51]},{25:[2,52]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[2,71],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[2,71]},{8:150,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:151,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:152,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:153,8:154,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{27:159,28:[1,73],44:160,58:161,59:162,64:155,76:[1,70],89:[1,114],90:[1,57],113:156,114:[1,157],115:158},{112:163,116:[1,164],117:[1,165]},{6:[2,91],11:169,25:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:166,78:[2,91],89:[1,114]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],43:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],40:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],80:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],116:[2,26],117:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26],138:[2,26]},{1:[2,6],6:[2,6],7:173,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,6],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,6],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{6:[1,74],26:[1,174]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],104:[2,194],105:[2,194],106:[2,194],110:[2,194],118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[2,194],133:[2,194],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{8:175,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:176,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:177,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:178,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:179,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:180,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:181,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:182,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{8:183,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{82:184,85:[1,106]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{85:[2,109]},{27:185,28:[1,73]},{27:186,28:[1,73]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],27:187,28:[1,73],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{27:188,28:[1,73]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{8:190,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],57:[1,194],58:47,59:48,61:36,63:25,64:26,65:27,72:189,75:191,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],92:192,93:[1,193],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{70:195,71:[1,100],74:[1,101]},{82:196,85:[1,106]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{6:[1,198],8:197,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,199],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],49:[2,107],54:[2,107],57:[2,107],66:[2,107],67:[2,107],68:[2,107],69:[2,107],71:[2,107],73:[2,107],74:[2,107],78:[2,107],84:[2,107],85:[2,107],86:[2,107],91:[2,107],93:[2,107],102:[2,107],104:[2,107],105:[2,107],106:[2,107],110:[2,107],118:[2,107],126:[2,107],128:[2,107],129:[2,107],132:[2,107],133:[2,107],134:[2,107],135:[2,107],136:[2,107],137:[2,107]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[1,200],87:201,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],49:[1,203],53:205,54:[1,204]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{6:[2,60],25:[2,60],26:[2,60],40:[1,207],49:[2,60],54:[2,60],57:[1,206]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{6:[2,66],25:[2,66],26:[2,66],40:[2,66],49:[2,66],54:[2,66],57:[2,66]},{27:149,28:[1,73]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,50],6:[2,50],25:[2,50],26:[2,50],49:[2,50],54:[2,50],57:[2,50],73:[2,50],78:[2,50],86:[2,50],91:[2,50],93:[2,50],102:[2,50],104:[2,50],105:[2,50],106:[2,50],110:[2,50],118:[2,50],126:[2,50],128:[2,50],129:[2,50],132:[2,50],133:[2,50],134:[2,50],135:[2,50],136:[2,50],137:[2,50]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:87,104:[2,187],105:[2,187],106:[2,187],109:88,110:[2,187],111:69,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,78],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:87,104:[2,188],105:[2,188],106:[2,188],109:88,110:[2,188],111:69,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,78],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],73:[2,189],78:[2,189],86:[2,189],91:[2,189],93:[2,189],102:[2,189],103:87,104:[2,189],105:[2,189],106:[2,189],109:88,110:[2,189],111:69,118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[1,78],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,190],74:[2,72],78:[2,190],84:[2,72],85:[2,72],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:92,84:[1,94],85:[2,108]},{62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:102,84:[1,94],85:[2,108]},{66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],74:[2,75],84:[2,75],85:[2,75]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,191],74:[2,72],78:[2,191],84:[2,72],85:[2,72],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{6:[1,210],8:208,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,209],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:211,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:212,25:[1,5],125:[1,213]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],97:214,98:[1,215],99:[1,216],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{25:[1,217],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{120:218,122:219,123:[1,220]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],104:[2,97],105:[2,97],106:[2,97],110:[2,97],118:[2,97],126:[2,97],128:[2,97],129:[2,97],132:[2,97],133:[2,97],134:[2,97],135:[2,97],136:[2,97],137:[2,97]},{8:221,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,100],5:222,6:[2,100],25:[1,5],26:[2,100],49:[2,100],54:[2,100],57:[2,100],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,100],74:[2,72],78:[2,100],80:[1,223],84:[2,72],85:[2,72],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],73:[2,140],78:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],103:87,104:[2,140],105:[2,140],106:[2,140],109:88,110:[2,140],111:69,118:[2,140],126:[2,140],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,46],6:[2,46],26:[2,46],102:[2,46],103:87,104:[2,46],106:[2,46],109:88,110:[2,46],111:69,126:[2,46],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,74],102:[1,224]},{4:225,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,129],25:[2,129],54:[2,129],57:[1,227],91:[2,129],92:226,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{6:[2,53],25:[2,53],53:228,54:[1,229],91:[2,53]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:230,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,130],25:[2,130],26:[2,130],54:[2,130],86:[2,130],91:[2,130]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],43:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],80:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],130:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114],138:[2,114]},{5:231,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:87,104:[1,65],105:[1,232],106:[1,66],109:88,110:[1,68],111:69,118:[2,143],126:[2,143],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:87,104:[1,65],105:[1,233],106:[1,66],109:88,110:[1,68],111:69,118:[2,145],126:[2,145],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],104:[2,151],105:[2,151],106:[2,151],110:[2,151],118:[2,151],126:[2,151],128:[2,151],129:[2,151],132:[2,151],133:[2,151],134:[2,151],135:[2,151],136:[2,151],137:[2,151]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],103:87,104:[1,65],105:[2,152],106:[1,66],109:88,110:[1,68],111:69,118:[2,152],126:[2,152],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{116:[2,158],117:[2,158]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],113:234,115:158},{54:[1,235],116:[2,164],117:[2,164]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{54:[2,163],116:[2,163],117:[2,163]},{1:[2,157],6:[2,157],25:[2,157],26:[2,157],49:[2,157],54:[2,157],57:[2,157],73:[2,157],78:[2,157],86:[2,157],91:[2,157],93:[2,157],102:[2,157],104:[2,157],105:[2,157],106:[2,157],110:[2,157],118:[2,157],126:[2,157],128:[2,157],129:[2,157],132:[2,157],133:[2,157],134:[2,157],135:[2,157],136:[2,157],137:[2,157]},{8:236,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:237,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],53:238,54:[1,239],78:[2,53]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],43:[1,240],54:[2,39],78:[2,39]},{6:[2,42],25:[2,42],26:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{6:[2,45],25:[2,45],26:[2,45],43:[2,45],54:[2,45],78:[2,45]},{1:[2,5],6:[2,5],26:[2,5],102:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],49:[2,25],54:[2,25],57:[2,25],73:[2,25],78:[2,25],86:[2,25],91:[2,25],93:[2,25],98:[2,25],99:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],118:[2,25],121:[2,25],123:[2,25],126:[2,25],128:[2,25],129:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:87,104:[2,195],105:[2,195],106:[2,195],109:88,110:[2,195],111:69,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,78],133:[1,81],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:87,104:[2,196],105:[2,196],106:[2,196],109:88,110:[2,196],111:69,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,78],133:[1,81],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:87,104:[2,197],105:[2,197],106:[2,197],109:88,110:[2,197],111:69,118:[2,197],126:[2,197],128:[2,197],129:[2,197],132:[1,78],133:[2,197],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:87,104:[2,198],105:[2,198],106:[2,198],109:88,110:[2,198],111:69,118:[2,198],126:[2,198],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[2,198],135:[2,198],136:[2,198],137:[2,198]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:87,104:[2,199],105:[2,199],106:[2,199],109:88,110:[2,199],111:69,118:[2,199],126:[2,199],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,199],136:[2,199],137:[1,85]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:87,104:[2,200],105:[2,200],106:[2,200],109:88,110:[2,200],111:69,118:[2,200],126:[2,200],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[2,200],137:[1,85]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:87,104:[2,201],105:[2,201],106:[2,201],109:88,110:[2,201],111:69,118:[2,201],126:[2,201],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,201],136:[2,201],137:[2,201]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:87,104:[1,65],105:[2,186],106:[1,66],109:88,110:[1,68],111:69,118:[2,186],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:87,104:[1,65],105:[2,185],106:[1,66],109:88,110:[1,68],111:69,118:[2,185],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{73:[1,241]},{57:[1,194],73:[2,88],92:242,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{73:[2,89]},{8:243,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,123],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{12:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{12:[2,118],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],73:[2,118],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{1:[2,87],6:[2,87],25:[2,87],26:[2,87],40:[2,87],49:[2,87],54:[2,87],57:[2,87],66:[2,87],67:[2,87],68:[2,87],69:[2,87],71:[2,87],73:[2,87],74:[2,87],78:[2,87],80:[2,87],84:[2,87],85:[2,87],86:[2,87],91:[2,87],93:[2,87],102:[2,87],104:[2,87],105:[2,87],106:[2,87],110:[2,87],118:[2,87],126:[2,87],128:[2,87],129:[2,87],130:[2,87],131:[2,87],132:[2,87],133:[2,87],134:[2,87],135:[2,87],136:[2,87],137:[2,87],138:[2,87]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],84:[2,105],85:[2,105],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:87,104:[2,36],105:[2,36],106:[2,36],109:88,110:[2,36],111:69,118:[2,36],126:[2,36],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:244,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:245,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{6:[2,53],25:[2,53],53:246,54:[1,229],86:[2,53]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],57:[1,247],86:[2,129],91:[2,129],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{50:248,51:[1,60],52:[1,61]},{6:[2,54],25:[2,54],26:[2,54],27:110,28:[1,73],44:111,55:249,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[1,250],25:[1,251]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61]},{8:252,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],103:87,104:[2,202],105:[2,202],106:[2,202],109:88,110:[2,202],111:69,118:[2,202],126:[2,202],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:253,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:254,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,205],6:[2,205],25:[2,205],26:[2,205],49:[2,205],54:[2,205],57:[2,205],73:[2,205],78:[2,205],86:[2,205],91:[2,205],93:[2,205],102:[2,205],103:87,104:[2,205],105:[2,205],106:[2,205],109:88,110:[2,205],111:69,118:[2,205],126:[2,205],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],104:[2,184],105:[2,184],106:[2,184],110:[2,184],118:[2,184],126:[2,184],128:[2,184],129:[2,184],132:[2,184],133:[2,184],134:[2,184],135:[2,184],136:[2,184],137:[2,184]},{8:255,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],98:[1,256],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{5:257,25:[1,5]},{5:260,25:[1,5],27:258,28:[1,73],59:259,76:[1,70]},{120:261,122:219,123:[1,220]},{26:[1,262],121:[1,263],122:264,123:[1,220]},{26:[2,177],121:[2,177],123:[2,177]},{8:266,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],95:265,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,98],5:267,6:[2,98],25:[1,5],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],103:87,104:[1,65],105:[2,98],106:[1,66],109:88,110:[1,68],111:69,118:[2,98],126:[2,98],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],104:[2,101],105:[2,101],106:[2,101],110:[2,101],118:[2,101],126:[2,101],128:[2,101],129:[2,101],132:[2,101],133:[2,101],134:[2,101],135:[2,101],136:[2,101],137:[2,101]},{8:268,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{6:[1,74],26:[1,269]},{8:270,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,67],12:[2,118],25:[2,67],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],54:[2,67],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],91:[2,67],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{6:[1,272],25:[1,273],91:[1,271]},{6:[2,54],8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[2,54],26:[2,54],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[2,54],88:[1,58],89:[1,59],90:[1,57],91:[2,54],94:274,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],26:[2,53],53:275,54:[1,229]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{8:276,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:277,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{116:[2,159],117:[2,159]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],115:278},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:87,104:[2,166],105:[1,279],106:[2,166],109:88,110:[2,166],111:69,118:[1,280],126:[2,166],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:87,104:[2,167],105:[1,281],106:[2,167],109:88,110:[2,167],111:69,118:[2,167],126:[2,167],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,283],25:[1,284],78:[1,282]},{6:[2,54],11:169,25:[2,54],26:[2,54],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:285,42:168,44:172,46:[1,46],78:[2,54],89:[1,114]},{8:286,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,287],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{8:288,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,121],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,122],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],103:87,104:[2,37],105:[2,37],106:[2,37],109:88,110:[2,37],111:69,118:[2,37],126:[2,37],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,289],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],86:[1,290]},{6:[2,67],25:[2,67],26:[2,67],54:[2,67],86:[2,67],91:[2,67]},{5:291,25:[1,5]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{27:110,28:[1,73],44:111,55:292,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,55],25:[2,55],26:[2,55],27:110,28:[1,73],44:111,48:293,54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,62],25:[2,62],26:[2,62],49:[2,62],54:[2,62],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,294],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:87,104:[2,204],105:[2,204],106:[2,204],109:88,110:[2,204],111:69,118:[2,204],126:[2,204],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:295,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:296,25:[1,5]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{5:297,25:[1,5]},{5:298,25:[1,5]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],98:[2,139],102:[2,139],104:[2,139],105:[2,139],106:[2,139],110:[2,139],118:[2,139],126:[2,139],128:[2,139],129:[2,139],132:[2,139],133:[2,139],134:[2,139],135:[2,139],136:[2,139],137:[2,139]},{26:[1,299],121:[1,300],122:264,123:[1,220]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{5:301,25:[1,5]},{26:[2,178],121:[2,178],123:[2,178]},{5:302,25:[1,5],54:[1,303]},{25:[2,131],54:[2,131],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],49:[2,99],54:[2,99],57:[2,99],73:[2,99],78:[2,99],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,102],5:304,6:[2,102],25:[1,5],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],103:87,104:[1,65],105:[2,102],106:[1,66],109:88,110:[1,68],111:69,118:[2,102],126:[2,102],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{102:[1,305]},{91:[1,306],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,116],6:[2,116],25:[2,116],26:[2,116],40:[2,116],49:[2,116],54:[2,116],57:[2,116],66:[2,116],67:[2,116],68:[2,116],69:[2,116],71:[2,116],73:[2,116],74:[2,116],78:[2,116],84:[2,116],85:[2,116],86:[2,116],91:[2,116],93:[2,116],102:[2,116],104:[2,116],105:[2,116],106:[2,116],110:[2,116],116:[2,116],117:[2,116],118:[2,116],126:[2,116],128:[2,116],129:[2,116],132:[2,116],133:[2,116],134:[2,116],135:[2,116],136:[2,116],137:[2,116]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],94:307,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:308,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[1,272],25:[1,273],26:[1,309]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:87,104:[1,65],105:[2,144],106:[1,66],109:88,110:[1,68],111:69,118:[2,144],126:[2,144],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],103:87,104:[1,65],105:[2,146],106:[1,66],109:88,110:[1,68],111:69,118:[2,146],126:[2,146],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{116:[2,165],117:[2,165]},{8:310,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:311,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:312,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,90],6:[2,90],25:[2,90],26:[2,90],40:[2,90],49:[2,90],54:[2,90],57:[2,90],66:[2,90],67:[2,90],68:[2,90],69:[2,90],71:[2,90],73:[2,90],74:[2,90],78:[2,90],84:[2,90],85:[2,90],86:[2,90],91:[2,90],93:[2,90],102:[2,90],104:[2,90],105:[2,90],106:[2,90],110:[2,90],116:[2,90],117:[2,90],118:[2,90],126:[2,90],128:[2,90],129:[2,90],132:[2,90],133:[2,90],134:[2,90],135:[2,90],136:[2,90],137:[2,90]},{11:169,27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:313,42:168,44:172,46:[1,46],89:[1,114]},{6:[2,91],11:169,25:[2,91],26:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:314,89:[1,114]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:315,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,120],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,38],6:[2,38],25:[2,38],26:[2,38],49:[2,38],54:[2,38],57:[2,38],73:[2,38],78:[2,38],86:[2,38],91:[2,38],93:[2,38],102:[2,38],104:[2,38],105:[2,38],106:[2,38],110:[2,38],118:[2,38],126:[2,38],128:[2,38],129:[2,38],132:[2,38],133:[2,38],134:[2,38],135:[2,38],136:[2,38],137:[2,38]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{6:[2,53],25:[2,53],26:[2,53],53:316,54:[1,204]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],104:[2,203],105:[2,203],106:[2,203],110:[2,203],118:[2,203],126:[2,203],128:[2,203],129:[2,203],132:[2,203],133:[2,203],134:[2,203],135:[2,203],136:[2,203],137:[2,203]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[2,182],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{5:317,25:[1,5]},{26:[1,318]},{6:[1,319],26:[2,179],121:[2,179],123:[2,179]},{8:320,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],73:[2,103],78:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],66:[2,142],67:[2,142],68:[2,142],69:[2,142],71:[2,142],73:[2,142],74:[2,142],78:[2,142],84:[2,142],85:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],104:[2,142],105:[2,142],106:[2,142],110:[2,142],118:[2,142],126:[2,142],128:[2,142],129:[2,142],132:[2,142],133:[2,142],134:[2,142],135:[2,142],136:[2,142],137:[2,142]},{1:[2,119],6:[2,119],25:[2,119],26:[2,119],49:[2,119],54:[2,119],57:[2,119],66:[2,119],67:[2,119],68:[2,119],69:[2,119],71:[2,119],73:[2,119],74:[2,119],78:[2,119],84:[2,119],85:[2,119],86:[2,119],91:[2,119],93:[2,119],102:[2,119],104:[2,119],105:[2,119],106:[2,119],110:[2,119],118:[2,119],126:[2,119],128:[2,119],129:[2,119],132:[2,119],133:[2,119],134:[2,119],135:[2,119],136:[2,119],137:[2,119]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{6:[2,53],25:[2,53],26:[2,53],53:321,54:[1,229]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:87,104:[2,168],105:[2,168],106:[2,168],109:88,110:[2,168],111:69,118:[1,322],126:[2,168],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:87,104:[2,170],105:[1,323],106:[2,170],109:88,110:[2,170],111:69,118:[2,170],126:[2,170],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:87,104:[2,169],105:[2,169],106:[2,169],109:88,110:[2,169],111:69,118:[2,169],126:[2,169],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]},{6:[2,53],25:[2,53],26:[2,53],53:324,54:[1,239]},{26:[1,325],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,250],25:[1,251],26:[1,326]},{26:[1,327]},{1:[2,176],6:[2,176],25:[2,176],26:[2,176],49:[2,176],54:[2,176],57:[2,176],73:[2,176],78:[2,176],86:[2,176],91:[2,176],93:[2,176],102:[2,176],104:[2,176],105:[2,176],106:[2,176],110:[2,176],118:[2,176],126:[2,176],128:[2,176],129:[2,176],132:[2,176],133:[2,176],134:[2,176],135:[2,176],136:[2,176],137:[2,176]},{26:[2,180],121:[2,180],123:[2,180]},{25:[2,132],54:[2,132],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],26:[1,328]},{8:329,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:330,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[1,283],25:[1,284],26:[1,331]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,59],25:[2,59],26:[2,59],49:[2,59],54:[2,59]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],86:[2,128],91:[2,128]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:87,104:[2,171],105:[2,171],106:[2,171],109:88,110:[2,171],111:69,118:[2,171],126:[2,171],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],103:87,104:[2,172],105:[2,172],106:[2,172],109:88,110:[2,172],111:69,118:[2,172],126:[2,172],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,95],25:[2,95],26:[2,95],54:[2,95],78:[2,95]}],
-defaultActions: {60:[2,51],61:[2,52],75:[2,3],94:[2,109],191:[2,89]},
+table: [{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[3]},{1:[2,2],6:[1,72]},{1:[2,3],6:[2,3],26:[2,3],102:[2,3]},{1:[2,6],6:[2,6],26:[2,6],102:[2,6],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,11],6:[2,11],25:[2,11],26:[2,11],49:[2,11],54:[2,11],57:[2,11],62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,11],74:[1,96],78:[2,11],81:87,84:[1,89],85:[2,107],86:[2,11],91:[2,11],93:[2,11],102:[2,11],104:[2,11],105:[2,11],106:[2,11],110:[2,11],118:[2,11],126:[2,11],128:[2,11],129:[2,11],132:[2,11],133:[2,11],134:[2,11],135:[2,11],136:[2,11],137:[2,11]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,12],74:[1,96],78:[2,12],81:97,84:[1,89],85:[2,107],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],73:[2,13],78:[2,13],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],104:[2,8],106:[2,8],110:[2,8],126:[2,8]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[1,99],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],82:100,84:[2,105],85:[1,101],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{6:[2,54],25:[2,54],27:105,28:[1,71],44:106,48:102,49:[2,54],54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{24:111,25:[1,112]},{7:113,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:115,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:116,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:117,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:121,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[1,125],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[1,122],131:[1,123],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[1,124]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[1,126],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{24:127,25:[1,112]},{24:128,25:[1,112]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{24:129,25:[1,112]},{7:130,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,131],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,95],6:[2,95],12:118,13:119,24:132,25:[1,112],26:[2,95],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,49:[2,95],54:[2,95],57:[2,95],58:45,59:46,61:134,63:23,64:24,65:25,73:[2,95],76:[1,68],78:[2,95],80:[1,133],83:[1,26],86:[2,95],88:[1,56],89:[1,57],90:[1,55],91:[2,95],93:[2,95],101:[1,54],102:[2,95],104:[2,95],105:[2,95],106:[2,95],110:[2,95],118:[2,95],126:[2,95],128:[2,95],129:[2,95],132:[2,95],133:[2,95],134:[2,95],135:[2,95],136:[2,95],137:[2,95]},{7:135,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,46],6:[2,46],7:136,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,46],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,46],103:37,104:[2,46],106:[2,46],107:38,108:[1,65],109:39,110:[2,46],111:67,119:[1,40],124:35,125:[1,62],126:[2,46],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,47],6:[2,47],25:[2,47],26:[2,47],54:[2,47],78:[2,47],102:[2,47],104:[2,47],106:[2,47],110:[2,47],126:[2,47]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{4:137,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,138],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:139,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],27:145,28:[1,71],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{25:[2,50]},{25:[2,51]},{1:[2,67],6:[2,67],25:[2,67],26:[2,67],40:[2,67],49:[2,67],54:[2,67],57:[2,67],66:[2,67],67:[2,67],68:[2,67],69:[2,67],71:[2,67],73:[2,67],74:[2,67],78:[2,67],80:[2,67],84:[2,67],85:[2,67],86:[2,67],91:[2,67],93:[2,67],102:[2,67],104:[2,67],105:[2,67],106:[2,67],110:[2,67],118:[2,67],126:[2,67],128:[2,67],129:[2,67],130:[2,67],131:[2,67],132:[2,67],133:[2,67],134:[2,67],135:[2,67],136:[2,67],137:[2,67],138:[2,67]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{7:146,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:147,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:148,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:150,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:149,25:[1,112],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{27:155,28:[1,71],44:156,58:157,59:158,64:151,76:[1,68],89:[1,109],90:[1,55],113:152,114:[1,153],115:154},{112:159,116:[1,160],117:[1,161]},{6:[2,90],10:165,25:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:162,78:[2,90],89:[1,109]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],40:[2,25],43:[2,25],49:[2,25],54:[2,25],57:[2,25],66:[2,25],67:[2,25],68:[2,25],69:[2,25],71:[2,25],73:[2,25],74:[2,25],78:[2,25],80:[2,25],84:[2,25],85:[2,25],86:[2,25],91:[2,25],93:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],116:[2,25],117:[2,25],118:[2,25],126:[2,25],128:[2,25],129:[2,25],130:[2,25],131:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25],138:[2,25]},{1:[2,5],5:169,6:[2,5],7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,5],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,5],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{7:170,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:171,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:172,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:173,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:174,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:175,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:176,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:177,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{7:178,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],104:[2,152],105:[2,152],106:[2,152],110:[2,152],118:[2,152],126:[2,152],128:[2,152],129:[2,152],132:[2,152],133:[2,152],134:[2,152],135:[2,152],136:[2,152],137:[2,152]},{82:179,85:[1,101]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{85:[2,108]},{27:180,28:[1,71]},{27:181,28:[1,71]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],27:182,28:[1,71],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{27:183,28:[1,71]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{7:185,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],57:[1,189],58:45,59:46,61:34,63:23,64:24,65:25,72:184,75:186,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],92:187,93:[1,188],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{70:190,71:[1,95],74:[1,96]},{82:191,85:[1,101]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{6:[1,193],7:192,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,194],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],84:[2,106],85:[2,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[1,195],87:196,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],49:[1,198],53:200,54:[1,199]},{6:[2,55],25:[2,55],26:[2,55],49:[2,55],54:[2,55]},{6:[2,59],25:[2,59],26:[2,59],40:[1,202],49:[2,59],54:[2,59],57:[1,201]},{6:[2,62],25:[2,62],26:[2,62],40:[2,62],49:[2,62],54:[2,62],57:[2,62]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{27:145,28:[1,71]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{4:204,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[1,203],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:82,104:[2,186],105:[2,186],106:[2,186],109:83,110:[2,186],111:67,118:[2,186],126:[2,186],128:[2,186],129:[2,186],132:[1,73],133:[2,186],134:[2,186],135:[2,186],136:[2,186],137:[2,186]},{103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:82,104:[2,187],105:[2,187],106:[2,187],109:83,110:[2,187],111:67,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,73],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:82,104:[2,188],105:[2,188],106:[2,188],109:83,110:[2,188],111:67,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,73],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,189],74:[2,71],78:[2,189],84:[2,71],85:[2,71],86:[2,189],91:[2,189],93:[2,189],102:[2,189],104:[2,189],105:[2,189],106:[2,189],110:[2,189],118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[2,189],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:87,84:[1,89],85:[2,107]},{62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:97,84:[1,89],85:[2,107]},{66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],74:[2,74],84:[2,74],85:[2,74]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,190],74:[2,71],78:[2,190],84:[2,71],85:[2,71],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],73:[2,191],78:[2,191],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{6:[1,207],7:205,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,206],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:208,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{24:209,25:[1,112],125:[1,210]},{1:[2,132],6:[2,132],25:[2,132],26:[2,132],49:[2,132],54:[2,132],57:[2,132],73:[2,132],78:[2,132],86:[2,132],91:[2,132],93:[2,132],97:211,98:[1,212],99:[1,213],102:[2,132],104:[2,132],105:[2,132],106:[2,132],110:[2,132],118:[2,132],126:[2,132],128:[2,132],129:[2,132],132:[2,132],133:[2,132],134:[2,132],135:[2,132],136:[2,132],137:[2,132]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],104:[2,146],105:[2,146],106:[2,146],110:[2,146],118:[2,146],126:[2,146],128:[2,146],129:[2,146],132:[2,146],133:[2,146],134:[2,146],135:[2,146],136:[2,146],137:[2,146]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{25:[1,214],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{120:215,122:216,123:[1,217]},{1:[2,96],6:[2,96],25:[2,96],26:[2,96],49:[2,96],54:[2,96],57:[2,96],73:[2,96],78:[2,96],86:[2,96],91:[2,96],93:[2,96],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{7:218,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,99],6:[2,99],24:219,25:[1,112],26:[2,99],49:[2,99],54:[2,99],57:[2,99],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,99],74:[2,71],78:[2,99],80:[1,220],84:[2,71],85:[2,71],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],102:[2,139],103:82,104:[2,139],105:[2,139],106:[2,139],109:83,110:[2,139],111:67,118:[2,139],126:[2,139],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,45],6:[2,45],26:[2,45],102:[2,45],103:82,104:[2,45],106:[2,45],109:83,110:[2,45],111:67,126:[2,45],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,72],102:[1,221]},{4:222,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,128],25:[2,128],54:[2,128],57:[1,224],91:[2,128],92:223,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114]},{6:[2,52],25:[2,52],53:225,54:[1,226],91:[2,52]},{6:[2,123],25:[2,123],26:[2,123],54:[2,123],86:[2,123],91:[2,123]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:227,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],86:[2,129],91:[2,129]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],40:[2,113],43:[2,113],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],80:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],116:[2,113],117:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113],138:[2,113]},{24:228,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],73:[2,142],78:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],103:82,104:[1,63],105:[1,229],106:[1,64],109:83,110:[1,66],111:67,118:[2,142],126:[2,142],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:82,104:[1,63],105:[1,230],106:[1,64],109:83,110:[1,66],111:67,118:[2,144],126:[2,144],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],103:82,104:[1,63],105:[2,151],106:[1,64],109:83,110:[1,66],111:67,118:[2,151],126:[2,151],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{116:[2,157],117:[2,157]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],113:231,115:154},{54:[1,232],116:[2,163],117:[2,163]},{54:[2,159],116:[2,159],117:[2,159]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{7:233,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:234,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],53:235,54:[1,236],78:[2,52]},{6:[2,91],25:[2,91],26:[2,91],54:[2,91],78:[2,91]},{6:[2,38],25:[2,38],26:[2,38],43:[1,237],54:[2,38],78:[2,38]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,42],25:[2,42],26:[2,42],43:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],103:82,104:[2,194],105:[2,194],106:[2,194],109:83,110:[2,194],111:67,118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[1,73],133:[1,76],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:82,104:[2,195],105:[2,195],106:[2,195],109:83,110:[2,195],111:67,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,73],133:[1,76],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:82,104:[2,196],105:[2,196],106:[2,196],109:83,110:[2,196],111:67,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,73],133:[2,196],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:82,104:[2,197],105:[2,197],106:[2,197],109:83,110:[2,197],111:67,118:[2,197],126:[2,197],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:82,104:[2,198],105:[2,198],106:[2,198],109:83,110:[2,198],111:67,118:[2,198],126:[2,198],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,198],136:[2,198],137:[1,80]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:82,104:[2,199],105:[2,199],106:[2,199],109:83,110:[2,199],111:67,118:[2,199],126:[2,199],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[2,199],137:[1,80]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:82,104:[2,200],105:[2,200],106:[2,200],109:83,110:[2,200],111:67,118:[2,200],126:[2,200],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,200],136:[2,200],137:[2,200]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:82,104:[1,63],105:[2,185],106:[1,64],109:83,110:[1,66],111:67,118:[2,185],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],103:82,104:[1,63],105:[2,184],106:[1,64],109:83,110:[1,66],111:67,118:[2,184],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],66:[2,103],67:[2,103],68:[2,103],69:[2,103],71:[2,103],73:[2,103],74:[2,103],78:[2,103],84:[2,103],85:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],40:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],80:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],130:[2,79],131:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79],138:[2,79]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{73:[1,238]},{57:[1,189],73:[2,87],92:239,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{73:[2,88]},{7:240,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,122],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{11:[2,116],28:[2,116],30:[2,116],31:[2,116],33:[2,116],34:[2,116],35:[2,116],36:[2,116],37:[2,116],38:[2,116],45:[2,116],46:[2,116],47:[2,116],51:[2,116],52:[2,116],73:[2,116],76:[2,116],79:[2,116],83:[2,116],88:[2,116],89:[2,116],90:[2,116],96:[2,116],100:[2,116],101:[2,116],104:[2,116],106:[2,116],108:[2,116],110:[2,116],119:[2,116],125:[2,116],127:[2,116],128:[2,116],129:[2,116],130:[2,116],131:[2,116]},{11:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],73:[2,35],78:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],103:82,104:[2,35],105:[2,35],106:[2,35],109:83,110:[2,35],111:67,118:[2,35],126:[2,35],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:241,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:242,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,109],6:[2,109],25:[2,109],26:[2,109],49:[2,109],54:[2,109],57:[2,109],66:[2,109],67:[2,109],68:[2,109],69:[2,109],71:[2,109],73:[2,109],74:[2,109],78:[2,109],84:[2,109],85:[2,109],86:[2,109],91:[2,109],93:[2,109],102:[2,109],104:[2,109],105:[2,109],106:[2,109],110:[2,109],118:[2,109],126:[2,109],128:[2,109],129:[2,109],132:[2,109],133:[2,109],134:[2,109],135:[2,109],136:[2,109],137:[2,109]},{6:[2,52],25:[2,52],53:243,54:[1,226],86:[2,52]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],57:[1,244],86:[2,128],91:[2,128],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{50:245,51:[1,58],52:[1,59]},{6:[2,53],25:[2,53],26:[2,53],27:105,28:[1,71],44:106,55:246,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[1,247],25:[1,248]},{6:[2,60],25:[2,60],26:[2,60],49:[2,60],54:[2,60]},{7:249,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],98:[2,23],99:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],121:[2,23],123:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{6:[1,72],26:[1,250]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:82,104:[2,201],105:[2,201],106:[2,201],109:83,110:[2,201],111:67,118:[2,201],126:[2,201],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:251,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:252,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:82,104:[2,204],105:[2,204],106:[2,204],109:83,110:[2,204],111:67,118:[2,204],126:[2,204],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{7:253,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],98:[1,254],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{24:255,25:[1,112]},{24:258,25:[1,112],27:256,28:[1,71],59:257,76:[1,68]},{120:259,122:216,123:[1,217]},{26:[1,260],121:[1,261],122:262,123:[1,217]},{26:[2,176],121:[2,176],123:[2,176]},{7:264,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],95:263,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,97],6:[2,97],24:265,25:[1,112],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],103:82,104:[1,63],105:[2,97],106:[1,64],109:83,110:[1,66],111:67,118:[2,97],126:[2,97],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,100],6:[2,100],25:[2,100],26:[2,100],49:[2,100],54:[2,100],57:[2,100],73:[2,100],78:[2,100],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{7:266,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],66:[2,140],67:[2,140],68:[2,140],69:[2,140],71:[2,140],73:[2,140],74:[2,140],78:[2,140],84:[2,140],85:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],104:[2,140],105:[2,140],106:[2,140],110:[2,140],118:[2,140],126:[2,140],128:[2,140],129:[2,140],132:[2,140],133:[2,140],134:[2,140],135:[2,140],136:[2,140],137:[2,140]},{6:[1,72],26:[1,267]},{7:268,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,66],11:[2,117],25:[2,66],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],54:[2,66],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],91:[2,66],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{6:[1,270],25:[1,271],91:[1,269]},{6:[2,53],7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[2,53],26:[2,53],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[2,53],88:[1,56],89:[1,57],90:[1,55],91:[2,53],94:272,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],26:[2,52],53:273,54:[1,226]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],49:[2,180],54:[2,180],57:[2,180],73:[2,180],78:[2,180],86:[2,180],91:[2,180],93:[2,180],102:[2,180],104:[2,180],105:[2,180],106:[2,180],110:[2,180],118:[2,180],121:[2,180],126:[2,180],128:[2,180],129:[2,180],132:[2,180],133:[2,180],134:[2,180],135:[2,180],136:[2,180],137:[2,180]},{7:274,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:275,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{116:[2,158],117:[2,158]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],115:276},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],49:[2,165],54:[2,165],57:[2,165],73:[2,165],78:[2,165],86:[2,165],91:[2,165],93:[2,165],102:[2,165],103:82,104:[2,165],105:[1,277],106:[2,165],109:83,110:[2,165],111:67,118:[1,278],126:[2,165],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:82,104:[2,166],105:[1,279],106:[2,166],109:83,110:[2,166],111:67,118:[2,166],126:[2,166],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,281],25:[1,282],78:[1,280]},{6:[2,53],10:165,25:[2,53],26:[2,53],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:283,42:164,44:168,46:[1,44],78:[2,53],89:[1,109]},{7:284,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,285],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{7:286,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,120],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,121],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:82,104:[2,36],105:[2,36],106:[2,36],109:83,110:[2,36],111:67,118:[2,36],126:[2,36],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{26:[1,287],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],86:[1,288]},{6:[2,66],25:[2,66],26:[2,66],54:[2,66],86:[2,66],91:[2,66]},{24:289,25:[1,112]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{27:105,28:[1,71],44:106,55:290,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,54],25:[2,54],26:[2,54],27:105,28:[1,71],44:106,48:291,54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{26:[1,292],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],103:82,104:[2,203],105:[2,203],106:[2,203],109:83,110:[2,203],111:67,118:[2,203],126:[2,203],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:293,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:294,25:[1,112]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{24:295,25:[1,112]},{24:296,25:[1,112]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{26:[1,297],121:[1,298],122:262,123:[1,217]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{24:299,25:[1,112]},{26:[2,177],121:[2,177],123:[2,177]},{24:300,25:[1,112],54:[1,301]},{25:[2,130],54:[2,130],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,98],6:[2,98],25:[2,98],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],104:[2,98],105:[2,98],106:[2,98],110:[2,98],118:[2,98],126:[2,98],128:[2,98],129:[2,98],132:[2,98],133:[2,98],134:[2,98],135:[2,98],136:[2,98],137:[2,98]},{1:[2,101],6:[2,101],24:302,25:[1,112],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],103:82,104:[1,63],105:[2,101],106:[1,64],109:83,110:[1,66],111:67,118:[2,101],126:[2,101],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{102:[1,303]},{91:[1,304],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],94:305,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:306,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{6:[1,270],25:[1,271],26:[1,307]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:82,104:[1,63],105:[2,143],106:[1,64],109:83,110:[1,66],111:67,118:[2,143],126:[2,143],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:82,104:[1,63],105:[2,145],106:[1,64],109:83,110:[1,66],111:67,118:[2,145],126:[2,145],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{116:[2,164],117:[2,164]},{7:308,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:309,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:310,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,89],6:[2,89],25:[2,89],26:[2,89],40:[2,89],49:[2,89],54:[2,89],57:[2,89],66:[2,89],67:[2,89],68:[2,89],69:[2,89],71:[2,89],73:[2,89],74:[2,89],78:[2,89],84:[2,89],85:[2,89],86:[2,89],91:[2,89],93:[2,89],102:[2,89],104:[2,89],105:[2,89],106:[2,89],110:[2,89],116:[2,89],117:[2,89],118:[2,89],126:[2,89],128:[2,89],129:[2,89],132:[2,89],133:[2,89],134:[2,89],135:[2,89],136:[2,89],137:[2,89]},{10:165,27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:311,42:164,44:168,46:[1,44],89:[1,109]},{6:[2,90],10:165,25:[2,90],26:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:312,89:[1,109]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],54:[2,39],78:[2,39],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:313,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,119],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],104:[2,37],105:[2,37],106:[2,37],110:[2,37],118:[2,37],126:[2,37],128:[2,37],129:[2,37],132:[2,37],133:[2,37],134:[2,37],135:[2,37],136:[2,37],137:[2,37]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],49:[2,48],54:[2,48],57:[2,48],73:[2,48],78:[2,48],86:[2,48],91:[2,48],93:[2,48],102:[2,48],104:[2,48],105:[2,48],106:[2,48],110:[2,48],118:[2,48],126:[2,48],128:[2,48],129:[2,48],132:[2,48],133:[2,48],134:[2,48],135:[2,48],136:[2,48],137:[2,48]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{6:[2,52],25:[2,52],26:[2,52],53:314,54:[1,199]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],104:[2,202],105:[2,202],106:[2,202],110:[2,202],118:[2,202],126:[2,202],128:[2,202],129:[2,202],132:[2,202],133:[2,202],134:[2,202],135:[2,202],136:[2,202],137:[2,202]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],98:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],104:[2,172],105:[2,172],106:[2,172],110:[2,172],118:[2,172],126:[2,172],128:[2,172],129:[2,172],132:[2,172],133:[2,172],134:[2,172],135:[2,172],136:[2,172],137:[2,172]},{24:315,25:[1,112]},{26:[1,316]},{6:[1,317],26:[2,178],121:[2,178],123:[2,178]},{7:318,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,102],6:[2,102],25:[2,102],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],104:[2,102],105:[2,102],106:[2,102],110:[2,102],118:[2,102],126:[2,102],128:[2,102],129:[2,102],132:[2,102],133:[2,102],134:[2,102],135:[2,102],136:[2,102],137:[2,102]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{1:[2,118],6:[2,118],25:[2,118],26:[2,118],49:[2,118],54:[2,118],57:[2,118],66:[2,118],67:[2,118],68:[2,118],69:[2,118],71:[2,118],73:[2,118],74:[2,118],78:[2,118],84:[2,118],85:[2,118],86:[2,118],91:[2,118],93:[2,118],102:[2,118],104:[2,118],105:[2,118],106:[2,118],110:[2,118],118:[2,118],126:[2,118],128:[2,118],129:[2,118],132:[2,118],133:[2,118],134:[2,118],135:[2,118],136:[2,118],137:[2,118]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[2,52],25:[2,52],26:[2,52],53:319,54:[1,226]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:82,104:[2,167],105:[2,167],106:[2,167],109:83,110:[2,167],111:67,118:[1,320],126:[2,167],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:82,104:[2,169],105:[1,321],106:[2,169],109:83,110:[2,169],111:67,118:[2,169],126:[2,169],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:82,104:[2,168],105:[2,168],106:[2,168],109:83,110:[2,168],111:67,118:[2,168],126:[2,168],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,52],25:[2,52],26:[2,52],53:322,54:[1,236]},{26:[1,323],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,247],25:[1,248],26:[1,324]},{26:[1,325]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{26:[2,179],121:[2,179],123:[2,179]},{25:[2,131],54:[2,131],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],26:[1,326]},{7:327,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:328,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[1,281],25:[1,282],26:[1,329]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:82,104:[2,170],105:[2,170],106:[2,170],109:83,110:[2,170],111:67,118:[2,170],126:[2,170],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:82,104:[2,171],105:[2,171],106:[2,171],109:83,110:[2,171],111:67,118:[2,171],126:[2,171],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]}],
+defaultActions: {58:[2,50],59:[2,51],89:[2,108],186:[2,88]},
parseError: function parseError(str, hash) {
- var e = new Error(str)
- e.location = hash.loc
- throw e;
+ if (hash.recoverable) {
+ this.trace(str);
+ } else {
+ var e = new Error(str)
+ e.location = hash.loc
+ throw e;
+ }
},
parse: function parse(input) {
- var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
+ var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
this.lexer.setInput(input);
this.lexer.yy = this.yy;
this.yy.lexer = this.lexer;
this.yy.parser = this;
- if (typeof this.lexer.yylloc == "undefined")
+ if (typeof this.lexer.yylloc == 'undefined') {
this.lexer.yylloc = {};
+ }
var yyloc = this.lexer.yylloc;
lstack.push(yyloc);
var ranges = this.lexer.options && this.lexer.options.ranges;
- if (typeof this.yy.parseError === "function")
+ if (typeof this.yy.parseError === 'function') {
this.parseError = this.yy.parseError;
+ } else {
+ this.parseError = Object.getPrototypeOf(this).parseError;
+ }
function popStack(n) {
stack.length = stack.length - 2 * n;
vstack.length = vstack.length - n;
@@ -4150,8 +3490,8 @@ parse: function parse(input) {
}
function lex() {
var token;
- token = self.lexer.lex() || 1;
- if (typeof token !== "number") {
+ token = self.lexer.lex() || EOF;
+ if (typeof token !== 'number') {
token = self.symbols_[token] || token;
}
return token;
@@ -4162,29 +3502,35 @@ parse: function parse(input) {
if (this.defaultActions[state]) {
action = this.defaultActions[state];
} else {
- if (symbol === null || typeof symbol == "undefined") {
+ if (symbol === null || typeof symbol == 'undefined') {
symbol = lex();
}
action = table[state] && table[state][symbol];
}
- if (typeof action === "undefined" || !action.length || !action[0]) {
- var errStr = "";
- if (!recovering) {
+ if (typeof action === 'undefined' || !action.length || !action[0]) {
+ var errStr = '';
expected = [];
- for (p in table[state])
- if (this.terminals_[p] && p > 2) {
- expected.push("'" + this.terminals_[p] + "'");
+ for (p in table[state]) {
+ if (this.terminals_[p] && p > TERROR) {
+ expected.push('\'' + this.terminals_[p] + '\'');
}
+ }
if (this.lexer.showPosition) {
- errStr = this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
+ errStr = 'Expecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
} else {
- errStr = "Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'");
+ errStr = 'Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
}
- this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
+ if (this.lexer.yylloc.first_line !== yyloc.first_line) yyloc = this.lexer.yylloc;
+ this.parseError(errStr, {
+ text: this.lexer.match,
+ token: this.terminals_[symbol] || symbol,
+ line: this.lexer.yylineno,
+ loc: yyloc,
+ expected: expected
+ });
}
- }
if (action[0] instanceof Array && action.length > 1) {
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
+ throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
}
switch (action[0]) {
case 1:
@@ -4198,8 +3544,9 @@ parse: function parse(input) {
yytext = this.lexer.yytext;
yylineno = this.lexer.yylineno;
yyloc = this.lexer.yylloc;
- if (recovering > 0)
+ if (recovering > 0) {
recovering--;
+ }
} else {
symbol = preErrorSymbol;
preErrorSymbol = null;
@@ -4208,12 +3555,20 @@ parse: function parse(input) {
case 2:
len = this.productions_[action[1]][1];
yyval.$ = vstack[vstack.length - len];
- yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};
+ yyval._$ = {
+ first_line: lstack[lstack.length - (len || 1)].first_line,
+ last_line: lstack[lstack.length - 1].last_line,
+ first_column: lstack[lstack.length - (len || 1)].first_column,
+ last_column: lstack[lstack.length - 1].last_column
+ };
if (ranges) {
- yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
+ yyval._$.range = [
+ lstack[lstack.length - (len || 1)].range[0],
+ lstack[lstack.length - 1].range[1]
+ ];
}
r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
- if (typeof r !== "undefined") {
+ if (typeof r !== 'undefined') {
return r;
}
if (len) {
@@ -4232,19 +3587,169 @@ parse: function parse(input) {
}
}
return true;
-}
-};
+}};
undefined
-function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;
+function Parser () {
+ this.yy = {};
+}
+Parser.prototype = parser;parser.Parser = Parser;
module.exports = new Parser;
});
-ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/coffee/scope', 'ace/mode/coffee/lexer', 'ace/mode/coffee/helpers'], function(require, exports, module) {
+ace.define("ace/mode/coffee/scope",["require","exports","module","ace/mode/coffee/helpers"], function(require, exports, module) {
+
+ var Scope, extend, last, _ref;
+
+ _ref = require('./helpers'), extend = _ref.extend, last = _ref.last;
+
+ exports.Scope = Scope = (function() {
+ Scope.root = null;
+
+ function Scope(parent, expressions, method) {
+ this.parent = parent;
+ this.expressions = expressions;
+ this.method = method;
+ this.variables = [
+ {
+ name: 'arguments',
+ type: 'arguments'
+ }
+ ];
+ this.positions = {};
+ if (!this.parent) {
+ Scope.root = this;
+ }
+ }
+
+ Scope.prototype.add = function(name, type, immediate) {
+ if (this.shared && !immediate) {
+ return this.parent.add(name, type, immediate);
+ }
+ if (Object.prototype.hasOwnProperty.call(this.positions, name)) {
+ return this.variables[this.positions[name]].type = type;
+ } else {
+ return this.positions[name] = this.variables.push({
+ name: name,
+ type: type
+ }) - 1;
+ }
+ };
+
+ Scope.prototype.namedMethod = function() {
+ var _ref1;
+ if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) {
+ return this.method;
+ }
+ return this.parent.namedMethod();
+ };
+
+ Scope.prototype.find = function(name) {
+ if (this.check(name)) {
+ return true;
+ }
+ this.add(name, 'var');
+ return false;
+ };
+
+ Scope.prototype.parameter = function(name) {
+ if (this.shared && this.parent.check(name, true)) {
+ return;
+ }
+ return this.add(name, 'param');
+ };
+
+ Scope.prototype.check = function(name) {
+ var _ref1;
+ return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0));
+ };
+
+ Scope.prototype.temporary = function(name, index) {
+ if (name.length > 1) {
+ return '_' + name + (index > 1 ? index - 1 : '');
+ } else {
+ return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a');
+ }
+ };
+
+ Scope.prototype.type = function(name) {
+ var v, _i, _len, _ref1;
+ _ref1 = this.variables;
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ v = _ref1[_i];
+ if (v.name === name) {
+ return v.type;
+ }
+ }
+ return null;
+ };
+
+ Scope.prototype.freeVariable = function(name, reserve) {
+ var index, temp;
+ if (reserve == null) {
+ reserve = true;
+ }
+ index = 0;
+ while (this.check((temp = this.temporary(name, index)))) {
+ index++;
+ }
+ if (reserve) {
+ this.add(temp, 'var', true);
+ }
+ return temp;
+ };
+
+ Scope.prototype.assign = function(name, value) {
+ this.add(name, {
+ value: value,
+ assigned: true
+ }, true);
+ return this.hasAssignments = true;
+ };
+
+ Scope.prototype.hasDeclarations = function() {
+ return !!this.declaredVariables().length;
+ };
+
+ Scope.prototype.declaredVariables = function() {
+ var realVars, tempVars, v, _i, _len, _ref1;
+ realVars = [];
+ tempVars = [];
+ _ref1 = this.variables;
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ v = _ref1[_i];
+ if (v.type === 'var') {
+ (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name);
+ }
+ }
+ return realVars.sort().concat(tempVars.sort());
+ };
+
+ Scope.prototype.assignedVariables = function() {
+ var v, _i, _len, _ref1, _results;
+ _ref1 = this.variables;
+ _results = [];
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ v = _ref1[_i];
+ if (v.type.assigned) {
+ _results.push("" + v.name + " = " + v.type.value);
+ }
+ }
+ return _results;
+ };
+
+ return Scope;
+
+ })();
+
+
+});
+
+ace.define("ace/mode/coffee/nodes",["require","exports","module","ace/mode/coffee/scope","ace/mode/coffee/lexer","ace/mode/coffee/helpers"], function(require, exports, module) {
- var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, CodeFragment, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, last, locationDataToString, merge, multident, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1, _ref2, _ref3,
+ var Access, Arr, Assign, Base, Block, Call, Class, Code, CodeFragment, Comment, Existence, Extends, For, HEXNUM, IDENTIFIER, IDENTIFIER_STR, IS_REGEX, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, NUMBER, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, isLiteralArguments, isLiteralThis, last, locationDataToString, merge, multident, parseNum, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
@@ -4331,12 +3836,24 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Base.prototype.compileClosure = function(o) {
- var jumpNode;
+ var args, argumentsNode, func, jumpNode, meth;
if (jumpNode = this.jumps()) {
jumpNode.error('cannot use a pure statement in an expression');
}
o.sharedScope = true;
- return Closure.wrap(this).compileNode(o);
+ func = new Code([], Block.wrap([this]));
+ args = [];
+ if ((argumentsNode = this.contains(isLiteralArguments)) || this.contains(isLiteralThis)) {
+ args = [new Literal('this')];
+ if (argumentsNode) {
+ meth = 'apply';
+ args.push(new Literal('arguments'));
+ } else {
+ meth = 'call';
+ }
+ func = new Value(func, [new Access(new Literal(meth))]);
+ }
+ return (new Call(func, args)).compileNode(o);
};
Base.prototype.cache = function(o, level, reused) {
@@ -4473,7 +3990,10 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
Base.prototype.assigns = NO;
Base.prototype.updateLocationDataIfMissing = function(locationData) {
- this.locationData || (this.locationData = locationData);
+ if (this.locationData) {
+ return this;
+ }
+ this.locationData = locationData;
return this.eachChild(function(child) {
return child.updateLocationDataIfMissing(locationData);
});
@@ -4556,12 +4076,12 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Block.prototype.jumps = function(o) {
- var exp, _i, _len, _ref2;
+ var exp, jumpNode, _i, _len, _ref2;
_ref2 = this.expressions;
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
exp = _ref2[_i];
- if (exp.jumps(o)) {
- return exp;
+ if (jumpNode = exp.jumps(o)) {
+ return jumpNode;
}
}
};
@@ -4796,8 +4316,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
__extends(Undefined, _super);
function Undefined() {
- _ref2 = Undefined.__super__.constructor.apply(this, arguments);
- return _ref2;
+ return Undefined.__super__.constructor.apply(this, arguments);
}
Undefined.prototype.isAssignable = NO;
@@ -4816,8 +4335,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
__extends(Null, _super);
function Null() {
- _ref3 = Null.__super__.constructor.apply(this, arguments);
- return _ref3;
+ return Null.__super__.constructor.apply(this, arguments);
}
Null.prototype.isAssignable = NO;
@@ -4869,8 +4387,8 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
Return.prototype.jumps = THIS;
Return.prototype.compileToFragments = function(o, level) {
- var expr, _ref4;
- expr = (_ref4 = this.expression) != null ? _ref4.makeReturn() : void 0;
+ var expr, _ref2;
+ expr = (_ref2 = this.expression) != null ? _ref2.makeReturn() : void 0;
if (expr && !(expr instanceof Return)) {
return expr.compileToFragments(o, level);
} else {
@@ -4919,8 +4437,16 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
return !!this.properties.length;
};
+ Value.prototype.bareLiteral = function(type) {
+ return !this.properties.length && this.base instanceof type;
+ };
+
Value.prototype.isArray = function() {
- return !this.properties.length && this.base instanceof Arr;
+ return this.bareLiteral(Arr);
+ };
+
+ Value.prototype.isRange = function() {
+ return this.bareLiteral(Range);
};
Value.prototype.isComplex = function() {
@@ -4932,18 +4458,22 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Value.prototype.isSimpleNumber = function() {
- return this.base instanceof Literal && SIMPLENUM.test(this.base.value);
+ return this.bareLiteral(Literal) && SIMPLENUM.test(this.base.value);
};
Value.prototype.isString = function() {
- return this.base instanceof Literal && IS_STRING.test(this.base.value);
+ return this.bareLiteral(Literal) && IS_STRING.test(this.base.value);
+ };
+
+ Value.prototype.isRegex = function() {
+ return this.bareLiteral(Literal) && IS_REGEX.test(this.base.value);
};
Value.prototype.isAtomic = function() {
- var node, _i, _len, _ref4;
- _ref4 = this.properties.concat(this.base);
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
- node = _ref4[_i];
+ var node, _i, _len, _ref2;
+ _ref2 = this.properties.concat(this.base);
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ node = _ref2[_i];
if (node.soak || node instanceof Call) {
return false;
}
@@ -4951,6 +4481,10 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
return true;
};
+ Value.prototype.isNotCallable = function() {
+ return this.isSimpleNumber() || this.isString() || this.isRegex() || this.isArray() || this.isRange() || this.isSplice() || this.isObject();
+ };
+
Value.prototype.isStatement = function(o) {
return !this.properties.length && this.base.isStatement(o);
};
@@ -4974,6 +4508,11 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
return last(this.properties) instanceof Slice;
};
+ Value.prototype.looksStatic = function(className) {
+ var _ref2;
+ return this.base.value === className && this.properties.length && ((_ref2 = this.properties[0].name) != null ? _ref2.value : void 0) !== 'prototype';
+ };
+
Value.prototype.unwrap = function() {
if (this.properties.length) {
return this;
@@ -5020,33 +4559,34 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Value.prototype.unfoldSoak = function(o) {
- var _this = this;
- return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function() {
- var fst, i, ifn, prop, ref, snd, _i, _len, _ref4, _ref5;
- if (ifn = _this.base.unfoldSoak(o)) {
- (_ref4 = ifn.body.properties).push.apply(_ref4, _this.properties);
- return ifn;
- }
- _ref5 = _this.properties;
- for (i = _i = 0, _len = _ref5.length; _i < _len; i = ++_i) {
- prop = _ref5[i];
- if (!prop.soak) {
- continue;
+ return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function(_this) {
+ return function() {
+ var fst, i, ifn, prop, ref, snd, _i, _len, _ref2, _ref3;
+ if (ifn = _this.base.unfoldSoak(o)) {
+ (_ref2 = ifn.body.properties).push.apply(_ref2, _this.properties);
+ return ifn;
}
- prop.soak = false;
- fst = new Value(_this.base, _this.properties.slice(0, i));
- snd = new Value(_this.base, _this.properties.slice(i));
- if (fst.isComplex()) {
- ref = new Literal(o.scope.freeVariable('ref'));
- fst = new Parens(new Assign(ref, fst));
- snd.base = ref;
+ _ref3 = _this.properties;
+ for (i = _i = 0, _len = _ref3.length; _i < _len; i = ++_i) {
+ prop = _ref3[i];
+ if (!prop.soak) {
+ continue;
+ }
+ prop.soak = false;
+ fst = new Value(_this.base, _this.properties.slice(0, i));
+ snd = new Value(_this.base, _this.properties.slice(i));
+ if (fst.isComplex()) {
+ ref = new Literal(o.scope.freeVariable('ref'));
+ fst = new Parens(new Assign(ref, fst));
+ snd.base = ref;
+ }
+ return new If(new Existence(fst), snd, {
+ soak: true
+ });
}
- return new If(new Existence(fst), snd, {
- soak: true
- });
- }
- return false;
- })();
+ return false;
+ };
+ })(this)();
};
return Value;
@@ -5065,12 +4605,13 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
Comment.prototype.makeReturn = THIS;
Comment.prototype.compileNode = function(o, level) {
- var code;
- code = "/*" + (multident(this.comment, this.tab)) + (__indexOf.call(this.comment, '\n') >= 0 ? "\n" + this.tab : '') + "*/\n";
+ var code, comment;
+ comment = this.comment.replace(/^(\s*)#/gm, "$1 *");
+ code = "/*" + (multident(comment, this.tab)) + (__indexOf.call(comment, '\n') >= 0 ? "\n" + this.tab : '') + " */";
if ((level || o.level) === LEVEL_TOP) {
code = o.indent + code;
}
- return [this.makeCode(code)];
+ return [this.makeCode("\n"), this.makeCode(code)];
};
return Comment;
@@ -5086,13 +4627,16 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
this.isNew = false;
this.isSuper = variable === 'super';
this.variable = this.isSuper ? null : variable;
+ if (variable instanceof Value && variable.isNotCallable()) {
+ variable.error("literal is not a function");
+ }
}
Call.prototype.children = ['variable', 'args'];
Call.prototype.newInstance = function() {
- var base, _ref4;
- base = ((_ref4 = this.variable) != null ? _ref4.base : void 0) || this.variable;
+ var base, _ref2;
+ base = ((_ref2 = this.variable) != null ? _ref2.base : void 0) || this.variable;
if (base instanceof Call && !base.isNew) {
base.newInstance();
} else {
@@ -5125,13 +4669,13 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Call.prototype.unfoldSoak = function(o) {
- var call, ifn, left, list, rite, _i, _len, _ref4, _ref5;
+ var call, ifn, left, list, rite, _i, _len, _ref2, _ref3;
if (this.soak) {
if (this.variable) {
if (ifn = unfoldSoak(o, this, 'variable')) {
return ifn;
}
- _ref4 = new Value(this.variable).cacheReference(o), left = _ref4[0], rite = _ref4[1];
+ _ref2 = new Value(this.variable).cacheReference(o), left = _ref2[0], rite = _ref2[1];
} else {
left = new Literal(this.superReference(o));
rite = new Value(left);
@@ -5159,9 +4703,9 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
break;
}
}
- _ref5 = list.reverse();
- for (_i = 0, _len = _ref5.length; _i < _len; _i++) {
- call = _ref5[_i];
+ _ref3 = list.reverse();
+ for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
+ call = _ref3[_i];
if (ifn) {
if (call.variable instanceof Call) {
call.variable = ifn;
@@ -5175,18 +4719,18 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Call.prototype.compileNode = function(o) {
- var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref4, _ref5;
- if ((_ref4 = this.variable) != null) {
- _ref4.front = this.front;
+ var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref2, _ref3;
+ if ((_ref2 = this.variable) != null) {
+ _ref2.front = this.front;
}
compiledArray = Splat.compileSplattedArray(o, this.args, true);
if (compiledArray.length) {
return this.compileSplat(o, compiledArray);
}
compiledArgs = [];
- _ref5 = this.args;
- for (argIndex = _i = 0, _len = _ref5.length; _i < _len; argIndex = ++_i) {
- arg = _ref5[argIndex];
+ _ref3 = this.args;
+ for (argIndex = _i = 0, _len = _ref3.length; _i < _len; argIndex = ++_i) {
+ arg = _ref3[argIndex];
if (argIndex) {
compiledArgs.push(this.makeCode(", "));
}
@@ -5326,23 +4870,23 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
}
Range.prototype.compileVariables = function(o) {
- var step, _ref4, _ref5, _ref6, _ref7;
+ var step, _ref2, _ref3, _ref4, _ref5;
o = merge(o, {
top: true
});
- _ref4 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref4[0], this.fromVar = _ref4[1];
- _ref5 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref5[0], this.toVar = _ref5[1];
+ _ref2 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref2[0], this.fromVar = _ref2[1];
+ _ref3 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref3[0], this.toVar = _ref3[1];
if (step = del(o, 'step')) {
- _ref6 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref6[0], this.stepVar = _ref6[1];
+ _ref4 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref4[0], this.stepVar = _ref4[1];
}
- _ref7 = [this.fromVar.match(SIMPLENUM), this.toVar.match(SIMPLENUM)], this.fromNum = _ref7[0], this.toNum = _ref7[1];
+ _ref5 = [this.fromVar.match(NUMBER), this.toVar.match(NUMBER)], this.fromNum = _ref5[0], this.toNum = _ref5[1];
if (this.stepVar) {
- return this.stepNum = this.stepVar.match(SIMPLENUM);
+ return this.stepNum = this.stepVar.match(NUMBER);
}
};
Range.prototype.compileNode = function(o) {
- var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref4, _ref5;
+ var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref2, _ref3;
if (!this.fromVar) {
this.compileVariables(o);
}
@@ -5360,8 +4904,8 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
if (this.step !== this.stepVar) {
varPart += ", " + this.step;
}
- _ref4 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref4[0], gt = _ref4[1];
- condPart = this.stepNum ? +this.stepNum > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref5 = [+this.fromNum, +this.toNum], from = _ref5[0], to = _ref5[1], _ref5), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar);
+ _ref2 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref2[0], gt = _ref2[1];
+ condPart = this.stepNum ? parseNum(this.stepNum[0]) > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref3 = [parseNum(this.fromNum[0]), parseNum(this.toNum[0])], from = _ref3[0], to = _ref3[1], _ref3), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar);
stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--";
if (namedIndex) {
varPart = "" + idxName + " = " + varPart;
@@ -5373,11 +4917,11 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Range.prototype.compileArray = function(o) {
- var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref4, _ref5, _results;
+ var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref2, _ref3, _results;
if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) {
range = (function() {
_results = [];
- for (var _i = _ref4 = +this.fromNum, _ref5 = +this.toNum; _ref4 <= _ref5 ? _i <= _ref5 : _i >= _ref5; _ref4 <= _ref5 ? _i++ : _i--){ _results.push(_i); }
+ for (var _i = _ref2 = +this.fromNum, _ref3 = +this.toNum; _ref2 <= _ref3 ? _i <= _ref3 : _i >= _ref3; _ref2 <= _ref3 ? _i++ : _i--){ _results.push(_i); }
return _results;
}).apply(this);
if (this.exclusive) {
@@ -5399,9 +4943,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
}
post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent;
hasArgs = function(node) {
- return node != null ? node.contains(function(n) {
- return n instanceof Literal && n.value === 'arguments' && !n.asKey;
- }) : void 0;
+ return node != null ? node.contains(isLiteralArguments) : void 0;
};
if (hasArgs(this.from) || hasArgs(this.to)) {
args = ', arguments';
@@ -5424,8 +4966,8 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
}
Slice.prototype.compileNode = function(o) {
- var compiled, compiledText, from, fromCompiled, to, toStr, _ref4;
- _ref4 = this.range, to = _ref4.to, from = _ref4.from;
+ var compiled, compiledText, from, fromCompiled, to, toStr, _ref2;
+ _ref2 = this.range, to = _ref2.to, from = _ref2.from;
fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')];
if (to) {
compiled = to.compileToFragments(o, LEVEL_PAREN);
@@ -5502,10 +5044,10 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Obj.prototype.assigns = function(name) {
- var prop, _i, _len, _ref4;
- _ref4 = this.properties;
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
- prop = _ref4[_i];
+ var prop, _i, _len, _ref2;
+ _ref2 = this.properties;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ prop = _ref2[_i];
if (prop.assigns(name)) {
return true;
}
@@ -5538,11 +5080,11 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
}
answer = [];
compiledObjs = (function() {
- var _i, _len, _ref4, _results;
- _ref4 = this.objects;
+ var _i, _len, _ref2, _results;
+ _ref2 = this.objects;
_results = [];
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
- obj = _ref4[_i];
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ obj = _ref2[_i];
_results.push(obj.compileToFragments(o, LEVEL_LIST));
}
return _results;
@@ -5565,10 +5107,10 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Arr.prototype.assigns = function(name) {
- var obj, _i, _len, _ref4;
- _ref4 = this.objects;
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
- obj = _ref4[_i];
+ var obj, _i, _len, _ref2;
+ _ref2 = this.objects;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ obj = _ref2[_i];
if (obj.assigns(name)) {
return true;
}
@@ -5622,10 +5164,10 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Class.prototype.addBoundFunctions = function(o) {
- var bvar, lhs, _i, _len, _ref4;
- _ref4 = this.boundFuncs;
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
- bvar = _ref4[_i];
+ var bvar, lhs, _i, _len, _ref2;
+ _ref2 = this.boundFuncs;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ bvar = _ref2[_i];
lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o);
this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)"));
}
@@ -5652,15 +5194,12 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
if (func instanceof Code) {
assign = this.ctor = func;
} else {
- this.externalCtor = o.scope.freeVariable('class');
+ this.externalCtor = o.classScope.freeVariable('class');
assign = new Assign(new Literal(this.externalCtor), func);
}
} else {
if (assign.variable["this"]) {
func["static"] = true;
- if (func.bound) {
- func.context = name;
- }
} else {
assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]);
if (func instanceof Code && func.bound) {
@@ -5678,26 +5217,29 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Class.prototype.walkBody = function(name, o) {
- var _this = this;
- return this.traverseChildren(false, function(child) {
- var cont, exps, i, node, _i, _len, _ref4;
- cont = true;
- if (child instanceof Class) {
- return false;
- }
- if (child instanceof Block) {
- _ref4 = exps = child.expressions;
- for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) {
- node = _ref4[i];
- if (node instanceof Value && node.isObject(true)) {
- cont = false;
- exps[i] = _this.addProperties(node, name, o);
+ return this.traverseChildren(false, (function(_this) {
+ return function(child) {
+ var cont, exps, i, node, _i, _len, _ref2;
+ cont = true;
+ if (child instanceof Class) {
+ return false;
+ }
+ if (child instanceof Block) {
+ _ref2 = exps = child.expressions;
+ for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
+ node = _ref2[i];
+ if (node instanceof Assign && node.variable.looksStatic(name)) {
+ node.value["static"] = true;
+ } else if (node instanceof Value && node.isObject(true)) {
+ cont = false;
+ exps[i] = _this.addProperties(node, name, o);
+ }
}
+ child.expressions = exps = flatten(exps);
}
- child.expressions = exps = flatten(exps);
- }
- return cont && !(child instanceof Class);
- });
+ return cont && !(child instanceof Class);
+ };
+ })(this));
};
Class.prototype.hoistDirectivePrologue = function() {
@@ -5710,62 +5252,53 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
return this.directives = expressions.splice(0, index);
};
- Class.prototype.ensureConstructor = function(name, o) {
- var missing, ref, superCall;
- missing = !this.ctor;
- this.ctor || (this.ctor = new Code);
- this.ctor.ctor = this.ctor.name = name;
- this.ctor.klass = null;
- this.ctor.noReturn = true;
- if (missing) {
- if (this.parent) {
- superCall = new Literal("" + name + ".__super__.constructor.apply(this, arguments)");
- }
+ Class.prototype.ensureConstructor = function(name) {
+ if (!this.ctor) {
+ this.ctor = new Code;
if (this.externalCtor) {
- superCall = new Literal("" + this.externalCtor + ".apply(this, arguments)");
- }
- if (superCall) {
- ref = new Literal(o.scope.freeVariable('ref'));
- this.ctor.body.unshift(new Assign(ref, superCall));
+ this.ctor.body.push(new Literal("" + this.externalCtor + ".apply(this, arguments)"));
+ } else if (this.parent) {
+ this.ctor.body.push(new Literal("" + name + ".__super__.constructor.apply(this, arguments)"));
}
- this.addBoundFunctions(o);
- if (superCall) {
- this.ctor.body.push(ref);
- this.ctor.body.makeReturn();
- }
- return this.body.expressions.unshift(this.ctor);
- } else {
- return this.addBoundFunctions(o);
+ this.ctor.body.makeReturn();
+ this.body.expressions.unshift(this.ctor);
}
+ this.ctor.ctor = this.ctor.name = name;
+ this.ctor.klass = null;
+ return this.ctor.noReturn = true;
};
Class.prototype.compileNode = function(o) {
- var call, decl, klass, lname, name, params, _ref4;
- decl = this.determineName();
- name = decl || '_Class';
+ var args, argumentsNode, func, jumpNode, klass, lname, name, superClass, _ref2;
+ if (jumpNode = this.body.jumps()) {
+ jumpNode.error('Class bodies cannot contain pure statements');
+ }
+ if (argumentsNode = this.body.contains(isLiteralArguments)) {
+ argumentsNode.error("Class bodies shouldn't reference arguments");
+ }
+ name = this.determineName() || '_Class';
if (name.reserved) {
name = "_" + name;
}
lname = new Literal(name);
+ func = new Code([], Block.wrap([this.body]));
+ args = [];
+ o.classScope = func.makeScope(o.scope);
this.hoistDirectivePrologue();
this.setContext(name);
this.walkBody(name, o);
- this.ensureConstructor(name, o);
+ this.ensureConstructor(name);
+ this.addBoundFunctions(o);
this.body.spaced = true;
- if (!(this.ctor instanceof Code)) {
- this.body.expressions.unshift(this.ctor);
- }
this.body.expressions.push(lname);
- (_ref4 = this.body.expressions).unshift.apply(_ref4, this.directives);
- call = Closure.wrap(this.body);
if (this.parent) {
- this.superClass = new Literal(o.scope.freeVariable('super', false));
- this.body.expressions.unshift(new Extends(lname, this.superClass));
- call.args.push(this.parent);
- params = call.variable.params || call.variable.base.params;
- params.push(new Param(this.superClass));
+ superClass = new Literal(o.classScope.freeVariable('super', false));
+ this.body.expressions.unshift(new Extends(lname, superClass));
+ func.params.push(new Param(superClass));
+ args.push(this.parent);
}
- klass = new Parens(call, true);
+ (_ref2 = this.body.expressions).unshift.apply(_ref2, this.directives);
+ klass = new Parens(new Call(func, args));
if (this.variable) {
klass = new Assign(this.variable, klass);
}
@@ -5780,13 +5313,13 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
__extends(Assign, _super);
function Assign(variable, value, context, options) {
- var forbidden, name, _ref4;
+ var forbidden, name, _ref2;
this.variable = variable;
this.value = value;
this.context = context;
this.param = options && options.param;
this.subpattern = options && options.subpattern;
- forbidden = (_ref4 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0);
+ forbidden = (_ref2 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0);
if (forbidden && this.context !== 'object') {
this.variable.error("variable name may not be \"" + name + "\"");
}
@@ -5807,7 +5340,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Assign.prototype.compileNode = function(o) {
- var answer, compiledName, isValue, match, name, val, varBase, _ref4, _ref5, _ref6, _ref7;
+ var answer, compiledName, isValue, match, name, val, varBase, _ref2, _ref3, _ref4;
if (isValue = this.variable instanceof Value) {
if (this.variable.isArray() || this.variable.isObject()) {
return this.compilePatternMatch(o);
@@ -5815,7 +5348,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
if (this.variable.isSplice()) {
return this.compileSplice(o);
}
- if ((_ref4 = this.context) === '||=' || _ref4 === '&&=' || _ref4 === '?=') {
+ if ((_ref2 = this.context) === '||=' || _ref2 === '&&=' || _ref2 === '?=') {
return this.compileConditional(o);
}
}
@@ -5835,10 +5368,10 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
}
}
if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) {
- if (match[1]) {
+ if (match[2]) {
this.value.klass = match[1];
}
- this.value.name = (_ref5 = (_ref6 = (_ref7 = match[2]) != null ? _ref7 : match[3]) != null ? _ref6 : match[4]) != null ? _ref5 : match[5];
+ this.value.name = (_ref3 = (_ref4 = match[3]) != null ? _ref4 : match[4]) != null ? _ref3 : match[5];
}
val = this.value.compileToFragments(o, LEVEL_LIST);
if (this.context === 'object') {
@@ -5853,7 +5386,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Assign.prototype.compilePatternMatch = function(o) {
- var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
+ var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
top = o.level === LEVEL_TOP;
value = this.value;
objects = this.variable.base.objects;
@@ -5868,14 +5401,14 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
isObject = this.variable.isObject();
if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) {
if (obj instanceof Assign) {
- _ref4 = obj, (_ref5 = _ref4.variable, idx = _ref5.base), obj = _ref4.value;
+ _ref2 = obj, (_ref3 = _ref2.variable, idx = _ref3.base), obj = _ref2.value;
} else {
idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0);
}
acc = IDENTIFIER.test(idx.unwrap().value || 0);
value = new Value(value);
value.properties.push(new (acc ? Access : Index)(idx));
- if (_ref6 = obj.unwrap().value, __indexOf.call(RESERVED, _ref6) >= 0) {
+ if (_ref4 = obj.unwrap().value, __indexOf.call(RESERVED, _ref4) >= 0) {
obj.error("assignment to a reserved word: " + (obj.compile(o)));
}
return new Assign(obj, value, null, {
@@ -5896,10 +5429,10 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
idx = i;
if (isObject) {
if (obj instanceof Assign) {
- _ref7 = obj, (_ref8 = _ref7.variable, idx = _ref8.base), obj = _ref7.value;
+ _ref5 = obj, (_ref6 = _ref5.variable, idx = _ref6.base), obj = _ref5.value;
} else {
if (obj.base instanceof Parens) {
- _ref9 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref9[0], idx = _ref9[1];
+ _ref7 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref7[0], idx = _ref7[1];
} else {
idx = obj["this"] ? obj.properties[0].name : obj;
}
@@ -5950,29 +5483,38 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Assign.prototype.compileConditional = function(o) {
- var left, right, _ref4;
- _ref4 = this.variable.cacheReference(o), left = _ref4[0], right = _ref4[1];
+ var fragments, left, right, _ref2;
+ _ref2 = this.variable.cacheReference(o), left = _ref2[0], right = _ref2[1];
if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) {
this.variable.error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been declared before");
}
if (__indexOf.call(this.context, "?") >= 0) {
o.isExistentialEquals = true;
+ return new If(new Existence(left), right, {
+ type: 'if'
+ }).addElse(new Assign(right, this.value, '=')).compileToFragments(o);
+ } else {
+ fragments = new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compileToFragments(o);
+ if (o.level <= LEVEL_LIST) {
+ return fragments;
+ } else {
+ return this.wrapInBraces(fragments);
+ }
}
- return new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compileToFragments(o);
};
Assign.prototype.compileSplice = function(o) {
- var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref4, _ref5, _ref6;
- _ref4 = this.variable.properties.pop().range, from = _ref4.from, to = _ref4.to, exclusive = _ref4.exclusive;
+ var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref2, _ref3, _ref4;
+ _ref2 = this.variable.properties.pop().range, from = _ref2.from, to = _ref2.to, exclusive = _ref2.exclusive;
name = this.variable.compile(o);
if (from) {
- _ref5 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref5[0], fromRef = _ref5[1];
+ _ref3 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref3[0], fromRef = _ref3[1];
} else {
fromDecl = fromRef = '0';
}
if (to) {
- if ((from != null ? from.isSimpleNumber() : void 0) && to.isSimpleNumber()) {
- to = +to.compile(o) - +fromRef;
+ if (from instanceof Value && from.isSimpleNumber() && to instanceof Value && to.isSimpleNumber()) {
+ to = to.compile(o) - fromRef;
if (!exclusive) {
to += 1;
}
@@ -5985,7 +5527,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
} else {
to = "9e9";
}
- _ref6 = this.value.cache(o, LEVEL_LIST), valDef = _ref6[0], valRef = _ref6[1];
+ _ref4 = this.value.cache(o, LEVEL_LIST), valDef = _ref4[0], valRef = _ref4[1];
answer = [].concat(this.makeCode("[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat("), valDef, this.makeCode(")), "), valRef);
if (o.level > LEVEL_TOP) {
return this.wrapInBraces(answer);
@@ -6005,9 +5547,6 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
this.params = params || [];
this.body = body || new Block;
this.bound = tag === 'boundfunc';
- if (this.bound) {
- this.context = '_this';
- }
}
Code.prototype.children = ['params', 'body'];
@@ -6018,29 +5557,43 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
Code.prototype.jumps = NO;
+ Code.prototype.makeScope = function(parentScope) {
+ return new Scope(parentScope, this.body, this);
+ };
+
Code.prototype.compileNode = function(o) {
- var answer, code, exprs, i, idt, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref4, _ref5, _ref6, _ref7, _ref8;
- o.scope = new Scope(o.scope, this.body, this);
+ var answer, boundfunc, code, exprs, i, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, wrapper, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _m, _n, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
+ if (this.bound && ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0)) {
+ this.context = o.scope.method.context;
+ }
+ if (this.bound && !this.context) {
+ this.context = '_this';
+ wrapper = new Code([new Param(new Literal(this.context))], new Block([this]));
+ boundfunc = new Call(wrapper, [new Literal('this')]);
+ boundfunc.updateLocationDataIfMissing(this.locationData);
+ return boundfunc.compileNode(o);
+ }
+ o.scope = del(o, 'classScope') || this.makeScope(o.scope);
o.scope.shared = del(o, 'sharedScope');
o.indent += TAB;
delete o.bare;
delete o.isExistentialEquals;
params = [];
exprs = [];
- this.eachParamName(function(name) {
- if (!o.scope.check(name)) {
- return o.scope.parameter(name);
- }
- });
+ _ref3 = this.params;
+ for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
+ param = _ref3[_i];
+ o.scope.parameter(param.asReference(o));
+ }
_ref4 = this.params;
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
- param = _ref4[_i];
+ for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
+ param = _ref4[_j];
if (!param.splat) {
continue;
}
_ref5 = this.params;
- for (_j = 0, _len1 = _ref5.length; _j < _len1; _j++) {
- p = _ref5[_j].name;
+ for (_k = 0, _len2 = _ref5.length; _k < _len2; _k++) {
+ p = _ref5[_k].name;
if (p["this"]) {
p = p.properties[0].name;
}
@@ -6049,11 +5602,11 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
}
}
splats = new Assign(new Value(new Arr((function() {
- var _k, _len2, _ref6, _results;
+ var _l, _len3, _ref6, _results;
_ref6 = this.params;
_results = [];
- for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) {
- p = _ref6[_k];
+ for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) {
+ p = _ref6[_l];
_results.push(p.asReference(o));
}
return _results;
@@ -6061,8 +5614,8 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
break;
}
_ref6 = this.params;
- for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) {
- param = _ref6[_k];
+ for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) {
+ param = _ref6[_l];
if (param.isComplex()) {
val = ref = param.asReference(o);
if (param.value) {
@@ -6090,7 +5643,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
if (exprs.length) {
(_ref7 = this.body.expressions).unshift.apply(_ref7, exprs);
}
- for (i = _l = 0, _len3 = params.length; _l < _len3; i = ++_l) {
+ for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) {
p = params[i];
params[i] = p.compileToFragments(o);
o.scope.parameter(fragmentsToText(params[i]));
@@ -6105,21 +5658,13 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
if (!(wasEmpty || this.noReturn)) {
this.body.makeReturn();
}
- if (this.bound) {
- if ((_ref8 = o.scope.parent.method) != null ? _ref8.bound : void 0) {
- this.bound = this.context = o.scope.parent.method.context;
- } else if (!this["static"]) {
- o.scope.parent.assign('_this', 'this');
- }
- }
- idt = o.indent;
code = 'function';
if (this.ctor) {
code += ' ' + this.name;
}
code += '(';
answer = [this.makeCode(code)];
- for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) {
+ for (i = _n = 0, _len5 = params.length; _n < _len5; i = ++_n) {
p = params[i];
if (i) {
answer.push(this.makeCode(", "));
@@ -6142,11 +5687,11 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Code.prototype.eachParamName = function(iterator) {
- var param, _i, _len, _ref4, _results;
- _ref4 = this.params;
+ var param, _i, _len, _ref2, _results;
+ _ref2 = this.params;
_results = [];
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
- param = _ref4[_i];
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ param = _ref2[_i];
_results.push(param.eachName(iterator));
}
return _results;
@@ -6166,11 +5711,11 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
__extends(Param, _super);
function Param(name, value, splat) {
- var _ref4;
+ var _ref2;
this.name = name;
this.value = value;
this.splat = splat;
- if (_ref4 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0) {
+ if (_ref2 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0) {
this.name.error("parameter name \"" + name + "\" is not allowed");
}
}
@@ -6199,6 +5744,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
if (this.splat) {
node = new Splat(node);
}
+ node.updateLocationDataIfMissing(this.locationData);
return this.reference = node;
};
@@ -6207,7 +5753,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Param.prototype.eachName = function(iterator, name) {
- var atParam, node, obj, _i, _len, _ref4;
+ var atParam, node, obj, _i, _len, _ref2;
if (name == null) {
name = this.name;
}
@@ -6224,9 +5770,9 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
if (name instanceof Value) {
return atParam(name);
}
- _ref4 = name.objects;
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
- obj = _ref4[_i];
+ _ref2 = name.objects;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ obj = _ref2[_i];
if (obj instanceof Assign) {
this.eachName(iterator, obj.value.unwrap());
} else if (obj instanceof Splat) {
@@ -6302,11 +5848,11 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
return args[0].concat(node.makeCode(".concat("), concatPart, node.makeCode(")"));
}
base = (function() {
- var _j, _len1, _ref4, _results;
- _ref4 = list.slice(0, index);
+ var _j, _len1, _ref2, _results;
+ _ref2 = list.slice(0, index);
_results = [];
- for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
- node = _ref4[_j];
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
+ node = _ref2[_j];
_results.push(node.compileToFragments(o, LEVEL_LIST));
}
return _results;
@@ -6349,17 +5895,17 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
While.prototype.jumps = function() {
- var expressions, node, _i, _len;
+ var expressions, jumpNode, node, _i, _len;
expressions = this.body.expressions;
if (!expressions.length) {
return false;
}
for (_i = 0, _len = expressions.length; _i < _len; _i++) {
node = expressions[_i];
- if (node.jumps({
+ if (jumpNode = node.jumps({
loop: true
})) {
- return node;
+ return jumpNode;
}
}
return false;
@@ -6446,17 +5992,17 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Op.prototype.isComplex = function() {
- var _ref4;
- return !(this.isUnary() && ((_ref4 = this.operator) === '+' || _ref4 === '-')) || this.first.isComplex();
+ var _ref2;
+ return !(this.isUnary() && ((_ref2 = this.operator) === '+' || _ref2 === '-')) || this.first.isComplex();
};
Op.prototype.isChainable = function() {
- var _ref4;
- return (_ref4 = this.operator) === '<' || _ref4 === '>' || _ref4 === '>=' || _ref4 === '<=' || _ref4 === '===' || _ref4 === '!==';
+ var _ref2;
+ return (_ref2 = this.operator) === '<' || _ref2 === '>' || _ref2 === '>=' || _ref2 === '<=' || _ref2 === '===' || _ref2 === '!==';
};
Op.prototype.invert = function() {
- var allInvertable, curr, fst, op, _ref4;
+ var allInvertable, curr, fst, op, _ref2;
if (this.isChainable() && this.first.isChainable()) {
allInvertable = true;
curr = this;
@@ -6482,7 +6028,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
return this;
} else if (this.second) {
return new Parens(this).invert();
- } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref4 = fst.operator) === '!' || _ref4 === 'in' || _ref4 === 'instanceof')) {
+ } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref2 = fst.operator) === '!' || _ref2 === 'in' || _ref2 === 'instanceof')) {
return fst;
} else {
return new Op('!', this);
@@ -6490,17 +6036,17 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Op.prototype.unfoldSoak = function(o) {
- var _ref4;
- return ((_ref4 = this.operator) === '++' || _ref4 === '--' || _ref4 === 'delete') && unfoldSoak(o, this, 'first');
+ var _ref2;
+ return ((_ref2 = this.operator) === '++' || _ref2 === '--' || _ref2 === 'delete') && unfoldSoak(o, this, 'first');
};
Op.prototype.generateDo = function(exp) {
- var call, func, param, passedParams, ref, _i, _len, _ref4;
+ var call, func, param, passedParams, ref, _i, _len, _ref2;
passedParams = [];
func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp;
- _ref4 = func.params || [];
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
- param = _ref4[_i];
+ _ref2 = func.params || [];
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ param = _ref2[_i];
if (param.value) {
passedParams.push(param.value);
delete param.value;
@@ -6514,7 +6060,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Op.prototype.compileNode = function(o) {
- var answer, isChain, _ref4, _ref5;
+ var answer, isChain, _ref2, _ref3;
isChain = this.isChainable() && this.first.isChainable();
if (!isChain) {
this.first.front = this.front;
@@ -6522,7 +6068,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) {
this.error('delete operand may not be argument or var');
}
- if (((_ref4 = this.operator) === '--' || _ref4 === '++') && (_ref5 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref5) >= 0)) {
+ if (((_ref2 = this.operator) === '--' || _ref2 === '++') && (_ref3 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref3) >= 0)) {
this.error("cannot increment/decrement \"" + (this.first.unwrapAll().value) + "\"");
}
if (this.isUnary()) {
@@ -6543,8 +6089,8 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
Op.prototype.compileChain = function(o) {
- var fragments, fst, shared, _ref4;
- _ref4 = this.first.second.cache(o), this.first.second = _ref4[0], shared = _ref4[1];
+ var fragments, fst, shared, _ref2;
+ _ref2 = this.first.second.cache(o), this.first.second = _ref2[0], shared = _ref2[1];
fst = this.first.compileToFragments(o, LEVEL_OP);
fragments = fst.concat(this.makeCode(" " + (this.invert ? '&&' : '||') + " "), shared.compileToFragments(o), this.makeCode(" " + this.operator + " "), this.second.compileToFragments(o, LEVEL_OP));
return this.wrapInBraces(fragments);
@@ -6552,7 +6098,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
Op.prototype.compileExistence = function(o) {
var fst, ref;
- if (!o.isExistentialEquals && this.first.isComplex()) {
+ if (this.first.isComplex()) {
ref = new Literal(o.scope.freeVariable('ref'));
fst = new Parens(new Assign(ref, this.first));
} else {
@@ -6611,11 +6157,11 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
In.prototype.invert = NEGATE;
In.prototype.compileNode = function(o) {
- var hasSplat, obj, _i, _len, _ref4;
+ var hasSplat, obj, _i, _len, _ref2;
if (this.array instanceof Value && this.array.isArray()) {
- _ref4 = this.array.base.objects;
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
- obj = _ref4[_i];
+ _ref2 = this.array.base.objects;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ obj = _ref2[_i];
if (!(obj instanceof Splat)) {
continue;
}
@@ -6630,16 +6176,16 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
In.prototype.compileOrTest = function(o) {
- var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref4, _ref5, _ref6;
+ var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref2, _ref3, _ref4;
if (this.array.base.objects.length === 0) {
return [this.makeCode("" + (!!this.negated))];
}
- _ref4 = this.object.cache(o, LEVEL_OP), sub = _ref4[0], ref = _ref4[1];
- _ref5 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref5[0], cnj = _ref5[1];
+ _ref2 = this.object.cache(o, LEVEL_OP), sub = _ref2[0], ref = _ref2[1];
+ _ref3 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref3[0], cnj = _ref3[1];
tests = [];
- _ref6 = this.array.base.objects;
- for (i = _i = 0, _len = _ref6.length; _i < _len; i = ++_i) {
- item = _ref6[i];
+ _ref4 = this.array.base.objects;
+ for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) {
+ item = _ref4[i];
if (i) {
tests.push(this.makeCode(cnj));
}
@@ -6653,8 +6199,8 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
In.prototype.compileLoopTest = function(o) {
- var fragments, ref, sub, _ref4;
- _ref4 = this.object.cache(o, LEVEL_LIST), sub = _ref4[0], ref = _ref4[1];
+ var fragments, ref, sub, _ref2;
+ _ref2 = this.object.cache(o, LEVEL_LIST), sub = _ref2[0], ref = _ref2[1];
fragments = [].concat(this.makeCode(utility('indexOf') + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0')));
if (fragmentsToText(sub) === fragmentsToText(ref)) {
return fragments;
@@ -6690,8 +6236,8 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
Try.prototype.isStatement = YES;
Try.prototype.jumps = function(o) {
- var _ref4;
- return this.attempt.jumps(o) || ((_ref4 = this.recovery) != null ? _ref4.jumps(o) : void 0);
+ var _ref2;
+ return this.attempt.jumps(o) || ((_ref2 = this.recovery) != null ? _ref2.jumps(o) : void 0);
};
Try.prototype.makeReturn = function(res) {
@@ -6752,11 +6298,11 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
Existence.prototype.invert = NEGATE;
Existence.prototype.compileNode = function(o) {
- var cmp, cnj, code, _ref4;
+ var cmp, cnj, code, _ref2;
this.expression.front = this.front;
code = this.expression.compile(o, LEVEL_OP);
if (IDENTIFIER.test(code) && !o.scope.check(code)) {
- _ref4 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref4[0], cnj = _ref4[1];
+ _ref2 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref2[0], cnj = _ref2[1];
code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null";
} else {
code = "" + code + " " + (this.negated ? '==' : '!=') + " null";
@@ -6809,13 +6355,13 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
__extends(For, _super);
function For(body, source) {
- var _ref4;
+ var _ref2;
this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index;
this.body = Block.wrap([body]);
this.own = !!source.own;
this.object = !!source.object;
if (this.object) {
- _ref4 = [this.index, this.name], this.name = _ref4[0], this.index = _ref4[1];
+ _ref2 = [this.index, this.name], this.name = _ref2[0], this.index = _ref2[1];
}
if (this.index instanceof Value) {
this.index.error('index cannot be a pattern matching expression');
@@ -6829,7 +6375,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
this.name.error('cannot pattern match over range loops');
}
if (this.own && !this.object) {
- this.index.error('cannot use own with for-in');
+ this.name.error('cannot use own with for-in');
}
this.returns = false;
}
@@ -6837,9 +6383,9 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
For.prototype.children = ['body', 'source', 'guard', 'step'];
For.prototype.compileNode = function(o) {
- var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref4, _ref5;
+ var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref2, _ref3;
body = Block.wrap([this.body]);
- lastJumps = (_ref4 = last(body.expressions)) != null ? _ref4.jumps() : void 0;
+ lastJumps = (_ref2 = last(body.expressions)) != null ? _ref2.jumps() : void 0;
if (lastJumps && lastJumps instanceof Return) {
this.returns = false;
}
@@ -6860,8 +6406,8 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
kvar = (this.range && name) || index || ivar;
kvarAssign = kvar !== ivar ? "" + kvar + " = " : "";
if (this.step && !this.range) {
- _ref5 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref5[0], stepVar = _ref5[1];
- stepNum = stepVar.match(SIMPLENUM);
+ _ref3 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref3[0], stepVar = _ref3[1];
+ stepNum = stepVar.match(NUMBER);
}
if (this.pattern) {
name = ivar;
@@ -6889,7 +6435,7 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
if (step !== stepVar) {
defPart += "" + this.tab + step + ";\n";
}
- if (!(this.step && stepNum && (down = +stepNum < 0))) {
+ if (!(this.step && stepNum && (down = parseNum(stepNum[0]) < 0))) {
lvar = scope.freeVariable('len');
}
declare = "" + kvarAssign + ivar + " = 0, " + lvar + " = " + svar + ".length";
@@ -6950,24 +6496,24 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
};
For.prototype.pluckDirectCall = function(o, body) {
- var base, defs, expr, fn, idx, ref, val, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
+ var base, defs, expr, fn, idx, ref, val, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
defs = [];
- _ref4 = body.expressions;
- for (idx = _i = 0, _len = _ref4.length; _i < _len; idx = ++_i) {
- expr = _ref4[idx];
+ _ref2 = body.expressions;
+ for (idx = _i = 0, _len = _ref2.length; _i < _len; idx = ++_i) {
+ expr = _ref2[idx];
expr = expr.unwrapAll();
if (!(expr instanceof Call)) {
continue;
}
- val = expr.variable.unwrapAll();
- if (!((val instanceof Code) || (val instanceof Value && ((_ref5 = val.base) != null ? _ref5.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref6 = (_ref7 = val.properties[0].name) != null ? _ref7.value : void 0) === 'call' || _ref6 === 'apply')))) {
+ val = (_ref3 = expr.variable) != null ? _ref3.unwrapAll() : void 0;
+ if (!((val instanceof Code) || (val instanceof Value && ((_ref4 = val.base) != null ? _ref4.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref5 = (_ref6 = val.properties[0].name) != null ? _ref6.value : void 0) === 'call' || _ref5 === 'apply')))) {
continue;
}
- fn = ((_ref8 = val.base) != null ? _ref8.unwrapAll() : void 0) || val;
+ fn = ((_ref7 = val.base) != null ? _ref7.unwrapAll() : void 0) || val;
ref = new Literal(o.scope.freeVariable('fn'));
base = new Value(ref);
if (val.base) {
- _ref9 = [base, val], val.base = _ref9[0], base = _ref9[1];
+ _ref8 = [base, val], val.base = _ref8[0], base = _ref8[1];
}
body.expressions[idx] = new Call(base, expr.args);
defs = defs.concat(this.makeCode(this.tab), new Assign(ref, fn).compileToFragments(o, LEVEL_TOP), this.makeCode(';\n'));
@@ -6993,49 +6539,49 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
Switch.prototype.isStatement = YES;
Switch.prototype.jumps = function(o) {
- var block, conds, _i, _len, _ref4, _ref5, _ref6;
+ var block, conds, jumpNode, _i, _len, _ref2, _ref3, _ref4;
if (o == null) {
o = {
block: true
};
}
- _ref4 = this.cases;
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
- _ref5 = _ref4[_i], conds = _ref5[0], block = _ref5[1];
- if (block.jumps(o)) {
- return block;
+ _ref2 = this.cases;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ _ref3 = _ref2[_i], conds = _ref3[0], block = _ref3[1];
+ if (jumpNode = block.jumps(o)) {
+ return jumpNode;
}
}
- return (_ref6 = this.otherwise) != null ? _ref6.jumps(o) : void 0;
+ return (_ref4 = this.otherwise) != null ? _ref4.jumps(o) : void 0;
};
Switch.prototype.makeReturn = function(res) {
- var pair, _i, _len, _ref4, _ref5;
- _ref4 = this.cases;
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
- pair = _ref4[_i];
+ var pair, _i, _len, _ref2, _ref3;
+ _ref2 = this.cases;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ pair = _ref2[_i];
pair[1].makeReturn(res);
}
if (res) {
this.otherwise || (this.otherwise = new Block([new Literal('void 0')]));
}
- if ((_ref5 = this.otherwise) != null) {
- _ref5.makeReturn(res);
+ if ((_ref3 = this.otherwise) != null) {
+ _ref3.makeReturn(res);
}
return this;
};
Switch.prototype.compileNode = function(o) {
- var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref4, _ref5, _ref6;
+ var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref2, _ref3, _ref4;
idt1 = o.indent + TAB;
idt2 = o.indent = idt1 + TAB;
fragments = [].concat(this.makeCode(this.tab + "switch ("), (this.subject ? this.subject.compileToFragments(o, LEVEL_PAREN) : this.makeCode("false")), this.makeCode(") {\n"));
- _ref4 = this.cases;
- for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) {
- _ref5 = _ref4[i], conditions = _ref5[0], block = _ref5[1];
- _ref6 = flatten([conditions]);
- for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) {
- cond = _ref6[_j];
+ _ref2 = this.cases;
+ for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
+ _ref3 = _ref2[i], conditions = _ref3[0], block = _ref3[1];
+ _ref4 = flatten([conditions]);
+ for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
+ cond = _ref4[_j];
if (!this.subject) {
cond = cond.invert();
}
@@ -7081,13 +6627,13 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
If.prototype.children = ['condition', 'body', 'elseBody'];
If.prototype.bodyNode = function() {
- var _ref4;
- return (_ref4 = this.body) != null ? _ref4.unwrap() : void 0;
+ var _ref2;
+ return (_ref2 = this.body) != null ? _ref2.unwrap() : void 0;
};
If.prototype.elseBodyNode = function() {
- var _ref4;
- return (_ref4 = this.elseBody) != null ? _ref4.unwrap() : void 0;
+ var _ref2;
+ return (_ref2 = this.elseBody) != null ? _ref2.unwrap() : void 0;
};
If.prototype.addElse = function(elseBody) {
@@ -7096,18 +6642,19 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
} else {
this.isChain = elseBody instanceof If;
this.elseBody = this.ensureBlock(elseBody);
+ this.elseBody.updateLocationDataIfMissing(elseBody.locationData);
}
return this;
};
If.prototype.isStatement = function(o) {
- var _ref4;
- return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref4 = this.elseBodyNode()) != null ? _ref4.isStatement(o) : void 0);
+ var _ref2;
+ return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref2 = this.elseBodyNode()) != null ? _ref2.isStatement(o) : void 0);
};
If.prototype.jumps = function(o) {
- var _ref4;
- return this.body.jumps(o) || ((_ref4 = this.elseBody) != null ? _ref4.jumps(o) : void 0);
+ var _ref2;
+ return this.body.jumps(o) || ((_ref2 = this.elseBody) != null ? _ref2.jumps(o) : void 0);
};
If.prototype.compileNode = function(o) {
@@ -7189,52 +6736,6 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
})(Base);
- Closure = {
- wrap: function(expressions, statement, noReturn) {
- var args, argumentsNode, call, func, meth;
- if (expressions.jumps()) {
- return expressions;
- }
- func = new Code([], Block.wrap([expressions]));
- args = [];
- argumentsNode = expressions.contains(this.isLiteralArguments);
- if (argumentsNode && expressions.classBody) {
- argumentsNode.error("Class bodies shouldn't reference arguments");
- }
- if (argumentsNode || expressions.contains(this.isLiteralThis)) {
- meth = new Literal(argumentsNode ? 'apply' : 'call');
- args = [new Literal('this')];
- if (argumentsNode) {
- args.push(new Literal('arguments'));
- }
- func = new Value(func, [new Access(meth)]);
- }
- func.noReturn = noReturn;
- call = new Call(func, args);
- if (statement) {
- return Block.wrap([call]);
- } else {
- return call;
- }
- },
- isLiteralArguments: function(node) {
- return node instanceof Literal && node.value === 'arguments' && !node.asKey;
- },
- isLiteralThis: function(node) {
- return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper);
- }
- };
-
- unfoldSoak = function(o, parent, name) {
- var ifn;
- if (!(ifn = parent[name].unfoldSoak(o))) {
- return;
- }
- parent[name] = ifn.body;
- ifn.body = new Value(parent);
- return ifn;
- };
-
UTILITIES = {
"extends": function() {
return "function(child, parent) { for (var key in parent) { if (" + (utility('hasProp')) + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }";
@@ -7273,10 +6774,16 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
SIMPLENUM = /^[+-]?\d+$/;
- METHOD_DEF = RegExp("^(?:(" + IDENTIFIER_STR + ")\\.prototype(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\]))|(" + IDENTIFIER_STR + ")$");
+ HEXNUM = /^[+-]?0x[\da-f]+/i;
+
+ NUMBER = /^[+-]?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)$/i;
+
+ METHOD_DEF = RegExp("^(" + IDENTIFIER_STR + ")(\\.prototype)?(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\])$");
IS_STRING = /^['"]/;
+ IS_REGEX = /^\//;
+
utility = function(name) {
var ref;
ref = "__" + name;
@@ -7289,153 +6796,807 @@ ace.define('ace/mode/coffee/nodes', ['require', 'exports', 'module' , 'ace/mode/
return code.replace(/\s+$/, '');
};
+ parseNum = function(x) {
+ if (x == null) {
+ return 0;
+ } else if (x.match(HEXNUM)) {
+ return parseInt(x, 16);
+ } else {
+ return parseFloat(x);
+ }
+ };
+
+ isLiteralArguments = function(node) {
+ return node instanceof Literal && node.value === 'arguments' && !node.asKey;
+ };
+
+ isLiteralThis = function(node) {
+ return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper);
+ };
+
+ unfoldSoak = function(o, parent, name) {
+ var ifn;
+ if (!(ifn = parent[name].unfoldSoak(o))) {
+ return;
+ }
+ parent[name] = ifn.body;
+ ifn.body = new Value(parent);
+ return ifn;
+ };
+
});
-ace.define('ace/mode/coffee/scope', ['require', 'exports', 'module' , 'ace/mode/coffee/helpers'], function(require, exports, module) {
+ace.define("ace/mode/coffee/coffee-script",["require","exports","module","ace/mode/coffee/lexer","ace/mode/coffee/parser","ace/mode/coffee/nodes"], function(require, exports, module) {
- var Scope, extend, last, _ref;
+ var Lexer = require("./lexer").Lexer;
+ var parser = require("./parser");
- _ref = require('./helpers'), extend = _ref.extend, last = _ref.last;
+ var lexer = new Lexer();
+ parser.lexer = {
+ lex: function() {
+ var tag, token;
+ token = this.tokens[this.pos++];
+ if (token) {
+ tag = token[0], this.yytext = token[1], this.yylloc = token[2];
+ this.yylineno = this.yylloc.first_line;
+ } else {
+ tag = '';
+ }
+ return tag;
+ },
+ setInput: function(tokens) {
+ this.tokens = tokens;
+ return this.pos = 0;
+ },
+ upcomingInput: function() {
+ return "";
+ }
+ };
+ parser.yy = require('./nodes');
- exports.Scope = Scope = (function() {
- Scope.root = null;
+ exports.parse = function(code) {
+ return parser.parse(lexer.tokenize(code));
+ };
+});
- function Scope(parent, expressions, method) {
- this.parent = parent;
- this.expressions = expressions;
- this.method = method;
- this.variables = [
- {
- name: 'arguments',
- type: 'arguments'
+ace.define("ace/mode/coffee_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/coffee/coffee-script"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var coffee = require("../mode/coffee/coffee-script");
+
+window.addEventListener = function() {};
+
+
+var Worker = exports.Worker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(250);
+};
+
+oop.inherits(Worker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ var errors = [];
+ try {
+ coffee.parse(value).compile();
+ } catch(e) {
+ var loc = e.location;
+ if (loc) {
+ errors.push({
+ row: loc.first_line,
+ column: loc.first_column,
+ endRow: loc.last_line,
+ endColumn: loc.last_column,
+ text: e.message,
+ type: "error"
+ });
+ }
}
- ];
- this.positions = {};
- if (!this.parent) {
- Scope.root = this;
- }
+ this.sender.emit("annotate", errors);
+ };
+
+}).call(Worker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ return bound;
+ };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
}
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
- Scope.prototype.add = function(name, type, immediate) {
- if (this.shared && !immediate) {
- return this.parent.add(name, type, immediate);
- }
- if (Object.prototype.hasOwnProperty.call(this.positions, name)) {
- return this.variables[this.positions[name]].type = type;
- } else {
- return this.positions[name] = this.variables.push({
- name: name,
- type: type
- }) - 1;
- }
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ while (++i < length) {
+ if (i in self) {
+ fun.call(thisp, self[i], i, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
};
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
- Scope.prototype.namedMethod = function() {
- var _ref1;
- if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) {
- return this.method;
- }
- return this.parent.namedMethod();
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
};
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
- Scope.prototype.find = function(name) {
- if (this.check(name)) {
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
return true;
- }
- this.add(name, 'var');
- return false;
};
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
- Scope.prototype.parameter = function(name) {
- if (this.shared && this.parent.check(name, true)) {
- return;
- }
- return this.add(name, 'param');
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
};
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
- Scope.prototype.check = function(name) {
- var _ref1;
- return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0));
+ var i = 0;
+ var result;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i++];
+ break;
+ }
+ if (++i >= length) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
};
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
- Scope.prototype.temporary = function(name, index) {
- if (name.length > 1) {
- return '_' + name + (index > 1 ? index - 1 : '');
- } else {
- return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a');
- }
+ var result, i = length - 1;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i--];
+ break;
+ }
+ if (--i < 0) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
};
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
- Scope.prototype.type = function(name) {
- var v, _i, _len, _ref1;
- _ref1 = this.variables;
- for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
- v = _ref1[_i];
- if (v.name === name) {
- return v.type;
+ if (!length) {
+ return -1;
}
- }
- return null;
+
+ var i = 0;
+ if (arguments.length > 1) {
+ i = toInteger(arguments[1]);
+ }
+ i = i >= 0 ? i : Math.max(0, length + i);
+ for (; i < length; i++) {
+ if (i in self && self[i] === sought) {
+ return i;
+ }
+ }
+ return -1;
};
+}
+if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
- Scope.prototype.freeVariable = function(name, reserve) {
- var index, temp;
- if (reserve == null) {
- reserve = true;
- }
- index = 0;
- while (this.check((temp = this.temporary(name, index)))) {
- index++;
- }
- if (reserve) {
- this.add(temp, 'var', true);
- }
- return temp;
+ if (!length) {
+ return -1;
+ }
+ var i = length - 1;
+ if (arguments.length > 1) {
+ i = Math.min(i, toInteger(arguments[1]));
+ }
+ i = i >= 0 ? i : length - Math.abs(i);
+ for (; i >= 0; i--) {
+ if (i in self && sought === self[i]) {
+ return i;
+ }
+ }
+ return -1;
};
+}
+if (!Object.getPrototypeOf) {
+ Object.getPrototypeOf = function getPrototypeOf(object) {
+ return object.__proto__ || (
+ object.constructor ?
+ object.constructor.prototype :
+ prototypeOfObject
+ );
+ };
+}
+if (!Object.getOwnPropertyDescriptor) {
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+ "non-object: ";
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT + object);
+ if (!owns(object, property))
+ return;
- Scope.prototype.assign = function(name, value) {
- this.add(name, {
- value: value,
- assigned: true
- }, true);
- return this.hasAssignments = true;
+ var descriptor, getter, setter;
+ descriptor = { enumerable: true, configurable: true };
+ if (supportsAccessors) {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+
+ var getter = lookupGetter(object, property);
+ var setter = lookupSetter(object, property);
+ object.__proto__ = prototype;
+
+ if (getter || setter) {
+ if (getter) descriptor.get = getter;
+ if (setter) descriptor.set = setter;
+ return descriptor;
+ }
+ }
+ descriptor.value = object[property];
+ return descriptor;
+ };
+}
+if (!Object.getOwnPropertyNames) {
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ return Object.keys(object);
};
+}
+if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
- Scope.prototype.hasDeclarations = function() {
- return !!this.declaredVariables().length;
+ Object.create = function create(prototype, properties) {
+ var object;
+ if (prototype === null) {
+ object = createEmpty();
+ } else {
+ if (typeof prototype != "object")
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+ var Type = function () {};
+ Type.prototype = prototype;
+ object = new Type();
+ object.__proto__ = prototype;
+ }
+ if (properties !== void 0)
+ Object.defineProperties(object, properties);
+ return object;
};
+}
- Scope.prototype.declaredVariables = function() {
- var realVars, tempVars, v, _i, _len, _ref1;
- realVars = [];
- tempVars = [];
- _ref1 = this.variables;
- for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
- v = _ref1[_i];
- if (v.type === 'var') {
- (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name);
+function doesDefinePropertyWork(object) {
+ try {
+ Object.defineProperty(object, "sentinel", {});
+ return "sentinel" in object;
+ } catch (exception) {
+ }
+}
+if (Object.defineProperty) {
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
+ doesDefinePropertyWork(document.createElement("div"));
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+ var definePropertyFallback = Object.defineProperty;
+ }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+ "on this javascript engine";
+
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+ if (definePropertyFallback) {
+ try {
+ return definePropertyFallback.call(Object, object, property, descriptor);
+ } catch (exception) {
+ }
}
- }
- return realVars.sort().concat(tempVars.sort());
+ if (owns(descriptor, "value")) {
+
+ if (supportsAccessors && (lookupGetter(object, property) ||
+ lookupSetter(object, property)))
+ {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+ delete object[property];
+ object[property] = descriptor.value;
+ object.__proto__ = prototype;
+ } else {
+ object[property] = descriptor.value;
+ }
+ } else {
+ if (!supportsAccessors)
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+ if (owns(descriptor, "get"))
+ defineGetter(object, property, descriptor.get);
+ if (owns(descriptor, "set"))
+ defineSetter(object, property, descriptor.set);
+ }
+
+ return object;
+ };
+}
+if (!Object.defineProperties) {
+ Object.defineProperties = function defineProperties(object, properties) {
+ for (var property in properties) {
+ if (owns(properties, property))
+ Object.defineProperty(object, property, properties[property]);
+ }
+ return object;
+ };
+}
+if (!Object.seal) {
+ Object.seal = function seal(object) {
+ return object;
+ };
+}
+if (!Object.freeze) {
+ Object.freeze = function freeze(object) {
+ return object;
+ };
+}
+try {
+ Object.freeze(function () {});
+} catch (exception) {
+ Object.freeze = (function freeze(freezeObject) {
+ return function freeze(object) {
+ if (typeof object == "function") {
+ return object;
+ } else {
+ return freezeObject(object);
+ }
+ };
+ })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+ Object.preventExtensions = function preventExtensions(object) {
+ return object;
+ };
+}
+if (!Object.isSealed) {
+ Object.isSealed = function isSealed(object) {
+ return false;
+ };
+}
+if (!Object.isFrozen) {
+ Object.isFrozen = function isFrozen(object) {
+ return false;
+ };
+}
+if (!Object.isExtensible) {
+ Object.isExtensible = function isExtensible(object) {
+ if (Object(object) === object) {
+ throw new TypeError(); // TODO message
+ }
+ var name = '';
+ while (owns(object, name)) {
+ name += '?';
+ }
+ object[name] = true;
+ var returnValue = owns(object, name);
+ delete object[name];
+ return returnValue;
};
+}
+if (!Object.keys) {
+ var hasDontEnumBug = true,
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
- Scope.prototype.assignedVariables = function() {
- var v, _i, _len, _ref1, _results;
- _ref1 = this.variables;
- _results = [];
- for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
- v = _ref1[_i];
- if (v.type.assigned) {
- _results.push("" + v.name + " = " + v.type.value);
+ for (var key in {"toString": null}) {
+ hasDontEnumBug = false;
+ }
+
+ Object.keys = function keys(object) {
+
+ if (
+ (typeof object != "object" && typeof object != "function") ||
+ object === null
+ ) {
+ throw new TypeError("Object.keys called on a non-object");
}
- }
- return _results;
+
+ var keys = [];
+ for (var name in object) {
+ if (owns(object, name)) {
+ keys.push(name);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+ var dontEnum = dontEnums[i];
+ if (owns(object, dontEnum)) {
+ keys.push(dontEnum);
+ }
+ }
+ }
+ return keys;
};
- return Scope;
+}
+if (!Date.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ };
+}
- })();
+function toInteger(n) {
+ n = +n;
+ if (n !== n) { // isNaN
+ n = 0;
+ } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ }
+ return n;
+}
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
-}); \ No newline at end of file
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/js/vendor/ace/src-noconflict/worker-css.js b/js/vendor/ace/src-noconflict/worker-css.js
index 53374d1..ae23608 100644..100755
--- a/js/vendor/ace/src-noconflict/worker-css.js
+++ b/js/vendor/ace/src-noconflict/worker-css.js
@@ -16,18 +16,30 @@ window.console.trace = window.console;
window.window = window;
window.ace = window;
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
if (moduleName.indexOf("!") !== -1) {
var chunks = moduleName.split("!");
- return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
}
+ // normalize relative requires
if (moduleName.charAt(0) == ".") {
var base = parentId.split("/").slice(0, -1).join("/");
- moduleName = base + "/" + moduleName;
+ moduleName = (base ? base + "/" : "") + moduleName;
while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
var previous = moduleName;
- moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
@@ -36,15 +48,15 @@ window.normalizeModule = function(parentId, moduleName) {
window.require = function(parentId, id) {
if (!id) {
- id = parentId
+ id = parentId;
parentId = null;
}
if (!id.charAt)
throw new Error("worker.js require() accepts only (parentId, id) as arguments");
- id = normalizeModule(parentId, id);
+ id = window.normalizeModule(parentId, id);
- var module = require.modules[id];
+ var module = window.require.modules[id];
if (module) {
if (!module.initialized) {
module.initialized = true;
@@ -54,56 +66,80 @@ window.require = function(parentId, id) {
}
var chunks = id.split("/");
- chunks[0] = require.tlns[chunks[0]] || chunks[0];
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+ chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
var path = chunks.join("/") + ".js";
- require.id = id;
+ window.require.id = id;
importScripts(path);
- return require(parentId, id);
+ return window.require(parentId, id);
};
-
-require.modules = {};
-require.tlns = {};
+window.require.modules = {};
+window.require.tlns = {};
window.define = function(id, deps, factory) {
if (arguments.length == 2) {
factory = deps;
if (typeof id != "string") {
deps = id;
- id = require.id;
+ id = window.require.id;
}
} else if (arguments.length == 1) {
factory = id;
- id = require.id;
+ deps = [];
+ id = window.require.id;
}
-
- if (id.indexOf("text!") === 0)
- return;
- var req = function(deps, factory) {
- return require(id, deps, factory);
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject 'require', 'exports' and
+ // 'module' as dependencies, to provide CommonJS compatibility.
+ deps = ['require', 'exports', 'module'];
+
+ var req = function(childId) {
+ return window.require(id, childId);
};
- require.modules[id] = {
+ window.require.modules[id] = {
exports: {},
factory: function() {
var module = this;
- var returnExports = factory(req, module.exports, module);
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch(dep) {
+ // Because 'require', 'exports' and 'module' aren't actual
+ // dependencies, we must handle them seperately.
+ case 'require': return req;
+ case 'exports': return module.exports;
+ case 'module': return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
if (returnExports)
module.exports = returnExports;
return module;
}
};
};
+window.define.amd = {};
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
require.tlns = topLevelNamespaces;
-}
+};
window.initSender = function initSender() {
- var EventEmitter = require("ace/lib/event_emitter").EventEmitter;
- var oop = require("ace/lib/oop");
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("ace/lib/oop");
var Sender = function() {};
@@ -130,10 +166,10 @@ window.initSender = function initSender() {
}).call(Sender.prototype);
return new Sender();
-}
+};
-window.main = null;
-window.sender = null;
+var main = window.main = null;
+var sender = window.sender = null;
window.onmessage = function(e) {
var msg = e.data;
@@ -146,154 +182,31 @@ window.onmessage = function(e) {
else if (msg.init) {
initBaseUrls(msg.tlns);
require("ace/lib/es5-shim");
- sender = initSender();
+ sender = window.sender = initSender();
var clazz = require(msg.module)[msg.classname];
- main = new clazz(sender);
+ main = window.main = new clazz(sender);
}
else if (msg.event && sender) {
- sender._emit(msg.event, msg.data);
+ sender._signal(msg.event, msg.data);
}
};
})(this);
-ace.define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-var EventEmitter = {};
-var stopPropagation = function() { this.propagationStopped = true; };
-var preventDefault = function() { this.defaultPrevented = true; };
-
-EventEmitter._emit =
-EventEmitter._dispatchEvent = function(eventName, e) {
- this._eventRegistry || (this._eventRegistry = {});
- this._defaultHandlers || (this._defaultHandlers = {});
-
- var listeners = this._eventRegistry[eventName] || [];
- var defaultHandler = this._defaultHandlers[eventName];
- if (!listeners.length && !defaultHandler)
- return;
-
- if (typeof e != "object" || !e)
- e = {};
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
- if (!e.type)
- e.type = eventName;
- if (!e.stopPropagation)
- e.stopPropagation = stopPropagation;
- if (!e.preventDefault)
- e.preventDefault = preventDefault;
-
- for (var i=0; i<listeners.length; i++) {
- listeners[i](e, this);
- if (e.propagationStopped)
- break;
- }
-
- if (defaultHandler && !e.defaultPrevented)
- return defaultHandler(e, this);
-};
-
-
-EventEmitter._signal = function(eventName, e) {
- var listeners = (this._eventRegistry || {})[eventName];
- if (!listeners)
- return;
-
- for (var i=0; i<listeners.length; i++)
- listeners[i](e, this);
-};
-
-EventEmitter.once = function(eventName, callback) {
- var _self = this;
- callback && this.addEventListener(eventName, function newCallback() {
- _self.removeEventListener(eventName, newCallback);
- callback.apply(null, arguments);
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
});
};
-
-EventEmitter.setDefaultHandler = function(eventName, callback) {
- var handlers = this._defaultHandlers
- if (!handlers)
- handlers = this._defaultHandlers = {_disabled_: {}};
-
- if (handlers[eventName]) {
- var old = handlers[eventName];
- var disabled = handlers._disabled_[eventName];
- if (!disabled)
- handlers._disabled_[eventName] = disabled = [];
- disabled.push(old);
- var i = disabled.indexOf(callback);
- if (i != -1)
- disabled.splice(i, 1);
- }
- handlers[eventName] = callback;
-};
-EventEmitter.removeDefaultHandler = function(eventName, callback) {
- var handlers = this._defaultHandlers
- if (!handlers)
- return;
- var disabled = handlers._disabled_[eventName];
-
- if (handlers[eventName] == callback) {
- var old = handlers[eventName];
- if (disabled)
- this.setDefaultHandler(eventName, disabled.pop());
- } else if (disabled) {
- var i = disabled.indexOf(callback);
- if (i != -1)
- disabled.splice(i, 1);
- }
-};
-
-EventEmitter.on =
-EventEmitter.addEventListener = function(eventName, callback, capturing) {
- this._eventRegistry = this._eventRegistry || {};
-
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- listeners = this._eventRegistry[eventName] = [];
-
- if (listeners.indexOf(callback) == -1)
- listeners[capturing ? "unshift" : "push"](callback);
- return callback;
-};
-
-EventEmitter.off =
-EventEmitter.removeListener =
-EventEmitter.removeEventListener = function(eventName, callback) {
- this._eventRegistry = this._eventRegistry || {};
-
- var listeners = this._eventRegistry[eventName];
- if (!listeners)
- return;
-
- var index = listeners.indexOf(callback);
- if (index !== -1)
- listeners.splice(index, 1);
-};
-
-EventEmitter.removeAllListeners = function(eventName) {
- if (this._eventRegistry) this._eventRegistry[eventName] = [];
-};
-
-exports.EventEmitter = EventEmitter;
-
-});
-
-ace.define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-exports.inherits = (function() {
- var tempCtor = function() {};
- return function(ctor, superCtor) {
- tempCtor.prototype = superCtor.prototype;
- ctor.super_ = superCtor.prototype;
- ctor.prototype = new tempCtor();
- ctor.prototype.constructor = ctor;
- };
-}());
-
exports.mixin = function(obj, mixin) {
for (var key in mixin) {
obj[key] = mixin[key];
@@ -307,771 +220,13 @@ exports.implement = function(proto, mixin) {
});
-ace.define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-function Empty() {}
-
-if (!Function.prototype.bind) {
- Function.prototype.bind = function bind(that) { // .length is 1
- var target = this;
- if (typeof target != "function") {
- throw new TypeError("Function.prototype.bind called on incompatible " + target);
- }
- var args = slice.call(arguments, 1); // for normal call
- var bound = function () {
-
- if (this instanceof bound) {
-
- var result = target.apply(
- this,
- args.concat(slice.call(arguments))
- );
- if (Object(result) === result) {
- return result;
- }
- return this;
-
- } else {
- return target.apply(
- that,
- args.concat(slice.call(arguments))
- );
-
- }
-
- };
- if(target.prototype) {
- Empty.prototype = target.prototype;
- bound.prototype = new Empty();
- Empty.prototype = null;
- }
- return bound;
- };
-}
-var call = Function.prototype.call;
-var prototypeOfArray = Array.prototype;
-var prototypeOfObject = Object.prototype;
-var slice = prototypeOfArray.slice;
-var _toString = call.bind(prototypeOfObject.toString);
-var owns = call.bind(prototypeOfObject.hasOwnProperty);
-var defineGetter;
-var defineSetter;
-var lookupGetter;
-var lookupSetter;
-var supportsAccessors;
-if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
- defineGetter = call.bind(prototypeOfObject.__defineGetter__);
- defineSetter = call.bind(prototypeOfObject.__defineSetter__);
- lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
- lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
-}
-if ([1,2].splice(0).length != 2) {
- if(function() { // test IE < 9 to splice bug - see issue #138
- function makeArray(l) {
- var a = new Array(l+2);
- a[0] = a[1] = 0;
- return a;
- }
- var array = [], lengthBefore;
-
- array.splice.apply(array, makeArray(20));
- array.splice.apply(array, makeArray(26));
-
- lengthBefore = array.length; //46
- array.splice(5, 0, "XXX"); // add one element
-
- lengthBefore + 1 == array.length
-
- if (lengthBefore + 1 == array.length) {
- return true;// has right splice implementation without bugs
- }
- }()) {//IE 6/7
- var array_splice = Array.prototype.splice;
- Array.prototype.splice = function(start, deleteCount) {
- if (!arguments.length) {
- return [];
- } else {
- return array_splice.apply(this, [
- start === void 0 ? 0 : start,
- deleteCount === void 0 ? (this.length - start) : deleteCount
- ].concat(slice.call(arguments, 2)))
- }
- };
- } else {//IE8
- Array.prototype.splice = function(pos, removeCount){
- var length = this.length;
- if (pos > 0) {
- if (pos > length)
- pos = length;
- } else if (pos == void 0) {
- pos = 0;
- } else if (pos < 0) {
- pos = Math.max(length + pos, 0);
- }
-
- if (!(pos+removeCount < length))
- removeCount = length - pos;
-
- var removed = this.slice(pos, pos+removeCount);
- var insert = slice.call(arguments, 2);
- var add = insert.length;
- if (pos === length) {
- if (add) {
- this.push.apply(this, insert);
- }
- } else {
- var remove = Math.min(removeCount, length - pos);
- var tailOldPos = pos + remove;
- var tailNewPos = tailOldPos + add - remove;
- var tailCount = length - tailOldPos;
- var lengthAfterRemove = length - remove;
-
- if (tailNewPos < tailOldPos) { // case A
- for (var i = 0; i < tailCount; ++i) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } else if (tailNewPos > tailOldPos) { // case B
- for (i = tailCount; i--; ) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } // else, add == remove (nothing to do)
-
- if (add && pos === lengthAfterRemove) {
- this.length = lengthAfterRemove; // truncate array
- this.push.apply(this, insert);
- } else {
- this.length = lengthAfterRemove + add; // reserves space
- for (i = 0; i < add; ++i) {
- this[pos+i] = insert[i];
- }
- }
- }
- return removed;
- };
- }
-}
-if (!Array.isArray) {
- Array.isArray = function isArray(obj) {
- return _toString(obj) == "[object Array]";
- };
-}
-var boxedString = Object("a"),
- splitString = boxedString[0] != "a" || !(0 in boxedString);
-
-if (!Array.prototype.forEach) {
- Array.prototype.forEach = function forEach(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- thisp = arguments[1],
- i = -1,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- while (++i < length) {
- if (i in self) {
- fun.call(thisp, self[i], i, object);
- }
- }
- };
-}
-if (!Array.prototype.map) {
- Array.prototype.map = function map(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = Array(length),
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self)
- result[i] = fun.call(thisp, self[i], i, object);
- }
- return result;
- };
-}
-if (!Array.prototype.filter) {
- Array.prototype.filter = function filter(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = [],
- value,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self) {
- value = self[i];
- if (fun.call(thisp, value, i, object)) {
- result.push(value);
- }
- }
- }
- return result;
- };
-}
-if (!Array.prototype.every) {
- Array.prototype.every = function every(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && !fun.call(thisp, self[i], i, object)) {
- return false;
- }
- }
- return true;
- };
-}
-if (!Array.prototype.some) {
- Array.prototype.some = function some(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, object)) {
- return true;
- }
- }
- return false;
- };
-}
-if (!Array.prototype.reduce) {
- Array.prototype.reduce = function reduce(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduce of empty array with no initial value");
- }
-
- var i = 0;
- var result;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i++];
- break;
- }
- if (++i >= length) {
- throw new TypeError("reduce of empty array with no initial value");
- }
- } while (true);
- }
-
- for (; i < length; i++) {
- if (i in self) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- }
-
- return result;
- };
-}
-if (!Array.prototype.reduceRight) {
- Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
-
- var result, i = length - 1;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i--];
- break;
- }
- if (--i < 0) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
- } while (true);
- }
-
- do {
- if (i in this) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- } while (i--);
-
- return result;
- };
-}
-if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
- Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
-
- if (!length) {
- return -1;
- }
-
- var i = 0;
- if (arguments.length > 1) {
- i = toInteger(arguments[1]);
- }
- i = i >= 0 ? i : Math.max(0, length + i);
- for (; i < length; i++) {
- if (i in self && self[i] === sought) {
- return i;
- }
- }
- return -1;
- };
-}
-if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
- Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
-
- if (!length) {
- return -1;
- }
- var i = length - 1;
- if (arguments.length > 1) {
- i = Math.min(i, toInteger(arguments[1]));
- }
- i = i >= 0 ? i : length - Math.abs(i);
- for (; i >= 0; i--) {
- if (i in self && sought === self[i]) {
- return i;
- }
- }
- return -1;
- };
-}
-if (!Object.getPrototypeOf) {
- Object.getPrototypeOf = function getPrototypeOf(object) {
- return object.__proto__ || (
- object.constructor ?
- object.constructor.prototype :
- prototypeOfObject
- );
- };
-}
-if (!Object.getOwnPropertyDescriptor) {
- var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
- "non-object: ";
- Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT + object);
- if (!owns(object, property))
- return;
-
- var descriptor, getter, setter;
- descriptor = { enumerable: true, configurable: true };
- if (supportsAccessors) {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
-
- var getter = lookupGetter(object, property);
- var setter = lookupSetter(object, property);
- object.__proto__ = prototype;
-
- if (getter || setter) {
- if (getter) descriptor.get = getter;
- if (setter) descriptor.set = setter;
- return descriptor;
- }
- }
- descriptor.value = object[property];
- return descriptor;
- };
-}
-if (!Object.getOwnPropertyNames) {
- Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
- return Object.keys(object);
- };
-}
-if (!Object.create) {
- var createEmpty;
- if (Object.prototype.__proto__ === null) {
- createEmpty = function () {
- return { "__proto__": null };
- };
- } else {
- createEmpty = function () {
- var empty = {};
- for (var i in empty)
- empty[i] = null;
- empty.constructor =
- empty.hasOwnProperty =
- empty.propertyIsEnumerable =
- empty.isPrototypeOf =
- empty.toLocaleString =
- empty.toString =
- empty.valueOf =
- empty.__proto__ = null;
- return empty;
- }
- }
-
- Object.create = function create(prototype, properties) {
- var object;
- if (prototype === null) {
- object = createEmpty();
- } else {
- if (typeof prototype != "object")
- throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
- var Type = function () {};
- Type.prototype = prototype;
- object = new Type();
- object.__proto__ = prototype;
- }
- if (properties !== void 0)
- Object.defineProperties(object, properties);
- return object;
- };
-}
-
-function doesDefinePropertyWork(object) {
- try {
- Object.defineProperty(object, "sentinel", {});
- return "sentinel" in object;
- } catch (exception) {
- }
-}
-if (Object.defineProperty) {
- var definePropertyWorksOnObject = doesDefinePropertyWork({});
- var definePropertyWorksOnDom = typeof document == "undefined" ||
- doesDefinePropertyWork(document.createElement("div"));
- if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
- var definePropertyFallback = Object.defineProperty;
- }
-}
-
-if (!Object.defineProperty || definePropertyFallback) {
- var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
- var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
- var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
- "on this javascript engine";
-
- Object.defineProperty = function defineProperty(object, property, descriptor) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT_TARGET + object);
- if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
- throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
- if (definePropertyFallback) {
- try {
- return definePropertyFallback.call(Object, object, property, descriptor);
- } catch (exception) {
- }
- }
- if (owns(descriptor, "value")) {
-
- if (supportsAccessors && (lookupGetter(object, property) ||
- lookupSetter(object, property)))
- {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
- delete object[property];
- object[property] = descriptor.value;
- object.__proto__ = prototype;
- } else {
- object[property] = descriptor.value;
- }
- } else {
- if (!supportsAccessors)
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- if (owns(descriptor, "get"))
- defineGetter(object, property, descriptor.get);
- if (owns(descriptor, "set"))
- defineSetter(object, property, descriptor.set);
- }
-
- return object;
- };
-}
-if (!Object.defineProperties) {
- Object.defineProperties = function defineProperties(object, properties) {
- for (var property in properties) {
- if (owns(properties, property))
- Object.defineProperty(object, property, properties[property]);
- }
- return object;
- };
-}
-if (!Object.seal) {
- Object.seal = function seal(object) {
- return object;
- };
-}
-if (!Object.freeze) {
- Object.freeze = function freeze(object) {
- return object;
- };
-}
-try {
- Object.freeze(function () {});
-} catch (exception) {
- Object.freeze = (function freeze(freezeObject) {
- return function freeze(object) {
- if (typeof object == "function") {
- return object;
- } else {
- return freezeObject(object);
- }
- };
- })(Object.freeze);
-}
-if (!Object.preventExtensions) {
- Object.preventExtensions = function preventExtensions(object) {
- return object;
- };
-}
-if (!Object.isSealed) {
- Object.isSealed = function isSealed(object) {
- return false;
- };
-}
-if (!Object.isFrozen) {
- Object.isFrozen = function isFrozen(object) {
- return false;
- };
-}
-if (!Object.isExtensible) {
- Object.isExtensible = function isExtensible(object) {
- if (Object(object) === object) {
- throw new TypeError(); // TODO message
- }
- var name = '';
- while (owns(object, name)) {
- name += '?';
- }
- object[name] = true;
- var returnValue = owns(object, name);
- delete object[name];
- return returnValue;
- };
-}
-if (!Object.keys) {
- var hasDontEnumBug = true,
- dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor"
- ],
- dontEnumsLength = dontEnums.length;
-
- for (var key in {"toString": null}) {
- hasDontEnumBug = false;
- }
-
- Object.keys = function keys(object) {
-
- if (
- (typeof object != "object" && typeof object != "function") ||
- object === null
- ) {
- throw new TypeError("Object.keys called on a non-object");
- }
-
- var keys = [];
- for (var name in object) {
- if (owns(object, name)) {
- keys.push(name);
- }
- }
-
- if (hasDontEnumBug) {
- for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
- var dontEnum = dontEnums[i];
- if (owns(object, dontEnum)) {
- keys.push(dontEnum);
- }
- }
- }
- return keys;
- };
-
-}
-if (!Date.now) {
- Date.now = function now() {
- return new Date().getTime();
- };
-}
-var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
- "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
- "\u2029\uFEFF";
-if (!String.prototype.trim || ws.trim()) {
- ws = "[" + ws + "]";
- var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
- trimEndRegexp = new RegExp(ws + ws + "*$");
- String.prototype.trim = function trim() {
- return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
- };
-}
-
-function toInteger(n) {
- n = +n;
- if (n !== n) { // isNaN
- n = 0;
- } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- }
- return n;
-}
-
-function isPrimitive(input) {
- var type = typeof input;
- return (
- input === null ||
- type === "undefined" ||
- type === "boolean" ||
- type === "number" ||
- type === "string"
- );
-}
-
-function toPrimitive(input) {
- var val, valueOf, toString;
- if (isPrimitive(input)) {
- return input;
- }
- valueOf = input.valueOf;
- if (typeof valueOf === "function") {
- val = valueOf.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- toString = input.toString;
- if (typeof toString === "function") {
- val = toString.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- throw new TypeError();
-}
-var toObject = function (o) {
- if (o == null) { // this matches both null and undefined
- throw new TypeError("can't convert "+o+" to object");
- }
- return Object(o);
-};
-
-});
-
-ace.define('ace/mode/css_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/worker/mirror', 'ace/mode/css/csslint'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var lang = require("../lib/lang");
-var Mirror = require("../worker/mirror").Mirror;
-var CSSLint = require("./css/csslint").CSSLint;
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
-var Worker = exports.Worker = function(sender) {
- Mirror.call(this, sender);
- this.setTimeout(400);
- this.ruleset = null;
- this.setDisabledRules("ids");
- this.setInfoRules("adjoining-classes|qualified-headings|zero-units|gradients|import|outline-none");
+exports.last = function(a) {
+ return a[a.length - 1];
};
-oop.inherits(Worker, Mirror);
-
-(function() {
- this.setInfoRules = function(ruleNames) {
- if (typeof ruleNames == "string")
- ruleNames = ruleNames.split("|");
- this.infoRules = lang.arrayToMap(ruleNames);
- this.doc.getValue() && this.deferredUpdate.schedule(100);
- };
-
- this.setDisabledRules = function(ruleNames) {
- if (!ruleNames) {
- this.ruleset = null;
- } else {
- if (typeof ruleNames == "string")
- ruleNames = ruleNames.split("|");
- var all = {};
-
- CSSLint.getRules().forEach(function(x){
- all[x.id] = true;
- });
- ruleNames.forEach(function(x) {
- delete all[x];
- });
-
- this.ruleset = all;
- }
- this.doc.getValue() && this.deferredUpdate.schedule(100);
- };
-
- this.onUpdate = function() {
- var value = this.doc.getValue();
- var infoRules = this.infoRules;
-
- var result = CSSLint.verify(value, this.ruleset);
- this.sender.emit("csslint", result.messages.map(function(msg) {
- return {
- row: msg.line - 1,
- column: msg.col - 1,
- text: msg.message,
- type: infoRules[msg.rule.id] ? "info" : msg.type
- }
- }));
- };
-
-}).call(Worker.prototype);
-
-});
-
-ace.define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
exports.stringReverse = function(string) {
return string.split("").reverse().join("");
};
@@ -1118,18 +273,24 @@ exports.copyArray = function(array){
return copy;
};
-exports.deepCopy = function (obj) {
- if (typeof obj != "object") {
+exports.deepCopy = function deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
}
+ var cons = obj.constructor;
+ if (cons === RegExp)
+ return obj;
- var copy = obj.constructor();
+ copy = cons();
for (var key in obj) {
- if (typeof obj[key] == "object") {
- copy[key] = this.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
+ copy[key] = deepCopy(obj[key]);
}
return copy;
};
@@ -1179,7 +340,6 @@ exports.getMatchOffsets = function(string, regExp) {
return matches;
};
exports.deferredCall = function(fcn) {
-
var timer = null;
var callback = function() {
timer = null;
@@ -1205,6 +365,10 @@ exports.deferredCall = function(fcn) {
timer = null;
return deferred;
};
+
+ deferred.isPending = function() {
+ return timer;
+ };
return deferred;
};
@@ -1218,15 +382,15 @@ exports.delayedCall = function(fcn, defaultTimeout) {
};
var _self = function(timeout) {
- timer && clearTimeout(timer);
- timer = setTimeout(callback, timeout || defaultTimeout);
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
- _self.delay = _self;
- _self.schedule = function(timeout) {
- if (timer == null)
- timer = setTimeout(callback, timeout || 0);
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
+ _self.schedule = _self;
_self.call = function() {
this.cancel();
@@ -1245,403 +409,135 @@ exports.delayedCall = function(fcn, defaultTimeout) {
return _self;
};
});
-ace.define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
-var Document = require("../document").Document;
-var lang = require("../lib/lang");
-
-var Mirror = exports.Mirror = function(sender) {
- this.sender = sender;
- var doc = this.doc = new Document("");
-
- var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
-
- var _self = this;
- sender.on("change", function(e) {
- doc.applyDeltas(e.data);
- deferredUpdate.schedule(_self.$timeout);
- });
-};
-
-(function() {
-
- this.$timeout = 500;
-
- this.setTimeout = function(timeout) {
- this.$timeout = timeout;
- };
-
- this.setValue = function(value) {
- this.doc.setValue(value);
- this.deferredUpdate.schedule(this.$timeout);
- };
-
- this.getValue = function(callbackId) {
- this.sender.callback(this.doc.getValue(), callbackId);
- };
-
- this.onUpdate = function() {
- };
-
-}).call(Mirror.prototype);
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
-});
+EventEmitter._emit =
+EventEmitter._dispatchEvent = function(eventName, e) {
+ this._eventRegistry || (this._eventRegistry = {});
+ this._defaultHandlers || (this._defaultHandlers = {});
-ace.define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
+ var listeners = this._eventRegistry[eventName] || [];
+ var defaultHandler = this._defaultHandlers[eventName];
+ if (!listeners.length && !defaultHandler)
+ return;
+ if (typeof e != "object" || !e)
+ e = {};
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Range = require("./range").Range;
-var Anchor = require("./anchor").Anchor;
+ if (!e.type)
+ e.type = eventName;
+ if (!e.stopPropagation)
+ e.stopPropagation = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
-var Document = function(text) {
- this.$lines = [];
- if (text.length == 0) {
- this.$lines = [""];
- } else if (Array.isArray(text)) {
- this._insertLines(0, text);
- } else {
- this.insert({row: 0, column:0}, text);
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
}
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
};
-(function() {
-
- oop.implement(this, EventEmitter);
- this.setValue = function(text) {
- var len = this.getLength();
- this.remove(new Range(0, 0, len, this.getLine(len-1).length));
- this.insert({row: 0, column:0}, text);
- };
- this.getValue = function() {
- return this.getAllLines().join(this.getNewLineCharacter());
- };
- this.createAnchor = function(row, column) {
- return new Anchor(this, row, column);
- };
- if ("aaa".split(/a/).length == 0)
- this.$split = function(text) {
- return text.replace(/\r\n|\r/g, "\n").split("\n");
- }
- else
- this.$split = function(text) {
- return text.split(/\r\n|\r|\n/);
- };
-
-
- this.$detectNewLine = function(text) {
- var match = text.match(/^.*?(\r\n|\r|\n)/m);
- this.$autoNewLine = match ? match[1] : "\n";
- };
- this.getNewLineCharacter = function() {
- switch (this.$newLineMode) {
- case "windows":
- return "\r\n";
- case "unix":
- return "\n";
- default:
- return this.$autoNewLine;
- }
- };
-
- this.$autoNewLine = "\n";
- this.$newLineMode = "auto";
- this.setNewLineMode = function(newLineMode) {
- if (this.$newLineMode === newLineMode)
- return;
-
- this.$newLineMode = newLineMode;
- };
- this.getNewLineMode = function() {
- return this.$newLineMode;
- };
- this.isNewLine = function(text) {
- return (text == "\r\n" || text == "\r" || text == "\n");
- };
- this.getLine = function(row) {
- return this.$lines[row] || "";
- };
- this.getLines = function(firstRow, lastRow) {
- return this.$lines.slice(firstRow, lastRow + 1);
- };
- this.getAllLines = function() {
- return this.getLines(0, this.getLength());
- };
- this.getLength = function() {
- return this.$lines.length;
- };
- this.getTextRange = function(range) {
- if (range.start.row == range.end.row) {
- return this.getLine(range.start.row)
- .substring(range.start.column, range.end.column);
- }
- var lines = this.getLines(range.start.row, range.end.row);
- lines[0] = (lines[0] || "").substring(range.start.column);
- var l = lines.length - 1;
- if (range.end.row - range.start.row == l)
- lines[l] = lines[l].substring(0, range.end.column);
- return lines.join(this.getNewLineCharacter());
- };
-
- this.$clipPosition = function(position) {
- var length = this.getLength();
- if (position.row >= length) {
- position.row = Math.max(0, length - 1);
- position.column = this.getLine(length-1).length;
- } else if (position.row < 0)
- position.row = 0;
- return position;
- };
- this.insert = function(position, text) {
- if (!text || text.length === 0)
- return position;
-
- position = this.$clipPosition(position);
- if (this.getLength() <= 1)
- this.$detectNewLine(text);
-
- var lines = this.$split(text);
- var firstLine = lines.splice(0, 1)[0];
- var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
-
- position = this.insertInLine(position, firstLine);
- if (lastLine !== null) {
- position = this.insertNewLine(position); // terminate first line
- position = this._insertLines(position.row, lines);
- position = this.insertInLine(position, lastLine || "");
- }
- return position;
- };
- this.insertLines = function(row, lines) {
- if (row >= this.getLength())
- return this.insert({row: row, column: 0}, "\n" + lines.join("\n"));
- return this._insertLines(Math.max(row, 0), lines);
- };
- this._insertLines = function(row, lines) {
- if (lines.length == 0)
- return {row: row, column: 0};
- if (lines.length > 0xFFFF) {
- var end = this._insertLines(row, lines.slice(0xFFFF));
- lines = lines.slice(0, 0xFFFF);
- }
-
- var args = [row, 0];
- args.push.apply(args, lines);
- this.$lines.splice.apply(this.$lines, args);
-
- var range = new Range(row, 0, row + lines.length, 0);
- var delta = {
- action: "insertLines",
- range: range,
- lines: lines
- };
- this._emit("change", { data: delta });
- return end || range.end;
- };
- this.insertNewLine = function(position) {
- position = this.$clipPosition(position);
- var line = this.$lines[position.row] || "";
-
- this.$lines[position.row] = line.substring(0, position.column);
- this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
-
- var end = {
- row : position.row + 1,
- column : 0
- };
-
- var delta = {
- action: "insertText",
- range: Range.fromPoints(position, end),
- text: this.getNewLineCharacter()
- };
- this._emit("change", { data: delta });
-
- return end;
- };
- this.insertInLine = function(position, text) {
- if (text.length == 0)
- return position;
-
- var line = this.$lines[position.row] || "";
-
- this.$lines[position.row] = line.substring(0, position.column) + text
- + line.substring(position.column);
-
- var end = {
- row : position.row,
- column : position.column + text.length
- };
-
- var delta = {
- action: "insertText",
- range: Range.fromPoints(position, end),
- text: text
- };
- this._emit("change", { data: delta });
-
- return end;
- };
- this.remove = function(range) {
- range.start = this.$clipPosition(range.start);
- range.end = this.$clipPosition(range.end);
-
- if (range.isEmpty())
- return range.start;
-
- var firstRow = range.start.row;
- var lastRow = range.end.row;
-
- if (range.isMultiLine()) {
- var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
- var lastFullRow = lastRow - 1;
-
- if (range.end.column > 0)
- this.removeInLine(lastRow, 0, range.end.column);
-
- if (lastFullRow >= firstFullRow)
- this._removeLines(firstFullRow, lastFullRow);
-
- if (firstFullRow != firstRow) {
- this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
- this.removeNewLine(range.start.row);
- }
- }
- else {
- this.removeInLine(firstRow, range.start.column, range.end.column);
- }
- return range.start;
- };
- this.removeInLine = function(row, startColumn, endColumn) {
- if (startColumn == endColumn)
- return;
-
- var range = new Range(row, startColumn, row, endColumn);
- var line = this.getLine(row);
- var removed = line.substring(startColumn, endColumn);
- var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
- this.$lines.splice(row, 1, newLine);
- var delta = {
- action: "removeText",
- range: range,
- text: removed
- };
- this._emit("change", { data: delta });
- return range.start;
- };
- this.removeLines = function(firstRow, lastRow) {
- if (firstRow < 0 || lastRow >= this.getLength())
- return this.remove(new Range(firstRow, 0, lastRow + 1, 0));
- return this._removeLines(firstRow, lastRow);
- };
-
- this._removeLines = function(firstRow, lastRow) {
- var range = new Range(firstRow, 0, lastRow + 1, 0);
- var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
- var delta = {
- action: "removeLines",
- range: range,
- nl: this.getNewLineCharacter(),
- lines: removed
- };
- this._emit("change", { data: delta });
- return removed;
- };
- this.removeNewLine = function(row) {
- var firstLine = this.getLine(row);
- var secondLine = this.getLine(row+1);
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
- var range = new Range(row, firstLine.length, row+1, 0);
- var line = firstLine + secondLine;
- this.$lines.splice(row, 2, line);
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
- var delta = {
- action: "removeText",
- range: range,
- text: this.getNewLineCharacter()
- };
- this._emit("change", { data: delta });
- };
- this.replace = function(range, text) {
- if (text.length == 0 && range.isEmpty())
- return range.start;
- if (text == this.getTextRange(range))
- return range.end;
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
- this.remove(range);
- if (text) {
- var end = this.insert(range.start, text);
- }
- else {
- end = range.start;
- }
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
- return end;
- };
- this.applyDeltas = function(deltas) {
- for (var i=0; i<deltas.length; i++) {
- var delta = deltas[i];
- var range = Range.fromPoints(delta.range.start, delta.range.end);
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
- if (delta.action == "insertLines")
- this.insertLines(range.start.row, delta.lines);
- else if (delta.action == "insertText")
- this.insert(range.start, delta.text);
- else if (delta.action == "removeLines")
- this._removeLines(range.start.row, range.end.row - 1);
- else if (delta.action == "removeText")
- this.remove(range);
- }
- };
- this.revertDeltas = function(deltas) {
- for (var i=deltas.length-1; i>=0; i--) {
- var delta = deltas[i];
+EventEmitter.off =
+EventEmitter.removeListener =
+EventEmitter.removeEventListener = function(eventName, callback) {
+ this._eventRegistry = this._eventRegistry || {};
- var range = Range.fromPoints(delta.range.start, delta.range.end);
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ return;
- if (delta.action == "insertLines")
- this._removeLines(range.start.row, range.end.row - 1);
- else if (delta.action == "insertText")
- this.remove(range);
- else if (delta.action == "removeLines")
- this._insertLines(range.start.row, delta.lines);
- else if (delta.action == "removeText")
- this.insert(range.start, delta.text);
- }
- };
- this.indexToPosition = function(index, startRow) {
- var lines = this.$lines || this.getAllLines();
- var newlineLength = this.getNewLineCharacter().length;
- for (var i = startRow || 0, l = lines.length; i < l; i++) {
- index -= lines[i].length + newlineLength;
- if (index < 0)
- return {row: i, column: index + lines[i].length + newlineLength};
- }
- return {row: l-1, column: lines[l-1].length};
- };
- this.positionToIndex = function(pos, startRow) {
- var lines = this.$lines || this.getAllLines();
- var newlineLength = this.getNewLineCharacter().length;
- var index = 0;
- var row = Math.min(pos.row, lines.length);
- for (var i = startRow || 0; i < row; ++i)
- index += lines[i].length + newlineLength;
+ var index = listeners.indexOf(callback);
+ if (index !== -1)
+ listeners.splice(index, 1);
+};
- return index + pos.column;
- };
+EventEmitter.removeAllListeners = function(eventName) {
+ if (this._eventRegistry) this._eventRegistry[eventName] = [];
+};
-}).call(Document.prototype);
+exports.EventEmitter = EventEmitter;
-exports.Document = Document;
});
-ace.define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
var comparePoints = function(p1, p2) {
return p1.row - p2.row || p1.column - p2.column;
};
@@ -1879,8 +775,8 @@ Range.comparePoints = function(p1, p2) {
exports.Range = Range;
});
-ace.define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-
+ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
@@ -1904,6 +800,7 @@ var Anchor = exports.Anchor = function(doc, row, column) {
this.getDocument = function() {
return this.document;
};
+ this.$insertRight = false;
this.onChange = function(e) {
var delta = e.data;
var range = delta.range;
@@ -1924,7 +821,8 @@ var Anchor = exports.Anchor = function(doc, row, column) {
if (delta.action === "insertText") {
if (start.row === row && start.column <= column) {
- if (start.row === end.row) {
+ if (start.column === column && this.$insertRight) {
+ } else if (start.row === end.row) {
column += end.column - start.column;
} else {
column -= start.column;
@@ -1934,7 +832,9 @@ var Anchor = exports.Anchor = function(doc, row, column) {
row += end.row - start.row;
}
} else if (delta.action === "insertLines") {
- if (start.row <= row) {
+ if (start.row === row && column === 0 && this.$insertRight) {
+ }
+ else if (start.row <= row) {
row += end.row - start.row;
}
} else if (delta.action === "removeText") {
@@ -1986,7 +886,7 @@ var Anchor = exports.Anchor = function(doc, row, column) {
this.row = pos.row;
this.column = pos.column;
- this._emit("change", {
+ this._signal("change", {
old: old,
value: pos
});
@@ -2023,11 +923,420 @@ var Anchor = exports.Anchor = function(doc, row, column) {
}).call(Anchor.prototype);
});
-ace.define('ace/mode/css/csslint', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(text) {
+ this.$lines = [];
+ if (text.length === 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(text)) {
+ this._insertLines(0, text);
+ } else {
+ this.insert({row: 0, column:0}, text);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength();
+ this.remove(new Range(0, 0, len, this.getLine(len-1).length));
+ this.insert({row: 0, column:0}, text);
+ };
+ this.getValue = function() {
+ return this.getAllLines().join(this.getNewLineCharacter());
+ };
+ this.createAnchor = function(row, column) {
+ return new Anchor(this, row, column);
+ };
+ if ("aaa".split(/a/).length === 0)
+ this.$split = function(text) {
+ return text.replace(/\r\n|\r/g, "\n").split("\n");
+ };
+ else
+ this.$split = function(text) {
+ return text.split(/\r\n|\r|\n/);
+ };
+
+
+ this.$detectNewLine = function(text) {
+ var match = text.match(/^.*?(\r\n|\r|\n)/m);
+ this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine || "\n";
+ }
+ };
+
+ this.$autoNewLine = "";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineMode = function() {
+ return this.$newLineMode;
+ };
+ this.isNewLine = function(text) {
+ return (text == "\r\n" || text == "\r" || text == "\n");
+ };
+ this.getLine = function(row) {
+ return this.$lines[row] || "";
+ };
+ this.getLines = function(firstRow, lastRow) {
+ return this.$lines.slice(firstRow, lastRow + 1);
+ };
+ this.getAllLines = function() {
+ return this.getLines(0, this.getLength());
+ };
+ this.getLength = function() {
+ return this.$lines.length;
+ };
+ this.getTextRange = function(range) {
+ if (range.start.row == range.end.row) {
+ return this.getLine(range.start.row)
+ .substring(range.start.column, range.end.column);
+ }
+ var lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ return lines.join(this.getNewLineCharacter());
+ };
+
+ this.$clipPosition = function(position) {
+ var length = this.getLength();
+ if (position.row >= length) {
+ position.row = Math.max(0, length - 1);
+ position.column = this.getLine(length-1).length;
+ } else if (position.row < 0)
+ position.row = 0;
+ return position;
+ };
+ this.insert = function(position, text) {
+ if (!text || text.length === 0)
+ return position;
+
+ position = this.$clipPosition(position);
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ var lines = this.$split(text);
+ var firstLine = lines.splice(0, 1)[0];
+ var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
+
+ position = this.insertInLine(position, firstLine);
+ if (lastLine !== null) {
+ position = this.insertNewLine(position); // terminate first line
+ position = this._insertLines(position.row, lines);
+ position = this.insertInLine(position, lastLine || "");
+ }
+ return position;
+ };
+ this.insertLines = function(row, lines) {
+ if (row >= this.getLength())
+ return this.insert({row: row, column: 0}, "\n" + lines.join("\n"));
+ return this._insertLines(Math.max(row, 0), lines);
+ };
+ this._insertLines = function(row, lines) {
+ if (lines.length == 0)
+ return {row: row, column: 0};
+ while (lines.length > 20000) {
+ var end = this._insertLines(row, lines.slice(0, 20000));
+ lines = lines.slice(20000);
+ row = end.row;
+ }
+
+ var args = [row, 0];
+ args.push.apply(args, lines);
+ this.$lines.splice.apply(this.$lines, args);
+
+ var range = new Range(row, 0, row + lines.length, 0);
+ var delta = {
+ action: "insertLines",
+ range: range,
+ lines: lines
+ };
+ this._signal("change", { data: delta });
+ return range.end;
+ };
+ this.insertNewLine = function(position) {
+ position = this.$clipPosition(position);
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column);
+ this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
+
+ var end = {
+ row : position.row + 1,
+ column : 0
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: this.getNewLineCharacter()
+ };
+ this._signal("change", { data: delta });
+
+ return end;
+ };
+ this.insertInLine = function(position, text) {
+ if (text.length == 0)
+ return position;
+
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column) + text
+ + line.substring(position.column);
+
+ var end = {
+ row : position.row,
+ column : position.column + text.length
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: text
+ };
+ this._signal("change", { data: delta });
+
+ return end;
+ };
+ this.remove = function(range) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ range.start = this.$clipPosition(range.start);
+ range.end = this.$clipPosition(range.end);
+
+ if (range.isEmpty())
+ return range.start;
+
+ var firstRow = range.start.row;
+ var lastRow = range.end.row;
+
+ if (range.isMultiLine()) {
+ var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
+ var lastFullRow = lastRow - 1;
+
+ if (range.end.column > 0)
+ this.removeInLine(lastRow, 0, range.end.column);
+
+ if (lastFullRow >= firstFullRow)
+ this._removeLines(firstFullRow, lastFullRow);
+
+ if (firstFullRow != firstRow) {
+ this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
+ this.removeNewLine(range.start.row);
+ }
+ }
+ else {
+ this.removeInLine(firstRow, range.start.column, range.end.column);
+ }
+ return range.start;
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ if (startColumn == endColumn)
+ return;
+
+ var range = new Range(row, startColumn, row, endColumn);
+ var line = this.getLine(row);
+ var removed = line.substring(startColumn, endColumn);
+ var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
+ this.$lines.splice(row, 1, newLine);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: removed
+ };
+ this._signal("change", { data: delta });
+ return range.start;
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ if (firstRow < 0 || lastRow >= this.getLength())
+ return this.remove(new Range(firstRow, 0, lastRow + 1, 0));
+ return this._removeLines(firstRow, lastRow);
+ };
+
+ this._removeLines = function(firstRow, lastRow) {
+ var range = new Range(firstRow, 0, lastRow + 1, 0);
+ var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
+
+ var delta = {
+ action: "removeLines",
+ range: range,
+ nl: this.getNewLineCharacter(),
+ lines: removed
+ };
+ this._signal("change", { data: delta });
+ return removed;
+ };
+ this.removeNewLine = function(row) {
+ var firstLine = this.getLine(row);
+ var secondLine = this.getLine(row+1);
+
+ var range = new Range(row, firstLine.length, row+1, 0);
+ var line = firstLine + secondLine;
+
+ this.$lines.splice(row, 2, line);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: this.getNewLineCharacter()
+ };
+ this._signal("change", { data: delta });
+ };
+ this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length == 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ if (text) {
+ var end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ var delta = deltas[i];
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this.insertLines(range.start.row, delta.lines);
+ else if (delta.action == "insertText")
+ this.insert(range.start, delta.text);
+ else if (delta.action == "removeLines")
+ this._removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "removeText")
+ this.remove(range);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ var delta = deltas[i];
+
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this._removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "insertText")
+ this.remove(range);
+ else if (delta.action == "removeLines")
+ this._insertLines(range.start.row, delta.lines);
+ else if (delta.action == "removeText")
+ this.insert(range.start, delta.text);
+ }
+ };
+ this.indexToPosition = function(index, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
+ index -= lines[i].length + newlineLength;
+ if (index < 0)
+ return {row: i, column: index + lines[i].length + newlineLength};
+ }
+ return {row: l-1, column: lines[l-1].length};
+ };
+ this.positionToIndex = function(pos, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ var index = 0;
+ var row = Math.min(pos.row, lines.length);
+ for (var i = startRow || 0; i < row; ++i)
+ index += lines[i].length + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+
+var Mirror = exports.Mirror = function(sender) {
+ this.sender = sender;
+ var doc = this.doc = new Document("");
+
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ doc.applyDeltas(e.data);
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(function() {
+
+ this.$timeout = 500;
+
+ this.setTimeout = function(timeout) {
+ this.$timeout = timeout;
+ };
+
+ this.setValue = function(value) {
+ this.doc.setValue(value);
+ this.deferredUpdate.schedule(this.$timeout);
+ };
+
+ this.getValue = function(callbackId) {
+ this.sender.callback(this.doc.getValue(), callbackId);
+ };
+
+ this.onUpdate = function() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/css/csslint",["require","exports","module"], function(require, exports, module) {
var parserlib = {};
(function(){
function EventTarget(){
- this._listeners = {};
+ this._listeners = {};
}
EventTarget.prototype = {
@@ -2038,7 +1347,7 @@ EventTarget.prototype = {
}
this._listeners[type].push(listener);
- },
+ },
fire: function(event){
if (typeof event == "string"){
event = { type: event };
@@ -2046,17 +1355,17 @@ EventTarget.prototype = {
if (typeof event.target != "undefined"){
event.target = this;
}
-
+
if (typeof event.type == "undefined"){
throw new Error("Event object missing 'type' property.");
}
-
+
if (this._listeners[event.type]){
var listeners = this._listeners[event.type].concat();
for (var i=0, len=listeners.length; i < len; i++){
listeners[i].call(this, event);
}
- }
+ }
},
removeListener: function(type, listener){
if (this._listeners[type]){
@@ -2067,9 +1376,9 @@ EventTarget.prototype = {
break;
}
}
-
-
- }
+
+
+ }
}
};
function StringReader(text){
@@ -2205,7 +1514,7 @@ SyntaxUnit.fromToken = function(token){
SyntaxUnit.prototype = {
constructor: SyntaxUnit,
valueOf: function(){
- return this.toString();
+ return this.text;
},
toString: function(){
return this.text;
@@ -2218,7 +1527,7 @@ function TokenStreamBase(input, tokenData){
this._tokenData = tokenData;
this._lt = [];
this._ltIndex = 0;
-
+
this._ltIndexCache = [];
}
TokenStreamBase.createTokenData = function(tokens){
@@ -2228,7 +1537,7 @@ TokenStreamBase.createTokenData = function(tokens){
tokenData = tokens.concat([]),
i = 0,
len = tokenData.length+1;
-
+
tokenData.UNKNOWN = -1;
tokenData.unshift({name:"EOF"});
@@ -2239,29 +1548,29 @@ TokenStreamBase.createTokenData = function(tokens){
typeMap[tokenData[i].text] = i;
}
}
-
+
tokenData.name = function(tt){
return nameMap[tt];
};
-
+
tokenData.type = function(c){
return typeMap[c];
};
-
+
return tokenData;
};
TokenStreamBase.prototype = {
- constructor: TokenStreamBase,
+ constructor: TokenStreamBase,
match: function(tokenTypes, channel){
if (!(tokenTypes instanceof Array)){
tokenTypes = [tokenTypes];
}
-
+
var tt = this.get(channel),
i = 0,
len = tokenTypes.length;
-
+
while(i < len){
if (tt == tokenTypes[i++]){
return true;
@@ -2269,7 +1578,7 @@ TokenStreamBase.prototype = {
}
this.unget();
return false;
- },
+ },
mustMatch: function(tokenTypes, channel){
var token;
@@ -2277,22 +1586,22 @@ TokenStreamBase.prototype = {
tokenTypes = [tokenTypes];
}
- if (!this.match.apply(this, arguments)){
+ if (!this.match.apply(this, arguments)){
token = this.LT(1);
- throw new SyntaxError("Expected " + this._tokenData[tokenTypes[0]].name +
+ throw new SyntaxError("Expected " + this._tokenData[tokenTypes[0]].name +
" at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
}
},
advance: function(tokenTypes, channel){
-
+
while(this.LA(0) !== 0 && !this.match(tokenTypes, channel)){
this.get();
}
- return this.LA(0);
- },
+ return this.LA(0);
+ },
get: function(channel){
-
+
var tokenInfo = this._tokenData,
reader = this._reader,
value,
@@ -2301,8 +1610,8 @@ TokenStreamBase.prototype = {
found = false,
token,
info;
- if (this._lt.length && this._ltIndex >= 0 && this._ltIndex < this._lt.length){
-
+ if (this._lt.length && this._ltIndex >= 0 && this._ltIndex < this._lt.length){
+
i++;
this._token = this._lt[this._ltIndex++];
info = tokenInfo[this._token.type];
@@ -2323,9 +1632,9 @@ TokenStreamBase.prototype = {
token.channel = tokenInfo[token.type].channel;
this._token = token;
this._lt.push(token);
- this._ltIndexCache.push(this._lt.length - this._ltIndex + i);
+ this._ltIndexCache.push(this._lt.length - this._ltIndex + i);
if (this._lt.length > 5){
- this._lt.shift();
+ this._lt.shift();
}
if (this._ltIndexCache.length > 5){
this._ltIndexCache.shift();
@@ -2333,8 +1642,8 @@ TokenStreamBase.prototype = {
this._ltIndex = this._lt.length;
}
info = tokenInfo[token.type];
- if (info &&
- (info.hide ||
+ if (info &&
+ (info.hide ||
(info.channel !== undefined && channel !== info.channel))){
return this.get(channel);
} else {
@@ -2349,31 +1658,31 @@ TokenStreamBase.prototype = {
throw new Error("Too much lookahead.");
}
while(total){
- tt = this.get();
- total--;
+ tt = this.get();
+ total--;
}
while(total < index){
this.unget();
total++;
}
} else if (index < 0){
-
+
if(this._lt[this._ltIndex+index]){
tt = this._lt[this._ltIndex+index].type;
} else {
throw new Error("Too much lookbehind.");
}
-
+
} else {
tt = this._token.type;
}
-
+
return tt;
-
- },
+
+ },
LT: function(index){
this.LA(index);
- return this._lt[this._ltIndex+index-1];
+ return this._lt[this._ltIndex+index-1];
},
peek: function(){
return this.LA(1);
@@ -2387,10 +1696,10 @@ TokenStreamBase.prototype = {
} else {
return this._tokenData[tokenType].name;
}
- },
+ },
tokenType: function(tokenName){
return this._tokenData[tokenName] || -1;
- },
+ },
unget: function(){
if (this._ltIndexCache.length){
this._ltIndex -= this._ltIndexCache.pop();//--;
@@ -2403,8 +1712,6 @@ TokenStreamBase.prototype = {
};
-
-
parserlib.util = {
StringReader: StringReader,
SyntaxError : SyntaxError,
@@ -2420,7 +1727,6 @@ StringReader = parserlib.util.StringReader,
SyntaxError = parserlib.util.SyntaxError,
SyntaxUnit = parserlib.util.SyntaxUnit;
-
var Colors = {
aliceblue :"#f0f8ff",
antiquewhite :"#faebd7",
@@ -2447,6 +1753,7 @@ var Colors = {
darkcyan :"#008b8b",
darkgoldenrod :"#b8860b",
darkgray :"#a9a9a9",
+ darkgrey :"#a9a9a9",
darkgreen :"#006400",
darkkhaki :"#bdb76b",
darkmagenta :"#8b008b",
@@ -2458,11 +1765,13 @@ var Colors = {
darkseagreen :"#8fbc8f",
darkslateblue :"#483d8b",
darkslategray :"#2f4f4f",
+ darkslategrey :"#2f4f4f",
darkturquoise :"#00ced1",
darkviolet :"#9400d3",
deeppink :"#ff1493",
deepskyblue :"#00bfff",
dimgray :"#696969",
+ dimgrey :"#696969",
dodgerblue :"#1e90ff",
firebrick :"#b22222",
floralwhite :"#fffaf0",
@@ -2473,6 +1782,7 @@ var Colors = {
gold :"#ffd700",
goldenrod :"#daa520",
gray :"#808080",
+ grey :"#808080",
green :"#008000",
greenyellow :"#adff2f",
honeydew :"#f0fff0",
@@ -2490,12 +1800,14 @@ var Colors = {
lightcyan :"#e0ffff",
lightgoldenrodyellow :"#fafad2",
lightgray :"#d3d3d3",
+ lightgrey :"#d3d3d3",
lightgreen :"#90ee90",
lightpink :"#ffb6c1",
lightsalmon :"#ffa07a",
lightseagreen :"#20b2aa",
lightskyblue :"#87cefa",
lightslategray :"#778899",
+ lightslategrey :"#778899",
lightsteelblue :"#b0c4de",
lightyellow :"#ffffe0",
lime :"#00ff00",
@@ -2548,6 +1860,7 @@ var Colors = {
skyblue :"#87ceeb",
slateblue :"#6a5acd",
slategray :"#708090",
+ slategrey :"#708090",
snow :"#fffafa",
springgreen :"#00ff7f",
steelblue :"#4682b4",
@@ -2572,6 +1885,7 @@ var Colors = {
buttontext :"Text on push buttons.",
captiontext :"Text in caption, size box, and scrollbar arrow box.",
graytext :"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",
+ greytext :"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.",
highlight :"Item(s) selected in a control.",
highlighttext :"Text of item(s) selected in a control.",
inactiveborder :"Inactive window border.",
@@ -2592,7 +1906,7 @@ var Colors = {
windowtext :"Text in windows."
};
function Combinator(text, line, col){
-
+
SyntaxUnit.call(this, text, line, col, Parser.COMBINATOR_TYPE);
this.type = "unknown";
if (/^\s+$/.test(text)){
@@ -2610,7 +1924,7 @@ function Combinator(text, line, col){
Combinator.prototype = new SyntaxUnit();
Combinator.prototype.constructor = Combinator;
function MediaFeature(name, value){
-
+
SyntaxUnit.call(this, "(" + name + (value !== null ? ":" + value : "") + ")", name.startLine, name.startCol, Parser.MEDIA_FEATURE_TYPE);
this.name = name;
this.value = value;
@@ -2619,7 +1933,7 @@ function MediaFeature(name, value){
MediaFeature.prototype = new SyntaxUnit();
MediaFeature.prototype.constructor = MediaFeature;
function MediaQuery(modifier, mediaType, features, line, col){
-
+
SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType : "") + (mediaType && features.length > 0 ? " and " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE);
this.modifier = modifier;
this.mediaType = mediaType;
@@ -2663,19 +1977,19 @@ Parser.prototype = function(){
PROPERTY_VALUE_PART_TYPE : 6,
SELECTOR_TYPE : 7,
SELECTOR_PART_TYPE : 8,
- SELECTOR_SUB_PART_TYPE : 9,
-
- _stylesheet: function(){
-
+ SELECTOR_SUB_PART_TYPE : 9,
+
+ _stylesheet: function(){
+
var tokenStream = this._tokenStream,
charset = null,
count,
token,
tt;
-
+
this.fire("startstylesheet");
this._charset();
-
+
this._skipCruft();
while (tokenStream.peek() == Tokens.IMPORT_SYM){
this._import();
@@ -2687,26 +2001,30 @@ Parser.prototype = function(){
}
tt = tokenStream.peek();
while(tt > Tokens.EOF){
-
+
try {
-
+
switch(tt){
case Tokens.MEDIA_SYM:
this._media();
this._skipCruft();
break;
case Tokens.PAGE_SYM:
- this._page();
+ this._page();
this._skipCruft();
- break;
+ break;
case Tokens.FONT_FACE_SYM:
- this._font_face();
+ this._font_face();
this._skipCruft();
- break;
+ break;
case Tokens.KEYFRAMES_SYM:
- this._keyframes();
+ this._keyframes();
this._skipCruft();
- break;
+ break;
+ case Tokens.VIEWPORT_SYM:
+ this._viewport();
+ this._skipCruft();
+ break;
case Tokens.UNKNOWN_SYM: //unknown @ rule
tokenStream.get();
if (!this.options.strict){
@@ -2716,25 +2034,25 @@ Parser.prototype = function(){
message: "Unknown @ rule: " + tokenStream.LT(0).value + ".",
line: tokenStream.LT(0).startLine,
col: tokenStream.LT(0).startCol
- });
+ });
count=0;
while (tokenStream.advance([Tokens.LBRACE, Tokens.RBRACE]) == Tokens.LBRACE){
count++; //keep track of nesting depth
}
-
+
while(count){
tokenStream.advance([Tokens.RBRACE]);
count--;
}
-
+
} else {
throw new SyntaxError("Unknown @ rule.", tokenStream.LT(0).startLine, tokenStream.LT(0).startCol);
- }
+ }
break;
case Tokens.S:
this._readWhitespace();
break;
- default:
+ default:
if(!this._ruleset()){
switch(tt){
case Tokens.CHARSET_SYM:
@@ -2753,7 +2071,7 @@ Parser.prototype = function(){
tokenStream.get(); //get the last token
this._unexpectedToken(tokenStream.token());
}
-
+
}
}
} catch(ex) {
@@ -2764,55 +2082,55 @@ Parser.prototype = function(){
message: ex.message,
line: ex.line,
col: ex.col
- });
+ });
} else {
throw ex;
}
}
-
+
tt = tokenStream.peek();
}
-
+
if (tt != Tokens.EOF){
this._unexpectedToken(tokenStream.token());
}
-
+
this.fire("endstylesheet");
},
-
+
_charset: function(emit){
var tokenStream = this._tokenStream,
charset,
token,
line,
col;
-
+
if (tokenStream.match(Tokens.CHARSET_SYM)){
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
-
+
this._readWhitespace();
tokenStream.mustMatch(Tokens.STRING);
-
+
token = tokenStream.token();
charset = token.value;
-
+
this._readWhitespace();
tokenStream.mustMatch(Tokens.SEMICOLON);
-
+
if (emit !== false){
- this.fire({
+ this.fire({
type: "charset",
charset:charset,
line: line,
col: col
});
}
- }
+ }
},
-
- _import: function(emit){
-
+
+ _import: function(emit){
+
var tokenStream = this._tokenStream,
tt,
uri,
@@ -2821,16 +2139,16 @@ Parser.prototype = function(){
tokenStream.mustMatch(Tokens.IMPORT_SYM);
importToken = tokenStream.token();
this._readWhitespace();
-
+
tokenStream.mustMatch([Tokens.STRING, Tokens.URI]);
- uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1");
+ uri = tokenStream.token().value.replace(/^(?:url\()?["']?([^"']+?)["']?\)?$/, "$1");
this._readWhitespace();
-
+
mediaList = this._media_query_list();
tokenStream.mustMatch(Tokens.SEMICOLON);
this._readWhitespace();
-
+
if (emit !== false){
this.fire({
type: "import",
@@ -2840,11 +2158,11 @@ Parser.prototype = function(){
col: importToken.startCol
});
}
-
+
},
-
- _namespace: function(emit){
-
+
+ _namespace: function(emit){
+
var tokenStream = this._tokenStream,
line,
col,
@@ -2858,14 +2176,14 @@ Parser.prototype = function(){
prefix = tokenStream.token().value;
this._readWhitespace();
}
-
+
tokenStream.mustMatch([Tokens.STRING, Tokens.URI]);
- uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1");
+ uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1");
this._readWhitespace();
tokenStream.mustMatch(Tokens.SEMICOLON);
this._readWhitespace();
-
+
if (emit !== false){
this.fire({
type: "namespace",
@@ -2875,9 +2193,9 @@ Parser.prototype = function(){
col: col
});
}
-
- },
-
+
+ },
+
_media: function(){
var tokenStream = this._tokenStream,
line,
@@ -2886,55 +2204,59 @@ Parser.prototype = function(){
tokenStream.mustMatch(Tokens.MEDIA_SYM);
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
-
- this._readWhitespace();
+
+ this._readWhitespace();
mediaList = this._media_query_list();
tokenStream.mustMatch(Tokens.LBRACE);
this._readWhitespace();
-
+
this.fire({
type: "startmedia",
media: mediaList,
line: line,
col: col
});
-
+
while(true) {
if (tokenStream.peek() == Tokens.PAGE_SYM){
this._page();
+ } else if (tokenStream.peek() == Tokens.FONT_FACE_SYM){
+ this._font_face();
+ } else if (tokenStream.peek() == Tokens.VIEWPORT_SYM){
+ this._viewport();
} else if (!this._ruleset()){
break;
- }
+ }
}
-
+
tokenStream.mustMatch(Tokens.RBRACE);
this._readWhitespace();
-
+
this.fire({
type: "endmedia",
media: mediaList,
line: line,
col: col
});
- },
+ },
_media_query_list: function(){
var tokenStream = this._tokenStream,
mediaList = [];
-
-
+
+
this._readWhitespace();
-
+
if (tokenStream.peek() == Tokens.IDENT || tokenStream.peek() == Tokens.LPAREN){
mediaList.push(this._media_query());
}
-
+
while(tokenStream.match(Tokens.COMMA)){
this._readWhitespace();
mediaList.push(this._media_query());
}
-
+
return mediaList;
},
_media_query: function(){
@@ -2943,7 +2265,7 @@ Parser.prototype = function(){
ident = null,
token = null,
expressions = [];
-
+
if (tokenStream.match(Tokens.IDENT)){
ident = tokenStream.token().value.toLowerCase();
if (ident != "only" && ident != "not"){
@@ -2953,9 +2275,9 @@ Parser.prototype = function(){
token = tokenStream.token();
}
}
-
+
this._readWhitespace();
-
+
if (tokenStream.peek() == Tokens.IDENT){
type = this._media_type();
if (token === null){
@@ -2966,17 +2288,17 @@ Parser.prototype = function(){
token = tokenStream.LT(1);
}
expressions.push(this._media_expression());
- }
-
+ }
+
if (type === null && expressions.length === 0){
return null;
- } else {
+ } else {
this._readWhitespace();
while (tokenStream.match(Tokens.IDENT)){
if (tokenStream.token().value.toLowerCase() != "and"){
this._unexpectedToken(tokenStream.token());
}
-
+
this._readWhitespace();
expressions.push(this._media_expression());
}
@@ -2985,38 +2307,38 @@ Parser.prototype = function(){
return new MediaQuery(ident, type, expressions, token.startLine, token.startCol);
},
_media_type: function(){
- return this._media_feature();
+ return this._media_feature();
},
_media_expression: function(){
var tokenStream = this._tokenStream,
feature = null,
token,
expression = null;
-
+
tokenStream.mustMatch(Tokens.LPAREN);
-
+
feature = this._media_feature();
this._readWhitespace();
-
+
if (tokenStream.match(Tokens.COLON)){
this._readWhitespace();
token = tokenStream.LT(1);
expression = this._expression();
}
-
+
tokenStream.mustMatch(Tokens.RPAREN);
this._readWhitespace();
- return new MediaFeature(feature, (expression ? new SyntaxUnit(expression, token.startLine, token.startCol) : null));
+ return new MediaFeature(feature, (expression ? new SyntaxUnit(expression, token.startLine, token.startCol) : null));
},
_media_feature: function(){
var tokenStream = this._tokenStream;
-
+
tokenStream.mustMatch(Tokens.IDENT);
-
- return SyntaxUnit.fromToken(tokenStream.token());
+
+ return SyntaxUnit.fromToken(tokenStream.token());
},
- _page: function(){
+ _page: function(){
var tokenStream = this._tokenStream,
line,
col,
@@ -3025,39 +2347,39 @@ Parser.prototype = function(){
tokenStream.mustMatch(Tokens.PAGE_SYM);
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
-
+
this._readWhitespace();
-
+
if (tokenStream.match(Tokens.IDENT)){
identifier = tokenStream.token().value;
if (identifier.toLowerCase() === "auto"){
this._unexpectedToken(tokenStream.token());
}
- }
+ }
if (tokenStream.peek() == Tokens.COLON){
pseudoPage = this._pseudo_page();
}
-
+
this._readWhitespace();
-
+
this.fire({
type: "startpage",
id: identifier,
pseudo: pseudoPage,
line: line,
col: col
- });
+ });
+
+ this._readDeclarations(true, true);
- this._readDeclarations(true, true);
-
this.fire({
type: "endpage",
id: identifier,
pseudo: pseudoPage,
line: line,
col: col
- });
-
+ });
+
},
_margin: function(){
var tokenStream = this._tokenStream,
@@ -3068,14 +2390,14 @@ Parser.prototype = function(){
if (marginSym){
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
-
+
this.fire({
type: "startpagemargin",
margin: marginSym,
line: line,
col: col
- });
-
+ });
+
this._readDeclarations(true);
this.fire({
@@ -3083,108 +2405,135 @@ Parser.prototype = function(){
margin: marginSym,
line: line,
col: col
- });
+ });
return true;
} else {
return false;
}
},
_margin_sym: function(){
-
+
var tokenStream = this._tokenStream;
-
+
if(tokenStream.match([Tokens.TOPLEFTCORNER_SYM, Tokens.TOPLEFT_SYM,
Tokens.TOPCENTER_SYM, Tokens.TOPRIGHT_SYM, Tokens.TOPRIGHTCORNER_SYM,
- Tokens.BOTTOMLEFTCORNER_SYM, Tokens.BOTTOMLEFT_SYM,
+ Tokens.BOTTOMLEFTCORNER_SYM, Tokens.BOTTOMLEFT_SYM,
Tokens.BOTTOMCENTER_SYM, Tokens.BOTTOMRIGHT_SYM,
- Tokens.BOTTOMRIGHTCORNER_SYM, Tokens.LEFTTOP_SYM,
+ Tokens.BOTTOMRIGHTCORNER_SYM, Tokens.LEFTTOP_SYM,
Tokens.LEFTMIDDLE_SYM, Tokens.LEFTBOTTOM_SYM, Tokens.RIGHTTOP_SYM,
Tokens.RIGHTMIDDLE_SYM, Tokens.RIGHTBOTTOM_SYM]))
{
- return SyntaxUnit.fromToken(tokenStream.token());
+ return SyntaxUnit.fromToken(tokenStream.token());
} else {
return null;
}
-
+
},
-
+
_pseudo_page: function(){
-
+
var tokenStream = this._tokenStream;
-
+
tokenStream.mustMatch(Tokens.COLON);
tokenStream.mustMatch(Tokens.IDENT);
-
+
return tokenStream.token().value;
},
-
- _font_face: function(){
+
+ _font_face: function(){
var tokenStream = this._tokenStream,
line,
col;
tokenStream.mustMatch(Tokens.FONT_FACE_SYM);
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
-
+
this._readWhitespace();
this.fire({
type: "startfontface",
line: line,
col: col
- });
-
+ });
+
this._readDeclarations(true);
-
+
this.fire({
type: "endfontface",
line: line,
col: col
- });
+ });
},
- _operator: function(inFunction){
-
+ _viewport: function(){
+ var tokenStream = this._tokenStream,
+ line,
+ col;
+
+ tokenStream.mustMatch(Tokens.VIEWPORT_SYM);
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+
+ this._readWhitespace();
+
+ this.fire({
+ type: "startviewport",
+ line: line,
+ col: col
+ });
+
+ this._readDeclarations(true);
+
+ this.fire({
+ type: "endviewport",
+ line: line,
+ col: col
+ });
+
+ },
+
+ _operator: function(inFunction){
+
var tokenStream = this._tokenStream,
token = null;
-
+
if (tokenStream.match([Tokens.SLASH, Tokens.COMMA]) ||
(inFunction && tokenStream.match([Tokens.PLUS, Tokens.STAR, Tokens.MINUS]))){
token = tokenStream.token();
this._readWhitespace();
- }
+ }
return token ? PropertyValuePart.fromToken(token) : null;
-
+
},
-
- _combinator: function(){
-
+
+ _combinator: function(){
+
var tokenStream = this._tokenStream,
value = null,
token;
-
- if(tokenStream.match([Tokens.PLUS, Tokens.GREATER, Tokens.TILDE])){
+
+ if(tokenStream.match([Tokens.PLUS, Tokens.GREATER, Tokens.TILDE])){
token = tokenStream.token();
value = new Combinator(token.value, token.startLine, token.startCol);
this._readWhitespace();
}
-
+
return value;
},
-
+
_unary_operator: function(){
-
+
var tokenStream = this._tokenStream;
-
+
if (tokenStream.match([Tokens.MINUS, Tokens.PLUS])){
return tokenStream.token().value;
} else {
return null;
- }
+ }
},
-
+
_property: function(){
-
+
var tokenStream = this._tokenStream,
value = null,
hack = null,
@@ -3199,7 +2548,7 @@ Parser.prototype = function(){
line = token.startLine;
col = token.startCol;
}
-
+
if(tokenStream.match(Tokens.IDENT)){
token = tokenStream.token();
tokenValue = token.value;
@@ -3207,15 +2556,15 @@ Parser.prototype = function(){
hack = "_";
tokenValue = tokenValue.substring(1);
}
-
+
value = new PropertyName(tokenValue, hack, (line||token.startLine), (col||token.startCol));
this._readWhitespace();
}
-
+
return value;
},
- _ruleset: function(){
-
+ _ruleset: function(){
+
var tokenStream = this._tokenStream,
tt,
selectors;
@@ -3229,49 +2578,49 @@ Parser.prototype = function(){
message: ex.message,
line: ex.line,
col: ex.col
- });
+ });
tt = tokenStream.advance([Tokens.RBRACE]);
if (tt == Tokens.RBRACE){
} else {
throw ex;
- }
-
+ }
+
} else {
throw ex;
- }
+ }
return true;
}
- if (selectors){
-
+ if (selectors){
+
this.fire({
type: "startrule",
selectors: selectors,
line: selectors[0].line,
col: selectors[0].col
- });
-
- this._readDeclarations(true);
-
+ });
+
+ this._readDeclarations(true);
+
this.fire({
type: "endrule",
selectors: selectors,
line: selectors[0].line,
col: selectors[0].col
- });
-
+ });
+
}
-
+
return selectors;
-
+
},
- _selectors_group: function(){
+ _selectors_group: function(){
var tokenStream = this._tokenStream,
selectors = [],
selector;
-
+
selector = this._selector();
if (selector !== null){
-
+
selectors.push(selector);
while(tokenStream.match(Tokens.COMMA)){
this._readWhitespace();
@@ -3287,7 +2636,7 @@ Parser.prototype = function(){
return selectors.length ? selectors : null;
},
_selector: function(){
-
+
var tokenStream = this._tokenStream,
selector = [],
nextSelector = null,
@@ -3297,12 +2646,12 @@ Parser.prototype = function(){
if (nextSelector === null){
return null;
}
-
+
selector.push(nextSelector);
-
+
do {
combinator = this._combinator();
-
+
if (combinator !== null){
selector.push(combinator);
nextSelector = this._simple_selector_sequence();
@@ -3312,35 +2661,35 @@ Parser.prototype = function(){
selector.push(nextSelector);
}
} else {
- if (this._readWhitespace()){
+ if (this._readWhitespace()){
ws = new Combinator(tokenStream.token().value, tokenStream.token().startLine, tokenStream.token().startCol);
combinator = this._combinator();
nextSelector = this._simple_selector_sequence();
- if (nextSelector === null){
+ if (nextSelector === null){
if (combinator !== null){
this._unexpectedToken(tokenStream.LT(1));
}
} else {
-
+
if (combinator !== null){
selector.push(combinator);
} else {
selector.push(ws);
}
-
+
selector.push(nextSelector);
- }
+ }
} else {
break;
- }
-
+ }
+
}
} while(true);
-
+
return new Selector(selector, selector[0].line, selector[0].col);
},
_simple_selector_sequence: function(){
-
+
var tokenStream = this._tokenStream,
elementName = null,
modifiers = [],
@@ -3364,16 +2713,16 @@ Parser.prototype = function(){
col;
line = tokenStream.LT(1).startLine;
col = tokenStream.LT(1).startCol;
-
+
elementName = this._type_selector();
if (!elementName){
elementName = this._universal();
}
-
+
if (elementName !== null){
selectorText += elementName;
- }
-
+ }
+
while(true){
if (tokenStream.peek() === Tokens.S){
break;
@@ -3381,7 +2730,7 @@ Parser.prototype = function(){
while(i < len && component === null){
component = components[i++].call(this);
}
-
+
if (component === null){
if (selectorText === ""){
return null;
@@ -3391,32 +2740,32 @@ Parser.prototype = function(){
} else {
i = 0;
modifiers.push(component);
- selectorText += component.toString();
+ selectorText += component.toString();
component = null;
}
}
-
+
return selectorText !== "" ?
new SelectorPart(elementName, modifiers, selectorText, line, col) :
null;
- },
+ },
_type_selector: function(){
-
+
var tokenStream = this._tokenStream,
ns = this._namespace_prefix(),
elementName = this._element_name();
-
- if (!elementName){
+
+ if (!elementName){
if (ns){
tokenStream.unget();
if (ns.length > 1){
tokenStream.unget();
}
}
-
+
return null;
- } else {
+ } else {
if (ns){
elementName.text = ns + elementName.text;
elementName.col -= ns.length;
@@ -3424,29 +2773,29 @@ Parser.prototype = function(){
return elementName;
}
},
- _class: function(){
-
+ _class: function(){
+
var tokenStream = this._tokenStream,
token;
-
+
if (tokenStream.match(Tokens.DOT)){
- tokenStream.mustMatch(Tokens.IDENT);
+ tokenStream.mustMatch(Tokens.IDENT);
token = tokenStream.token();
- return new SelectorSubPart("." + token.value, "class", token.startLine, token.startCol - 1);
+ return new SelectorSubPart("." + token.value, "class", token.startLine, token.startCol - 1);
} else {
return null;
}
-
+
},
- _element_name: function(){
-
+ _element_name: function(){
+
var tokenStream = this._tokenStream,
token;
-
+
if (tokenStream.match(Tokens.IDENT)){
token = tokenStream.token();
- return new SelectorSubPart(token.value, "elementName", token.startLine, token.startCol);
-
+ return new SelectorSubPart(token.value, "elementName", token.startLine, token.startCol);
+
} else {
return null;
}
@@ -3455,89 +2804,89 @@ Parser.prototype = function(){
var tokenStream = this._tokenStream,
value = "";
if (tokenStream.LA(1) === Tokens.PIPE || tokenStream.LA(2) === Tokens.PIPE){
-
+
if(tokenStream.match([Tokens.IDENT, Tokens.STAR])){
value += tokenStream.token().value;
}
-
+
tokenStream.mustMatch(Tokens.PIPE);
value += "|";
-
+
}
-
- return value.length ? value : null;
+
+ return value.length ? value : null;
},
_universal: function(){
var tokenStream = this._tokenStream,
value = "",
ns;
-
+
ns = this._namespace_prefix();
if(ns){
value += ns;
}
-
+
if(tokenStream.match(Tokens.STAR)){
value += "*";
}
-
+
return value.length ? value : null;
-
+
},
_attrib: function(){
-
+
var tokenStream = this._tokenStream,
value = null,
ns,
token;
-
+
if (tokenStream.match(Tokens.LBRACKET)){
token = tokenStream.token();
value = token.value;
value += this._readWhitespace();
-
+
ns = this._namespace_prefix();
-
+
if (ns){
value += ns;
}
-
+
tokenStream.mustMatch(Tokens.IDENT);
- value += tokenStream.token().value;
+ value += tokenStream.token().value;
value += this._readWhitespace();
-
+
if(tokenStream.match([Tokens.PREFIXMATCH, Tokens.SUFFIXMATCH, Tokens.SUBSTRINGMATCH,
Tokens.EQUALS, Tokens.INCLUDES, Tokens.DASHMATCH])){
-
- value += tokenStream.token().value;
+
+ value += tokenStream.token().value;
value += this._readWhitespace();
-
+
tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]);
- value += tokenStream.token().value;
+ value += tokenStream.token().value;
value += this._readWhitespace();
}
-
+
tokenStream.mustMatch(Tokens.RBRACKET);
-
+
return new SelectorSubPart(value + "]", "attribute", token.startLine, token.startCol);
} else {
return null;
}
},
- _pseudo: function(){
-
+ _pseudo: function(){
+
var tokenStream = this._tokenStream,
pseudo = null,
colons = ":",
line,
col;
-
+
if (tokenStream.match(Tokens.COLON)){
-
+
if (tokenStream.match(Tokens.COLON)){
colons += ":";
}
-
+
if (tokenStream.match(Tokens.IDENT)){
pseudo = tokenStream.token().value;
line = tokenStream.token().startLine;
@@ -3547,19 +2896,19 @@ Parser.prototype = function(){
col = tokenStream.LT(1).startCol - colons.length;
pseudo = this._functional_pseudo();
}
-
+
if (pseudo){
pseudo = new SelectorSubPart(colons + pseudo, "pseudo", line, col);
}
}
-
+
return pseudo;
},
- _functional_pseudo: function(){
-
+ _functional_pseudo: function(){
+
var tokenStream = this._tokenStream,
value = null;
-
+
if(tokenStream.match(Tokens.FUNCTION)){
value = tokenStream.token().value;
value += this._readWhitespace();
@@ -3567,25 +2916,25 @@ Parser.prototype = function(){
tokenStream.mustMatch(Tokens.RPAREN);
value += ")";
}
-
+
return value;
},
_expression: function(){
-
+
var tokenStream = this._tokenStream,
value = "";
-
+
while(tokenStream.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION,
Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH,
Tokens.FREQ, Tokens.ANGLE, Tokens.TIME,
Tokens.RESOLUTION, Tokens.SLASH])){
-
+
value += tokenStream.token().value;
- value += this._readWhitespace();
+ value += this._readWhitespace();
}
-
+
return value.length ? value : null;
-
+
},
_negation: function(){
@@ -3595,7 +2944,7 @@ Parser.prototype = function(){
value = "",
arg,
subpart = null;
-
+
if (tokenStream.match(Tokens.NOT)){
value = tokenStream.token().value;
line = tokenStream.token().startLine;
@@ -3606,15 +2955,15 @@ Parser.prototype = function(){
value += this._readWhitespace();
tokenStream.match(Tokens.RPAREN);
value += tokenStream.token().value;
-
+
subpart = new SelectorSubPart(value, "not", line, col);
subpart.args.push(arg);
}
-
+
return subpart;
},
- _negation_arg: function(){
-
+ _negation_arg: function(){
+
var tokenStream = this._tokenStream,
args = [
this._type_selector,
@@ -3622,11 +2971,11 @@ Parser.prototype = function(){
function(){
return tokenStream.match(Tokens.HASH) ?
new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) :
- null;
+ null;
},
this._class,
this._attrib,
- this._pseudo
+ this._pseudo
],
arg = null,
i = 0,
@@ -3635,12 +2984,12 @@ Parser.prototype = function(){
line,
col,
part;
-
+
line = tokenStream.LT(1).startLine;
col = tokenStream.LT(1).startCol;
-
+
while(i < len && arg === null){
-
+
arg = args[i].call(this);
i++;
}
@@ -3652,12 +3001,12 @@ Parser.prototype = function(){
} else {
part = new SelectorPart(null, [arg], arg.toString(), line, col);
}
-
- return part;
+
+ return part;
},
-
- _declaration: function(){
-
+
+ _declaration: function(){
+
var tokenStream = this._tokenStream,
property = null,
expr = null,
@@ -3665,32 +3014,32 @@ Parser.prototype = function(){
error = null,
invalid = null,
propertyName= "";
-
+
property = this._property();
if (property !== null){
tokenStream.mustMatch(Tokens.COLON);
this._readWhitespace();
-
+
expr = this._expr();
if (!expr || expr.length === 0){
this._unexpectedToken(tokenStream.LT(1));
}
-
+
prio = this._prio();
propertyName = property.toString();
if (this.options.starHack && property.hack == "*" ||
this.options.underscoreHack && property.hack == "_") {
-
+
propertyName = property.text;
}
-
+
try {
this._validateProperty(propertyName, expr);
} catch (ex) {
invalid = ex;
}
-
+
this.fire({
type: "property",
property: property,
@@ -3699,35 +3048,35 @@ Parser.prototype = function(){
line: property.line,
col: property.col,
invalid: invalid
- });
-
+ });
+
return true;
} else {
return false;
}
},
-
+
_prio: function(){
-
+
var tokenStream = this._tokenStream,
result = tokenStream.match(Tokens.IMPORTANT_SYM);
-
+
this._readWhitespace();
return result;
},
-
+
_expr: function(inFunction){
-
+
var tokenStream = this._tokenStream,
values = [],
value = null,
operator = null;
-
- value = this._term();
+
+ value = this._term(inFunction);
if (value !== null){
-
+
values.push(value);
-
+
do {
operator = this._operator(inFunction);
if (operator){
@@ -3736,9 +3085,9 @@ Parser.prototype = function(){
values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col));
valueParts = [];
}*/
-
- value = this._term();
-
+
+ value = this._term(inFunction);
+
if (value === null){
break;
} else {
@@ -3746,15 +3095,16 @@ Parser.prototype = function(){
}
} while(true);
}
-
+
return values.length > 0 ? new PropertyValue(values, values[0].line, values[0].col) : null;
},
-
- _term: function(){
-
+
+ _term: function(inFunction){
+
var tokenStream = this._tokenStream,
unary = null,
value = null,
+ endChar = null,
token,
line,
col;
@@ -3762,18 +3112,30 @@ Parser.prototype = function(){
if (unary !== null){
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
- }
+ }
if (tokenStream.peek() == Tokens.IE_FUNCTION && this.options.ieFilters){
-
+
value = this._ie_function();
if (unary === null){
line = tokenStream.token().startLine;
col = tokenStream.token().startCol;
}
+ } else if (inFunction && tokenStream.match([Tokens.LPAREN, Tokens.LBRACE, Tokens.LBRACKET])){
+
+ token = tokenStream.token();
+ endChar = token.endChar;
+ value = token.value + this._expr(inFunction).text;
+ if (unary === null){
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+ }
+ tokenStream.mustMatch(Tokens.type(endChar));
+ value += endChar;
+ this._readWhitespace();
} else if (tokenStream.match([Tokens.NUMBER, Tokens.PERCENTAGE, Tokens.LENGTH,
Tokens.ANGLE, Tokens.TIME,
Tokens.FREQ, Tokens.STRING, Tokens.IDENT, Tokens.URI, Tokens.UNICODE_RANGE])){
-
+
value = tokenStream.token().value;
if (unary === null){
line = tokenStream.token().startLine;
@@ -3786,7 +3148,7 @@ Parser.prototype = function(){
if (unary === null){
line = tokenStream.LT(1).startLine;
col = tokenStream.LT(1).startCol;
- }
+ }
if (value === null){
if (tokenStream.LA(3) == Tokens.EQUALS && this.options.ieFilters){
value = this._ie_function();
@@ -3794,30 +3156,30 @@ Parser.prototype = function(){
value = this._function();
}
}
-
+
} else {
value = token.value;
if (unary === null){
line = token.startLine;
col = token.startCol;
- }
+ }
}
-
- }
-
+
+ }
+
return value !== null ?
new PropertyValuePart(unary !== null ? unary + value : value, line, col) :
null;
-
+
},
-
+
_function: function(){
-
+
var tokenStream = this._tokenStream,
functionText = null,
expr = null,
lt;
-
+
if (tokenStream.match(Tokens.FUNCTION)){
functionText = tokenStream.token().value;
this._readWhitespace();
@@ -3825,17 +3187,17 @@ Parser.prototype = function(){
functionText += expr;
if (this.options.ieFilters && tokenStream.peek() == Tokens.EQUALS){
do {
-
+
if (this._readWhitespace()){
functionText += tokenStream.token().value;
}
if (tokenStream.LA(0) == Tokens.COMMA){
functionText += tokenStream.token().value;
}
-
+
tokenStream.match(Tokens.IDENT);
functionText += tokenStream.token().value;
-
+
tokenStream.match(Tokens.EQUALS);
functionText += tokenStream.token().value;
lt = tokenStream.peek();
@@ -3846,36 +3208,36 @@ Parser.prototype = function(){
}
} while(tokenStream.match([Tokens.COMMA, Tokens.S]));
}
-
- tokenStream.match(Tokens.RPAREN);
+
+ tokenStream.match(Tokens.RPAREN);
functionText += ")";
this._readWhitespace();
- }
-
+ }
+
return functionText;
- },
-
+ },
+
_ie_function: function(){
-
+
var tokenStream = this._tokenStream,
functionText = null,
expr = null,
lt;
if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])){
functionText = tokenStream.token().value;
-
+
do {
-
+
if (this._readWhitespace()){
functionText += tokenStream.token().value;
}
if (tokenStream.LA(0) == Tokens.COMMA){
functionText += tokenStream.token().value;
}
-
+
tokenStream.match(Tokens.IDENT);
functionText += tokenStream.token().value;
-
+
tokenStream.match(Tokens.EQUALS);
functionText += tokenStream.token().value;
lt = tokenStream.peek();
@@ -3884,24 +3246,24 @@ Parser.prototype = function(){
functionText += tokenStream.token().value;
lt = tokenStream.peek();
}
- } while(tokenStream.match([Tokens.COMMA, Tokens.S]));
-
- tokenStream.match(Tokens.RPAREN);
+ } while(tokenStream.match([Tokens.COMMA, Tokens.S]));
+
+ tokenStream.match(Tokens.RPAREN);
functionText += ")";
this._readWhitespace();
- }
-
+ }
+
return functionText;
- },
-
+ },
+
_hexcolor: function(){
-
+
var tokenStream = this._tokenStream,
token = null,
color;
-
+
if(tokenStream.match(Tokens.HASH)){
-
+
token = tokenStream.token();
color = token.value;
if (!/#[a-f0-9]{3,6}/i.test(color)){
@@ -3909,98 +3271,98 @@ Parser.prototype = function(){
}
this._readWhitespace();
}
-
+
return token;
},
-
+
_keyframes: function(){
var tokenStream = this._tokenStream,
token,
tt,
name,
- prefix = "";
-
+ prefix = "";
+
tokenStream.mustMatch(Tokens.KEYFRAMES_SYM);
token = tokenStream.token();
if (/^@\-([^\-]+)\-/.test(token.value)) {
prefix = RegExp.$1;
}
-
+
this._readWhitespace();
name = this._keyframe_name();
-
+
this._readWhitespace();
tokenStream.mustMatch(Tokens.LBRACE);
-
+
this.fire({
type: "startkeyframes",
name: name,
prefix: prefix,
line: token.startLine,
col: token.startCol
- });
-
+ });
+
this._readWhitespace();
tt = tokenStream.peek();
while(tt == Tokens.IDENT || tt == Tokens.PERCENTAGE) {
this._keyframe_rule();
this._readWhitespace();
tt = tokenStream.peek();
- }
-
+ }
+
this.fire({
type: "endkeyframes",
name: name,
prefix: prefix,
line: token.startLine,
col: token.startCol
- });
-
+ });
+
this._readWhitespace();
- tokenStream.mustMatch(Tokens.RBRACE);
-
+ tokenStream.mustMatch(Tokens.RBRACE);
+
},
-
+
_keyframe_name: function(){
var tokenStream = this._tokenStream,
token;
tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]);
- return SyntaxUnit.fromToken(tokenStream.token());
+ return SyntaxUnit.fromToken(tokenStream.token());
},
-
+
_keyframe_rule: function(){
var tokenStream = this._tokenStream,
token,
keyList = this._key_list();
-
+
this.fire({
type: "startkeyframerule",
keys: keyList,
line: keyList[0].line,
col: keyList[0].col
- });
-
- this._readDeclarations(true);
-
+ });
+
+ this._readDeclarations(true);
+
this.fire({
type: "endkeyframerule",
keys: keyList,
line: keyList[0].line,
col: keyList[0].col
- });
-
+ });
+
},
-
+
_key_list: function(){
var tokenStream = this._tokenStream,
token,
key,
keyList = [];
keyList.push(this._key());
-
+
this._readWhitespace();
-
+
while(tokenStream.match(Tokens.COMMA)){
this._readWhitespace();
keyList.push(this._key());
@@ -4009,21 +3371,21 @@ Parser.prototype = function(){
return keyList;
},
-
+
_key: function(){
-
+
var tokenStream = this._tokenStream,
token;
-
+
if (tokenStream.match(Tokens.PERCENTAGE)){
return SyntaxUnit.fromToken(tokenStream.token());
} else if (tokenStream.match(Tokens.IDENT)){
- token = tokenStream.token();
-
+ token = tokenStream.token();
+
if (/from|to/i.test(token.value)){
return SyntaxUnit.fromToken(token);
}
-
+
tokenStream.unget();
}
this._unexpectedToken(tokenStream.LT(1));
@@ -4035,20 +3397,20 @@ Parser.prototype = function(){
_readDeclarations: function(checkStart, readMargins){
var tokenStream = this._tokenStream,
tt;
-
+
this._readWhitespace();
-
+
if (checkStart){
- tokenStream.mustMatch(Tokens.LBRACE);
+ tokenStream.mustMatch(Tokens.LBRACE);
}
-
+
this._readWhitespace();
try {
-
+
while(true){
-
+
if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())){
} else if (this._declaration()){
if (!tokenStream.match(Tokens.SEMICOLON)){
@@ -4059,10 +3421,10 @@ Parser.prototype = function(){
}
this._readWhitespace();
}
-
+
tokenStream.mustMatch(Tokens.RBRACE);
this._readWhitespace();
-
+
} catch (ex) {
if (ex instanceof SyntaxError && !this.options.strict){
this.fire({
@@ -4071,29 +3433,29 @@ Parser.prototype = function(){
message: ex.message,
line: ex.line,
col: ex.col
- });
+ });
tt = tokenStream.advance([Tokens.SEMICOLON, Tokens.RBRACE]);
if (tt == Tokens.SEMICOLON){
- this._readDeclarations(false, readMargins);
+ this._readDeclarations(false, readMargins);
} else if (tt != Tokens.RBRACE){
throw ex;
- }
-
+ }
+
} else {
throw ex;
}
- }
-
- },
+ }
+
+ },
_readWhitespace: function(){
-
+
var tokenStream = this._tokenStream,
ws = "";
-
+
while(tokenStream.match(Tokens.S)){
ws += tokenStream.token().value;
}
-
+
return ws;
},
_unexpectedToken: function(token){
@@ -4102,32 +3464,32 @@ Parser.prototype = function(){
_verifyEnd: function(){
if (this._tokenStream.LA(1) != Tokens.EOF){
this._unexpectedToken(this._tokenStream.LT(1));
- }
+ }
},
_validateProperty: function(property, value){
Validation.validate(property, value);
},
-
- parse: function(input){
+
+ parse: function(input){
this._tokenStream = new TokenStream(input, Tokens);
this._stylesheet();
},
-
+
parseStyleSheet: function(input){
return this.parse(input);
},
-
+
parseMediaQuery: function(input){
this._tokenStream = new TokenStream(input, Tokens);
var result = this._media_query();
this._verifyEnd();
- return result;
- },
+ return result;
+ },
parsePropertyValue: function(input){
-
+
this._tokenStream = new TokenStream(input, Tokens);
this._readWhitespace();
-
+
var result = this._expr();
this._readWhitespace();
this._verifyEnd();
@@ -4136,17 +3498,17 @@ Parser.prototype = function(){
parseRule: function(input){
this._tokenStream = new TokenStream(input, Tokens);
this._readWhitespace();
-
+
var result = this._ruleset();
this._readWhitespace();
this._verifyEnd();
- return result;
+ return result;
},
parseSelector: function(input){
-
+
this._tokenStream = new TokenStream(input, Tokens);
this._readWhitespace();
-
+
var result = this._selector();
this._readWhitespace();
this._verifyEnd();
@@ -4162,17 +3524,24 @@ Parser.prototype = function(){
if (additions.hasOwnProperty(prop)){
proto[prop] = additions[prop];
}
- }
-
+ }
+
return proto;
}();
var Properties = {
+ "align-items" : "flex-start | flex-end | center | baseline | stretch",
+ "align-content" : "flex-start | flex-end | center | space-between | space-around | stretch",
+ "align-self" : "auto | flex-start | flex-end | center | baseline | stretch",
+ "-webkit-align-items" : "flex-start | flex-end | center | baseline | stretch",
+ "-webkit-align-content" : "flex-start | flex-end | center | space-between | space-around | stretch",
+ "-webkit-align-self" : "auto | flex-start | flex-end | center | baseline | stretch",
"alignment-adjust" : "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>",
"alignment-baseline" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
"animation" : 1,
"animation-delay" : { multi: "<time>", comma: true },
"animation-direction" : { multi: "normal | alternate", comma: true },
"animation-duration" : { multi: "<time>", comma: true },
+ "animation-fill-mode" : { multi: "none | forwards | backwards | both", comma: true },
"animation-iteration-count" : { multi: "<number> | infinite", comma: true },
"animation-name" : { multi: "none | <ident>", comma: true },
"animation-play-state" : { multi: "running | paused", comma: true },
@@ -4183,28 +3552,29 @@ var Properties = {
"-moz-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
"-moz-animation-name" : { multi: "none | <ident>", comma: true },
"-moz-animation-play-state" : { multi: "running | paused", comma: true },
-
+
"-ms-animation-delay" : { multi: "<time>", comma: true },
"-ms-animation-direction" : { multi: "normal | alternate", comma: true },
"-ms-animation-duration" : { multi: "<time>", comma: true },
"-ms-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
"-ms-animation-name" : { multi: "none | <ident>", comma: true },
"-ms-animation-play-state" : { multi: "running | paused", comma: true },
-
+
"-webkit-animation-delay" : { multi: "<time>", comma: true },
"-webkit-animation-direction" : { multi: "normal | alternate", comma: true },
"-webkit-animation-duration" : { multi: "<time>", comma: true },
+ "-webkit-animation-fill-mode" : { multi: "none | forwards | backwards | both", comma: true },
"-webkit-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
"-webkit-animation-name" : { multi: "none | <ident>", comma: true },
"-webkit-animation-play-state" : { multi: "running | paused", comma: true },
-
+
"-o-animation-delay" : { multi: "<time>", comma: true },
"-o-animation-direction" : { multi: "normal | alternate", comma: true },
"-o-animation-duration" : { multi: "<time>", comma: true },
"-o-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
"-o-animation-name" : { multi: "none | <ident>", comma: true },
- "-o-animation-play-state" : { multi: "running | paused", comma: true },
-
+ "-o-animation-play-state" : { multi: "running | paused", comma: true },
+
"appearance" : "icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal | none | inherit",
"azimuth" : function (expression) {
var simple = "<angle> | leftwards | rightwards | inherit",
@@ -4212,13 +3582,13 @@ var Properties = {
behind = false,
valid = false,
part;
-
+
if (!ValidationTypes.isAny(expression, simple)) {
if (ValidationTypes.isAny(expression, "behind")) {
behind = true;
valid = true;
}
-
+
if (ValidationTypes.isAny(expression, direction)) {
valid = true;
if (!behind) {
@@ -4226,7 +3596,7 @@ var Properties = {
}
}
}
-
+
if (expression.hasNext()) {
part = expression.next();
if (valid) {
@@ -4234,7 +3604,7 @@ var Properties = {
} else {
throw new ValidationError("Expected (<'azimuth'>) but found '" + part + "'.", part.line, part.col);
}
- }
+ }
},
"backface-visibility" : "visible | hidden",
"background" : 1,
@@ -4256,7 +3626,7 @@ var Properties = {
"bookmark-target" : "none | <uri> | <attr>",
"border" : "<border-width> || <border-style> || <color>",
"border-bottom" : "<border-width> || <border-style> || <color>",
- "border-bottom-color" : "<color>",
+ "border-bottom-color" : "<color> | inherit",
"border-bottom-left-radius" : "<x-one-radius>",
"border-bottom-right-radius" : "<x-one-radius>",
"border-bottom-style" : "<border-style>",
@@ -4267,19 +3637,19 @@ var Properties = {
"border-image-outset" : { multi: "<length> | <number>", max: 4 },
"border-image-repeat" : { multi: "stretch | repeat | round", max: 2 },
"border-image-slice" : function(expression) {
-
+
var valid = false,
numeric = "<number> | <percentage>",
fill = false,
count = 0,
max = 4,
part;
-
+
if (ValidationTypes.isAny(expression, "fill")) {
fill = true;
valid = true;
}
-
+
while (expression.hasNext() && count < max) {
valid = ValidationTypes.isAny(expression, numeric);
if (!valid) {
@@ -4287,14 +3657,14 @@ var Properties = {
}
count++;
}
-
-
+
+
if (!fill) {
ValidationTypes.isAny(expression, "fill");
} else {
valid = true;
}
-
+
if (expression.hasNext()) {
part = expression.next();
if (valid) {
@@ -4302,7 +3672,7 @@ var Properties = {
} else {
throw new ValidationError("Expected ([<number> | <percentage>]{1,4} && fill?) but found '" + part + "'.", part.line, part.col);
}
- }
+ }
},
"border-image-source" : "<image> | none",
"border-image-width" : { multi: "<length> | <percentage> | <number> | auto", max: 4 },
@@ -4311,9 +3681,9 @@ var Properties = {
"border-left-style" : "<border-style>",
"border-left-width" : "<border-width>",
"border-radius" : function(expression) {
-
+
var valid = false,
- numeric = "<length> | <percentage>",
+ simple = "<length> | <percentage> | inherit",
slash = false,
fill = false,
count = 0,
@@ -4321,9 +3691,9 @@ var Properties = {
part;
while (expression.hasNext() && count < max) {
- valid = ValidationTypes.isAny(expression, numeric);
+ valid = ValidationTypes.isAny(expression, simple);
if (!valid) {
-
+
if (expression.peek() == "/" && count > 0 && !slash) {
slash = true;
max = count + 5;
@@ -4334,7 +3704,7 @@ var Properties = {
}
count++;
}
-
+
if (expression.hasNext()) {
part = expression.next();
if (valid) {
@@ -4342,7 +3712,7 @@ var Properties = {
} else {
throw new ValidationError("Expected (<'border-radius'>) but found '" + part + "'.", part.line, part.col);
}
- }
+ }
},
"border-right" : "<border-width> || <border-style> || <color>",
"border-right-color" : "<color> | inherit",
@@ -4357,27 +3727,36 @@ var Properties = {
"border-top-style" : "<border-style>",
"border-top-width" : "<border-width>",
"border-width" : { multi: "<border-width>", max: 4 },
- "bottom" : "<margin-width> | inherit",
- "box-align" : "start | end | center | baseline | stretch", //http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/
- "box-decoration-break" : "slice |clone",
- "box-direction" : "normal | reverse | inherit",
- "box-flex" : "<number>",
- "box-flex-group" : "<integer>",
- "box-lines" : "single | multiple",
- "box-ordinal-group" : "<integer>",
- "box-orient" : "horizontal | vertical | inline-axis | block-axis | inherit",
- "box-pack" : "start | end | center | justify",
+ "bottom" : "<margin-width> | inherit",
+ "-moz-box-align" : "start | end | center | baseline | stretch",
+ "-moz-box-decoration-break" : "slice |clone",
+ "-moz-box-direction" : "normal | reverse | inherit",
+ "-moz-box-flex" : "<number>",
+ "-moz-box-flex-group" : "<integer>",
+ "-moz-box-lines" : "single | multiple",
+ "-moz-box-ordinal-group" : "<integer>",
+ "-moz-box-orient" : "horizontal | vertical | inline-axis | block-axis | inherit",
+ "-moz-box-pack" : "start | end | center | justify",
+ "-webkit-box-align" : "start | end | center | baseline | stretch",
+ "-webkit-box-decoration-break" : "slice |clone",
+ "-webkit-box-direction" : "normal | reverse | inherit",
+ "-webkit-box-flex" : "<number>",
+ "-webkit-box-flex-group" : "<integer>",
+ "-webkit-box-lines" : "single | multiple",
+ "-webkit-box-ordinal-group" : "<integer>",
+ "-webkit-box-orient" : "horizontal | vertical | inline-axis | block-axis | inherit",
+ "-webkit-box-pack" : "start | end | center | justify",
"box-shadow" : function (expression) {
var result = false,
part;
if (!ValidationTypes.isAny(expression, "none")) {
- Validation.multiProperty("<shadow>", expression, true, Infinity);
+ Validation.multiProperty("<shadow>", expression, true, Infinity);
} else {
if (expression.hasNext()) {
part = expression.next();
throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
- }
+ }
}
},
"box-sizing" : "content-box | border-box | inherit",
@@ -4408,7 +3787,7 @@ var Properties = {
"cue-before" : 1,
"cursor" : 1,
"direction" : "ltr | rtl | inherit",
- "display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker",
+ "display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | -ms-flexbox | -ms-inline-flexbox | flex | -webkit-flex | inline-flex | -webkit-inline-flex",
"dominant-baseline" : 1,
"drop-initial-after-adjust" : "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>",
"drop-initial-after-align" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
@@ -4421,7 +3800,27 @@ var Properties = {
"filter" : 1,
"fit" : "fill | hidden | meet | slice",
"fit-position" : 1,
- "float" : "left | right | none | inherit",
+ "flex" : "<flex>",
+ "flex-basis" : "<width>",
+ "flex-direction" : "row | row-reverse | column | column-reverse",
+ "flex-flow" : "<flex-direction> || <flex-wrap>",
+ "flex-grow" : "<number>",
+ "flex-shrink" : "<number>",
+ "flex-wrap" : "nowrap | wrap | wrap-reverse",
+ "-webkit-flex" : "<flex>",
+ "-webkit-flex-basis" : "<width>",
+ "-webkit-flex-direction" : "row | row-reverse | column | column-reverse",
+ "-webkit-flex-flow" : "<flex-direction> || <flex-wrap>",
+ "-webkit-flex-grow" : "<number>",
+ "-webkit-flex-shrink" : "<number>",
+ "-webkit-flex-wrap" : "nowrap | wrap | wrap-reverse",
+ "-ms-flex" : "<flex>",
+ "-ms-flex-align" : "start | end | center | stretch | baseline",
+ "-ms-flex-direction" : "row | row-reverse | column | column-reverse | inherit",
+ "-ms-flex-order" : "<number>",
+ "-ms-flex-pack" : "start | end | center | justify",
+ "-ms-flex-wrap" : "nowrap | wrap | wrap-reverse",
+ "float" : "left | right | none | inherit",
"float-offset" : 1,
"font" : 1,
"font-family" : 1,
@@ -4445,7 +3844,7 @@ var Properties = {
"grid-row-span" : "<integer>",
"grid-row-sizing" : 1,
"hanging-punctuation" : 1,
- "height" : "<margin-width> | inherit",
+ "height" : "<margin-width> | <content-sizing> | inherit",
"hyphenate-after" : "<integer> | auto",
"hyphenate-before" : "<integer> | auto",
"hyphenate-character" : "<string> | auto",
@@ -4457,6 +3856,8 @@ var Properties = {
"image-rendering" : 1,
"image-resolution" : 1,
"inline-box-align" : "initial | last | <integer>",
+ "justify-content" : "flex-start | flex-end | center | space-between | space-around",
+ "-webkit-justify-content" : "flex-start | flex-end | center | space-between | space-around",
"left" : "<margin-width> | inherit",
"letter-spacing" : "<length> | normal | inherit",
"line-height" : "<number> | <length> | <percentage> | normal | inherit",
@@ -4482,10 +3883,10 @@ var Properties = {
"marquee-play-count" : 1,
"marquee-speed" : 1,
"marquee-style" : 1,
- "max-height" : "<length> | <percentage> | none | inherit",
- "max-width" : "<length> | <percentage> | none | inherit",
- "min-height" : "<length> | <percentage> | inherit",
- "min-width" : "<length> | <percentage> | inherit",
+ "max-height" : "<length> | <percentage> | <content-sizing> | none | inherit",
+ "max-width" : "<length> | <percentage> | <content-sizing> | none | inherit",
+ "min-height" : "<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats | inherit",
+ "min-width" : "<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats | inherit",
"move-to" : 1,
"nav-down" : 1,
"nav-index" : 1,
@@ -4493,6 +3894,8 @@ var Properties = {
"nav-right" : 1,
"nav-up" : 1,
"opacity" : "<number> | inherit",
+ "order" : "<integer>",
+ "-webkit-order" : "<integer>",
"orphans" : "<integer> | inherit",
"outline" : 1,
"outline-color" : "<color> | invert | inherit",
@@ -4501,6 +3904,7 @@ var Properties = {
"outline-width" : "<border-width> | inherit",
"overflow" : "visible | hidden | scroll | auto | inherit",
"overflow-style" : 1,
+ "overflow-wrap" : "normal | break-word",
"overflow-x" : 1,
"overflow-y" : 1,
"padding" : { multi: "<padding-width> | inherit", max: 4 },
@@ -4549,7 +3953,7 @@ var Properties = {
"src" : 1,
"stress" : 1,
"string-set" : 1,
-
+
"table-layout" : "auto | fixed | inherit",
"tab-size" : "<integer> | <length>",
"target" : 1,
@@ -4570,6 +3974,8 @@ var Properties = {
"text-transform" : "capitalize | uppercase | lowercase | none | inherit",
"text-wrap" : "normal | none | avoid",
"top" : "<margin-width> | inherit",
+ "-ms-touch-action" : "auto | none | pan-x | pan-y",
+ "touch-action" : "auto | none | pan-x | pan-y",
"transform" : 1,
"transform-origin" : 1,
"transform-style" : 1,
@@ -4578,7 +3984,7 @@ var Properties = {
"transition-duration" : 1,
"transition-property" : 1,
"transition-timing-function" : 1,
- "unicode-bidi" : "normal | embed | bidi-override | inherit",
+ "unicode-bidi" : "normal | embed | isolate | bidi-override | isolate-override | plaintext | inherit",
"user-modify" : "read-only | read-write | write-only | inherit",
"user-select" : "none | text | toggle | element | elements | all | inherit",
"vertical-align" : "auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length>",
@@ -4595,15 +4001,16 @@ var Properties = {
"white-space" : "normal | pre | nowrap | pre-wrap | pre-line | inherit | -pre-wrap | -o-pre-wrap | -moz-pre-wrap | -hp-pre-wrap", //http://perishablepress.com/wrapping-content/
"white-space-collapse" : 1,
"widows" : "<integer> | inherit",
- "width" : "<length> | <percentage> | auto | inherit" ,
+ "width" : "<length> | <percentage> | <content-sizing> | auto | inherit",
"word-break" : "normal | keep-all | break-all",
"word-spacing" : "<length> | normal | inherit",
- "word-wrap" : 1,
+ "word-wrap" : "normal | break-word",
+ "writing-mode" : "horizontal-tb | vertical-rl | vertical-lr | lr-tb | rl-tb | tb-rl | bt-rl | tb-lr | bt-lr | lr-bt | rl-bt | lr | rl | tb | inherit",
"z-index" : "<integer> | auto | inherit",
"zoom" : "<number> | <percentage> | normal"
};
function PropertyName(text, hack, line, col){
-
+
SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_NAME_TYPE);
this.hack = hack;
@@ -4618,7 +4025,7 @@ function PropertyValue(parts, line, col){
SyntaxUnit.call(this, parts.join(" "), line, col, Parser.PROPERTY_VALUE_TYPE);
this.parts = parts;
-
+
}
PropertyValue.prototype = new SyntaxUnit();
@@ -4628,7 +4035,7 @@ function PropertyValueIterator(value){
this._parts = value.parts;
this._marks = [];
this.value = value;
-
+
}
PropertyValueIterator.prototype.count = function(){
return this._parts.length;
@@ -4660,14 +4067,14 @@ function PropertyValuePart(text, line, col){
SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_VALUE_PART_TYPE);
this.type = "unknown";
-
+
var temp;
if (/^([+\-]?[\d\.]+)([a-z]+)$/i.test(text)){ //dimension
this.type = "dimension";
this.value = +RegExp.$1;
this.units = RegExp.$2;
switch(this.units.toLowerCase()){
-
+
case "em":
case "rem":
case "ex":
@@ -4678,35 +4085,36 @@ function PropertyValuePart(text, line, col){
case "pt":
case "pc":
case "ch":
+ case "vh":
+ case "vw":
+ case "vmax":
+ case "vmin":
this.type = "length";
break;
-
+
case "deg":
case "rad":
case "grad":
this.type = "angle";
break;
-
+
case "ms":
case "s":
this.type = "time";
break;
-
+
case "hz":
case "khz":
this.type = "frequency";
break;
-
+
case "dpi":
case "dpcm":
this.type = "resolution";
break;
-
+
}
-
- } else if (/^([+\-]?[\d\.]+)%$/i.test(text)){ //percentage
- this.type = "percentage";
- this.value = +RegExp.$1;
+
} else if (/^([+\-]?[\d\.]+)%$/i.test(text)){ //percentage
this.type = "percentage";
this.value = +RegExp.$1;
@@ -4716,18 +4124,18 @@ function PropertyValuePart(text, line, col){
} else if (/^([+\-]?[\d\.]+)$/i.test(text)){ //number
this.type = "number";
this.value = +RegExp.$1;
-
+
} else if (/^#([a-f0-9]{3,6})/i.test(text)){ //hexcolor
this.type = "color";
temp = RegExp.$1;
if (temp.length == 3){
this.red = parseInt(temp.charAt(0)+temp.charAt(0),16);
this.green = parseInt(temp.charAt(1)+temp.charAt(1),16);
- this.blue = parseInt(temp.charAt(2)+temp.charAt(2),16);
+ this.blue = parseInt(temp.charAt(2)+temp.charAt(2),16);
} else {
this.red = parseInt(temp.substring(0,2),16);
this.green = parseInt(temp.substring(2,4),16);
- this.blue = parseInt(temp.substring(4,6),16);
+ this.blue = parseInt(temp.substring(4,6),16);
}
} else if (/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(text)){ //rgb() color with absolute numbers
this.type = "color";
@@ -4750,18 +4158,18 @@ function PropertyValuePart(text, line, col){
this.red = +RegExp.$1 * 255 / 100;
this.green = +RegExp.$2 * 255 / 100;
this.blue = +RegExp.$3 * 255 / 100;
- this.alpha = +RegExp.$4;
+ this.alpha = +RegExp.$4;
} else if (/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)){ //hsl()
this.type = "color";
this.hue = +RegExp.$1;
this.saturation = +RegExp.$2 / 100;
- this.lightness = +RegExp.$3 / 100;
+ this.lightness = +RegExp.$3 / 100;
} else if (/^hsla\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)){ //hsla() color with percentages
this.type = "color";
this.hue = +RegExp.$1;
this.saturation = +RegExp.$2 / 100;
- this.lightness = +RegExp.$3 / 100;
- this.alpha = +RegExp.$4;
+ this.lightness = +RegExp.$3 / 100;
+ this.alpha = +RegExp.$4;
} else if (/^url\(["']?([^\)"']+)["']?\)/i.test(text)){ //URI
this.type = "uri";
this.uri = RegExp.$1;
@@ -4777,11 +4185,11 @@ function PropertyValuePart(text, line, col){
temp = Colors[text.toLowerCase()].substring(1);
this.red = parseInt(temp.substring(0,2),16);
this.green = parseInt(temp.substring(2,4),16);
- this.blue = parseInt(temp.substring(4,6),16);
+ this.blue = parseInt(temp.substring(4,6),16);
} else if (/^[\,\/]$/.test(text)){
this.type = "operator";
this.value = text;
- } else if (/^[a-z\-\u0080-\uFFFF][a-z0-9\-\u0080-\uFFFF]*$/i.test(text)){
+ } else if (/^[a-z\-_\u0080-\uFFFF][a-z0-9\-_\u0080-\uFFFF]*$/i.test(text)){
this.type = "identifier";
this.value = text;
}
@@ -4807,7 +4215,7 @@ Pseudos.isElement = function(pseudo){
return pseudo.indexOf("::") === 0 || Pseudos[pseudo.toLowerCase()] == Pseudos.ELEMENT;
};
function Selector(parts, line, col){
-
+
SyntaxUnit.call(this, parts.join(" "), line, col, Parser.SELECTOR_TYPE);
this.parts = parts;
this.specificity = Specificity.calculate(this);
@@ -4817,7 +4225,7 @@ function Selector(parts, line, col){
Selector.prototype = new SyntaxUnit();
Selector.prototype.constructor = Selector;
function SelectorPart(elementName, modifiers, text, line, col){
-
+
SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_PART_TYPE);
this.elementName = elementName;
this.modifiers = modifiers;
@@ -4827,7 +4235,7 @@ function SelectorPart(elementName, modifiers, text, line, col){
SelectorPart.prototype = new SyntaxUnit();
SelectorPart.prototype.constructor = SelectorPart;
function SelectorSubPart(text, type, line, col){
-
+
SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_SUB_PART_TYPE);
this.type = type;
this.args = [];
@@ -4848,7 +4256,7 @@ Specificity.prototype = {
compare: function(other){
var comps = ["a", "b", "c", "d"],
i, len;
-
+
for (i=0, len=comps.length; i < len; i++){
if (this[comps[i]] < other[comps[i]]){
return -1;
@@ -4856,7 +4264,7 @@ Specificity.prototype = {
return 1;
}
}
-
+
return 0;
},
valueOf: function(){
@@ -4872,17 +4280,17 @@ Specificity.calculate = function(selector){
var i, len,
part,
b=0, c=0, d=0;
-
+
function updateValues(part){
-
+
var i, j, len, num,
elementName = part.elementName ? part.elementName.text : "",
modifier;
-
+
if (elementName && elementName.charAt(elementName.length-1) != "*") {
d++;
- }
-
+ }
+
for (i=0, len=part.modifiers.length; i < len; i++){
modifier = part.modifiers[i];
switch(modifier.type){
@@ -4890,35 +4298,35 @@ Specificity.calculate = function(selector){
case "attribute":
c++;
break;
-
+
case "id":
b++;
break;
-
+
case "pseudo":
if (Pseudos.isElement(modifier.text)){
d++;
} else {
c++;
- }
+ }
break;
-
+
case "not":
for (j=0, num=modifier.args.length; j < num; j++){
updateValues(modifier.args[j]);
}
- }
+ }
}
}
-
+
for (i=0, len=selector.parts.length; i < len; i++){
part = selector.parts[i];
-
+
if (part instanceof SelectorPart){
- updateValues(part);
+ updateValues(part);
}
}
-
+
return new Specificity(0, b, c, d);
};
@@ -5082,6 +4490,7 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
value: value,
type: tt,
channel: options.channel,
+ endChar: options.endChar,
hide: options.hide || false,
startLine: startLine,
startCol: startCol,
@@ -5102,7 +4511,7 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
tt = Tokens.type(rule.toLowerCase());
if (tt == Tokens.CHAR || tt == Tokens.UNKNOWN){
if (rule.length > 1){
- tt = Tokens.UNKNOWN_SYM;
+ tt = Tokens.UNKNOWN_SYM;
} else {
tt = Tokens.CHAR;
rule = first;
@@ -5114,12 +4523,15 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
},
charToken: function(c, startLine, startCol){
var tt = Tokens.type(c);
+ var opts = {};
if (tt == -1){
tt = Tokens.CHAR;
+ } else {
+ opts.endChar = Tokens[tt].endChar;
}
- return this.createToken(tt, c, startLine, startCol);
+ return this.createToken(tt, c, startLine, startCol, opts);
},
commentToken: function(first, startLine, startCol){
var reader = this._reader,
@@ -5263,7 +4675,7 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
ident = this.readName(reader.read());
value += ident;
- if (/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vm$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)){
+ if (/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vmax$|^vmin$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)){
tt = Tokens.LENGTH;
} else if (/^deg|^rad$|^grad$/i.test(ident)){
tt = Tokens.ANGLE;
@@ -5497,30 +4909,30 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
return ident;
},
-
+
readEscape: function(first){
var reader = this._reader,
cssEscape = first || "",
i = 0,
- c = reader.peek();
-
+ c = reader.peek();
+
if (isHexDigit(c)){
do {
cssEscape += reader.read();
c = reader.peek();
} while(c && isHexDigit(c) && ++i < 6);
}
-
+
if (cssEscape.length == 3 && /\s/.test(c) ||
cssEscape.length == 7 || cssEscape.length == 1){
reader.read();
} else {
c = "";
}
-
+
return cssEscape + c;
},
-
+
readComment: function(first){
var reader = this._reader,
comment = first || "",
@@ -5545,7 +4957,6 @@ TokenStream.prototype = mix(new TokenStreamBase(), {
}
});
-
var Tokens = [
{ name: "CDO"},
{ name: "CDC"},
@@ -5556,7 +4967,7 @@ var Tokens = [
{ name: "PREFIXMATCH", text: "^="},
{ name: "SUFFIXMATCH", text: "$="},
{ name: "SUBSTRINGMATCH", text: "*="},
- { name: "STRING"},
+ { name: "STRING"},
{ name: "IDENT"},
{ name: "HASH"},
{ name: "IMPORT_SYM", text: "@import"},
@@ -5565,6 +4976,7 @@ var Tokens = [
{ name: "FONT_FACE_SYM", text: "@font-face"},
{ name: "CHARSET_SYM", text: "@charset"},
{ name: "NAMESPACE_SYM", text: "@namespace"},
+ { name: "VIEWPORT_SYM", text: ["@viewport", "@-ms-viewport"]},
{ name: "UNKNOWN_SYM" },
{ name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes" ] },
{ name: "IMPORTANT_SYM"},
@@ -5577,13 +4989,13 @@ var Tokens = [
{ name: "NUMBER"},
{ name: "URI"},
{ name: "FUNCTION"},
- { name: "UNICODE_RANGE"},
+ { name: "UNICODE_RANGE"},
{ name: "INVALID"},
{ name: "PLUS", text: "+" },
{ name: "GREATER", text: ">"},
{ name: "COMMA", text: ","},
{ name: "TILDE", text: "~"},
- { name: "NOT"},
+ { name: "NOT"},
{ name: "TOPLEFTCORNER_SYM", text: "@top-left-corner"},
{ name: "TOPLEFT_SYM", text: "@top-left"},
{ name: "TOPCENTER_SYM", text: "@top-center"},
@@ -5622,20 +5034,22 @@ var Tokens = [
{
name: "LBRACE",
+ endChar: "}",
text: "{"
- },
+ },
{
name: "RBRACE",
text: "}"
- },
+ },
{
name: "LBRACKET",
+ endChar: "]",
text: "["
- },
+ },
{
name: "RBRACKET",
text: "]"
- },
+ },
{
name: "EQUALS",
text: "="
@@ -5643,20 +5057,21 @@ var Tokens = [
{
name: "COLON",
text: ":"
- },
+ },
{
name: "SEMICOLON",
text: ";"
- },
-
+ },
+
{
name: "LPAREN",
+ endChar: ")",
text: "("
- },
+ },
{
name: "RPAREN",
text: ")"
- },
+ },
{
name: "DOT",
text: "."
@@ -5667,7 +5082,7 @@ var Tokens = [
var nameMap = [],
typeMap = {};
-
+
Tokens.UNKNOWN = -1;
Tokens.unshift({name:"EOF"});
for (var i=0, len = Tokens.length; i < len; i++){
@@ -5683,11 +5098,11 @@ var Tokens = [
}
}
}
-
+
Tokens.name = function(tt){
return nameMap[tt];
};
-
+
Tokens.type = function(c){
return typeMap[c] || -1;
};
@@ -5701,14 +5116,14 @@ var Validation = {
expression = new PropertyValueIterator(value),
spec = Properties[name],
part,
- valid,
+ valid,
j, count,
msg,
types,
last,
literals,
max, multi, group;
-
+
if (!spec) {
if (name.indexOf("-") !== 0){ //vendor prefixed are ok
throw new ValidationError("Unknown property '" + property + "'.", property.line, property.col);
@@ -5730,14 +5145,14 @@ var Validation = {
}
},
-
+
singleProperty: function(types, expression, max, partial) {
var result = false,
value = expression.value,
count = 0,
part;
-
+
while (expression.hasNext() && count < max) {
result = ValidationTypes.isAny(expression, types);
if (!result) {
@@ -5745,21 +5160,21 @@ var Validation = {
}
count++;
}
-
+
if (!result) {
if (expression.hasNext() && !expression.isFirst()) {
part = expression.peek();
throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
} else {
throw new ValidationError("Expected (" + types + ") but found '" + value + "'.", value.line, value.col);
- }
+ }
} else if (expression.hasNext()) {
part = expression.next();
throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
- }
-
- },
-
+ }
+
+ },
+
multiProperty: function (types, expression, comma, max) {
var result = false,
@@ -5767,7 +5182,7 @@ var Validation = {
count = 0,
sep = false,
part;
-
+
while(expression.hasNext() && !result && count < max) {
if (ValidationTypes.isAny(expression, types)) {
count++;
@@ -5786,7 +5201,7 @@ var Validation = {
}
}
-
+
if (!result) {
if (expression.hasNext() && !expression.isFirst()) {
part = expression.peek();
@@ -5794,19 +5209,19 @@ var Validation = {
} else {
part = expression.previous();
if (comma && part == ",") {
- throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
} else {
throw new ValidationError("Expected (" + types + ") but found '" + value + "'.", value.line, value.col);
}
}
-
+
} else if (expression.hasNext()) {
part = expression.next();
throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
- }
+ }
},
-
+
groupProperty: function (types, expression, comma) {
var result = false,
@@ -5816,7 +5231,7 @@ var Validation = {
partial = false,
name,
part;
-
+
while(expression.hasNext() && !result) {
name = ValidationTypes.isAnyOfGroup(expression, types);
if (name) {
@@ -5826,7 +5241,7 @@ var Validation = {
groups[name] = 1;
groups.count++;
partial = true;
-
+
if (groups.count == typeCount || !expression.hasNext()) {
result = true;
}
@@ -5835,8 +5250,8 @@ var Validation = {
break;
}
}
-
- if (!result) {
+
+ if (!result) {
if (partial && expression.hasNext()) {
part = expression.peek();
throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
@@ -5846,10 +5261,10 @@ var Validation = {
} else if (expression.hasNext()) {
part = expression.next();
throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
- }
+ }
}
-
+
};
function ValidationError(message, line, col){
@@ -5865,47 +5280,47 @@ var ValidationTypes = {
var text = part.text.toString().toLowerCase(),
args = literals.split(" | "),
i, len, found = false;
-
+
for (i=0,len=args.length; i < len && !found; i++){
if (text == args[i].toLowerCase()){
found = true;
}
}
-
- return found;
+
+ return found;
},
-
+
isSimple: function(type) {
return !!this.simple[type];
},
-
+
isComplex: function(type) {
return !!this.complex[type];
},
isAny: function (expression, types) {
var args = types.split(" | "),
i, len, found = false;
-
+
for (i=0,len=args.length; i < len && !found && expression.hasNext(); i++){
found = this.isType(expression, args[i]);
}
-
- return found;
+
+ return found;
},
isAnyOfGroup: function(expression, types) {
var args = types.split(" || "),
i, len, found = false;
-
+
for (i=0,len=args.length; i < len && !found; i++){
found = this.isType(expression, args[i]);
}
-
+
return found ? args[i-1] : false;
},
isType: function (expression, type) {
var part = expression.peek(),
result = false;
-
+
if (type.charAt(0) != "<") {
result = this.isLiteral(part, type);
if (result) {
@@ -5919,49 +5334,49 @@ var ValidationTypes = {
} else {
result = this.complex[type](expression);
}
-
+
return result;
},
-
-
-
+
+
+
simple: {
"<absolute-size>": function(part){
return ValidationTypes.isLiteral(part, "xx-small | x-small | small | medium | large | x-large | xx-large");
},
-
+
"<attachment>": function(part){
return ValidationTypes.isLiteral(part, "scroll | fixed | local");
},
-
+
"<attr>": function(part){
return part.type == "function" && part.name == "attr";
},
-
+
"<bg-image>": function(part){
return this["<image>"](part) || this["<gradient>"](part) || part == "none";
- },
-
+ },
+
"<gradient>": function(part) {
return part.type == "function" && /^(?:\-(?:ms|moz|o|webkit)\-)?(?:repeating\-)?(?:radial\-|linear\-)?gradient/i.test(part);
},
-
+
"<box>": function(part){
return ValidationTypes.isLiteral(part, "padding-box | border-box | content-box");
},
-
+
"<content>": function(part){
return part.type == "function" && part.name == "content";
- },
-
+ },
+
"<relative-size>": function(part){
return ValidationTypes.isLiteral(part, "smaller | larger");
},
"<ident>": function(part){
return part.type == "identifier";
},
-
+
"<length>": function(part){
if (part.type == "function" && /^(?:\-(?:ms|moz|o|webkit)\-)?calc/i.test(part)){
return true;
@@ -5969,35 +5384,35 @@ var ValidationTypes = {
return part.type == "length" || part.type == "number" || part.type == "integer" || part == "0";
}
},
-
+
"<color>": function(part){
return part.type == "color" || part == "transparent";
},
-
+
"<number>": function(part){
return part.type == "number" || this["<integer>"](part);
},
-
+
"<integer>": function(part){
return part.type == "integer";
},
-
+
"<line>": function(part){
return part.type == "integer";
},
-
+
"<angle>": function(part){
return part.type == "angle";
- },
-
+ },
+
"<uri>": function(part){
return part.type == "uri";
},
-
+
"<image>": function(part){
return this["<uri>"](part);
},
-
+
"<percentage>": function(part){
return part.type == "percentage" || part == "0";
},
@@ -6005,28 +5420,56 @@ var ValidationTypes = {
"<border-width>": function(part){
return this["<length>"](part) || ValidationTypes.isLiteral(part, "thin | medium | thick");
},
-
+
"<border-style>": function(part){
return ValidationTypes.isLiteral(part, "none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset");
},
-
+
+ "<content-sizing>": function(part){ // http://www.w3.org/TR/css3-sizing/#width-height-keywords
+ return ValidationTypes.isLiteral(part, "fill-available | -moz-available | -webkit-fill-available | max-content | -moz-max-content | -webkit-max-content | min-content | -moz-min-content | -webkit-min-content | fit-content | -moz-fit-content | -webkit-fit-content");
+ },
+
"<margin-width>": function(part){
return this["<length>"](part) || this["<percentage>"](part) || ValidationTypes.isLiteral(part, "auto");
},
-
+
"<padding-width>": function(part){
return this["<length>"](part) || this["<percentage>"](part);
},
-
+
"<shape>": function(part){
return part.type == "function" && (part.name == "rect" || part.name == "inset-rect");
},
-
+
"<time>": function(part) {
return part.type == "time";
+ },
+
+ "<flex-grow>": function(part){
+ return this["<number>"](part);
+ },
+
+ "<flex-shrink>": function(part){
+ return this["<number>"](part);
+ },
+
+ "<width>": function(part){
+ return this["<margin-width>"](part);
+ },
+
+ "<flex-basis>": function(part){
+ return this["<width>"](part);
+ },
+
+ "<flex-direction>": function(part){
+ return ValidationTypes.isLiteral(part, "row | row-reverse | column | column-reverse");
+ },
+
+ "<flex-wrap>": function(part){
+ return ValidationTypes.isLiteral(part, "nowrap | wrap | wrap-reverse");
}
},
-
+
complex: {
"<bg-position>": function(expression){
@@ -6084,7 +5527,7 @@ var ValidationTypes = {
}
}
}
-
+
return result;
},
@@ -6093,28 +5536,28 @@ var ValidationTypes = {
result = false,
numeric = "<percentage> | <length> | auto",
part,
- i, len;
-
+ i, len;
+
if (ValidationTypes.isAny(expression, "cover | contain")) {
result = true;
} else if (ValidationTypes.isAny(expression, numeric)) {
- result = true;
+ result = true;
ValidationTypes.isAny(expression, numeric);
}
-
+
return result;
},
-
+
"<repeat-style>": function(expression){
var result = false,
values = "repeat | space | round | no-repeat",
part;
-
+
if (expression.hasNext()){
part = expression.next();
-
+
if (ValidationTypes.isLiteral(part, "repeat-x | repeat-y")) {
- result = true;
+ result = true;
} else if (ValidationTypes.isLiteral(part, values)) {
result = true;
@@ -6123,70 +5566,98 @@ var ValidationTypes = {
}
}
}
-
+
return result;
-
+
},
-
+
"<shadow>": function(expression) {
var result = false,
count = 0,
inset = false,
color = false,
part;
-
- if (expression.hasNext()) {
-
+
+ if (expression.hasNext()) {
+
if (ValidationTypes.isAny(expression, "inset")){
inset = true;
}
-
+
if (ValidationTypes.isAny(expression, "<color>")) {
color = true;
- }
-
+ }
+
while (ValidationTypes.isAny(expression, "<length>") && count < 4) {
count++;
}
-
-
+
+
if (expression.hasNext()) {
if (!color) {
ValidationTypes.isAny(expression, "<color>");
}
-
+
if (!inset) {
ValidationTypes.isAny(expression, "inset");
}
}
-
+
result = (count >= 2 && count <= 4);
-
+
}
-
+
return result;
},
-
+
"<x-one-radius>": function(expression) {
var result = false,
- count = 0,
- numeric = "<length> | <percentage>",
- part;
-
- if (ValidationTypes.isAny(expression, numeric)){
+ simple = "<length> | <percentage> | inherit";
+
+ if (ValidationTypes.isAny(expression, simple)){
result = true;
-
- ValidationTypes.isAny(expression, numeric);
- }
-
+ ValidationTypes.isAny(expression, simple);
+ }
+
+ return result;
+ },
+
+ "<flex>": function(expression) {
+ var part,
+ result = false;
+ if (ValidationTypes.isAny(expression, "none | inherit")) {
+ result = true;
+ } else {
+ if (ValidationTypes.isType(expression, "<flex-grow>")) {
+ if (expression.peek()) {
+ if (ValidationTypes.isType(expression, "<flex-shrink>")) {
+ if (expression.peek()) {
+ result = ValidationTypes.isType(expression, "<flex-basis>");
+ } else {
+ result = true;
+ }
+ } else if (ValidationTypes.isType(expression, "<flex-basis>")) {
+ result = expression.peek() === null;
+ }
+ } else {
+ result = true;
+ }
+ } else if (ValidationTypes.isType(expression, "<flex-basis>")) {
+ result = true;
+ }
+ }
+
+ if (!result) {
+ part = expression.peek();
+ throw new ValidationError("Expected (none | [ <flex-grow> <flex-shrink>? || <flex-basis> ]) but found '" + expression.value.text + "'.", part.line, part.col);
+ }
+
return result;
}
}
};
-
-
parserlib.css = {
Colors :Colors,
Combinator :Combinator,
@@ -6205,6 +5676,107 @@ Tokens :Tokens,
ValidationError :ValidationError
};
})();
+
+(function(){
+for(var prop in parserlib){
+exports[prop] = parserlib[prop];
+}
+})();
+
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
+var util = {
+ isArray: function (ar) {
+ return Array.isArray(ar) || (typeof ar === 'object' && objectToString(ar) === '[object Array]');
+ },
+ isDate: function (d) {
+ return typeof d === 'object' && objectToString(d) === '[object Date]';
+ },
+ isRegExp: function (re) {
+ return typeof re === 'object' && objectToString(re) === '[object RegExp]';
+ },
+ getRegExpFlags: function (re) {
+ var flags = '';
+ re.global && (flags += 'g');
+ re.ignoreCase && (flags += 'i');
+ re.multiline && (flags += 'm');
+ return flags;
+ }
+};
+
+
+if (typeof module === 'object')
+ module.exports = clone;
+
+function clone(parent, circular, depth, prototype) {
+ var allParents = [];
+ var allChildren = [];
+
+ var useBuffer = typeof Buffer != 'undefined';
+
+ if (typeof circular == 'undefined')
+ circular = true;
+
+ if (typeof depth == 'undefined')
+ depth = Infinity;
+ function _clone(parent, depth) {
+ if (parent === null)
+ return null;
+
+ if (depth == 0)
+ return parent;
+
+ var child;
+ if (typeof parent != 'object') {
+ return parent;
+ }
+
+ if (util.isArray(parent)) {
+ child = [];
+ } else if (util.isRegExp(parent)) {
+ child = new RegExp(parent.source, util.getRegExpFlags(parent));
+ if (parent.lastIndex) child.lastIndex = parent.lastIndex;
+ } else if (util.isDate(parent)) {
+ child = new Date(parent.getTime());
+ } else if (useBuffer && Buffer.isBuffer(parent)) {
+ child = new Buffer(parent.length);
+ parent.copy(child);
+ return child;
+ } else {
+ if (typeof prototype == 'undefined') child = Object.create(Object.getPrototypeOf(parent));
+ else child = Object.create(prototype);
+ }
+
+ if (circular) {
+ var index = allParents.indexOf(parent);
+
+ if (index != -1) {
+ return allChildren[index];
+ }
+ allParents.push(parent);
+ allChildren.push(child);
+ }
+
+ for (var i in parent) {
+ child[i] = _clone(parent[i], depth - 1);
+ }
+
+ return child;
+ }
+
+ return _clone(parent, depth);
+}
+clone.clonePrototype = function(parent) {
+ if (parent === null)
+ return null;
+
+ var c = function () {};
+ c.prototype = parent;
+ return new c();
+};
+
var CSSLint = (function(){
var rules = [],
@@ -6212,7 +5784,7 @@ var CSSLint = (function(){
embeddedRuleset = /\/\*csslint([^\*]*)\*\//,
api = new parserlib.util.EventTarget();
- api.version = "0.9.10";
+ api.version = "@VERSION@";
api.addRule = function(rule){
rules.push(rule);
rules[rule.id] = rule;
@@ -6286,20 +5858,20 @@ var CSSLint = (function(){
};
api.verify = function(text, ruleset){
- var i = 0,
- len = rules.length,
+ var i = 0,
reporter,
lines,
report,
parser = new parserlib.css.Parser({ starHack: true, ieFilters: true,
underscoreHack: true, strict: false });
- lines = text.replace(/\n\r?/g, "$split$").split('$split$');
+ lines = text.replace(/\n\r?/g, "$split$").split("$split$");
if (!ruleset){
ruleset = this.getRuleset();
}
if (embeddedRuleset.test(text)){
+ ruleset = clone(ruleset);
ruleset = applyEmbeddedRuleset(text, ruleset);
}
@@ -6364,7 +5936,7 @@ Reporter.prototype = {
},
report: function(message, line, col, rule){
this.messages.push({
- type : this.ruleset[rule.id] == 2 ? "error" : "warning",
+ type : this.ruleset[rule.id] === 2 ? "error" : "warning",
line : line,
col : col,
message : message,
@@ -6437,6 +6009,7 @@ CSSLint.Util = {
}
}
};
+
CSSLint.addRule({
id: "adjoining-classes",
name: "Disallow adjoining classes",
@@ -6456,11 +6029,11 @@ CSSLint.addRule({
selector = selectors[i];
for (j=0; j < selector.parts.length; j++){
part = selector.parts[j];
- if (part.type == parser.SELECTOR_PART_TYPE){
+ if (part.type === parser.SELECTOR_PART_TYPE){
classCount = 0;
for (k=0; k < part.modifiers.length; k++){
modifier = part.modifiers[k];
- if (modifier.type == "class"){
+ if (modifier.type === "class"){
classCount++;
}
if (classCount > 1){
@@ -6507,13 +6080,13 @@ CSSLint.addRule({
function endRule(){
var prop, value;
-
+
if (!boxSizing) {
if (properties.height){
for (prop in heightProperties){
if (heightProperties.hasOwnProperty(prop) && properties[prop]){
value = properties[prop].value;
- if (!(prop == "padding" && value.parts.length === 2 && value.parts[0].value === 0)){
+ if (!(prop === "padding" && value.parts.length === 2 && value.parts[0].value === 0)){
reporter.report("Using height with " + prop + " can sometimes make elements larger than you expect.", properties[prop].line, properties[prop].col, rule);
}
}
@@ -6524,47 +6097,48 @@ CSSLint.addRule({
for (prop in widthProperties){
if (widthProperties.hasOwnProperty(prop) && properties[prop]){
value = properties[prop].value;
-
- if (!(prop == "padding" && value.parts.length === 2 && value.parts[1].value === 0)){
+
+ if (!(prop === "padding" && value.parts.length === 2 && value.parts[1].value === 0)){
reporter.report("Using width with " + prop + " can sometimes make elements larger than you expect.", properties[prop].line, properties[prop].col, rule);
}
}
}
- }
- }
+ }
+ }
}
parser.addListener("startrule", startRule);
parser.addListener("startfontface", startRule);
parser.addListener("startpage", startRule);
parser.addListener("startpagemargin", startRule);
- parser.addListener("startkeyframerule", startRule);
+ parser.addListener("startkeyframerule", startRule);
parser.addListener("property", function(event){
var name = event.property.text.toLowerCase();
-
+
if (heightProperties[name] || widthProperties[name]){
- if (!/^0\S*$/.test(event.value) && !(name == "border" && event.value == "none")){
+ if (!/^0\S*$/.test(event.value) && !(name === "border" && event.value.toString() === "none")){
properties[name] = { line: event.property.line, col: event.property.col, value: event.value };
}
} else {
if (/^(width|height)/i.test(name) && /^(length|percentage)/.test(event.value.parts[0].type)){
properties[name] = 1;
- } else if (name == "box-sizing") {
+ } else if (name === "box-sizing") {
boxSizing = true;
}
}
-
+
});
parser.addListener("endrule", endRule);
parser.addListener("endfontface", endRule);
parser.addListener("endpage", endRule);
parser.addListener("endpagemargin", endRule);
- parser.addListener("endkeyframerule", endRule);
+ parser.addListener("endkeyframerule", endRule);
}
});
+
CSSLint.addRule({
id: "box-sizing",
name: "Disallow use of box-sizing",
@@ -6576,14 +6150,15 @@ CSSLint.addRule({
parser.addListener("property", function(event){
var name = event.property.text.toLowerCase();
-
- if (name == "box-sizing"){
+
+ if (name === "box-sizing"){
reporter.report("The box-sizing property isn't supported in IE6 and IE7.", event.line, event.col, rule);
}
- });
+ });
}
});
+
CSSLint.addRule({
id: "bulletproof-font-face",
name: "Use the bulletproof @font-face syntax",
@@ -6591,12 +6166,11 @@ CSSLint.addRule({
browsers: "All",
init: function(parser, reporter){
var rule = this,
- count = 0,
fontFaceRule = false,
firstSrc = true,
ruleFailed = false,
line, col;
- parser.addListener("startfontface", function(event){
+ parser.addListener("startfontface", function(){
fontFaceRule = true;
});
@@ -6609,7 +6183,7 @@ CSSLint.addRule({
value = event.value.toString();
line = event.line;
col = event.col;
- if (propertyName === 'src') {
+ if (propertyName === "src") {
var regex = /^\s?url\(['"].+\.eot\?.*['"]\)\s*format\(['"]embedded-opentype['"]\).*$/i;
if (!value.match(regex) && firstSrc) {
ruleFailed = true;
@@ -6621,7 +6195,7 @@ CSSLint.addRule({
});
- parser.addListener("endfontface", function(event){
+ parser.addListener("endfontface", function(){
fontFaceRule = false;
if (ruleFailed) {
@@ -6629,7 +6203,8 @@ CSSLint.addRule({
}
});
}
-});
+});
+
CSSLint.addRule({
id: "compatible-vendor-prefixes",
name: "Require compatible vendor prefixes",
@@ -6711,15 +6286,15 @@ CSSLint.addRule({
for (prop in compatiblePrefixes) {
if (compatiblePrefixes.hasOwnProperty(prop)) {
variations = [];
- prefixed = compatiblePrefixes[prop].split(' ');
+ prefixed = compatiblePrefixes[prop].split(" ");
for (i = 0, len = prefixed.length; i < len; i++) {
- variations.push('-' + prefixed[i] + '-' + prop);
+ variations.push("-" + prefixed[i] + "-" + prop);
}
compatiblePrefixes[prop] = variations;
arrayPush.apply(applyTo, variations);
}
}
-
+
parser.addListener("startrule", function () {
properties = [];
});
@@ -6728,21 +6303,21 @@ CSSLint.addRule({
inKeyFrame = event.prefix || true;
});
- parser.addListener("endkeyframes", function (event) {
+ parser.addListener("endkeyframes", function () {
inKeyFrame = false;
});
parser.addListener("property", function (event) {
var name = event.property;
if (CSSLint.Util.indexOf(applyTo, name.text) > -1) {
- if (!inKeyFrame || typeof inKeyFrame != "string" ||
+ if (!inKeyFrame || typeof inKeyFrame !== "string" ||
name.text.indexOf("-" + inKeyFrame + "-") !== 0) {
properties.push(name);
}
}
});
- parser.addListener("endrule", function (event) {
+ parser.addListener("endrule", function () {
if (!properties.length) {
return;
}
@@ -6792,8 +6367,8 @@ CSSLint.addRule({
for (i = 0, len = full.length; i < len; i++) {
item = full[i];
if (CSSLint.Util.indexOf(actual, item) === -1) {
- propertiesSpecified = (actual.length === 1) ? actual[0] : (actual.length == 2) ? actual.join(" and ") : actual.join(", ");
- reporter.report("The property " + item + " is compatible with " + propertiesSpecified + " and should be included as well.", value.actualNodes[0].line, value.actualNodes[0].col, rule);
+ propertiesSpecified = (actual.length === 1) ? actual[0] : (actual.length === 2) ? actual.join(" and ") : actual.join(", ");
+ reporter.report("The property " + item + " is compatible with " + propertiesSpecified + " and should be included as well.", value.actualNodes[0].line, value.actualNodes[0].col, rule);
}
}
@@ -6803,6 +6378,7 @@ CSSLint.addRule({
});
}
});
+
CSSLint.addRule({
id: "display-property-grouping",
name: "Require properties appropriate for display",
@@ -6832,12 +6408,12 @@ CSSLint.addRule({
function reportProperty(name, display, msg){
if (properties[name]){
- if (typeof propertiesToCheck[name] != "string" || properties[name].value.toLowerCase() != propertiesToCheck[name]){
+ if (typeof propertiesToCheck[name] !== "string" || properties[name].value.toLowerCase() !== propertiesToCheck[name]){
reporter.report(msg || name + " can't be used with display: " + display + ".", properties[name].line, properties[name].col, rule);
}
}
}
-
+
function startRule(){
properties = {};
}
@@ -6853,7 +6429,7 @@ CSSLint.addRule({
reportProperty("width", display);
reportProperty("margin", display);
reportProperty("margin-top", display);
- reportProperty("margin-bottom", display);
+ reportProperty("margin-bottom", display);
reportProperty("float", display, "display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");
break;
@@ -6876,7 +6452,7 @@ CSSLint.addRule({
}
}
}
-
+
}
parser.addListener("startrule", startRule);
@@ -6889,7 +6465,7 @@ CSSLint.addRule({
var name = event.property.text.toLowerCase();
if (propertiesToCheck[name]){
- properties[name] = { value: event.value.text, line: event.property.line, col: event.property.col };
+ properties[name] = { value: event.value.text, line: event.property.line, col: event.property.col };
}
});
@@ -6902,6 +6478,7 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "duplicate-background-images",
name: "Disallow duplicate background images",
@@ -6918,8 +6495,8 @@ CSSLint.addRule({
if (name.match(/background/i)) {
for (i=0, len=value.parts.length; i < len; i++) {
- if (value.parts[i].type == 'uri') {
- if (typeof stack[value.parts[i].uri] === 'undefined') {
+ if (value.parts[i].type === "uri") {
+ if (typeof stack[value.parts[i].uri] === "undefined") {
stack[value.parts[i].uri] = event;
}
else {
@@ -6931,6 +6508,7 @@ CSSLint.addRule({
});
}
});
+
CSSLint.addRule({
id: "duplicate-properties",
name: "Disallow duplicate properties",
@@ -6939,35 +6517,36 @@ CSSLint.addRule({
init: function(parser, reporter){
var rule = this,
properties,
- lastProperty;
-
- function startRule(event){
- properties = {};
+ lastProperty;
+
+ function startRule(){
+ properties = {};
}
-
+
parser.addListener("startrule", startRule);
parser.addListener("startfontface", startRule);
parser.addListener("startpage", startRule);
parser.addListener("startpagemargin", startRule);
- parser.addListener("startkeyframerule", startRule);
-
+ parser.addListener("startkeyframerule", startRule);
+
parser.addListener("property", function(event){
var property = event.property,
name = property.text.toLowerCase();
-
- if (properties[name] && (lastProperty != name || properties[name] == event.value.text)){
+
+ if (properties[name] && (lastProperty !== name || properties[name] === event.value.text)){
reporter.report("Duplicate property '" + event.property + "' found.", event.line, event.col, rule);
}
-
+
properties[name] = event.value.text;
lastProperty = name;
-
+
});
-
-
+
+
}
});
+
CSSLint.addRule({
id: "empty-rules",
name: "Disallow empty rules",
@@ -6994,6 +6573,7 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "errors",
name: "Parsing Errors",
@@ -7009,6 +6589,7 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "fallback-colors",
name: "Require fallback colors",
@@ -7033,53 +6614,54 @@ CSSLint.addRule({
"background-color": 1
},
properties;
-
- function startRule(event){
- properties = {};
- lastProperty = null;
+
+ function startRule(){
+ properties = {};
+ lastProperty = null;
}
-
+
parser.addListener("startrule", startRule);
parser.addListener("startfontface", startRule);
parser.addListener("startpage", startRule);
parser.addListener("startpagemargin", startRule);
- parser.addListener("startkeyframerule", startRule);
-
+ parser.addListener("startkeyframerule", startRule);
+
parser.addListener("property", function(event){
var property = event.property,
name = property.text.toLowerCase(),
parts = event.value.parts,
- i = 0,
+ i = 0,
colorType = "",
- len = parts.length;
-
+ len = parts.length;
+
if(propertiesToCheck[name]){
while(i < len){
- if (parts[i].type == "color"){
+ if (parts[i].type === "color"){
if ("alpha" in parts[i] || "hue" in parts[i]){
-
+
if (/([^\)]+)\(/.test(parts[i])){
colorType = RegExp.$1.toUpperCase();
}
-
- if (!lastProperty || (lastProperty.property.text.toLowerCase() != name || lastProperty.colorType != "compat")){
+
+ if (!lastProperty || (lastProperty.property.text.toLowerCase() !== name || lastProperty.colorType !== "compat")){
reporter.report("Fallback " + name + " (hex or RGB) should precede " + colorType + " " + name + ".", event.line, event.col, rule);
}
} else {
event.colorType = "compat";
}
}
-
+
i++;
}
}
lastProperty = event;
- });
-
+ });
+
}
});
+
CSSLint.addRule({
id: "floats",
name: "Disallow too many floats",
@@ -7089,8 +6671,8 @@ CSSLint.addRule({
var rule = this;
var count = 0;
parser.addListener("property", function(event){
- if (event.property.text.toLowerCase() == "float" &&
- event.value.text.toLowerCase() != "none"){
+ if (event.property.text.toLowerCase() === "float" &&
+ event.value.text.toLowerCase() !== "none"){
count++;
}
});
@@ -7103,6 +6685,7 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "font-faces",
name: "Don't use too many web fonts",
@@ -7125,6 +6708,7 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "font-sizes",
name: "Disallow too many font sizes",
@@ -7134,7 +6718,7 @@ CSSLint.addRule({
var rule = this,
count = 0;
parser.addListener("property", function(event){
- if (event.property == "font-size"){
+ if (event.property.toString() === "font-size"){
count++;
}
});
@@ -7147,6 +6731,7 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "gradients",
name: "Require all gradient definitions",
@@ -7185,7 +6770,7 @@ CSSLint.addRule({
if (!gradients.webkit){
missing.push("Webkit (Safari 5+, Chrome)");
}
-
+
if (!gradients.oldWebkit){
missing.push("Old Webkit (Safari 4+, Chrome)");
}
@@ -7194,8 +6779,8 @@ CSSLint.addRule({
missing.push("Opera 11.1+");
}
- if (missing.length && missing.length < 4){
- reporter.report("Missing vendor-prefixed CSS gradients for " + missing.join(", ") + ".", event.selectors[0].line, event.selectors[0].col, rule);
+ if (missing.length && missing.length < 4){
+ reporter.report("Missing vendor-prefixed CSS gradients for " + missing.join(", ") + ".", event.selectors[0].line, event.selectors[0].col, rule);
}
});
@@ -7203,6 +6788,7 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "ids",
name: "Disallow IDs in selectors",
@@ -7224,17 +6810,17 @@ CSSLint.addRule({
for (j=0; j < selector.parts.length; j++){
part = selector.parts[j];
- if (part.type == parser.SELECTOR_PART_TYPE){
+ if (part.type === parser.SELECTOR_PART_TYPE){
for (k=0; k < part.modifiers.length; k++){
modifier = part.modifiers[k];
- if (modifier.type == "id"){
+ if (modifier.type === "id"){
idCount++;
}
}
}
}
- if (idCount == 1){
+ if (idCount === 1){
reporter.report("Don't use IDs in selectors.", selector.line, selector.col, rule);
} else if (idCount > 1){
reporter.report(idCount + " IDs in the selector, really?", selector.line, selector.col, rule);
@@ -7245,6 +6831,7 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "import",
name: "Disallow @import",
@@ -7252,14 +6839,15 @@ CSSLint.addRule({
browsers: "All",
init: function(parser, reporter){
var rule = this;
-
- parser.addListener("import", function(event){
+
+ parser.addListener("import", function(event){
reporter.report("@import prevents parallel downloads, use <link> instead.", event.line, event.col, rule);
});
}
});
+
CSSLint.addRule({
id: "important",
name: "Disallow !important",
@@ -7283,6 +6871,7 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "known-properties",
name: "Require use of known properties",
@@ -7292,7 +6881,6 @@ CSSLint.addRule({
var rule = this;
parser.addListener("property", function(event){
- var name = event.property.text.toLowerCase();
if (event.invalid) {
reporter.report(event.invalid.message, event.line, event.col, rule);
}
@@ -7302,6 +6890,44 @@ CSSLint.addRule({
});
CSSLint.addRule({
+ id: "order-alphabetical",
+ name: "Alphabetical order",
+ desc: "Assure properties are in alphabetical order",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ properties;
+
+ var startRule = function () {
+ properties = [];
+ };
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+ parser.addListener("startpage", startRule);
+ parser.addListener("startpagemargin", startRule);
+ parser.addListener("startkeyframerule", startRule);
+
+ parser.addListener("property", function(event){
+ var name = event.property.text,
+ lowerCasePrefixLessName = name.toLowerCase().replace(/^-.*?-/, "");
+
+ properties.push(lowerCasePrefixLessName);
+ });
+
+ parser.addListener("endrule", function(event){
+ var currentProperties = properties.join(","),
+ expectedProperties = properties.sort().join(",");
+
+ if (currentProperties !== expectedProperties){
+ reporter.report("Rule doesn't have all its properties in alphabetical ordered.", event.line, event.col, rule);
+ }
+ });
+ }
+
+});
+
+CSSLint.addRule({
id: "outline-none",
name: "Disallow outline: none",
desc: "Use of outline: none or outline: 0 should be limited to :focus rules.",
@@ -7324,14 +6950,14 @@ CSSLint.addRule({
lastRule = null;
}
}
-
- function endRule(event){
+
+ function endRule(){
if (lastRule){
if (lastRule.outline){
- if (lastRule.selectors.toString().toLowerCase().indexOf(":focus") == -1){
+ if (lastRule.selectors.toString().toLowerCase().indexOf(":focus") === -1){
reporter.report("Outlines should only be modified using :focus.", lastRule.line, lastRule.col, rule);
- } else if (lastRule.propCount == 1) {
- reporter.report("Outlines shouldn't be hidden unless other visual changes are made.", lastRule.line, lastRule.col, rule);
+ } else if (lastRule.propCount === 1) {
+ reporter.report("Outlines shouldn't be hidden unless other visual changes are made.", lastRule.line, lastRule.col, rule);
}
}
}
@@ -7341,30 +6967,31 @@ CSSLint.addRule({
parser.addListener("startfontface", startRule);
parser.addListener("startpage", startRule);
parser.addListener("startpagemargin", startRule);
- parser.addListener("startkeyframerule", startRule);
+ parser.addListener("startkeyframerule", startRule);
parser.addListener("property", function(event){
var name = event.property.text.toLowerCase(),
- value = event.value;
-
+ value = event.value;
+
if (lastRule){
lastRule.propCount++;
- if (name == "outline" && (value == "none" || value == "0")){
+ if (name === "outline" && (value.toString() === "none" || value.toString() === "0")){
lastRule.outline = true;
- }
+ }
}
-
+
});
-
+
parser.addListener("endrule", endRule);
parser.addListener("endfontface", endRule);
parser.addListener("endpage", endRule);
parser.addListener("endpagemargin", endRule);
- parser.addListener("endkeyframerule", endRule);
+ parser.addListener("endkeyframerule", endRule);
}
});
+
CSSLint.addRule({
id: "overqualified-elements",
name: "Disallow overqualified elements",
@@ -7373,7 +7000,7 @@ CSSLint.addRule({
init: function(parser, reporter){
var rule = this,
classes = {};
-
+
parser.addListener("startrule", function(event){
var selectors = event.selectors,
selector,
@@ -7386,13 +7013,13 @@ CSSLint.addRule({
for (j=0; j < selector.parts.length; j++){
part = selector.parts[j];
- if (part.type == parser.SELECTOR_PART_TYPE){
+ if (part.type === parser.SELECTOR_PART_TYPE){
for (k=0; k < part.modifiers.length; k++){
modifier = part.modifiers[k];
- if (part.elementName && modifier.type == "id"){
+ if (part.elementName && modifier.type === "id"){
reporter.report("Element (" + part + ") is overqualified, just use " + modifier + " without element name.", part.line, part.col, rule);
- } else if (modifier.type == "class"){
-
+ } else if (modifier.type === "class"){
+
if (!classes[modifier]){
classes[modifier] = [];
}
@@ -7403,21 +7030,22 @@ CSSLint.addRule({
}
}
});
-
+
parser.addListener("endstylesheet", function(){
-
+
var prop;
for (prop in classes){
if (classes.hasOwnProperty(prop)){
- if (classes[prop].length == 1 && classes[prop][0].part.elementName){
+ if (classes[prop].length === 1 && classes[prop][0].part.elementName){
reporter.report("Element (" + classes[prop][0].part + ") is overqualified, just use " + classes[prop][0].modifier + " without element name.", classes[prop][0].part.line, classes[prop][0].part.col, rule);
}
}
- }
+ }
});
}
});
+
CSSLint.addRule({
id: "qualified-headings",
name: "Disallow qualified headings",
@@ -7437,7 +7065,7 @@ CSSLint.addRule({
for (j=0; j < selector.parts.length; j++){
part = selector.parts[j];
- if (part.type == parser.SELECTOR_PART_TYPE){
+ if (part.type === parser.SELECTOR_PART_TYPE){
if (part.elementName && /h[1-6]/.test(part.elementName.toString()) && j > 0){
reporter.report("Heading (" + part.elementName + ") should not be qualified.", part.line, part.col, rule);
}
@@ -7448,6 +7076,7 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "regex-selectors",
name: "Disallow selectors that look like regexs",
@@ -7467,10 +7096,10 @@ CSSLint.addRule({
selector = selectors[i];
for (j=0; j < selector.parts.length; j++){
part = selector.parts[j];
- if (part.type == parser.SELECTOR_PART_TYPE){
+ if (part.type === parser.SELECTOR_PART_TYPE){
for (k=0; k < part.modifiers.length; k++){
modifier = part.modifiers[k];
- if (modifier.type == "attribute"){
+ if (modifier.type === "attribute"){
if (/([\~\|\^\$\*]=)/.test(modifier)){
reporter.report("Attribute selectors with " + RegExp.$1 + " are slow!", modifier.line, modifier.col, rule);
}
@@ -7484,14 +7113,14 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "rules-count",
name: "Rules Count",
desc: "Track how many rules there are.",
browsers: "All",
init: function(parser, reporter){
- var rule = this,
- count = 0;
+ var count = 0;
parser.addListener("startrule", function(){
count++;
});
@@ -7502,6 +7131,7 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "selector-max-approaching",
name: "Warn when approaching the 4095 selector limit for IE",
@@ -7510,18 +7140,19 @@ CSSLint.addRule({
init: function(parser, reporter) {
var rule = this, count = 0;
- parser.addListener('startrule', function(event) {
+ parser.addListener("startrule", function(event) {
count += event.selectors.length;
});
parser.addListener("endstylesheet", function() {
if (count >= 3800) {
- reporter.report("You have " + count + " selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,rule);
+ reporter.report("You have " + count + " selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,rule);
}
});
}
});
+
CSSLint.addRule({
id: "selector-max",
name: "Error when past the 4095 selector limit for IE",
@@ -7530,18 +7161,55 @@ CSSLint.addRule({
init: function(parser, reporter){
var rule = this, count = 0;
- parser.addListener('startrule',function(event) {
+ parser.addListener("startrule", function(event) {
count += event.selectors.length;
});
parser.addListener("endstylesheet", function() {
if (count > 4095) {
- reporter.report("You have " + count + " selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,rule);
+ reporter.report("You have " + count + " selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,rule);
}
});
}
});
+
+CSSLint.addRule({
+ id: "selector-newline",
+ name: "Disallow new-line characters in selectors",
+ desc: "New-line characters in selectors are usually a forgotten comma and not a descendant combinator.",
+ browsers: "All",
+ init: function(parser, reporter) {
+ var rule = this;
+
+ function startRule(event) {
+ var i, len, selector, p, n, pLen, part, part2, type, currentLine, nextLine,
+ selectors = event.selectors;
+
+ for (i = 0, len = selectors.length; i < len; i++) {
+ selector = selectors[i];
+ for (p = 0, pLen = selector.parts.length; p < pLen; p++) {
+ for (n = p + 1; n < pLen; n++) {
+ part = selector.parts[p];
+ part2 = selector.parts[n];
+ type = part.type;
+ currentLine = part.line;
+ nextLine = part2.line;
+
+ if (type === "descendant" && nextLine > currentLine) {
+ reporter.report("newline character found in selector (forgot a comma?)", currentLine, selectors[i].parts[0].col, rule);
+ }
+ }
+ }
+
+ }
+ }
+
+ parser.addListener("startrule", startRule);
+
+ }
+});
+
CSSLint.addRule({
id: "shorthand",
name: "Require shorthand properties",
@@ -7564,7 +7232,7 @@ CSSLint.addRule({
"padding-bottom",
"padding-left",
"padding-right"
- ]
+ ]
};
for (prop in mapping){
if (mapping.hasOwnProperty(prop)){
@@ -7573,33 +7241,32 @@ CSSLint.addRule({
}
}
}
-
- function startRule(event){
+
+ function startRule(){
properties = {};
}
function endRule(event){
-
+
var prop, i, len, total;
for (prop in mapping){
if (mapping.hasOwnProperty(prop)){
total=0;
-
+
for (i=0, len=mapping[prop].length; i < len; i++){
total += properties[mapping[prop][i]] ? 1 : 0;
}
-
- if (total == mapping[prop].length){
+
+ if (total === mapping[prop].length){
reporter.report("The properties " + mapping[prop].join(", ") + " can be replaced by " + prop + ".", event.line, event.col, rule);
}
}
}
- }
-
+ }
+
parser.addListener("startrule", startRule);
parser.addListener("startfontface", startRule);
parser.addListener("property", function(event){
- var name = event.property.toString().toLowerCase(),
- value = event.value.parts[0].value;
+ var name = event.property.toString().toLowerCase();
if (propertiesToCheck[name]){
properties[name] = 1;
@@ -7607,11 +7274,12 @@ CSSLint.addRule({
});
parser.addListener("endrule", endRule);
- parser.addListener("endfontface", endRule);
+ parser.addListener("endfontface", endRule);
}
});
+
CSSLint.addRule({
id: "star-property-hack",
name: "Disallow properties with a star prefix",
@@ -7622,12 +7290,13 @@ CSSLint.addRule({
parser.addListener("property", function(event){
var property = event.property;
- if (property.hack == "*") {
+ if (property.hack === "*") {
reporter.report("Property with star prefix found.", event.property.line, event.property.col, rule);
}
});
}
});
+
CSSLint.addRule({
id: "text-indent",
name: "Disallow negative text-indent",
@@ -7639,12 +7308,12 @@ CSSLint.addRule({
direction;
- function startRule(event){
+ function startRule(){
textIndent = false;
direction = "inherit";
}
- function endRule(event){
- if (textIndent && direction != "ltr"){
+ function endRule(){
+ if (textIndent && direction !== "ltr"){
reporter.report("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.", textIndent.line, textIndent.col, rule);
}
}
@@ -7655,9 +7324,9 @@ CSSLint.addRule({
var name = event.property.toString().toLowerCase(),
value = event.value;
- if (name == "text-indent" && value.parts[0].value < -99){
+ if (name === "text-indent" && value.parts[0].value < -99){
textIndent = event.property;
- } else if (name == "direction" && value == "ltr"){
+ } else if (name === "direction" && value.toString() === "ltr"){
direction = "ltr";
}
});
@@ -7668,6 +7337,7 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "underscore-property-hack",
name: "Disallow properties with an underscore prefix",
@@ -7678,12 +7348,13 @@ CSSLint.addRule({
parser.addListener("property", function(event){
var property = event.property;
- if (property.hack == "_") {
+ if (property.hack === "_") {
reporter.report("Property with underscore prefix found.", event.property.line, event.property.col, rule);
}
});
}
});
+
CSSLint.addRule({
id: "unique-headings",
name: "Headings should only be defined once",
@@ -7692,7 +7363,7 @@ CSSLint.addRule({
init: function(parser, reporter){
var rule = this;
- var headings = {
+ var headings = {
h1: 0,
h2: 0,
h3: 0,
@@ -7713,14 +7384,14 @@ CSSLint.addRule({
part = selector.parts[selector.parts.length-1];
if (part.elementName && /(h[1-6])/i.test(part.elementName.toString())){
-
+
for (j=0; j < part.modifiers.length; j++){
- if (part.modifiers[j].type == "pseudo"){
+ if (part.modifiers[j].type === "pseudo"){
pseudo = true;
break;
}
}
-
+
if (!pseudo){
headings[RegExp.$1]++;
if (headings[RegExp.$1] > 1) {
@@ -7730,11 +7401,11 @@ CSSLint.addRule({
}
}
});
-
- parser.addListener("endstylesheet", function(event){
+
+ parser.addListener("endstylesheet", function(){
var prop,
messages = [];
-
+
for (prop in headings){
if (headings.hasOwnProperty(prop)){
if (headings[prop] > 1){
@@ -7742,14 +7413,15 @@ CSSLint.addRule({
}
}
}
-
+
if (messages.length){
reporter.rollupWarn("You have " + messages.join(", ") + " defined in this stylesheet.", rule);
}
- });
+ });
}
});
+
CSSLint.addRule({
id: "universal-selector",
name: "Disallow universal selector",
@@ -7762,14 +7434,13 @@ CSSLint.addRule({
var selectors = event.selectors,
selector,
part,
- modifier,
- i, j, k;
+ i;
for (i=0; i < selectors.length; i++){
selector = selectors[i];
-
+
part = selector.parts[selector.parts.length-1];
- if (part.elementName == "*"){
+ if (part.elementName === "*"){
reporter.report(rule.desc, part.line, part.col, rule);
}
}
@@ -7777,6 +7448,7 @@ CSSLint.addRule({
}
});
+
CSSLint.addRule({
id: "unqualified-attributes",
name: "Disallow unqualified attribute selectors",
@@ -7786,31 +7458,32 @@ CSSLint.addRule({
var rule = this;
parser.addListener("startrule", function(event){
-
+
var selectors = event.selectors,
selector,
part,
modifier,
- i, j, k;
+ i, k;
for (i=0; i < selectors.length; i++){
selector = selectors[i];
-
+
part = selector.parts[selector.parts.length-1];
- if (part.type == parser.SELECTOR_PART_TYPE){
+ if (part.type === parser.SELECTOR_PART_TYPE){
for (k=0; k < part.modifiers.length; k++){
modifier = part.modifiers[k];
- if (modifier.type == "attribute" && (!part.elementName || part.elementName == "*")){
- reporter.report(rule.desc, part.line, part.col, rule);
+ if (modifier.type === "attribute" && (!part.elementName || part.elementName === "*")){
+ reporter.report(rule.desc, part.line, part.col, rule);
}
}
}
-
- }
+
+ }
});
}
});
+
CSSLint.addRule({
id: "vendor-prefix",
name: "Require standard property with vendor prefix",
@@ -7826,71 +7499,67 @@ CSSLint.addRule({
"-webkit-border-top-right-radius": "border-top-right-radius",
"-webkit-border-bottom-left-radius": "border-bottom-left-radius",
"-webkit-border-bottom-right-radius": "border-bottom-right-radius",
-
+
"-o-border-radius": "border-radius",
"-o-border-top-left-radius": "border-top-left-radius",
"-o-border-top-right-radius": "border-top-right-radius",
"-o-border-bottom-left-radius": "border-bottom-left-radius",
"-o-border-bottom-right-radius": "border-bottom-right-radius",
-
+
"-moz-border-radius": "border-radius",
"-moz-border-radius-topleft": "border-top-left-radius",
"-moz-border-radius-topright": "border-top-right-radius",
"-moz-border-radius-bottomleft": "border-bottom-left-radius",
- "-moz-border-radius-bottomright": "border-bottom-right-radius",
-
+ "-moz-border-radius-bottomright": "border-bottom-right-radius",
+
"-moz-column-count": "column-count",
"-webkit-column-count": "column-count",
-
+
"-moz-column-gap": "column-gap",
"-webkit-column-gap": "column-gap",
-
+
"-moz-column-rule": "column-rule",
"-webkit-column-rule": "column-rule",
-
+
"-moz-column-rule-style": "column-rule-style",
"-webkit-column-rule-style": "column-rule-style",
-
+
"-moz-column-rule-color": "column-rule-color",
"-webkit-column-rule-color": "column-rule-color",
-
+
"-moz-column-rule-width": "column-rule-width",
"-webkit-column-rule-width": "column-rule-width",
-
+
"-moz-column-width": "column-width",
"-webkit-column-width": "column-width",
-
+
"-webkit-column-span": "column-span",
"-webkit-columns": "columns",
-
+
"-moz-box-shadow": "box-shadow",
"-webkit-box-shadow": "box-shadow",
-
+
"-moz-transform" : "transform",
"-webkit-transform" : "transform",
"-o-transform" : "transform",
"-ms-transform" : "transform",
-
+
"-moz-transform-origin" : "transform-origin",
"-webkit-transform-origin" : "transform-origin",
"-o-transform-origin" : "transform-origin",
"-ms-transform-origin" : "transform-origin",
-
+
"-moz-box-sizing" : "box-sizing",
- "-webkit-box-sizing" : "box-sizing",
-
- "-moz-user-select" : "user-select",
- "-khtml-user-select" : "user-select",
- "-webkit-user-select" : "user-select"
+ "-webkit-box-sizing" : "box-sizing"
};
function startRule(){
properties = {};
- num=1;
+ num = 1;
}
- function endRule(event){
+ function endRule(){
var prop,
- i, len,
- standard,
+ i,
+ len,
needed,
actual,
needsStandard = [];
@@ -7905,7 +7574,7 @@ CSSLint.addRule({
needed = needsStandard[i].needed;
actual = needsStandard[i].actual;
- if (!properties[needed]){
+ if (!properties[needed]){
reporter.report("Missing standard property '" + needed + "' to go along with '" + actual + "'.", properties[actual][0].name.line, properties[actual][0].name.col, rule);
} else {
if (properties[needed][0].pos < properties[actual][0].pos){
@@ -7914,13 +7583,13 @@ CSSLint.addRule({
}
}
- }
-
+ }
+
parser.addListener("startrule", startRule);
parser.addListener("startfontface", startRule);
parser.addListener("startpage", startRule);
parser.addListener("startpagemargin", startRule);
- parser.addListener("startkeyframerule", startRule);
+ parser.addListener("startkeyframerule", startRule);
parser.addListener("property", function(event){
var name = event.property.text.toLowerCase();
@@ -7936,10 +7605,11 @@ CSSLint.addRule({
parser.addListener("endfontface", endRule);
parser.addListener("endpage", endRule);
parser.addListener("endpagemargin", endRule);
- parser.addListener("endkeyframerule", endRule);
+ parser.addListener("endkeyframerule", endRule);
}
});
+
CSSLint.addRule({
id: "zero-units",
name: "Disallow units for 0 values",
@@ -7949,11 +7619,11 @@ CSSLint.addRule({
var rule = this;
parser.addListener("property", function(event){
var parts = event.value.parts,
- i = 0,
+ i = 0,
len = parts.length;
while(i < len){
- if ((parts[i].units || parts[i].type == "percentage") && parts[i].value === 0 && parts[i].type != "time"){
+ if ((parts[i].units || parts[i].type === "percentage") && parts[i].value === 0 && parts[i].type !== "time"){
reporter.report("Values of 0 shouldn't have units specified.", parts[i].line, parts[i].col, rule);
}
i++;
@@ -7964,12 +7634,13 @@ CSSLint.addRule({
}
});
+
(function() {
var xmlEscape = function(str) {
if (!str || str.constructor !== String) {
return "";
}
-
+
return str.replace(/[\"&><]/g, function(match) {
switch (match) {
case "\"":
@@ -7979,7 +7650,7 @@ CSSLint.addRule({
case "<":
return "&lt;";
case ">":
- return "&gt;";
+ return "&gt;";
}
});
};
@@ -7996,23 +7667,23 @@ CSSLint.addRule({
readError: function(filename, message) {
return "<file name=\"" + xmlEscape(filename) + "\"><error line=\"0\" column=\"0\" severty=\"error\" message=\"" + xmlEscape(message) + "\"></error></file>";
},
- formatResults: function(results, filename, options) {
+ formatResults: function(results, filename/*, options*/) {
var messages = results.messages,
output = [];
var generateSource = function(rule) {
- if (!rule || !('name' in rule)) {
+ if (!rule || !("name" in rule)) {
return "";
}
- return 'net.csslint.' + rule.name.replace(/\s/g,'');
+ return "net.csslint." + rule.name.replace(/\s/g,"");
};
if (messages.length > 0) {
output.push("<file name=\""+filename+"\">");
- CSSLint.Util.forEach(messages, function (message, i) {
+ CSSLint.Util.forEach(messages, function (message) {
if (!message.rollup) {
- output.push("<error line=\"" + message.line + "\" column=\"" + message.col + "\" severity=\"" + message.type + "\"" +
+ output.push("<error line=\"" + message.line + "\" column=\"" + message.col + "\" severity=\"" + message.type + "\"" +
" message=\"" + xmlEscape(message.message) + "\" source=\"" + generateSource(message.rule) +"\"/>");
}
});
@@ -8024,6 +7695,7 @@ CSSLint.addRule({
});
}());
+
CSSLint.addFormatter({
id: "compact",
name: "Compact, 'porcelain' format",
@@ -8042,21 +7714,22 @@ CSSLint.addFormatter({
};
if (messages.length === 0) {
- return options.quiet ? "" : filename + ": Lint Free!";
+ return options.quiet ? "" : filename + ": Lint Free!";
}
- CSSLint.Util.forEach(messages, function(message, i) {
+ CSSLint.Util.forEach(messages, function(message) {
if (message.rollup) {
output += filename + ": " + capitalize(message.type) + " - " + message.message + "\n";
} else {
- output += filename + ": " + "line " + message.line +
- ", col " + message.col + ", " + capitalize(message.type) + " - " + message.message + "\n";
+ output += filename + ": " + "line " + message.line +
+ ", col " + message.col + ", " + capitalize(message.type) + " - " + message.message + " (" + message.rule.id + ")\n";
}
});
-
+
return output;
}
});
+
CSSLint.addFormatter({
id: "csslint-xml",
name: "CSSLint XML format",
@@ -8066,7 +7739,7 @@ CSSLint.addFormatter({
endFormat: function(){
return "</csslint>";
},
- formatResults: function(results, filename, options) {
+ formatResults: function(results, filename/*, options*/) {
var messages = results.messages,
output = [];
var escapeSpecialCharacters = function(str) {
@@ -8078,7 +7751,7 @@ CSSLint.addFormatter({
if (messages.length > 0) {
output.push("<file name=\""+filename+"\">");
- CSSLint.Util.forEach(messages, function (message, i) {
+ CSSLint.Util.forEach(messages, function (message) {
if (message.rollup) {
output.push("<issue severity=\"" + message.type + "\" reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
} else {
@@ -8092,6 +7765,7 @@ CSSLint.addFormatter({
return output.join("");
}
});
+
CSSLint.addFormatter({
id: "junit-xml",
name: "JUNIT XML format",
@@ -8101,19 +7775,19 @@ CSSLint.addFormatter({
endFormat: function() {
return "</testsuites>";
},
- formatResults: function(results, filename, options) {
+ formatResults: function(results, filename/*, options*/) {
var messages = results.messages,
output = [],
tests = {
- 'error': 0,
- 'failure': 0
+ "error": 0,
+ "failure": 0
};
var generateSource = function(rule) {
- if (!rule || !('name' in rule)) {
+ if (!rule || !("name" in rule)) {
return "";
}
- return 'net.csslint.' + rule.name.replace(/\s/g,'');
+ return "net.csslint." + rule.name.replace(/\s/g,"");
};
var escapeSpecialCharacters = function(str) {
@@ -8127,11 +7801,11 @@ CSSLint.addFormatter({
if (messages.length > 0) {
- messages.forEach(function (message, i) {
- var type = message.type === 'warning' ? 'error' : message.type;
+ messages.forEach(function (message) {
+ var type = message.type === "warning" ? "error" : message.type;
if (!message.rollup) {
output.push("<testcase time=\"0\" name=\"" + generateSource(message.rule) + "\">");
- output.push("<" + type + " message=\"" + escapeSpecialCharacters(message.message) + "\"><![CDATA[" + message.line + ':' + message.col + ':' + escapeSpecialCharacters(message.evidence) + "]]></" + type + ">");
+ output.push("<" + type + " message=\"" + escapeSpecialCharacters(message.message) + "\"><![CDATA[" + message.line + ":" + message.col + ":" + escapeSpecialCharacters(message.evidence) + "]]></" + type + ">");
output.push("</testcase>");
tests[type] += 1;
@@ -8149,6 +7823,7 @@ CSSLint.addFormatter({
}
});
+
CSSLint.addFormatter({
id: "lint-xml",
name: "Lint XML format",
@@ -8158,7 +7833,7 @@ CSSLint.addFormatter({
endFormat: function(){
return "</lint>";
},
- formatResults: function(results, filename, options) {
+ formatResults: function(results, filename/*, options*/) {
var messages = results.messages,
output = [];
var escapeSpecialCharacters = function(str) {
@@ -8169,9 +7844,9 @@ CSSLint.addFormatter({
};
if (messages.length > 0) {
-
+
output.push("<file name=\""+filename+"\">");
- CSSLint.Util.forEach(messages, function (message, i) {
+ CSSLint.Util.forEach(messages, function (message) {
if (message.rollup) {
output.push("<issue severity=\"" + message.type + "\" reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
} else {
@@ -8185,6 +7860,7 @@ CSSLint.addFormatter({
return output.join("");
}
});
+
CSSLint.addFormatter({
id: "text",
name: "Plain Text",
@@ -8203,12 +7879,19 @@ CSSLint.addFormatter({
return options.quiet ? "" : "\n\ncsslint: No errors in " + filename + ".";
}
- output = "\n\ncsslint: There are " + messages.length + " problems in " + filename + ".";
+ output = "\n\ncsslint: There ";
+ if (messages.length === 1) {
+ output += "is 1 problem";
+ } else {
+ output += "are " + messages.length + " problems";
+ }
+ output += " in " + filename + ".";
+
var pos = filename.lastIndexOf("/"),
shortFilename = filename;
if (pos === -1){
- pos = filename.lastIndexOf("\\");
+ pos = filename.lastIndexOf("\\");
}
if (pos > -1){
shortFilename = filename.substring(pos+1);
@@ -8225,11 +7908,779 @@ CSSLint.addFormatter({
output += "\n" + message.evidence;
}
});
-
+
return output;
}
});
-exports.CSSLint = CSSLint;
+module.exports.CSSLint = CSSLint;
+
+});
+
+ace.define("ace/mode/css_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/css/csslint"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var Mirror = require("../worker/mirror").Mirror;
+var CSSLint = require("./css/csslint").CSSLint;
+
+var Worker = exports.Worker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(400);
+ this.ruleset = null;
+ this.setDisabledRules("ids|order-alphabetical");
+ this.setInfoRules(
+ "adjoining-classes|qualified-headings|zero-units|gradients|" +
+ "import|outline-none|vendor-prefix"
+ );
+};
+
+oop.inherits(Worker, Mirror);
+
+(function() {
+ this.setInfoRules = function(ruleNames) {
+ if (typeof ruleNames == "string")
+ ruleNames = ruleNames.split("|");
+ this.infoRules = lang.arrayToMap(ruleNames);
+ this.doc.getValue() && this.deferredUpdate.schedule(100);
+ };
+
+ this.setDisabledRules = function(ruleNames) {
+ if (!ruleNames) {
+ this.ruleset = null;
+ } else {
+ if (typeof ruleNames == "string")
+ ruleNames = ruleNames.split("|");
+ var all = {};
+
+ CSSLint.getRules().forEach(function(x){
+ all[x.id] = true;
+ });
+ ruleNames.forEach(function(x) {
+ delete all[x];
+ });
+
+ this.ruleset = all;
+ }
+ this.doc.getValue() && this.deferredUpdate.schedule(100);
+ };
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ if (!value)
+ return this.sender.emit("annotate", []);
+ var infoRules = this.infoRules;
+
+ var result = CSSLint.verify(value, this.ruleset);
+ this.sender.emit("annotate", result.messages.map(function(msg) {
+ return {
+ row: msg.line - 1,
+ column: msg.col - 1,
+ text: msg.message,
+ type: infoRules[msg.rule.id] ? "info" : msg.type,
+ rule: msg.rule.name
+ }
+ }));
+ };
+
+}).call(Worker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ return bound;
+ };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ while (++i < length) {
+ if (i in self) {
+ fun.call(thisp, self[i], i, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ var i = 0;
+ var result;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i++];
+ break;
+ }
+ if (++i >= length) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ var result, i = length - 1;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i--];
+ break;
+ }
+ if (--i < 0) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+
+ var i = 0;
+ if (arguments.length > 1) {
+ i = toInteger(arguments[1]);
+ }
+ i = i >= 0 ? i : Math.max(0, length + i);
+ for (; i < length; i++) {
+ if (i in self && self[i] === sought) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+ var i = length - 1;
+ if (arguments.length > 1) {
+ i = Math.min(i, toInteger(arguments[1]));
+ }
+ i = i >= 0 ? i : length - Math.abs(i);
+ for (; i >= 0; i--) {
+ if (i in self && sought === self[i]) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Object.getPrototypeOf) {
+ Object.getPrototypeOf = function getPrototypeOf(object) {
+ return object.__proto__ || (
+ object.constructor ?
+ object.constructor.prototype :
+ prototypeOfObject
+ );
+ };
+}
+if (!Object.getOwnPropertyDescriptor) {
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+ "non-object: ";
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT + object);
+ if (!owns(object, property))
+ return;
+
+ var descriptor, getter, setter;
+ descriptor = { enumerable: true, configurable: true };
+ if (supportsAccessors) {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+
+ var getter = lookupGetter(object, property);
+ var setter = lookupSetter(object, property);
+ object.__proto__ = prototype;
+
+ if (getter || setter) {
+ if (getter) descriptor.get = getter;
+ if (setter) descriptor.set = setter;
+ return descriptor;
+ }
+ }
+ descriptor.value = object[property];
+ return descriptor;
+ };
+}
+if (!Object.getOwnPropertyNames) {
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ return Object.keys(object);
+ };
+}
+if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
+ Object.create = function create(prototype, properties) {
+ var object;
+ if (prototype === null) {
+ object = createEmpty();
+ } else {
+ if (typeof prototype != "object")
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+ var Type = function () {};
+ Type.prototype = prototype;
+ object = new Type();
+ object.__proto__ = prototype;
+ }
+ if (properties !== void 0)
+ Object.defineProperties(object, properties);
+ return object;
+ };
+}
+
+function doesDefinePropertyWork(object) {
+ try {
+ Object.defineProperty(object, "sentinel", {});
+ return "sentinel" in object;
+ } catch (exception) {
+ }
+}
+if (Object.defineProperty) {
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
+ doesDefinePropertyWork(document.createElement("div"));
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+ var definePropertyFallback = Object.defineProperty;
+ }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+ "on this javascript engine";
+
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+ if (definePropertyFallback) {
+ try {
+ return definePropertyFallback.call(Object, object, property, descriptor);
+ } catch (exception) {
+ }
+ }
+ if (owns(descriptor, "value")) {
+
+ if (supportsAccessors && (lookupGetter(object, property) ||
+ lookupSetter(object, property)))
+ {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+ delete object[property];
+ object[property] = descriptor.value;
+ object.__proto__ = prototype;
+ } else {
+ object[property] = descriptor.value;
+ }
+ } else {
+ if (!supportsAccessors)
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+ if (owns(descriptor, "get"))
+ defineGetter(object, property, descriptor.get);
+ if (owns(descriptor, "set"))
+ defineSetter(object, property, descriptor.set);
+ }
-}); \ No newline at end of file
+ return object;
+ };
+}
+if (!Object.defineProperties) {
+ Object.defineProperties = function defineProperties(object, properties) {
+ for (var property in properties) {
+ if (owns(properties, property))
+ Object.defineProperty(object, property, properties[property]);
+ }
+ return object;
+ };
+}
+if (!Object.seal) {
+ Object.seal = function seal(object) {
+ return object;
+ };
+}
+if (!Object.freeze) {
+ Object.freeze = function freeze(object) {
+ return object;
+ };
+}
+try {
+ Object.freeze(function () {});
+} catch (exception) {
+ Object.freeze = (function freeze(freezeObject) {
+ return function freeze(object) {
+ if (typeof object == "function") {
+ return object;
+ } else {
+ return freezeObject(object);
+ }
+ };
+ })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+ Object.preventExtensions = function preventExtensions(object) {
+ return object;
+ };
+}
+if (!Object.isSealed) {
+ Object.isSealed = function isSealed(object) {
+ return false;
+ };
+}
+if (!Object.isFrozen) {
+ Object.isFrozen = function isFrozen(object) {
+ return false;
+ };
+}
+if (!Object.isExtensible) {
+ Object.isExtensible = function isExtensible(object) {
+ if (Object(object) === object) {
+ throw new TypeError(); // TODO message
+ }
+ var name = '';
+ while (owns(object, name)) {
+ name += '?';
+ }
+ object[name] = true;
+ var returnValue = owns(object, name);
+ delete object[name];
+ return returnValue;
+ };
+}
+if (!Object.keys) {
+ var hasDontEnumBug = true,
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ for (var key in {"toString": null}) {
+ hasDontEnumBug = false;
+ }
+
+ Object.keys = function keys(object) {
+
+ if (
+ (typeof object != "object" && typeof object != "function") ||
+ object === null
+ ) {
+ throw new TypeError("Object.keys called on a non-object");
+ }
+
+ var keys = [];
+ for (var name in object) {
+ if (owns(object, name)) {
+ keys.push(name);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+ var dontEnum = dontEnums[i];
+ if (owns(object, dontEnum)) {
+ keys.push(dontEnum);
+ }
+ }
+ }
+ return keys;
+ };
+
+}
+if (!Date.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ };
+}
+
+function toInteger(n) {
+ n = +n;
+ if (n !== n) { // isNaN
+ n = 0;
+ } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ }
+ return n;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/js/vendor/ace/src-noconflict/worker-html.js b/js/vendor/ace/src-noconflict/worker-html.js
new file mode 100755
index 0000000..22d83bc
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/worker-html.js
@@ -0,0 +1,11531 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document) {
+ return;
+}
+
+window.console = function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+};
+window.console.error =
+window.console.warn =
+window.console.log =
+window.console.trace = window.console;
+
+window.window = window;
+window.ace = window;
+
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
+window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = (base ? base + "/" : "") + moduleName;
+
+ while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+window.require = function(parentId, id) {
+ if (!id) {
+ id = parentId;
+ parentId = null;
+ }
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = window.normalizeModule(parentId, id);
+
+ var module = window.require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ var chunks = id.split("/");
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+ chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
+ var path = chunks.join("/") + ".js";
+
+ window.require.id = id;
+ importScripts(path);
+ return window.require(parentId, id);
+};
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = window.require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ deps = [];
+ id = window.require.id;
+ }
+
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject 'require', 'exports' and
+ // 'module' as dependencies, to provide CommonJS compatibility.
+ deps = ['require', 'exports', 'module'];
+
+ var req = function(childId) {
+ return window.require(id, childId);
+ };
+
+ window.require.modules[id] = {
+ exports: {},
+ factory: function() {
+ var module = this;
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch(dep) {
+ // Because 'require', 'exports' and 'module' aren't actual
+ // dependencies, we must handle them seperately.
+ case 'require': return req;
+ case 'exports': return module.exports;
+ case 'module': return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+window.define.amd = {};
+
+window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
+ require.tlns = topLevelNamespaces;
+};
+
+window.initSender = function initSender() {
+
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("ace/lib/oop");
+
+ var Sender = function() {};
+
+ (function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.callback = function(data, callbackId) {
+ postMessage({
+ type: "call",
+ id: callbackId,
+ data: data
+ });
+ };
+
+ this.emit = function(name, data) {
+ postMessage({
+ type: "event",
+ name: name,
+ data: data
+ });
+ };
+
+ }).call(Sender.prototype);
+
+ return new Sender();
+};
+
+var main = window.main = null;
+var sender = window.sender = null;
+
+window.onmessage = function(e) {
+ var msg = e.data;
+ if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ initBaseUrls(msg.tlns);
+ require("ace/lib/es5-shim");
+ sender = window.sender = initSender();
+ var clazz = require(msg.module)[msg.classname];
+ main = window.main = new clazz(sender);
+ }
+ else if (msg.event && sender) {
+ sender._signal(msg.event, msg.data);
+ }
+};
+})(this);
+
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.last = function(a) {
+ return a[a.length - 1];
+};
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ var result = '';
+ while (count > 0) {
+ if (count & 1)
+ result += string;
+
+ if (count >>= 1)
+ string += string;
+ }
+ return result;
+};
+
+var trimBeginRegexp = /^\s\s*/;
+var trimEndRegexp = /\s\s*$/;
+
+exports.stringTrimLeft = function (string) {
+ return string.replace(trimBeginRegexp, '');
+};
+
+exports.stringTrimRight = function (string) {
+ return string.replace(trimEndRegexp, '');
+};
+
+exports.copyObject = function(obj) {
+ var copy = {};
+ for (var key in obj) {
+ copy[key] = obj[key];
+ }
+ return copy;
+};
+
+exports.copyArray = function(array){
+ var copy = [];
+ for (var i=0, l=array.length; i<l; i++) {
+ if (array[i] && typeof array[i] == "object")
+ copy[i] = this.copyObject( array[i] );
+ else
+ copy[i] = array[i];
+ }
+ return copy;
+};
+
+exports.deepCopy = function deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
+ return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+ }
+ var cons = obj.constructor;
+ if (cons === RegExp)
+ return obj;
+
+ copy = cons();
+ for (var key in obj) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+};
+
+exports.arrayToMap = function(arr) {
+ var map = {};
+ for (var i=0; i<arr.length; i++) {
+ map[arr[i]] = 1;
+ }
+ return map;
+
+};
+
+exports.createMap = function(props) {
+ var map = Object.create(null);
+ for (var i in props) {
+ map[i] = props[i];
+ }
+ return map;
+};
+exports.arrayRemove = function(array, value) {
+ for (var i = 0; i <= array.length; i++) {
+ if (value === array[i]) {
+ array.splice(i, 1);
+ }
+ }
+};
+
+exports.escapeRegExp = function(str) {
+ return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
+};
+
+exports.escapeHTML = function(str) {
+ return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
+};
+
+exports.getMatchOffsets = function(string, regExp) {
+ var matches = [];
+
+ string.replace(regExp, function(str) {
+ matches.push({
+ offset: arguments[arguments.length-2],
+ length: str.length
+ });
+ });
+
+ return matches;
+};
+exports.deferredCall = function(fcn) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var deferred = function(timeout) {
+ deferred.cancel();
+ timer = setTimeout(callback, timeout || 0);
+ return deferred;
+ };
+
+ deferred.schedule = deferred;
+
+ deferred.call = function() {
+ this.cancel();
+ fcn();
+ return deferred;
+ };
+
+ deferred.cancel = function() {
+ clearTimeout(timer);
+ timer = null;
+ return deferred;
+ };
+
+ deferred.isPending = function() {
+ return timer;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+ _self.schedule = _self;
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+EventEmitter._emit =
+EventEmitter._dispatchEvent = function(eventName, e) {
+ this._eventRegistry || (this._eventRegistry = {});
+ this._defaultHandlers || (this._defaultHandlers = {});
+
+ var listeners = this._eventRegistry[eventName] || [];
+ var defaultHandler = this._defaultHandlers[eventName];
+ if (!listeners.length && !defaultHandler)
+ return;
+
+ if (typeof e != "object" || !e)
+ e = {};
+
+ if (!e.type)
+ e.type = eventName;
+ if (!e.stopPropagation)
+ e.stopPropagation = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+EventEmitter.removeListener =
+EventEmitter.removeEventListener = function(eventName, callback) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ return;
+
+ var index = listeners.indexOf(callback);
+ if (index !== -1)
+ listeners.splice(index, 1);
+};
+
+EventEmitter.removeAllListeners = function(eventName) {
+ if (this._eventRegistry) this._eventRegistry[eventName] = [];
+};
+
+exports.EventEmitter = EventEmitter;
+
+});
+
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+var Range = function(startRow, startColumn, endRow, endColumn) {
+ this.start = {
+ row: startRow,
+ column: startColumn
+ };
+
+ this.end = {
+ row: endRow,
+ column: endColumn
+ };
+};
+
+(function() {
+ this.isEqual = function(range) {
+ return this.start.row === range.start.row &&
+ this.end.row === range.end.row &&
+ this.start.column === range.start.column &&
+ this.end.column === range.end.column;
+ };
+ this.toString = function() {
+ return ("Range: [" + this.start.row + "/" + this.start.column +
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
+ };
+
+ this.contains = function(row, column) {
+ return this.compare(row, column) == 0;
+ };
+ this.compareRange = function(range) {
+ var cmp,
+ end = range.end,
+ start = range.start;
+
+ cmp = this.compare(end.row, end.column);
+ if (cmp == 1) {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == 1) {
+ return 2;
+ } else if (cmp == 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+ } else if (cmp == -1) {
+ return -2;
+ } else {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == -1) {
+ return -1;
+ } else if (cmp == 1) {
+ return 42;
+ } else {
+ return 0;
+ }
+ }
+ };
+ this.comparePoint = function(p) {
+ return this.compare(p.row, p.column);
+ };
+ this.containsRange = function(range) {
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
+ this.isEnd = function(row, column) {
+ return this.end.row == row && this.end.column == column;
+ };
+ this.isStart = function(row, column) {
+ return this.start.row == row && this.start.column == column;
+ };
+ this.setStart = function(row, column) {
+ if (typeof row == "object") {
+ this.start.column = row.column;
+ this.start.row = row.row;
+ } else {
+ this.start.row = row;
+ this.start.column = column;
+ }
+ };
+ this.setEnd = function(row, column) {
+ if (typeof row == "object") {
+ this.end.column = row.column;
+ this.end.row = row.row;
+ } else {
+ this.end.row = row;
+ this.end.column = column;
+ }
+ };
+ this.inside = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.insideStart = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.insideEnd = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.compare = function(row, column) {
+ if (!this.isMultiLine()) {
+ if (row === this.start.row) {
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+ };
+ }
+
+ if (row < this.start.row)
+ return -1;
+
+ if (row > this.end.row)
+ return 1;
+
+ if (this.start.row === row)
+ return column >= this.start.column ? 0 : -1;
+
+ if (this.end.row === row)
+ return column <= this.end.column ? 0 : 1;
+
+ return 0;
+ };
+ this.compareStart = function(row, column) {
+ if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.compareEnd = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.compareInside = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.clipRows = function(firstRow, lastRow) {
+ if (this.end.row > lastRow)
+ var end = {row: lastRow + 1, column: 0};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {row: firstRow, column: 0};
+
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+ this.extend = function(row, column) {
+ var cmp = this.compare(row, column);
+
+ if (cmp == 0)
+ return this;
+ else if (cmp == -1)
+ var start = {row: row, column: column};
+ else
+ var end = {row: row, column: column};
+
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+
+ this.isEmpty = function() {
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
+ };
+ this.isMultiLine = function() {
+ return (this.start.row !== this.end.row);
+ };
+ this.clone = function() {
+ return Range.fromPoints(this.start, this.end);
+ };
+ this.collapseRows = function() {
+ if (this.end.column == 0)
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+ else
+ return new Range(this.start.row, 0, this.end.row, 0)
+ };
+ this.toScreenRange = function(session) {
+ var screenPosStart = session.documentToScreenPosition(this.start);
+ var screenPosEnd = session.documentToScreenPosition(this.end);
+
+ return new Range(
+ screenPosStart.row, screenPosStart.column,
+ screenPosEnd.row, screenPosEnd.column
+ );
+ };
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+
+ if (range.start.row == range.end.row && range.start.row != this.row)
+ return;
+
+ if (range.start.row > this.row)
+ return;
+
+ if (range.start.row == this.row && range.start.column > this.column)
+ return;
+
+ var row = this.row;
+ var column = this.column;
+ var start = range.start;
+ var end = range.end;
+
+ if (delta.action === "insertText") {
+ if (start.row === row && start.column <= column) {
+ if (start.column === column && this.$insertRight) {
+ } else if (start.row === end.row) {
+ column += end.column - start.column;
+ } else {
+ column -= start.column;
+ row += end.row - start.row;
+ }
+ } else if (start.row !== end.row && start.row < row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "insertLines") {
+ if (start.row === row && column === 0 && this.$insertRight) {
+ }
+ else if (start.row <= row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "removeText") {
+ if (start.row === row && start.column < column) {
+ if (end.column >= column)
+ column = start.column;
+ else
+ column = Math.max(0, column - (end.column - start.column));
+
+ } else if (start.row !== end.row && start.row < row) {
+ if (end.row === row)
+ column = Math.max(0, column - end.column) + start.column;
+ row -= (end.row - start.row);
+ } else if (end.row === row) {
+ row -= end.row - start.row;
+ column = Math.max(0, column - end.column) + start.column;
+ }
+ } else if (delta.action == "removeLines") {
+ if (start.row <= row) {
+ if (end.row <= row)
+ row -= end.row - start.row;
+ else {
+ row = start.row;
+ column = 0;
+ }
+ }
+ }
+
+ this.setPosition(row, column, true);
+ };
+ this.setPosition = function(row, column, noClip) {
+ var pos;
+ if (noClip) {
+ pos = {
+ row: row,
+ column: column
+ };
+ } else {
+ pos = this.$clipPositionToDocument(row, column);
+ }
+
+ if (this.row == pos.row && this.column == pos.column)
+ return;
+
+ var old = {
+ row: this.row,
+ column: this.column
+ };
+
+ this.row = pos.row;
+ this.column = pos.column;
+ this._signal("change", {
+ old: old,
+ value: pos
+ });
+ };
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("change", this.$onChange);
+ };
+ this.$clipPositionToDocument = function(row, column) {
+ var pos = {};
+
+ if (row >= this.document.getLength()) {
+ pos.row = Math.max(0, this.document.getLength() - 1);
+ pos.column = this.document.getLine(pos.row).length;
+ }
+ else if (row < 0) {
+ pos.row = 0;
+ pos.column = 0;
+ }
+ else {
+ pos.row = row;
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+ }
+
+ if (column < 0)
+ pos.column = 0;
+
+ return pos;
+ };
+
+}).call(Anchor.prototype);
+
+});
+
+ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(text) {
+ this.$lines = [];
+ if (text.length === 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(text)) {
+ this._insertLines(0, text);
+ } else {
+ this.insert({row: 0, column:0}, text);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength();
+ this.remove(new Range(0, 0, len, this.getLine(len-1).length));
+ this.insert({row: 0, column:0}, text);
+ };
+ this.getValue = function() {
+ return this.getAllLines().join(this.getNewLineCharacter());
+ };
+ this.createAnchor = function(row, column) {
+ return new Anchor(this, row, column);
+ };
+ if ("aaa".split(/a/).length === 0)
+ this.$split = function(text) {
+ return text.replace(/\r\n|\r/g, "\n").split("\n");
+ };
+ else
+ this.$split = function(text) {
+ return text.split(/\r\n|\r|\n/);
+ };
+
+
+ this.$detectNewLine = function(text) {
+ var match = text.match(/^.*?(\r\n|\r|\n)/m);
+ this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine || "\n";
+ }
+ };
+
+ this.$autoNewLine = "";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineMode = function() {
+ return this.$newLineMode;
+ };
+ this.isNewLine = function(text) {
+ return (text == "\r\n" || text == "\r" || text == "\n");
+ };
+ this.getLine = function(row) {
+ return this.$lines[row] || "";
+ };
+ this.getLines = function(firstRow, lastRow) {
+ return this.$lines.slice(firstRow, lastRow + 1);
+ };
+ this.getAllLines = function() {
+ return this.getLines(0, this.getLength());
+ };
+ this.getLength = function() {
+ return this.$lines.length;
+ };
+ this.getTextRange = function(range) {
+ if (range.start.row == range.end.row) {
+ return this.getLine(range.start.row)
+ .substring(range.start.column, range.end.column);
+ }
+ var lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ return lines.join(this.getNewLineCharacter());
+ };
+
+ this.$clipPosition = function(position) {
+ var length = this.getLength();
+ if (position.row >= length) {
+ position.row = Math.max(0, length - 1);
+ position.column = this.getLine(length-1).length;
+ } else if (position.row < 0)
+ position.row = 0;
+ return position;
+ };
+ this.insert = function(position, text) {
+ if (!text || text.length === 0)
+ return position;
+
+ position = this.$clipPosition(position);
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ var lines = this.$split(text);
+ var firstLine = lines.splice(0, 1)[0];
+ var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
+
+ position = this.insertInLine(position, firstLine);
+ if (lastLine !== null) {
+ position = this.insertNewLine(position); // terminate first line
+ position = this._insertLines(position.row, lines);
+ position = this.insertInLine(position, lastLine || "");
+ }
+ return position;
+ };
+ this.insertLines = function(row, lines) {
+ if (row >= this.getLength())
+ return this.insert({row: row, column: 0}, "\n" + lines.join("\n"));
+ return this._insertLines(Math.max(row, 0), lines);
+ };
+ this._insertLines = function(row, lines) {
+ if (lines.length == 0)
+ return {row: row, column: 0};
+ while (lines.length > 20000) {
+ var end = this._insertLines(row, lines.slice(0, 20000));
+ lines = lines.slice(20000);
+ row = end.row;
+ }
+
+ var args = [row, 0];
+ args.push.apply(args, lines);
+ this.$lines.splice.apply(this.$lines, args);
+
+ var range = new Range(row, 0, row + lines.length, 0);
+ var delta = {
+ action: "insertLines",
+ range: range,
+ lines: lines
+ };
+ this._signal("change", { data: delta });
+ return range.end;
+ };
+ this.insertNewLine = function(position) {
+ position = this.$clipPosition(position);
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column);
+ this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
+
+ var end = {
+ row : position.row + 1,
+ column : 0
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: this.getNewLineCharacter()
+ };
+ this._signal("change", { data: delta });
+
+ return end;
+ };
+ this.insertInLine = function(position, text) {
+ if (text.length == 0)
+ return position;
+
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column) + text
+ + line.substring(position.column);
+
+ var end = {
+ row : position.row,
+ column : position.column + text.length
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: text
+ };
+ this._signal("change", { data: delta });
+
+ return end;
+ };
+ this.remove = function(range) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ range.start = this.$clipPosition(range.start);
+ range.end = this.$clipPosition(range.end);
+
+ if (range.isEmpty())
+ return range.start;
+
+ var firstRow = range.start.row;
+ var lastRow = range.end.row;
+
+ if (range.isMultiLine()) {
+ var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
+ var lastFullRow = lastRow - 1;
+
+ if (range.end.column > 0)
+ this.removeInLine(lastRow, 0, range.end.column);
+
+ if (lastFullRow >= firstFullRow)
+ this._removeLines(firstFullRow, lastFullRow);
+
+ if (firstFullRow != firstRow) {
+ this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
+ this.removeNewLine(range.start.row);
+ }
+ }
+ else {
+ this.removeInLine(firstRow, range.start.column, range.end.column);
+ }
+ return range.start;
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ if (startColumn == endColumn)
+ return;
+
+ var range = new Range(row, startColumn, row, endColumn);
+ var line = this.getLine(row);
+ var removed = line.substring(startColumn, endColumn);
+ var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
+ this.$lines.splice(row, 1, newLine);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: removed
+ };
+ this._signal("change", { data: delta });
+ return range.start;
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ if (firstRow < 0 || lastRow >= this.getLength())
+ return this.remove(new Range(firstRow, 0, lastRow + 1, 0));
+ return this._removeLines(firstRow, lastRow);
+ };
+
+ this._removeLines = function(firstRow, lastRow) {
+ var range = new Range(firstRow, 0, lastRow + 1, 0);
+ var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
+
+ var delta = {
+ action: "removeLines",
+ range: range,
+ nl: this.getNewLineCharacter(),
+ lines: removed
+ };
+ this._signal("change", { data: delta });
+ return removed;
+ };
+ this.removeNewLine = function(row) {
+ var firstLine = this.getLine(row);
+ var secondLine = this.getLine(row+1);
+
+ var range = new Range(row, firstLine.length, row+1, 0);
+ var line = firstLine + secondLine;
+
+ this.$lines.splice(row, 2, line);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: this.getNewLineCharacter()
+ };
+ this._signal("change", { data: delta });
+ };
+ this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length == 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ if (text) {
+ var end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ var delta = deltas[i];
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this.insertLines(range.start.row, delta.lines);
+ else if (delta.action == "insertText")
+ this.insert(range.start, delta.text);
+ else if (delta.action == "removeLines")
+ this._removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "removeText")
+ this.remove(range);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ var delta = deltas[i];
+
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this._removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "insertText")
+ this.remove(range);
+ else if (delta.action == "removeLines")
+ this._insertLines(range.start.row, delta.lines);
+ else if (delta.action == "removeText")
+ this.insert(range.start, delta.text);
+ }
+ };
+ this.indexToPosition = function(index, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
+ index -= lines[i].length + newlineLength;
+ if (index < 0)
+ return {row: i, column: index + lines[i].length + newlineLength};
+ }
+ return {row: l-1, column: lines[l-1].length};
+ };
+ this.positionToIndex = function(pos, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ var index = 0;
+ var row = Math.min(pos.row, lines.length);
+ for (var i = startRow || 0; i < row; ++i)
+ index += lines[i].length + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+
+var Mirror = exports.Mirror = function(sender) {
+ this.sender = sender;
+ var doc = this.doc = new Document("");
+
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ doc.applyDeltas(e.data);
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(function() {
+
+ this.$timeout = 500;
+
+ this.setTimeout = function(timeout) {
+ this.$timeout = timeout;
+ };
+
+ this.setValue = function(value) {
+ this.doc.setValue(value);
+ this.deferredUpdate.schedule(this.$timeout);
+ };
+
+ this.getValue = function(callbackId) {
+ this.sender.callback(this.doc.getValue(), callbackId);
+ };
+
+ this.onUpdate = function() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/html/saxparser",["require","exports","module"], function(require, exports, module) {
+module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({
+1:[function(_dereq_,module,exports){
+function isScopeMarker(node) {
+ if (node.namespaceURI === "http://www.w3.org/1999/xhtml") {
+ return node.localName === "applet"
+ || node.localName === "caption"
+ || node.localName === "marquee"
+ || node.localName === "object"
+ || node.localName === "table"
+ || node.localName === "td"
+ || node.localName === "th";
+ }
+ if (node.namespaceURI === "http://www.w3.org/1998/Math/MathML") {
+ return node.localName === "mi"
+ || node.localName === "mo"
+ || node.localName === "mn"
+ || node.localName === "ms"
+ || node.localName === "mtext"
+ || node.localName === "annotation-xml";
+ }
+ if (node.namespaceURI === "http://www.w3.org/2000/svg") {
+ return node.localName === "foreignObject"
+ || node.localName === "desc"
+ || node.localName === "title";
+ }
+}
+
+function isListItemScopeMarker(node) {
+ return isScopeMarker(node)
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'ol')
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'ul');
+}
+
+function isTableScopeMarker(node) {
+ return (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'table')
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'html');
+}
+
+function isTableBodyScopeMarker(node) {
+ return (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'tbody')
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'tfoot')
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'thead')
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'html');
+}
+
+function isTableRowScopeMarker(node) {
+ return (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'tr')
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'html');
+}
+
+function isButtonScopeMarker(node) {
+ return isScopeMarker(node)
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'button');
+}
+
+function isSelectScopeMarker(node) {
+ return !(node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'optgroup')
+ && !(node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'option');
+}
+function ElementStack() {
+ this.elements = [];
+ this.rootNode = null;
+ this.headElement = null;
+ this.bodyElement = null;
+}
+ElementStack.prototype._inScope = function(localName, isMarker) {
+ for (var i = this.elements.length - 1; i >= 0; i--) {
+ var node = this.elements[i];
+ if (node.localName === localName)
+ return true;
+ if (isMarker(node))
+ return false;
+ }
+};
+ElementStack.prototype.push = function(item) {
+ this.elements.push(item);
+};
+ElementStack.prototype.pushHtmlElement = function(item) {
+ this.rootNode = item.node;
+ this.push(item);
+};
+ElementStack.prototype.pushHeadElement = function(item) {
+ this.headElement = item.node;
+ this.push(item);
+};
+ElementStack.prototype.pushBodyElement = function(item) {
+ this.bodyElement = item.node;
+ this.push(item);
+};
+ElementStack.prototype.pop = function() {
+ return this.elements.pop();
+};
+ElementStack.prototype.remove = function(item) {
+ this.elements.splice(this.elements.indexOf(item), 1);
+};
+ElementStack.prototype.popUntilPopped = function(localName) {
+ var element;
+ do {
+ element = this.pop();
+ } while (element.localName != localName);
+};
+
+ElementStack.prototype.popUntilTableScopeMarker = function() {
+ while (!isTableScopeMarker(this.top))
+ this.pop();
+};
+
+ElementStack.prototype.popUntilTableBodyScopeMarker = function() {
+ while (!isTableBodyScopeMarker(this.top))
+ this.pop();
+};
+
+ElementStack.prototype.popUntilTableRowScopeMarker = function() {
+ while (!isTableRowScopeMarker(this.top))
+ this.pop();
+};
+ElementStack.prototype.item = function(index) {
+ return this.elements[index];
+};
+ElementStack.prototype.contains = function(element) {
+ return this.elements.indexOf(element) !== -1;
+};
+ElementStack.prototype.inScope = function(localName) {
+ return this._inScope(localName, isScopeMarker);
+};
+ElementStack.prototype.inListItemScope = function(localName) {
+ return this._inScope(localName, isListItemScopeMarker);
+};
+ElementStack.prototype.inTableScope = function(localName) {
+ return this._inScope(localName, isTableScopeMarker);
+};
+ElementStack.prototype.inButtonScope = function(localName) {
+ return this._inScope(localName, isButtonScopeMarker);
+};
+ElementStack.prototype.inSelectScope = function(localName) {
+ return this._inScope(localName, isSelectScopeMarker);
+};
+ElementStack.prototype.hasNumberedHeaderElementInScope = function() {
+ for (var i = this.elements.length - 1; i >= 0; i--) {
+ var node = this.elements[i];
+ if (node.isNumberedHeader())
+ return true;
+ if (isScopeMarker(node))
+ return false;
+ }
+};
+ElementStack.prototype.furthestBlockForFormattingElement = function(element) {
+ var furthestBlock = null;
+ for (var i = this.elements.length - 1; i >= 0; i--) {
+ var node = this.elements[i];
+ if (node.node === element)
+ break;
+ if (node.isSpecial())
+ furthestBlock = node;
+ }
+ return furthestBlock;
+};
+ElementStack.prototype.findIndex = function(localName) {
+ for (var i = this.elements.length - 1; i >= 0; i--) {
+ if (this.elements[i].localName == localName)
+ return i;
+ }
+ return -1;
+};
+
+ElementStack.prototype.remove_openElements_until = function(callback) {
+ var finished = false;
+ var element;
+ while (!finished) {
+ element = this.elements.pop();
+ finished = callback(element);
+ }
+ return element;
+};
+
+Object.defineProperty(ElementStack.prototype, 'top', {
+ get: function() {
+ return this.elements[this.elements.length - 1];
+ }
+});
+
+Object.defineProperty(ElementStack.prototype, 'length', {
+ get: function() {
+ return this.elements.length;
+ }
+});
+
+exports.ElementStack = ElementStack;
+
+},
+{}],
+2:[function(_dereq_,module,exports){
+var entities = _dereq_('html5-entities');
+var InputStream = _dereq_('./InputStream').InputStream;
+
+var namedEntityPrefixes = {};
+Object.keys(entities).forEach(function (entityKey) {
+ for (var i = 0; i < entityKey.length; i++) {
+ namedEntityPrefixes[entityKey.substring(0, i + 1)] = true;
+ }
+});
+
+function isAlphaNumeric(c) {
+ return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
+}
+
+function isHexDigit(c) {
+ return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
+}
+
+function isDecimalDigit(c) {
+ return (c >= '0' && c <= '9');
+}
+
+var EntityParser = {};
+
+EntityParser.consumeEntity = function(buffer, tokenizer, additionalAllowedCharacter) {
+ var decodedCharacter = '';
+ var consumedCharacters = '';
+ var ch = buffer.char();
+ if (ch === InputStream.EOF)
+ return false;
+ consumedCharacters += ch;
+ if (ch == '\t' || ch == '\n' || ch == '\v' || ch == ' ' || ch == '<' || ch == '&') {
+ buffer.unget(consumedCharacters);
+ return false;
+ }
+ if (additionalAllowedCharacter === ch) {
+ buffer.unget(consumedCharacters);
+ return false;
+ }
+ if (ch == '#') {
+ ch = buffer.shift(1);
+ if (ch === InputStream.EOF) {
+ tokenizer._parseError("expected-numeric-entity-but-got-eof");
+ buffer.unget(consumedCharacters);
+ return false;
+ }
+ consumedCharacters += ch;
+ var radix = 10;
+ var isDigit = isDecimalDigit;
+ if (ch == 'x' || ch == 'X') {
+ radix = 16;
+ isDigit = isHexDigit;
+ ch = buffer.shift(1);
+ if (ch === InputStream.EOF) {
+ tokenizer._parseError("expected-numeric-entity-but-got-eof");
+ buffer.unget(consumedCharacters);
+ return false;
+ }
+ consumedCharacters += ch;
+ }
+ if (isDigit(ch)) {
+ var code = '';
+ while (ch !== InputStream.EOF && isDigit(ch)) {
+ code += ch;
+ ch = buffer.char();
+ }
+ code = parseInt(code, radix);
+ var replacement = this.replaceEntityNumbers(code);
+ if (replacement) {
+ tokenizer._parseError("invalid-numeric-entity-replaced");
+ code = replacement;
+ }
+ if (code > 0xFFFF && code <= 0x10FFFF) {
+ code -= 0x10000;
+ var first = ((0xffc00 & code) >> 10) + 0xD800;
+ var second = (0x3ff & code) + 0xDC00;
+ decodedCharacter = String.fromCharCode(first, second);
+ } else
+ decodedCharacter = String.fromCharCode(code);
+ if (ch !== ';') {
+ tokenizer._parseError("numeric-entity-without-semicolon");
+ buffer.unget(ch);
+ }
+ return decodedCharacter;
+ }
+ buffer.unget(consumedCharacters);
+ tokenizer._parseError("expected-numeric-entity");
+ return false;
+ }
+ if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) {
+ var mostRecentMatch = '';
+ while (namedEntityPrefixes[consumedCharacters]) {
+ if (entities[consumedCharacters]) {
+ mostRecentMatch = consumedCharacters;
+ }
+ if (ch == ';')
+ break;
+ ch = buffer.char();
+ if (ch === InputStream.EOF)
+ break;
+ consumedCharacters += ch;
+ }
+ if (!mostRecentMatch) {
+ tokenizer._parseError("expected-named-entity");
+ buffer.unget(consumedCharacters);
+ return false;
+ }
+ decodedCharacter = entities[mostRecentMatch];
+ if (ch === ';' || !additionalAllowedCharacter || !(isAlphaNumeric(ch) || ch === '=')) {
+ if (consumedCharacters.length > mostRecentMatch.length) {
+ buffer.unget(consumedCharacters.substring(mostRecentMatch.length));
+ }
+ if (ch !== ';') {
+ tokenizer._parseError("named-entity-without-semicolon");
+ }
+ return decodedCharacter;
+ }
+ buffer.unget(consumedCharacters);
+ return false;
+ }
+};
+
+EntityParser.replaceEntityNumbers = function(c) {
+ switch(c) {
+ case 0x00: return 0xFFFD; // REPLACEMENT CHARACTER
+ case 0x13: return 0x0010; // Carriage return
+ case 0x80: return 0x20AC; // EURO SIGN
+ case 0x81: return 0x0081; // <control>
+ case 0x82: return 0x201A; // SINGLE LOW-9 QUOTATION MARK
+ case 0x83: return 0x0192; // LATIN SMALL LETTER F WITH HOOK
+ case 0x84: return 0x201E; // DOUBLE LOW-9 QUOTATION MARK
+ case 0x85: return 0x2026; // HORIZONTAL ELLIPSIS
+ case 0x86: return 0x2020; // DAGGER
+ case 0x87: return 0x2021; // DOUBLE DAGGER
+ case 0x88: return 0x02C6; // MODIFIER LETTER CIRCUMFLEX ACCENT
+ case 0x89: return 0x2030; // PER MILLE SIGN
+ case 0x8A: return 0x0160; // LATIN CAPITAL LETTER S WITH CARON
+ case 0x8B: return 0x2039; // SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+ case 0x8C: return 0x0152; // LATIN CAPITAL LIGATURE OE
+ case 0x8D: return 0x008D; // <control>
+ case 0x8E: return 0x017D; // LATIN CAPITAL LETTER Z WITH CARON
+ case 0x8F: return 0x008F; // <control>
+ case 0x90: return 0x0090; // <control>
+ case 0x91: return 0x2018; // LEFT SINGLE QUOTATION MARK
+ case 0x92: return 0x2019; // RIGHT SINGLE QUOTATION MARK
+ case 0x93: return 0x201C; // LEFT DOUBLE QUOTATION MARK
+ case 0x94: return 0x201D; // RIGHT DOUBLE QUOTATION MARK
+ case 0x95: return 0x2022; // BULLET
+ case 0x96: return 0x2013; // EN DASH
+ case 0x97: return 0x2014; // EM DASH
+ case 0x98: return 0x02DC; // SMALL TILDE
+ case 0x99: return 0x2122; // TRADE MARK SIGN
+ case 0x9A: return 0x0161; // LATIN SMALL LETTER S WITH CARON
+ case 0x9B: return 0x203A; // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+ case 0x9C: return 0x0153; // LATIN SMALL LIGATURE OE
+ case 0x9D: return 0x009D; // <control>
+ case 0x9E: return 0x017E; // LATIN SMALL LETTER Z WITH CARON
+ case 0x9F: return 0x0178; // LATIN CAPITAL LETTER Y WITH DIAERESIS
+ default:
+ if ((c >= 0xD800 && c <= 0xDFFF) || c > 0x10FFFF) {
+ return 0xFFFD;
+ } else if ((c >= 0x0001 && c <= 0x0008) || (c >= 0x000E && c <= 0x001F) ||
+ (c >= 0x007F && c <= 0x009F) || (c >= 0xFDD0 && c <= 0xFDEF) ||
+ c == 0x000B || c == 0xFFFE || c == 0x1FFFE || c == 0x2FFFFE ||
+ c == 0x2FFFF || c == 0x3FFFE || c == 0x3FFFF || c == 0x4FFFE ||
+ c == 0x4FFFF || c == 0x5FFFE || c == 0x5FFFF || c == 0x6FFFE ||
+ c == 0x6FFFF || c == 0x7FFFE || c == 0x7FFFF || c == 0x8FFFE ||
+ c == 0x8FFFF || c == 0x9FFFE || c == 0x9FFFF || c == 0xAFFFE ||
+ c == 0xAFFFF || c == 0xBFFFE || c == 0xBFFFF || c == 0xCFFFE ||
+ c == 0xCFFFF || c == 0xDFFFE || c == 0xDFFFF || c == 0xEFFFE ||
+ c == 0xEFFFF || c == 0xFFFFE || c == 0xFFFFF || c == 0x10FFFE ||
+ c == 0x10FFFF) {
+ return c;
+ }
+ }
+};
+
+exports.EntityParser = EntityParser;
+
+},
+{"./InputStream":3,"html5-entities":12}],
+3:[function(_dereq_,module,exports){
+function InputStream() {
+ this.data = '';
+ this.start = 0;
+ this.committed = 0;
+ this.eof = false;
+ this.lastLocation = {line: 0, column: 0};
+}
+
+InputStream.EOF = -1;
+
+InputStream.DRAIN = -2;
+
+InputStream.prototype = {
+ slice: function() {
+ if(this.start >= this.data.length) {
+ if(!this.eof) throw InputStream.DRAIN;
+ return InputStream.EOF;
+ }
+ return this.data.slice(this.start, this.data.length);
+ },
+ char: function() {
+ if(!this.eof && this.start >= this.data.length - 1) throw InputStream.DRAIN;
+ if(this.start >= this.data.length) {
+ return InputStream.EOF;
+ }
+ var ch = this.data[this.start++];
+ if (ch === '\r')
+ ch = '\n';
+ return ch;
+ },
+ advance: function(amount) {
+ this.start += amount;
+ if(this.start >= this.data.length) {
+ if(!this.eof) throw InputStream.DRAIN;
+ return InputStream.EOF;
+ } else {
+ if(this.committed > this.data.length / 2) {
+ this.lastLocation = this.location();
+ this.data = this.data.slice(this.committed);
+ this.start = this.start - this.committed;
+ this.committed = 0;
+ }
+ }
+ },
+ matchWhile: function(re) {
+ if(this.eof && this.start >= this.data.length ) return '';
+ var r = new RegExp("^"+re+"+");
+ var m = r.exec(this.slice());
+ if(m) {
+ if(!this.eof && m[0].length == this.data.length - this.start) throw InputStream.DRAIN;
+ this.advance(m[0].length);
+ return m[0];
+ } else {
+ return '';
+ }
+ },
+ matchUntil: function(re) {
+ var m, s;
+ s = this.slice();
+ if(s === InputStream.EOF) {
+ return '';
+ } else if(m = new RegExp(re + (this.eof ? "|$" : "")).exec(s)) {
+ var t = this.data.slice(this.start, this.start + m.index);
+ this.advance(m.index);
+ return t.replace(/\r/g, '\n').replace(/\n{2,}/g, '\n');
+ } else {
+ throw InputStream.DRAIN;
+ }
+ },
+ append: function(data) {
+ this.data += data;
+ },
+ shift: function(n) {
+ if(!this.eof && this.start + n >= this.data.length) throw InputStream.DRAIN;
+ if(this.eof && this.start >= this.data.length) return InputStream.EOF;
+ var d = this.data.slice(this.start, this.start + n).toString();
+ this.advance(Math.min(n, this.data.length - this.start));
+ return d;
+ },
+ peek: function(n) {
+ if(!this.eof && this.start + n >= this.data.length) throw InputStream.DRAIN;
+ if(this.eof && this.start >= this.data.length) return InputStream.EOF;
+ return this.data.slice(this.start, Math.min(this.start + n, this.data.length)).toString();
+ },
+ length: function() {
+ return this.data.length - this.start - 1;
+ },
+ unget: function(d) {
+ if(d === InputStream.EOF) return;
+ this.start -= (d.length);
+ },
+ undo: function() {
+ this.start = this.committed;
+ },
+ commit: function() {
+ this.committed = this.start;
+ },
+ location: function() {
+ var lastLine = this.lastLocation.line;
+ var lastColumn = this.lastLocation.column;
+ var read = this.data.slice(0, this.committed);
+ var newlines = read.match(/\n/g);
+ var line = newlines ? lastLine + newlines.length : lastLine;
+ var column = newlines ? read.length - read.lastIndexOf('\n') - 1 : lastColumn + read.length;
+ return {line: line, column: column};
+ }
+};
+
+exports.InputStream = InputStream;
+
+},
+{}],
+4:[function(_dereq_,module,exports){
+var SpecialElements = {
+ "http://www.w3.org/1999/xhtml": [
+ 'address',
+ 'applet',
+ 'area',
+ 'article',
+ 'aside',
+ 'base',
+ 'basefont',
+ 'bgsound',
+ 'blockquote',
+ 'body',
+ 'br',
+ 'button',
+ 'caption',
+ 'center',
+ 'col',
+ 'colgroup',
+ 'dd',
+ 'details',
+ 'dir',
+ 'div',
+ 'dl',
+ 'dt',
+ 'embed',
+ 'fieldset',
+ 'figcaption',
+ 'figure',
+ 'footer',
+ 'form',
+ 'frame',
+ 'frameset',
+ 'h1',
+ 'h2',
+ 'h3',
+ 'h4',
+ 'h5',
+ 'h6',
+ 'head',
+ 'header',
+ 'hgroup',
+ 'hr',
+ 'html',
+ 'iframe',
+ 'img',
+ 'input',
+ 'isindex',
+ 'li',
+ 'link',
+ 'listing',
+ 'main',
+ 'marquee',
+ 'menu',
+ 'menuitem',
+ 'meta',
+ 'nav',
+ 'noembed',
+ 'noframes',
+ 'noscript',
+ 'object',
+ 'ol',
+ 'p',
+ 'param',
+ 'plaintext',
+ 'pre',
+ 'script',
+ 'section',
+ 'select',
+ 'source',
+ 'style',
+ 'summary',
+ 'table',
+ 'tbody',
+ 'td',
+ 'textarea',
+ 'tfoot',
+ 'th',
+ 'thead',
+ 'title',
+ 'tr',
+ 'track',
+ 'ul',
+ 'wbr',
+ 'xmp'
+ ],
+ "http://www.w3.org/1998/Math/MathML": [
+ 'mi',
+ 'mo',
+ 'mn',
+ 'ms',
+ 'mtext',
+ 'annotation-xml'
+ ],
+ "http://www.w3.org/2000/svg": [
+ 'foreignObject',
+ 'desc',
+ 'title'
+ ]
+};
+
+
+function StackItem(namespaceURI, localName, attributes, node) {
+ this.localName = localName;
+ this.namespaceURI = namespaceURI;
+ this.attributes = attributes;
+ this.node = node;
+}
+StackItem.prototype.isSpecial = function() {
+ return this.namespaceURI in SpecialElements &&
+ SpecialElements[this.namespaceURI].indexOf(this.localName) > -1;
+};
+
+StackItem.prototype.isFosterParenting = function() {
+ if (this.namespaceURI === "http://www.w3.org/1999/xhtml") {
+ return this.localName === 'table' ||
+ this.localName === 'tbody' ||
+ this.localName === 'tfoot' ||
+ this.localName === 'thead' ||
+ this.localName === 'tr';
+ }
+ return false;
+};
+
+StackItem.prototype.isNumberedHeader = function() {
+ if (this.namespaceURI === "http://www.w3.org/1999/xhtml") {
+ return this.localName === 'h1' ||
+ this.localName === 'h2' ||
+ this.localName === 'h3' ||
+ this.localName === 'h4' ||
+ this.localName === 'h5' ||
+ this.localName === 'h6';
+ }
+ return false;
+};
+
+StackItem.prototype.isForeign = function() {
+ return this.namespaceURI != "http://www.w3.org/1999/xhtml";
+};
+
+function getAttribute(item, name) {
+ for (var i = 0; i < item.attributes.length; i++) {
+ if (item.attributes[i].nodeName == name)
+ return item.attributes[i].nodeValue;
+ }
+ return null;
+}
+
+StackItem.prototype.isHtmlIntegrationPoint = function() {
+ if (this.namespaceURI === "http://www.w3.org/1998/Math/MathML") {
+ if (this.localName !== "annotation-xml")
+ return false;
+ var encoding = getAttribute(this, 'encoding');
+ if (!encoding)
+ return false;
+ encoding = encoding.toLowerCase();
+ return encoding === "text/html" || encoding === "application/xhtml+xml";
+ }
+ if (this.namespaceURI === "http://www.w3.org/2000/svg") {
+ return this.localName === "foreignObject"
+ || this.localName === "desc"
+ || this.localName === "title";
+ }
+ return false;
+};
+
+StackItem.prototype.isMathMLTextIntegrationPoint = function() {
+ if (this.namespaceURI === "http://www.w3.org/1998/Math/MathML") {
+ return this.localName === "mi"
+ || this.localName === "mo"
+ || this.localName === "mn"
+ || this.localName === "ms"
+ || this.localName === "mtext";
+ }
+ return false;
+};
+
+exports.StackItem = StackItem;
+
+},
+{}],
+5:[function(_dereq_,module,exports){
+var InputStream = _dereq_('./InputStream').InputStream;
+var EntityParser = _dereq_('./EntityParser').EntityParser;
+
+function isWhitespace(c){
+ return c === " " || c === "\n" || c === "\t" || c === "\r" || c === "\f";
+}
+
+function isAlpha(c) {
+ return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z');
+}
+function Tokenizer(tokenHandler) {
+ this._tokenHandler = tokenHandler;
+ this._state = Tokenizer.DATA;
+ this._inputStream = new InputStream();
+ this._currentToken = null;
+ this._temporaryBuffer = '';
+ this._additionalAllowedCharacter = '';
+}
+
+Tokenizer.prototype._parseError = function(code, args) {
+ this._tokenHandler.parseError(code, args);
+};
+
+Tokenizer.prototype._emitToken = function(token) {
+ if (token.type === 'StartTag') {
+ for (var i = 1; i < token.data.length; i++) {
+ if (!token.data[i].nodeName)
+ token.data.splice(i--, 1);
+ }
+ } else if (token.type === 'EndTag') {
+ if (token.selfClosing) {
+ this._parseError('self-closing-flag-on-end-tag');
+ }
+ if (token.data.length !== 0) {
+ this._parseError('attributes-in-end-tag');
+ }
+ }
+ this._tokenHandler.processToken(token);
+ if (token.type === 'StartTag' && token.selfClosing && !this._tokenHandler.isSelfClosingFlagAcknowledged()) {
+ this._parseError('non-void-element-with-trailing-solidus', {name: token.name});
+ }
+};
+
+Tokenizer.prototype._emitCurrentToken = function() {
+ this._state = Tokenizer.DATA;
+ this._emitToken(this._currentToken);
+};
+
+Tokenizer.prototype._currentAttribute = function() {
+ return this._currentToken.data[this._currentToken.data.length - 1];
+};
+
+Tokenizer.prototype.setState = function(state) {
+ this._state = state;
+};
+
+Tokenizer.prototype.tokenize = function(source) {
+ Tokenizer.DATA = data_state;
+ Tokenizer.RCDATA = rcdata_state;
+ Tokenizer.RAWTEXT = rawtext_state;
+ Tokenizer.SCRIPT_DATA = script_data_state;
+ Tokenizer.PLAINTEXT = plaintext_state;
+
+
+ this._state = Tokenizer.DATA;
+
+ this._inputStream.append(source);
+
+ this._tokenHandler.startTokenization(this);
+
+ this._inputStream.eof = true;
+
+ var tokenizer = this;
+
+ while (this._state.call(this, this._inputStream));
+
+
+ function data_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._emitToken({type: 'EOF', data: null});
+ return false;
+ } else if (data === '&') {
+ tokenizer.setState(character_reference_in_data_state);
+ } else if (data === '<') {
+ tokenizer.setState(tag_open_state);
+ } else if (data === '\u0000') {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ buffer.commit();
+ } else {
+ var chars = buffer.matchUntil("&|<|\u0000");
+ tokenizer._emitToken({type: 'Characters', data: data + chars});
+ buffer.commit();
+ }
+ return true;
+ }
+
+ function character_reference_in_data_state(buffer) {
+ var character = EntityParser.consumeEntity(buffer, tokenizer);
+ tokenizer.setState(data_state);
+ tokenizer._emitToken({type: 'Characters', data: character || '&'});
+ return true;
+ }
+
+ function rcdata_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._emitToken({type: 'EOF', data: null});
+ return false;
+ } else if (data === '&') {
+ tokenizer.setState(character_reference_in_rcdata_state);
+ } else if (data === '<') {
+ tokenizer.setState(rcdata_less_than_sign_state);
+ } else if (data === "\u0000") {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ buffer.commit();
+ } else {
+ var chars = buffer.matchUntil("&|<|\u0000");
+ tokenizer._emitToken({type: 'Characters', data: data + chars});
+ buffer.commit();
+ }
+ return true;
+ }
+
+ function character_reference_in_rcdata_state(buffer) {
+ var character = EntityParser.consumeEntity(buffer, tokenizer);
+ tokenizer.setState(rcdata_state);
+ tokenizer._emitToken({type: 'Characters', data: character || '&'});
+ return true;
+ }
+
+ function rawtext_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._emitToken({type: 'EOF', data: null});
+ return false;
+ } else if (data === '<') {
+ tokenizer.setState(rawtext_less_than_sign_state);
+ } else if (data === "\u0000") {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ buffer.commit();
+ } else {
+ var chars = buffer.matchUntil("<|\u0000");
+ tokenizer._emitToken({type: 'Characters', data: data + chars});
+ }
+ return true;
+ }
+
+ function plaintext_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._emitToken({type: 'EOF', data: null});
+ return false;
+ } else if (data === "\u0000") {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ buffer.commit();
+ } else {
+ var chars = buffer.matchUntil("\u0000");
+ tokenizer._emitToken({type: 'Characters', data: data + chars});
+ }
+ return true;
+ }
+
+
+ function script_data_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._emitToken({type: 'EOF', data: null});
+ return false;
+ } else if (data === '<') {
+ tokenizer.setState(script_data_less_than_sign_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ buffer.commit();
+ } else {
+ var chars = buffer.matchUntil("<|\u0000");
+ tokenizer._emitToken({type: 'Characters', data: data + chars});
+ }
+ return true;
+ }
+
+ function rcdata_less_than_sign_state(buffer) {
+ var data = buffer.char();
+ if (data === "/") {
+ this._temporaryBuffer = '';
+ tokenizer.setState(rcdata_end_tag_open_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ buffer.unget(data);
+ tokenizer.setState(rcdata_state);
+ }
+ return true;
+ }
+
+ function rcdata_end_tag_open_state(buffer) {
+ var data = buffer.char();
+ if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ tokenizer.setState(rcdata_end_tag_name_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</'});
+ buffer.unget(data);
+ tokenizer.setState(rcdata_state);
+ }
+ return true;
+ }
+
+ function rcdata_end_tag_name_state(buffer) {
+ var appropriate = tokenizer._currentToken && (tokenizer._currentToken.name === this._temporaryBuffer.toLowerCase());
+ var data = buffer.char();
+ if (isWhitespace(data) && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false};
+ tokenizer.setState(before_attribute_name_state);
+ } else if (data === '/' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false};
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === '>' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false};
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ buffer.commit();
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</' + this._temporaryBuffer});
+ buffer.unget(data);
+ tokenizer.setState(rcdata_state);
+ }
+ return true;
+ }
+
+ function rawtext_less_than_sign_state(buffer) {
+ var data = buffer.char();
+ if (data === "/") {
+ this._temporaryBuffer = '';
+ tokenizer.setState(rawtext_end_tag_open_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ buffer.unget(data);
+ tokenizer.setState(rawtext_state);
+ }
+ return true;
+ }
+
+ function rawtext_end_tag_open_state(buffer) {
+ var data = buffer.char();
+ if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ tokenizer.setState(rawtext_end_tag_name_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</'});
+ buffer.unget(data);
+ tokenizer.setState(rawtext_state);
+ }
+ return true;
+ }
+
+ function rawtext_end_tag_name_state(buffer) {
+ var appropriate = tokenizer._currentToken && (tokenizer._currentToken.name === this._temporaryBuffer.toLowerCase());
+ var data = buffer.char();
+ if (isWhitespace(data) && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false};
+ tokenizer.setState(before_attribute_name_state);
+ } else if (data === '/' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false};
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === '>' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false};
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ buffer.commit();
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</' + this._temporaryBuffer});
+ buffer.unget(data);
+ tokenizer.setState(rawtext_state);
+ }
+ return true;
+ }
+
+ function script_data_less_than_sign_state(buffer) {
+ var data = buffer.char();
+ if (data === "/") {
+ this._temporaryBuffer = '';
+ tokenizer.setState(script_data_end_tag_open_state);
+ } else if (data === '!') {
+ tokenizer._emitToken({type: 'Characters', data: '<!'});
+ tokenizer.setState(script_data_escape_start_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ buffer.unget(data);
+ tokenizer.setState(script_data_state);
+ }
+ return true;
+ }
+
+ function script_data_end_tag_open_state(buffer) {
+ var data = buffer.char();
+ if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ tokenizer.setState(script_data_end_tag_name_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</'});
+ buffer.unget(data);
+ tokenizer.setState(script_data_state);
+ }
+ return true;
+ }
+
+ function script_data_end_tag_name_state(buffer) {
+ var appropriate = tokenizer._currentToken && (tokenizer._currentToken.name === this._temporaryBuffer.toLowerCase());
+ var data = buffer.char();
+ if (isWhitespace(data) && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false};
+ tokenizer.setState(before_attribute_name_state);
+ } else if (data === '/' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false};
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === '>' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false};
+ tokenizer._emitCurrentToken();
+ } else if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ buffer.commit();
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</' + this._temporaryBuffer});
+ buffer.unget(data);
+ tokenizer.setState(script_data_state);
+ }
+ return true;
+ }
+
+ function script_data_escape_start_state(buffer) {
+ var data = buffer.char();
+ if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ tokenizer.setState(script_data_escape_start_dash_state);
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(script_data_state);
+ }
+ return true;
+ }
+
+ function script_data_escape_start_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ tokenizer.setState(script_data_escaped_dash_dash_state);
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(script_data_state);
+ }
+ return true;
+ }
+
+ function script_data_escaped_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ tokenizer.setState(script_data_escaped_dash_state);
+ } else if (data === '<') {
+ tokenizer.setState(script_data_escaped_less_then_sign_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ buffer.commit();
+ } else {
+ var chars = buffer.matchUntil('<|-|\u0000');
+ tokenizer._emitToken({type: 'Characters', data: data + chars});
+ }
+ return true;
+ }
+
+ function script_data_escaped_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ tokenizer.setState(script_data_escaped_dash_dash_state);
+ } else if (data === '<') {
+ tokenizer.setState(script_data_escaped_less_then_sign_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ tokenizer.setState(script_data_escaped_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ tokenizer.setState(script_data_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_escaped_dash_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError('eof-in-script');
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '<') {
+ tokenizer.setState(script_data_escaped_less_then_sign_state);
+ } else if (data === '>') {
+ tokenizer._emitToken({type: 'Characters', data: '>'});
+ tokenizer.setState(script_data_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ tokenizer.setState(script_data_escaped_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ tokenizer.setState(script_data_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_escaped_less_then_sign_state(buffer) {
+ var data = buffer.char();
+ if (data === '/') {
+ this._temporaryBuffer = '';
+ tokenizer.setState(script_data_escaped_end_tag_open_state);
+ } else if (isAlpha(data)) {
+ tokenizer._emitToken({type: 'Characters', data: '<' + data});
+ this._temporaryBuffer = data;
+ tokenizer.setState(script_data_double_escape_start_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ buffer.unget(data);
+ tokenizer.setState(script_data_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_escaped_end_tag_open_state(buffer) {
+ var data = buffer.char();
+ if (isAlpha(data)) {
+ this._temporaryBuffer = data;
+ tokenizer.setState(script_data_escaped_end_tag_name_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</'});
+ buffer.unget(data);
+ tokenizer.setState(script_data_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_escaped_end_tag_name_state(buffer) {
+ var appropriate = tokenizer._currentToken && (tokenizer._currentToken.name === this._temporaryBuffer.toLowerCase());
+ var data = buffer.char();
+ if (isWhitespace(data) && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false};
+ tokenizer.setState(before_attribute_name_state);
+ } else if (data === '/' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false};
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === '>' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false};
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ buffer.commit();
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</' + this._temporaryBuffer});
+ buffer.unget(data);
+ tokenizer.setState(script_data_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_double_escape_start_state(buffer) {
+ var data = buffer.char();
+ if (isWhitespace(data) || data === '/' || data === '>') {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ if (this._temporaryBuffer.toLowerCase() === 'script')
+ tokenizer.setState(script_data_double_escaped_state);
+ else
+ tokenizer.setState(script_data_escaped_state);
+ } else if (isAlpha(data)) {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ this._temporaryBuffer += data;
+ buffer.commit();
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(script_data_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_double_escaped_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError('eof-in-script');
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ tokenizer.setState(script_data_double_escaped_dash_state);
+ } else if (data === '<') {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ tokenizer.setState(script_data_double_escaped_less_than_sign_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError('invalid-codepoint');
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ buffer.commit();
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ buffer.commit();
+ }
+ return true;
+ }
+
+ function script_data_double_escaped_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError('eof-in-script');
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ tokenizer.setState(script_data_double_escaped_dash_dash_state);
+ } else if (data === '<') {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ tokenizer.setState(script_data_double_escaped_less_than_sign_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError('invalid-codepoint');
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ tokenizer.setState(script_data_double_escaped_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ tokenizer.setState(script_data_double_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_double_escaped_dash_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError('eof-in-script');
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ buffer.commit();
+ } else if (data === '<') {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ tokenizer.setState(script_data_double_escaped_less_than_sign_state);
+ } else if (data === '>') {
+ tokenizer._emitToken({type: 'Characters', data: '>'});
+ tokenizer.setState(script_data_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError('invalid-codepoint');
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ tokenizer.setState(script_data_double_escaped_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ tokenizer.setState(script_data_double_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_double_escaped_less_than_sign_state(buffer) {
+ var data = buffer.char();
+ if (data === '/') {
+ tokenizer._emitToken({type: 'Characters', data: '/'});
+ this._temporaryBuffer = '';
+ tokenizer.setState(script_data_double_escape_end_state);
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(script_data_double_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_double_escape_end_state(buffer) {
+ var data = buffer.char();
+ if (isWhitespace(data) || data === '/' || data === '>') {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ if (this._temporaryBuffer.toLowerCase() === 'script')
+ tokenizer.setState(script_data_escaped_state);
+ else
+ tokenizer.setState(script_data_double_escaped_state);
+ } else if (isAlpha(data)) {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ this._temporaryBuffer += data;
+ buffer.commit();
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(script_data_double_escaped_state);
+ }
+ return true;
+ }
+
+ function tag_open_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("bare-less-than-sign-at-eof");
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isAlpha(data)) {
+ tokenizer._currentToken = {type: 'StartTag', name: data.toLowerCase(), data: []};
+ tokenizer.setState(tag_name_state);
+ } else if (data === '!') {
+ tokenizer.setState(markup_declaration_open_state);
+ } else if (data === '/') {
+ tokenizer.setState(close_tag_open_state);
+ } else if (data === '>') {
+ tokenizer._parseError("expected-tag-name-but-got-right-bracket");
+ tokenizer._emitToken({type: 'Characters', data: "<>"});
+ tokenizer.setState(data_state);
+ } else if (data === '?') {
+ tokenizer._parseError("expected-tag-name-but-got-question-mark");
+ buffer.unget(data);
+ tokenizer.setState(bogus_comment_state);
+ } else {
+ tokenizer._parseError("expected-tag-name");
+ tokenizer._emitToken({type: 'Characters', data: "<"});
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ }
+ return true;
+ }
+
+ function close_tag_open_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("expected-closing-tag-but-got-eof");
+ tokenizer._emitToken({type: 'Characters', data: '</'});
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isAlpha(data)) {
+ tokenizer._currentToken = {type: 'EndTag', name: data.toLowerCase(), data: []};
+ tokenizer.setState(tag_name_state);
+ } else if (data === '>') {
+ tokenizer._parseError("expected-closing-tag-but-got-right-bracket");
+ tokenizer.setState(data_state);
+ } else {
+ tokenizer._parseError("expected-closing-tag-but-got-char", {data: data}); // param 1 is datavars:
+ buffer.unget(data);
+ tokenizer.setState(bogus_comment_state);
+ }
+ return true;
+ }
+
+ function tag_name_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError('eof-in-tag-name');
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(before_attribute_name_state);
+ } else if (isAlpha(data)) {
+ tokenizer._currentToken.name += data.toLowerCase();
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ } else if (data === '/') {
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.name += "\uFFFD";
+ } else {
+ tokenizer._currentToken.name += data;
+ }
+ buffer.commit();
+
+ return true;
+ }
+
+ function before_attribute_name_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("expected-attribute-name-but-got-eof");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ return true;
+ } else if (isAlpha(data)) {
+ tokenizer._currentToken.data.push({nodeName: data.toLowerCase(), nodeValue: ""});
+ tokenizer.setState(attribute_name_state);
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ } else if (data === '/') {
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === "'" || data === '"' || data === '=' || data === '<') {
+ tokenizer._parseError("invalid-character-in-attribute-name");
+ tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""});
+ tokenizer.setState(attribute_name_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data.push({nodeName: "\uFFFD", nodeValue: ""});
+ } else {
+ tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""});
+ tokenizer.setState(attribute_name_state);
+ }
+ return true;
+ }
+
+ function attribute_name_state(buffer) {
+ var data = buffer.char();
+ var leavingThisState = true;
+ var shouldEmit = false;
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-attribute-name");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ shouldEmit = true;
+ } else if (data === '=') {
+ tokenizer.setState(before_attribute_value_state);
+ } else if (isAlpha(data)) {
+ tokenizer._currentAttribute().nodeName += data.toLowerCase();
+ leavingThisState = false;
+ } else if (data === '>') {
+ shouldEmit = true;
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(after_attribute_name_state);
+ } else if (data === '/') {
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === "'" || data === '"') {
+ tokenizer._parseError("invalid-character-in-attribute-name");
+ tokenizer._currentAttribute().nodeName += data;
+ leavingThisState = false;
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentAttribute().nodeName += "\uFFFD";
+ } else {
+ tokenizer._currentAttribute().nodeName += data;
+ leavingThisState = false;
+ }
+
+ if (leavingThisState) {
+ var attributes = tokenizer._currentToken.data;
+ var currentAttribute = attributes[attributes.length - 1];
+ for (var i = attributes.length - 2; i >= 0; i--) {
+ if (currentAttribute.nodeName === attributes[i].nodeName) {
+ tokenizer._parseError("duplicate-attribute", {name: currentAttribute.nodeName});
+ currentAttribute.nodeName = null;
+ break;
+ }
+ }
+ if (shouldEmit)
+ tokenizer._emitCurrentToken();
+ } else {
+ buffer.commit();
+ }
+ return true;
+ }
+
+ function after_attribute_name_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("expected-end-of-tag-but-got-eof");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ return true;
+ } else if (data === '=') {
+ tokenizer.setState(before_attribute_value_state);
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ } else if (isAlpha(data)) {
+ tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""});
+ tokenizer.setState(attribute_name_state);
+ } else if (data === '/') {
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === "'" || data === '"' || data === '<') {
+ tokenizer._parseError("invalid-character-after-attribute-name");
+ tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""});
+ tokenizer.setState(attribute_name_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data.push({nodeName: "\uFFFD", nodeValue: ""});
+ } else {
+ tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""});
+ tokenizer.setState(attribute_name_state);
+ }
+ return true;
+ }
+
+ function before_attribute_value_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("expected-attribute-value-but-got-eof");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ return true;
+ } else if (data === '"') {
+ tokenizer.setState(attribute_value_double_quoted_state);
+ } else if (data === '&') {
+ tokenizer.setState(attribute_value_unquoted_state);
+ buffer.unget(data);
+ } else if (data === "'") {
+ tokenizer.setState(attribute_value_single_quoted_state);
+ } else if (data === '>') {
+ tokenizer._parseError("expected-attribute-value-but-got-right-bracket");
+ tokenizer._emitCurrentToken();
+ } else if (data === '=' || data === '<' || data === '`') {
+ tokenizer._parseError("unexpected-character-in-unquoted-attribute-value");
+ tokenizer._currentAttribute().nodeValue += data;
+ tokenizer.setState(attribute_value_unquoted_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentAttribute().nodeValue += "\uFFFD";
+ } else {
+ tokenizer._currentAttribute().nodeValue += data;
+ tokenizer.setState(attribute_value_unquoted_state);
+ }
+
+ return true;
+ }
+
+ function attribute_value_double_quoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-attribute-value-double-quote");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '"') {
+ tokenizer.setState(after_attribute_value_state);
+ } else if (data === '&') {
+ this._additionalAllowedCharacter = '"';
+ tokenizer.setState(character_reference_in_attribute_value_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentAttribute().nodeValue += "\uFFFD";
+ } else {
+ var s = buffer.matchUntil('[\0"&]');
+ data = data + s;
+ tokenizer._currentAttribute().nodeValue += data;
+ }
+ return true;
+ }
+
+ function attribute_value_single_quoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-attribute-value-single-quote");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === "'") {
+ tokenizer.setState(after_attribute_value_state);
+ } else if (data === '&') {
+ this._additionalAllowedCharacter = "'";
+ tokenizer.setState(character_reference_in_attribute_value_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentAttribute().nodeValue += "\uFFFD";
+ } else {
+ tokenizer._currentAttribute().nodeValue += data + buffer.matchUntil("\u0000|['&]");
+ }
+ return true;
+ }
+
+ function attribute_value_unquoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-after-attribute-value");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(before_attribute_name_state);
+ } else if (data === '&') {
+ this._additionalAllowedCharacter = ">";
+ tokenizer.setState(character_reference_in_attribute_value_state);
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ } else if (data === '"' || data === "'" || data === '=' || data === '`' || data === '<') {
+ tokenizer._parseError("unexpected-character-in-unquoted-attribute-value");
+ tokenizer._currentAttribute().nodeValue += data;
+ buffer.commit();
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentAttribute().nodeValue += "\uFFFD";
+ } else {
+ var o = buffer.matchUntil("\u0000|["+ "\t\n\v\f\x20\r" + "&<>\"'=`" +"]");
+ if (o === InputStream.EOF) {
+ tokenizer._parseError("eof-in-attribute-value-no-quotes");
+ tokenizer._emitCurrentToken();
+ }
+ buffer.commit();
+ tokenizer._currentAttribute().nodeValue += data + o;
+ }
+ return true;
+ }
+
+ function character_reference_in_attribute_value_state(buffer) {
+ var character = EntityParser.consumeEntity(buffer, tokenizer, this._additionalAllowedCharacter);
+ this._currentAttribute().nodeValue += character || '&';
+ if (this._additionalAllowedCharacter === '"')
+ tokenizer.setState(attribute_value_double_quoted_state);
+ else if (this._additionalAllowedCharacter === '\'')
+ tokenizer.setState(attribute_value_single_quoted_state);
+ else if (this._additionalAllowedCharacter === '>')
+ tokenizer.setState(attribute_value_unquoted_state);
+ return true;
+ }
+
+ function after_attribute_value_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-after-attribute-value");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(before_attribute_name_state);
+ } else if (data === '>') {
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (data === '/') {
+ tokenizer.setState(self_closing_tag_state);
+ } else {
+ tokenizer._parseError("unexpected-character-after-attribute-value");
+ buffer.unget(data);
+ tokenizer.setState(before_attribute_name_state);
+ }
+ return true;
+ }
+
+ function self_closing_tag_state(buffer) {
+ var c = buffer.char();
+ if (c === InputStream.EOF) {
+ tokenizer._parseError("unexpected-eof-after-solidus-in-tag");
+ buffer.unget(c);
+ tokenizer.setState(data_state);
+ } else if (c === '>') {
+ tokenizer._currentToken.selfClosing = true;
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ tokenizer._parseError("unexpected-character-after-solidus-in-tag");
+ buffer.unget(c);
+ tokenizer.setState(before_attribute_name_state);
+ }
+ return true;
+ }
+
+ function bogus_comment_state(buffer) {
+ var data = buffer.matchUntil('>');
+ data = data.replace(/\u0000/g, "\uFFFD");
+ buffer.char();
+ tokenizer._emitToken({type: 'Comment', data: data});
+ tokenizer.setState(data_state);
+ return true;
+ }
+
+ function markup_declaration_open_state(buffer) {
+ var chars = buffer.shift(2);
+ if (chars === '--') {
+ tokenizer._currentToken = {type: 'Comment', data: ''};
+ tokenizer.setState(comment_start_state);
+ } else {
+ var newchars = buffer.shift(5);
+ if (newchars === InputStream.EOF || chars === InputStream.EOF) {
+ tokenizer._parseError("expected-dashes-or-doctype");
+ tokenizer.setState(bogus_comment_state);
+ buffer.unget(chars);
+ return true;
+ }
+
+ chars += newchars;
+ if (chars.toUpperCase() === 'DOCTYPE') {
+ tokenizer._currentToken = {type: 'Doctype', name: '', publicId: null, systemId: null, forceQuirks: false};
+ tokenizer.setState(doctype_state);
+ } else if (tokenizer._tokenHandler.isCdataSectionAllowed() && chars === '[CDATA[') {
+ tokenizer.setState(cdata_section_state);
+ } else {
+ tokenizer._parseError("expected-dashes-or-doctype");
+ buffer.unget(chars);
+ tokenizer.setState(bogus_comment_state);
+ }
+ }
+ return true;
+ }
+
+ function cdata_section_state(buffer) {
+ var data = buffer.matchUntil(']]>');
+ buffer.shift(3);
+ if (data) {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ }
+ tokenizer.setState(data_state);
+ return true;
+ }
+
+ function comment_start_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-comment");
+ tokenizer._emitToken(tokenizer._currentToken);
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer.setState(comment_start_dash_state);
+ } else if (data === '>') {
+ tokenizer._parseError("incorrect-comment");
+ tokenizer._emitToken(tokenizer._currentToken);
+ tokenizer.setState(data_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data += "\uFFFD";
+ } else {
+ tokenizer._currentToken.data += data;
+ tokenizer.setState(comment_state);
+ }
+ return true;
+ }
+
+ function comment_start_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-comment");
+ tokenizer._emitToken(tokenizer._currentToken);
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer.setState(comment_end_state);
+ } else if (data === '>') {
+ tokenizer._parseError("incorrect-comment");
+ tokenizer._emitToken(tokenizer._currentToken);
+ tokenizer.setState(data_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data += "\uFFFD";
+ } else {
+ tokenizer._currentToken.data += '-' + data;
+ tokenizer.setState(comment_state);
+ }
+ return true;
+ }
+
+ function comment_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-comment");
+ tokenizer._emitToken(tokenizer._currentToken);
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer.setState(comment_end_dash_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data += "\uFFFD";
+ } else {
+ tokenizer._currentToken.data += data;
+ buffer.commit();
+ }
+ return true;
+ }
+
+ function comment_end_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-comment-end-dash");
+ tokenizer._emitToken(tokenizer._currentToken);
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer.setState(comment_end_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data += "-\uFFFD";
+ tokenizer.setState(comment_state);
+ } else {
+ tokenizer._currentToken.data += '-' + data + buffer.matchUntil('\u0000|-');
+ buffer.char();
+ }
+ return true;
+ }
+
+ function comment_end_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-comment-double-dash");
+ tokenizer._emitToken(tokenizer._currentToken);
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '>') {
+ tokenizer._emitToken(tokenizer._currentToken);
+ tokenizer.setState(data_state);
+ } else if (data === '!') {
+ tokenizer._parseError("unexpected-bang-after-double-dash-in-comment");
+ tokenizer.setState(comment_end_bang_state);
+ } else if (data === '-') {
+ tokenizer._parseError("unexpected-dash-after-double-dash-in-comment");
+ tokenizer._currentToken.data += data;
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data += "--\uFFFD";
+ tokenizer.setState(comment_state);
+ } else {
+ tokenizer._parseError("unexpected-char-in-comment");
+ tokenizer._currentToken.data += '--' + data;
+ tokenizer.setState(comment_state);
+ }
+ return true;
+ }
+
+ function comment_end_bang_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-comment-end-bang-state");
+ tokenizer._emitToken(tokenizer._currentToken);
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '>') {
+ tokenizer._emitToken(tokenizer._currentToken);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer._currentToken.data += '--!';
+ tokenizer.setState(comment_end_dash_state);
+ } else {
+ tokenizer._currentToken.data += '--!' + data;
+ tokenizer.setState(comment_state);
+ }
+ return true;
+ }
+
+ function doctype_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("expected-doctype-name-but-got-eof");
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(before_doctype_name_state);
+ } else {
+ tokenizer._parseError("need-space-after-doctype");
+ buffer.unget(data);
+ tokenizer.setState(before_doctype_name_state);
+ }
+ return true;
+ }
+
+ function before_doctype_name_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("expected-doctype-name-but-got-eof");
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isWhitespace(data)) {
+ } else if (data === '>') {
+ tokenizer._parseError("expected-doctype-name-but-got-right-bracket");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ if (isAlpha(data))
+ data = data.toLowerCase();
+ tokenizer._currentToken.name = data;
+ tokenizer.setState(doctype_name_state);
+ }
+ return true;
+ }
+
+ function doctype_name_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer._parseError("eof-in-doctype-name");
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(after_doctype_name_state);
+ } else if (data === '>') {
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ if (isAlpha(data))
+ data = data.toLowerCase();
+ tokenizer._currentToken.name += data;
+ buffer.commit();
+ }
+ return true;
+ }
+
+ function after_doctype_name_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isWhitespace(data)) {
+ } else if (data === '>') {
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ if (['p', 'P'].indexOf(data) > -1) {
+ var expected = [['u', 'U'], ['b', 'B'], ['l', 'L'], ['i', 'I'], ['c', 'C']];
+ var matched = expected.every(function(expected){
+ data = buffer.char();
+ return expected.indexOf(data) > -1;
+ });
+ if (matched) {
+ tokenizer.setState(after_doctype_public_keyword_state);
+ return true;
+ }
+ } else if (['s', 'S'].indexOf(data) > -1) {
+ var expected = [['y', 'Y'], ['s', 'S'], ['t', 'T'], ['e', 'E'], ['m', 'M']];
+ var matched = expected.every(function(expected){
+ data = buffer.char();
+ return expected.indexOf(data) > -1;
+ });
+ if (matched) {
+ tokenizer.setState(after_doctype_system_keyword_state);
+ return true;
+ }
+ }
+ buffer.unget(data);
+ tokenizer._currentToken.forceQuirks = true;
+
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ tokenizer._parseError("expected-space-or-right-bracket-in-doctype", {data: data});
+ tokenizer.setState(bogus_doctype_state);
+ }
+ }
+ return true;
+ }
+
+ function after_doctype_public_keyword_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(before_doctype_public_identifier_state);
+ } else if (data === "'" || data === '"') {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ buffer.unget(data);
+ tokenizer.setState(before_doctype_public_identifier_state);
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(before_doctype_public_identifier_state);
+ }
+ return true;
+ }
+
+ function before_doctype_public_identifier_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isWhitespace(data)) {
+ } else if (data === '"') {
+ tokenizer._currentToken.publicId = '';
+ tokenizer.setState(doctype_public_identifier_double_quoted_state);
+ } else if (data === "'") {
+ tokenizer._currentToken.publicId = '';
+ tokenizer.setState(doctype_public_identifier_single_quoted_state);
+ } else if (data === '>') {
+ tokenizer._parseError("unexpected-end-of-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(bogus_doctype_state);
+ }
+ return true;
+ }
+
+ function doctype_public_identifier_double_quoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (data === '"') {
+ tokenizer.setState(after_doctype_public_identifier_state);
+ } else if (data === '>') {
+ tokenizer._parseError("unexpected-end-of-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ tokenizer._currentToken.publicId += data;
+ }
+ return true;
+ }
+
+ function doctype_public_identifier_single_quoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (data === "'") {
+ tokenizer.setState(after_doctype_public_identifier_state);
+ } else if (data === '>') {
+ tokenizer._parseError("unexpected-end-of-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ tokenizer._currentToken.publicId += data;
+ }
+ return true;
+ }
+
+ function after_doctype_public_identifier_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(between_doctype_public_and_system_identifiers_state);
+ } else if (data === '>') {
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (data === '"') {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer._currentToken.systemId = '';
+ tokenizer.setState(doctype_system_identifier_double_quoted_state);
+ } else if (data === "'") {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer._currentToken.systemId = '';
+ tokenizer.setState(doctype_system_identifier_single_quoted_state);
+ } else {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(bogus_doctype_state);
+ }
+ return true;
+ }
+
+ function between_doctype_public_and_system_identifiers_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else if (data === '"') {
+ tokenizer._currentToken.systemId = '';
+ tokenizer.setState(doctype_system_identifier_double_quoted_state);
+ } else if (data === "'") {
+ tokenizer._currentToken.systemId = '';
+ tokenizer.setState(doctype_system_identifier_single_quoted_state);
+ } else {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(bogus_doctype_state);
+ }
+ return true;
+ }
+
+ function after_doctype_system_keyword_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(before_doctype_system_identifier_state);
+ } else if (data === "'" || data === '"') {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ buffer.unget(data);
+ tokenizer.setState(before_doctype_system_identifier_state);
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(before_doctype_system_identifier_state);
+ }
+ return true;
+ }
+
+ function before_doctype_system_identifier_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ } else if (data === '"') {
+ tokenizer._currentToken.systemId = '';
+ tokenizer.setState(doctype_system_identifier_double_quoted_state);
+ } else if (data === "'") {
+ tokenizer._currentToken.systemId = '';
+ tokenizer.setState(doctype_system_identifier_single_quoted_state);
+ } else if (data === '>') {
+ tokenizer._parseError("unexpected-end-of-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(bogus_doctype_state);
+ }
+ return true;
+ }
+
+ function doctype_system_identifier_double_quoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '"') {
+ tokenizer.setState(after_doctype_system_identifier_state);
+ } else if (data === '>') {
+ tokenizer._parseError("unexpected-end-of-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else {
+ tokenizer._currentToken.systemId += data;
+ }
+ return true;
+ }
+
+ function doctype_system_identifier_single_quoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === "'") {
+ tokenizer.setState(after_doctype_system_identifier_state);
+ } else if (data === '>') {
+ tokenizer._parseError("unexpected-end-of-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else {
+ tokenizer._currentToken.systemId += data;
+ }
+ return true;
+ }
+
+ function after_doctype_system_identifier_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer.setState(bogus_doctype_state);
+ }
+ return true;
+ }
+
+ function bogus_doctype_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ buffer.unget(data);
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ }
+ return true;
+ }
+};
+
+Object.defineProperty(Tokenizer.prototype, 'lineNumber', {
+ get: function() {
+ return this._inputStream.location().line;
+ }
+});
+
+Object.defineProperty(Tokenizer.prototype, 'columnNumber', {
+ get: function() {
+ return this._inputStream.location().column;
+ }
+});
+
+exports.Tokenizer = Tokenizer;
+
+},
+{"./EntityParser":2,"./InputStream":3}],
+6:[function(_dereq_,module,exports){
+var assert = _dereq_('assert');
+
+var messages = _dereq_('./messages.json');
+var constants = _dereq_('./constants');
+
+var EventEmitter = _dereq_('events').EventEmitter;
+
+var Tokenizer = _dereq_('./Tokenizer').Tokenizer;
+var ElementStack = _dereq_('./ElementStack').ElementStack;
+var StackItem = _dereq_('./StackItem').StackItem;
+
+var Marker = {};
+
+function isWhitespace(ch) {
+ return ch === " " || ch === "\n" || ch === "\t" || ch === "\r" || ch === "\f";
+}
+
+function isWhitespaceOrReplacementCharacter(ch) {
+ return isWhitespace(ch) || ch === '\uFFFD';
+}
+
+function isAllWhitespace(characters) {
+ for (var i = 0; i < characters.length; i++) {
+ var ch = characters[i];
+ if (!isWhitespace(ch))
+ return false;
+ }
+ return true;
+}
+
+function isAllWhitespaceOrReplacementCharacters(characters) {
+ for (var i = 0; i < characters.length; i++) {
+ var ch = characters[i];
+ if (!isWhitespaceOrReplacementCharacter(ch))
+ return false;
+ }
+ return true;
+}
+
+function getAttribute(node, name) {
+ for (var i = 0; i < node.attributes.length; i++) {
+ var attribute = node.attributes[i];
+ if (attribute.nodeName === name) {
+ return attribute;
+ }
+ }
+ return null;
+}
+
+function CharacterBuffer(characters) {
+ this.characters = characters;
+ this.current = 0;
+ this.end = this.characters.length;
+}
+
+CharacterBuffer.prototype.skipAtMostOneLeadingNewline = function() {
+ if (this.characters[this.current] === '\n')
+ this.current++;
+};
+
+CharacterBuffer.prototype.skipLeadingWhitespace = function() {
+ while (isWhitespace(this.characters[this.current])) {
+ if (++this.current == this.end)
+ return;
+ }
+};
+
+CharacterBuffer.prototype.skipLeadingNonWhitespace = function() {
+ while (!isWhitespace(this.characters[this.current])) {
+ if (++this.current == this.end)
+ return;
+ }
+};
+
+CharacterBuffer.prototype.takeRemaining = function() {
+ return this.characters.substring(this.current);
+};
+
+CharacterBuffer.prototype.takeLeadingWhitespace = function() {
+ var start = this.current;
+ this.skipLeadingWhitespace();
+ if (start === this.current)
+ return "";
+ return this.characters.substring(start, this.current - start);
+};
+
+Object.defineProperty(CharacterBuffer.prototype, 'length', {
+ get: function(){
+ return this.end - this.current;
+ }
+});
+function TreeBuilder() {
+ this.tokenizer = null;
+ this.errorHandler = null;
+ this.scriptingEnabled = false;
+ this.document = null;
+ this.head = null;
+ this.form = null;
+ this.openElements = new ElementStack();
+ this.activeFormattingElements = [];
+ this.insertionMode = null;
+ this.insertionModeName = "";
+ this.originalInsertionMode = "";
+ this.inQuirksMode = false; // TODO quirks mode
+ this.compatMode = "no quirks";
+ this.framesetOk = true;
+ this.redirectAttachToFosterParent = false;
+ this.selfClosingFlagAcknowledged = false;
+ this.context = "";
+ this.pendingTableCharacters = [];
+ this.shouldSkipLeadingNewline = false;
+
+ var tree = this;
+ var modes = this.insertionModes = {};
+ modes.base = {
+ end_tag_handlers: {"-default": 'endTagOther'},
+ start_tag_handlers: {"-default": 'startTagOther'},
+ processEOF: function() {
+ tree.generateImpliedEndTags();
+ if (tree.openElements.length > 2) {
+ tree.parseError('expected-closing-tag-but-got-eof');
+ } else if (tree.openElements.length == 2 &&
+ tree.openElements.item(1).localName != 'body') {
+ tree.parseError('expected-closing-tag-but-got-eof');
+ } else if (tree.context && tree.openElements.length > 1) {
+ }
+ },
+ processComment: function(data) {
+ tree.insertComment(data, tree.currentStackItem().node);
+ },
+ processDoctype: function(name, publicId, systemId, forceQuirks) {
+ tree.parseError('unexpected-doctype');
+ },
+ processStartTag: function(name, attributes, selfClosing) {
+ if (this[this.start_tag_handlers[name]]) {
+ this[this.start_tag_handlers[name]](name, attributes, selfClosing);
+ } else if (this[this.start_tag_handlers["-default"]]) {
+ this[this.start_tag_handlers["-default"]](name, attributes, selfClosing);
+ } else {
+ throw(new Error("No handler found for "+name));
+ }
+ },
+ processEndTag: function(name) {
+ if (this[this.end_tag_handlers[name]]) {
+ this[this.end_tag_handlers[name]](name);
+ } else if (this[this.end_tag_handlers["-default"]]) {
+ this[this.end_tag_handlers["-default"]](name);
+ } else {
+ throw(new Error("No handler found for "+name));
+ }
+ },
+ startTagHtml: function(name, attributes) {
+ modes.inBody.startTagHtml(name, attributes);
+ }
+ };
+
+ modes.initial = Object.create(modes.base);
+
+ modes.initial.processEOF = function() {
+ tree.parseError("expected-doctype-but-got-eof");
+ this.anythingElse();
+ tree.insertionMode.processEOF();
+ };
+
+ modes.initial.processComment = function(data) {
+ tree.insertComment(data, tree.document);
+ };
+
+ modes.initial.processDoctype = function(name, publicId, systemId, forceQuirks) {
+ tree.insertDoctype(name || '', publicId || '', systemId || '');
+
+ if (forceQuirks || name != 'html' || (publicId != null && ([
+ "+//silmaril//dtd html pro v0r11 19970101//",
+ "-//advasoft ltd//dtd html 3.0 aswedit + extensions//",
+ "-//as//dtd html 3.0 aswedit + extensions//",
+ "-//ietf//dtd html 2.0 level 1//",
+ "-//ietf//dtd html 2.0 level 2//",
+ "-//ietf//dtd html 2.0 strict level 1//",
+ "-//ietf//dtd html 2.0 strict level 2//",
+ "-//ietf//dtd html 2.0 strict//",
+ "-//ietf//dtd html 2.0//",
+ "-//ietf//dtd html 2.1e//",
+ "-//ietf//dtd html 3.0//",
+ "-//ietf//dtd html 3.0//",
+ "-//ietf//dtd html 3.2 final//",
+ "-//ietf//dtd html 3.2//",
+ "-//ietf//dtd html 3//",
+ "-//ietf//dtd html level 0//",
+ "-//ietf//dtd html level 0//",
+ "-//ietf//dtd html level 1//",
+ "-//ietf//dtd html level 1//",
+ "-//ietf//dtd html level 2//",
+ "-//ietf//dtd html level 2//",
+ "-//ietf//dtd html level 3//",
+ "-//ietf//dtd html level 3//",
+ "-//ietf//dtd html strict level 0//",
+ "-//ietf//dtd html strict level 0//",
+ "-//ietf//dtd html strict level 1//",
+ "-//ietf//dtd html strict level 1//",
+ "-//ietf//dtd html strict level 2//",
+ "-//ietf//dtd html strict level 2//",
+ "-//ietf//dtd html strict level 3//",
+ "-//ietf//dtd html strict level 3//",
+ "-//ietf//dtd html strict//",
+ "-//ietf//dtd html strict//",
+ "-//ietf//dtd html strict//",
+ "-//ietf//dtd html//",
+ "-//ietf//dtd html//",
+ "-//ietf//dtd html//",
+ "-//metrius//dtd metrius presentational//",
+ "-//microsoft//dtd internet explorer 2.0 html strict//",
+ "-//microsoft//dtd internet explorer 2.0 html//",
+ "-//microsoft//dtd internet explorer 2.0 tables//",
+ "-//microsoft//dtd internet explorer 3.0 html strict//",
+ "-//microsoft//dtd internet explorer 3.0 html//",
+ "-//microsoft//dtd internet explorer 3.0 tables//",
+ "-//netscape comm. corp.//dtd html//",
+ "-//netscape comm. corp.//dtd strict html//",
+ "-//o'reilly and associates//dtd html 2.0//",
+ "-//o'reilly and associates//dtd html extended 1.0//",
+ "-//spyglass//dtd html 2.0 extended//",
+ "-//sq//dtd html 2.0 hotmetal + extensions//",
+ "-//sun microsystems corp.//dtd hotjava html//",
+ "-//sun microsystems corp.//dtd hotjava strict html//",
+ "-//w3c//dtd html 3 1995-03-24//",
+ "-//w3c//dtd html 3.2 draft//",
+ "-//w3c//dtd html 3.2 final//",
+ "-//w3c//dtd html 3.2//",
+ "-//w3c//dtd html 3.2s draft//",
+ "-//w3c//dtd html 4.0 frameset//",
+ "-//w3c//dtd html 4.0 transitional//",
+ "-//w3c//dtd html experimental 19960712//",
+ "-//w3c//dtd html experimental 970421//",
+ "-//w3c//dtd w3 html//",
+ "-//w3o//dtd w3 html 3.0//",
+ "-//webtechs//dtd mozilla html 2.0//",
+ "-//webtechs//dtd mozilla html//",
+ "html"
+ ].some(publicIdStartsWith)
+ || [
+ "-//w3o//dtd w3 html strict 3.0//en//",
+ "-/w3c/dtd html 4.0 transitional/en",
+ "html"
+ ].indexOf(publicId.toLowerCase()) > -1
+ || (systemId == null && [
+ "-//w3c//dtd html 4.01 transitional//",
+ "-//w3c//dtd html 4.01 frameset//"
+ ].some(publicIdStartsWith)))
+ )
+ || (systemId != null && (systemId.toLowerCase() == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"))
+ ) {
+ tree.compatMode = "quirks";
+ tree.parseError("quirky-doctype");
+ } else if (publicId != null && ([
+ "-//w3c//dtd xhtml 1.0 transitional//",
+ "-//w3c//dtd xhtml 1.0 frameset//"
+ ].some(publicIdStartsWith)
+ || (systemId != null && [
+ "-//w3c//dtd html 4.01 transitional//",
+ "-//w3c//dtd html 4.01 frameset//"
+ ].indexOf(publicId.toLowerCase()) > -1))
+ ) {
+ tree.compatMode = "limited quirks";
+ tree.parseError("almost-standards-doctype");
+ } else {
+ if ((publicId == "-//W3C//DTD HTML 4.0//EN" && (systemId == null || systemId == "http://www.w3.org/TR/REC-html40/strict.dtd"))
+ || (publicId == "-//W3C//DTD HTML 4.01//EN" && (systemId == null || systemId == "http://www.w3.org/TR/html4/strict.dtd"))
+ || (publicId == "-//W3C//DTD XHTML 1.0 Strict//EN" && (systemId == "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"))
+ || (publicId == "-//W3C//DTD XHTML 1.1//EN" && (systemId == "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"))
+ ) {
+ } else if (!((systemId == null || systemId == "about:legacy-compat") && publicId == null)) {
+ tree.parseError("unknown-doctype");
+ }
+ }
+ tree.setInsertionMode('beforeHTML');
+ function publicIdStartsWith(string) {
+ return publicId.toLowerCase().indexOf(string) === 0;
+ }
+ };
+
+ modes.initial.processCharacters = function(buffer) {
+ buffer.skipLeadingWhitespace();
+ if (!buffer.length)
+ return;
+ tree.parseError('expected-doctype-but-got-chars');
+ this.anythingElse();
+ tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.initial.processStartTag = function(name, attributes, selfClosing) {
+ tree.parseError('expected-doctype-but-got-start-tag', {name: name});
+ this.anythingElse();
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.initial.processEndTag = function(name) {
+ tree.parseError('expected-doctype-but-got-end-tag', {name: name});
+ this.anythingElse();
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.initial.anythingElse = function() {
+ tree.compatMode = 'quirks';
+ tree.setInsertionMode('beforeHTML');
+ };
+
+ modes.beforeHTML = Object.create(modes.base);
+
+ modes.beforeHTML.start_tag_handlers = {
+ html: 'startTagHtml',
+ '-default': 'startTagOther'
+ };
+
+ modes.beforeHTML.processEOF = function() {
+ this.anythingElse();
+ tree.insertionMode.processEOF();
+ };
+
+ modes.beforeHTML.processComment = function(data) {
+ tree.insertComment(data, tree.document);
+ };
+
+ modes.beforeHTML.processCharacters = function(buffer) {
+ buffer.skipLeadingWhitespace();
+ if (!buffer.length)
+ return;
+ this.anythingElse();
+ tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.beforeHTML.startTagHtml = function(name, attributes, selfClosing) {
+ tree.insertHtmlElement(attributes);
+ tree.setInsertionMode('beforeHead');
+ };
+
+ modes.beforeHTML.startTagOther = function(name, attributes, selfClosing) {
+ this.anythingElse();
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.beforeHTML.processEndTag = function(name) {
+ this.anythingElse();
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.beforeHTML.anythingElse = function() {
+ tree.insertHtmlElement();
+ tree.setInsertionMode('beforeHead');
+ };
+
+ modes.afterAfterBody = Object.create(modes.base);
+
+ modes.afterAfterBody.start_tag_handlers = {
+ html: 'startTagHtml',
+ '-default': 'startTagOther'
+ };
+
+ modes.afterAfterBody.processComment = function(data) {
+ tree.insertComment(data, tree.document);
+ };
+
+ modes.afterAfterBody.processDoctype = function(data) {
+ modes.inBody.processDoctype(data);
+ };
+
+ modes.afterAfterBody.startTagHtml = function(data, attributes) {
+ modes.inBody.startTagHtml(data, attributes);
+ };
+
+ modes.afterAfterBody.startTagOther = function(name, attributes, selfClosing) {
+ tree.parseError('unexpected-start-tag', {name: name});
+ tree.setInsertionMode('inBody');
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.afterAfterBody.endTagOther = function(name) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ tree.setInsertionMode('inBody');
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.afterAfterBody.processCharacters = function(data) {
+ if (!isAllWhitespace(data.characters)) {
+ tree.parseError('unexpected-char-after-body');
+ tree.setInsertionMode('inBody');
+ return tree.insertionMode.processCharacters(data);
+ }
+ modes.inBody.processCharacters(data);
+ };
+
+ modes.afterBody = Object.create(modes.base);
+
+ modes.afterBody.end_tag_handlers = {
+ html: 'endTagHtml',
+ '-default': 'endTagOther'
+ };
+
+ modes.afterBody.processComment = function(data) {
+ tree.insertComment(data, tree.openElements.rootNode);
+ };
+
+ modes.afterBody.processCharacters = function(data) {
+ if (!isAllWhitespace(data.characters)) {
+ tree.parseError('unexpected-char-after-body');
+ tree.setInsertionMode('inBody');
+ return tree.insertionMode.processCharacters(data);
+ }
+ modes.inBody.processCharacters(data);
+ };
+
+ modes.afterBody.processStartTag = function(name, attributes, selfClosing) {
+ tree.parseError('unexpected-start-tag-after-body', {name: name});
+ tree.setInsertionMode('inBody');
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.afterBody.endTagHtml = function(name) {
+ if (tree.context) {
+ tree.parseError('end-html-in-innerhtml');
+ } else {
+ tree.setInsertionMode('afterAfterBody');
+ }
+ };
+
+ modes.afterBody.endTagOther = function(name) {
+ tree.parseError('unexpected-end-tag-after-body', {name: name});
+ tree.setInsertionMode('inBody');
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.afterFrameset = Object.create(modes.base);
+
+ modes.afterFrameset.start_tag_handlers = {
+ html: 'startTagHtml',
+ noframes: 'startTagNoframes',
+ '-default': 'startTagOther'
+ };
+
+ modes.afterFrameset.end_tag_handlers = {
+ html: 'endTagHtml',
+ '-default': 'endTagOther'
+ };
+
+ modes.afterFrameset.processCharacters = function(buffer) {
+ var characters = buffer.takeRemaining();
+ var whitespace = "";
+ for (var i = 0; i < characters.length; i++) {
+ var ch = characters[i];
+ if (isWhitespace(ch))
+ whitespace += ch;
+ }
+ if (whitespace) {
+ tree.insertText(whitespace);
+ }
+ if (whitespace.length < characters.length)
+ tree.parseError('expected-eof-but-got-char');
+ };
+
+ modes.afterFrameset.startTagNoframes = function(name, attributes) {
+ modes.inHead.processStartTag(name, attributes);
+ };
+
+ modes.afterFrameset.startTagOther = function(name, attributes) {
+ tree.parseError("unexpected-start-tag-after-frameset", {name: name});
+ };
+
+ modes.afterFrameset.endTagHtml = function(name) {
+ tree.setInsertionMode('afterAfterFrameset');
+ };
+
+ modes.afterFrameset.endTagOther = function(name) {
+ tree.parseError("unexpected-end-tag-after-frameset", {name: name});
+ };
+
+ modes.beforeHead = Object.create(modes.base);
+
+ modes.beforeHead.start_tag_handlers = {
+ html: 'startTagHtml',
+ head: 'startTagHead',
+ '-default': 'startTagOther'
+ };
+
+ modes.beforeHead.end_tag_handlers = {
+ html: 'endTagImplyHead',
+ head: 'endTagImplyHead',
+ body: 'endTagImplyHead',
+ br: 'endTagImplyHead',
+ '-default': 'endTagOther'
+ };
+
+ modes.beforeHead.processEOF = function() {
+ this.startTagHead('head', []);
+ tree.insertionMode.processEOF();
+ };
+
+ modes.beforeHead.processCharacters = function(buffer) {
+ buffer.skipLeadingWhitespace();
+ if (!buffer.length)
+ return;
+ this.startTagHead('head', []);
+ tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.beforeHead.startTagHead = function(name, attributes) {
+ tree.insertHeadElement(attributes);
+ tree.setInsertionMode('inHead');
+ };
+
+ modes.beforeHead.startTagOther = function(name, attributes, selfClosing) {
+ this.startTagHead('head', []);
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.beforeHead.endTagImplyHead = function(name) {
+ this.startTagHead('head', []);
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.beforeHead.endTagOther = function(name) {
+ tree.parseError('end-tag-after-implied-root', {name: name});
+ };
+
+ modes.inHead = Object.create(modes.base);
+
+ modes.inHead.start_tag_handlers = {
+ html: 'startTagHtml',
+ head: 'startTagHead',
+ title: 'startTagTitle',
+ script: 'startTagScript',
+ style: 'startTagNoFramesStyle',
+ noscript: 'startTagNoScript',
+ noframes: 'startTagNoFramesStyle',
+ base: 'startTagBaseBasefontBgsoundLink',
+ basefont: 'startTagBaseBasefontBgsoundLink',
+ bgsound: 'startTagBaseBasefontBgsoundLink',
+ link: 'startTagBaseBasefontBgsoundLink',
+ meta: 'startTagMeta',
+ "-default": 'startTagOther'
+ };
+
+ modes.inHead.end_tag_handlers = {
+ head: 'endTagHead',
+ html: 'endTagHtmlBodyBr',
+ body: 'endTagHtmlBodyBr',
+ br: 'endTagHtmlBodyBr',
+ "-default": 'endTagOther'
+ };
+
+ modes.inHead.processEOF = function() {
+ var name = tree.currentStackItem().localName;
+ if (['title', 'style', 'script'].indexOf(name) != -1) {
+ tree.parseError("expected-named-closing-tag-but-got-eof", {name: name});
+ tree.popElement();
+ }
+
+ this.anythingElse();
+
+ tree.insertionMode.processEOF();
+ };
+
+ modes.inHead.processCharacters = function(buffer) {
+ var leadingWhitespace = buffer.takeLeadingWhitespace();
+ if (leadingWhitespace)
+ tree.insertText(leadingWhitespace);
+ if (!buffer.length)
+ return;
+ this.anythingElse();
+ tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.inHead.startTagHtml = function(name, attributes) {
+ modes.inBody.processStartTag(name, attributes);
+ };
+
+ modes.inHead.startTagHead = function(name, attributes) {
+ tree.parseError('two-heads-are-not-better-than-one');
+ };
+
+ modes.inHead.startTagTitle = function(name, attributes) {
+ tree.processGenericRCDATAStartTag(name, attributes);
+ };
+
+ modes.inHead.startTagNoScript = function(name, attributes) {
+ if (tree.scriptingEnabled)
+ return tree.processGenericRawTextStartTag(name, attributes);
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inHeadNoscript');
+ };
+
+ modes.inHead.startTagNoFramesStyle = function(name, attributes) {
+ tree.processGenericRawTextStartTag(name, attributes);
+ };
+
+ modes.inHead.startTagScript = function(name, attributes) {
+ tree.insertElement(name, attributes);
+ tree.tokenizer.setState(Tokenizer.SCRIPT_DATA);
+ tree.originalInsertionMode = tree.insertionModeName;
+ tree.setInsertionMode('text');
+ };
+
+ modes.inHead.startTagBaseBasefontBgsoundLink = function(name, attributes) {
+ tree.insertSelfClosingElement(name, attributes);
+ };
+
+ modes.inHead.startTagMeta = function(name, attributes) {
+ tree.insertSelfClosingElement(name, attributes);
+ };
+
+ modes.inHead.startTagOther = function(name, attributes, selfClosing) {
+ this.anythingElse();
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inHead.endTagHead = function(name) {
+ if (tree.openElements.item(tree.openElements.length - 1).localName == 'head') {
+ tree.openElements.pop();
+ } else {
+ tree.parseError('unexpected-end-tag', {name: 'head'});
+ }
+ tree.setInsertionMode('afterHead');
+ };
+
+ modes.inHead.endTagHtmlBodyBr = function(name) {
+ this.anythingElse();
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.inHead.endTagOther = function(name) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ };
+
+ modes.inHead.anythingElse = function() {
+ this.endTagHead('head');
+ };
+
+ modes.afterHead = Object.create(modes.base);
+
+ modes.afterHead.start_tag_handlers = {
+ html: 'startTagHtml',
+ head: 'startTagHead',
+ body: 'startTagBody',
+ frameset: 'startTagFrameset',
+ base: 'startTagFromHead',
+ link: 'startTagFromHead',
+ meta: 'startTagFromHead',
+ script: 'startTagFromHead',
+ style: 'startTagFromHead',
+ title: 'startTagFromHead',
+ "-default": 'startTagOther'
+ };
+
+ modes.afterHead.end_tag_handlers = {
+ body: 'endTagBodyHtmlBr',
+ html: 'endTagBodyHtmlBr',
+ br: 'endTagBodyHtmlBr',
+ "-default": 'endTagOther'
+ };
+
+ modes.afterHead.processEOF = function() {
+ this.anythingElse();
+ tree.insertionMode.processEOF();
+ };
+
+ modes.afterHead.processCharacters = function(buffer) {
+ var leadingWhitespace = buffer.takeLeadingWhitespace();
+ if (leadingWhitespace)
+ tree.insertText(leadingWhitespace);
+ if (!buffer.length)
+ return;
+ this.anythingElse();
+ tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.afterHead.startTagHtml = function(name, attributes) {
+ modes.inBody.processStartTag(name, attributes);
+ };
+
+ modes.afterHead.startTagBody = function(name, attributes) {
+ tree.framesetOk = false;
+ tree.insertBodyElement(attributes);
+ tree.setInsertionMode('inBody');
+ };
+
+ modes.afterHead.startTagFrameset = function(name, attributes) {
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inFrameset');
+ };
+
+ modes.afterHead.startTagFromHead = function(name, attributes, selfClosing) {
+ tree.parseError("unexpected-start-tag-out-of-my-head", {name: name});
+ tree.openElements.push(tree.head);
+ modes.inHead.processStartTag(name, attributes, selfClosing);
+ tree.openElements.remove(tree.head);
+ };
+
+ modes.afterHead.startTagHead = function(name, attributes, selfClosing) {
+ tree.parseError('unexpected-start-tag', {name: name});
+ };
+
+ modes.afterHead.startTagOther = function(name, attributes, selfClosing) {
+ this.anythingElse();
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.afterHead.endTagBodyHtmlBr = function(name) {
+ this.anythingElse();
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.afterHead.endTagOther = function(name) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ };
+
+ modes.afterHead.anythingElse = function() {
+ tree.insertBodyElement([]);
+ tree.setInsertionMode('inBody');
+ tree.framesetOk = true;
+ }
+
+ modes.inBody = Object.create(modes.base);
+
+ modes.inBody.start_tag_handlers = {
+ html: 'startTagHtml',
+ head: 'startTagMisplaced',
+ base: 'startTagProcessInHead',
+ basefont: 'startTagProcessInHead',
+ bgsound: 'startTagProcessInHead',
+ link: 'startTagProcessInHead',
+ meta: 'startTagProcessInHead',
+ noframes: 'startTagProcessInHead',
+ script: 'startTagProcessInHead',
+ style: 'startTagProcessInHead',
+ title: 'startTagProcessInHead',
+ body: 'startTagBody',
+ form: 'startTagForm',
+ plaintext: 'startTagPlaintext',
+ a: 'startTagA',
+ button: 'startTagButton',
+ xmp: 'startTagXmp',
+ table: 'startTagTable',
+ hr: 'startTagHr',
+ image: 'startTagImage',
+ input: 'startTagInput',
+ textarea: 'startTagTextarea',
+ select: 'startTagSelect',
+ isindex: 'startTagIsindex',
+ applet: 'startTagAppletMarqueeObject',
+ marquee: 'startTagAppletMarqueeObject',
+ object: 'startTagAppletMarqueeObject',
+ li: 'startTagListItem',
+ dd: 'startTagListItem',
+ dt: 'startTagListItem',
+ address: 'startTagCloseP',
+ article: 'startTagCloseP',
+ aside: 'startTagCloseP',
+ blockquote: 'startTagCloseP',
+ center: 'startTagCloseP',
+ details: 'startTagCloseP',
+ dir: 'startTagCloseP',
+ div: 'startTagCloseP',
+ dl: 'startTagCloseP',
+ fieldset: 'startTagCloseP',
+ figcaption: 'startTagCloseP',
+ figure: 'startTagCloseP',
+ footer: 'startTagCloseP',
+ header: 'startTagCloseP',
+ hgroup: 'startTagCloseP',
+ main: 'startTagCloseP',
+ menu: 'startTagCloseP',
+ nav: 'startTagCloseP',
+ ol: 'startTagCloseP',
+ p: 'startTagCloseP',
+ section: 'startTagCloseP',
+ summary: 'startTagCloseP',
+ ul: 'startTagCloseP',
+ listing: 'startTagPreListing',
+ pre: 'startTagPreListing',
+ b: 'startTagFormatting',
+ big: 'startTagFormatting',
+ code: 'startTagFormatting',
+ em: 'startTagFormatting',
+ font: 'startTagFormatting',
+ i: 'startTagFormatting',
+ s: 'startTagFormatting',
+ small: 'startTagFormatting',
+ strike: 'startTagFormatting',
+ strong: 'startTagFormatting',
+ tt: 'startTagFormatting',
+ u: 'startTagFormatting',
+ nobr: 'startTagNobr',
+ area: 'startTagVoidFormatting',
+ br: 'startTagVoidFormatting',
+ embed: 'startTagVoidFormatting',
+ img: 'startTagVoidFormatting',
+ keygen: 'startTagVoidFormatting',
+ wbr: 'startTagVoidFormatting',
+ param: 'startTagParamSourceTrack',
+ source: 'startTagParamSourceTrack',
+ track: 'startTagParamSourceTrack',
+ iframe: 'startTagIFrame',
+ noembed: 'startTagRawText',
+ noscript: 'startTagRawText',
+ h1: 'startTagHeading',
+ h2: 'startTagHeading',
+ h3: 'startTagHeading',
+ h4: 'startTagHeading',
+ h5: 'startTagHeading',
+ h6: 'startTagHeading',
+ caption: 'startTagMisplaced',
+ col: 'startTagMisplaced',
+ colgroup: 'startTagMisplaced',
+ frame: 'startTagMisplaced',
+ frameset: 'startTagFrameset',
+ tbody: 'startTagMisplaced',
+ td: 'startTagMisplaced',
+ tfoot: 'startTagMisplaced',
+ th: 'startTagMisplaced',
+ thead: 'startTagMisplaced',
+ tr: 'startTagMisplaced',
+ option: 'startTagOptionOptgroup',
+ optgroup: 'startTagOptionOptgroup',
+ math: 'startTagMath',
+ svg: 'startTagSVG',
+ rt: 'startTagRpRt',
+ rp: 'startTagRpRt',
+ "-default": 'startTagOther'
+ };
+
+ modes.inBody.end_tag_handlers = {
+ p: 'endTagP',
+ body: 'endTagBody',
+ html: 'endTagHtml',
+ address: 'endTagBlock',
+ article: 'endTagBlock',
+ aside: 'endTagBlock',
+ blockquote: 'endTagBlock',
+ button: 'endTagBlock',
+ center: 'endTagBlock',
+ details: 'endTagBlock',
+ dir: 'endTagBlock',
+ div: 'endTagBlock',
+ dl: 'endTagBlock',
+ fieldset: 'endTagBlock',
+ figcaption: 'endTagBlock',
+ figure: 'endTagBlock',
+ footer: 'endTagBlock',
+ header: 'endTagBlock',
+ hgroup: 'endTagBlock',
+ listing: 'endTagBlock',
+ main: 'endTagBlock',
+ menu: 'endTagBlock',
+ nav: 'endTagBlock',
+ ol: 'endTagBlock',
+ pre: 'endTagBlock',
+ section: 'endTagBlock',
+ summary: 'endTagBlock',
+ ul: 'endTagBlock',
+ form: 'endTagForm',
+ applet: 'endTagAppletMarqueeObject',
+ marquee: 'endTagAppletMarqueeObject',
+ object: 'endTagAppletMarqueeObject',
+ dd: 'endTagListItem',
+ dt: 'endTagListItem',
+ li: 'endTagListItem',
+ h1: 'endTagHeading',
+ h2: 'endTagHeading',
+ h3: 'endTagHeading',
+ h4: 'endTagHeading',
+ h5: 'endTagHeading',
+ h6: 'endTagHeading',
+ a: 'endTagFormatting',
+ b: 'endTagFormatting',
+ big: 'endTagFormatting',
+ code: 'endTagFormatting',
+ em: 'endTagFormatting',
+ font: 'endTagFormatting',
+ i: 'endTagFormatting',
+ nobr: 'endTagFormatting',
+ s: 'endTagFormatting',
+ small: 'endTagFormatting',
+ strike: 'endTagFormatting',
+ strong: 'endTagFormatting',
+ tt: 'endTagFormatting',
+ u: 'endTagFormatting',
+ br: 'endTagBr',
+ "-default": 'endTagOther'
+ };
+
+ modes.inBody.processCharacters = function(buffer) {
+ if (tree.shouldSkipLeadingNewline) {
+ tree.shouldSkipLeadingNewline = false;
+ buffer.skipAtMostOneLeadingNewline();
+ }
+ tree.reconstructActiveFormattingElements();
+ var characters = buffer.takeRemaining();
+ characters = characters.replace(/\u0000/g, function(match, index){
+ tree.parseError("invalid-codepoint");
+ return '';
+ });
+ if (!characters)
+ return;
+ tree.insertText(characters);
+ if (tree.framesetOk && !isAllWhitespaceOrReplacementCharacters(characters))
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.startTagHtml = function(name, attributes) {
+ tree.parseError('non-html-root');
+ tree.addAttributesToElement(tree.openElements.rootNode, attributes);
+ };
+
+ modes.inBody.startTagProcessInHead = function(name, attributes) {
+ modes.inHead.processStartTag(name, attributes);
+ };
+
+ modes.inBody.startTagBody = function(name, attributes) {
+ tree.parseError('unexpected-start-tag', {name: 'body'});
+ if (tree.openElements.length == 1 ||
+ tree.openElements.item(1).localName != 'body') {
+ assert.ok(tree.context);
+ } else {
+ tree.framesetOk = false;
+ tree.addAttributesToElement(tree.openElements.bodyElement, attributes);
+ }
+ };
+
+ modes.inBody.startTagFrameset = function(name, attributes) {
+ tree.parseError('unexpected-start-tag', {name: 'frameset'});
+ if (tree.openElements.length == 1 ||
+ tree.openElements.item(1).localName != 'body') {
+ assert.ok(tree.context);
+ } else if (tree.framesetOk) {
+ tree.detachFromParent(tree.openElements.bodyElement);
+ while (tree.openElements.length > 1)
+ tree.openElements.pop();
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inFrameset');
+ }
+ };
+
+ modes.inBody.startTagCloseP = function(name, attributes) {
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inBody.startTagPreListing = function(name, attributes) {
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ tree.insertElement(name, attributes);
+ tree.framesetOk = false;
+ tree.shouldSkipLeadingNewline = true;
+ };
+
+ modes.inBody.startTagForm = function(name, attributes) {
+ if (tree.form) {
+ tree.parseError('unexpected-start-tag', {name: name});
+ } else {
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ tree.insertElement(name, attributes);
+ tree.form = tree.currentStackItem();
+ }
+ };
+
+ modes.inBody.startTagRpRt = function(name, attributes) {
+ if (tree.openElements.inScope('ruby')) {
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem().localName != 'ruby') {
+ tree.parseError('unexpected-start-tag', {name: name});
+ }
+ }
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inBody.startTagListItem = function(name, attributes) {
+ var stopNames = {li: ['li'], dd: ['dd', 'dt'], dt: ['dd', 'dt']};
+ var stopName = stopNames[name];
+
+ var els = tree.openElements;
+ for (var i = els.length - 1; i >= 0; i--) {
+ var node = els.item(i);
+ if (stopName.indexOf(node.localName) != -1) {
+ tree.insertionMode.processEndTag(node.localName);
+ break;
+ }
+ if (node.isSpecial() && node.localName !== 'p' && node.localName !== 'address' && node.localName !== 'div')
+ break;
+ }
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ tree.insertElement(name, attributes);
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.startTagPlaintext = function(name, attributes) {
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ tree.insertElement(name, attributes);
+ tree.tokenizer.setState(Tokenizer.PLAINTEXT);
+ };
+
+ modes.inBody.startTagHeading = function(name, attributes) {
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ if (tree.currentStackItem().isNumberedHeader()) {
+ tree.parseError('unexpected-start-tag', {name: name});
+ tree.popElement();
+ }
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inBody.startTagA = function(name, attributes) {
+ var activeA = tree.elementInActiveFormattingElements('a');
+ if (activeA) {
+ tree.parseError("unexpected-start-tag-implies-end-tag", {startName: "a", endName: "a"});
+ tree.adoptionAgencyEndTag('a');
+ if (tree.openElements.contains(activeA))
+ tree.openElements.remove(activeA);
+ tree.removeElementFromActiveFormattingElements(activeA);
+ }
+ tree.reconstructActiveFormattingElements();
+ tree.insertFormattingElement(name, attributes);
+ };
+
+ modes.inBody.startTagFormatting = function(name, attributes) {
+ tree.reconstructActiveFormattingElements();
+ tree.insertFormattingElement(name, attributes);
+ };
+
+ modes.inBody.startTagNobr = function(name, attributes) {
+ tree.reconstructActiveFormattingElements();
+ if (tree.openElements.inScope('nobr')) {
+ tree.parseError("unexpected-start-tag-implies-end-tag", {startName: 'nobr', endName: 'nobr'});
+ this.processEndTag('nobr');
+ tree.reconstructActiveFormattingElements();
+ }
+ tree.insertFormattingElement(name, attributes);
+ };
+
+ modes.inBody.startTagButton = function(name, attributes) {
+ if (tree.openElements.inScope('button')) {
+ tree.parseError('unexpected-start-tag-implies-end-tag', {startName: 'button', endName: 'button'});
+ this.processEndTag('button');
+ tree.insertionMode.processStartTag(name, attributes);
+ } else {
+ tree.framesetOk = false;
+ tree.reconstructActiveFormattingElements();
+ tree.insertElement(name, attributes);
+ }
+ };
+
+ modes.inBody.startTagAppletMarqueeObject = function(name, attributes) {
+ tree.reconstructActiveFormattingElements();
+ tree.insertElement(name, attributes);
+ tree.activeFormattingElements.push(Marker);
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.endTagAppletMarqueeObject = function(name) {
+ if (!tree.openElements.inScope(name)) {
+ tree.parseError("unexpected-end-tag", {name: name});
+ } else {
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem().localName != name) {
+ tree.parseError('end-tag-too-early', {name: name});
+ }
+ tree.openElements.popUntilPopped(name);
+ tree.clearActiveFormattingElements();
+ }
+ };
+
+ modes.inBody.startTagXmp = function(name, attributes) {
+ if (tree.openElements.inButtonScope('p'))
+ this.processEndTag('p');
+ tree.reconstructActiveFormattingElements();
+ tree.processGenericRawTextStartTag(name, attributes);
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.startTagTable = function(name, attributes) {
+ if (tree.compatMode !== "quirks")
+ if (tree.openElements.inButtonScope('p'))
+ this.processEndTag('p');
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inTable');
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.startTagVoidFormatting = function(name, attributes) {
+ tree.reconstructActiveFormattingElements();
+ tree.insertSelfClosingElement(name, attributes);
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.startTagParamSourceTrack = function(name, attributes) {
+ tree.insertSelfClosingElement(name, attributes);
+ };
+
+ modes.inBody.startTagHr = function(name, attributes) {
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ tree.insertSelfClosingElement(name, attributes);
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.startTagImage = function(name, attributes) {
+ tree.parseError('unexpected-start-tag-treated-as', {originalName: 'image', newName: 'img'});
+ this.processStartTag('img', attributes);
+ };
+
+ modes.inBody.startTagInput = function(name, attributes) {
+ var currentFramesetOk = tree.framesetOk;
+ this.startTagVoidFormatting(name, attributes);
+ for (var key in attributes) {
+ if (attributes[key].nodeName == 'type') {
+ if (attributes[key].nodeValue.toLowerCase() == 'hidden')
+ tree.framesetOk = currentFramesetOk;
+ break;
+ }
+ }
+ };
+
+ modes.inBody.startTagIsindex = function(name, attributes) {
+ tree.parseError('deprecated-tag', {name: 'isindex'});
+ tree.selfClosingFlagAcknowledged = true;
+ if (tree.form)
+ return;
+ var formAttributes = [];
+ var inputAttributes = [];
+ var prompt = "This is a searchable index. Enter search keywords: ";
+ for (var key in attributes) {
+ switch (attributes[key].nodeName) {
+ case 'action':
+ formAttributes.push({nodeName: 'action',
+ nodeValue: attributes[key].nodeValue});
+ break;
+ case 'prompt':
+ prompt = attributes[key].nodeValue;
+ break;
+ case 'name':
+ break;
+ default:
+ inputAttributes.push({nodeName: attributes[key].nodeName,
+ nodeValue: attributes[key].nodeValue});
+ }
+ }
+ inputAttributes.push({nodeName: 'name', nodeValue: 'isindex'});
+ this.processStartTag('form', formAttributes);
+ this.processStartTag('hr');
+ this.processStartTag('label');
+ this.processCharacters(new CharacterBuffer(prompt));
+ this.processStartTag('input', inputAttributes);
+ this.processEndTag('label');
+ this.processStartTag('hr');
+ this.processEndTag('form');
+ };
+
+ modes.inBody.startTagTextarea = function(name, attributes) {
+ tree.insertElement(name, attributes);
+ tree.tokenizer.setState(Tokenizer.RCDATA);
+ tree.originalInsertionMode = tree.insertionModeName;
+ tree.shouldSkipLeadingNewline = true;
+ tree.framesetOk = false;
+ tree.setInsertionMode('text');
+ };
+
+ modes.inBody.startTagIFrame = function(name, attributes) {
+ tree.framesetOk = false;
+ this.startTagRawText(name, attributes);
+ };
+
+ modes.inBody.startTagRawText = function(name, attributes) {
+ tree.processGenericRawTextStartTag(name, attributes);
+ };
+
+ modes.inBody.startTagSelect = function(name, attributes) {
+ tree.reconstructActiveFormattingElements();
+ tree.insertElement(name, attributes);
+ tree.framesetOk = false;
+ var insertionModeName = tree.insertionModeName;
+ if (insertionModeName == 'inTable' ||
+ insertionModeName == 'inCaption' ||
+ insertionModeName == 'inColumnGroup' ||
+ insertionModeName == 'inTableBody' ||
+ insertionModeName == 'inRow' ||
+ insertionModeName == 'inCell') {
+ tree.setInsertionMode('inSelectInTable');
+ } else {
+ tree.setInsertionMode('inSelect');
+ }
+ };
+
+ modes.inBody.startTagMisplaced = function(name, attributes) {
+ tree.parseError('unexpected-start-tag-ignored', {name: name});
+ };
+
+ modes.inBody.endTagMisplaced = function(name) {
+ tree.parseError("unexpected-end-tag", {name: name});
+ };
+
+ modes.inBody.endTagBr = function(name) {
+ tree.parseError("unexpected-end-tag-treated-as", {originalName: "br", newName: "br element"});
+ tree.reconstructActiveFormattingElements();
+ tree.insertElement(name, []);
+ tree.popElement();
+ };
+
+ modes.inBody.startTagOptionOptgroup = function(name, attributes) {
+ if (tree.currentStackItem().localName == 'option')
+ tree.popElement();
+ tree.reconstructActiveFormattingElements();
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inBody.startTagOther = function(name, attributes) {
+ tree.reconstructActiveFormattingElements();
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inBody.endTagOther = function(name) {
+ var node;
+ for (var i = tree.openElements.length - 1; i > 0; i--) {
+ node = tree.openElements.item(i);
+ if (node.localName == name) {
+ tree.generateImpliedEndTags(name);
+ if (tree.currentStackItem().localName != name)
+ tree.parseError('unexpected-end-tag', {name: name});
+ tree.openElements.remove_openElements_until(function(x) {return x === node;});
+ break;
+ }
+ if (node.isSpecial()) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ break;
+ }
+ }
+ };
+
+ modes.inBody.startTagMath = function(name, attributes, selfClosing) {
+ tree.reconstructActiveFormattingElements();
+ attributes = tree.adjustMathMLAttributes(attributes);
+ attributes = tree.adjustForeignAttributes(attributes);
+ tree.insertForeignElement(name, attributes, "http://www.w3.org/1998/Math/MathML", selfClosing);
+ };
+
+ modes.inBody.startTagSVG = function(name, attributes, selfClosing) {
+ tree.reconstructActiveFormattingElements();
+ attributes = tree.adjustSVGAttributes(attributes);
+ attributes = tree.adjustForeignAttributes(attributes);
+ tree.insertForeignElement(name, attributes, "http://www.w3.org/2000/svg", selfClosing);
+ };
+
+ modes.inBody.endTagP = function(name) {
+ if (!tree.openElements.inButtonScope('p')) {
+ tree.parseError('unexpected-end-tag', {name: 'p'});
+ this.startTagCloseP('p', []);
+ this.endTagP('p');
+ } else {
+ tree.generateImpliedEndTags('p');
+ if (tree.currentStackItem().localName != 'p')
+ tree.parseError('unexpected-implied-end-tag', {name: 'p'});
+ tree.openElements.popUntilPopped(name);
+ }
+ };
+
+ modes.inBody.endTagBody = function(name) {
+ if (!tree.openElements.inScope('body')) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ return;
+ }
+ if (tree.currentStackItem().localName != 'body') {
+ tree.parseError('expected-one-end-tag-but-got-another', {
+ expectedName: tree.currentStackItem().localName,
+ gotName: name
+ });
+ }
+ tree.setInsertionMode('afterBody');
+ };
+
+ modes.inBody.endTagHtml = function(name) {
+ if (!tree.openElements.inScope('body')) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ return;
+ }
+ if (tree.currentStackItem().localName != 'body') {
+ tree.parseError('expected-one-end-tag-but-got-another', {
+ expectedName: tree.currentStackItem().localName,
+ gotName: name
+ });
+ }
+ tree.setInsertionMode('afterBody');
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.inBody.endTagBlock = function(name) {
+ if (!tree.openElements.inScope(name)) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ } else {
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem().localName != name) {
+ tree.parseError('end-tag-too-early', {name: name});
+ }
+ tree.openElements.popUntilPopped(name);
+ }
+ };
+
+ modes.inBody.endTagForm = function(name) {
+ var node = tree.form;
+ tree.form = null;
+ if (!node || !tree.openElements.inScope(name)) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ } else {
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem() != node) {
+ tree.parseError('end-tag-too-early-ignored', {name: 'form'});
+ }
+ tree.openElements.remove(node);
+ }
+ };
+
+ modes.inBody.endTagListItem = function(name) {
+ if (!tree.openElements.inListItemScope(name)) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ } else {
+ tree.generateImpliedEndTags(name);
+ if (tree.currentStackItem().localName != name)
+ tree.parseError('end-tag-too-early', {name: name});
+ tree.openElements.popUntilPopped(name);
+ }
+ };
+
+ modes.inBody.endTagHeading = function(name) {
+ if (!tree.openElements.hasNumberedHeaderElementInScope()) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ return;
+ }
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem().localName != name)
+ tree.parseError('end-tag-too-early', {name: name});
+
+ tree.openElements.remove_openElements_until(function(e) {
+ return e.isNumberedHeader();
+ });
+ };
+
+ modes.inBody.endTagFormatting = function(name, attributes) {
+ if (!tree.adoptionAgencyEndTag(name))
+ this.endTagOther(name, attributes);
+ };
+
+ modes.inCaption = Object.create(modes.base);
+
+ modes.inCaption.start_tag_handlers = {
+ html: 'startTagHtml',
+ caption: 'startTagTableElement',
+ col: 'startTagTableElement',
+ colgroup: 'startTagTableElement',
+ tbody: 'startTagTableElement',
+ td: 'startTagTableElement',
+ tfoot: 'startTagTableElement',
+ thead: 'startTagTableElement',
+ tr: 'startTagTableElement',
+ '-default': 'startTagOther'
+ };
+
+ modes.inCaption.end_tag_handlers = {
+ caption: 'endTagCaption',
+ table: 'endTagTable',
+ body: 'endTagIgnore',
+ col: 'endTagIgnore',
+ colgroup: 'endTagIgnore',
+ html: 'endTagIgnore',
+ tbody: 'endTagIgnore',
+ td: 'endTagIgnore',
+ tfood: 'endTagIgnore',
+ thead: 'endTagIgnore',
+ tr: 'endTagIgnore',
+ '-default': 'endTagOther'
+ };
+
+ modes.inCaption.processCharacters = function(data) {
+ modes.inBody.processCharacters(data);
+ };
+
+ modes.inCaption.startTagTableElement = function(name, attributes) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ var ignoreEndTag = !tree.openElements.inTableScope('caption');
+ tree.insertionMode.processEndTag('caption');
+ if (!ignoreEndTag) tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inCaption.startTagOther = function(name, attributes, selfClosing) {
+ modes.inBody.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inCaption.endTagCaption = function(name) {
+ if (!tree.openElements.inTableScope('caption')) {
+ assert.ok(tree.context);
+ tree.parseError('unexpected-end-tag', {name: name});
+ } else {
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem().localName != 'caption') {
+ tree.parseError('expected-one-end-tag-but-got-another', {
+ gotName: "caption",
+ expectedName: tree.currentStackItem().localName
+ });
+ }
+ tree.openElements.popUntilPopped('caption');
+ tree.clearActiveFormattingElements();
+ tree.setInsertionMode('inTable');
+ }
+ };
+
+ modes.inCaption.endTagTable = function(name) {
+ tree.parseError("unexpected-end-table-in-caption");
+ var ignoreEndTag = !tree.openElements.inTableScope('caption');
+ tree.insertionMode.processEndTag('caption');
+ if (!ignoreEndTag) tree.insertionMode.processEndTag(name);
+ };
+
+ modes.inCaption.endTagIgnore = function(name) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ };
+
+ modes.inCaption.endTagOther = function(name) {
+ modes.inBody.processEndTag(name);
+ };
+
+ modes.inCell = Object.create(modes.base);
+
+ modes.inCell.start_tag_handlers = {
+ html: 'startTagHtml',
+ caption: 'startTagTableOther',
+ col: 'startTagTableOther',
+ colgroup: 'startTagTableOther',
+ tbody: 'startTagTableOther',
+ td: 'startTagTableOther',
+ tfoot: 'startTagTableOther',
+ th: 'startTagTableOther',
+ thead: 'startTagTableOther',
+ tr: 'startTagTableOther',
+ '-default': 'startTagOther'
+ };
+
+ modes.inCell.end_tag_handlers = {
+ td: 'endTagTableCell',
+ th: 'endTagTableCell',
+ body: 'endTagIgnore',
+ caption: 'endTagIgnore',
+ col: 'endTagIgnore',
+ colgroup: 'endTagIgnore',
+ html: 'endTagIgnore',
+ table: 'endTagImply',
+ tbody: 'endTagImply',
+ tfoot: 'endTagImply',
+ thead: 'endTagImply',
+ tr: 'endTagImply',
+ '-default': 'endTagOther'
+ };
+
+ modes.inCell.processCharacters = function(data) {
+ modes.inBody.processCharacters(data);
+ };
+
+ modes.inCell.startTagTableOther = function(name, attributes, selfClosing) {
+ if (tree.openElements.inTableScope('td') || tree.openElements.inTableScope('th')) {
+ this.closeCell();
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ } else {
+ tree.parseError('unexpected-start-tag', {name: name});
+ }
+ };
+
+ modes.inCell.startTagOther = function(name, attributes, selfClosing) {
+ modes.inBody.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inCell.endTagTableCell = function(name) {
+ if (tree.openElements.inTableScope(name)) {
+ tree.generateImpliedEndTags(name);
+ if (tree.currentStackItem().localName != name.toLowerCase()) {
+ tree.parseError('unexpected-cell-end-tag', {name: name});
+ tree.openElements.popUntilPopped(name);
+ } else {
+ tree.popElement();
+ }
+ tree.clearActiveFormattingElements();
+ tree.setInsertionMode('inRow');
+ } else {
+ tree.parseError('unexpected-end-tag', {name: name});
+ }
+ };
+
+ modes.inCell.endTagIgnore = function(name) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ };
+
+ modes.inCell.endTagImply = function(name) {
+ if (tree.openElements.inTableScope(name)) {
+ this.closeCell();
+ tree.insertionMode.processEndTag(name);
+ } else {
+ tree.parseError('unexpected-end-tag', {name: name});
+ }
+ };
+
+ modes.inCell.endTagOther = function(name) {
+ modes.inBody.processEndTag(name);
+ };
+
+ modes.inCell.closeCell = function() {
+ if (tree.openElements.inTableScope('td')) {
+ this.endTagTableCell('td');
+ } else if (tree.openElements.inTableScope('th')) {
+ this.endTagTableCell('th');
+ }
+ };
+
+
+ modes.inColumnGroup = Object.create(modes.base);
+
+ modes.inColumnGroup.start_tag_handlers = {
+ html: 'startTagHtml',
+ col: 'startTagCol',
+ '-default': 'startTagOther'
+ };
+
+ modes.inColumnGroup.end_tag_handlers = {
+ colgroup: 'endTagColgroup',
+ col: 'endTagCol',
+ '-default': 'endTagOther'
+ };
+
+ modes.inColumnGroup.ignoreEndTagColgroup = function() {
+ return tree.currentStackItem().localName == 'html';
+ };
+
+ modes.inColumnGroup.processCharacters = function(buffer) {
+ var leadingWhitespace = buffer.takeLeadingWhitespace();
+ if (leadingWhitespace)
+ tree.insertText(leadingWhitespace);
+ if (!buffer.length)
+ return;
+ var ignoreEndTag = this.ignoreEndTagColgroup();
+ this.endTagColgroup('colgroup');
+ if (!ignoreEndTag) tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.inColumnGroup.startTagCol = function(name, attributes) {
+ tree.insertSelfClosingElement(name, attributes);
+ };
+
+ modes.inColumnGroup.startTagOther = function(name, attributes, selfClosing) {
+ var ignoreEndTag = this.ignoreEndTagColgroup();
+ this.endTagColgroup('colgroup');
+ if (!ignoreEndTag) tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inColumnGroup.endTagColgroup = function(name) {
+ if (this.ignoreEndTagColgroup()) {
+ assert.ok(tree.context);
+ tree.parseError('unexpected-end-tag', {name: name});
+ } else {
+ tree.popElement();
+ tree.setInsertionMode('inTable');
+ }
+ };
+
+ modes.inColumnGroup.endTagCol = function(name) {
+ tree.parseError("no-end-tag", {name: 'col'});
+ };
+
+ modes.inColumnGroup.endTagOther = function(name) {
+ var ignoreEndTag = this.ignoreEndTagColgroup();
+ this.endTagColgroup('colgroup');
+ if (!ignoreEndTag) tree.insertionMode.processEndTag(name) ;
+ };
+
+ modes.inForeignContent = Object.create(modes.base);
+
+ modes.inForeignContent.processStartTag = function(name, attributes, selfClosing) {
+ if (['b', 'big', 'blockquote', 'body', 'br', 'center', 'code', 'dd', 'div', 'dl', 'dt', 'em', 'embed', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'i', 'img', 'li', 'listing', 'menu', 'meta', 'nobr', 'ol', 'p', 'pre', 'ruby', 's', 'small', 'span', 'strong', 'strike', 'sub', 'sup', 'table', 'tt', 'u', 'ul', 'var'].indexOf(name) != -1
+ || (name == 'font' && attributes.some(function(attr){ return ['color', 'face', 'size'].indexOf(attr.nodeName) >= 0 }))) {
+ tree.parseError('unexpected-html-element-in-foreign-content', {name: name});
+ while (tree.currentStackItem().isForeign()
+ && !tree.currentStackItem().isHtmlIntegrationPoint()
+ && !tree.currentStackItem().isMathMLTextIntegrationPoint()) {
+ tree.openElements.pop();
+ }
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ return;
+ }
+ if (tree.currentStackItem().namespaceURI == "http://www.w3.org/1998/Math/MathML") {
+ attributes = tree.adjustMathMLAttributes(attributes);
+ }
+ if (tree.currentStackItem().namespaceURI == "http://www.w3.org/2000/svg") {
+ name = tree.adjustSVGTagNameCase(name);
+ attributes = tree.adjustSVGAttributes(attributes);
+ }
+ attributes = tree.adjustForeignAttributes(attributes);
+ tree.insertForeignElement(name, attributes, tree.currentStackItem().namespaceURI, selfClosing);
+ };
+
+ modes.inForeignContent.processEndTag = function(name) {
+ var node = tree.currentStackItem();
+ var index = tree.openElements.length - 1;
+ if (node.localName.toLowerCase() != name)
+ tree.parseError("unexpected-end-tag", {name: name});
+
+ while (true) {
+ if (index === 0)
+ break;
+ if (node.localName.toLowerCase() == name) {
+ while (tree.openElements.pop() != node);
+ break;
+ }
+ index -= 1;
+ node = tree.openElements.item(index);
+ if (node.isForeign()) {
+ continue;
+ } else {
+ tree.insertionMode.processEndTag(name);
+ break;
+ }
+ }
+ };
+
+ modes.inForeignContent.processCharacters = function(buffer) {
+ var characters = buffer.takeRemaining();
+ characters = characters.replace(/\u0000/g, function(match, index){
+ tree.parseError('invalid-codepoint');
+ return '\uFFFD';
+ });
+ if (tree.framesetOk && !isAllWhitespaceOrReplacementCharacters(characters))
+ tree.framesetOk = false;
+ tree.insertText(characters);
+ };
+
+ modes.inHeadNoscript = Object.create(modes.base);
+
+ modes.inHeadNoscript.start_tag_handlers = {
+ html: 'startTagHtml',
+ basefont: 'startTagBasefontBgsoundLinkMetaNoframesStyle',
+ bgsound: 'startTagBasefontBgsoundLinkMetaNoframesStyle',
+ link: 'startTagBasefontBgsoundLinkMetaNoframesStyle',
+ meta: 'startTagBasefontBgsoundLinkMetaNoframesStyle',
+ noframes: 'startTagBasefontBgsoundLinkMetaNoframesStyle',
+ style: 'startTagBasefontBgsoundLinkMetaNoframesStyle',
+ head: 'startTagHeadNoscript',
+ noscript: 'startTagHeadNoscript',
+ "-default": 'startTagOther'
+ };
+
+ modes.inHeadNoscript.end_tag_handlers = {
+ noscript: 'endTagNoscript',
+ br: 'endTagBr',
+ '-default': 'endTagOther'
+ };
+
+ modes.inHeadNoscript.processCharacters = function(buffer) {
+ var leadingWhitespace = buffer.takeLeadingWhitespace();
+ if (leadingWhitespace)
+ tree.insertText(leadingWhitespace);
+ if (!buffer.length)
+ return;
+ tree.parseError("unexpected-char-in-frameset");
+ this.anythingElse();
+ tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.inHeadNoscript.processComment = function(data) {
+ modes.inHead.processComment(data);
+ };
+
+ modes.inHeadNoscript.startTagBasefontBgsoundLinkMetaNoframesStyle = function(name, attributes) {
+ modes.inHead.processStartTag(name, attributes);
+ };
+
+ modes.inHeadNoscript.startTagHeadNoscript = function(name, attributes) {
+ tree.parseError("unexpected-start-tag-in-frameset", {name: name});
+ };
+
+ modes.inHeadNoscript.startTagOther = function(name, attributes) {
+ tree.parseError("unexpected-start-tag-in-frameset", {name: name});
+ this.anythingElse();
+ tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inHeadNoscript.endTagBr = function(name, attributes) {
+ tree.parseError("unexpected-end-tag-in-frameset", {name: name});
+ this.anythingElse();
+ tree.insertionMode.processEndTag(name, attributes);
+ };
+
+ modes.inHeadNoscript.endTagNoscript = function(name, attributes) {
+ tree.popElement();
+ tree.setInsertionMode('inHead');
+ };
+
+ modes.inHeadNoscript.endTagOther = function(name, attributes) {
+ tree.parseError("unexpected-end-tag-in-frameset", {name: name});
+ };
+
+ modes.inHeadNoscript.anythingElse = function() {
+ tree.popElement();
+ tree.setInsertionMode('inHead');
+ };
+
+
+ modes.inFrameset = Object.create(modes.base);
+
+ modes.inFrameset.start_tag_handlers = {
+ html: 'startTagHtml',
+ frameset: 'startTagFrameset',
+ frame: 'startTagFrame',
+ noframes: 'startTagNoframes',
+ "-default": 'startTagOther'
+ };
+
+ modes.inFrameset.end_tag_handlers = {
+ frameset: 'endTagFrameset',
+ noframes: 'endTagNoframes',
+ '-default': 'endTagOther'
+ };
+
+ modes.inFrameset.processCharacters = function(data) {
+ tree.parseError("unexpected-char-in-frameset");
+ };
+
+ modes.inFrameset.startTagFrameset = function(name, attributes) {
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inFrameset.startTagFrame = function(name, attributes) {
+ tree.insertSelfClosingElement(name, attributes);
+ };
+
+ modes.inFrameset.startTagNoframes = function(name, attributes) {
+ modes.inBody.processStartTag(name, attributes);
+ };
+
+ modes.inFrameset.startTagOther = function(name, attributes) {
+ tree.parseError("unexpected-start-tag-in-frameset", {name: name});
+ };
+
+ modes.inFrameset.endTagFrameset = function(name, attributes) {
+ if (tree.currentStackItem().localName == 'html') {
+ tree.parseError("unexpected-frameset-in-frameset-innerhtml");
+ } else {
+ tree.popElement();
+ }
+
+ if (!tree.context && tree.currentStackItem().localName != 'frameset') {
+ tree.setInsertionMode('afterFrameset');
+ }
+ };
+
+ modes.inFrameset.endTagNoframes = function(name) {
+ modes.inBody.processEndTag(name);
+ };
+
+ modes.inFrameset.endTagOther = function(name) {
+ tree.parseError("unexpected-end-tag-in-frameset", {name: name});
+ };
+
+ modes.inTable = Object.create(modes.base);
+
+ modes.inTable.start_tag_handlers = {
+ html: 'startTagHtml',
+ caption: 'startTagCaption',
+ colgroup: 'startTagColgroup',
+ col: 'startTagCol',
+ table: 'startTagTable',
+ tbody: 'startTagRowGroup',
+ tfoot: 'startTagRowGroup',
+ thead: 'startTagRowGroup',
+ td: 'startTagImplyTbody',
+ th: 'startTagImplyTbody',
+ tr: 'startTagImplyTbody',
+ style: 'startTagStyleScript',
+ script: 'startTagStyleScript',
+ input: 'startTagInput',
+ form: 'startTagForm',
+ '-default': 'startTagOther'
+ };
+
+ modes.inTable.end_tag_handlers = {
+ table: 'endTagTable',
+ body: 'endTagIgnore',
+ caption: 'endTagIgnore',
+ col: 'endTagIgnore',
+ colgroup: 'endTagIgnore',
+ html: 'endTagIgnore',
+ tbody: 'endTagIgnore',
+ td: 'endTagIgnore',
+ tfoot: 'endTagIgnore',
+ th: 'endTagIgnore',
+ thead: 'endTagIgnore',
+ tr: 'endTagIgnore',
+ '-default': 'endTagOther'
+ };
+
+ modes.inTable.processCharacters = function(data) {
+ if (tree.currentStackItem().isFosterParenting()) {
+ var originalInsertionMode = tree.insertionModeName;
+ tree.setInsertionMode('inTableText');
+ tree.originalInsertionMode = originalInsertionMode;
+ tree.insertionMode.processCharacters(data);
+ } else {
+ tree.redirectAttachToFosterParent = true;
+ modes.inBody.processCharacters(data);
+ tree.redirectAttachToFosterParent = false;
+ }
+ };
+
+ modes.inTable.startTagCaption = function(name, attributes) {
+ tree.openElements.popUntilTableScopeMarker();
+ tree.activeFormattingElements.push(Marker);
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inCaption');
+ };
+
+ modes.inTable.startTagColgroup = function(name, attributes) {
+ tree.openElements.popUntilTableScopeMarker();
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inColumnGroup');
+ };
+
+ modes.inTable.startTagCol = function(name, attributes) {
+ this.startTagColgroup('colgroup', []);
+ tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inTable.startTagRowGroup = function(name, attributes) {
+ tree.openElements.popUntilTableScopeMarker();
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inTableBody');
+ };
+
+ modes.inTable.startTagImplyTbody = function(name, attributes) {
+ this.startTagRowGroup('tbody', []);
+ tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inTable.startTagTable = function(name, attributes) {
+ tree.parseError("unexpected-start-tag-implies-end-tag",
+ {startName: "table", endName: "table"});
+ tree.insertionMode.processEndTag('table');
+ if (!tree.context) tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inTable.startTagStyleScript = function(name, attributes) {
+ modes.inHead.processStartTag(name, attributes);
+ };
+
+ modes.inTable.startTagInput = function(name, attributes) {
+ for (var key in attributes) {
+ if (attributes[key].nodeName.toLowerCase() == 'type') {
+ if (attributes[key].nodeValue.toLowerCase() == 'hidden') {
+ tree.parseError("unexpected-hidden-input-in-table");
+ tree.insertElement(name, attributes);
+ tree.openElements.pop();
+ return;
+ }
+ break;
+ }
+ }
+ this.startTagOther(name, attributes);
+ };
+
+ modes.inTable.startTagForm = function(name, attributes) {
+ tree.parseError("unexpected-form-in-table");
+ if (!tree.form) {
+ tree.insertElement(name, attributes);
+ tree.form = tree.currentStackItem();
+ tree.openElements.pop();
+ }
+ };
+
+ modes.inTable.startTagOther = function(name, attributes, selfClosing) {
+ tree.parseError("unexpected-start-tag-implies-table-voodoo", {name: name});
+ tree.redirectAttachToFosterParent = true;
+ modes.inBody.processStartTag(name, attributes, selfClosing);
+ tree.redirectAttachToFosterParent = false;
+ };
+
+ modes.inTable.endTagTable = function(name) {
+ if (tree.openElements.inTableScope(name)) {
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem().localName != name) {
+ tree.parseError("end-tag-too-early-named", {gotName: 'table', expectedName: tree.currentStackItem().localName});
+ }
+
+ tree.openElements.popUntilPopped('table');
+ tree.resetInsertionMode();
+ } else {
+ assert.ok(tree.context);
+ tree.parseError('unexpected-end-tag', {name: name});
+ }
+ };
+
+ modes.inTable.endTagIgnore = function(name) {
+ tree.parseError("unexpected-end-tag", {name: name});
+ };
+
+ modes.inTable.endTagOther = function(name) {
+ tree.parseError("unexpected-end-tag-implies-table-voodoo", {name: name});
+ tree.redirectAttachToFosterParent = true;
+ modes.inBody.processEndTag(name);
+ tree.redirectAttachToFosterParent = false;
+ };
+
+ modes.inTableText = Object.create(modes.base);
+
+ modes.inTableText.flushCharacters = function() {
+ var characters = tree.pendingTableCharacters.join('');
+ if (!isAllWhitespace(characters)) {
+ tree.redirectAttachToFosterParent = true;
+ tree.reconstructActiveFormattingElements();
+ tree.insertText(characters);
+ tree.framesetOk = false;
+ tree.redirectAttachToFosterParent = false;
+ } else {
+ tree.insertText(characters);
+ }
+ tree.pendingTableCharacters = [];
+ };
+
+ modes.inTableText.processComment = function(data) {
+ this.flushCharacters();
+ tree.setInsertionMode(tree.originalInsertionMode);
+ tree.insertionMode.processComment(data);
+ };
+
+ modes.inTableText.processEOF = function(data) {
+ this.flushCharacters();
+ tree.setInsertionMode(tree.originalInsertionMode);
+ tree.insertionMode.processEOF();
+ };
+
+ modes.inTableText.processCharacters = function(buffer) {
+ var characters = buffer.takeRemaining();
+ characters = characters.replace(/\u0000/g, function(match, index){
+ tree.parseError("invalid-codepoint");
+ return '';
+ });
+ if (!characters)
+ return;
+ tree.pendingTableCharacters.push(characters);
+ };
+
+ modes.inTableText.processStartTag = function(name, attributes, selfClosing) {
+ this.flushCharacters();
+ tree.setInsertionMode(tree.originalInsertionMode);
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inTableText.processEndTag = function(name, attributes) {
+ this.flushCharacters();
+ tree.setInsertionMode(tree.originalInsertionMode);
+ tree.insertionMode.processEndTag(name, attributes);
+ };
+
+ modes.inTableBody = Object.create(modes.base);
+
+ modes.inTableBody.start_tag_handlers = {
+ html: 'startTagHtml',
+ tr: 'startTagTr',
+ td: 'startTagTableCell',
+ th: 'startTagTableCell',
+ caption: 'startTagTableOther',
+ col: 'startTagTableOther',
+ colgroup: 'startTagTableOther',
+ tbody: 'startTagTableOther',
+ tfoot: 'startTagTableOther',
+ thead: 'startTagTableOther',
+ '-default': 'startTagOther'
+ };
+
+ modes.inTableBody.end_tag_handlers = {
+ table: 'endTagTable',
+ tbody: 'endTagTableRowGroup',
+ tfoot: 'endTagTableRowGroup',
+ thead: 'endTagTableRowGroup',
+ body: 'endTagIgnore',
+ caption: 'endTagIgnore',
+ col: 'endTagIgnore',
+ colgroup: 'endTagIgnore',
+ html: 'endTagIgnore',
+ td: 'endTagIgnore',
+ th: 'endTagIgnore',
+ tr: 'endTagIgnore',
+ '-default': 'endTagOther'
+ };
+
+ modes.inTableBody.processCharacters = function(data) {
+ modes.inTable.processCharacters(data);
+ };
+
+ modes.inTableBody.startTagTr = function(name, attributes) {
+ tree.openElements.popUntilTableBodyScopeMarker();
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inRow');
+ };
+
+ modes.inTableBody.startTagTableCell = function(name, attributes) {
+ tree.parseError("unexpected-cell-in-table-body", {name: name});
+ this.startTagTr('tr', []);
+ tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inTableBody.startTagTableOther = function(name, attributes) {
+ if (tree.openElements.inTableScope('tbody') || tree.openElements.inTableScope('thead') || tree.openElements.inTableScope('tfoot')) {
+ tree.openElements.popUntilTableBodyScopeMarker();
+ this.endTagTableRowGroup(tree.currentStackItem().localName);
+ tree.insertionMode.processStartTag(name, attributes);
+ } else {
+ tree.parseError('unexpected-start-tag', {name: name});
+ }
+ };
+
+ modes.inTableBody.startTagOther = function(name, attributes) {
+ modes.inTable.processStartTag(name, attributes);
+ };
+
+ modes.inTableBody.endTagTableRowGroup = function(name) {
+ if (tree.openElements.inTableScope(name)) {
+ tree.openElements.popUntilTableBodyScopeMarker();
+ tree.popElement();
+ tree.setInsertionMode('inTable');
+ } else {
+ tree.parseError('unexpected-end-tag-in-table-body', {name: name});
+ }
+ };
+
+ modes.inTableBody.endTagTable = function(name) {
+ if (tree.openElements.inTableScope('tbody') || tree.openElements.inTableScope('thead') || tree.openElements.inTableScope('tfoot')) {
+ tree.openElements.popUntilTableBodyScopeMarker();
+ this.endTagTableRowGroup(tree.currentStackItem().localName);
+ tree.insertionMode.processEndTag(name);
+ } else {
+ tree.parseError('unexpected-end-tag', {name: name});
+ }
+ };
+
+ modes.inTableBody.endTagIgnore = function(name) {
+ tree.parseError("unexpected-end-tag-in-table-body", {name: name});
+ };
+
+ modes.inTableBody.endTagOther = function(name) {
+ modes.inTable.processEndTag(name);
+ };
+
+ modes.inSelect = Object.create(modes.base);
+
+ modes.inSelect.start_tag_handlers = {
+ html: 'startTagHtml',
+ option: 'startTagOption',
+ optgroup: 'startTagOptgroup',
+ select: 'startTagSelect',
+ input: 'startTagInput',
+ keygen: 'startTagInput',
+ textarea: 'startTagInput',
+ script: 'startTagScript',
+ '-default': 'startTagOther'
+ };
+
+ modes.inSelect.end_tag_handlers = {
+ option: 'endTagOption',
+ optgroup: 'endTagOptgroup',
+ select: 'endTagSelect',
+ caption: 'endTagTableElements',
+ table: 'endTagTableElements',
+ tbody: 'endTagTableElements',
+ tfoot: 'endTagTableElements',
+ thead: 'endTagTableElements',
+ tr: 'endTagTableElements',
+ td: 'endTagTableElements',
+ th: 'endTagTableElements',
+ '-default': 'endTagOther'
+ };
+
+ modes.inSelect.processCharacters = function(buffer) {
+ var data = buffer.takeRemaining();
+ data = data.replace(/\u0000/g, function(match, index){
+ tree.parseError("invalid-codepoint");
+ return '';
+ });
+ if (!data)
+ return;
+ tree.insertText(data);
+ };
+
+ modes.inSelect.startTagOption = function(name, attributes) {
+ if (tree.currentStackItem().localName == 'option')
+ tree.popElement();
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inSelect.startTagOptgroup = function(name, attributes) {
+ if (tree.currentStackItem().localName == 'option')
+ tree.popElement();
+ if (tree.currentStackItem().localName == 'optgroup')
+ tree.popElement();
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inSelect.endTagOption = function(name) {
+ if (tree.currentStackItem().localName !== 'option') {
+ tree.parseError('unexpected-end-tag-in-select', {name: name});
+ return;
+ }
+ tree.popElement();
+ };
+
+ modes.inSelect.endTagOptgroup = function(name) {
+ if (tree.currentStackItem().localName == 'option' && tree.openElements.item(tree.openElements.length - 2).localName == 'optgroup') {
+ tree.popElement();
+ }
+ if (tree.currentStackItem().localName == 'optgroup') {
+ tree.popElement();
+ } else {
+ tree.parseError('unexpected-end-tag-in-select', {name: 'optgroup'});
+ }
+ };
+
+ modes.inSelect.startTagSelect = function(name) {
+ tree.parseError("unexpected-select-in-select");
+ this.endTagSelect('select');
+ };
+
+ modes.inSelect.endTagSelect = function(name) {
+ if (tree.openElements.inTableScope('select')) {
+ tree.openElements.popUntilPopped('select');
+ tree.resetInsertionMode();
+ } else {
+ tree.parseError('unexpected-end-tag', {name: name});
+ }
+ };
+
+ modes.inSelect.startTagInput = function(name, attributes) {
+ tree.parseError("unexpected-input-in-select");
+ if (tree.openElements.inSelectScope('select')) {
+ this.endTagSelect('select');
+ tree.insertionMode.processStartTag(name, attributes);
+ }
+ };
+
+ modes.inSelect.startTagScript = function(name, attributes) {
+ modes.inHead.processStartTag(name, attributes);
+ };
+
+ modes.inSelect.endTagTableElements = function(name) {
+ tree.parseError('unexpected-end-tag-in-select', {name: name});
+ if (tree.openElements.inTableScope(name)) {
+ this.endTagSelect('select');
+ tree.insertionMode.processEndTag(name);
+ }
+ };
+
+ modes.inSelect.startTagOther = function(name, attributes) {
+ tree.parseError("unexpected-start-tag-in-select", {name: name});
+ };
+
+ modes.inSelect.endTagOther = function(name) {
+ tree.parseError('unexpected-end-tag-in-select', {name: name});
+ };
+
+ modes.inSelectInTable = Object.create(modes.base);
+
+ modes.inSelectInTable.start_tag_handlers = {
+ caption: 'startTagTable',
+ table: 'startTagTable',
+ tbody: 'startTagTable',
+ tfoot: 'startTagTable',
+ thead: 'startTagTable',
+ tr: 'startTagTable',
+ td: 'startTagTable',
+ th: 'startTagTable',
+ '-default': 'startTagOther'
+ };
+
+ modes.inSelectInTable.end_tag_handlers = {
+ caption: 'endTagTable',
+ table: 'endTagTable',
+ tbody: 'endTagTable',
+ tfoot: 'endTagTable',
+ thead: 'endTagTable',
+ tr: 'endTagTable',
+ td: 'endTagTable',
+ th: 'endTagTable',
+ '-default': 'endTagOther'
+ };
+
+ modes.inSelectInTable.processCharacters = function(data) {
+ modes.inSelect.processCharacters(data);
+ };
+
+ modes.inSelectInTable.startTagTable = function(name, attributes) {
+ tree.parseError("unexpected-table-element-start-tag-in-select-in-table", {name: name});
+ this.endTagOther("select");
+ tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inSelectInTable.startTagOther = function(name, attributes, selfClosing) {
+ modes.inSelect.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inSelectInTable.endTagTable = function(name) {
+ tree.parseError("unexpected-table-element-end-tag-in-select-in-table", {name: name});
+ if (tree.openElements.inTableScope(name)) {
+ this.endTagOther("select");
+ tree.insertionMode.processEndTag(name);
+ }
+ };
+
+ modes.inSelectInTable.endTagOther = function(name) {
+ modes.inSelect.processEndTag(name);
+ };
+
+ modes.inRow = Object.create(modes.base);
+
+ modes.inRow.start_tag_handlers = {
+ html: 'startTagHtml',
+ td: 'startTagTableCell',
+ th: 'startTagTableCell',
+ caption: 'startTagTableOther',
+ col: 'startTagTableOther',
+ colgroup: 'startTagTableOther',
+ tbody: 'startTagTableOther',
+ tfoot: 'startTagTableOther',
+ thead: 'startTagTableOther',
+ tr: 'startTagTableOther',
+ '-default': 'startTagOther'
+ };
+
+ modes.inRow.end_tag_handlers = {
+ tr: 'endTagTr',
+ table: 'endTagTable',
+ tbody: 'endTagTableRowGroup',
+ tfoot: 'endTagTableRowGroup',
+ thead: 'endTagTableRowGroup',
+ body: 'endTagIgnore',
+ caption: 'endTagIgnore',
+ col: 'endTagIgnore',
+ colgroup: 'endTagIgnore',
+ html: 'endTagIgnore',
+ td: 'endTagIgnore',
+ th: 'endTagIgnore',
+ '-default': 'endTagOther'
+ };
+
+ modes.inRow.processCharacters = function(data) {
+ modes.inTable.processCharacters(data);
+ };
+
+ modes.inRow.startTagTableCell = function(name, attributes) {
+ tree.openElements.popUntilTableRowScopeMarker();
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inCell');
+ tree.activeFormattingElements.push(Marker);
+ };
+
+ modes.inRow.startTagTableOther = function(name, attributes) {
+ var ignoreEndTag = this.ignoreEndTagTr();
+ this.endTagTr('tr');
+ if (!ignoreEndTag) tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inRow.startTagOther = function(name, attributes, selfClosing) {
+ modes.inTable.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inRow.endTagTr = function(name) {
+ if (this.ignoreEndTagTr()) {
+ assert.ok(tree.context);
+ tree.parseError('unexpected-end-tag', {name: name});
+ } else {
+ tree.openElements.popUntilTableRowScopeMarker();
+ tree.popElement();
+ tree.setInsertionMode('inTableBody');
+ }
+ };
+
+ modes.inRow.endTagTable = function(name) {
+ var ignoreEndTag = this.ignoreEndTagTr();
+ this.endTagTr('tr');
+ if (!ignoreEndTag) tree.insertionMode.processEndTag(name);
+ };
+
+ modes.inRow.endTagTableRowGroup = function(name) {
+ if (tree.openElements.inTableScope(name)) {
+ this.endTagTr('tr');
+ tree.insertionMode.processEndTag(name);
+ } else {
+ tree.parseError('unexpected-end-tag', {name: name});
+ }
+ };
+
+ modes.inRow.endTagIgnore = function(name) {
+ tree.parseError("unexpected-end-tag-in-table-row", {name: name});
+ };
+
+ modes.inRow.endTagOther = function(name) {
+ modes.inTable.processEndTag(name);
+ };
+
+ modes.inRow.ignoreEndTagTr = function() {
+ return !tree.openElements.inTableScope('tr');
+ };
+
+ modes.afterAfterFrameset = Object.create(modes.base);
+
+ modes.afterAfterFrameset.start_tag_handlers = {
+ html: 'startTagHtml',
+ noframes: 'startTagNoFrames',
+ '-default': 'startTagOther'
+ };
+
+ modes.afterAfterFrameset.processEOF = function() {};
+
+ modes.afterAfterFrameset.processComment = function(data) {
+ tree.insertComment(data, tree.document);
+ };
+
+ modes.afterAfterFrameset.processCharacters = function(buffer) {
+ var characters = buffer.takeRemaining();
+ var whitespace = "";
+ for (var i = 0; i < characters.length; i++) {
+ var ch = characters[i];
+ if (isWhitespace(ch))
+ whitespace += ch;
+ }
+ if (whitespace) {
+ tree.reconstructActiveFormattingElements();
+ tree.insertText(whitespace);
+ }
+ if (whitespace.length < characters.length)
+ tree.parseError('expected-eof-but-got-char');
+ };
+
+ modes.afterAfterFrameset.startTagNoFrames = function(name, attributes) {
+ modes.inHead.processStartTag(name, attributes);
+ };
+
+ modes.afterAfterFrameset.startTagOther = function(name, attributes, selfClosing) {
+ tree.parseError('expected-eof-but-got-start-tag', {name: name});
+ };
+
+ modes.afterAfterFrameset.processEndTag = function(name, attributes) {
+ tree.parseError('expected-eof-but-got-end-tag', {name: name});
+ };
+
+ modes.text = Object.create(modes.base);
+
+ modes.text.start_tag_handlers = {
+ '-default': 'startTagOther'
+ };
+
+ modes.text.end_tag_handlers = {
+ script: 'endTagScript',
+ '-default': 'endTagOther'
+ };
+
+ modes.text.processCharacters = function(buffer) {
+ if (tree.shouldSkipLeadingNewline) {
+ tree.shouldSkipLeadingNewline = false;
+ buffer.skipAtMostOneLeadingNewline();
+ }
+ var data = buffer.takeRemaining();
+ if (!data)
+ return;
+ tree.insertText(data);
+ };
+
+ modes.text.processEOF = function() {
+ tree.parseError("expected-named-closing-tag-but-got-eof",
+ {name: tree.currentStackItem().localName});
+ tree.openElements.pop();
+ tree.setInsertionMode(tree.originalInsertionMode);
+ tree.insertionMode.processEOF();
+ };
+
+ modes.text.startTagOther = function(name) {
+ throw "Tried to process start tag " + name + " in RCDATA/RAWTEXT mode";
+ };
+
+ modes.text.endTagScript = function(name) {
+ var node = tree.openElements.pop();
+ assert.ok(node.localName == 'script');
+ tree.setInsertionMode(tree.originalInsertionMode);
+ };
+
+ modes.text.endTagOther = function(name) {
+ tree.openElements.pop();
+ tree.setInsertionMode(tree.originalInsertionMode);
+ };
+}
+
+TreeBuilder.prototype.setInsertionMode = function(name) {
+ this.insertionMode = this.insertionModes[name];
+ this.insertionModeName = name;
+};
+TreeBuilder.prototype.adoptionAgencyEndTag = function(name) {
+ var outerIterationLimit = 8;
+ var innerIterationLimit = 3;
+ var formattingElement;
+
+ function isActiveFormattingElement(el) {
+ return el === formattingElement;
+ }
+
+ var outerLoopCounter = 0;
+
+ while (outerLoopCounter++ < outerIterationLimit) {
+ formattingElement = this.elementInActiveFormattingElements(name);
+
+ if (!formattingElement || (this.openElements.contains(formattingElement) && !this.openElements.inScope(formattingElement.localName))) {
+ this.parseError('adoption-agency-1.1', {name: name});
+ return false;
+ }
+ if (!this.openElements.contains(formattingElement)) {
+ this.parseError('adoption-agency-1.2', {name: name});
+ this.removeElementFromActiveFormattingElements(formattingElement);
+ return true;
+ }
+ if (!this.openElements.inScope(formattingElement.localName)) {
+ this.parseError('adoption-agency-4.4', {name: name});
+ }
+
+ if (formattingElement != this.currentStackItem()) {
+ this.parseError('adoption-agency-1.3', {name: name});
+ }
+ var furthestBlock = this.openElements.furthestBlockForFormattingElement(formattingElement.node);
+
+ if (!furthestBlock) {
+ this.openElements.remove_openElements_until(isActiveFormattingElement);
+ this.removeElementFromActiveFormattingElements(formattingElement);
+ return true;
+ }
+
+ var afeIndex = this.openElements.elements.indexOf(formattingElement);
+ var commonAncestor = this.openElements.item(afeIndex - 1);
+
+ var bookmark = this.activeFormattingElements.indexOf(formattingElement);
+
+ var node = furthestBlock;
+ var lastNode = furthestBlock;
+ var index = this.openElements.elements.indexOf(node);
+
+ var innerLoopCounter = 0;
+ while (innerLoopCounter++ < innerIterationLimit) {
+ index -= 1;
+ node = this.openElements.item(index);
+ if (this.activeFormattingElements.indexOf(node) < 0) {
+ this.openElements.elements.splice(index, 1);
+ continue;
+ }
+ if (node == formattingElement)
+ break;
+
+ if (lastNode == furthestBlock)
+ bookmark = this.activeFormattingElements.indexOf(node) + 1;
+
+ var clone = this.createElement(node.namespaceURI, node.localName, node.attributes);
+ var newNode = new StackItem(node.namespaceURI, node.localName, node.attributes, clone);
+
+ this.activeFormattingElements[this.activeFormattingElements.indexOf(node)] = newNode;
+ this.openElements.elements[this.openElements.elements.indexOf(node)] = newNode;
+
+ node = newNode;
+ this.detachFromParent(lastNode.node);
+ this.attachNode(lastNode.node, node.node);
+ lastNode = node;
+ }
+
+ this.detachFromParent(lastNode.node);
+ if (commonAncestor.isFosterParenting()) {
+ this.insertIntoFosterParent(lastNode.node);
+ } else {
+ this.attachNode(lastNode.node, commonAncestor.node);
+ }
+
+ var clone = this.createElement("http://www.w3.org/1999/xhtml", formattingElement.localName, formattingElement.attributes);
+ var formattingClone = new StackItem(formattingElement.namespaceURI, formattingElement.localName, formattingElement.attributes, clone);
+
+ this.reparentChildren(furthestBlock.node, clone);
+ this.attachNode(clone, furthestBlock.node);
+
+ this.removeElementFromActiveFormattingElements(formattingElement);
+ this.activeFormattingElements.splice(Math.min(bookmark, this.activeFormattingElements.length), 0, formattingClone);
+
+ this.openElements.remove(formattingElement);
+ this.openElements.elements.splice(this.openElements.elements.indexOf(furthestBlock) + 1, 0, formattingClone);
+ }
+
+ return true;
+};
+
+TreeBuilder.prototype.start = function() {
+ throw "Not mplemented";
+};
+
+TreeBuilder.prototype.startTokenization = function(tokenizer) {
+ this.tokenizer = tokenizer;
+ this.compatMode = "no quirks";
+ this.originalInsertionMode = "initial";
+ this.framesetOk = true;
+ this.openElements = new ElementStack();
+ this.activeFormattingElements = [];
+ this.start();
+ if (this.context) {
+ switch(this.context) {
+ case 'title':
+ case 'textarea':
+ this.tokenizer.setState(Tokenizer.RCDATA);
+ break;
+ case 'style':
+ case 'xmp':
+ case 'iframe':
+ case 'noembed':
+ case 'noframes':
+ this.tokenizer.setState(Tokenizer.RAWTEXT);
+ break;
+ case 'script':
+ this.tokenizer.setState(Tokenizer.SCRIPT_DATA);
+ break;
+ case 'noscript':
+ if (this.scriptingEnabled)
+ this.tokenizer.setState(Tokenizer.RAWTEXT);
+ break;
+ case 'plaintext':
+ this.tokenizer.setState(Tokenizer.PLAINTEXT);
+ break;
+ }
+ this.insertHtmlElement();
+ this.resetInsertionMode();
+ } else {
+ this.setInsertionMode('initial');
+ }
+};
+
+TreeBuilder.prototype.processToken = function(token) {
+ this.selfClosingFlagAcknowledged = false;
+
+ var currentNode = this.openElements.top || null;
+ var insertionMode;
+ if (!currentNode || !currentNode.isForeign() ||
+ (currentNode.isMathMLTextIntegrationPoint() &&
+ ((token.type == 'StartTag' &&
+ !(token.name in {mglyph:0, malignmark:0})) ||
+ (token.type === 'Characters'))
+ ) ||
+ (currentNode.namespaceURI == "http://www.w3.org/1998/Math/MathML" &&
+ currentNode.localName == 'annotation-xml' &&
+ token.type == 'StartTag' && token.name == 'svg'
+ ) ||
+ (currentNode.isHtmlIntegrationPoint() &&
+ token.type in {StartTag:0, Characters:0}
+ ) ||
+ token.type == 'EOF'
+ ) {
+ insertionMode = this.insertionMode;
+ } else {
+ insertionMode = this.insertionModes.inForeignContent;
+ }
+ switch(token.type) {
+ case 'Characters':
+ var buffer = new CharacterBuffer(token.data);
+ insertionMode.processCharacters(buffer);
+ break;
+ case 'Comment':
+ insertionMode.processComment(token.data);
+ break;
+ case 'StartTag':
+ insertionMode.processStartTag(token.name, token.data, token.selfClosing);
+ break;
+ case 'EndTag':
+ insertionMode.processEndTag(token.name);
+ break;
+ case 'Doctype':
+ insertionMode.processDoctype(token.name, token.publicId, token.systemId, token.forceQuirks);
+ break;
+ case 'EOF':
+ insertionMode.processEOF();
+ break;
+ }
+};
+TreeBuilder.prototype.isCdataSectionAllowed = function() {
+ return this.openElements.length > 0 && this.currentStackItem().isForeign();
+};
+TreeBuilder.prototype.isSelfClosingFlagAcknowledged = function() {
+ return this.selfClosingFlagAcknowledged;
+};
+
+TreeBuilder.prototype.createElement = function(namespaceURI, localName, attributes) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.attachNode = function(child, parent) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.attachNodeToFosterParent = function(child, table, stackParent) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.detachFromParent = function(node) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.addAttributesToElement = function(element, attributes) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.insertHtmlElement = function(attributes) {
+ var root = this.createElement("http://www.w3.org/1999/xhtml", 'html', attributes);
+ this.attachNode(root, this.document);
+ this.openElements.pushHtmlElement(new StackItem("http://www.w3.org/1999/xhtml", 'html', attributes, root));
+ return root;
+};
+
+TreeBuilder.prototype.insertHeadElement = function(attributes) {
+ var element = this.createElement("http://www.w3.org/1999/xhtml", "head", attributes);
+ this.head = new StackItem("http://www.w3.org/1999/xhtml", "head", attributes, element);
+ this.attachNode(element, this.openElements.top.node);
+ this.openElements.pushHeadElement(this.head);
+ return element;
+};
+
+TreeBuilder.prototype.insertBodyElement = function(attributes) {
+ var element = this.createElement("http://www.w3.org/1999/xhtml", "body", attributes);
+ this.attachNode(element, this.openElements.top.node);
+ this.openElements.pushBodyElement(new StackItem("http://www.w3.org/1999/xhtml", "body", attributes, element));
+ return element;
+};
+
+TreeBuilder.prototype.insertIntoFosterParent = function(node) {
+ var tableIndex = this.openElements.findIndex('table');
+ var tableElement = this.openElements.item(tableIndex).node;
+ if (tableIndex === 0)
+ return this.attachNode(node, tableElement);
+ this.attachNodeToFosterParent(node, tableElement, this.openElements.item(tableIndex - 1).node);
+};
+
+TreeBuilder.prototype.insertElement = function(name, attributes, namespaceURI, selfClosing) {
+ if (!namespaceURI)
+ namespaceURI = "http://www.w3.org/1999/xhtml";
+ var element = this.createElement(namespaceURI, name, attributes);
+ if (this.shouldFosterParent())
+ this.insertIntoFosterParent(element);
+ else
+ this.attachNode(element, this.openElements.top.node);
+ if (!selfClosing)
+ this.openElements.push(new StackItem(namespaceURI, name, attributes, element));
+};
+
+TreeBuilder.prototype.insertFormattingElement = function(name, attributes) {
+ this.insertElement(name, attributes, "http://www.w3.org/1999/xhtml");
+ this.appendElementToActiveFormattingElements(this.currentStackItem());
+};
+
+TreeBuilder.prototype.insertSelfClosingElement = function(name, attributes) {
+ this.selfClosingFlagAcknowledged = true;
+ this.insertElement(name, attributes, "http://www.w3.org/1999/xhtml", true);
+};
+
+TreeBuilder.prototype.insertForeignElement = function(name, attributes, namespaceURI, selfClosing) {
+ if (selfClosing)
+ this.selfClosingFlagAcknowledged = true;
+ this.insertElement(name, attributes, namespaceURI, selfClosing);
+};
+
+TreeBuilder.prototype.insertComment = function(data, parent) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.insertDoctype = function(name, publicId, systemId) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.insertText = function(data) {
+ throw new Error("Not implemented");
+};
+TreeBuilder.prototype.currentStackItem = function() {
+ return this.openElements.top;
+};
+TreeBuilder.prototype.popElement = function() {
+ return this.openElements.pop();
+};
+TreeBuilder.prototype.shouldFosterParent = function() {
+ return this.redirectAttachToFosterParent && this.currentStackItem().isFosterParenting();
+};
+TreeBuilder.prototype.generateImpliedEndTags = function(exclude) {
+ var name = this.openElements.top.localName;
+ if (['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'].indexOf(name) != -1 && name != exclude) {
+ this.popElement();
+ this.generateImpliedEndTags(exclude);
+ }
+};
+TreeBuilder.prototype.reconstructActiveFormattingElements = function() {
+ if (this.activeFormattingElements.length === 0)
+ return;
+ var i = this.activeFormattingElements.length - 1;
+ var entry = this.activeFormattingElements[i];
+ if (entry == Marker || this.openElements.contains(entry))
+ return;
+
+ while (entry != Marker && !this.openElements.contains(entry)) {
+ i -= 1;
+ entry = this.activeFormattingElements[i];
+ if (!entry)
+ break;
+ }
+
+ while (true) {
+ i += 1;
+ entry = this.activeFormattingElements[i];
+ this.insertElement(entry.localName, entry.attributes);
+ var element = this.currentStackItem();
+ this.activeFormattingElements[i] = element;
+ if (element == this.activeFormattingElements[this.activeFormattingElements.length -1])
+ break;
+ }
+
+};
+TreeBuilder.prototype.ensureNoahsArkCondition = function(item) {
+ var kNoahsArkCapacity = 3;
+ if (this.activeFormattingElements.length < kNoahsArkCapacity)
+ return;
+ var candidates = [];
+ var newItemAttributeCount = item.attributes.length;
+ for (var i = this.activeFormattingElements.length - 1; i >= 0; i--) {
+ var candidate = this.activeFormattingElements[i];
+ if (candidate === Marker)
+ break;
+ if (item.localName !== candidate.localName || item.namespaceURI !== candidate.namespaceURI)
+ continue;
+ if (candidate.attributes.length != newItemAttributeCount)
+ continue;
+ candidates.push(candidate);
+ }
+ if (candidates.length < kNoahsArkCapacity)
+ return;
+
+ var remainingCandidates = [];
+ var attributes = item.attributes;
+ for (var i = 0; i < attributes.length; i++) {
+ var attribute = attributes[i];
+
+ for (var j = 0; j < candidates.length; j++) {
+ var candidate = candidates[j];
+ var candidateAttribute = getAttribute(candidate, attribute.nodeName);
+ if (candidateAttribute && candidateAttribute.nodeValue === attribute.nodeValue)
+ remainingCandidates.push(candidate);
+ }
+ if (remainingCandidates.length < kNoahsArkCapacity)
+ return;
+ candidates = remainingCandidates;
+ remainingCandidates = [];
+ }
+ for (var i = kNoahsArkCapacity - 1; i < candidates.length; i++)
+ this.removeElementFromActiveFormattingElements(candidates[i]);
+};
+TreeBuilder.prototype.appendElementToActiveFormattingElements = function(item) {
+ this.ensureNoahsArkCondition(item);
+ this.activeFormattingElements.push(item);
+};
+TreeBuilder.prototype.removeElementFromActiveFormattingElements = function(item) {
+ var index = this.activeFormattingElements.indexOf(item);
+ if (index >= 0)
+ this.activeFormattingElements.splice(index, 1);
+};
+
+TreeBuilder.prototype.elementInActiveFormattingElements = function(name) {
+ var els = this.activeFormattingElements;
+ for (var i = els.length - 1; i >= 0; i--) {
+ if (els[i] == Marker) break;
+ if (els[i].localName == name) return els[i];
+ }
+ return false;
+};
+
+TreeBuilder.prototype.clearActiveFormattingElements = function() {
+ while (!(this.activeFormattingElements.length === 0 || this.activeFormattingElements.pop() == Marker));
+};
+
+TreeBuilder.prototype.reparentChildren = function(oldParent, newParent) {
+ throw new Error("Not implemented");
+};
+TreeBuilder.prototype.setFragmentContext = function(context) {
+ this.context = context;
+};
+TreeBuilder.prototype.parseError = function(code, args) {
+ if (!this.errorHandler)
+ return;
+ var message = formatMessage(messages[code], args);
+ this.errorHandler.error(message, this.tokenizer._inputStream.location(), code);
+};
+TreeBuilder.prototype.resetInsertionMode = function() {
+ var last = false;
+ var node = null;
+ for (var i = this.openElements.length - 1; i >= 0; i--) {
+ node = this.openElements.item(i);
+ if (i === 0) {
+ assert.ok(this.context);
+ last = true;
+ node = new StackItem("http://www.w3.org/1999/xhtml", this.context, [], null);
+ }
+
+ if (node.namespaceURI === "http://www.w3.org/1999/xhtml") {
+ if (node.localName === 'select')
+ return this.setInsertionMode('inSelect');
+ if (node.localName === 'td' || node.localName === 'th')
+ return this.setInsertionMode('inCell');
+ if (node.localName === 'tr')
+ return this.setInsertionMode('inRow');
+ if (node.localName === 'tbody' || node.localName === 'thead' || node.localName === 'tfoot')
+ return this.setInsertionMode('inTableBody');
+ if (node.localName === 'caption')
+ return this.setInsertionMode('inCaption');
+ if (node.localName === 'colgroup')
+ return this.setInsertionMode('inColumnGroup');
+ if (node.localName === 'table')
+ return this.setInsertionMode('inTable');
+ if (node.localName === 'head' && !last)
+ return this.setInsertionMode('inHead');
+ if (node.localName === 'body')
+ return this.setInsertionMode('inBody');
+ if (node.localName === 'frameset')
+ return this.setInsertionMode('inFrameset');
+ if (node.localName === 'html')
+ if (!this.openElements.headElement)
+ return this.setInsertionMode('beforeHead');
+ else
+ return this.setInsertionMode('afterHead');
+ }
+
+ if (last)
+ return this.setInsertionMode('inBody');
+ }
+};
+
+TreeBuilder.prototype.processGenericRCDATAStartTag = function(name, attributes) {
+ this.insertElement(name, attributes);
+ this.tokenizer.setState(Tokenizer.RCDATA);
+ this.originalInsertionMode = this.insertionModeName;
+ this.setInsertionMode('text');
+};
+
+TreeBuilder.prototype.processGenericRawTextStartTag = function(name, attributes) {
+ this.insertElement(name, attributes);
+ this.tokenizer.setState(Tokenizer.RAWTEXT);
+ this.originalInsertionMode = this.insertionModeName;
+ this.setInsertionMode('text');
+};
+
+TreeBuilder.prototype.adjustMathMLAttributes = function(attributes) {
+ attributes.forEach(function(a) {
+ a.namespaceURI = "http://www.w3.org/1998/Math/MathML";
+ if (constants.MATHMLAttributeMap[a.nodeName])
+ a.nodeName = constants.MATHMLAttributeMap[a.nodeName];
+ });
+ return attributes;
+};
+
+TreeBuilder.prototype.adjustSVGTagNameCase = function(name) {
+ return constants.SVGTagMap[name] || name;
+};
+
+TreeBuilder.prototype.adjustSVGAttributes = function(attributes) {
+ attributes.forEach(function(a) {
+ a.namespaceURI = "http://www.w3.org/2000/svg";
+ if (constants.SVGAttributeMap[a.nodeName])
+ a.nodeName = constants.SVGAttributeMap[a.nodeName];
+ });
+ return attributes;
+};
+
+TreeBuilder.prototype.adjustForeignAttributes = function(attributes) {
+ for (var i = 0; i < attributes.length; i++) {
+ var attribute = attributes[i];
+ var adjusted = constants.ForeignAttributeMap[attribute.nodeName];
+ if (adjusted) {
+ attribute.nodeName = adjusted.localName;
+ attribute.prefix = adjusted.prefix;
+ attribute.namespaceURI = adjusted.namespaceURI;
+ }
+ }
+ return attributes;
+};
+
+function formatMessage(format, args) {
+ return format.replace(new RegExp('{[0-9a-z-]+}', 'gi'), function(match) {
+ return args[match.slice(1, -1)] || match;
+ });
+}
+
+exports.TreeBuilder = TreeBuilder;
+
+},
+{"./ElementStack":1,"./StackItem":4,"./Tokenizer":5,"./constants":7,"./messages.json":8,"assert":13,"events":16}],
+7:[function(_dereq_,module,exports){
+exports.SVGTagMap = {
+ "altglyph": "altGlyph",
+ "altglyphdef": "altGlyphDef",
+ "altglyphitem": "altGlyphItem",
+ "animatecolor": "animateColor",
+ "animatemotion": "animateMotion",
+ "animatetransform": "animateTransform",
+ "clippath": "clipPath",
+ "feblend": "feBlend",
+ "fecolormatrix": "feColorMatrix",
+ "fecomponenttransfer": "feComponentTransfer",
+ "fecomposite": "feComposite",
+ "feconvolvematrix": "feConvolveMatrix",
+ "fediffuselighting": "feDiffuseLighting",
+ "fedisplacementmap": "feDisplacementMap",
+ "fedistantlight": "feDistantLight",
+ "feflood": "feFlood",
+ "fefunca": "feFuncA",
+ "fefuncb": "feFuncB",
+ "fefuncg": "feFuncG",
+ "fefuncr": "feFuncR",
+ "fegaussianblur": "feGaussianBlur",
+ "feimage": "feImage",
+ "femerge": "feMerge",
+ "femergenode": "feMergeNode",
+ "femorphology": "feMorphology",
+ "feoffset": "feOffset",
+ "fepointlight": "fePointLight",
+ "fespecularlighting": "feSpecularLighting",
+ "fespotlight": "feSpotLight",
+ "fetile": "feTile",
+ "feturbulence": "feTurbulence",
+ "foreignobject": "foreignObject",
+ "glyphref": "glyphRef",
+ "lineargradient": "linearGradient",
+ "radialgradient": "radialGradient",
+ "textpath": "textPath"
+};
+
+exports.MATHMLAttributeMap = {
+ definitionurl: 'definitionURL'
+};
+
+exports.SVGAttributeMap = {
+ attributename: 'attributeName',
+ attributetype: 'attributeType',
+ basefrequency: 'baseFrequency',
+ baseprofile: 'baseProfile',
+ calcmode: 'calcMode',
+ clippathunits: 'clipPathUnits',
+ contentscripttype: 'contentScriptType',
+ contentstyletype: 'contentStyleType',
+ diffuseconstant: 'diffuseConstant',
+ edgemode: 'edgeMode',
+ externalresourcesrequired: 'externalResourcesRequired',
+ filterres: 'filterRes',
+ filterunits: 'filterUnits',
+ glyphref: 'glyphRef',
+ gradienttransform: 'gradientTransform',
+ gradientunits: 'gradientUnits',
+ kernelmatrix: 'kernelMatrix',
+ kernelunitlength: 'kernelUnitLength',
+ keypoints: 'keyPoints',
+ keysplines: 'keySplines',
+ keytimes: 'keyTimes',
+ lengthadjust: 'lengthAdjust',
+ limitingconeangle: 'limitingConeAngle',
+ markerheight: 'markerHeight',
+ markerunits: 'markerUnits',
+ markerwidth: 'markerWidth',
+ maskcontentunits: 'maskContentUnits',
+ maskunits: 'maskUnits',
+ numoctaves: 'numOctaves',
+ pathlength: 'pathLength',
+ patterncontentunits: 'patternContentUnits',
+ patterntransform: 'patternTransform',
+ patternunits: 'patternUnits',
+ pointsatx: 'pointsAtX',
+ pointsaty: 'pointsAtY',
+ pointsatz: 'pointsAtZ',
+ preservealpha: 'preserveAlpha',
+ preserveaspectratio: 'preserveAspectRatio',
+ primitiveunits: 'primitiveUnits',
+ refx: 'refX',
+ refy: 'refY',
+ repeatcount: 'repeatCount',
+ repeatdur: 'repeatDur',
+ requiredextensions: 'requiredExtensions',
+ requiredfeatures: 'requiredFeatures',
+ specularconstant: 'specularConstant',
+ specularexponent: 'specularExponent',
+ spreadmethod: 'spreadMethod',
+ startoffset: 'startOffset',
+ stddeviation: 'stdDeviation',
+ stitchtiles: 'stitchTiles',
+ surfacescale: 'surfaceScale',
+ systemlanguage: 'systemLanguage',
+ tablevalues: 'tableValues',
+ targetx: 'targetX',
+ targety: 'targetY',
+ textlength: 'textLength',
+ viewbox: 'viewBox',
+ viewtarget: 'viewTarget',
+ xchannelselector: 'xChannelSelector',
+ ychannelselector: 'yChannelSelector',
+ zoomandpan: 'zoomAndPan'
+};
+
+exports.ForeignAttributeMap = {
+ "xlink:actuate": {prefix: "xlink", localName: "actuate", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xlink:arcrole": {prefix: "xlink", localName: "arcrole", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xlink:href": {prefix: "xlink", localName: "href", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xlink:role": {prefix: "xlink", localName: "role", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xlink:show": {prefix: "xlink", localName: "show", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xlink:title": {prefix: "xlink", localName: "title", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xlink:type": {prefix: "xlink", localName: "title", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xml:base": {prefix: "xml", localName: "base", namespaceURI: "http://www.w3.org/XML/1998/namespace"},
+ "xml:lang": {prefix: "xml", localName: "lang", namespaceURI: "http://www.w3.org/XML/1998/namespace"},
+ "xml:space": {prefix: "xml", localName: "space", namespaceURI: "http://www.w3.org/XML/1998/namespace"},
+ "xmlns": {prefix: null, localName: "xmlns", namespaceURI: "http://www.w3.org/2000/xmlns/"},
+ "xmlns:xlink": {prefix: "xmlns", localName: "xlink", namespaceURI: "http://www.w3.org/2000/xmlns/"},
+};
+},
+{}],
+8:[function(_dereq_,module,exports){
+module.exports={
+ "null-character":
+ "Null character in input stream, replaced with U+FFFD.",
+ "invalid-codepoint":
+ "Invalid codepoint in stream",
+ "incorrectly-placed-solidus":
+ "Solidus (/) incorrectly placed in tag.",
+ "incorrect-cr-newline-entity":
+ "Incorrect CR newline entity, replaced with LF.",
+ "illegal-windows-1252-entity":
+ "Entity used with illegal number (windows-1252 reference).",
+ "cant-convert-numeric-entity":
+ "Numeric entity couldn't be converted to character (codepoint U+{charAsInt}).",
+ "invalid-numeric-entity-replaced":
+ "Numeric entity represents an illegal codepoint. Expanded to the C1 controls range.",
+ "numeric-entity-without-semicolon":
+ "Numeric entity didn't end with ';'.",
+ "expected-numeric-entity-but-got-eof":
+ "Numeric entity expected. Got end of file instead.",
+ "expected-numeric-entity":
+ "Numeric entity expected but none found.",
+ "named-entity-without-semicolon":
+ "Named entity didn't end with ';'.",
+ "expected-named-entity":
+ "Named entity expected. Got none.",
+ "attributes-in-end-tag":
+ "End tag contains unexpected attributes.",
+ "self-closing-flag-on-end-tag":
+ "End tag contains unexpected self-closing flag.",
+ "bare-less-than-sign-at-eof":
+ "End of file after <.",
+ "expected-tag-name-but-got-right-bracket":
+ "Expected tag name. Got '>' instead.",
+ "expected-tag-name-but-got-question-mark":
+ "Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)",
+ "expected-tag-name":
+ "Expected tag name. Got something else instead.",
+ "expected-closing-tag-but-got-right-bracket":
+ "Expected closing tag. Got '>' instead. Ignoring '</>'.",
+ "expected-closing-tag-but-got-eof":
+ "Expected closing tag. Unexpected end of file.",
+ "expected-closing-tag-but-got-char":
+ "Expected closing tag. Unexpected character '{data}' found.",
+ "eof-in-tag-name":
+ "Unexpected end of file in the tag name.",
+ "expected-attribute-name-but-got-eof":
+ "Unexpected end of file. Expected attribute name instead.",
+ "eof-in-attribute-name":
+ "Unexpected end of file in attribute name.",
+ "invalid-character-in-attribute-name":
+ "Invalid character in attribute name.",
+ "duplicate-attribute":
+ "Dropped duplicate attribute '{name}' on tag.",
+ "expected-end-of-tag-but-got-eof":
+ "Unexpected end of file. Expected = or end of tag.",
+ "expected-attribute-value-but-got-eof":
+ "Unexpected end of file. Expected attribute value.",
+ "expected-attribute-value-but-got-right-bracket":
+ "Expected attribute value. Got '>' instead.",
+ "unexpected-character-in-unquoted-attribute-value":
+ "Unexpected character in unquoted attribute",
+ "invalid-character-after-attribute-name":
+ "Unexpected character after attribute name.",
+ "unexpected-character-after-attribute-value":
+ "Unexpected character after attribute value.",
+ "eof-in-attribute-value-double-quote":
+ "Unexpected end of file in attribute value (\").",
+ "eof-in-attribute-value-single-quote":
+ "Unexpected end of file in attribute value (').",
+ "eof-in-attribute-value-no-quotes":
+ "Unexpected end of file in attribute value.",
+ "eof-after-attribute-value":
+ "Unexpected end of file after attribute value.",
+ "unexpected-eof-after-solidus-in-tag":
+ "Unexpected end of file in tag. Expected >.",
+ "unexpected-character-after-solidus-in-tag":
+ "Unexpected character after / in tag. Expected >.",
+ "expected-dashes-or-doctype":
+ "Expected '--' or 'DOCTYPE'. Not found.",
+ "unexpected-bang-after-double-dash-in-comment":
+ "Unexpected ! after -- in comment.",
+ "incorrect-comment":
+ "Incorrect comment.",
+ "eof-in-comment":
+ "Unexpected end of file in comment.",
+ "eof-in-comment-end-dash":
+ "Unexpected end of file in comment (-).",
+ "unexpected-dash-after-double-dash-in-comment":
+ "Unexpected '-' after '--' found in comment.",
+ "eof-in-comment-double-dash":
+ "Unexpected end of file in comment (--).",
+ "eof-in-comment-end-bang-state":
+ "Unexpected end of file in comment.",
+ "unexpected-char-in-comment":
+ "Unexpected character in comment found.",
+ "need-space-after-doctype":
+ "No space after literal string 'DOCTYPE'.",
+ "expected-doctype-name-but-got-right-bracket":
+ "Unexpected > character. Expected DOCTYPE name.",
+ "expected-doctype-name-but-got-eof":
+ "Unexpected end of file. Expected DOCTYPE name.",
+ "eof-in-doctype-name":
+ "Unexpected end of file in DOCTYPE name.",
+ "eof-in-doctype":
+ "Unexpected end of file in DOCTYPE.",
+ "expected-space-or-right-bracket-in-doctype":
+ "Expected space or '>'. Got '{data}'.",
+ "unexpected-end-of-doctype":
+ "Unexpected end of DOCTYPE.",
+ "unexpected-char-in-doctype":
+ "Unexpected character in DOCTYPE.",
+ "eof-in-bogus-doctype":
+ "Unexpected end of file in bogus doctype.",
+ "eof-in-innerhtml":
+ "Unexpected EOF in inner html mode.",
+ "unexpected-doctype":
+ "Unexpected DOCTYPE. Ignored.",
+ "non-html-root":
+ "html needs to be the first start tag.",
+ "expected-doctype-but-got-eof":
+ "Unexpected End of file. Expected DOCTYPE.",
+ "unknown-doctype":
+ "Erroneous DOCTYPE. Expected <!DOCTYPE html>.",
+ "quirky-doctype":
+ "Quirky doctype. Expected <!DOCTYPE html>.",
+ "almost-standards-doctype":
+ "Almost standards mode doctype. Expected <!DOCTYPE html>.",
+ "obsolete-doctype":
+ "Obsolete doctype. Expected <!DOCTYPE html>.",
+ "expected-doctype-but-got-chars":
+ "Non-space characters found without seeing a doctype first. Expected e.g. <!DOCTYPE html>.",
+ "expected-doctype-but-got-start-tag":
+ "Start tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>.",
+ "expected-doctype-but-got-end-tag":
+ "End tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>.",
+ "end-tag-after-implied-root":
+ "Unexpected end tag ({name}) after the (implied) root element.",
+ "expected-named-closing-tag-but-got-eof":
+ "Unexpected end of file. Expected end tag ({name}).",
+ "two-heads-are-not-better-than-one":
+ "Unexpected start tag head in existing head. Ignored.",
+ "unexpected-end-tag":
+ "Unexpected end tag ({name}). Ignored.",
+ "unexpected-implied-end-tag":
+ "End tag {name} implied, but there were open elements.",
+ "unexpected-start-tag-out-of-my-head":
+ "Unexpected start tag ({name}) that can be in head. Moved.",
+ "unexpected-start-tag":
+ "Unexpected start tag ({name}).",
+ "missing-end-tag":
+ "Missing end tag ({name}).",
+ "missing-end-tags":
+ "Missing end tags ({name}).",
+ "unexpected-start-tag-implies-end-tag":
+ "Unexpected start tag ({startName}) implies end tag ({endName}).",
+ "unexpected-start-tag-treated-as":
+ "Unexpected start tag ({originalName}). Treated as {newName}.",
+ "deprecated-tag":
+ "Unexpected start tag {name}. Don't use it!",
+ "unexpected-start-tag-ignored":
+ "Unexpected start tag {name}. Ignored.",
+ "expected-one-end-tag-but-got-another":
+ "Unexpected end tag ({gotName}). Missing end tag ({expectedName}).",
+ "end-tag-too-early":
+ "End tag ({name}) seen too early. Expected other end tag.",
+ "end-tag-too-early-named":
+ "Unexpected end tag ({gotName}). Expected end tag ({expectedName}.",
+ "end-tag-too-early-ignored":
+ "End tag ({name}) seen too early. Ignored.",
+ "adoption-agency-1.1":
+ "End tag ({name}) violates step 1, paragraph 1 of the adoption agency algorithm.",
+ "adoption-agency-1.2":
+ "End tag ({name}) violates step 1, paragraph 2 of the adoption agency algorithm.",
+ "adoption-agency-1.3":
+ "End tag ({name}) violates step 1, paragraph 3 of the adoption agency algorithm.",
+ "adoption-agency-4.4":
+ "End tag ({name}) violates step 4, paragraph 4 of the adoption agency algorithm.",
+ "unexpected-end-tag-treated-as":
+ "Unexpected end tag ({originalName}). Treated as {newName}.",
+ "no-end-tag":
+ "This element ({name}) has no end tag.",
+ "unexpected-implied-end-tag-in-table":
+ "Unexpected implied end tag ({name}) in the table phase.",
+ "unexpected-implied-end-tag-in-table-body":
+ "Unexpected implied end tag ({name}) in the table body phase.",
+ "unexpected-char-implies-table-voodoo":
+ "Unexpected non-space characters in table context caused voodoo mode.",
+ "unexpected-hidden-input-in-table":
+ "Unexpected input with type hidden in table context.",
+ "unexpected-form-in-table":
+ "Unexpected form in table context.",
+ "unexpected-start-tag-implies-table-voodoo":
+ "Unexpected start tag ({name}) in table context caused voodoo mode.",
+ "unexpected-end-tag-implies-table-voodoo":
+ "Unexpected end tag ({name}) in table context caused voodoo mode.",
+ "unexpected-cell-in-table-body":
+ "Unexpected table cell start tag ({name}) in the table body phase.",
+ "unexpected-cell-end-tag":
+ "Got table cell end tag ({name}) while required end tags are missing.",
+ "unexpected-end-tag-in-table-body":
+ "Unexpected end tag ({name}) in the table body phase. Ignored.",
+ "unexpected-implied-end-tag-in-table-row":
+ "Unexpected implied end tag ({name}) in the table row phase.",
+ "unexpected-end-tag-in-table-row":
+ "Unexpected end tag ({name}) in the table row phase. Ignored.",
+ "unexpected-select-in-select":
+ "Unexpected select start tag in the select phase treated as select end tag.",
+ "unexpected-input-in-select":
+ "Unexpected input start tag in the select phase.",
+ "unexpected-start-tag-in-select":
+ "Unexpected start tag token ({name}) in the select phase. Ignored.",
+ "unexpected-end-tag-in-select":
+ "Unexpected end tag ({name}) in the select phase. Ignored.",
+ "unexpected-table-element-start-tag-in-select-in-table":
+ "Unexpected table element start tag ({name}) in the select in table phase.",
+ "unexpected-table-element-end-tag-in-select-in-table":
+ "Unexpected table element end tag ({name}) in the select in table phase.",
+ "unexpected-char-after-body":
+ "Unexpected non-space characters in the after body phase.",
+ "unexpected-start-tag-after-body":
+ "Unexpected start tag token ({name}) in the after body phase.",
+ "unexpected-end-tag-after-body":
+ "Unexpected end tag token ({name}) in the after body phase.",
+ "unexpected-char-in-frameset":
+ "Unepxected characters in the frameset phase. Characters ignored.",
+ "unexpected-start-tag-in-frameset":
+ "Unexpected start tag token ({name}) in the frameset phase. Ignored.",
+ "unexpected-frameset-in-frameset-innerhtml":
+ "Unexpected end tag token (frameset in the frameset phase (innerHTML).",
+ "unexpected-end-tag-in-frameset":
+ "Unexpected end tag token ({name}) in the frameset phase. Ignored.",
+ "unexpected-char-after-frameset":
+ "Unexpected non-space characters in the after frameset phase. Ignored.",
+ "unexpected-start-tag-after-frameset":
+ "Unexpected start tag ({name}) in the after frameset phase. Ignored.",
+ "unexpected-end-tag-after-frameset":
+ "Unexpected end tag ({name}) in the after frameset phase. Ignored.",
+ "expected-eof-but-got-char":
+ "Unexpected non-space characters. Expected end of file.",
+ "expected-eof-but-got-start-tag":
+ "Unexpected start tag ({name}). Expected end of file.",
+ "expected-eof-but-got-end-tag":
+ "Unexpected end tag ({name}). Expected end of file.",
+ "unexpected-end-table-in-caption":
+ "Unexpected end table tag in caption. Generates implied end caption.",
+ "end-html-in-innerhtml":
+ "Unexpected html end tag in inner html mode.",
+ "eof-in-table":
+ "Unexpected end of file. Expected table content.",
+ "eof-in-script":
+ "Unexpected end of file. Expected script content.",
+ "non-void-element-with-trailing-solidus":
+ "Trailing solidus not allowed on element {name}.",
+ "unexpected-html-element-in-foreign-content":
+ "HTML start tag \"{name}\" in a foreign namespace context.",
+ "unexpected-start-tag-in-table":
+ "Unexpected {name}. Expected table content."
+}
+},
+{}],
+9:[function(_dereq_,module,exports){
+var SAXTreeBuilder = _dereq_('./SAXTreeBuilder').SAXTreeBuilder;
+var Tokenizer = _dereq_('../Tokenizer').Tokenizer;
+var TreeParser = _dereq_('./TreeParser').TreeParser;
+
+function SAXParser() {
+ this.contentHandler = null;
+ this._errorHandler = null;
+ this._treeBuilder = new SAXTreeBuilder();
+ this._tokenizer = new Tokenizer(this._treeBuilder);
+ this._scriptingEnabled = false;
+}
+
+SAXParser.prototype.parse = function(source) {
+ this._tokenizer.tokenize(source);
+ var document = this._treeBuilder.document;
+ if (document) {
+ new TreeParser(this.contentHandler).parse(document);
+ }
+};
+
+SAXParser.prototype.parseFragment = function(source, context) {
+ this._treeBuilder.setFragmentContext(context);
+ this._tokenizer.tokenize(source);
+ var fragment = this._treeBuilder.getFragment();
+ if (fragment) {
+ new TreeParser(this.contentHandler).parse(fragment);
+ }
+};
+
+Object.defineProperty(SAXParser.prototype, 'scriptingEnabled', {
+ get: function() {
+ return this._scriptingEnabled;
+ },
+ set: function(value) {
+ this._scriptingEnabled = value;
+ this._treeBuilder.scriptingEnabled = value;
+ }
+});
+
+Object.defineProperty(SAXParser.prototype, 'errorHandler', {
+ get: function() {
+ return this._errorHandler;
+ },
+ set: function(value) {
+ this._errorHandler = value;
+ this._treeBuilder.errorHandler = value;
+ }
+});
+
+exports.SAXParser = SAXParser;
+
+},
+{"../Tokenizer":5,"./SAXTreeBuilder":10,"./TreeParser":11}],
+10:[function(_dereq_,module,exports){
+var util = _dereq_('util');
+var TreeBuilder = _dereq_('../TreeBuilder').TreeBuilder;
+
+function SAXTreeBuilder() {
+ TreeBuilder.call(this);
+}
+
+util.inherits(SAXTreeBuilder, TreeBuilder);
+
+SAXTreeBuilder.prototype.start = function(tokenizer) {
+ this.document = new Document(this.tokenizer);
+};
+
+SAXTreeBuilder.prototype.end = function() {
+ this.document.endLocator = this.tokenizer;
+};
+
+SAXTreeBuilder.prototype.insertDoctype = function(name, publicId, systemId) {
+ var doctype = new DTD(this.tokenizer, name, publicId, systemId);
+ doctype.endLocator = this.tokenizer;
+ this.document.appendChild(doctype);
+};
+
+SAXTreeBuilder.prototype.createElement = function(namespaceURI, localName, attributes) {
+ var element = new Element(this.tokenizer, namespaceURI, localName, localName, attributes || []);
+ return element;
+};
+
+SAXTreeBuilder.prototype.insertComment = function(data, parent) {
+ if (!parent)
+ parent = this.currentStackItem();
+ var comment = new Comment(this.tokenizer, data);
+ parent.appendChild(comment);
+};
+
+SAXTreeBuilder.prototype.appendCharacters = function(parent, data) {
+ var text = new Characters(this.tokenizer, data);
+ parent.appendChild(text);
+};
+
+SAXTreeBuilder.prototype.insertText = function(data) {
+ if (this.redirectAttachToFosterParent && this.openElements.top.isFosterParenting()) {
+ var tableIndex = this.openElements.findIndex('table');
+ var tableItem = this.openElements.item(tableIndex);
+ var table = tableItem.node;
+ if (tableIndex === 0) {
+ return this.appendCharacters(table, data);
+ }
+ var text = new Characters(this.tokenizer, data);
+ var parent = table.parentNode;
+ if (parent) {
+ parent.insertBetween(text, table.previousSibling, table);
+ return;
+ }
+ var stackParent = this.openElements.item(tableIndex - 1).node;
+ stackParent.appendChild(text);
+ return;
+ }
+ this.appendCharacters(this.currentStackItem().node, data);
+};
+
+SAXTreeBuilder.prototype.attachNode = function(node, parent) {
+ parent.appendChild(node);
+};
+
+SAXTreeBuilder.prototype.attachNodeToFosterParent = function(child, table, stackParent) {
+ var parent = table.parentNode;
+ if (parent)
+ parent.insertBetween(child, table.previousSibling, table);
+ else
+ stackParent.appendChild(child);
+};
+
+SAXTreeBuilder.prototype.detachFromParent = function(element) {
+ element.detach();
+};
+
+SAXTreeBuilder.prototype.reparentChildren = function(oldParent, newParent) {
+ newParent.appendChildren(oldParent.firstChild);
+};
+
+SAXTreeBuilder.prototype.getFragment = function() {
+ var fragment = new DocumentFragment();
+ this.reparentChildren(this.openElements.rootNode, fragment);
+ return fragment;
+};
+
+function getAttribute(node, name) {
+ for (var i = 0; i < node.attributes.length; i++) {
+ var attribute = node.attributes[i];
+ if (attribute.nodeName === name)
+ return attribute.nodeValue;
+ }
+}
+
+SAXTreeBuilder.prototype.addAttributesToElement = function(element, attributes) {
+ for (var i = 0; i < attributes.length; i++) {
+ var attribute = attributes[i];
+ if (!getAttribute(element, attribute.nodeName))
+ element.attributes.push(attribute);
+ }
+};
+
+var NodeType = {
+ CDATA: 1,
+ CHARACTERS: 2,
+ COMMENT: 3,
+ DOCUMENT: 4,
+ DOCUMENT_FRAGMENT: 5,
+ DTD: 6,
+ ELEMENT: 7,
+ ENTITY: 8,
+ IGNORABLE_WHITESPACE: 9,
+ PROCESSING_INSTRUCTION: 10,
+ SKIPPED_ENTITY: 11
+};
+function Node(locator) {
+ if (!locator) {
+ this.columnNumber = -1;
+ this.lineNumber = -1;
+ } else {
+ this.columnNumber = locator.columnNumber;
+ this.lineNumber = locator.lineNumber;
+ }
+ this.parentNode = null;
+ this.nextSibling = null;
+ this.firstChild = null;
+}
+Node.prototype.visit = function(treeParser) {
+ throw new Error("Not Implemented");
+};
+Node.prototype.revisit = function(treeParser) {
+ return;
+};
+Node.prototype.detach = function() {
+ if (this.parentNode !== null) {
+ this.parentNode.removeChild(this);
+ this.parentNode = null;
+ }
+};
+
+Object.defineProperty(Node.prototype, 'previousSibling', {
+ get: function() {
+ var prev = null;
+ var next = this.parentNode.firstChild;
+ for(;;) {
+ if (this == next) {
+ return prev;
+ }
+ prev = next;
+ next = next.nextSibling;
+ }
+ }
+});
+
+
+function ParentNode(locator) {
+ Node.call(this, locator);
+ this.lastChild = null;
+ this._endLocator = null;
+}
+
+ParentNode.prototype = Object.create(Node.prototype);
+ParentNode.prototype.insertBefore = function(child, sibling) {
+ if (!sibling) {
+ return this.appendChild(child);
+ }
+ child.detach();
+ child.parentNode = this;
+ if (this.firstChild == sibling) {
+ child.nextSibling = sibling;
+ this.firstChild = child;
+ } else {
+ var prev = this.firstChild;
+ var next = this.firstChild.nextSibling;
+ while (next != sibling) {
+ prev = next;
+ next = next.nextSibling;
+ }
+ prev.nextSibling = child;
+ child.nextSibling = next;
+ }
+ return child;
+};
+
+ParentNode.prototype.insertBetween = function(child, prev, next) {
+ if (!next) {
+ return this.appendChild(child);
+ }
+ child.detach();
+ child.parentNode = this;
+ child.nextSibling = next;
+ if (!prev) {
+ firstChild = child;
+ } else {
+ prev.nextSibling = child;
+ }
+ return child;
+};
+ParentNode.prototype.appendChild = function(child) {
+ child.detach();
+ child.parentNode = this;
+ if (!this.firstChild) {
+ this.firstChild = child;
+ } else {
+ this.lastChild.nextSibling = child;
+ }
+ this.lastChild = child;
+ return child;
+};
+ParentNode.prototype.appendChildren = function(parent) {
+ var child = parent.firstChild;
+ if (!child) {
+ return;
+ }
+ var another = parent;
+ if (!this.firstChild) {
+ this.firstChild = child;
+ } else {
+ this.lastChild.nextSibling = child;
+ }
+ this.lastChild = another.lastChild;
+ do {
+ child.parentNode = this;
+ } while ((child = child.nextSibling));
+ another.firstChild = null;
+ another.lastChild = null;
+};
+ParentNode.prototype.removeChild = function(node) {
+ if (this.firstChild == node) {
+ this.firstChild = node.nextSibling;
+ if (this.lastChild == node) {
+ this.lastChild = null;
+ }
+ } else {
+ var prev = this.firstChild;
+ var next = this.firstChild.nextSibling;
+ while (next != node) {
+ prev = next;
+ next = next.nextSibling;
+ }
+ prev.nextSibling = node.nextSibling;
+ if (this.lastChild == node) {
+ this.lastChild = prev;
+ }
+ }
+ node.parentNode = null;
+ return node;
+};
+
+Object.defineProperty(ParentNode.prototype, 'endLocator', {
+ get: function() {
+ return this._endLocator;
+ },
+ set: function(endLocator) {
+ this._endLocator = {
+ lineNumber: endLocator.lineNumber,
+ columnNumber: endLocator.columnNumber
+ };
+ }
+});
+function Document (locator) {
+ ParentNode.call(this, locator);
+ this.nodeType = NodeType.DOCUMENT;
+}
+
+Document.prototype = Object.create(ParentNode.prototype);
+Document.prototype.visit = function(treeParser) {
+ treeParser.startDocument(this);
+};
+Document.prototype.revisit = function(treeParser) {
+ treeParser.endDocument(this.endLocator);
+};
+function DocumentFragment() {
+ ParentNode.call(this, new Locator());
+ this.nodeType = NodeType.DOCUMENT_FRAGMENT;
+}
+
+DocumentFragment.prototype = Object.create(ParentNode.prototype);
+DocumentFragment.prototype.visit = function(treeParser) {
+};
+function Element(locator, uri, localName, qName, atts, prefixMappings) {
+ ParentNode.call(this, locator);
+ this.uri = uri;
+ this.localName = localName;
+ this.qName = qName;
+ this.attributes = atts;
+ this.prefixMappings = prefixMappings;
+ this.nodeType = NodeType.ELEMENT;
+}
+
+Element.prototype = Object.create(ParentNode.prototype);
+Element.prototype.visit = function(treeParser) {
+ if (this.prefixMappings) {
+ for (var key in prefixMappings) {
+ var mapping = prefixMappings[key];
+ treeParser.startPrefixMapping(mapping.getPrefix(),
+ mapping.getUri(), this);
+ }
+ }
+ treeParser.startElement(this.uri, this.localName, this.qName, this.attributes, this);
+};
+Element.prototype.revisit = function(treeParser) {
+ treeParser.endElement(this.uri, this.localName, this.qName, this.endLocator);
+ if (this.prefixMappings) {
+ for (var key in prefixMappings) {
+ var mapping = prefixMappings[key];
+ treeParser.endPrefixMapping(mapping.getPrefix(), this.endLocator);
+ }
+ }
+};
+function Characters(locator, data){
+ Node.call(this, locator);
+ this.data = data;
+ this.nodeType = NodeType.CHARACTERS;
+}
+
+Characters.prototype = Object.create(Node.prototype);
+Characters.prototype.visit = function (treeParser) {
+ treeParser.characters(this.data, 0, this.data.length, this);
+};
+function IgnorableWhitespace(locator, data) {
+ Node.call(this, locator);
+ this.data = data;
+ this.nodeType = NodeType.IGNORABLE_WHITESPACE;
+}
+
+IgnorableWhitespace.prototype = Object.create(Node.prototype);
+IgnorableWhitespace.prototype.visit = function(treeParser) {
+ treeParser.ignorableWhitespace(this.data, 0, this.data.length, this);
+};
+function Comment(locator, data) {
+ Node.call(this, locator);
+ this.data = data;
+ this.nodeType = NodeType.COMMENT;
+}
+
+Comment.prototype = Object.create(Node.prototype);
+Comment.prototype.visit = function(treeParser) {
+ treeParser.comment(this.data, 0, this.data.length, this);
+};
+function CDATA(locator) {
+ ParentNode.call(this, locator);
+ this.nodeType = NodeType.CDATA;
+}
+
+CDATA.prototype = Object.create(ParentNode.prototype);
+CDATA.prototype.visit = function(treeParser) {
+ treeParser.startCDATA(this);
+};
+CDATA.prototype.revisit = function(treeParser) {
+ treeParser.endCDATA(this.endLocator);
+};
+function Entity(name) {
+ ParentNode.call(this);
+ this.name = name;
+ this.nodeType = NodeType.ENTITY;
+}
+
+Entity.prototype = Object.create(ParentNode.prototype);
+Entity.prototype.visit = function(treeParser) {
+ treeParser.startEntity(this.name, this);
+};
+Entity.prototype.revisit = function(treeParser) {
+ treeParser.endEntity(this.name);
+};
+
+function SkippedEntity(name) {
+ Node.call(this);
+ this.name = name;
+ this.nodeType = NodeType.SKIPPED_ENTITY;
+}
+
+SkippedEntity.prototype = Object.create(Node.prototype);
+SkippedEntity.prototype.visit = function(treeParser) {
+ treeParser.skippedEntity(this.name, this);
+};
+function ProcessingInstruction(target, data) {
+ Node.call(this);
+ this.target = target;
+ this.data = data;
+}
+
+ProcessingInstruction.prototype = Object.create(Node.prototype);
+ProcessingInstruction.prototype.visit = function(treeParser) {
+ treeParser.processingInstruction(this.target, this.data, this);
+};
+ProcessingInstruction.prototype.getNodeType = function() {
+ return NodeType.PROCESSING_INSTRUCTION;
+};
+function DTD(name, publicIdentifier, systemIdentifier) {
+ ParentNode.call(this);
+ this.name = name;
+ this.publicIdentifier = publicIdentifier;
+ this.systemIdentifier = systemIdentifier;
+ this.nodeType = NodeType.DTD;
+}
+
+DTD.prototype = Object.create(ParentNode.prototype);
+DTD.prototype.visit = function(treeParser) {
+ treeParser.startDTD(this.name, this.publicIdentifier, this.systemIdentifier, this);
+};
+DTD.prototype.revisit = function(treeParser) {
+ treeParser.endDTD();
+};
+
+exports.SAXTreeBuilder = SAXTreeBuilder;
+
+},
+{"../TreeBuilder":6,"util":20}],
+11:[function(_dereq_,module,exports){
+function TreeParser(contentHandler, lexicalHandler){
+ this.contentHandler;
+ this.lexicalHandler;
+ this.locatorDelegate;
+
+ if (!contentHandler) {
+ throw new IllegalArgumentException("contentHandler was null.");
+ }
+ this.contentHandler = contentHandler;
+ if (!lexicalHandler) {
+ this.lexicalHandler = new NullLexicalHandler();
+ } else {
+ this.lexicalHandler = lexicalHandler;
+ }
+}
+TreeParser.prototype.parse = function(node) {
+ this.contentHandler.documentLocator = this;
+ var current = node;
+ var next;
+ for (;;) {
+ current.visit(this);
+ if (next = current.firstChild) {
+ current = next;
+ continue;
+ }
+ for (;;) {
+ current.revisit(this);
+ if (current == node) {
+ return;
+ }
+ if (next = current.nextSibling) {
+ current = next;
+ break;
+ }
+ current = current.parentNode;
+ }
+ }
+};
+TreeParser.prototype.characters = function(ch, start, length, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.characters(ch, start, length);
+};
+TreeParser.prototype.endDocument = function(locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.endDocument();
+};
+TreeParser.prototype.endElement = function(uri, localName, qName, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.endElement(uri, localName, qName);
+};
+TreeParser.prototype.endPrefixMapping = function(prefix, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.endPrefixMapping(prefix);
+};
+TreeParser.prototype.ignorableWhitespace = function(ch, start, length, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.ignorableWhitespace(ch, start, length);
+};
+TreeParser.prototype.processingInstruction = function(target, data, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.processingInstruction(target, data);
+};
+TreeParser.prototype.skippedEntity = function(name, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.skippedEntity(name);
+};
+TreeParser.prototype.startDocument = function(locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.startDocument();
+};
+TreeParser.prototype.startElement = function(uri, localName, qName, atts, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.startElement(uri, localName, qName, atts);
+};
+TreeParser.prototype.startPrefixMapping = function(prefix, uri, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.startPrefixMapping(prefix, uri);
+};
+TreeParser.prototype.comment = function(ch, start, length, locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.comment(ch, start, length);
+};
+TreeParser.prototype.endCDATA = function(locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.endCDATA();
+};
+TreeParser.prototype.endDTD = function(locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.endDTD();
+};
+TreeParser.prototype.endEntity = function(name, locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.endEntity(name);
+};
+TreeParser.prototype.startCDATA = function(locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.startCDATA();
+};
+TreeParser.prototype.startDTD = function(name, publicId, systemId, locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.startDTD(name, publicId, systemId);
+};
+TreeParser.prototype.startEntity = function(name, locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.startEntity(name);
+};
+
+Object.defineProperty(TreeParser.prototype, 'columnNumber', {
+ get: function() {
+ if (!this.locatorDelegate)
+ return -1;
+ else
+ return this.locatorDelegate.columnNumber;
+ }
+});
+
+Object.defineProperty(TreeParser.prototype, 'lineNumber', {
+ get: function() {
+ if (!this.locatorDelegate)
+ return -1;
+ else
+ return this.locatorDelegate.lineNumber;
+ }
+});
+function NullLexicalHandler() {
+
+}
+
+NullLexicalHandler.prototype.comment = function() {};
+NullLexicalHandler.prototype.endCDATA = function() {};
+NullLexicalHandler.prototype.endDTD = function() {};
+NullLexicalHandler.prototype.endEntity = function() {};
+NullLexicalHandler.prototype.startCDATA = function() {};
+NullLexicalHandler.prototype.startDTD = function() {};
+NullLexicalHandler.prototype.startEntity = function() {};
+
+exports.TreeParser = TreeParser;
+
+},
+{}],
+12:[function(_dereq_,module,exports){
+module.exports = {
+ "Aacute;": "\u00C1",
+ "Aacute": "\u00C1",
+ "aacute;": "\u00E1",
+ "aacute": "\u00E1",
+ "Abreve;": "\u0102",
+ "abreve;": "\u0103",
+ "ac;": "\u223E",
+ "acd;": "\u223F",
+ "acE;": "\u223E\u0333",
+ "Acirc;": "\u00C2",
+ "Acirc": "\u00C2",
+ "acirc;": "\u00E2",
+ "acirc": "\u00E2",
+ "acute;": "\u00B4",
+ "acute": "\u00B4",
+ "Acy;": "\u0410",
+ "acy;": "\u0430",
+ "AElig;": "\u00C6",
+ "AElig": "\u00C6",
+ "aelig;": "\u00E6",
+ "aelig": "\u00E6",
+ "af;": "\u2061",
+ "Afr;": "\uD835\uDD04",
+ "afr;": "\uD835\uDD1E",
+ "Agrave;": "\u00C0",
+ "Agrave": "\u00C0",
+ "agrave;": "\u00E0",
+ "agrave": "\u00E0",
+ "alefsym;": "\u2135",
+ "aleph;": "\u2135",
+ "Alpha;": "\u0391",
+ "alpha;": "\u03B1",
+ "Amacr;": "\u0100",
+ "amacr;": "\u0101",
+ "amalg;": "\u2A3F",
+ "amp;": "\u0026",
+ "amp": "\u0026",
+ "AMP;": "\u0026",
+ "AMP": "\u0026",
+ "andand;": "\u2A55",
+ "And;": "\u2A53",
+ "and;": "\u2227",
+ "andd;": "\u2A5C",
+ "andslope;": "\u2A58",
+ "andv;": "\u2A5A",
+ "ang;": "\u2220",
+ "ange;": "\u29A4",
+ "angle;": "\u2220",
+ "angmsdaa;": "\u29A8",
+ "angmsdab;": "\u29A9",
+ "angmsdac;": "\u29AA",
+ "angmsdad;": "\u29AB",
+ "angmsdae;": "\u29AC",
+ "angmsdaf;": "\u29AD",
+ "angmsdag;": "\u29AE",
+ "angmsdah;": "\u29AF",
+ "angmsd;": "\u2221",
+ "angrt;": "\u221F",
+ "angrtvb;": "\u22BE",
+ "angrtvbd;": "\u299D",
+ "angsph;": "\u2222",
+ "angst;": "\u00C5",
+ "angzarr;": "\u237C",
+ "Aogon;": "\u0104",
+ "aogon;": "\u0105",
+ "Aopf;": "\uD835\uDD38",
+ "aopf;": "\uD835\uDD52",
+ "apacir;": "\u2A6F",
+ "ap;": "\u2248",
+ "apE;": "\u2A70",
+ "ape;": "\u224A",
+ "apid;": "\u224B",
+ "apos;": "\u0027",
+ "ApplyFunction;": "\u2061",
+ "approx;": "\u2248",
+ "approxeq;": "\u224A",
+ "Aring;": "\u00C5",
+ "Aring": "\u00C5",
+ "aring;": "\u00E5",
+ "aring": "\u00E5",
+ "Ascr;": "\uD835\uDC9C",
+ "ascr;": "\uD835\uDCB6",
+ "Assign;": "\u2254",
+ "ast;": "\u002A",
+ "asymp;": "\u2248",
+ "asympeq;": "\u224D",
+ "Atilde;": "\u00C3",
+ "Atilde": "\u00C3",
+ "atilde;": "\u00E3",
+ "atilde": "\u00E3",
+ "Auml;": "\u00C4",
+ "Auml": "\u00C4",
+ "auml;": "\u00E4",
+ "auml": "\u00E4",
+ "awconint;": "\u2233",
+ "awint;": "\u2A11",
+ "backcong;": "\u224C",
+ "backepsilon;": "\u03F6",
+ "backprime;": "\u2035",
+ "backsim;": "\u223D",
+ "backsimeq;": "\u22CD",
+ "Backslash;": "\u2216",
+ "Barv;": "\u2AE7",
+ "barvee;": "\u22BD",
+ "barwed;": "\u2305",
+ "Barwed;": "\u2306",
+ "barwedge;": "\u2305",
+ "bbrk;": "\u23B5",
+ "bbrktbrk;": "\u23B6",
+ "bcong;": "\u224C",
+ "Bcy;": "\u0411",
+ "bcy;": "\u0431",
+ "bdquo;": "\u201E",
+ "becaus;": "\u2235",
+ "because;": "\u2235",
+ "Because;": "\u2235",
+ "bemptyv;": "\u29B0",
+ "bepsi;": "\u03F6",
+ "bernou;": "\u212C",
+ "Bernoullis;": "\u212C",
+ "Beta;": "\u0392",
+ "beta;": "\u03B2",
+ "beth;": "\u2136",
+ "between;": "\u226C",
+ "Bfr;": "\uD835\uDD05",
+ "bfr;": "\uD835\uDD1F",
+ "bigcap;": "\u22C2",
+ "bigcirc;": "\u25EF",
+ "bigcup;": "\u22C3",
+ "bigodot;": "\u2A00",
+ "bigoplus;": "\u2A01",
+ "bigotimes;": "\u2A02",
+ "bigsqcup;": "\u2A06",
+ "bigstar;": "\u2605",
+ "bigtriangledown;": "\u25BD",
+ "bigtriangleup;": "\u25B3",
+ "biguplus;": "\u2A04",
+ "bigvee;": "\u22C1",
+ "bigwedge;": "\u22C0",
+ "bkarow;": "\u290D",
+ "blacklozenge;": "\u29EB",
+ "blacksquare;": "\u25AA",
+ "blacktriangle;": "\u25B4",
+ "blacktriangledown;": "\u25BE",
+ "blacktriangleleft;": "\u25C2",
+ "blacktriangleright;": "\u25B8",
+ "blank;": "\u2423",
+ "blk12;": "\u2592",
+ "blk14;": "\u2591",
+ "blk34;": "\u2593",
+ "block;": "\u2588",
+ "bne;": "\u003D\u20E5",
+ "bnequiv;": "\u2261\u20E5",
+ "bNot;": "\u2AED",
+ "bnot;": "\u2310",
+ "Bopf;": "\uD835\uDD39",
+ "bopf;": "\uD835\uDD53",
+ "bot;": "\u22A5",
+ "bottom;": "\u22A5",
+ "bowtie;": "\u22C8",
+ "boxbox;": "\u29C9",
+ "boxdl;": "\u2510",
+ "boxdL;": "\u2555",
+ "boxDl;": "\u2556",
+ "boxDL;": "\u2557",
+ "boxdr;": "\u250C",
+ "boxdR;": "\u2552",
+ "boxDr;": "\u2553",
+ "boxDR;": "\u2554",
+ "boxh;": "\u2500",
+ "boxH;": "\u2550",
+ "boxhd;": "\u252C",
+ "boxHd;": "\u2564",
+ "boxhD;": "\u2565",
+ "boxHD;": "\u2566",
+ "boxhu;": "\u2534",
+ "boxHu;": "\u2567",
+ "boxhU;": "\u2568",
+ "boxHU;": "\u2569",
+ "boxminus;": "\u229F",
+ "boxplus;": "\u229E",
+ "boxtimes;": "\u22A0",
+ "boxul;": "\u2518",
+ "boxuL;": "\u255B",
+ "boxUl;": "\u255C",
+ "boxUL;": "\u255D",
+ "boxur;": "\u2514",
+ "boxuR;": "\u2558",
+ "boxUr;": "\u2559",
+ "boxUR;": "\u255A",
+ "boxv;": "\u2502",
+ "boxV;": "\u2551",
+ "boxvh;": "\u253C",
+ "boxvH;": "\u256A",
+ "boxVh;": "\u256B",
+ "boxVH;": "\u256C",
+ "boxvl;": "\u2524",
+ "boxvL;": "\u2561",
+ "boxVl;": "\u2562",
+ "boxVL;": "\u2563",
+ "boxvr;": "\u251C",
+ "boxvR;": "\u255E",
+ "boxVr;": "\u255F",
+ "boxVR;": "\u2560",
+ "bprime;": "\u2035",
+ "breve;": "\u02D8",
+ "Breve;": "\u02D8",
+ "brvbar;": "\u00A6",
+ "brvbar": "\u00A6",
+ "bscr;": "\uD835\uDCB7",
+ "Bscr;": "\u212C",
+ "bsemi;": "\u204F",
+ "bsim;": "\u223D",
+ "bsime;": "\u22CD",
+ "bsolb;": "\u29C5",
+ "bsol;": "\u005C",
+ "bsolhsub;": "\u27C8",
+ "bull;": "\u2022",
+ "bullet;": "\u2022",
+ "bump;": "\u224E",
+ "bumpE;": "\u2AAE",
+ "bumpe;": "\u224F",
+ "Bumpeq;": "\u224E",
+ "bumpeq;": "\u224F",
+ "Cacute;": "\u0106",
+ "cacute;": "\u0107",
+ "capand;": "\u2A44",
+ "capbrcup;": "\u2A49",
+ "capcap;": "\u2A4B",
+ "cap;": "\u2229",
+ "Cap;": "\u22D2",
+ "capcup;": "\u2A47",
+ "capdot;": "\u2A40",
+ "CapitalDifferentialD;": "\u2145",
+ "caps;": "\u2229\uFE00",
+ "caret;": "\u2041",
+ "caron;": "\u02C7",
+ "Cayleys;": "\u212D",
+ "ccaps;": "\u2A4D",
+ "Ccaron;": "\u010C",
+ "ccaron;": "\u010D",
+ "Ccedil;": "\u00C7",
+ "Ccedil": "\u00C7",
+ "ccedil;": "\u00E7",
+ "ccedil": "\u00E7",
+ "Ccirc;": "\u0108",
+ "ccirc;": "\u0109",
+ "Cconint;": "\u2230",
+ "ccups;": "\u2A4C",
+ "ccupssm;": "\u2A50",
+ "Cdot;": "\u010A",
+ "cdot;": "\u010B",
+ "cedil;": "\u00B8",
+ "cedil": "\u00B8",
+ "Cedilla;": "\u00B8",
+ "cemptyv;": "\u29B2",
+ "cent;": "\u00A2",
+ "cent": "\u00A2",
+ "centerdot;": "\u00B7",
+ "CenterDot;": "\u00B7",
+ "cfr;": "\uD835\uDD20",
+ "Cfr;": "\u212D",
+ "CHcy;": "\u0427",
+ "chcy;": "\u0447",
+ "check;": "\u2713",
+ "checkmark;": "\u2713",
+ "Chi;": "\u03A7",
+ "chi;": "\u03C7",
+ "circ;": "\u02C6",
+ "circeq;": "\u2257",
+ "circlearrowleft;": "\u21BA",
+ "circlearrowright;": "\u21BB",
+ "circledast;": "\u229B",
+ "circledcirc;": "\u229A",
+ "circleddash;": "\u229D",
+ "CircleDot;": "\u2299",
+ "circledR;": "\u00AE",
+ "circledS;": "\u24C8",
+ "CircleMinus;": "\u2296",
+ "CirclePlus;": "\u2295",
+ "CircleTimes;": "\u2297",
+ "cir;": "\u25CB",
+ "cirE;": "\u29C3",
+ "cire;": "\u2257",
+ "cirfnint;": "\u2A10",
+ "cirmid;": "\u2AEF",
+ "cirscir;": "\u29C2",
+ "ClockwiseContourIntegral;": "\u2232",
+ "CloseCurlyDoubleQuote;": "\u201D",
+ "CloseCurlyQuote;": "\u2019",
+ "clubs;": "\u2663",
+ "clubsuit;": "\u2663",
+ "colon;": "\u003A",
+ "Colon;": "\u2237",
+ "Colone;": "\u2A74",
+ "colone;": "\u2254",
+ "coloneq;": "\u2254",
+ "comma;": "\u002C",
+ "commat;": "\u0040",
+ "comp;": "\u2201",
+ "compfn;": "\u2218",
+ "complement;": "\u2201",
+ "complexes;": "\u2102",
+ "cong;": "\u2245",
+ "congdot;": "\u2A6D",
+ "Congruent;": "\u2261",
+ "conint;": "\u222E",
+ "Conint;": "\u222F",
+ "ContourIntegral;": "\u222E",
+ "copf;": "\uD835\uDD54",
+ "Copf;": "\u2102",
+ "coprod;": "\u2210",
+ "Coproduct;": "\u2210",
+ "copy;": "\u00A9",
+ "copy": "\u00A9",
+ "COPY;": "\u00A9",
+ "COPY": "\u00A9",
+ "copysr;": "\u2117",
+ "CounterClockwiseContourIntegral;": "\u2233",
+ "crarr;": "\u21B5",
+ "cross;": "\u2717",
+ "Cross;": "\u2A2F",
+ "Cscr;": "\uD835\uDC9E",
+ "cscr;": "\uD835\uDCB8",
+ "csub;": "\u2ACF",
+ "csube;": "\u2AD1",
+ "csup;": "\u2AD0",
+ "csupe;": "\u2AD2",
+ "ctdot;": "\u22EF",
+ "cudarrl;": "\u2938",
+ "cudarrr;": "\u2935",
+ "cuepr;": "\u22DE",
+ "cuesc;": "\u22DF",
+ "cularr;": "\u21B6",
+ "cularrp;": "\u293D",
+ "cupbrcap;": "\u2A48",
+ "cupcap;": "\u2A46",
+ "CupCap;": "\u224D",
+ "cup;": "\u222A",
+ "Cup;": "\u22D3",
+ "cupcup;": "\u2A4A",
+ "cupdot;": "\u228D",
+ "cupor;": "\u2A45",
+ "cups;": "\u222A\uFE00",
+ "curarr;": "\u21B7",
+ "curarrm;": "\u293C",
+ "curlyeqprec;": "\u22DE",
+ "curlyeqsucc;": "\u22DF",
+ "curlyvee;": "\u22CE",
+ "curlywedge;": "\u22CF",
+ "curren;": "\u00A4",
+ "curren": "\u00A4",
+ "curvearrowleft;": "\u21B6",
+ "curvearrowright;": "\u21B7",
+ "cuvee;": "\u22CE",
+ "cuwed;": "\u22CF",
+ "cwconint;": "\u2232",
+ "cwint;": "\u2231",
+ "cylcty;": "\u232D",
+ "dagger;": "\u2020",
+ "Dagger;": "\u2021",
+ "daleth;": "\u2138",
+ "darr;": "\u2193",
+ "Darr;": "\u21A1",
+ "dArr;": "\u21D3",
+ "dash;": "\u2010",
+ "Dashv;": "\u2AE4",
+ "dashv;": "\u22A3",
+ "dbkarow;": "\u290F",
+ "dblac;": "\u02DD",
+ "Dcaron;": "\u010E",
+ "dcaron;": "\u010F",
+ "Dcy;": "\u0414",
+ "dcy;": "\u0434",
+ "ddagger;": "\u2021",
+ "ddarr;": "\u21CA",
+ "DD;": "\u2145",
+ "dd;": "\u2146",
+ "DDotrahd;": "\u2911",
+ "ddotseq;": "\u2A77",
+ "deg;": "\u00B0",
+ "deg": "\u00B0",
+ "Del;": "\u2207",
+ "Delta;": "\u0394",
+ "delta;": "\u03B4",
+ "demptyv;": "\u29B1",
+ "dfisht;": "\u297F",
+ "Dfr;": "\uD835\uDD07",
+ "dfr;": "\uD835\uDD21",
+ "dHar;": "\u2965",
+ "dharl;": "\u21C3",
+ "dharr;": "\u21C2",
+ "DiacriticalAcute;": "\u00B4",
+ "DiacriticalDot;": "\u02D9",
+ "DiacriticalDoubleAcute;": "\u02DD",
+ "DiacriticalGrave;": "\u0060",
+ "DiacriticalTilde;": "\u02DC",
+ "diam;": "\u22C4",
+ "diamond;": "\u22C4",
+ "Diamond;": "\u22C4",
+ "diamondsuit;": "\u2666",
+ "diams;": "\u2666",
+ "die;": "\u00A8",
+ "DifferentialD;": "\u2146",
+ "digamma;": "\u03DD",
+ "disin;": "\u22F2",
+ "div;": "\u00F7",
+ "divide;": "\u00F7",
+ "divide": "\u00F7",
+ "divideontimes;": "\u22C7",
+ "divonx;": "\u22C7",
+ "DJcy;": "\u0402",
+ "djcy;": "\u0452",
+ "dlcorn;": "\u231E",
+ "dlcrop;": "\u230D",
+ "dollar;": "\u0024",
+ "Dopf;": "\uD835\uDD3B",
+ "dopf;": "\uD835\uDD55",
+ "Dot;": "\u00A8",
+ "dot;": "\u02D9",
+ "DotDot;": "\u20DC",
+ "doteq;": "\u2250",
+ "doteqdot;": "\u2251",
+ "DotEqual;": "\u2250",
+ "dotminus;": "\u2238",
+ "dotplus;": "\u2214",
+ "dotsquare;": "\u22A1",
+ "doublebarwedge;": "\u2306",
+ "DoubleContourIntegral;": "\u222F",
+ "DoubleDot;": "\u00A8",
+ "DoubleDownArrow;": "\u21D3",
+ "DoubleLeftArrow;": "\u21D0",
+ "DoubleLeftRightArrow;": "\u21D4",
+ "DoubleLeftTee;": "\u2AE4",
+ "DoubleLongLeftArrow;": "\u27F8",
+ "DoubleLongLeftRightArrow;": "\u27FA",
+ "DoubleLongRightArrow;": "\u27F9",
+ "DoubleRightArrow;": "\u21D2",
+ "DoubleRightTee;": "\u22A8",
+ "DoubleUpArrow;": "\u21D1",
+ "DoubleUpDownArrow;": "\u21D5",
+ "DoubleVerticalBar;": "\u2225",
+ "DownArrowBar;": "\u2913",
+ "downarrow;": "\u2193",
+ "DownArrow;": "\u2193",
+ "Downarrow;": "\u21D3",
+ "DownArrowUpArrow;": "\u21F5",
+ "DownBreve;": "\u0311",
+ "downdownarrows;": "\u21CA",
+ "downharpoonleft;": "\u21C3",
+ "downharpoonright;": "\u21C2",
+ "DownLeftRightVector;": "\u2950",
+ "DownLeftTeeVector;": "\u295E",
+ "DownLeftVectorBar;": "\u2956",
+ "DownLeftVector;": "\u21BD",
+ "DownRightTeeVector;": "\u295F",
+ "DownRightVectorBar;": "\u2957",
+ "DownRightVector;": "\u21C1",
+ "DownTeeArrow;": "\u21A7",
+ "DownTee;": "\u22A4",
+ "drbkarow;": "\u2910",
+ "drcorn;": "\u231F",
+ "drcrop;": "\u230C",
+ "Dscr;": "\uD835\uDC9F",
+ "dscr;": "\uD835\uDCB9",
+ "DScy;": "\u0405",
+ "dscy;": "\u0455",
+ "dsol;": "\u29F6",
+ "Dstrok;": "\u0110",
+ "dstrok;": "\u0111",
+ "dtdot;": "\u22F1",
+ "dtri;": "\u25BF",
+ "dtrif;": "\u25BE",
+ "duarr;": "\u21F5",
+ "duhar;": "\u296F",
+ "dwangle;": "\u29A6",
+ "DZcy;": "\u040F",
+ "dzcy;": "\u045F",
+ "dzigrarr;": "\u27FF",
+ "Eacute;": "\u00C9",
+ "Eacute": "\u00C9",
+ "eacute;": "\u00E9",
+ "eacute": "\u00E9",
+ "easter;": "\u2A6E",
+ "Ecaron;": "\u011A",
+ "ecaron;": "\u011B",
+ "Ecirc;": "\u00CA",
+ "Ecirc": "\u00CA",
+ "ecirc;": "\u00EA",
+ "ecirc": "\u00EA",
+ "ecir;": "\u2256",
+ "ecolon;": "\u2255",
+ "Ecy;": "\u042D",
+ "ecy;": "\u044D",
+ "eDDot;": "\u2A77",
+ "Edot;": "\u0116",
+ "edot;": "\u0117",
+ "eDot;": "\u2251",
+ "ee;": "\u2147",
+ "efDot;": "\u2252",
+ "Efr;": "\uD835\uDD08",
+ "efr;": "\uD835\uDD22",
+ "eg;": "\u2A9A",
+ "Egrave;": "\u00C8",
+ "Egrave": "\u00C8",
+ "egrave;": "\u00E8",
+ "egrave": "\u00E8",
+ "egs;": "\u2A96",
+ "egsdot;": "\u2A98",
+ "el;": "\u2A99",
+ "Element;": "\u2208",
+ "elinters;": "\u23E7",
+ "ell;": "\u2113",
+ "els;": "\u2A95",
+ "elsdot;": "\u2A97",
+ "Emacr;": "\u0112",
+ "emacr;": "\u0113",
+ "empty;": "\u2205",
+ "emptyset;": "\u2205",
+ "EmptySmallSquare;": "\u25FB",
+ "emptyv;": "\u2205",
+ "EmptyVerySmallSquare;": "\u25AB",
+ "emsp13;": "\u2004",
+ "emsp14;": "\u2005",
+ "emsp;": "\u2003",
+ "ENG;": "\u014A",
+ "eng;": "\u014B",
+ "ensp;": "\u2002",
+ "Eogon;": "\u0118",
+ "eogon;": "\u0119",
+ "Eopf;": "\uD835\uDD3C",
+ "eopf;": "\uD835\uDD56",
+ "epar;": "\u22D5",
+ "eparsl;": "\u29E3",
+ "eplus;": "\u2A71",
+ "epsi;": "\u03B5",
+ "Epsilon;": "\u0395",
+ "epsilon;": "\u03B5",
+ "epsiv;": "\u03F5",
+ "eqcirc;": "\u2256",
+ "eqcolon;": "\u2255",
+ "eqsim;": "\u2242",
+ "eqslantgtr;": "\u2A96",
+ "eqslantless;": "\u2A95",
+ "Equal;": "\u2A75",
+ "equals;": "\u003D",
+ "EqualTilde;": "\u2242",
+ "equest;": "\u225F",
+ "Equilibrium;": "\u21CC",
+ "equiv;": "\u2261",
+ "equivDD;": "\u2A78",
+ "eqvparsl;": "\u29E5",
+ "erarr;": "\u2971",
+ "erDot;": "\u2253",
+ "escr;": "\u212F",
+ "Escr;": "\u2130",
+ "esdot;": "\u2250",
+ "Esim;": "\u2A73",
+ "esim;": "\u2242",
+ "Eta;": "\u0397",
+ "eta;": "\u03B7",
+ "ETH;": "\u00D0",
+ "ETH": "\u00D0",
+ "eth;": "\u00F0",
+ "eth": "\u00F0",
+ "Euml;": "\u00CB",
+ "Euml": "\u00CB",
+ "euml;": "\u00EB",
+ "euml": "\u00EB",
+ "euro;": "\u20AC",
+ "excl;": "\u0021",
+ "exist;": "\u2203",
+ "Exists;": "\u2203",
+ "expectation;": "\u2130",
+ "exponentiale;": "\u2147",
+ "ExponentialE;": "\u2147",
+ "fallingdotseq;": "\u2252",
+ "Fcy;": "\u0424",
+ "fcy;": "\u0444",
+ "female;": "\u2640",
+ "ffilig;": "\uFB03",
+ "fflig;": "\uFB00",
+ "ffllig;": "\uFB04",
+ "Ffr;": "\uD835\uDD09",
+ "ffr;": "\uD835\uDD23",
+ "filig;": "\uFB01",
+ "FilledSmallSquare;": "\u25FC",
+ "FilledVerySmallSquare;": "\u25AA",
+ "fjlig;": "\u0066\u006A",
+ "flat;": "\u266D",
+ "fllig;": "\uFB02",
+ "fltns;": "\u25B1",
+ "fnof;": "\u0192",
+ "Fopf;": "\uD835\uDD3D",
+ "fopf;": "\uD835\uDD57",
+ "forall;": "\u2200",
+ "ForAll;": "\u2200",
+ "fork;": "\u22D4",
+ "forkv;": "\u2AD9",
+ "Fouriertrf;": "\u2131",
+ "fpartint;": "\u2A0D",
+ "frac12;": "\u00BD",
+ "frac12": "\u00BD",
+ "frac13;": "\u2153",
+ "frac14;": "\u00BC",
+ "frac14": "\u00BC",
+ "frac15;": "\u2155",
+ "frac16;": "\u2159",
+ "frac18;": "\u215B",
+ "frac23;": "\u2154",
+ "frac25;": "\u2156",
+ "frac34;": "\u00BE",
+ "frac34": "\u00BE",
+ "frac35;": "\u2157",
+ "frac38;": "\u215C",
+ "frac45;": "\u2158",
+ "frac56;": "\u215A",
+ "frac58;": "\u215D",
+ "frac78;": "\u215E",
+ "frasl;": "\u2044",
+ "frown;": "\u2322",
+ "fscr;": "\uD835\uDCBB",
+ "Fscr;": "\u2131",
+ "gacute;": "\u01F5",
+ "Gamma;": "\u0393",
+ "gamma;": "\u03B3",
+ "Gammad;": "\u03DC",
+ "gammad;": "\u03DD",
+ "gap;": "\u2A86",
+ "Gbreve;": "\u011E",
+ "gbreve;": "\u011F",
+ "Gcedil;": "\u0122",
+ "Gcirc;": "\u011C",
+ "gcirc;": "\u011D",
+ "Gcy;": "\u0413",
+ "gcy;": "\u0433",
+ "Gdot;": "\u0120",
+ "gdot;": "\u0121",
+ "ge;": "\u2265",
+ "gE;": "\u2267",
+ "gEl;": "\u2A8C",
+ "gel;": "\u22DB",
+ "geq;": "\u2265",
+ "geqq;": "\u2267",
+ "geqslant;": "\u2A7E",
+ "gescc;": "\u2AA9",
+ "ges;": "\u2A7E",
+ "gesdot;": "\u2A80",
+ "gesdoto;": "\u2A82",
+ "gesdotol;": "\u2A84",
+ "gesl;": "\u22DB\uFE00",
+ "gesles;": "\u2A94",
+ "Gfr;": "\uD835\uDD0A",
+ "gfr;": "\uD835\uDD24",
+ "gg;": "\u226B",
+ "Gg;": "\u22D9",
+ "ggg;": "\u22D9",
+ "gimel;": "\u2137",
+ "GJcy;": "\u0403",
+ "gjcy;": "\u0453",
+ "gla;": "\u2AA5",
+ "gl;": "\u2277",
+ "glE;": "\u2A92",
+ "glj;": "\u2AA4",
+ "gnap;": "\u2A8A",
+ "gnapprox;": "\u2A8A",
+ "gne;": "\u2A88",
+ "gnE;": "\u2269",
+ "gneq;": "\u2A88",
+ "gneqq;": "\u2269",
+ "gnsim;": "\u22E7",
+ "Gopf;": "\uD835\uDD3E",
+ "gopf;": "\uD835\uDD58",
+ "grave;": "\u0060",
+ "GreaterEqual;": "\u2265",
+ "GreaterEqualLess;": "\u22DB",
+ "GreaterFullEqual;": "\u2267",
+ "GreaterGreater;": "\u2AA2",
+ "GreaterLess;": "\u2277",
+ "GreaterSlantEqual;": "\u2A7E",
+ "GreaterTilde;": "\u2273",
+ "Gscr;": "\uD835\uDCA2",
+ "gscr;": "\u210A",
+ "gsim;": "\u2273",
+ "gsime;": "\u2A8E",
+ "gsiml;": "\u2A90",
+ "gtcc;": "\u2AA7",
+ "gtcir;": "\u2A7A",
+ "gt;": "\u003E",
+ "gt": "\u003E",
+ "GT;": "\u003E",
+ "GT": "\u003E",
+ "Gt;": "\u226B",
+ "gtdot;": "\u22D7",
+ "gtlPar;": "\u2995",
+ "gtquest;": "\u2A7C",
+ "gtrapprox;": "\u2A86",
+ "gtrarr;": "\u2978",
+ "gtrdot;": "\u22D7",
+ "gtreqless;": "\u22DB",
+ "gtreqqless;": "\u2A8C",
+ "gtrless;": "\u2277",
+ "gtrsim;": "\u2273",
+ "gvertneqq;": "\u2269\uFE00",
+ "gvnE;": "\u2269\uFE00",
+ "Hacek;": "\u02C7",
+ "hairsp;": "\u200A",
+ "half;": "\u00BD",
+ "hamilt;": "\u210B",
+ "HARDcy;": "\u042A",
+ "hardcy;": "\u044A",
+ "harrcir;": "\u2948",
+ "harr;": "\u2194",
+ "hArr;": "\u21D4",
+ "harrw;": "\u21AD",
+ "Hat;": "\u005E",
+ "hbar;": "\u210F",
+ "Hcirc;": "\u0124",
+ "hcirc;": "\u0125",
+ "hearts;": "\u2665",
+ "heartsuit;": "\u2665",
+ "hellip;": "\u2026",
+ "hercon;": "\u22B9",
+ "hfr;": "\uD835\uDD25",
+ "Hfr;": "\u210C",
+ "HilbertSpace;": "\u210B",
+ "hksearow;": "\u2925",
+ "hkswarow;": "\u2926",
+ "hoarr;": "\u21FF",
+ "homtht;": "\u223B",
+ "hookleftarrow;": "\u21A9",
+ "hookrightarrow;": "\u21AA",
+ "hopf;": "\uD835\uDD59",
+ "Hopf;": "\u210D",
+ "horbar;": "\u2015",
+ "HorizontalLine;": "\u2500",
+ "hscr;": "\uD835\uDCBD",
+ "Hscr;": "\u210B",
+ "hslash;": "\u210F",
+ "Hstrok;": "\u0126",
+ "hstrok;": "\u0127",
+ "HumpDownHump;": "\u224E",
+ "HumpEqual;": "\u224F",
+ "hybull;": "\u2043",
+ "hyphen;": "\u2010",
+ "Iacute;": "\u00CD",
+ "Iacute": "\u00CD",
+ "iacute;": "\u00ED",
+ "iacute": "\u00ED",
+ "ic;": "\u2063",
+ "Icirc;": "\u00CE",
+ "Icirc": "\u00CE",
+ "icirc;": "\u00EE",
+ "icirc": "\u00EE",
+ "Icy;": "\u0418",
+ "icy;": "\u0438",
+ "Idot;": "\u0130",
+ "IEcy;": "\u0415",
+ "iecy;": "\u0435",
+ "iexcl;": "\u00A1",
+ "iexcl": "\u00A1",
+ "iff;": "\u21D4",
+ "ifr;": "\uD835\uDD26",
+ "Ifr;": "\u2111",
+ "Igrave;": "\u00CC",
+ "Igrave": "\u00CC",
+ "igrave;": "\u00EC",
+ "igrave": "\u00EC",
+ "ii;": "\u2148",
+ "iiiint;": "\u2A0C",
+ "iiint;": "\u222D",
+ "iinfin;": "\u29DC",
+ "iiota;": "\u2129",
+ "IJlig;": "\u0132",
+ "ijlig;": "\u0133",
+ "Imacr;": "\u012A",
+ "imacr;": "\u012B",
+ "image;": "\u2111",
+ "ImaginaryI;": "\u2148",
+ "imagline;": "\u2110",
+ "imagpart;": "\u2111",
+ "imath;": "\u0131",
+ "Im;": "\u2111",
+ "imof;": "\u22B7",
+ "imped;": "\u01B5",
+ "Implies;": "\u21D2",
+ "incare;": "\u2105",
+ "in;": "\u2208",
+ "infin;": "\u221E",
+ "infintie;": "\u29DD",
+ "inodot;": "\u0131",
+ "intcal;": "\u22BA",
+ "int;": "\u222B",
+ "Int;": "\u222C",
+ "integers;": "\u2124",
+ "Integral;": "\u222B",
+ "intercal;": "\u22BA",
+ "Intersection;": "\u22C2",
+ "intlarhk;": "\u2A17",
+ "intprod;": "\u2A3C",
+ "InvisibleComma;": "\u2063",
+ "InvisibleTimes;": "\u2062",
+ "IOcy;": "\u0401",
+ "iocy;": "\u0451",
+ "Iogon;": "\u012E",
+ "iogon;": "\u012F",
+ "Iopf;": "\uD835\uDD40",
+ "iopf;": "\uD835\uDD5A",
+ "Iota;": "\u0399",
+ "iota;": "\u03B9",
+ "iprod;": "\u2A3C",
+ "iquest;": "\u00BF",
+ "iquest": "\u00BF",
+ "iscr;": "\uD835\uDCBE",
+ "Iscr;": "\u2110",
+ "isin;": "\u2208",
+ "isindot;": "\u22F5",
+ "isinE;": "\u22F9",
+ "isins;": "\u22F4",
+ "isinsv;": "\u22F3",
+ "isinv;": "\u2208",
+ "it;": "\u2062",
+ "Itilde;": "\u0128",
+ "itilde;": "\u0129",
+ "Iukcy;": "\u0406",
+ "iukcy;": "\u0456",
+ "Iuml;": "\u00CF",
+ "Iuml": "\u00CF",
+ "iuml;": "\u00EF",
+ "iuml": "\u00EF",
+ "Jcirc;": "\u0134",
+ "jcirc;": "\u0135",
+ "Jcy;": "\u0419",
+ "jcy;": "\u0439",
+ "Jfr;": "\uD835\uDD0D",
+ "jfr;": "\uD835\uDD27",
+ "jmath;": "\u0237",
+ "Jopf;": "\uD835\uDD41",
+ "jopf;": "\uD835\uDD5B",
+ "Jscr;": "\uD835\uDCA5",
+ "jscr;": "\uD835\uDCBF",
+ "Jsercy;": "\u0408",
+ "jsercy;": "\u0458",
+ "Jukcy;": "\u0404",
+ "jukcy;": "\u0454",
+ "Kappa;": "\u039A",
+ "kappa;": "\u03BA",
+ "kappav;": "\u03F0",
+ "Kcedil;": "\u0136",
+ "kcedil;": "\u0137",
+ "Kcy;": "\u041A",
+ "kcy;": "\u043A",
+ "Kfr;": "\uD835\uDD0E",
+ "kfr;": "\uD835\uDD28",
+ "kgreen;": "\u0138",
+ "KHcy;": "\u0425",
+ "khcy;": "\u0445",
+ "KJcy;": "\u040C",
+ "kjcy;": "\u045C",
+ "Kopf;": "\uD835\uDD42",
+ "kopf;": "\uD835\uDD5C",
+ "Kscr;": "\uD835\uDCA6",
+ "kscr;": "\uD835\uDCC0",
+ "lAarr;": "\u21DA",
+ "Lacute;": "\u0139",
+ "lacute;": "\u013A",
+ "laemptyv;": "\u29B4",
+ "lagran;": "\u2112",
+ "Lambda;": "\u039B",
+ "lambda;": "\u03BB",
+ "lang;": "\u27E8",
+ "Lang;": "\u27EA",
+ "langd;": "\u2991",
+ "langle;": "\u27E8",
+ "lap;": "\u2A85",
+ "Laplacetrf;": "\u2112",
+ "laquo;": "\u00AB",
+ "laquo": "\u00AB",
+ "larrb;": "\u21E4",
+ "larrbfs;": "\u291F",
+ "larr;": "\u2190",
+ "Larr;": "\u219E",
+ "lArr;": "\u21D0",
+ "larrfs;": "\u291D",
+ "larrhk;": "\u21A9",
+ "larrlp;": "\u21AB",
+ "larrpl;": "\u2939",
+ "larrsim;": "\u2973",
+ "larrtl;": "\u21A2",
+ "latail;": "\u2919",
+ "lAtail;": "\u291B",
+ "lat;": "\u2AAB",
+ "late;": "\u2AAD",
+ "lates;": "\u2AAD\uFE00",
+ "lbarr;": "\u290C",
+ "lBarr;": "\u290E",
+ "lbbrk;": "\u2772",
+ "lbrace;": "\u007B",
+ "lbrack;": "\u005B",
+ "lbrke;": "\u298B",
+ "lbrksld;": "\u298F",
+ "lbrkslu;": "\u298D",
+ "Lcaron;": "\u013D",
+ "lcaron;": "\u013E",
+ "Lcedil;": "\u013B",
+ "lcedil;": "\u013C",
+ "lceil;": "\u2308",
+ "lcub;": "\u007B",
+ "Lcy;": "\u041B",
+ "lcy;": "\u043B",
+ "ldca;": "\u2936",
+ "ldquo;": "\u201C",
+ "ldquor;": "\u201E",
+ "ldrdhar;": "\u2967",
+ "ldrushar;": "\u294B",
+ "ldsh;": "\u21B2",
+ "le;": "\u2264",
+ "lE;": "\u2266",
+ "LeftAngleBracket;": "\u27E8",
+ "LeftArrowBar;": "\u21E4",
+ "leftarrow;": "\u2190",
+ "LeftArrow;": "\u2190",
+ "Leftarrow;": "\u21D0",
+ "LeftArrowRightArrow;": "\u21C6",
+ "leftarrowtail;": "\u21A2",
+ "LeftCeiling;": "\u2308",
+ "LeftDoubleBracket;": "\u27E6",
+ "LeftDownTeeVector;": "\u2961",
+ "LeftDownVectorBar;": "\u2959",
+ "LeftDownVector;": "\u21C3",
+ "LeftFloor;": "\u230A",
+ "leftharpoondown;": "\u21BD",
+ "leftharpoonup;": "\u21BC",
+ "leftleftarrows;": "\u21C7",
+ "leftrightarrow;": "\u2194",
+ "LeftRightArrow;": "\u2194",
+ "Leftrightarrow;": "\u21D4",
+ "leftrightarrows;": "\u21C6",
+ "leftrightharpoons;": "\u21CB",
+ "leftrightsquigarrow;": "\u21AD",
+ "LeftRightVector;": "\u294E",
+ "LeftTeeArrow;": "\u21A4",
+ "LeftTee;": "\u22A3",
+ "LeftTeeVector;": "\u295A",
+ "leftthreetimes;": "\u22CB",
+ "LeftTriangleBar;": "\u29CF",
+ "LeftTriangle;": "\u22B2",
+ "LeftTriangleEqual;": "\u22B4",
+ "LeftUpDownVector;": "\u2951",
+ "LeftUpTeeVector;": "\u2960",
+ "LeftUpVectorBar;": "\u2958",
+ "LeftUpVector;": "\u21BF",
+ "LeftVectorBar;": "\u2952",
+ "LeftVector;": "\u21BC",
+ "lEg;": "\u2A8B",
+ "leg;": "\u22DA",
+ "leq;": "\u2264",
+ "leqq;": "\u2266",
+ "leqslant;": "\u2A7D",
+ "lescc;": "\u2AA8",
+ "les;": "\u2A7D",
+ "lesdot;": "\u2A7F",
+ "lesdoto;": "\u2A81",
+ "lesdotor;": "\u2A83",
+ "lesg;": "\u22DA\uFE00",
+ "lesges;": "\u2A93",
+ "lessapprox;": "\u2A85",
+ "lessdot;": "\u22D6",
+ "lesseqgtr;": "\u22DA",
+ "lesseqqgtr;": "\u2A8B",
+ "LessEqualGreater;": "\u22DA",
+ "LessFullEqual;": "\u2266",
+ "LessGreater;": "\u2276",
+ "lessgtr;": "\u2276",
+ "LessLess;": "\u2AA1",
+ "lesssim;": "\u2272",
+ "LessSlantEqual;": "\u2A7D",
+ "LessTilde;": "\u2272",
+ "lfisht;": "\u297C",
+ "lfloor;": "\u230A",
+ "Lfr;": "\uD835\uDD0F",
+ "lfr;": "\uD835\uDD29",
+ "lg;": "\u2276",
+ "lgE;": "\u2A91",
+ "lHar;": "\u2962",
+ "lhard;": "\u21BD",
+ "lharu;": "\u21BC",
+ "lharul;": "\u296A",
+ "lhblk;": "\u2584",
+ "LJcy;": "\u0409",
+ "ljcy;": "\u0459",
+ "llarr;": "\u21C7",
+ "ll;": "\u226A",
+ "Ll;": "\u22D8",
+ "llcorner;": "\u231E",
+ "Lleftarrow;": "\u21DA",
+ "llhard;": "\u296B",
+ "lltri;": "\u25FA",
+ "Lmidot;": "\u013F",
+ "lmidot;": "\u0140",
+ "lmoustache;": "\u23B0",
+ "lmoust;": "\u23B0",
+ "lnap;": "\u2A89",
+ "lnapprox;": "\u2A89",
+ "lne;": "\u2A87",
+ "lnE;": "\u2268",
+ "lneq;": "\u2A87",
+ "lneqq;": "\u2268",
+ "lnsim;": "\u22E6",
+ "loang;": "\u27EC",
+ "loarr;": "\u21FD",
+ "lobrk;": "\u27E6",
+ "longleftarrow;": "\u27F5",
+ "LongLeftArrow;": "\u27F5",
+ "Longleftarrow;": "\u27F8",
+ "longleftrightarrow;": "\u27F7",
+ "LongLeftRightArrow;": "\u27F7",
+ "Longleftrightarrow;": "\u27FA",
+ "longmapsto;": "\u27FC",
+ "longrightarrow;": "\u27F6",
+ "LongRightArrow;": "\u27F6",
+ "Longrightarrow;": "\u27F9",
+ "looparrowleft;": "\u21AB",
+ "looparrowright;": "\u21AC",
+ "lopar;": "\u2985",
+ "Lopf;": "\uD835\uDD43",
+ "lopf;": "\uD835\uDD5D",
+ "loplus;": "\u2A2D",
+ "lotimes;": "\u2A34",
+ "lowast;": "\u2217",
+ "lowbar;": "\u005F",
+ "LowerLeftArrow;": "\u2199",
+ "LowerRightArrow;": "\u2198",
+ "loz;": "\u25CA",
+ "lozenge;": "\u25CA",
+ "lozf;": "\u29EB",
+ "lpar;": "\u0028",
+ "lparlt;": "\u2993",
+ "lrarr;": "\u21C6",
+ "lrcorner;": "\u231F",
+ "lrhar;": "\u21CB",
+ "lrhard;": "\u296D",
+ "lrm;": "\u200E",
+ "lrtri;": "\u22BF",
+ "lsaquo;": "\u2039",
+ "lscr;": "\uD835\uDCC1",
+ "Lscr;": "\u2112",
+ "lsh;": "\u21B0",
+ "Lsh;": "\u21B0",
+ "lsim;": "\u2272",
+ "lsime;": "\u2A8D",
+ "lsimg;": "\u2A8F",
+ "lsqb;": "\u005B",
+ "lsquo;": "\u2018",
+ "lsquor;": "\u201A",
+ "Lstrok;": "\u0141",
+ "lstrok;": "\u0142",
+ "ltcc;": "\u2AA6",
+ "ltcir;": "\u2A79",
+ "lt;": "\u003C",
+ "lt": "\u003C",
+ "LT;": "\u003C",
+ "LT": "\u003C",
+ "Lt;": "\u226A",
+ "ltdot;": "\u22D6",
+ "lthree;": "\u22CB",
+ "ltimes;": "\u22C9",
+ "ltlarr;": "\u2976",
+ "ltquest;": "\u2A7B",
+ "ltri;": "\u25C3",
+ "ltrie;": "\u22B4",
+ "ltrif;": "\u25C2",
+ "ltrPar;": "\u2996",
+ "lurdshar;": "\u294A",
+ "luruhar;": "\u2966",
+ "lvertneqq;": "\u2268\uFE00",
+ "lvnE;": "\u2268\uFE00",
+ "macr;": "\u00AF",
+ "macr": "\u00AF",
+ "male;": "\u2642",
+ "malt;": "\u2720",
+ "maltese;": "\u2720",
+ "Map;": "\u2905",
+ "map;": "\u21A6",
+ "mapsto;": "\u21A6",
+ "mapstodown;": "\u21A7",
+ "mapstoleft;": "\u21A4",
+ "mapstoup;": "\u21A5",
+ "marker;": "\u25AE",
+ "mcomma;": "\u2A29",
+ "Mcy;": "\u041C",
+ "mcy;": "\u043C",
+ "mdash;": "\u2014",
+ "mDDot;": "\u223A",
+ "measuredangle;": "\u2221",
+ "MediumSpace;": "\u205F",
+ "Mellintrf;": "\u2133",
+ "Mfr;": "\uD835\uDD10",
+ "mfr;": "\uD835\uDD2A",
+ "mho;": "\u2127",
+ "micro;": "\u00B5",
+ "micro": "\u00B5",
+ "midast;": "\u002A",
+ "midcir;": "\u2AF0",
+ "mid;": "\u2223",
+ "middot;": "\u00B7",
+ "middot": "\u00B7",
+ "minusb;": "\u229F",
+ "minus;": "\u2212",
+ "minusd;": "\u2238",
+ "minusdu;": "\u2A2A",
+ "MinusPlus;": "\u2213",
+ "mlcp;": "\u2ADB",
+ "mldr;": "\u2026",
+ "mnplus;": "\u2213",
+ "models;": "\u22A7",
+ "Mopf;": "\uD835\uDD44",
+ "mopf;": "\uD835\uDD5E",
+ "mp;": "\u2213",
+ "mscr;": "\uD835\uDCC2",
+ "Mscr;": "\u2133",
+ "mstpos;": "\u223E",
+ "Mu;": "\u039C",
+ "mu;": "\u03BC",
+ "multimap;": "\u22B8",
+ "mumap;": "\u22B8",
+ "nabla;": "\u2207",
+ "Nacute;": "\u0143",
+ "nacute;": "\u0144",
+ "nang;": "\u2220\u20D2",
+ "nap;": "\u2249",
+ "napE;": "\u2A70\u0338",
+ "napid;": "\u224B\u0338",
+ "napos;": "\u0149",
+ "napprox;": "\u2249",
+ "natural;": "\u266E",
+ "naturals;": "\u2115",
+ "natur;": "\u266E",
+ "nbsp;": "\u00A0",
+ "nbsp": "\u00A0",
+ "nbump;": "\u224E\u0338",
+ "nbumpe;": "\u224F\u0338",
+ "ncap;": "\u2A43",
+ "Ncaron;": "\u0147",
+ "ncaron;": "\u0148",
+ "Ncedil;": "\u0145",
+ "ncedil;": "\u0146",
+ "ncong;": "\u2247",
+ "ncongdot;": "\u2A6D\u0338",
+ "ncup;": "\u2A42",
+ "Ncy;": "\u041D",
+ "ncy;": "\u043D",
+ "ndash;": "\u2013",
+ "nearhk;": "\u2924",
+ "nearr;": "\u2197",
+ "neArr;": "\u21D7",
+ "nearrow;": "\u2197",
+ "ne;": "\u2260",
+ "nedot;": "\u2250\u0338",
+ "NegativeMediumSpace;": "\u200B",
+ "NegativeThickSpace;": "\u200B",
+ "NegativeThinSpace;": "\u200B",
+ "NegativeVeryThinSpace;": "\u200B",
+ "nequiv;": "\u2262",
+ "nesear;": "\u2928",
+ "nesim;": "\u2242\u0338",
+ "NestedGreaterGreater;": "\u226B",
+ "NestedLessLess;": "\u226A",
+ "NewLine;": "\u000A",
+ "nexist;": "\u2204",
+ "nexists;": "\u2204",
+ "Nfr;": "\uD835\uDD11",
+ "nfr;": "\uD835\uDD2B",
+ "ngE;": "\u2267\u0338",
+ "nge;": "\u2271",
+ "ngeq;": "\u2271",
+ "ngeqq;": "\u2267\u0338",
+ "ngeqslant;": "\u2A7E\u0338",
+ "nges;": "\u2A7E\u0338",
+ "nGg;": "\u22D9\u0338",
+ "ngsim;": "\u2275",
+ "nGt;": "\u226B\u20D2",
+ "ngt;": "\u226F",
+ "ngtr;": "\u226F",
+ "nGtv;": "\u226B\u0338",
+ "nharr;": "\u21AE",
+ "nhArr;": "\u21CE",
+ "nhpar;": "\u2AF2",
+ "ni;": "\u220B",
+ "nis;": "\u22FC",
+ "nisd;": "\u22FA",
+ "niv;": "\u220B",
+ "NJcy;": "\u040A",
+ "njcy;": "\u045A",
+ "nlarr;": "\u219A",
+ "nlArr;": "\u21CD",
+ "nldr;": "\u2025",
+ "nlE;": "\u2266\u0338",
+ "nle;": "\u2270",
+ "nleftarrow;": "\u219A",
+ "nLeftarrow;": "\u21CD",
+ "nleftrightarrow;": "\u21AE",
+ "nLeftrightarrow;": "\u21CE",
+ "nleq;": "\u2270",
+ "nleqq;": "\u2266\u0338",
+ "nleqslant;": "\u2A7D\u0338",
+ "nles;": "\u2A7D\u0338",
+ "nless;": "\u226E",
+ "nLl;": "\u22D8\u0338",
+ "nlsim;": "\u2274",
+ "nLt;": "\u226A\u20D2",
+ "nlt;": "\u226E",
+ "nltri;": "\u22EA",
+ "nltrie;": "\u22EC",
+ "nLtv;": "\u226A\u0338",
+ "nmid;": "\u2224",
+ "NoBreak;": "\u2060",
+ "NonBreakingSpace;": "\u00A0",
+ "nopf;": "\uD835\uDD5F",
+ "Nopf;": "\u2115",
+ "Not;": "\u2AEC",
+ "not;": "\u00AC",
+ "not": "\u00AC",
+ "NotCongruent;": "\u2262",
+ "NotCupCap;": "\u226D",
+ "NotDoubleVerticalBar;": "\u2226",
+ "NotElement;": "\u2209",
+ "NotEqual;": "\u2260",
+ "NotEqualTilde;": "\u2242\u0338",
+ "NotExists;": "\u2204",
+ "NotGreater;": "\u226F",
+ "NotGreaterEqual;": "\u2271",
+ "NotGreaterFullEqual;": "\u2267\u0338",
+ "NotGreaterGreater;": "\u226B\u0338",
+ "NotGreaterLess;": "\u2279",
+ "NotGreaterSlantEqual;": "\u2A7E\u0338",
+ "NotGreaterTilde;": "\u2275",
+ "NotHumpDownHump;": "\u224E\u0338",
+ "NotHumpEqual;": "\u224F\u0338",
+ "notin;": "\u2209",
+ "notindot;": "\u22F5\u0338",
+ "notinE;": "\u22F9\u0338",
+ "notinva;": "\u2209",
+ "notinvb;": "\u22F7",
+ "notinvc;": "\u22F6",
+ "NotLeftTriangleBar;": "\u29CF\u0338",
+ "NotLeftTriangle;": "\u22EA",
+ "NotLeftTriangleEqual;": "\u22EC",
+ "NotLess;": "\u226E",
+ "NotLessEqual;": "\u2270",
+ "NotLessGreater;": "\u2278",
+ "NotLessLess;": "\u226A\u0338",
+ "NotLessSlantEqual;": "\u2A7D\u0338",
+ "NotLessTilde;": "\u2274",
+ "NotNestedGreaterGreater;": "\u2AA2\u0338",
+ "NotNestedLessLess;": "\u2AA1\u0338",
+ "notni;": "\u220C",
+ "notniva;": "\u220C",
+ "notnivb;": "\u22FE",
+ "notnivc;": "\u22FD",
+ "NotPrecedes;": "\u2280",
+ "NotPrecedesEqual;": "\u2AAF\u0338",
+ "NotPrecedesSlantEqual;": "\u22E0",
+ "NotReverseElement;": "\u220C",
+ "NotRightTriangleBar;": "\u29D0\u0338",
+ "NotRightTriangle;": "\u22EB",
+ "NotRightTriangleEqual;": "\u22ED",
+ "NotSquareSubset;": "\u228F\u0338",
+ "NotSquareSubsetEqual;": "\u22E2",
+ "NotSquareSuperset;": "\u2290\u0338",
+ "NotSquareSupersetEqual;": "\u22E3",
+ "NotSubset;": "\u2282\u20D2",
+ "NotSubsetEqual;": "\u2288",
+ "NotSucceeds;": "\u2281",
+ "NotSucceedsEqual;": "\u2AB0\u0338",
+ "NotSucceedsSlantEqual;": "\u22E1",
+ "NotSucceedsTilde;": "\u227F\u0338",
+ "NotSuperset;": "\u2283\u20D2",
+ "NotSupersetEqual;": "\u2289",
+ "NotTilde;": "\u2241",
+ "NotTildeEqual;": "\u2244",
+ "NotTildeFullEqual;": "\u2247",
+ "NotTildeTilde;": "\u2249",
+ "NotVerticalBar;": "\u2224",
+ "nparallel;": "\u2226",
+ "npar;": "\u2226",
+ "nparsl;": "\u2AFD\u20E5",
+ "npart;": "\u2202\u0338",
+ "npolint;": "\u2A14",
+ "npr;": "\u2280",
+ "nprcue;": "\u22E0",
+ "nprec;": "\u2280",
+ "npreceq;": "\u2AAF\u0338",
+ "npre;": "\u2AAF\u0338",
+ "nrarrc;": "\u2933\u0338",
+ "nrarr;": "\u219B",
+ "nrArr;": "\u21CF",
+ "nrarrw;": "\u219D\u0338",
+ "nrightarrow;": "\u219B",
+ "nRightarrow;": "\u21CF",
+ "nrtri;": "\u22EB",
+ "nrtrie;": "\u22ED",
+ "nsc;": "\u2281",
+ "nsccue;": "\u22E1",
+ "nsce;": "\u2AB0\u0338",
+ "Nscr;": "\uD835\uDCA9",
+ "nscr;": "\uD835\uDCC3",
+ "nshortmid;": "\u2224",
+ "nshortparallel;": "\u2226",
+ "nsim;": "\u2241",
+ "nsime;": "\u2244",
+ "nsimeq;": "\u2244",
+ "nsmid;": "\u2224",
+ "nspar;": "\u2226",
+ "nsqsube;": "\u22E2",
+ "nsqsupe;": "\u22E3",
+ "nsub;": "\u2284",
+ "nsubE;": "\u2AC5\u0338",
+ "nsube;": "\u2288",
+ "nsubset;": "\u2282\u20D2",
+ "nsubseteq;": "\u2288",
+ "nsubseteqq;": "\u2AC5\u0338",
+ "nsucc;": "\u2281",
+ "nsucceq;": "\u2AB0\u0338",
+ "nsup;": "\u2285",
+ "nsupE;": "\u2AC6\u0338",
+ "nsupe;": "\u2289",
+ "nsupset;": "\u2283\u20D2",
+ "nsupseteq;": "\u2289",
+ "nsupseteqq;": "\u2AC6\u0338",
+ "ntgl;": "\u2279",
+ "Ntilde;": "\u00D1",
+ "Ntilde": "\u00D1",
+ "ntilde;": "\u00F1",
+ "ntilde": "\u00F1",
+ "ntlg;": "\u2278",
+ "ntriangleleft;": "\u22EA",
+ "ntrianglelefteq;": "\u22EC",
+ "ntriangleright;": "\u22EB",
+ "ntrianglerighteq;": "\u22ED",
+ "Nu;": "\u039D",
+ "nu;": "\u03BD",
+ "num;": "\u0023",
+ "numero;": "\u2116",
+ "numsp;": "\u2007",
+ "nvap;": "\u224D\u20D2",
+ "nvdash;": "\u22AC",
+ "nvDash;": "\u22AD",
+ "nVdash;": "\u22AE",
+ "nVDash;": "\u22AF",
+ "nvge;": "\u2265\u20D2",
+ "nvgt;": "\u003E\u20D2",
+ "nvHarr;": "\u2904",
+ "nvinfin;": "\u29DE",
+ "nvlArr;": "\u2902",
+ "nvle;": "\u2264\u20D2",
+ "nvlt;": "\u003C\u20D2",
+ "nvltrie;": "\u22B4\u20D2",
+ "nvrArr;": "\u2903",
+ "nvrtrie;": "\u22B5\u20D2",
+ "nvsim;": "\u223C\u20D2",
+ "nwarhk;": "\u2923",
+ "nwarr;": "\u2196",
+ "nwArr;": "\u21D6",
+ "nwarrow;": "\u2196",
+ "nwnear;": "\u2927",
+ "Oacute;": "\u00D3",
+ "Oacute": "\u00D3",
+ "oacute;": "\u00F3",
+ "oacute": "\u00F3",
+ "oast;": "\u229B",
+ "Ocirc;": "\u00D4",
+ "Ocirc": "\u00D4",
+ "ocirc;": "\u00F4",
+ "ocirc": "\u00F4",
+ "ocir;": "\u229A",
+ "Ocy;": "\u041E",
+ "ocy;": "\u043E",
+ "odash;": "\u229D",
+ "Odblac;": "\u0150",
+ "odblac;": "\u0151",
+ "odiv;": "\u2A38",
+ "odot;": "\u2299",
+ "odsold;": "\u29BC",
+ "OElig;": "\u0152",
+ "oelig;": "\u0153",
+ "ofcir;": "\u29BF",
+ "Ofr;": "\uD835\uDD12",
+ "ofr;": "\uD835\uDD2C",
+ "ogon;": "\u02DB",
+ "Ograve;": "\u00D2",
+ "Ograve": "\u00D2",
+ "ograve;": "\u00F2",
+ "ograve": "\u00F2",
+ "ogt;": "\u29C1",
+ "ohbar;": "\u29B5",
+ "ohm;": "\u03A9",
+ "oint;": "\u222E",
+ "olarr;": "\u21BA",
+ "olcir;": "\u29BE",
+ "olcross;": "\u29BB",
+ "oline;": "\u203E",
+ "olt;": "\u29C0",
+ "Omacr;": "\u014C",
+ "omacr;": "\u014D",
+ "Omega;": "\u03A9",
+ "omega;": "\u03C9",
+ "Omicron;": "\u039F",
+ "omicron;": "\u03BF",
+ "omid;": "\u29B6",
+ "ominus;": "\u2296",
+ "Oopf;": "\uD835\uDD46",
+ "oopf;": "\uD835\uDD60",
+ "opar;": "\u29B7",
+ "OpenCurlyDoubleQuote;": "\u201C",
+ "OpenCurlyQuote;": "\u2018",
+ "operp;": "\u29B9",
+ "oplus;": "\u2295",
+ "orarr;": "\u21BB",
+ "Or;": "\u2A54",
+ "or;": "\u2228",
+ "ord;": "\u2A5D",
+ "order;": "\u2134",
+ "orderof;": "\u2134",
+ "ordf;": "\u00AA",
+ "ordf": "\u00AA",
+ "ordm;": "\u00BA",
+ "ordm": "\u00BA",
+ "origof;": "\u22B6",
+ "oror;": "\u2A56",
+ "orslope;": "\u2A57",
+ "orv;": "\u2A5B",
+ "oS;": "\u24C8",
+ "Oscr;": "\uD835\uDCAA",
+ "oscr;": "\u2134",
+ "Oslash;": "\u00D8",
+ "Oslash": "\u00D8",
+ "oslash;": "\u00F8",
+ "oslash": "\u00F8",
+ "osol;": "\u2298",
+ "Otilde;": "\u00D5",
+ "Otilde": "\u00D5",
+ "otilde;": "\u00F5",
+ "otilde": "\u00F5",
+ "otimesas;": "\u2A36",
+ "Otimes;": "\u2A37",
+ "otimes;": "\u2297",
+ "Ouml;": "\u00D6",
+ "Ouml": "\u00D6",
+ "ouml;": "\u00F6",
+ "ouml": "\u00F6",
+ "ovbar;": "\u233D",
+ "OverBar;": "\u203E",
+ "OverBrace;": "\u23DE",
+ "OverBracket;": "\u23B4",
+ "OverParenthesis;": "\u23DC",
+ "para;": "\u00B6",
+ "para": "\u00B6",
+ "parallel;": "\u2225",
+ "par;": "\u2225",
+ "parsim;": "\u2AF3",
+ "parsl;": "\u2AFD",
+ "part;": "\u2202",
+ "PartialD;": "\u2202",
+ "Pcy;": "\u041F",
+ "pcy;": "\u043F",
+ "percnt;": "\u0025",
+ "period;": "\u002E",
+ "permil;": "\u2030",
+ "perp;": "\u22A5",
+ "pertenk;": "\u2031",
+ "Pfr;": "\uD835\uDD13",
+ "pfr;": "\uD835\uDD2D",
+ "Phi;": "\u03A6",
+ "phi;": "\u03C6",
+ "phiv;": "\u03D5",
+ "phmmat;": "\u2133",
+ "phone;": "\u260E",
+ "Pi;": "\u03A0",
+ "pi;": "\u03C0",
+ "pitchfork;": "\u22D4",
+ "piv;": "\u03D6",
+ "planck;": "\u210F",
+ "planckh;": "\u210E",
+ "plankv;": "\u210F",
+ "plusacir;": "\u2A23",
+ "plusb;": "\u229E",
+ "pluscir;": "\u2A22",
+ "plus;": "\u002B",
+ "plusdo;": "\u2214",
+ "plusdu;": "\u2A25",
+ "pluse;": "\u2A72",
+ "PlusMinus;": "\u00B1",
+ "plusmn;": "\u00B1",
+ "plusmn": "\u00B1",
+ "plussim;": "\u2A26",
+ "plustwo;": "\u2A27",
+ "pm;": "\u00B1",
+ "Poincareplane;": "\u210C",
+ "pointint;": "\u2A15",
+ "popf;": "\uD835\uDD61",
+ "Popf;": "\u2119",
+ "pound;": "\u00A3",
+ "pound": "\u00A3",
+ "prap;": "\u2AB7",
+ "Pr;": "\u2ABB",
+ "pr;": "\u227A",
+ "prcue;": "\u227C",
+ "precapprox;": "\u2AB7",
+ "prec;": "\u227A",
+ "preccurlyeq;": "\u227C",
+ "Precedes;": "\u227A",
+ "PrecedesEqual;": "\u2AAF",
+ "PrecedesSlantEqual;": "\u227C",
+ "PrecedesTilde;": "\u227E",
+ "preceq;": "\u2AAF",
+ "precnapprox;": "\u2AB9",
+ "precneqq;": "\u2AB5",
+ "precnsim;": "\u22E8",
+ "pre;": "\u2AAF",
+ "prE;": "\u2AB3",
+ "precsim;": "\u227E",
+ "prime;": "\u2032",
+ "Prime;": "\u2033",
+ "primes;": "\u2119",
+ "prnap;": "\u2AB9",
+ "prnE;": "\u2AB5",
+ "prnsim;": "\u22E8",
+ "prod;": "\u220F",
+ "Product;": "\u220F",
+ "profalar;": "\u232E",
+ "profline;": "\u2312",
+ "profsurf;": "\u2313",
+ "prop;": "\u221D",
+ "Proportional;": "\u221D",
+ "Proportion;": "\u2237",
+ "propto;": "\u221D",
+ "prsim;": "\u227E",
+ "prurel;": "\u22B0",
+ "Pscr;": "\uD835\uDCAB",
+ "pscr;": "\uD835\uDCC5",
+ "Psi;": "\u03A8",
+ "psi;": "\u03C8",
+ "puncsp;": "\u2008",
+ "Qfr;": "\uD835\uDD14",
+ "qfr;": "\uD835\uDD2E",
+ "qint;": "\u2A0C",
+ "qopf;": "\uD835\uDD62",
+ "Qopf;": "\u211A",
+ "qprime;": "\u2057",
+ "Qscr;": "\uD835\uDCAC",
+ "qscr;": "\uD835\uDCC6",
+ "quaternions;": "\u210D",
+ "quatint;": "\u2A16",
+ "quest;": "\u003F",
+ "questeq;": "\u225F",
+ "quot;": "\u0022",
+ "quot": "\u0022",
+ "QUOT;": "\u0022",
+ "QUOT": "\u0022",
+ "rAarr;": "\u21DB",
+ "race;": "\u223D\u0331",
+ "Racute;": "\u0154",
+ "racute;": "\u0155",
+ "radic;": "\u221A",
+ "raemptyv;": "\u29B3",
+ "rang;": "\u27E9",
+ "Rang;": "\u27EB",
+ "rangd;": "\u2992",
+ "range;": "\u29A5",
+ "rangle;": "\u27E9",
+ "raquo;": "\u00BB",
+ "raquo": "\u00BB",
+ "rarrap;": "\u2975",
+ "rarrb;": "\u21E5",
+ "rarrbfs;": "\u2920",
+ "rarrc;": "\u2933",
+ "rarr;": "\u2192",
+ "Rarr;": "\u21A0",
+ "rArr;": "\u21D2",
+ "rarrfs;": "\u291E",
+ "rarrhk;": "\u21AA",
+ "rarrlp;": "\u21AC",
+ "rarrpl;": "\u2945",
+ "rarrsim;": "\u2974",
+ "Rarrtl;": "\u2916",
+ "rarrtl;": "\u21A3",
+ "rarrw;": "\u219D",
+ "ratail;": "\u291A",
+ "rAtail;": "\u291C",
+ "ratio;": "\u2236",
+ "rationals;": "\u211A",
+ "rbarr;": "\u290D",
+ "rBarr;": "\u290F",
+ "RBarr;": "\u2910",
+ "rbbrk;": "\u2773",
+ "rbrace;": "\u007D",
+ "rbrack;": "\u005D",
+ "rbrke;": "\u298C",
+ "rbrksld;": "\u298E",
+ "rbrkslu;": "\u2990",
+ "Rcaron;": "\u0158",
+ "rcaron;": "\u0159",
+ "Rcedil;": "\u0156",
+ "rcedil;": "\u0157",
+ "rceil;": "\u2309",
+ "rcub;": "\u007D",
+ "Rcy;": "\u0420",
+ "rcy;": "\u0440",
+ "rdca;": "\u2937",
+ "rdldhar;": "\u2969",
+ "rdquo;": "\u201D",
+ "rdquor;": "\u201D",
+ "rdsh;": "\u21B3",
+ "real;": "\u211C",
+ "realine;": "\u211B",
+ "realpart;": "\u211C",
+ "reals;": "\u211D",
+ "Re;": "\u211C",
+ "rect;": "\u25AD",
+ "reg;": "\u00AE",
+ "reg": "\u00AE",
+ "REG;": "\u00AE",
+ "REG": "\u00AE",
+ "ReverseElement;": "\u220B",
+ "ReverseEquilibrium;": "\u21CB",
+ "ReverseUpEquilibrium;": "\u296F",
+ "rfisht;": "\u297D",
+ "rfloor;": "\u230B",
+ "rfr;": "\uD835\uDD2F",
+ "Rfr;": "\u211C",
+ "rHar;": "\u2964",
+ "rhard;": "\u21C1",
+ "rharu;": "\u21C0",
+ "rharul;": "\u296C",
+ "Rho;": "\u03A1",
+ "rho;": "\u03C1",
+ "rhov;": "\u03F1",
+ "RightAngleBracket;": "\u27E9",
+ "RightArrowBar;": "\u21E5",
+ "rightarrow;": "\u2192",
+ "RightArrow;": "\u2192",
+ "Rightarrow;": "\u21D2",
+ "RightArrowLeftArrow;": "\u21C4",
+ "rightarrowtail;": "\u21A3",
+ "RightCeiling;": "\u2309",
+ "RightDoubleBracket;": "\u27E7",
+ "RightDownTeeVector;": "\u295D",
+ "RightDownVectorBar;": "\u2955",
+ "RightDownVector;": "\u21C2",
+ "RightFloor;": "\u230B",
+ "rightharpoondown;": "\u21C1",
+ "rightharpoonup;": "\u21C0",
+ "rightleftarrows;": "\u21C4",
+ "rightleftharpoons;": "\u21CC",
+ "rightrightarrows;": "\u21C9",
+ "rightsquigarrow;": "\u219D",
+ "RightTeeArrow;": "\u21A6",
+ "RightTee;": "\u22A2",
+ "RightTeeVector;": "\u295B",
+ "rightthreetimes;": "\u22CC",
+ "RightTriangleBar;": "\u29D0",
+ "RightTriangle;": "\u22B3",
+ "RightTriangleEqual;": "\u22B5",
+ "RightUpDownVector;": "\u294F",
+ "RightUpTeeVector;": "\u295C",
+ "RightUpVectorBar;": "\u2954",
+ "RightUpVector;": "\u21BE",
+ "RightVectorBar;": "\u2953",
+ "RightVector;": "\u21C0",
+ "ring;": "\u02DA",
+ "risingdotseq;": "\u2253",
+ "rlarr;": "\u21C4",
+ "rlhar;": "\u21CC",
+ "rlm;": "\u200F",
+ "rmoustache;": "\u23B1",
+ "rmoust;": "\u23B1",
+ "rnmid;": "\u2AEE",
+ "roang;": "\u27ED",
+ "roarr;": "\u21FE",
+ "robrk;": "\u27E7",
+ "ropar;": "\u2986",
+ "ropf;": "\uD835\uDD63",
+ "Ropf;": "\u211D",
+ "roplus;": "\u2A2E",
+ "rotimes;": "\u2A35",
+ "RoundImplies;": "\u2970",
+ "rpar;": "\u0029",
+ "rpargt;": "\u2994",
+ "rppolint;": "\u2A12",
+ "rrarr;": "\u21C9",
+ "Rrightarrow;": "\u21DB",
+ "rsaquo;": "\u203A",
+ "rscr;": "\uD835\uDCC7",
+ "Rscr;": "\u211B",
+ "rsh;": "\u21B1",
+ "Rsh;": "\u21B1",
+ "rsqb;": "\u005D",
+ "rsquo;": "\u2019",
+ "rsquor;": "\u2019",
+ "rthree;": "\u22CC",
+ "rtimes;": "\u22CA",
+ "rtri;": "\u25B9",
+ "rtrie;": "\u22B5",
+ "rtrif;": "\u25B8",
+ "rtriltri;": "\u29CE",
+ "RuleDelayed;": "\u29F4",
+ "ruluhar;": "\u2968",
+ "rx;": "\u211E",
+ "Sacute;": "\u015A",
+ "sacute;": "\u015B",
+ "sbquo;": "\u201A",
+ "scap;": "\u2AB8",
+ "Scaron;": "\u0160",
+ "scaron;": "\u0161",
+ "Sc;": "\u2ABC",
+ "sc;": "\u227B",
+ "sccue;": "\u227D",
+ "sce;": "\u2AB0",
+ "scE;": "\u2AB4",
+ "Scedil;": "\u015E",
+ "scedil;": "\u015F",
+ "Scirc;": "\u015C",
+ "scirc;": "\u015D",
+ "scnap;": "\u2ABA",
+ "scnE;": "\u2AB6",
+ "scnsim;": "\u22E9",
+ "scpolint;": "\u2A13",
+ "scsim;": "\u227F",
+ "Scy;": "\u0421",
+ "scy;": "\u0441",
+ "sdotb;": "\u22A1",
+ "sdot;": "\u22C5",
+ "sdote;": "\u2A66",
+ "searhk;": "\u2925",
+ "searr;": "\u2198",
+ "seArr;": "\u21D8",
+ "searrow;": "\u2198",
+ "sect;": "\u00A7",
+ "sect": "\u00A7",
+ "semi;": "\u003B",
+ "seswar;": "\u2929",
+ "setminus;": "\u2216",
+ "setmn;": "\u2216",
+ "sext;": "\u2736",
+ "Sfr;": "\uD835\uDD16",
+ "sfr;": "\uD835\uDD30",
+ "sfrown;": "\u2322",
+ "sharp;": "\u266F",
+ "SHCHcy;": "\u0429",
+ "shchcy;": "\u0449",
+ "SHcy;": "\u0428",
+ "shcy;": "\u0448",
+ "ShortDownArrow;": "\u2193",
+ "ShortLeftArrow;": "\u2190",
+ "shortmid;": "\u2223",
+ "shortparallel;": "\u2225",
+ "ShortRightArrow;": "\u2192",
+ "ShortUpArrow;": "\u2191",
+ "shy;": "\u00AD",
+ "shy": "\u00AD",
+ "Sigma;": "\u03A3",
+ "sigma;": "\u03C3",
+ "sigmaf;": "\u03C2",
+ "sigmav;": "\u03C2",
+ "sim;": "\u223C",
+ "simdot;": "\u2A6A",
+ "sime;": "\u2243",
+ "simeq;": "\u2243",
+ "simg;": "\u2A9E",
+ "simgE;": "\u2AA0",
+ "siml;": "\u2A9D",
+ "simlE;": "\u2A9F",
+ "simne;": "\u2246",
+ "simplus;": "\u2A24",
+ "simrarr;": "\u2972",
+ "slarr;": "\u2190",
+ "SmallCircle;": "\u2218",
+ "smallsetminus;": "\u2216",
+ "smashp;": "\u2A33",
+ "smeparsl;": "\u29E4",
+ "smid;": "\u2223",
+ "smile;": "\u2323",
+ "smt;": "\u2AAA",
+ "smte;": "\u2AAC",
+ "smtes;": "\u2AAC\uFE00",
+ "SOFTcy;": "\u042C",
+ "softcy;": "\u044C",
+ "solbar;": "\u233F",
+ "solb;": "\u29C4",
+ "sol;": "\u002F",
+ "Sopf;": "\uD835\uDD4A",
+ "sopf;": "\uD835\uDD64",
+ "spades;": "\u2660",
+ "spadesuit;": "\u2660",
+ "spar;": "\u2225",
+ "sqcap;": "\u2293",
+ "sqcaps;": "\u2293\uFE00",
+ "sqcup;": "\u2294",
+ "sqcups;": "\u2294\uFE00",
+ "Sqrt;": "\u221A",
+ "sqsub;": "\u228F",
+ "sqsube;": "\u2291",
+ "sqsubset;": "\u228F",
+ "sqsubseteq;": "\u2291",
+ "sqsup;": "\u2290",
+ "sqsupe;": "\u2292",
+ "sqsupset;": "\u2290",
+ "sqsupseteq;": "\u2292",
+ "square;": "\u25A1",
+ "Square;": "\u25A1",
+ "SquareIntersection;": "\u2293",
+ "SquareSubset;": "\u228F",
+ "SquareSubsetEqual;": "\u2291",
+ "SquareSuperset;": "\u2290",
+ "SquareSupersetEqual;": "\u2292",
+ "SquareUnion;": "\u2294",
+ "squarf;": "\u25AA",
+ "squ;": "\u25A1",
+ "squf;": "\u25AA",
+ "srarr;": "\u2192",
+ "Sscr;": "\uD835\uDCAE",
+ "sscr;": "\uD835\uDCC8",
+ "ssetmn;": "\u2216",
+ "ssmile;": "\u2323",
+ "sstarf;": "\u22C6",
+ "Star;": "\u22C6",
+ "star;": "\u2606",
+ "starf;": "\u2605",
+ "straightepsilon;": "\u03F5",
+ "straightphi;": "\u03D5",
+ "strns;": "\u00AF",
+ "sub;": "\u2282",
+ "Sub;": "\u22D0",
+ "subdot;": "\u2ABD",
+ "subE;": "\u2AC5",
+ "sube;": "\u2286",
+ "subedot;": "\u2AC3",
+ "submult;": "\u2AC1",
+ "subnE;": "\u2ACB",
+ "subne;": "\u228A",
+ "subplus;": "\u2ABF",
+ "subrarr;": "\u2979",
+ "subset;": "\u2282",
+ "Subset;": "\u22D0",
+ "subseteq;": "\u2286",
+ "subseteqq;": "\u2AC5",
+ "SubsetEqual;": "\u2286",
+ "subsetneq;": "\u228A",
+ "subsetneqq;": "\u2ACB",
+ "subsim;": "\u2AC7",
+ "subsub;": "\u2AD5",
+ "subsup;": "\u2AD3",
+ "succapprox;": "\u2AB8",
+ "succ;": "\u227B",
+ "succcurlyeq;": "\u227D",
+ "Succeeds;": "\u227B",
+ "SucceedsEqual;": "\u2AB0",
+ "SucceedsSlantEqual;": "\u227D",
+ "SucceedsTilde;": "\u227F",
+ "succeq;": "\u2AB0",
+ "succnapprox;": "\u2ABA",
+ "succneqq;": "\u2AB6",
+ "succnsim;": "\u22E9",
+ "succsim;": "\u227F",
+ "SuchThat;": "\u220B",
+ "sum;": "\u2211",
+ "Sum;": "\u2211",
+ "sung;": "\u266A",
+ "sup1;": "\u00B9",
+ "sup1": "\u00B9",
+ "sup2;": "\u00B2",
+ "sup2": "\u00B2",
+ "sup3;": "\u00B3",
+ "sup3": "\u00B3",
+ "sup;": "\u2283",
+ "Sup;": "\u22D1",
+ "supdot;": "\u2ABE",
+ "supdsub;": "\u2AD8",
+ "supE;": "\u2AC6",
+ "supe;": "\u2287",
+ "supedot;": "\u2AC4",
+ "Superset;": "\u2283",
+ "SupersetEqual;": "\u2287",
+ "suphsol;": "\u27C9",
+ "suphsub;": "\u2AD7",
+ "suplarr;": "\u297B",
+ "supmult;": "\u2AC2",
+ "supnE;": "\u2ACC",
+ "supne;": "\u228B",
+ "supplus;": "\u2AC0",
+ "supset;": "\u2283",
+ "Supset;": "\u22D1",
+ "supseteq;": "\u2287",
+ "supseteqq;": "\u2AC6",
+ "supsetneq;": "\u228B",
+ "supsetneqq;": "\u2ACC",
+ "supsim;": "\u2AC8",
+ "supsub;": "\u2AD4",
+ "supsup;": "\u2AD6",
+ "swarhk;": "\u2926",
+ "swarr;": "\u2199",
+ "swArr;": "\u21D9",
+ "swarrow;": "\u2199",
+ "swnwar;": "\u292A",
+ "szlig;": "\u00DF",
+ "szlig": "\u00DF",
+ "Tab;": "\u0009",
+ "target;": "\u2316",
+ "Tau;": "\u03A4",
+ "tau;": "\u03C4",
+ "tbrk;": "\u23B4",
+ "Tcaron;": "\u0164",
+ "tcaron;": "\u0165",
+ "Tcedil;": "\u0162",
+ "tcedil;": "\u0163",
+ "Tcy;": "\u0422",
+ "tcy;": "\u0442",
+ "tdot;": "\u20DB",
+ "telrec;": "\u2315",
+ "Tfr;": "\uD835\uDD17",
+ "tfr;": "\uD835\uDD31",
+ "there4;": "\u2234",
+ "therefore;": "\u2234",
+ "Therefore;": "\u2234",
+ "Theta;": "\u0398",
+ "theta;": "\u03B8",
+ "thetasym;": "\u03D1",
+ "thetav;": "\u03D1",
+ "thickapprox;": "\u2248",
+ "thicksim;": "\u223C",
+ "ThickSpace;": "\u205F\u200A",
+ "ThinSpace;": "\u2009",
+ "thinsp;": "\u2009",
+ "thkap;": "\u2248",
+ "thksim;": "\u223C",
+ "THORN;": "\u00DE",
+ "THORN": "\u00DE",
+ "thorn;": "\u00FE",
+ "thorn": "\u00FE",
+ "tilde;": "\u02DC",
+ "Tilde;": "\u223C",
+ "TildeEqual;": "\u2243",
+ "TildeFullEqual;": "\u2245",
+ "TildeTilde;": "\u2248",
+ "timesbar;": "\u2A31",
+ "timesb;": "\u22A0",
+ "times;": "\u00D7",
+ "times": "\u00D7",
+ "timesd;": "\u2A30",
+ "tint;": "\u222D",
+ "toea;": "\u2928",
+ "topbot;": "\u2336",
+ "topcir;": "\u2AF1",
+ "top;": "\u22A4",
+ "Topf;": "\uD835\uDD4B",
+ "topf;": "\uD835\uDD65",
+ "topfork;": "\u2ADA",
+ "tosa;": "\u2929",
+ "tprime;": "\u2034",
+ "trade;": "\u2122",
+ "TRADE;": "\u2122",
+ "triangle;": "\u25B5",
+ "triangledown;": "\u25BF",
+ "triangleleft;": "\u25C3",
+ "trianglelefteq;": "\u22B4",
+ "triangleq;": "\u225C",
+ "triangleright;": "\u25B9",
+ "trianglerighteq;": "\u22B5",
+ "tridot;": "\u25EC",
+ "trie;": "\u225C",
+ "triminus;": "\u2A3A",
+ "TripleDot;": "\u20DB",
+ "triplus;": "\u2A39",
+ "trisb;": "\u29CD",
+ "tritime;": "\u2A3B",
+ "trpezium;": "\u23E2",
+ "Tscr;": "\uD835\uDCAF",
+ "tscr;": "\uD835\uDCC9",
+ "TScy;": "\u0426",
+ "tscy;": "\u0446",
+ "TSHcy;": "\u040B",
+ "tshcy;": "\u045B",
+ "Tstrok;": "\u0166",
+ "tstrok;": "\u0167",
+ "twixt;": "\u226C",
+ "twoheadleftarrow;": "\u219E",
+ "twoheadrightarrow;": "\u21A0",
+ "Uacute;": "\u00DA",
+ "Uacute": "\u00DA",
+ "uacute;": "\u00FA",
+ "uacute": "\u00FA",
+ "uarr;": "\u2191",
+ "Uarr;": "\u219F",
+ "uArr;": "\u21D1",
+ "Uarrocir;": "\u2949",
+ "Ubrcy;": "\u040E",
+ "ubrcy;": "\u045E",
+ "Ubreve;": "\u016C",
+ "ubreve;": "\u016D",
+ "Ucirc;": "\u00DB",
+ "Ucirc": "\u00DB",
+ "ucirc;": "\u00FB",
+ "ucirc": "\u00FB",
+ "Ucy;": "\u0423",
+ "ucy;": "\u0443",
+ "udarr;": "\u21C5",
+ "Udblac;": "\u0170",
+ "udblac;": "\u0171",
+ "udhar;": "\u296E",
+ "ufisht;": "\u297E",
+ "Ufr;": "\uD835\uDD18",
+ "ufr;": "\uD835\uDD32",
+ "Ugrave;": "\u00D9",
+ "Ugrave": "\u00D9",
+ "ugrave;": "\u00F9",
+ "ugrave": "\u00F9",
+ "uHar;": "\u2963",
+ "uharl;": "\u21BF",
+ "uharr;": "\u21BE",
+ "uhblk;": "\u2580",
+ "ulcorn;": "\u231C",
+ "ulcorner;": "\u231C",
+ "ulcrop;": "\u230F",
+ "ultri;": "\u25F8",
+ "Umacr;": "\u016A",
+ "umacr;": "\u016B",
+ "uml;": "\u00A8",
+ "uml": "\u00A8",
+ "UnderBar;": "\u005F",
+ "UnderBrace;": "\u23DF",
+ "UnderBracket;": "\u23B5",
+ "UnderParenthesis;": "\u23DD",
+ "Union;": "\u22C3",
+ "UnionPlus;": "\u228E",
+ "Uogon;": "\u0172",
+ "uogon;": "\u0173",
+ "Uopf;": "\uD835\uDD4C",
+ "uopf;": "\uD835\uDD66",
+ "UpArrowBar;": "\u2912",
+ "uparrow;": "\u2191",
+ "UpArrow;": "\u2191",
+ "Uparrow;": "\u21D1",
+ "UpArrowDownArrow;": "\u21C5",
+ "updownarrow;": "\u2195",
+ "UpDownArrow;": "\u2195",
+ "Updownarrow;": "\u21D5",
+ "UpEquilibrium;": "\u296E",
+ "upharpoonleft;": "\u21BF",
+ "upharpoonright;": "\u21BE",
+ "uplus;": "\u228E",
+ "UpperLeftArrow;": "\u2196",
+ "UpperRightArrow;": "\u2197",
+ "upsi;": "\u03C5",
+ "Upsi;": "\u03D2",
+ "upsih;": "\u03D2",
+ "Upsilon;": "\u03A5",
+ "upsilon;": "\u03C5",
+ "UpTeeArrow;": "\u21A5",
+ "UpTee;": "\u22A5",
+ "upuparrows;": "\u21C8",
+ "urcorn;": "\u231D",
+ "urcorner;": "\u231D",
+ "urcrop;": "\u230E",
+ "Uring;": "\u016E",
+ "uring;": "\u016F",
+ "urtri;": "\u25F9",
+ "Uscr;": "\uD835\uDCB0",
+ "uscr;": "\uD835\uDCCA",
+ "utdot;": "\u22F0",
+ "Utilde;": "\u0168",
+ "utilde;": "\u0169",
+ "utri;": "\u25B5",
+ "utrif;": "\u25B4",
+ "uuarr;": "\u21C8",
+ "Uuml;": "\u00DC",
+ "Uuml": "\u00DC",
+ "uuml;": "\u00FC",
+ "uuml": "\u00FC",
+ "uwangle;": "\u29A7",
+ "vangrt;": "\u299C",
+ "varepsilon;": "\u03F5",
+ "varkappa;": "\u03F0",
+ "varnothing;": "\u2205",
+ "varphi;": "\u03D5",
+ "varpi;": "\u03D6",
+ "varpropto;": "\u221D",
+ "varr;": "\u2195",
+ "vArr;": "\u21D5",
+ "varrho;": "\u03F1",
+ "varsigma;": "\u03C2",
+ "varsubsetneq;": "\u228A\uFE00",
+ "varsubsetneqq;": "\u2ACB\uFE00",
+ "varsupsetneq;": "\u228B\uFE00",
+ "varsupsetneqq;": "\u2ACC\uFE00",
+ "vartheta;": "\u03D1",
+ "vartriangleleft;": "\u22B2",
+ "vartriangleright;": "\u22B3",
+ "vBar;": "\u2AE8",
+ "Vbar;": "\u2AEB",
+ "vBarv;": "\u2AE9",
+ "Vcy;": "\u0412",
+ "vcy;": "\u0432",
+ "vdash;": "\u22A2",
+ "vDash;": "\u22A8",
+ "Vdash;": "\u22A9",
+ "VDash;": "\u22AB",
+ "Vdashl;": "\u2AE6",
+ "veebar;": "\u22BB",
+ "vee;": "\u2228",
+ "Vee;": "\u22C1",
+ "veeeq;": "\u225A",
+ "vellip;": "\u22EE",
+ "verbar;": "\u007C",
+ "Verbar;": "\u2016",
+ "vert;": "\u007C",
+ "Vert;": "\u2016",
+ "VerticalBar;": "\u2223",
+ "VerticalLine;": "\u007C",
+ "VerticalSeparator;": "\u2758",
+ "VerticalTilde;": "\u2240",
+ "VeryThinSpace;": "\u200A",
+ "Vfr;": "\uD835\uDD19",
+ "vfr;": "\uD835\uDD33",
+ "vltri;": "\u22B2",
+ "vnsub;": "\u2282\u20D2",
+ "vnsup;": "\u2283\u20D2",
+ "Vopf;": "\uD835\uDD4D",
+ "vopf;": "\uD835\uDD67",
+ "vprop;": "\u221D",
+ "vrtri;": "\u22B3",
+ "Vscr;": "\uD835\uDCB1",
+ "vscr;": "\uD835\uDCCB",
+ "vsubnE;": "\u2ACB\uFE00",
+ "vsubne;": "\u228A\uFE00",
+ "vsupnE;": "\u2ACC\uFE00",
+ "vsupne;": "\u228B\uFE00",
+ "Vvdash;": "\u22AA",
+ "vzigzag;": "\u299A",
+ "Wcirc;": "\u0174",
+ "wcirc;": "\u0175",
+ "wedbar;": "\u2A5F",
+ "wedge;": "\u2227",
+ "Wedge;": "\u22C0",
+ "wedgeq;": "\u2259",
+ "weierp;": "\u2118",
+ "Wfr;": "\uD835\uDD1A",
+ "wfr;": "\uD835\uDD34",
+ "Wopf;": "\uD835\uDD4E",
+ "wopf;": "\uD835\uDD68",
+ "wp;": "\u2118",
+ "wr;": "\u2240",
+ "wreath;": "\u2240",
+ "Wscr;": "\uD835\uDCB2",
+ "wscr;": "\uD835\uDCCC",
+ "xcap;": "\u22C2",
+ "xcirc;": "\u25EF",
+ "xcup;": "\u22C3",
+ "xdtri;": "\u25BD",
+ "Xfr;": "\uD835\uDD1B",
+ "xfr;": "\uD835\uDD35",
+ "xharr;": "\u27F7",
+ "xhArr;": "\u27FA",
+ "Xi;": "\u039E",
+ "xi;": "\u03BE",
+ "xlarr;": "\u27F5",
+ "xlArr;": "\u27F8",
+ "xmap;": "\u27FC",
+ "xnis;": "\u22FB",
+ "xodot;": "\u2A00",
+ "Xopf;": "\uD835\uDD4F",
+ "xopf;": "\uD835\uDD69",
+ "xoplus;": "\u2A01",
+ "xotime;": "\u2A02",
+ "xrarr;": "\u27F6",
+ "xrArr;": "\u27F9",
+ "Xscr;": "\uD835\uDCB3",
+ "xscr;": "\uD835\uDCCD",
+ "xsqcup;": "\u2A06",
+ "xuplus;": "\u2A04",
+ "xutri;": "\u25B3",
+ "xvee;": "\u22C1",
+ "xwedge;": "\u22C0",
+ "Yacute;": "\u00DD",
+ "Yacute": "\u00DD",
+ "yacute;": "\u00FD",
+ "yacute": "\u00FD",
+ "YAcy;": "\u042F",
+ "yacy;": "\u044F",
+ "Ycirc;": "\u0176",
+ "ycirc;": "\u0177",
+ "Ycy;": "\u042B",
+ "ycy;": "\u044B",
+ "yen;": "\u00A5",
+ "yen": "\u00A5",
+ "Yfr;": "\uD835\uDD1C",
+ "yfr;": "\uD835\uDD36",
+ "YIcy;": "\u0407",
+ "yicy;": "\u0457",
+ "Yopf;": "\uD835\uDD50",
+ "yopf;": "\uD835\uDD6A",
+ "Yscr;": "\uD835\uDCB4",
+ "yscr;": "\uD835\uDCCE",
+ "YUcy;": "\u042E",
+ "yucy;": "\u044E",
+ "yuml;": "\u00FF",
+ "yuml": "\u00FF",
+ "Yuml;": "\u0178",
+ "Zacute;": "\u0179",
+ "zacute;": "\u017A",
+ "Zcaron;": "\u017D",
+ "zcaron;": "\u017E",
+ "Zcy;": "\u0417",
+ "zcy;": "\u0437",
+ "Zdot;": "\u017B",
+ "zdot;": "\u017C",
+ "zeetrf;": "\u2128",
+ "ZeroWidthSpace;": "\u200B",
+ "Zeta;": "\u0396",
+ "zeta;": "\u03B6",
+ "zfr;": "\uD835\uDD37",
+ "Zfr;": "\u2128",
+ "ZHcy;": "\u0416",
+ "zhcy;": "\u0436",
+ "zigrarr;": "\u21DD",
+ "zopf;": "\uD835\uDD6B",
+ "Zopf;": "\u2124",
+ "Zscr;": "\uD835\uDCB5",
+ "zscr;": "\uD835\uDCCF",
+ "zwj;": "\u200D",
+ "zwnj;": "\u200C"
+};
+
+},
+{}],
+13:[function(_dereq_,module,exports){
+var util = _dereq_('util/');
+
+var pSlice = Array.prototype.slice;
+var hasOwn = Object.prototype.hasOwnProperty;
+
+var assert = module.exports = ok;
+
+assert.AssertionError = function AssertionError(options) {
+ this.name = 'AssertionError';
+ this.actual = options.actual;
+ this.expected = options.expected;
+ this.operator = options.operator;
+ if (options.message) {
+ this.message = options.message;
+ this.generatedMessage = false;
+ } else {
+ this.message = getMessage(this);
+ this.generatedMessage = true;
+ }
+ var stackStartFunction = options.stackStartFunction || fail;
+
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, stackStartFunction);
+ }
+ else {
+ var err = new Error();
+ if (err.stack) {
+ var out = err.stack;
+ var fn_name = stackStartFunction.name;
+ var idx = out.indexOf('\n' + fn_name);
+ if (idx >= 0) {
+ var next_line = out.indexOf('\n', idx + 1);
+ out = out.substring(next_line + 1);
+ }
+
+ this.stack = out;
+ }
+ }
+};
+util.inherits(assert.AssertionError, Error);
+
+function replacer(key, value) {
+ if (util.isUndefined(value)) {
+ return '' + value;
+ }
+ if (util.isNumber(value) && (isNaN(value) || !isFinite(value))) {
+ return value.toString();
+ }
+ if (util.isFunction(value) || util.isRegExp(value)) {
+ return value.toString();
+ }
+ return value;
+}
+
+function truncate(s, n) {
+ if (util.isString(s)) {
+ return s.length < n ? s : s.slice(0, n);
+ } else {
+ return s;
+ }
+}
+
+function getMessage(self) {
+ return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' +
+ self.operator + ' ' +
+ truncate(JSON.stringify(self.expected, replacer), 128);
+}
+
+function fail(actual, expected, message, operator, stackStartFunction) {
+ throw new assert.AssertionError({
+ message: message,
+ actual: actual,
+ expected: expected,
+ operator: operator,
+ stackStartFunction: stackStartFunction
+ });
+}
+assert.fail = fail;
+
+function ok(value, message) {
+ if (!value) fail(value, true, message, '==', assert.ok);
+}
+assert.ok = ok;
+
+assert.equal = function equal(actual, expected, message) {
+ if (actual != expected) fail(actual, expected, message, '==', assert.equal);
+};
+
+assert.notEqual = function notEqual(actual, expected, message) {
+ if (actual == expected) {
+ fail(actual, expected, message, '!=', assert.notEqual);
+ }
+};
+
+assert.deepEqual = function deepEqual(actual, expected, message) {
+ if (!_deepEqual(actual, expected)) {
+ fail(actual, expected, message, 'deepEqual', assert.deepEqual);
+ }
+};
+
+function _deepEqual(actual, expected) {
+ if (actual === expected) {
+ return true;
+
+ } else if (util.isBuffer(actual) && util.isBuffer(expected)) {
+ if (actual.length != expected.length) return false;
+
+ for (var i = 0; i < actual.length; i++) {
+ if (actual[i] !== expected[i]) return false;
+ }
+
+ return true;
+ } else if (util.isDate(actual) && util.isDate(expected)) {
+ return actual.getTime() === expected.getTime();
+ } else if (util.isRegExp(actual) && util.isRegExp(expected)) {
+ return actual.source === expected.source &&
+ actual.global === expected.global &&
+ actual.multiline === expected.multiline &&
+ actual.lastIndex === expected.lastIndex &&
+ actual.ignoreCase === expected.ignoreCase;
+ } else if (!util.isObject(actual) && !util.isObject(expected)) {
+ return actual == expected;
+ } else {
+ return objEquiv(actual, expected);
+ }
+}
+
+function isArguments(object) {
+ return Object.prototype.toString.call(object) == '[object Arguments]';
+}
+
+function objEquiv(a, b) {
+ if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b))
+ return false;
+ if (a.prototype !== b.prototype) return false;
+ if (isArguments(a)) {
+ if (!isArguments(b)) {
+ return false;
+ }
+ a = pSlice.call(a);
+ b = pSlice.call(b);
+ return _deepEqual(a, b);
+ }
+ try {
+ var ka = objectKeys(a),
+ kb = objectKeys(b),
+ key, i;
+ } catch (e) {//happens when one is a string literal and the other isn't
+ return false;
+ }
+ if (ka.length != kb.length)
+ return false;
+ ka.sort();
+ kb.sort();
+ for (i = ka.length - 1; i >= 0; i--) {
+ if (ka[i] != kb[i])
+ return false;
+ }
+ for (i = ka.length - 1; i >= 0; i--) {
+ key = ka[i];
+ if (!_deepEqual(a[key], b[key])) return false;
+ }
+ return true;
+}
+
+assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
+ if (_deepEqual(actual, expected)) {
+ fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
+ }
+};
+
+assert.strictEqual = function strictEqual(actual, expected, message) {
+ if (actual !== expected) {
+ fail(actual, expected, message, '===', assert.strictEqual);
+ }
+};
+
+assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
+ if (actual === expected) {
+ fail(actual, expected, message, '!==', assert.notStrictEqual);
+ }
+};
+
+function expectedException(actual, expected) {
+ if (!actual || !expected) {
+ return false;
+ }
+
+ if (Object.prototype.toString.call(expected) == '[object RegExp]') {
+ return expected.test(actual);
+ } else if (actual instanceof expected) {
+ return true;
+ } else if (expected.call({}, actual) === true) {
+ return true;
+ }
+
+ return false;
+}
+
+function _throws(shouldThrow, block, expected, message) {
+ var actual;
+
+ if (util.isString(expected)) {
+ message = expected;
+ expected = null;
+ }
+
+ try {
+ block();
+ } catch (e) {
+ actual = e;
+ }
+
+ message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +
+ (message ? ' ' + message : '.');
+
+ if (shouldThrow && !actual) {
+ fail(actual, expected, 'Missing expected exception' + message);
+ }
+
+ if (!shouldThrow && expectedException(actual, expected)) {
+ fail(actual, expected, 'Got unwanted exception' + message);
+ }
+
+ if ((shouldThrow && actual && expected &&
+ !expectedException(actual, expected)) || (!shouldThrow && actual)) {
+ throw actual;
+ }
+}
+
+assert.throws = function(block, /*optional*/error, /*optional*/message) {
+ _throws.apply(this, [true].concat(pSlice.call(arguments)));
+};
+assert.doesNotThrow = function(block, /*optional*/message) {
+ _throws.apply(this, [false].concat(pSlice.call(arguments)));
+};
+
+assert.ifError = function(err) { if (err) {throw err;}};
+
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ if (hasOwn.call(obj, key)) keys.push(key);
+ }
+ return keys;
+};
+
+},
+{"util/":15}],
+14:[function(_dereq_,module,exports){
+module.exports = function isBuffer(arg) {
+ return arg && typeof arg === 'object'
+ && typeof arg.copy === 'function'
+ && typeof arg.fill === 'function'
+ && typeof arg.readUInt8 === 'function';
+}
+},
+{}],
+15:[function(_dereq_,module,exports){
+(function (process,global){
+
+var formatRegExp = /%[sdj%]/g;
+exports.format = function(f) {
+ if (!isString(f)) {
+ var objects = [];
+ for (var i = 0; i < arguments.length; i++) {
+ objects.push(inspect(arguments[i]));
+ }
+ return objects.join(' ');
+ }
+
+ var i = 1;
+ var args = arguments;
+ var len = args.length;
+ var str = String(f).replace(formatRegExp, function(x) {
+ if (x === '%%') return '%';
+ if (i >= len) return x;
+ switch (x) {
+ case '%s': return String(args[i++]);
+ case '%d': return Number(args[i++]);
+ case '%j':
+ try {
+ return JSON.stringify(args[i++]);
+ } catch (_) {
+ return '[Circular]';
+ }
+ default:
+ return x;
+ }
+ });
+ for (var x = args[i]; i < len; x = args[++i]) {
+ if (isNull(x) || !isObject(x)) {
+ str += ' ' + x;
+ } else {
+ str += ' ' + inspect(x);
+ }
+ }
+ return str;
+};
+exports.deprecate = function(fn, msg) {
+ if (isUndefined(global.process)) {
+ return function() {
+ return exports.deprecate(fn, msg).apply(this, arguments);
+ };
+ }
+
+ if (process.noDeprecation === true) {
+ return fn;
+ }
+
+ var warned = false;
+ function deprecated() {
+ if (!warned) {
+ if (process.throwDeprecation) {
+ throw new Error(msg);
+ } else if (process.traceDeprecation) {
+ console.trace(msg);
+ } else {
+ console.error(msg);
+ }
+ warned = true;
+ }
+ return fn.apply(this, arguments);
+ }
+
+ return deprecated;
+};
+
+
+var debugs = {};
+var debugEnviron;
+exports.debuglog = function(set) {
+ if (isUndefined(debugEnviron))
+ debugEnviron = process.env.NODE_DEBUG || '';
+ set = set.toUpperCase();
+ if (!debugs[set]) {
+ if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
+ var pid = process.pid;
+ debugs[set] = function() {
+ var msg = exports.format.apply(exports, arguments);
+ console.error('%s %d: %s', set, pid, msg);
+ };
+ } else {
+ debugs[set] = function() {};
+ }
+ }
+ return debugs[set];
+};
+function inspect(obj, opts) {
+ var ctx = {
+ seen: [],
+ stylize: stylizeNoColor
+ };
+ if (arguments.length >= 3) ctx.depth = arguments[2];
+ if (arguments.length >= 4) ctx.colors = arguments[3];
+ if (isBoolean(opts)) {
+ ctx.showHidden = opts;
+ } else if (opts) {
+ exports._extend(ctx, opts);
+ }
+ if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
+ if (isUndefined(ctx.depth)) ctx.depth = 2;
+ if (isUndefined(ctx.colors)) ctx.colors = false;
+ if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
+ if (ctx.colors) ctx.stylize = stylizeWithColor;
+ return formatValue(ctx, obj, ctx.depth);
+}
+exports.inspect = inspect;
+inspect.colors = {
+ 'bold' : [1, 22],
+ 'italic' : [3, 23],
+ 'underline' : [4, 24],
+ 'inverse' : [7, 27],
+ 'white' : [37, 39],
+ 'grey' : [90, 39],
+ 'black' : [30, 39],
+ 'blue' : [34, 39],
+ 'cyan' : [36, 39],
+ 'green' : [32, 39],
+ 'magenta' : [35, 39],
+ 'red' : [31, 39],
+ 'yellow' : [33, 39]
+};
+inspect.styles = {
+ 'special': 'cyan',
+ 'number': 'yellow',
+ 'boolean': 'yellow',
+ 'undefined': 'grey',
+ 'null': 'bold',
+ 'string': 'green',
+ 'date': 'magenta',
+ 'regexp': 'red'
+};
+
+
+function stylizeWithColor(str, styleType) {
+ var style = inspect.styles[styleType];
+
+ if (style) {
+ return '\u001b[' + inspect.colors[style][0] + 'm' + str +
+ '\u001b[' + inspect.colors[style][1] + 'm';
+ } else {
+ return str;
+ }
+}
+
+
+function stylizeNoColor(str, styleType) {
+ return str;
+}
+
+
+function arrayToHash(array) {
+ var hash = {};
+
+ array.forEach(function(val, idx) {
+ hash[val] = true;
+ });
+
+ return hash;
+}
+
+
+function formatValue(ctx, value, recurseTimes) {
+ if (ctx.customInspect &&
+ value &&
+ isFunction(value.inspect) &&
+ value.inspect !== exports.inspect &&
+ !(value.constructor && value.constructor.prototype === value)) {
+ var ret = value.inspect(recurseTimes, ctx);
+ if (!isString(ret)) {
+ ret = formatValue(ctx, ret, recurseTimes);
+ }
+ return ret;
+ }
+ var primitive = formatPrimitive(ctx, value);
+ if (primitive) {
+ return primitive;
+ }
+ var keys = Object.keys(value);
+ var visibleKeys = arrayToHash(keys);
+
+ if (ctx.showHidden) {
+ keys = Object.getOwnPropertyNames(value);
+ }
+ if (isError(value)
+ && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
+ return formatError(value);
+ }
+ if (keys.length === 0) {
+ if (isFunction(value)) {
+ var name = value.name ? ': ' + value.name : '';
+ return ctx.stylize('[Function' + name + ']', 'special');
+ }
+ if (isRegExp(value)) {
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+ }
+ if (isDate(value)) {
+ return ctx.stylize(Date.prototype.toString.call(value), 'date');
+ }
+ if (isError(value)) {
+ return formatError(value);
+ }
+ }
+
+ var base = '', array = false, braces = ['{', '}'];
+ if (isArray(value)) {
+ array = true;
+ braces = ['[', ']'];
+ }
+ if (isFunction(value)) {
+ var n = value.name ? ': ' + value.name : '';
+ base = ' [Function' + n + ']';
+ }
+ if (isRegExp(value)) {
+ base = ' ' + RegExp.prototype.toString.call(value);
+ }
+ if (isDate(value)) {
+ base = ' ' + Date.prototype.toUTCString.call(value);
+ }
+ if (isError(value)) {
+ base = ' ' + formatError(value);
+ }
+
+ if (keys.length === 0 && (!array || value.length == 0)) {
+ return braces[0] + base + braces[1];
+ }
+
+ if (recurseTimes < 0) {
+ if (isRegExp(value)) {
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+ } else {
+ return ctx.stylize('[Object]', 'special');
+ }
+ }
+
+ ctx.seen.push(value);
+
+ var output;
+ if (array) {
+ output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
+ } else {
+ output = keys.map(function(key) {
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
+ });
+ }
+
+ ctx.seen.pop();
+
+ return reduceToSingleString(output, base, braces);
+}
+
+
+function formatPrimitive(ctx, value) {
+ if (isUndefined(value))
+ return ctx.stylize('undefined', 'undefined');
+ if (isString(value)) {
+ var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
+ .replace(/'/g, "\\'")
+ .replace(/\\"/g, '"') + '\'';
+ return ctx.stylize(simple, 'string');
+ }
+ if (isNumber(value))
+ return ctx.stylize('' + value, 'number');
+ if (isBoolean(value))
+ return ctx.stylize('' + value, 'boolean');
+ if (isNull(value))
+ return ctx.stylize('null', 'null');
+}
+
+
+function formatError(value) {
+ return '[' + Error.prototype.toString.call(value) + ']';
+}
+
+
+function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
+ var output = [];
+ for (var i = 0, l = value.length; i < l; ++i) {
+ if (hasOwnProperty(value, String(i))) {
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+ String(i), true));
+ } else {
+ output.push('');
+ }
+ }
+ keys.forEach(function(key) {
+ if (!key.match(/^\d+$/)) {
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+ key, true));
+ }
+ });
+ return output;
+}
+
+
+function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
+ var name, str, desc;
+ desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
+ if (desc.get) {
+ if (desc.set) {
+ str = ctx.stylize('[Getter/Setter]', 'special');
+ } else {
+ str = ctx.stylize('[Getter]', 'special');
+ }
+ } else {
+ if (desc.set) {
+ str = ctx.stylize('[Setter]', 'special');
+ }
+ }
+ if (!hasOwnProperty(visibleKeys, key)) {
+ name = '[' + key + ']';
+ }
+ if (!str) {
+ if (ctx.seen.indexOf(desc.value) < 0) {
+ if (isNull(recurseTimes)) {
+ str = formatValue(ctx, desc.value, null);
+ } else {
+ str = formatValue(ctx, desc.value, recurseTimes - 1);
+ }
+ if (str.indexOf('\n') > -1) {
+ if (array) {
+ str = str.split('\n').map(function(line) {
+ return ' ' + line;
+ }).join('\n').substr(2);
+ } else {
+ str = '\n' + str.split('\n').map(function(line) {
+ return ' ' + line;
+ }).join('\n');
+ }
+ }
+ } else {
+ str = ctx.stylize('[Circular]', 'special');
+ }
+ }
+ if (isUndefined(name)) {
+ if (array && key.match(/^\d+$/)) {
+ return str;
+ }
+ name = JSON.stringify('' + key);
+ if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
+ name = name.substr(1, name.length - 2);
+ name = ctx.stylize(name, 'name');
+ } else {
+ name = name.replace(/'/g, "\\'")
+ .replace(/\\"/g, '"')
+ .replace(/(^"|"$)/g, "'");
+ name = ctx.stylize(name, 'string');
+ }
+ }
+
+ return name + ': ' + str;
+}
+
+
+function reduceToSingleString(output, base, braces) {
+ var numLinesEst = 0;
+ var length = output.reduce(function(prev, cur) {
+ numLinesEst++;
+ if (cur.indexOf('\n') >= 0) numLinesEst++;
+ return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
+ }, 0);
+
+ if (length > 60) {
+ return braces[0] +
+ (base === '' ? '' : base + '\n ') +
+ ' ' +
+ output.join(',\n ') +
+ ' ' +
+ braces[1];
+ }
+
+ return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
+}
+function isArray(ar) {
+ return Array.isArray(ar);
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+ return isObject(re) && objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return isObject(d) && objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return isObject(e) &&
+ (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+exports.isBuffer = _dereq_('./support/isBuffer');
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
+
+
+function pad(n) {
+ return n < 10 ? '0' + n.toString(10) : n.toString(10);
+}
+
+
+var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
+ 'Oct', 'Nov', 'Dec'];
+function timestamp() {
+ var d = new Date();
+ var time = [pad(d.getHours()),
+ pad(d.getMinutes()),
+ pad(d.getSeconds())].join(':');
+ return [d.getDate(), months[d.getMonth()], time].join(' ');
+}
+exports.log = function() {
+ console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
+};
+exports.inherits = _dereq_('inherits');
+
+exports._extend = function(origin, add) {
+ if (!add || !isObject(add)) return origin;
+
+ var keys = Object.keys(add);
+ var i = keys.length;
+ while (i--) {
+ origin[keys[i]] = add[keys[i]];
+ }
+ return origin;
+};
+
+function hasOwnProperty(obj, prop) {
+ return Object.prototype.hasOwnProperty.call(obj, prop);
+}
+
+}).call(this,_dereq_("/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},
+{"./support/isBuffer":14,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,"inherits":17}],
+16:[function(_dereq_,module,exports){
+
+function EventEmitter() {
+ this._events = this._events || {};
+ this._maxListeners = this._maxListeners || undefined;
+}
+module.exports = EventEmitter;
+EventEmitter.EventEmitter = EventEmitter;
+
+EventEmitter.prototype._events = undefined;
+EventEmitter.prototype._maxListeners = undefined;
+EventEmitter.defaultMaxListeners = 10;
+EventEmitter.prototype.setMaxListeners = function(n) {
+ if (!isNumber(n) || n < 0 || isNaN(n))
+ throw TypeError('n must be a positive number');
+ this._maxListeners = n;
+ return this;
+};
+
+EventEmitter.prototype.emit = function(type) {
+ var er, handler, len, args, i, listeners;
+
+ if (!this._events)
+ this._events = {};
+ if (type === 'error') {
+ if (!this._events.error ||
+ (isObject(this._events.error) && !this._events.error.length)) {
+ er = arguments[1];
+ if (er instanceof Error) {
+ throw er; // Unhandled 'error' event
+ } else {
+ throw TypeError('Uncaught, unspecified "error" event.');
+ }
+ return false;
+ }
+ }
+
+ handler = this._events[type];
+
+ if (isUndefined(handler))
+ return false;
+
+ if (isFunction(handler)) {
+ switch (arguments.length) {
+ case 1:
+ handler.call(this);
+ break;
+ case 2:
+ handler.call(this, arguments[1]);
+ break;
+ case 3:
+ handler.call(this, arguments[1], arguments[2]);
+ break;
+ default:
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+ handler.apply(this, args);
+ }
+ } else if (isObject(handler)) {
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+
+ listeners = handler.slice();
+ len = listeners.length;
+ for (i = 0; i < len; i++)
+ listeners[i].apply(this, args);
+ }
+
+ return true;
+};
+
+EventEmitter.prototype.addListener = function(type, listener) {
+ var m;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events)
+ this._events = {};
+ if (this._events.newListener)
+ this.emit('newListener', type,
+ isFunction(listener.listener) ?
+ listener.listener : listener);
+
+ if (!this._events[type])
+ this._events[type] = listener;
+ else if (isObject(this._events[type]))
+ this._events[type].push(listener);
+ else
+ this._events[type] = [this._events[type], listener];
+ if (isObject(this._events[type]) && !this._events[type].warned) {
+ var m;
+ if (!isUndefined(this._maxListeners)) {
+ m = this._maxListeners;
+ } else {
+ m = EventEmitter.defaultMaxListeners;
+ }
+
+ if (m && m > 0 && this._events[type].length > m) {
+ this._events[type].warned = true;
+ console.error('(node) warning: possible EventEmitter memory ' +
+ 'leak detected. %d listeners added. ' +
+ 'Use emitter.setMaxListeners() to increase limit.',
+ this._events[type].length);
+ console.trace();
+ }
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+EventEmitter.prototype.once = function(type, listener) {
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ var fired = false;
+
+ function g() {
+ this.removeListener(type, g);
+
+ if (!fired) {
+ fired = true;
+ listener.apply(this, arguments);
+ }
+ }
+
+ g.listener = listener;
+ this.on(type, g);
+
+ return this;
+};
+EventEmitter.prototype.removeListener = function(type, listener) {
+ var list, position, length, i;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events || !this._events[type])
+ return this;
+
+ list = this._events[type];
+ length = list.length;
+ position = -1;
+
+ if (list === listener ||
+ (isFunction(list.listener) && list.listener === listener)) {
+ delete this._events[type];
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+
+ } else if (isObject(list)) {
+ for (i = length; i-- > 0;) {
+ if (list[i] === listener ||
+ (list[i].listener && list[i].listener === listener)) {
+ position = i;
+ break;
+ }
+ }
+
+ if (position < 0)
+ return this;
+
+ if (list.length === 1) {
+ list.length = 0;
+ delete this._events[type];
+ } else {
+ list.splice(position, 1);
+ }
+
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.removeAllListeners = function(type) {
+ var key, listeners;
+
+ if (!this._events)
+ return this;
+ if (!this._events.removeListener) {
+ if (arguments.length === 0)
+ this._events = {};
+ else if (this._events[type])
+ delete this._events[type];
+ return this;
+ }
+ if (arguments.length === 0) {
+ for (key in this._events) {
+ if (key === 'removeListener') continue;
+ this.removeAllListeners(key);
+ }
+ this.removeAllListeners('removeListener');
+ this._events = {};
+ return this;
+ }
+
+ listeners = this._events[type];
+
+ if (isFunction(listeners)) {
+ this.removeListener(type, listeners);
+ } else {
+ while (listeners.length)
+ this.removeListener(type, listeners[listeners.length - 1]);
+ }
+ delete this._events[type];
+
+ return this;
+};
+
+EventEmitter.prototype.listeners = function(type) {
+ var ret;
+ if (!this._events || !this._events[type])
+ ret = [];
+ else if (isFunction(this._events[type]))
+ ret = [this._events[type]];
+ else
+ ret = this._events[type].slice();
+ return ret;
+};
+
+EventEmitter.listenerCount = function(emitter, type) {
+ var ret;
+ if (!emitter._events || !emitter._events[type])
+ ret = 0;
+ else if (isFunction(emitter._events[type]))
+ ret = 1;
+ else
+ ret = emitter._events[type].length;
+ return ret;
+};
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+
+},
+{}],
+17:[function(_dereq_,module,exports){
+if (typeof Object.create === 'function') {
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
+
+},
+{}],
+18:[function(_dereq_,module,exports){
+
+var process = module.exports = {};
+
+process.nextTick = (function () {
+ var canSetImmediate = typeof window !== 'undefined'
+ && window.setImmediate;
+ var canPost = typeof window !== 'undefined'
+ && window.postMessage && window.addEventListener
+ ;
+
+ if (canSetImmediate) {
+ return function (f) { return window.setImmediate(f) };
+ }
+
+ if (canPost) {
+ var queue = [];
+ window.addEventListener('message', function (ev) {
+ var source = ev.source;
+ if ((source === window || source === null) && ev.data === 'process-tick') {
+ ev.stopPropagation();
+ if (queue.length > 0) {
+ var fn = queue.shift();
+ fn();
+ }
+ }
+ }, true);
+
+ return function nextTick(fn) {
+ queue.push(fn);
+ window.postMessage('process-tick', '*');
+ };
+ }
+
+ return function nextTick(fn) {
+ setTimeout(fn, 0);
+ };
+})();
+
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+
+function noop() {}
+
+process.on = noop;
+process.once = noop;
+process.off = noop;
+process.emit = noop;
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+}
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+
+},
+{}],
+19:[function(_dereq_,module,exports){
+module.exports=_dereq_(14)
+},
+{}],
+20:[function(_dereq_,module,exports){
+module.exports=_dereq_(15)
+},
+{"./support/isBuffer":19,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,"inherits":17}]},{},[9])
+(9)
+
+});
+
+ace.define("ace/mode/html_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/html/saxparser"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var Mirror = require("../worker/mirror").Mirror;
+var SAXParser = require("./html/saxparser").SAXParser;
+
+var errorTypes = {
+ "expected-doctype-but-got-start-tag": "info",
+ "expected-doctype-but-got-chars": "info",
+ "non-html-root": "info",
+}
+
+var Worker = exports.Worker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(400);
+ this.context = null;
+};
+
+oop.inherits(Worker, Mirror);
+
+(function() {
+
+ this.setOptions = function(options) {
+ this.context = options.context;
+ };
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ if (!value)
+ return;
+ var parser = new SAXParser();
+ var errors = [];
+ var noop = function(){};
+ parser.contentHandler = {
+ startDocument: noop,
+ endDocument: noop,
+ startElement: noop,
+ endElement: noop,
+ characters: noop
+ };
+ parser.errorHandler = {
+ error: function(message, location, code) {
+ errors.push({
+ row: location.line,
+ column: location.column,
+ text: message,
+ type: errorTypes[code] || "error"
+ });
+ }
+ };
+ if (this.context)
+ parser.parseFragment(value, this.context);
+ else
+ parser.parse(value);
+ this.sender.emit("error", errors);
+ };
+
+}).call(Worker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ return bound;
+ };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ while (++i < length) {
+ if (i in self) {
+ fun.call(thisp, self[i], i, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ var i = 0;
+ var result;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i++];
+ break;
+ }
+ if (++i >= length) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ var result, i = length - 1;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i--];
+ break;
+ }
+ if (--i < 0) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+
+ var i = 0;
+ if (arguments.length > 1) {
+ i = toInteger(arguments[1]);
+ }
+ i = i >= 0 ? i : Math.max(0, length + i);
+ for (; i < length; i++) {
+ if (i in self && self[i] === sought) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+ var i = length - 1;
+ if (arguments.length > 1) {
+ i = Math.min(i, toInteger(arguments[1]));
+ }
+ i = i >= 0 ? i : length - Math.abs(i);
+ for (; i >= 0; i--) {
+ if (i in self && sought === self[i]) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Object.getPrototypeOf) {
+ Object.getPrototypeOf = function getPrototypeOf(object) {
+ return object.__proto__ || (
+ object.constructor ?
+ object.constructor.prototype :
+ prototypeOfObject
+ );
+ };
+}
+if (!Object.getOwnPropertyDescriptor) {
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+ "non-object: ";
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT + object);
+ if (!owns(object, property))
+ return;
+
+ var descriptor, getter, setter;
+ descriptor = { enumerable: true, configurable: true };
+ if (supportsAccessors) {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+
+ var getter = lookupGetter(object, property);
+ var setter = lookupSetter(object, property);
+ object.__proto__ = prototype;
+
+ if (getter || setter) {
+ if (getter) descriptor.get = getter;
+ if (setter) descriptor.set = setter;
+ return descriptor;
+ }
+ }
+ descriptor.value = object[property];
+ return descriptor;
+ };
+}
+if (!Object.getOwnPropertyNames) {
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ return Object.keys(object);
+ };
+}
+if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
+ Object.create = function create(prototype, properties) {
+ var object;
+ if (prototype === null) {
+ object = createEmpty();
+ } else {
+ if (typeof prototype != "object")
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+ var Type = function () {};
+ Type.prototype = prototype;
+ object = new Type();
+ object.__proto__ = prototype;
+ }
+ if (properties !== void 0)
+ Object.defineProperties(object, properties);
+ return object;
+ };
+}
+
+function doesDefinePropertyWork(object) {
+ try {
+ Object.defineProperty(object, "sentinel", {});
+ return "sentinel" in object;
+ } catch (exception) {
+ }
+}
+if (Object.defineProperty) {
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
+ doesDefinePropertyWork(document.createElement("div"));
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+ var definePropertyFallback = Object.defineProperty;
+ }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+ "on this javascript engine";
+
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+ if (definePropertyFallback) {
+ try {
+ return definePropertyFallback.call(Object, object, property, descriptor);
+ } catch (exception) {
+ }
+ }
+ if (owns(descriptor, "value")) {
+
+ if (supportsAccessors && (lookupGetter(object, property) ||
+ lookupSetter(object, property)))
+ {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+ delete object[property];
+ object[property] = descriptor.value;
+ object.__proto__ = prototype;
+ } else {
+ object[property] = descriptor.value;
+ }
+ } else {
+ if (!supportsAccessors)
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+ if (owns(descriptor, "get"))
+ defineGetter(object, property, descriptor.get);
+ if (owns(descriptor, "set"))
+ defineSetter(object, property, descriptor.set);
+ }
+
+ return object;
+ };
+}
+if (!Object.defineProperties) {
+ Object.defineProperties = function defineProperties(object, properties) {
+ for (var property in properties) {
+ if (owns(properties, property))
+ Object.defineProperty(object, property, properties[property]);
+ }
+ return object;
+ };
+}
+if (!Object.seal) {
+ Object.seal = function seal(object) {
+ return object;
+ };
+}
+if (!Object.freeze) {
+ Object.freeze = function freeze(object) {
+ return object;
+ };
+}
+try {
+ Object.freeze(function () {});
+} catch (exception) {
+ Object.freeze = (function freeze(freezeObject) {
+ return function freeze(object) {
+ if (typeof object == "function") {
+ return object;
+ } else {
+ return freezeObject(object);
+ }
+ };
+ })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+ Object.preventExtensions = function preventExtensions(object) {
+ return object;
+ };
+}
+if (!Object.isSealed) {
+ Object.isSealed = function isSealed(object) {
+ return false;
+ };
+}
+if (!Object.isFrozen) {
+ Object.isFrozen = function isFrozen(object) {
+ return false;
+ };
+}
+if (!Object.isExtensible) {
+ Object.isExtensible = function isExtensible(object) {
+ if (Object(object) === object) {
+ throw new TypeError(); // TODO message
+ }
+ var name = '';
+ while (owns(object, name)) {
+ name += '?';
+ }
+ object[name] = true;
+ var returnValue = owns(object, name);
+ delete object[name];
+ return returnValue;
+ };
+}
+if (!Object.keys) {
+ var hasDontEnumBug = true,
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ for (var key in {"toString": null}) {
+ hasDontEnumBug = false;
+ }
+
+ Object.keys = function keys(object) {
+
+ if (
+ (typeof object != "object" && typeof object != "function") ||
+ object === null
+ ) {
+ throw new TypeError("Object.keys called on a non-object");
+ }
+
+ var keys = [];
+ for (var name in object) {
+ if (owns(object, name)) {
+ keys.push(name);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+ var dontEnum = dontEnums[i];
+ if (owns(object, dontEnum)) {
+ keys.push(dontEnum);
+ }
+ }
+ }
+ return keys;
+ };
+
+}
+if (!Date.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ };
+}
+
+function toInteger(n) {
+ n = +n;
+ if (n !== n) { // isNaN
+ n = 0;
+ } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ }
+ return n;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/js/vendor/ace/src-noconflict/worker-javascript.js b/js/vendor/ace/src-noconflict/worker-javascript.js
index 8beac73..19df724 100644..100755
--- a/js/vendor/ace/src-noconflict/worker-javascript.js
+++ b/js/vendor/ace/src-noconflict/worker-javascript.js
@@ -16,18 +16,30 @@ window.console.trace = window.console;
window.window = window;
window.ace = window;
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
if (moduleName.indexOf("!") !== -1) {
var chunks = moduleName.split("!");
- return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
}
+ // normalize relative requires
if (moduleName.charAt(0) == ".") {
var base = parentId.split("/").slice(0, -1).join("/");
- moduleName = base + "/" + moduleName;
+ moduleName = (base ? base + "/" : "") + moduleName;
while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
var previous = moduleName;
- moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
@@ -36,15 +48,15 @@ window.normalizeModule = function(parentId, moduleName) {
window.require = function(parentId, id) {
if (!id) {
- id = parentId
+ id = parentId;
parentId = null;
}
if (!id.charAt)
throw new Error("worker.js require() accepts only (parentId, id) as arguments");
- id = normalizeModule(parentId, id);
+ id = window.normalizeModule(parentId, id);
- var module = require.modules[id];
+ var module = window.require.modules[id];
if (module) {
if (!module.initialized) {
module.initialized = true;
@@ -54,56 +66,80 @@ window.require = function(parentId, id) {
}
var chunks = id.split("/");
- chunks[0] = require.tlns[chunks[0]] || chunks[0];
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+ chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
var path = chunks.join("/") + ".js";
- require.id = id;
+ window.require.id = id;
importScripts(path);
- return require(parentId, id);
+ return window.require(parentId, id);
};
-
-require.modules = {};
-require.tlns = {};
+window.require.modules = {};
+window.require.tlns = {};
window.define = function(id, deps, factory) {
if (arguments.length == 2) {
factory = deps;
if (typeof id != "string") {
deps = id;
- id = require.id;
+ id = window.require.id;
}
} else if (arguments.length == 1) {
factory = id;
- id = require.id;
+ deps = [];
+ id = window.require.id;
}
-
- if (id.indexOf("text!") === 0)
- return;
- var req = function(deps, factory) {
- return require(id, deps, factory);
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject 'require', 'exports' and
+ // 'module' as dependencies, to provide CommonJS compatibility.
+ deps = ['require', 'exports', 'module'];
+
+ var req = function(childId) {
+ return window.require(id, childId);
};
- require.modules[id] = {
+ window.require.modules[id] = {
exports: {},
factory: function() {
var module = this;
- var returnExports = factory(req, module.exports, module);
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch(dep) {
+ // Because 'require', 'exports' and 'module' aren't actual
+ // dependencies, we must handle them seperately.
+ case 'require': return req;
+ case 'exports': return module.exports;
+ case 'module': return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
if (returnExports)
module.exports = returnExports;
return module;
}
};
};
+window.define.amd = {};
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
require.tlns = topLevelNamespaces;
-}
+};
window.initSender = function initSender() {
- var EventEmitter = require("ace/lib/event_emitter").EventEmitter;
- var oop = require("ace/lib/oop");
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("ace/lib/oop");
var Sender = function() {};
@@ -130,10 +166,10 @@ window.initSender = function initSender() {
}).call(Sender.prototype);
return new Sender();
-}
+};
-window.main = null;
-window.sender = null;
+var main = window.main = null;
+var sender = window.sender = null;
window.onmessage = function(e) {
var msg = e.data;
@@ -146,18 +182,46 @@ window.onmessage = function(e) {
else if (msg.init) {
initBaseUrls(msg.tlns);
require("ace/lib/es5-shim");
- sender = initSender();
+ sender = window.sender = initSender();
var clazz = require(msg.module)[msg.classname];
- main = new clazz(sender);
+ main = window.main = new clazz(sender);
}
else if (msg.event && sender) {
- sender._emit(msg.event, msg.data);
+ sender._signal(msg.event, msg.data);
}
};
})(this);
-ace.define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
var EventEmitter = {};
var stopPropagation = function() { this.propagationStopped = true; };
@@ -183,6 +247,7 @@ EventEmitter._dispatchEvent = function(eventName, e) {
if (!e.preventDefault)
e.preventDefault = preventDefault;
+ listeners = listeners.slice();
for (var i=0; i<listeners.length; i++) {
listeners[i](e, this);
if (e.propagationStopped)
@@ -198,7 +263,7 @@ EventEmitter._signal = function(eventName, e) {
var listeners = (this._eventRegistry || {})[eventName];
if (!listeners)
return;
-
+ listeners = listeners.slice();
for (var i=0; i<listeners.length; i++)
listeners[i](e, this);
};
@@ -281,921 +346,396 @@ exports.EventEmitter = EventEmitter;
});
-ace.define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-exports.inherits = (function() {
- var tempCtor = function() {};
- return function(ctor, superCtor) {
- tempCtor.prototype = superCtor.prototype;
- ctor.super_ = superCtor.prototype;
- ctor.prototype = new tempCtor();
- ctor.prototype.constructor = ctor;
- };
-}());
-
-exports.mixin = function(obj, mixin) {
- for (var key in mixin) {
- obj[key] = mixin[key];
- }
- return obj;
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
};
+var Range = function(startRow, startColumn, endRow, endColumn) {
+ this.start = {
+ row: startRow,
+ column: startColumn
+ };
-exports.implement = function(proto, mixin) {
- exports.mixin(proto, mixin);
+ this.end = {
+ row: endRow,
+ column: endColumn
+ };
};
-});
-
-ace.define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-function Empty() {}
-
-if (!Function.prototype.bind) {
- Function.prototype.bind = function bind(that) { // .length is 1
- var target = this;
- if (typeof target != "function") {
- throw new TypeError("Function.prototype.bind called on incompatible " + target);
- }
- var args = slice.call(arguments, 1); // for normal call
- var bound = function () {
-
- if (this instanceof bound) {
-
- var result = target.apply(
- this,
- args.concat(slice.call(arguments))
- );
- if (Object(result) === result) {
- return result;
- }
- return this;
-
- } else {
- return target.apply(
- that,
- args.concat(slice.call(arguments))
- );
-
- }
-
- };
- if(target.prototype) {
- Empty.prototype = target.prototype;
- bound.prototype = new Empty();
- Empty.prototype = null;
- }
- return bound;
+(function() {
+ this.isEqual = function(range) {
+ return this.start.row === range.start.row &&
+ this.end.row === range.end.row &&
+ this.start.column === range.start.column &&
+ this.end.column === range.end.column;
+ };
+ this.toString = function() {
+ return ("Range: [" + this.start.row + "/" + this.start.column +
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
};
-}
-var call = Function.prototype.call;
-var prototypeOfArray = Array.prototype;
-var prototypeOfObject = Object.prototype;
-var slice = prototypeOfArray.slice;
-var _toString = call.bind(prototypeOfObject.toString);
-var owns = call.bind(prototypeOfObject.hasOwnProperty);
-var defineGetter;
-var defineSetter;
-var lookupGetter;
-var lookupSetter;
-var supportsAccessors;
-if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
- defineGetter = call.bind(prototypeOfObject.__defineGetter__);
- defineSetter = call.bind(prototypeOfObject.__defineSetter__);
- lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
- lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
-}
-if ([1,2].splice(0).length != 2) {
- if(function() { // test IE < 9 to splice bug - see issue #138
- function makeArray(l) {
- var a = new Array(l+2);
- a[0] = a[1] = 0;
- return a;
- }
- var array = [], lengthBefore;
-
- array.splice.apply(array, makeArray(20));
- array.splice.apply(array, makeArray(26));
-
- lengthBefore = array.length; //46
- array.splice(5, 0, "XXX"); // add one element
- lengthBefore + 1 == array.length
+ this.contains = function(row, column) {
+ return this.compare(row, column) == 0;
+ };
+ this.compareRange = function(range) {
+ var cmp,
+ end = range.end,
+ start = range.start;
- if (lengthBefore + 1 == array.length) {
- return true;// has right splice implementation without bugs
- }
- }()) {//IE 6/7
- var array_splice = Array.prototype.splice;
- Array.prototype.splice = function(start, deleteCount) {
- if (!arguments.length) {
- return [];
+ cmp = this.compare(end.row, end.column);
+ if (cmp == 1) {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == 1) {
+ return 2;
+ } else if (cmp == 0) {
+ return 1;
} else {
- return array_splice.apply(this, [
- start === void 0 ? 0 : start,
- deleteCount === void 0 ? (this.length - start) : deleteCount
- ].concat(slice.call(arguments, 2)))
- }
- };
- } else {//IE8
- Array.prototype.splice = function(pos, removeCount){
- var length = this.length;
- if (pos > 0) {
- if (pos > length)
- pos = length;
- } else if (pos == void 0) {
- pos = 0;
- } else if (pos < 0) {
- pos = Math.max(length + pos, 0);
+ return 0;
}
-
- if (!(pos+removeCount < length))
- removeCount = length - pos;
-
- var removed = this.slice(pos, pos+removeCount);
- var insert = slice.call(arguments, 2);
- var add = insert.length;
- if (pos === length) {
- if (add) {
- this.push.apply(this, insert);
- }
+ } else if (cmp == -1) {
+ return -2;
+ } else {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == -1) {
+ return -1;
+ } else if (cmp == 1) {
+ return 42;
} else {
- var remove = Math.min(removeCount, length - pos);
- var tailOldPos = pos + remove;
- var tailNewPos = tailOldPos + add - remove;
- var tailCount = length - tailOldPos;
- var lengthAfterRemove = length - remove;
-
- if (tailNewPos < tailOldPos) { // case A
- for (var i = 0; i < tailCount; ++i) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } else if (tailNewPos > tailOldPos) { // case B
- for (i = tailCount; i--; ) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } // else, add == remove (nothing to do)
-
- if (add && pos === lengthAfterRemove) {
- this.length = lengthAfterRemove; // truncate array
- this.push.apply(this, insert);
- } else {
- this.length = lengthAfterRemove + add; // reserves space
- for (i = 0; i < add; ++i) {
- this[pos+i] = insert[i];
- }
- }
- }
- return removed;
- };
- }
-}
-if (!Array.isArray) {
- Array.isArray = function isArray(obj) {
- return _toString(obj) == "[object Array]";
- };
-}
-var boxedString = Object("a"),
- splitString = boxedString[0] != "a" || !(0 in boxedString);
-
-if (!Array.prototype.forEach) {
- Array.prototype.forEach = function forEach(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- thisp = arguments[1],
- i = -1,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- while (++i < length) {
- if (i in self) {
- fun.call(thisp, self[i], i, object);
+ return 0;
}
}
};
-}
-if (!Array.prototype.map) {
- Array.prototype.map = function map(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = Array(length),
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self)
- result[i] = fun.call(thisp, self[i], i, object);
- }
- return result;
+ this.comparePoint = function(p) {
+ return this.compare(p.row, p.column);
};
-}
-if (!Array.prototype.filter) {
- Array.prototype.filter = function filter(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = [],
- value,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self) {
- value = self[i];
- if (fun.call(thisp, value, i, object)) {
- result.push(value);
- }
- }
+ this.containsRange = function(range) {
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
+ this.isEnd = function(row, column) {
+ return this.end.row == row && this.end.column == column;
+ };
+ this.isStart = function(row, column) {
+ return this.start.row == row && this.start.column == column;
+ };
+ this.setStart = function(row, column) {
+ if (typeof row == "object") {
+ this.start.column = row.column;
+ this.start.row = row.row;
+ } else {
+ this.start.row = row;
+ this.start.column = column;
}
- return result;
};
-}
-if (!Array.prototype.every) {
- Array.prototype.every = function every(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
+ this.setEnd = function(row, column) {
+ if (typeof row == "object") {
+ this.end.column = row.column;
+ this.end.row = row.row;
+ } else {
+ this.end.row = row;
+ this.end.column = column;
}
-
- for (var i = 0; i < length; i++) {
- if (i in self && !fun.call(thisp, self[i], i, object)) {
+ };
+ this.inside = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
return false;
+ } else {
+ return true;
}
}
- return true;
+ return false;
};
-}
-if (!Array.prototype.some) {
- Array.prototype.some = function some(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, object)) {
+ this.insideStart = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column)) {
+ return false;
+ } else {
return true;
}
}
return false;
};
-}
-if (!Array.prototype.reduce) {
- Array.prototype.reduce = function reduce(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduce of empty array with no initial value");
- }
-
- var i = 0;
- var result;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i++];
- break;
- }
- if (++i >= length) {
- throw new TypeError("reduce of empty array with no initial value");
- }
- } while (true);
- }
-
- for (; i < length; i++) {
- if (i in self) {
- result = fun.call(void 0, result, self[i], i, object);
+ this.insideEnd = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
}
}
-
- return result;
+ return false;
};
-}
-if (!Array.prototype.reduceRight) {
- Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduceRight of empty array with no initial value");
+ this.compare = function(row, column) {
+ if (!this.isMultiLine()) {
+ if (row === this.start.row) {
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+ };
}
- var result, i = length - 1;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i--];
- break;
- }
- if (--i < 0) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
- } while (true);
- }
+ if (row < this.start.row)
+ return -1;
- do {
- if (i in this) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- } while (i--);
+ if (row > this.end.row)
+ return 1;
- return result;
- };
-}
-if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
- Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
+ if (this.start.row === row)
+ return column >= this.start.column ? 0 : -1;
- if (!length) {
- return -1;
- }
+ if (this.end.row === row)
+ return column <= this.end.column ? 0 : 1;
- var i = 0;
- if (arguments.length > 1) {
- i = toInteger(arguments[1]);
- }
- i = i >= 0 ? i : Math.max(0, length + i);
- for (; i < length; i++) {
- if (i in self && self[i] === sought) {
- return i;
- }
- }
- return -1;
+ return 0;
};
-}
-if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
- Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
-
- if (!length) {
+ this.compareStart = function(row, column) {
+ if (this.start.row == row && this.start.column == column) {
return -1;
+ } else {
+ return this.compare(row, column);
}
- var i = length - 1;
- if (arguments.length > 1) {
- i = Math.min(i, toInteger(arguments[1]));
- }
- i = i >= 0 ? i : length - Math.abs(i);
- for (; i >= 0; i--) {
- if (i in self && sought === self[i]) {
- return i;
- }
- }
- return -1;
};
-}
-if (!Object.getPrototypeOf) {
- Object.getPrototypeOf = function getPrototypeOf(object) {
- return object.__proto__ || (
- object.constructor ?
- object.constructor.prototype :
- prototypeOfObject
- );
- };
-}
-if (!Object.getOwnPropertyDescriptor) {
- var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
- "non-object: ";
- Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT + object);
- if (!owns(object, property))
- return;
-
- var descriptor, getter, setter;
- descriptor = { enumerable: true, configurable: true };
- if (supportsAccessors) {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
-
- var getter = lookupGetter(object, property);
- var setter = lookupSetter(object, property);
- object.__proto__ = prototype;
-
- if (getter || setter) {
- if (getter) descriptor.get = getter;
- if (setter) descriptor.set = setter;
- return descriptor;
- }
+ this.compareEnd = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else {
+ return this.compare(row, column);
}
- descriptor.value = object[property];
- return descriptor;
- };
-}
-if (!Object.getOwnPropertyNames) {
- Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
- return Object.keys(object);
};
-}
-if (!Object.create) {
- var createEmpty;
- if (Object.prototype.__proto__ === null) {
- createEmpty = function () {
- return { "__proto__": null };
- };
- } else {
- createEmpty = function () {
- var empty = {};
- for (var i in empty)
- empty[i] = null;
- empty.constructor =
- empty.hasOwnProperty =
- empty.propertyIsEnumerable =
- empty.isPrototypeOf =
- empty.toLocaleString =
- empty.toString =
- empty.valueOf =
- empty.__proto__ = null;
- return empty;
- }
- }
-
- Object.create = function create(prototype, properties) {
- var object;
- if (prototype === null) {
- object = createEmpty();
+ this.compareInside = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else if (this.start.row == row && this.start.column == column) {
+ return -1;
} else {
- if (typeof prototype != "object")
- throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
- var Type = function () {};
- Type.prototype = prototype;
- object = new Type();
- object.__proto__ = prototype;
+ return this.compare(row, column);
}
- if (properties !== void 0)
- Object.defineProperties(object, properties);
- return object;
};
-}
-
-function doesDefinePropertyWork(object) {
- try {
- Object.defineProperty(object, "sentinel", {});
- return "sentinel" in object;
- } catch (exception) {
- }
-}
-if (Object.defineProperty) {
- var definePropertyWorksOnObject = doesDefinePropertyWork({});
- var definePropertyWorksOnDom = typeof document == "undefined" ||
- doesDefinePropertyWork(document.createElement("div"));
- if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
- var definePropertyFallback = Object.defineProperty;
- }
-}
+ this.clipRows = function(firstRow, lastRow) {
+ if (this.end.row > lastRow)
+ var end = {row: lastRow + 1, column: 0};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
-if (!Object.defineProperty || definePropertyFallback) {
- var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
- var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
- var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
- "on this javascript engine";
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {row: firstRow, column: 0};
- Object.defineProperty = function defineProperty(object, property, descriptor) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT_TARGET + object);
- if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
- throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
- if (definePropertyFallback) {
- try {
- return definePropertyFallback.call(Object, object, property, descriptor);
- } catch (exception) {
- }
- }
- if (owns(descriptor, "value")) {
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+ this.extend = function(row, column) {
+ var cmp = this.compare(row, column);
- if (supportsAccessors && (lookupGetter(object, property) ||
- lookupSetter(object, property)))
- {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
- delete object[property];
- object[property] = descriptor.value;
- object.__proto__ = prototype;
- } else {
- object[property] = descriptor.value;
- }
- } else {
- if (!supportsAccessors)
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- if (owns(descriptor, "get"))
- defineGetter(object, property, descriptor.get);
- if (owns(descriptor, "set"))
- defineSetter(object, property, descriptor.set);
- }
+ if (cmp == 0)
+ return this;
+ else if (cmp == -1)
+ var start = {row: row, column: column};
+ else
+ var end = {row: row, column: column};
- return object;
- };
-}
-if (!Object.defineProperties) {
- Object.defineProperties = function defineProperties(object, properties) {
- for (var property in properties) {
- if (owns(properties, property))
- Object.defineProperty(object, property, properties[property]);
- }
- return object;
- };
-}
-if (!Object.seal) {
- Object.seal = function seal(object) {
- return object;
- };
-}
-if (!Object.freeze) {
- Object.freeze = function freeze(object) {
- return object;
- };
-}
-try {
- Object.freeze(function () {});
-} catch (exception) {
- Object.freeze = (function freeze(freezeObject) {
- return function freeze(object) {
- if (typeof object == "function") {
- return object;
- } else {
- return freezeObject(object);
- }
- };
- })(Object.freeze);
-}
-if (!Object.preventExtensions) {
- Object.preventExtensions = function preventExtensions(object) {
- return object;
+ return Range.fromPoints(start || this.start, end || this.end);
};
-}
-if (!Object.isSealed) {
- Object.isSealed = function isSealed(object) {
- return false;
+
+ this.isEmpty = function() {
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
};
-}
-if (!Object.isFrozen) {
- Object.isFrozen = function isFrozen(object) {
- return false;
+ this.isMultiLine = function() {
+ return (this.start.row !== this.end.row);
};
-}
-if (!Object.isExtensible) {
- Object.isExtensible = function isExtensible(object) {
- if (Object(object) === object) {
- throw new TypeError(); // TODO message
- }
- var name = '';
- while (owns(object, name)) {
- name += '?';
- }
- object[name] = true;
- var returnValue = owns(object, name);
- delete object[name];
- return returnValue;
+ this.clone = function() {
+ return Range.fromPoints(this.start, this.end);
};
-}
-if (!Object.keys) {
- var hasDontEnumBug = true,
- dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor"
- ],
- dontEnumsLength = dontEnums.length;
-
- for (var key in {"toString": null}) {
- hasDontEnumBug = false;
- }
-
- Object.keys = function keys(object) {
-
- if (
- (typeof object != "object" && typeof object != "function") ||
- object === null
- ) {
- throw new TypeError("Object.keys called on a non-object");
- }
-
- var keys = [];
- for (var name in object) {
- if (owns(object, name)) {
- keys.push(name);
- }
- }
-
- if (hasDontEnumBug) {
- for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
- var dontEnum = dontEnums[i];
- if (owns(object, dontEnum)) {
- keys.push(dontEnum);
- }
- }
- }
- return keys;
+ this.collapseRows = function() {
+ if (this.end.column == 0)
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+ else
+ return new Range(this.start.row, 0, this.end.row, 0)
};
+ this.toScreenRange = function(session) {
+ var screenPosStart = session.documentToScreenPosition(this.start);
+ var screenPosEnd = session.documentToScreenPosition(this.end);
-}
-if (!Date.now) {
- Date.now = function now() {
- return new Date().getTime();
+ return new Range(
+ screenPosStart.row, screenPosStart.column,
+ screenPosEnd.row, screenPosEnd.column
+ );
};
-}
-var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
- "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
- "\u2029\uFEFF";
-if (!String.prototype.trim || ws.trim()) {
- ws = "[" + ws + "]";
- var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
- trimEndRegexp = new RegExp(ws + ws + "*$");
- String.prototype.trim = function trim() {
- return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
};
-}
-
-function toInteger(n) {
- n = +n;
- if (n !== n) { // isNaN
- n = 0;
- } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- }
- return n;
-}
-
-function isPrimitive(input) {
- var type = typeof input;
- return (
- input === null ||
- type === "undefined" ||
- type === "boolean" ||
- type === "number" ||
- type === "string"
- );
-}
-function toPrimitive(input) {
- var val, valueOf, toString;
- if (isPrimitive(input)) {
- return input;
- }
- valueOf = input.valueOf;
- if (typeof valueOf === "function") {
- val = valueOf.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- toString = input.toString;
- if (typeof toString === "function") {
- val = toString.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- throw new TypeError();
-}
-var toObject = function (o) {
- if (o == null) { // this matches both null and undefined
- throw new TypeError("can't convert "+o+" to object");
- }
- return Object(o);
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
};
+Range.comparePoints = comparePoints;
-});
-
-ace.define('ace/mode/javascript_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/javascript/jshint'], function(require, exports, module) {
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
-var oop = require("../lib/oop");
-var Mirror = require("../worker/mirror").Mirror;
-var lint = require("./javascript/jshint").JSHINT;
+exports.Range = Range;
+});
-function startRegex(arr) {
- return RegExp("^(" + arr.join("|") + ")");
-}
+ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
-var disabledWarningsRe = startRegex([
- "Bad for in variable '(.+)'.",
- 'Missing "use strict"'
-]);
-var errorsRe = startRegex([
- "Unexpected",
- "Expected ",
- "Confusing (plus|minus)",
- "\\{a\\} unterminated regular expression",
- "Unclosed ",
- "Unmatched ",
- "Unbegun comment",
- "Bad invocation",
- "Missing space after",
- "Missing operator at"
-]);
-var infoRe = startRegex([
- "Expected an assignment",
- "Bad escapement of EOL",
- "Unexpected comma",
- "Unexpected space",
- "Missing radix parameter.",
- "A leading decimal point can",
- "\\['{a}'\\] is better written in dot notation.",
- "'{a}' used out of scope"
-]);
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var JavaScriptWorker = exports.JavaScriptWorker = function(sender) {
- Mirror.call(this, sender);
- this.setTimeout(500);
- this.setOptions();
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
};
-oop.inherits(JavaScriptWorker, Mirror);
-
(function() {
- this.setOptions = function(options) {
- this.options = options || {
- esnext: true,
- moz: true,
- devel: true,
- browser: true,
- node: true,
- laxcomma: true,
- laxbreak: true,
- lastsemic: true,
- onevar: false,
- passfail: false,
- maxerr: 100,
- expr: true,
- multistr: true,
- globalstrict: true
- };
- this.doc.getValue() && this.deferredUpdate.schedule(100);
- };
- this.changeOptions = function(newOptions) {
- oop.mixin(this.options, newOptions);
- this.doc.getValue() && this.deferredUpdate.schedule(100);
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
};
-
- this.isValidJS = function(str) {
- try {
- eval("throw 0;" + str);
- } catch(e) {
- if (e === 0)
- return true;
- }
- return false
+ this.getDocument = function() {
+ return this.document;
};
+ this.$insertRight = false;
+ this.onChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
- this.onUpdate = function() {
- var value = this.doc.getValue();
- value = value.replace(/^#!.*\n/, "\n");
- if (!value) {
- this.sender.emit("jslint", []);
+ if (range.start.row == range.end.row && range.start.row != this.row)
return;
- }
- var errors = [];
- var maxErrorLevel = this.isValidJS(value) ? "warning" : "error";
- lint(value, this.options);
- var results = lint.errors;
- var errorAdded = false
- for (var i = 0; i < results.length; i++) {
- var error = results[i];
- if (!error)
- continue;
- var raw = error.raw;
- var type = "warning";
+ if (range.start.row > this.row)
+ return;
- if (raw == "Missing semicolon.") {
- var str = error.evidence.substr(error.character);
- str = str.charAt(str.search(/\S/));
- if (maxErrorLevel == "error" && str && /[\w\d{(['"]/.test(str)) {
- error.reason = 'Missing ";" before statement';
- type = "error";
+ if (range.start.row == this.row && range.start.column > this.column)
+ return;
+
+ var row = this.row;
+ var column = this.column;
+ var start = range.start;
+ var end = range.end;
+
+ if (delta.action === "insertText") {
+ if (start.row === row && start.column <= column) {
+ if (start.column === column && this.$insertRight) {
+ } else if (start.row === end.row) {
+ column += end.column - start.column;
} else {
- type = "info";
+ column -= start.column;
+ row += end.row - start.row;
}
+ } else if (start.row !== end.row && start.row < row) {
+ row += end.row - start.row;
}
- else if (disabledWarningsRe.test(raw)) {
- continue;
- }
- else if (infoRe.test(raw)) {
- type = "info"
- }
- else if (errorsRe.test(raw)) {
- errorAdded = true;
- type = maxErrorLevel;
- }
- else if (raw == "'{a}' is not defined.") {
- type = "warning";
+ } else if (delta.action === "insertLines") {
+ if (start.row === row && column === 0 && this.$insertRight) {
}
- else if (raw == "'{a}' is defined but never used.") {
- type = "info";
+ else if (start.row <= row) {
+ row += end.row - start.row;
}
+ } else if (delta.action === "removeText") {
+ if (start.row === row && start.column < column) {
+ if (end.column >= column)
+ column = start.column;
+ else
+ column = Math.max(0, column - (end.column - start.column));
- errors.push({
- row: error.line-1,
- column: error.character-1,
- text: error.reason,
- type: type,
- raw: raw
- });
-
- if (errorAdded) {
+ } else if (start.row !== end.row && start.row < row) {
+ if (end.row === row)
+ column = Math.max(0, column - end.column) + start.column;
+ row -= (end.row - start.row);
+ } else if (end.row === row) {
+ row -= end.row - start.row;
+ column = Math.max(0, column - end.column) + start.column;
+ }
+ } else if (delta.action == "removeLines") {
+ if (start.row <= row) {
+ if (end.row <= row)
+ row -= end.row - start.row;
+ else {
+ row = start.row;
+ column = 0;
+ }
}
}
- this.sender.emit("jslint", errors);
+ this.setPosition(row, column, true);
};
+ this.setPosition = function(row, column, noClip) {
+ var pos;
+ if (noClip) {
+ pos = {
+ row: row,
+ column: column
+ };
+ } else {
+ pos = this.$clipPositionToDocument(row, column);
+ }
-}).call(JavaScriptWorker.prototype);
-
-});
-ace.define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
-
+ if (this.row == pos.row && this.column == pos.column)
+ return;
-var Document = require("../document").Document;
-var lang = require("../lib/lang");
-
-var Mirror = exports.Mirror = function(sender) {
- this.sender = sender;
- var doc = this.doc = new Document("");
-
- var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
-
- var _self = this;
- sender.on("change", function(e) {
- doc.applyDeltas(e.data);
- deferredUpdate.schedule(_self.$timeout);
- });
-};
+ var old = {
+ row: this.row,
+ column: this.column
+ };
-(function() {
-
- this.$timeout = 500;
-
- this.setTimeout = function(timeout) {
- this.$timeout = timeout;
+ this.row = pos.row;
+ this.column = pos.column;
+ this._signal("change", {
+ old: old,
+ value: pos
+ });
};
-
- this.setValue = function(value) {
- this.doc.setValue(value);
- this.deferredUpdate.schedule(this.$timeout);
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
};
-
- this.getValue = function(callbackId) {
- this.sender.callback(this.doc.getValue(), callbackId);
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("change", this.$onChange);
};
-
- this.onUpdate = function() {
+ this.$clipPositionToDocument = function(row, column) {
+ var pos = {};
+
+ if (row >= this.document.getLength()) {
+ pos.row = Math.max(0, this.document.getLength() - 1);
+ pos.column = this.document.getLine(pos.row).length;
+ }
+ else if (row < 0) {
+ pos.row = 0;
+ pos.column = 0;
+ }
+ else {
+ pos.row = row;
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+ }
+
+ if (column < 0)
+ pos.column = 0;
+
+ return pos;
};
-
-}).call(Mirror.prototype);
-});
+}).call(Anchor.prototype);
-ace.define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
+});
+ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
@@ -1204,7 +744,7 @@ var Anchor = require("./anchor").Anchor;
var Document = function(text) {
this.$lines = [];
- if (text.length == 0) {
+ if (text.length === 0) {
this.$lines = [""];
} else if (Array.isArray(text)) {
this._insertLines(0, text);
@@ -1227,10 +767,10 @@ var Document = function(text) {
this.createAnchor = function(row, column) {
return new Anchor(this, row, column);
};
- if ("aaa".split(/a/).length == 0)
+ if ("aaa".split(/a/).length === 0)
this.$split = function(text) {
return text.replace(/\r\n|\r/g, "\n").split("\n");
- }
+ };
else
this.$split = function(text) {
return text.split(/\r\n|\r|\n/);
@@ -1240,6 +780,7 @@ var Document = function(text) {
this.$detectNewLine = function(text) {
var match = text.match(/^.*?(\r\n|\r|\n)/m);
this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
};
this.getNewLineCharacter = function() {
switch (this.$newLineMode) {
@@ -1248,17 +789,18 @@ var Document = function(text) {
case "unix":
return "\n";
default:
- return this.$autoNewLine;
+ return this.$autoNewLine || "\n";
}
};
- this.$autoNewLine = "\n";
+ this.$autoNewLine = "";
this.$newLineMode = "auto";
this.setNewLineMode = function(newLineMode) {
if (this.$newLineMode === newLineMode)
return;
this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
};
this.getNewLineMode = function() {
return this.$newLineMode;
@@ -1328,9 +870,10 @@ var Document = function(text) {
this._insertLines = function(row, lines) {
if (lines.length == 0)
return {row: row, column: 0};
- if (lines.length > 0xFFFF) {
- var end = this._insertLines(row, lines.slice(0xFFFF));
- lines = lines.slice(0, 0xFFFF);
+ while (lines.length > 20000) {
+ var end = this._insertLines(row, lines.slice(0, 20000));
+ lines = lines.slice(20000);
+ row = end.row;
}
var args = [row, 0];
@@ -1343,8 +886,8 @@ var Document = function(text) {
range: range,
lines: lines
};
- this._emit("change", { data: delta });
- return end || range.end;
+ this._signal("change", { data: delta });
+ return range.end;
};
this.insertNewLine = function(position) {
position = this.$clipPosition(position);
@@ -1363,7 +906,7 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
@@ -1386,11 +929,13 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: text
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
this.remove = function(range) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
range.start = this.$clipPosition(range.start);
range.end = this.$clipPosition(range.end);
@@ -1435,7 +980,7 @@ var Document = function(text) {
range: range,
text: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return range.start;
};
this.removeLines = function(firstRow, lastRow) {
@@ -1454,7 +999,7 @@ var Document = function(text) {
nl: this.getNewLineCharacter(),
lines: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return removed;
};
this.removeNewLine = function(row) {
@@ -1471,9 +1016,11 @@ var Document = function(text) {
range: range,
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
};
this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
if (text.length == 0 && range.isEmpty())
return range.start;
if (text == this.getTextRange(range))
@@ -1546,393 +1093,13 @@ var Document = function(text) {
exports.Document = Document;
});
-ace.define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-var comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function(startRow, startColumn, endRow, endColumn) {
- this.start = {
- row: startRow,
- column: startColumn
- };
-
- this.end = {
- row: endRow,
- column: endColumn
- };
-};
-
-(function() {
- this.isEqual = function(range) {
- return this.start.row === range.start.row &&
- this.end.row === range.end.row &&
- this.start.column === range.start.column &&
- this.end.column === range.end.column;
- };
- this.toString = function() {
- return ("Range: [" + this.start.row + "/" + this.start.column +
- "] -> [" + this.end.row + "/" + this.end.column + "]");
- };
-
- this.contains = function(row, column) {
- return this.compare(row, column) == 0;
- };
- this.compareRange = function(range) {
- var cmp,
- end = range.end,
- start = range.start;
-
- cmp = this.compare(end.row, end.column);
- if (cmp == 1) {
- cmp = this.compare(start.row, start.column);
- if (cmp == 1) {
- return 2;
- } else if (cmp == 0) {
- return 1;
- } else {
- return 0;
- }
- } else if (cmp == -1) {
- return -2;
- } else {
- cmp = this.compare(start.row, start.column);
- if (cmp == -1) {
- return -1;
- } else if (cmp == 1) {
- return 42;
- } else {
- return 0;
- }
- }
- };
- this.comparePoint = function(p) {
- return this.compare(p.row, p.column);
- };
- this.containsRange = function(range) {
- return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- };
- this.intersects = function(range) {
- var cmp = this.compareRange(range);
- return (cmp == -1 || cmp == 0 || cmp == 1);
- };
- this.isEnd = function(row, column) {
- return this.end.row == row && this.end.column == column;
- };
- this.isStart = function(row, column) {
- return this.start.row == row && this.start.column == column;
- };
- this.setStart = function(row, column) {
- if (typeof row == "object") {
- this.start.column = row.column;
- this.start.row = row.row;
- } else {
- this.start.row = row;
- this.start.column = column;
- }
- };
- this.setEnd = function(row, column) {
- if (typeof row == "object") {
- this.end.column = row.column;
- this.end.row = row.row;
- } else {
- this.end.row = row;
- this.end.column = column;
- }
- };
- this.inside = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column) || this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideStart = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideEnd = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.compare = function(row, column) {
- if (!this.isMultiLine()) {
- if (row === this.start.row) {
- return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
- };
- }
-
- if (row < this.start.row)
- return -1;
-
- if (row > this.end.row)
- return 1;
-
- if (this.start.row === row)
- return column >= this.start.column ? 0 : -1;
-
- if (this.end.row === row)
- return column <= this.end.column ? 0 : 1;
-
- return 0;
- };
- this.compareStart = function(row, column) {
- if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareEnd = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareInside = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.clipRows = function(firstRow, lastRow) {
- if (this.end.row > lastRow)
- var end = {row: lastRow + 1, column: 0};
- else if (this.end.row < firstRow)
- var end = {row: firstRow, column: 0};
-
- if (this.start.row > lastRow)
- var start = {row: lastRow + 1, column: 0};
- else if (this.start.row < firstRow)
- var start = {row: firstRow, column: 0};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
- this.extend = function(row, column) {
- var cmp = this.compare(row, column);
-
- if (cmp == 0)
- return this;
- else if (cmp == -1)
- var start = {row: row, column: column};
- else
- var end = {row: row, column: column};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.isEmpty = function() {
- return (this.start.row === this.end.row && this.start.column === this.end.column);
- };
- this.isMultiLine = function() {
- return (this.start.row !== this.end.row);
- };
- this.clone = function() {
- return Range.fromPoints(this.start, this.end);
- };
- this.collapseRows = function() {
- if (this.end.column == 0)
- return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
- else
- return new Range(this.start.row, 0, this.end.row, 0)
- };
- this.toScreenRange = function(session) {
- var screenPosStart = session.documentToScreenPosition(this.start);
- var screenPosEnd = session.documentToScreenPosition(this.end);
-
- return new Range(
- screenPosStart.row, screenPosStart.column,
- screenPosEnd.row, screenPosEnd.column
- );
- };
- this.moveBy = function(row, column) {
- this.start.row += row;
- this.start.column += column;
- this.end.row += row;
- this.end.column += column;
- };
-
-}).call(Range.prototype);
-Range.fromPoints = function(start, end) {
- return new Range(start.row, start.column, end.row, end.column);
-};
-Range.comparePoints = comparePoints;
-
-Range.comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-
-
-exports.Range = Range;
-});
-
-ace.define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-
-var Anchor = exports.Anchor = function(doc, row, column) {
- this.$onChange = this.onChange.bind(this);
- this.attach(doc);
-
- if (typeof column == "undefined")
- this.setPosition(row.row, row.column);
- else
- this.setPosition(row, column);
+exports.last = function(a) {
+ return a[a.length - 1];
};
-(function() {
-
- oop.implement(this, EventEmitter);
- this.getPosition = function() {
- return this.$clipPositionToDocument(this.row, this.column);
- };
- this.getDocument = function() {
- return this.document;
- };
- this.onChange = function(e) {
- var delta = e.data;
- var range = delta.range;
-
- if (range.start.row == range.end.row && range.start.row != this.row)
- return;
-
- if (range.start.row > this.row)
- return;
-
- if (range.start.row == this.row && range.start.column > this.column)
- return;
-
- var row = this.row;
- var column = this.column;
- var start = range.start;
- var end = range.end;
-
- if (delta.action === "insertText") {
- if (start.row === row && start.column <= column) {
- if (start.row === end.row) {
- column += end.column - start.column;
- } else {
- column -= start.column;
- row += end.row - start.row;
- }
- } else if (start.row !== end.row && start.row < row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "insertLines") {
- if (start.row <= row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "removeText") {
- if (start.row === row && start.column < column) {
- if (end.column >= column)
- column = start.column;
- else
- column = Math.max(0, column - (end.column - start.column));
-
- } else if (start.row !== end.row && start.row < row) {
- if (end.row === row)
- column = Math.max(0, column - end.column) + start.column;
- row -= (end.row - start.row);
- } else if (end.row === row) {
- row -= end.row - start.row;
- column = Math.max(0, column - end.column) + start.column;
- }
- } else if (delta.action == "removeLines") {
- if (start.row <= row) {
- if (end.row <= row)
- row -= end.row - start.row;
- else {
- row = start.row;
- column = 0;
- }
- }
- }
-
- this.setPosition(row, column, true);
- };
- this.setPosition = function(row, column, noClip) {
- var pos;
- if (noClip) {
- pos = {
- row: row,
- column: column
- };
- } else {
- pos = this.$clipPositionToDocument(row, column);
- }
-
- if (this.row == pos.row && this.column == pos.column)
- return;
-
- var old = {
- row: this.row,
- column: this.column
- };
-
- this.row = pos.row;
- this.column = pos.column;
- this._emit("change", {
- old: old,
- value: pos
- });
- };
- this.detach = function() {
- this.document.removeEventListener("change", this.$onChange);
- };
- this.attach = function(doc) {
- this.document = doc || this.document;
- this.document.on("change", this.$onChange);
- };
- this.$clipPositionToDocument = function(row, column) {
- var pos = {};
-
- if (row >= this.document.getLength()) {
- pos.row = Math.max(0, this.document.getLength() - 1);
- pos.column = this.document.getLine(pos.row).length;
- }
- else if (row < 0) {
- pos.row = 0;
- pos.column = 0;
- }
- else {
- pos.row = row;
- pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
- }
-
- if (column < 0)
- pos.column = 0;
-
- return pos;
- };
-
-}).call(Anchor.prototype);
-
-});
-
-ace.define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
exports.stringReverse = function(string) {
return string.split("").reverse().join("");
};
@@ -1979,18 +1146,24 @@ exports.copyArray = function(array){
return copy;
};
-exports.deepCopy = function (obj) {
- if (typeof obj != "object") {
+exports.deepCopy = function deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
}
+ var cons = obj.constructor;
+ if (cons === RegExp)
+ return obj;
- var copy = obj.constructor();
+ copy = cons();
for (var key in obj) {
- if (typeof obj[key] == "object") {
- copy[key] = this.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
+ copy[key] = deepCopy(obj[key]);
}
return copy;
};
@@ -2040,7 +1213,6 @@ exports.getMatchOffsets = function(string, regExp) {
return matches;
};
exports.deferredCall = function(fcn) {
-
var timer = null;
var callback = function() {
timer = null;
@@ -2066,6 +1238,10 @@ exports.deferredCall = function(fcn) {
timer = null;
return deferred;
};
+
+ deferred.isPending = function() {
+ return timer;
+ };
return deferred;
};
@@ -2079,15 +1255,15 @@ exports.delayedCall = function(fcn, defaultTimeout) {
};
var _self = function(timeout) {
- timer && clearTimeout(timer);
- timer = setTimeout(callback, timeout || defaultTimeout);
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
- _self.delay = _self;
- _self.schedule = function(timeout) {
- if (timer == null)
- timer = setTimeout(callback, timeout || 0);
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
+ _self.schedule = _self;
_self.call = function() {
this.cancel();
@@ -2106,7029 +1282,101 @@ exports.delayedCall = function(fcn, defaultTimeout) {
return _self;
};
});
-ace.define('ace/mode/javascript/jshint', ['require', 'exports', 'module' ], function(require, exports, module) {
-var require;
-require=(function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i})({
-1:[function(req,module,exports){
-
-var process = module.exports = {};
-
-process.nextTick = (function () {
- var canSetImmediate = typeof window !== 'undefined'
- && window.setImmediate;
- var canPost = typeof window !== 'undefined'
- && window.postMessage && window.addEventListener
- ;
-
- if (canSetImmediate) {
- return function (f) { return window.setImmediate(f) };
- }
-
- if (canPost) {
- var queue = [];
- window.addEventListener('message', function (ev) {
- if (ev.source === window && ev.data === 'process-tick') {
- ev.stopPropagation();
- if (queue.length > 0) {
- var fn = queue.shift();
- fn();
- }
- }
- }, true);
-
- return function nextTick(fn) {
- queue.push(fn);
- window.postMessage('process-tick', '*');
- };
- }
-
- return function nextTick(fn) {
- setTimeout(fn, 0);
- };
-})();
-
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-}
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-
-},
-{}],
-2:[function(req,module,exports){
-(function(process){if (!process.EventEmitter) process.EventEmitter = function () {};
-
-var EventEmitter = exports.EventEmitter = process.EventEmitter;
-var isArray = typeof Array.isArray === 'function'
- ? Array.isArray
- : function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]'
- }
-;
-function indexOf (xs, x) {
- if (xs.indexOf) return xs.indexOf(x);
- for (var i = 0; i < xs.length; i++) {
- if (x === xs[i]) return i;
- }
- return -1;
-}
-var defaultMaxListeners = 200;
-EventEmitter.prototype.setMaxListeners = function(n) {
- if (!this._events) this._events = {};
- this._events.maxListeners = n;
-};
-
-
-EventEmitter.prototype.emit = function(type) {
- if (type === 'error') {
- if (!this._events || !this._events.error ||
- (isArray(this._events.error) && !this._events.error.length))
- {
- if (arguments[1] instanceof Error) {
- throw arguments[1]; // Unhandled 'error' event
- } else {
- throw new Error("Uncaught, unspecified 'error' event.");
- }
- return false;
- }
- }
-
- if (!this._events) return false;
- var handler = this._events[type];
- if (!handler) return false;
-
- if (typeof handler == 'function') {
- switch (arguments.length) {
- case 1:
- handler.call(this);
- break;
- case 2:
- handler.call(this, arguments[1]);
- break;
- case 3:
- handler.call(this, arguments[1], arguments[2]);
- break;
- default:
- var args = Array.prototype.slice.call(arguments, 1);
- handler.apply(this, args);
- }
- return true;
-
- } else if (isArray(handler)) {
- var args = Array.prototype.slice.call(arguments, 1);
-
- var listeners = handler.slice();
- for (var i = 0, l = listeners.length; i < l; i++) {
- listeners[i].apply(this, args);
- }
- return true;
-
- } else {
- return false;
- }
-};
-EventEmitter.prototype.addListener = function(type, listener) {
- if ('function' !== typeof listener) {
- throw new Error('addListener only takes instances of Function');
- }
-
- if (!this._events) this._events = {};
- this.emit('newListener', type, listener);
-
- if (!this._events[type]) {
- this._events[type] = listener;
- } else if (isArray(this._events[type])) {
- if (!this._events[type].warned) {
- var m;
- if (this._events.maxListeners !== undefined) {
- m = this._events.maxListeners;
- } else {
- m = defaultMaxListeners;
- }
-
- if (m && m > 0 && this._events[type].length > m) {
- this._events[type].warned = true;
- console.error('(node) warning: possible EventEmitter memory ' +
- 'leak detected. %d listeners added. ' +
- 'Use emitter.setMaxListeners() to increase limit.',
- this._events[type].length);
- console.trace();
- }
- }
- this._events[type].push(listener);
- } else {
- this._events[type] = [this._events[type], listener];
- }
-
- return this;
-};
-
-EventEmitter.prototype.on = EventEmitter.prototype.addListener;
-
-EventEmitter.prototype.once = function(type, listener) {
- var self = this;
- self.on(type, function g() {
- self.removeListener(type, g);
- listener.apply(this, arguments);
- });
-
- return this;
-};
-
-EventEmitter.prototype.removeListener = function(type, listener) {
- if ('function' !== typeof listener) {
- throw new Error('removeListener only takes instances of Function');
- }
- if (!this._events || !this._events[type]) return this;
-
- var list = this._events[type];
- if (isArray(list)) {
- var i = indexOf(list, listener);
- if (i < 0) return this;
- list.splice(i, 1);
- if (list.length == 0)
- delete this._events[type];
- } else if (this._events[type] === listener) {
- delete this._events[type];
- }
-
- return this;
-};
+ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
-EventEmitter.prototype.removeAllListeners = function(type) {
- if (arguments.length === 0) {
- this._events = {};
- return this;
- }
- if (type && this._events && this._events[type]) this._events[type] = null;
- return this;
-};
-
-EventEmitter.prototype.listeners = function(type) {
- if (!this._events) this._events = {};
- if (!this._events[type]) this._events[type] = [];
- if (!isArray(this._events[type])) {
- this._events[type] = [this._events[type]];
- }
- return this._events[type];
-};
-
-})(req("__browserify_process"))
-},
-{"__browserify_process":1}],
-3:[function(req,module,exports){
-(function(){// jshint -W001
-
-exports.reservedVars = {
- arguments : false,
- NaN : false
-};
-
-exports.ecmaIdentifiers = {
- Array : false,
- Boolean : false,
- Date : false,
- decodeURI : false,
- decodeURIComponent : false,
- encodeURI : false,
- encodeURIComponent : false,
- Error : false,
- "eval" : false,
- EvalError : false,
- Function : false,
- hasOwnProperty : false,
- isFinite : false,
- isNaN : false,
- JSON : false,
- Math : false,
- Map : false,
- Number : false,
- Object : false,
- parseInt : false,
- parseFloat : false,
- RangeError : false,
- ReferenceError : false,
- RegExp : false,
- Set : false,
- String : false,
- SyntaxError : false,
- TypeError : false,
- URIError : false,
- WeakMap : false
-};
-
-exports.browser = {
- ArrayBuffer : false,
- ArrayBufferView : false,
- Audio : false,
- Blob : false,
- addEventListener : false,
- applicationCache : false,
- atob : false,
- blur : false,
- btoa : false,
- clearInterval : false,
- clearTimeout : false,
- close : false,
- closed : false,
- DataView : false,
- DOMParser : false,
- defaultStatus : false,
- document : false,
- Element : false,
- ElementTimeControl : false,
- event : false,
- FileReader : false,
- Float32Array : false,
- Float64Array : false,
- FormData : false,
- focus : false,
- frames : false,
- getComputedStyle : false,
- HTMLElement : false,
- HTMLAnchorElement : false,
- HTMLBaseElement : false,
- HTMLBlockquoteElement: false,
- HTMLBodyElement : false,
- HTMLBRElement : false,
- HTMLButtonElement : false,
- HTMLCanvasElement : false,
- HTMLDirectoryElement : false,
- HTMLDivElement : false,
- HTMLDListElement : false,
- HTMLFieldSetElement : false,
- HTMLFontElement : false,
- HTMLFormElement : false,
- HTMLFrameElement : false,
- HTMLFrameSetElement : false,
- HTMLHeadElement : false,
- HTMLHeadingElement : false,
- HTMLHRElement : false,
- HTMLHtmlElement : false,
- HTMLIFrameElement : false,
- HTMLImageElement : false,
- HTMLInputElement : false,
- HTMLIsIndexElement : false,
- HTMLLabelElement : false,
- HTMLLayerElement : false,
- HTMLLegendElement : false,
- HTMLLIElement : false,
- HTMLLinkElement : false,
- HTMLMapElement : false,
- HTMLMenuElement : false,
- HTMLMetaElement : false,
- HTMLModElement : false,
- HTMLObjectElement : false,
- HTMLOListElement : false,
- HTMLOptGroupElement : false,
- HTMLOptionElement : false,
- HTMLParagraphElement : false,
- HTMLParamElement : false,
- HTMLPreElement : false,
- HTMLQuoteElement : false,
- HTMLScriptElement : false,
- HTMLSelectElement : false,
- HTMLStyleElement : false,
- HTMLTableCaptionElement: false,
- HTMLTableCellElement : false,
- HTMLTableColElement : false,
- HTMLTableElement : false,
- HTMLTableRowElement : false,
- HTMLTableSectionElement: false,
- HTMLTextAreaElement : false,
- HTMLTitleElement : false,
- HTMLUListElement : false,
- HTMLVideoElement : false,
- history : false,
- Int16Array : false,
- Int32Array : false,
- Int8Array : false,
- Image : false,
- length : false,
- localStorage : false,
- location : false,
- MessageChannel : false,
- MessageEvent : false,
- MessagePort : false,
- moveBy : false,
- moveTo : false,
- MutationObserver : false,
- name : false,
- Node : false,
- NodeFilter : false,
- navigator : false,
- onbeforeunload : true,
- onblur : true,
- onerror : true,
- onfocus : true,
- onload : true,
- onresize : true,
- onunload : true,
- open : false,
- openDatabase : false,
- opener : false,
- Option : false,
- parent : false,
- print : false,
- removeEventListener : false,
- resizeBy : false,
- resizeTo : false,
- screen : false,
- scroll : false,
- scrollBy : false,
- scrollTo : false,
- sessionStorage : false,
- setInterval : false,
- setTimeout : false,
- SharedWorker : false,
- status : false,
- SVGAElement : false,
- SVGAltGlyphDefElement: false,
- SVGAltGlyphElement : false,
- SVGAltGlyphItemElement: false,
- SVGAngle : false,
- SVGAnimateColorElement: false,
- SVGAnimateElement : false,
- SVGAnimateMotionElement: false,
- SVGAnimateTransformElement: false,
- SVGAnimatedAngle : false,
- SVGAnimatedBoolean : false,
- SVGAnimatedEnumeration: false,
- SVGAnimatedInteger : false,
- SVGAnimatedLength : false,
- SVGAnimatedLengthList: false,
- SVGAnimatedNumber : false,
- SVGAnimatedNumberList: false,
- SVGAnimatedPathData : false,
- SVGAnimatedPoints : false,
- SVGAnimatedPreserveAspectRatio: false,
- SVGAnimatedRect : false,
- SVGAnimatedString : false,
- SVGAnimatedTransformList: false,
- SVGAnimationElement : false,
- SVGCSSRule : false,
- SVGCircleElement : false,
- SVGClipPathElement : false,
- SVGColor : false,
- SVGColorProfileElement: false,
- SVGColorProfileRule : false,
- SVGComponentTransferFunctionElement: false,
- SVGCursorElement : false,
- SVGDefsElement : false,
- SVGDescElement : false,
- SVGDocument : false,
- SVGElement : false,
- SVGElementInstance : false,
- SVGElementInstanceList: false,
- SVGEllipseElement : false,
- SVGExternalResourcesRequired: false,
- SVGFEBlendElement : false,
- SVGFEColorMatrixElement: false,
- SVGFEComponentTransferElement: false,
- SVGFECompositeElement: false,
- SVGFEConvolveMatrixElement: false,
- SVGFEDiffuseLightingElement: false,
- SVGFEDisplacementMapElement: false,
- SVGFEDistantLightElement: false,
- SVGFEFloodElement : false,
- SVGFEFuncAElement : false,
- SVGFEFuncBElement : false,
- SVGFEFuncGElement : false,
- SVGFEFuncRElement : false,
- SVGFEGaussianBlurElement: false,
- SVGFEImageElement : false,
- SVGFEMergeElement : false,
- SVGFEMergeNodeElement: false,
- SVGFEMorphologyElement: false,
- SVGFEOffsetElement : false,
- SVGFEPointLightElement: false,
- SVGFESpecularLightingElement: false,
- SVGFESpotLightElement: false,
- SVGFETileElement : false,
- SVGFETurbulenceElement: false,
- SVGFilterElement : false,
- SVGFilterPrimitiveStandardAttributes: false,
- SVGFitToViewBox : false,
- SVGFontElement : false,
- SVGFontFaceElement : false,
- SVGFontFaceFormatElement: false,
- SVGFontFaceNameElement: false,
- SVGFontFaceSrcElement: false,
- SVGFontFaceUriElement: false,
- SVGForeignObjectElement: false,
- SVGGElement : false,
- SVGGlyphElement : false,
- SVGGlyphRefElement : false,
- SVGGradientElement : false,
- SVGHKernElement : false,
- SVGICCColor : false,
- SVGImageElement : false,
- SVGLangSpace : false,
- SVGLength : false,
- SVGLengthList : false,
- SVGLineElement : false,
- SVGLinearGradientElement: false,
- SVGLocatable : false,
- SVGMPathElement : false,
- SVGMarkerElement : false,
- SVGMaskElement : false,
- SVGMatrix : false,
- SVGMetadataElement : false,
- SVGMissingGlyphElement: false,
- SVGNumber : false,
- SVGNumberList : false,
- SVGPaint : false,
- SVGPathElement : false,
- SVGPathSeg : false,
- SVGPathSegArcAbs : false,
- SVGPathSegArcRel : false,
- SVGPathSegClosePath : false,
- SVGPathSegCurvetoCubicAbs: false,
- SVGPathSegCurvetoCubicRel: false,
- SVGPathSegCurvetoCubicSmoothAbs: false,
- SVGPathSegCurvetoCubicSmoothRel: false,
- SVGPathSegCurvetoQuadraticAbs: false,
- SVGPathSegCurvetoQuadraticRel: false,
- SVGPathSegCurvetoQuadraticSmoothAbs: false,
- SVGPathSegCurvetoQuadraticSmoothRel: false,
- SVGPathSegLinetoAbs : false,
- SVGPathSegLinetoHorizontalAbs: false,
- SVGPathSegLinetoHorizontalRel: false,
- SVGPathSegLinetoRel : false,
- SVGPathSegLinetoVerticalAbs: false,
- SVGPathSegLinetoVerticalRel: false,
- SVGPathSegList : false,
- SVGPathSegMovetoAbs : false,
- SVGPathSegMovetoRel : false,
- SVGPatternElement : false,
- SVGPoint : false,
- SVGPointList : false,
- SVGPolygonElement : false,
- SVGPolylineElement : false,
- SVGPreserveAspectRatio: false,
- SVGRadialGradientElement: false,
- SVGRect : false,
- SVGRectElement : false,
- SVGRenderingIntent : false,
- SVGSVGElement : false,
- SVGScriptElement : false,
- SVGSetElement : false,
- SVGStopElement : false,
- SVGStringList : false,
- SVGStylable : false,
- SVGStyleElement : false,
- SVGSwitchElement : false,
- SVGSymbolElement : false,
- SVGTRefElement : false,
- SVGTSpanElement : false,
- SVGTests : false,
- SVGTextContentElement: false,
- SVGTextElement : false,
- SVGTextPathElement : false,
- SVGTextPositioningElement: false,
- SVGTitleElement : false,
- SVGTransform : false,
- SVGTransformList : false,
- SVGTransformable : false,
- SVGURIReference : false,
- SVGUnitTypes : false,
- SVGUseElement : false,
- SVGVKernElement : false,
- SVGViewElement : false,
- SVGViewSpec : false,
- SVGZoomAndPan : false,
- TimeEvent : false,
- top : false,
- Uint16Array : false,
- Uint32Array : false,
- Uint8Array : false,
- Uint8ClampedArray : false,
- WebSocket : false,
- window : false,
- Worker : false,
- XMLHttpRequest : false,
- XMLSerializer : false,
- XPathEvaluator : false,
- XPathException : false,
- XPathExpression : false,
- XPathNamespace : false,
- XPathNSResolver : false,
- XPathResult : false
-};
-
-exports.devel = {
- alert : false,
- confirm: false,
- console: false,
- Debug : false,
- opera : false,
- prompt : false
-};
-
-exports.worker = {
- importScripts: true,
- postMessage : true,
- self : true
-};
-exports.nonstandard = {
- escape : false,
- unescape: false
-};
-
-exports.couch = {
- "require" : false,
- respond : false,
- getRow : false,
- emit : false,
- send : false,
- start : false,
- sum : false,
- log : false,
- exports : false,
- module : false,
- provides : false
-};
-
-exports.node = {
- __filename : false,
- __dirname : false,
- Buffer : false,
- DataView : false,
- console : false,
- exports : true, // In Node it is ok to exports = module.exports = foo();
- GLOBAL : false,
- global : false,
- module : false,
- process : false,
- require : false,
- setTimeout : false,
- clearTimeout : false,
- setInterval : false,
- clearInterval : false,
- setImmediate : false, // v0.9.1+
- clearImmediate: false // v0.9.1+
-};
-
-exports.phantom = {
- phantom : true,
- require : true,
- WebPage : true
-};
-
-exports.rhino = {
- defineClass : false,
- deserialize : false,
- gc : false,
- help : false,
- importPackage: false,
- "java" : false,
- load : false,
- loadClass : false,
- print : false,
- quit : false,
- readFile : false,
- readUrl : false,
- runCommand : false,
- seal : false,
- serialize : false,
- spawn : false,
- sync : false,
- toint32 : false,
- version : false
-};
-
-exports.shelljs = {
- target : false,
- echo : false,
- exit : false,
- cd : false,
- pwd : false,
- ls : false,
- find : false,
- cp : false,
- rm : false,
- mv : false,
- mkdir : false,
- test : false,
- cat : false,
- sed : false,
- grep : false,
- which : false,
- dirs : false,
- pushd : false,
- popd : false,
- env : false,
- exec : false,
- chmod : false,
- config : false,
- error : false,
- tempdir : false
-};
-
-exports.wsh = {
- ActiveXObject : true,
- Enumerator : true,
- GetObject : true,
- ScriptEngine : true,
- ScriptEngineBuildVersion : true,
- ScriptEngineMajorVersion : true,
- ScriptEngineMinorVersion : true,
- VBArray : true,
- WSH : true,
- WScript : true,
- XDomainRequest : true
-};
-
-exports.dojo = {
- dojo : false,
- dijit : false,
- dojox : false,
- define : false,
- "require": false
-};
-
-exports.jquery = {
- "$" : false,
- jQuery : false
-};
-
-exports.mootools = {
- "$" : false,
- "$$" : false,
- Asset : false,
- Browser : false,
- Chain : false,
- Class : false,
- Color : false,
- Cookie : false,
- Core : false,
- Document : false,
- DomReady : false,
- DOMEvent : false,
- DOMReady : false,
- Drag : false,
- Element : false,
- Elements : false,
- Event : false,
- Events : false,
- Fx : false,
- Group : false,
- Hash : false,
- HtmlTable : false,
- Iframe : false,
- IframeShim : false,
- InputValidator: false,
- instanceOf : false,
- Keyboard : false,
- Locale : false,
- Mask : false,
- MooTools : false,
- Native : false,
- Options : false,
- OverText : false,
- Request : false,
- Scroller : false,
- Slick : false,
- Slider : false,
- Sortables : false,
- Spinner : false,
- Swiff : false,
- Tips : false,
- Type : false,
- typeOf : false,
- URI : false,
- Window : false
-};
-
-exports.prototypejs = {
- "$" : false,
- "$$" : false,
- "$A" : false,
- "$F" : false,
- "$H" : false,
- "$R" : false,
- "$break" : false,
- "$continue" : false,
- "$w" : false,
- Abstract : false,
- Ajax : false,
- Class : false,
- Enumerable : false,
- Element : false,
- Event : false,
- Field : false,
- Form : false,
- Hash : false,
- Insertion : false,
- ObjectRange : false,
- PeriodicalExecuter: false,
- Position : false,
- Prototype : false,
- Selector : false,
- Template : false,
- Toggle : false,
- Try : false,
- Autocompleter : false,
- Builder : false,
- Control : false,
- Draggable : false,
- Draggables : false,
- Droppables : false,
- Effect : false,
- Sortable : false,
- SortableObserver : false,
- Sound : false,
- Scriptaculous : false
-};
-
-exports.yui = {
- YUI : false,
- Y : false,
- YUI_config: false
-};
-
-
-})()
-},
-{}],
-4:[function(req,module,exports){
-
-"use string";
-exports.unsafeString =
- /@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i;
-exports.unsafeChars =
- /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
-exports.needEsc =
- /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
-
-exports.needEscGlobal =
- /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
-exports.starSlash = /\*\//;
-exports.identifier = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/;
-exports.javascriptURL = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i;
-exports.fallsThrough = /^\s*\/\*\s*falls?\sthrough\s*\*\/\s*$/;
-
-},
-{}],
-5:[function(req,module,exports){
-
-
-var state = {
- syntax: {},
-
- reset: function () {
- this.tokens = {
- prev: null,
- next: null,
- curr: null
- };
-
- this.option = {};
- this.ignored = {};
- this.directive = {};
- this.jsonMode = false;
- this.jsonWarnings = [];
- this.lines = [];
- this.tab = "";
- this.cache = {}; // Node.JS doesn't have Map. Sniff.
- }
-};
-
-exports.state = state;
-
-},
-{}],
-6:[function(req,module,exports){
-(function(){
-
-exports.register = function (linter) {
-
- linter.on("Identifier", function style_scanProto(data) {
- if (linter.getOption("proto")) {
- return;
- }
-
- if (data.name === "__proto__") {
- linter.warn("W103", {
- line: data.line,
- char: data.char,
- data: [ data.name ]
- });
- }
- });
-
- linter.on("Identifier", function style_scanIterator(data) {
- if (linter.getOption("iterator")) {
- return;
- }
-
- if (data.name === "__iterator__") {
- linter.warn("W104", {
- line: data.line,
- char: data.char,
- data: [ data.name ]
- });
- }
- });
-
- linter.on("Identifier", function style_scanDangling(data) {
- if (!linter.getOption("nomen")) {
- return;
- }
- if (data.name === "_") {
- return;
- }
- if (linter.getOption("node")) {
- if (/^(__dirname|__filename)$/.test(data.name) && !data.isProperty) {
- return;
- }
- }
-
- if (/^(_+.*|.*_+)$/.test(data.name)) {
- linter.warn("W105", {
- line: data.line,
- char: data.from,
- data: [ "dangling '_'", data.name ]
- });
- }
- });
-
- linter.on("Identifier", function style_scanCamelCase(data) {
- if (!linter.getOption("camelcase")) {
- return;
- }
-
- if (data.name.replace(/^_+/, "").indexOf("_") > -1 && !data.name.match(/^[A-Z0-9_]*$/)) {
- linter.warn("W106", {
- line: data.line,
- char: data.from,
- data: [ data.name ]
- });
- }
- });
-
- linter.on("String", function style_scanQuotes(data) {
- var quotmark = linter.getOption("quotmark");
- var code;
-
- if (!quotmark) {
- return;
- }
-
- if (quotmark === "single" && data.quote !== "'") {
- code = "W109";
- }
-
- if (quotmark === "double" && data.quote !== "\"") {
- code = "W108";
- }
-
- if (quotmark === true) {
- if (!linter.getCache("quotmark")) {
- linter.setCache("quotmark", data.quote);
- }
-
- if (linter.getCache("quotmark") !== data.quote) {
- code = "W110";
- }
- }
-
- if (code) {
- linter.warn(code, {
- line: data.line,
- char: data.char,
- });
- }
- });
-
- linter.on("Number", function style_scanNumbers(data) {
- if (data.value.charAt(0) === ".") {
- linter.warn("W008", {
- line: data.line,
- char: data.char,
- data: [ data.value ]
- });
- }
-
- if (data.value.substr(data.value.length - 1) === ".") {
- linter.warn("W047", {
- line: data.line,
- char: data.char,
- data: [ data.value ]
- });
- }
-
- if (/^00+/.test(data.value)) {
- linter.warn("W046", {
- line: data.line,
- char: data.char,
- data: [ data.value ]
- });
- }
- });
-
- linter.on("String", function style_scanJavaScriptURLs(data) {
- var re = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i;
-
- if (linter.getOption("scripturl")) {
- return;
- }
-
- if (re.test(data.value)) {
- linter.warn("W107", {
- line: data.line,
- char: data.char
- });
- }
- });
-};
-})()
-},
-{}],
-7:[function(req,module,exports){
-(function(global){/*global window, global*/
-var functions = [
- [log, "log"]
- , [info, "info"]
- , [warn, "warn"]
- , [error, "error"]
- , [time, "time"]
- , [timeEnd, "timeEnd"]
- , [trace, "trace"]
- , [dir, "dir"]
- , [assert, "assert"]
-]
-
-for (var i = 0; i < functions.length; i++) {
- var tuple = functions[i]
- var f = tuple[0]
- var name = tuple[1]
-
- if (!console[name]) {
- console[name] = f
- }
-}
-
-module.exports = console
-
-function log() {}
-
-function info() {}
-
-function warn() {}
-
-function error() {}
-
-function time(label) {}
-
-function timeEnd(label) {}
-
-function trace() {}
-
-function dir(object) {}
-
-function assert(expression) {}
-
-})(window)
-},
-{}],
-"jshint":[function(req,module,exports){
-module.exports=req('E/GbHF');
-},
-{}],"E/GbHF":[function(req,module,exports){
-(function(){/*!
- * JSHint, by JSHint Community.
- *
- * This file (and this file only) is licensed under the same slightly modified
- * MIT license that JSLint is. It stops evil-doers everywhere:
- *
- * Copyright (c) 2002 Douglas Crockford (www.JSLint.com)
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * The Software shall be used for Good, not Evil.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- */
-
-var _ = req("underscore");
-var events = req("events");
-var vars = req("../shared/vars.js");
-var messages = req("../shared/messages.js");
-var Lexer = req("./lex.js").Lexer;
-var reg = req("./reg.js");
-var state = req("./state.js").state;
-var style = req("./style.js");
-var console = req("console-browserify");
-
-var JSHINT = (function () {
-
-
- var anonname, // The guessed name for anonymous functions.
- api, // Extension API
- bang = {
- "<" : true,
- "<=" : true,
- "==" : true,
- "===": true,
- "!==": true,
- "!=" : true,
- ">" : true,
- ">=" : true,
- "+" : true,
- "-" : true,
- "*" : true,
- "/" : true,
- "%" : true
- },
- boolOptions = {
- asi : true, // if automatic semicolon insertion should be tolerated
- bitwise : true, // if bitwise operators should not be allowed
- boss : true, // if advanced usage of assignments should be allowed
- browser : true, // if the standard browser globals should be predefined
- camelcase : true, // if identifiers should be required in camel case
- couch : true, // if CouchDB globals should be predefined
- curly : true, // if curly braces around all blocks should be required
- debug : true, // if debugger statements should be allowed
- devel : true, // if logging globals should be predefined (console, alert, etc.)
- dojo : true, // if Dojo Toolkit globals should be predefined
- eqeqeq : true, // if === should be required
- eqnull : true, // if == null comparisons should be tolerated
- es3 : true, // if ES3 syntax should be allowed
- es5 : true, // if ES5 syntax should be allowed (is now set per default)
- esnext : true, // if es.next specific syntax should be allowed
- moz : true, // if mozilla specific syntax should be allowed
- evil : true, // if eval should be allowed
- expr : true, // if ExpressionStatement should be allowed as Programs
- forin : true, // if for in statements must filter
- funcscope : true, // if only function scope should be used for scope tests
- gcl : true, // if JSHint should be compatible with Google Closure Linter
- globalstrict: true, // if global should be allowed (also enables 'strict')
- immed : true, // if immediate invocations must be wrapped in parens
- iterator : true, // if the `__iterator__` property should be allowed
- jquery : true, // if jQuery globals should be predefined
- lastsemic : true, // if semicolons may be ommitted for the trailing
- laxbreak : true, // if line breaks should not be checked
- laxcomma : true, // if line breaks should not be checked around commas
- loopfunc : true, // if functions should be allowed to be defined within
- mootools : true, // if MooTools globals should be predefined
- multistr : true, // allow multiline strings
- newcap : true, // if constructor names must be capitalized
- noarg : true, // if arguments.caller and arguments.callee should be
- node : true, // if the Node.js environment globals should be
- noempty : true, // if empty blocks should be disallowed
- nonew : true, // if using `new` for side-effects should be disallowed
- nonstandard : true, // if non-standard (but widely adopted) globals should
- nomen : true, // if names should be checked
- onevar : true, // if only one var statement per function should be
- passfail : true, // if the scan should stop on first error
- phantom : true, // if PhantomJS symbols should be allowed
- plusplus : true, // if increment/decrement should not be allowed
- proto : true, // if the `__proto__` property should be allowed
- prototypejs : true, // if Prototype and Scriptaculous globals should be
- rhino : true, // if the Rhino environment globals should be predefined
- shelljs : true, // if ShellJS globals should be predefined
- undef : true, // if variables should be declared before used
- scripturl : true, // if script-targeted URLs should be tolerated
- shadow : true, // if variable shadowing should be tolerated
- smarttabs : true, // if smarttabs should be tolerated
- strict : true, // require the pragma
- sub : true, // if all forms of subscript notation are tolerated
- supernew : true, // if `new function () { ... };` and `new Object;`
- trailing : true, // if trailing whitespace rules apply
- validthis : true, // if 'this' inside a non-constructor function is valid.
- withstmt : true, // if with statements should be allowed
- white : true, // if strict whitespace rules apply
- worker : true, // if Web Worker script symbols should be allowed
- wsh : true, // if the Windows Scripting Host environment globals
- yui : true, // YUI variables should be predefined
- onecase : true, // if one case switch statements should be allowed
- regexp : true, // if the . should not be allowed in regexp literals
- regexdash : true // if unescaped first/last dash (-) inside brackets
- },
- valOptions = {
- maxlen : false,
- indent : false,
- maxerr : false,
- predef : false,
- quotmark : false, //'single'|'double'|true
- scope : false,
- maxstatements: false, // {int} max statements per function
- maxdepth : false, // {int} max nested block depth per function
- maxparams : false, // {int} max params per function
- maxcomplexity: false, // {int} max cyclomatic complexity per function
- unused : true, // warn if variables are unused. Available options:
- latedef : false // warn if the variable is used before its definition
- },
- invertedOptions = {
- bitwise : true,
- forin : true,
- newcap : true,
- nomen : true,
- plusplus: true,
- regexp : true,
- undef : true,
- white : true,
- eqeqeq : true,
- onevar : true,
- strict : true
- },
- renamedOptions = {
- eqeq : "eqeqeq",
- vars : "onevar",
- windows: "wsh",
- sloppy : "strict"
- },
-
- declared, // Globals that were declared using /*global ... */ syntax.
- exported, // Variables that are used outside of the current file.
-
- functionicity = [
- "closure", "exception", "global", "label",
- "outer", "unused", "var"
- ],
-
- funct, // The current function
- functions, // All of the functions
-
- global, // The global scope
- implied, // Implied globals
- inblock,
- indent,
- lookahead,
- lex,
- member,
- membersOnly,
- noreach,
- predefined, // Global variables defined by option
-
- scope, // The current scope
- stack,
- unuseds,
- urls,
- warnings,
-
- extraModules = [],
- emitter = new events.EventEmitter();
-
- function checkOption(name, t) {
- name = name.trim();
-
- if (/^[+-]W\d{3}$/g.test(name)) {
- return true;
- }
-
- if (valOptions[name] === undefined && boolOptions[name] === undefined) {
- if (t.type !== "jslint") {
- error("E001", t, name);
- return false;
- }
- }
-
- return true;
- }
-
- function isString(obj) {
- return Object.prototype.toString.call(obj) === "[object String]";
- }
-
- function isIdentifier(tkn, value) {
- if (!tkn)
- return false;
-
- if (!tkn.identifier || tkn.value !== value)
- return false;
-
- return true;
- }
-
- function isReserved(token) {
- if (!token.reserved) {
- return false;
- }
-
- if (token.meta && token.meta.isFutureReservedWord) {
- if (state.option.inES5(true) && !token.meta.es5) {
- return false;
- }
- if (token.meta.strictOnly) {
- if (!state.option.strict && !state.directive["use strict"]) {
- return false;
- }
- }
-
- if (token.isProperty) {
- return false;
- }
- }
-
- return true;
- }
-
- function supplant(str, data) {
- return str.replace(/\{([^{}]*)\}/g, function (a, b) {
- var r = data[b];
- return typeof r === "string" || typeof r === "number" ? r : a;
- });
- }
-
- function combine(t, o) {
- var n;
- for (n in o) {
- if (_.has(o, n) && !_.has(JSHINT.blacklist, n)) {
- t[n] = o[n];
- }
- }
- }
-
- function updatePredefined() {
- Object.keys(JSHINT.blacklist).forEach(function (key) {
- delete predefined[key];
- });
- }
-
- function assume() {
- if (state.option.couch) {
- combine(predefined, vars.couch);
- }
-
- if (state.option.rhino) {
- combine(predefined, vars.rhino);
- }
-
- if (state.option.shelljs) {
- combine(predefined, vars.shelljs);
- }
-
- if (state.option.phantom) {
- combine(predefined, vars.phantom);
- }
-
- if (state.option.prototypejs) {
- combine(predefined, vars.prototypejs);
- }
-
- if (state.option.node) {
- combine(predefined, vars.node);
- }
-
- if (state.option.devel) {
- combine(predefined, vars.devel);
- }
-
- if (state.option.dojo) {
- combine(predefined, vars.dojo);
- }
-
- if (state.option.browser) {
- combine(predefined, vars.browser);
- }
-
- if (state.option.nonstandard) {
- combine(predefined, vars.nonstandard);
- }
-
- if (state.option.jquery) {
- combine(predefined, vars.jquery);
- }
-
- if (state.option.mootools) {
- combine(predefined, vars.mootools);
- }
-
- if (state.option.worker) {
- combine(predefined, vars.worker);
- }
-
- if (state.option.wsh) {
- combine(predefined, vars.wsh);
- }
-
- if (state.option.globalstrict && state.option.strict !== false) {
- state.option.strict = true;
- }
-
- if (state.option.yui) {
- combine(predefined, vars.yui);
- }
-
- state.option.inMoz = function (strict) {
- return state.option.moz;
- };
-
- state.option.inESNext = function (strict) {
- return state.option.moz || state.option.esnext;
- };
-
- state.option.inES5 = function (/* strict */) {
- return !state.option.es3;
- };
-
- state.option.inES3 = function (strict) {
- if (strict) {
- return !state.option.moz && !state.option.esnext && state.option.es3;
- }
- return state.option.es3;
- };
- }
- function quit(code, line, chr) {
- var percentage = Math.floor((line / state.lines.length) * 100);
- var message = messages.errors[code].desc;
-
- throw {
- name: "JSHintError",
- line: line,
- character: chr,
- message: message + " (" + percentage + "% scanned).",
- raw: message
- };
- }
-
- function isundef(scope, code, token, a) {
- return JSHINT.undefs.push([scope, code, token, a]);
- }
-
- function warning(code, t, a, b, c, d) {
- var ch, l, w, msg;
-
- if (/^W\d{3}$/.test(code)) {
- if (state.ignored[code])
- return;
-
- msg = messages.warnings[code];
- } else if (/E\d{3}/.test(code)) {
- msg = messages.errors[code];
- } else if (/I\d{3}/.test(code)) {
- msg = messages.info[code];
- }
-
- t = t || state.tokens.next;
- if (t.id === "(end)") { // `~
- t = state.tokens.curr;
- }
-
- l = t.line || 0;
- ch = t.from || 0;
-
- w = {
- id: "(error)",
- raw: msg.desc,
- code: msg.code,
- evidence: state.lines[l - 1] || "",
- line: l,
- character: ch,
- scope: JSHINT.scope,
- a: a,
- b: b,
- c: c,
- d: d
- };
-
- w.reason = supplant(msg.desc, w);
- JSHINT.errors.push(w);
-
- if (state.option.passfail) {
- quit("E042", l, ch);
- }
-
- warnings += 1;
- if (warnings >= state.option.maxerr) {
- quit("E043", l, ch);
- }
-
- return w;
- }
-
- function warningAt(m, l, ch, a, b, c, d) {
- return warning(m, {
- line: l,
- from: ch
- }, a, b, c, d);
- }
-
- function error(m, t, a, b, c, d) {
- warning(m, t, a, b, c, d);
- }
-
- function errorAt(m, l, ch, a, b, c, d) {
- return error(m, {
- line: l,
- from: ch
- }, a, b, c, d);
- }
- function addInternalSrc(elem, src) {
- var i;
- i = {
- id: "(internal)",
- elem: elem,
- value: src
- };
- JSHINT.internals.push(i);
- return i;
- }
-
- function addlabel(t, type, tkn, islet) {
- if (type === "exception") {
- if (_.has(funct["(context)"], t)) {
- if (funct[t] !== true && !state.option.node) {
- warning("W002", state.tokens.next, t);
- }
- }
- }
-
- if (_.has(funct, t) && !funct["(global)"]) {
- if (funct[t] === true) {
- if (state.option.latedef) {
- if ((state.option.latedef === true && _.contains([funct[t], type], "unction")) ||
- !_.contains([funct[t], type], "unction")) {
- warning("W003", state.tokens.next, t);
- }
- }
- } else {
- if (!state.option.shadow && type !== "exception" ||
- (funct["(blockscope)"].getlabel(t))) {
- warning("W004", state.tokens.next, t);
- }
- }
- }
- if (funct["(blockscope)"] && funct["(blockscope)"].current.has(t)) {
- error("E044", state.tokens.next, t);
- }
- if (islet) {
- funct["(blockscope)"].current.add(t, type, state.tokens.curr);
- } else {
-
- funct[t] = type;
-
- if (tkn) {
- funct["(tokens)"][t] = tkn;
- }
-
- if (funct["(global)"]) {
- global[t] = funct;
- if (_.has(implied, t)) {
- if (state.option.latedef) {
- if ((state.option.latedef === true && _.contains([funct[t], type], "unction")) ||
- !_.contains([funct[t], type], "unction")) {
- warning("W003", state.tokens.next, t);
- }
- }
-
- delete implied[t];
- }
- } else {
- scope[t] = funct;
- }
- }
- }
-
- function doOption() {
- var nt = state.tokens.next;
- var body = nt.body.split(",").map(function (s) { return s.trim(); });
- var predef = {};
-
- if (nt.type === "globals") {
- body.forEach(function (g) {
- g = g.split(":");
- var key = g[0];
- var val = g[1];
-
- if (key.charAt(0) === "-") {
- key = key.slice(1);
- val = false;
-
- JSHINT.blacklist[key] = key;
- updatePredefined();
- } else {
- predef[key] = (val === "true");
- }
- });
-
- combine(predefined, predef);
-
- for (var key in predef) {
- if (_.has(predef, key)) {
- declared[key] = nt;
- }
- }
- }
-
- if (nt.type === "exported") {
- body.forEach(function (e) {
- exported[e] = true;
- });
- }
-
- if (nt.type === "members") {
- membersOnly = membersOnly || {};
-
- body.forEach(function (m) {
- var ch1 = m.charAt(0);
- var ch2 = m.charAt(m.length - 1);
-
- if (ch1 === ch2 && (ch1 === "\"" || ch1 === "'")) {
- m = m
- .substr(1, m.length - 2)
- .replace("\\b", "\b")
- .replace("\\t", "\t")
- .replace("\\n", "\n")
- .replace("\\v", "\v")
- .replace("\\f", "\f")
- .replace("\\r", "\r")
- .replace("\\\\", "\\")
- .replace("\\\"", "\"");
- }
-
- membersOnly[m] = false;
- });
- }
-
- var numvals = [
- "maxstatements",
- "maxparams",
- "maxdepth",
- "maxcomplexity",
- "maxerr",
- "maxlen",
- "indent"
- ];
-
- if (nt.type === "jshint" || nt.type === "jslint") {
- body.forEach(function (g) {
- g = g.split(":");
- var key = (g[0] || "").trim();
- var val = (g[1] || "").trim();
-
- if (!checkOption(key, nt)) {
- return;
- }
-
- if (numvals.indexOf(key) >= 0) {
- if (val !== "false") {
- val = +val;
-
- if (typeof val !== "number" || !isFinite(val) || val <= 0 || Math.floor(val) !== val) {
- error("E032", nt, g[1].trim());
- return;
- }
-
- if (key === "indent") {
- state.option["(explicitIndent)"] = true;
- }
- state.option[key] = val;
- } else {
- if (key === "indent") {
- state.option["(explicitIndent)"] = false;
- } else {
- state.option[key] = false;
- }
- }
-
- return;
- }
-
- if (key === "validthis") {
- if (funct["(global)"]) {
- error("E009");
- } else {
- if (val === "true" || val === "false") {
- state.option.validthis = (val === "true");
- } else {
- error("E002", nt);
- }
- }
- return;
- }
-
- if (key === "quotmark") {
- switch (val) {
- case "true":
- case "false":
- state.option.quotmark = (val === "true");
- break;
- case "double":
- case "single":
- state.option.quotmark = val;
- break;
- default:
- error("E002", nt);
- }
- return;
- }
-
- if (key === "unused") {
- switch (val) {
- case "true":
- state.option.unused = true;
- break;
- case "false":
- state.option.unused = false;
- break;
- case "vars":
- case "strict":
- state.option.unused = val;
- break;
- default:
- error("E002", nt);
- }
- return;
- }
-
- if (key === "latedef") {
- switch (val) {
- case "true":
- state.option.latedef = true;
- break;
- case "false":
- state.option.latedef = false;
- break;
- case "nofunc":
- state.option.latedef = "nofunc";
- break;
- default:
- error("E002", nt);
- }
- return;
- }
-
- var match = /^([+-])(W\d{3})$/g.exec(key);
- if (match) {
- state.ignored[match[2]] = (match[1] === "-");
- return;
- }
-
- var tn;
- if (val === "true" || val === "false") {
- if (nt.type === "jslint") {
- tn = renamedOptions[key] || key;
- state.option[tn] = (val === "true");
-
- if (invertedOptions[tn] !== undefined) {
- state.option[tn] = !state.option[tn];
- }
- } else {
- state.option[key] = (val === "true");
- }
-
- if (key === "newcap") {
- state.option["(explicitNewcap)"] = true;
- }
- return;
- }
-
- error("E002", nt);
- });
-
- assume();
- }
- }
-
- function peek(p) {
- var i = p || 0, j = 0, t;
-
- while (j <= i) {
- t = lookahead[j];
- if (!t) {
- t = lookahead[j] = lex.token();
- }
- j += 1;
- }
- return t;
- }
-
- function advance(id, t) {
- switch (state.tokens.curr.id) {
- case "(number)":
- if (state.tokens.next.id === ".") {
- warning("W005", state.tokens.curr);
- }
- break;
- case "-":
- if (state.tokens.next.id === "-" || state.tokens.next.id === "--") {
- warning("W006");
- }
- break;
- case "+":
- if (state.tokens.next.id === "+" || state.tokens.next.id === "++") {
- warning("W007");
- }
- break;
- }
-
- if (state.tokens.curr.type === "(string)" || state.tokens.curr.identifier) {
- anonname = state.tokens.curr.value;
- }
-
- if (id && state.tokens.next.id !== id) {
- if (t) {
- if (state.tokens.next.id === "(end)") {
- error("E019", t, t.id);
- } else {
- error("E020", state.tokens.next, id, t.id, t.line, state.tokens.next.value);
- }
- } else if (state.tokens.next.type !== "(identifier)" || state.tokens.next.value !== id) {
- warning("W116", state.tokens.next, id, state.tokens.next.value);
- }
- }
-
- state.tokens.prev = state.tokens.curr;
- state.tokens.curr = state.tokens.next;
- for (;;) {
- state.tokens.next = lookahead.shift() || lex.token();
-
- if (!state.tokens.next) { // No more tokens left, give up
- quit("E041", state.tokens.curr.line);
- }
-
- if (state.tokens.next.id === "(end)" || state.tokens.next.id === "(error)") {
- return;
- }
-
- if (state.tokens.next.check) {
- state.tokens.next.check();
- }
-
- if (state.tokens.next.isSpecial) {
- doOption();
- } else {
- if (state.tokens.next.id !== "(endline)") {
- break;
- }
- }
- }
- }
-
- function expression(rbp, initial) {
- var left, isArray = false, isObject = false, isLetExpr = false;
- if (!initial && state.tokens.next.value === "let" && peek(0).value === "(") {
- if (!state.option.inMoz(true)) {
- warning("W118", state.tokens.next, "let expressions");
- }
- isLetExpr = true;
- funct["(blockscope)"].stack();
- advance("let");
- advance("(");
- state.syntax["let"].fud.call(state.syntax["let"].fud, false);
- advance(")");
- }
-
- if (state.tokens.next.id === "(end)")
- error("E006", state.tokens.curr);
-
- advance();
-
- if (initial) {
- anonname = "anonymous";
- funct["(verb)"] = state.tokens.curr.value;
- }
-
- if (initial === true && state.tokens.curr.fud) {
- left = state.tokens.curr.fud();
- } else {
- if (state.tokens.curr.nud) {
- left = state.tokens.curr.nud();
- } else {
- error("E030", state.tokens.curr, state.tokens.curr.id);
- }
-
- var end_of_expr = state.tokens.next.identifier &&
- !state.tokens.curr.led &&
- state.tokens.curr.line !== state.tokens.next.line;
- while (rbp < state.tokens.next.lbp && !end_of_expr) {
- isArray = state.tokens.curr.value === "Array";
- isObject = state.tokens.curr.value === "Object";
- if (left && (left.value || (left.first && left.first.value))) {
- if (left.value !== "new" ||
- (left.first && left.first.value && left.first.value === ".")) {
- isArray = false;
- if (left.value !== state.tokens.curr.value) {
- isObject = false;
- }
- }
- }
-
- advance();
-
- if (isArray && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
- warning("W009", state.tokens.curr);
- }
-
- if (isObject && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
- warning("W010", state.tokens.curr);
- }
-
- if (left && state.tokens.curr.led) {
- left = state.tokens.curr.led(left);
- } else {
- error("E033", state.tokens.curr, state.tokens.curr.id);
- }
- }
- }
- if (isLetExpr) {
- funct["(blockscope)"].unstack();
- }
- return left;
- }
-
- function adjacent(left, right) {
- left = left || state.tokens.curr;
- right = right || state.tokens.next;
- if (state.option.white) {
- if (left.character !== right.from && left.line === right.line) {
- left.from += (left.character - left.from);
- warning("W011", left, left.value);
- }
- }
- }
-
- function nobreak(left, right) {
- left = left || state.tokens.curr;
- right = right || state.tokens.next;
- if (state.option.white && (left.character !== right.from || left.line !== right.line)) {
- warning("W012", right, right.value);
- }
- }
-
- function nospace(left, right) {
- left = left || state.tokens.curr;
- right = right || state.tokens.next;
- if (state.option.white && !left.comment) {
- if (left.line === right.line) {
- adjacent(left, right);
- }
- }
- }
-
- function nonadjacent(left, right) {
- if (state.option.white) {
- left = left || state.tokens.curr;
- right = right || state.tokens.next;
-
- if (left.value === ";" && right.value === ";") {
- return;
- }
-
- if (left.line === right.line && left.character === right.from) {
- left.from += (left.character - left.from);
- warning("W013", left, left.value);
- }
- }
- }
-
- function nobreaknonadjacent(left, right) {
- left = left || state.tokens.curr;
- right = right || state.tokens.next;
- if (!state.option.laxbreak && left.line !== right.line) {
- warning("W014", right, right.id);
- } else if (state.option.white) {
- left = left || state.tokens.curr;
- right = right || state.tokens.next;
- if (left.character === right.from) {
- left.from += (left.character - left.from);
- warning("W013", left, left.value);
- }
- }
- }
-
- function indentation(bias) {
- if (!state.option.white && !state.option["(explicitIndent)"]) {
- return;
- }
-
- if (state.tokens.next.id === "(end)") {
- return;
- }
-
- var i = indent + (bias || 0);
- if (state.tokens.next.from !== i) {
- warning("W015", state.tokens.next, state.tokens.next.value, i, state.tokens.next.from);
- }
- }
-
- function nolinebreak(t) {
- t = t || state.tokens.curr;
- if (t.line !== state.tokens.next.line) {
- warning("E022", t, t.value);
- }
- }
-
-
- function comma(opts) {
- opts = opts || {};
-
- if (!opts.peek) {
- if (state.tokens.curr.line !== state.tokens.next.line) {
- if (!state.option.laxcomma) {
- if (comma.first) {
- warning("I001");
- comma.first = false;
- }
- warning("W014", state.tokens.curr, state.tokens.next.value);
- }
- } else if (!state.tokens.curr.comment &&
- state.tokens.curr.character !== state.tokens.next.from && state.option.white) {
- state.tokens.curr.from += (state.tokens.curr.character - state.tokens.curr.from);
- warning("W011", state.tokens.curr, state.tokens.curr.value);
- }
-
- advance(",");
- }
-
- if (state.tokens.next.value !== "]" && state.tokens.next.value !== "}") {
- nonadjacent(state.tokens.curr, state.tokens.next);
- }
-
- if (state.tokens.next.identifier && !(opts.property && state.option.inES5())) {
- switch (state.tokens.next.value) {
- case "break":
- case "case":
- case "catch":
- case "continue":
- case "default":
- case "do":
- case "else":
- case "finally":
- case "for":
- case "if":
- case "in":
- case "instanceof":
- case "return":
- case "yield":
- case "switch":
- case "throw":
- case "try":
- case "var":
- case "let":
- case "while":
- case "with":
- error("E024", state.tokens.next, state.tokens.next.value);
- return false;
- }
- }
-
- if (state.tokens.next.type === "(punctuator)") {
- switch (state.tokens.next.value) {
- case "}":
- case "]":
- case ",":
- if (opts.allowTrailing) {
- return true;
- }
- case ")":
- error("E024", state.tokens.next, state.tokens.next.value);
- return false;
- }
- }
- return true;
- }
-
- function symbol(s, p) {
- var x = state.syntax[s];
- if (!x || typeof x !== "object") {
- state.syntax[s] = x = {
- id: s,
- lbp: p,
- value: s
- };
- }
- return x;
- }
-
- function delim(s) {
- return symbol(s, 0);
- }
-
- function stmt(s, f) {
- var x = delim(s);
- x.identifier = x.reserved = true;
- x.fud = f;
- return x;
- }
-
- function blockstmt(s, f) {
- var x = stmt(s, f);
- x.block = true;
- return x;
- }
-
- function reserveName(x) {
- var c = x.id.charAt(0);
- if ((c >= "a" && c <= "z") || (c >= "A" && c <= "Z")) {
- x.identifier = x.reserved = true;
- }
- return x;
- }
-
- function prefix(s, f) {
- var x = symbol(s, 150);
- reserveName(x);
- x.nud = (typeof f === "function") ? f : function () {
- this.right = expression(150);
- this.arity = "unary";
- if (this.id === "++" || this.id === "--") {
- if (state.option.plusplus) {
- warning("W016", this, this.id);
- } else if ((!this.right.identifier || isReserved(this.right)) &&
- this.right.id !== "." && this.right.id !== "[") {
- warning("W017", this);
- }
- }
- return this;
- };
- return x;
- }
-
- function type(s, f) {
- var x = delim(s);
- x.type = s;
- x.nud = f;
- return x;
- }
-
- function reserve(name, func) {
- var x = type(name, func);
- x.identifier = true;
- x.reserved = true;
- return x;
- }
-
- function FutureReservedWord(name, meta) {
- var x = type(name, (meta && meta.nud) || function () {
- return this;
- });
-
- meta = meta || {};
- meta.isFutureReservedWord = true;
-
- x.value = name;
- x.identifier = true;
- x.reserved = true;
- x.meta = meta;
-
- return x;
- }
-
- function reservevar(s, v) {
- return reserve(s, function () {
- if (typeof v === "function") {
- v(this);
- }
- return this;
- });
- }
-
- function infix(s, f, p, w) {
- var x = symbol(s, p);
- reserveName(x);
- x.led = function (left) {
- if (!w) {
- nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
- nonadjacent(state.tokens.curr, state.tokens.next);
- }
- if (s === "in" && left.id === "!") {
- warning("W018", left, "!");
- }
- if (typeof f === "function") {
- return f(left, this);
- } else {
- this.left = left;
- this.right = expression(p);
- return this;
- }
- };
- return x;
- }
-
-
- function application(s) {
- var x = symbol(s, 42);
-
- x.led = function (left) {
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "arrow function syntax (=>)");
- }
-
- nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
- nonadjacent(state.tokens.curr, state.tokens.next);
-
- this.left = left;
- this.right = doFunction(undefined, undefined, false, left);
- return this;
- };
- return x;
- }
-
- function relation(s, f) {
- var x = symbol(s, 100);
-
- x.led = function (left) {
- nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
- nonadjacent(state.tokens.curr, state.tokens.next);
- var right = expression(100);
-
- if (isIdentifier(left, "NaN") || isIdentifier(right, "NaN")) {
- warning("W019", this);
- } else if (f) {
- f.apply(this, [left, right]);
- }
-
- if (!left || !right) {
- quit("E041", state.tokens.curr.line);
- }
-
- if (left.id === "!") {
- warning("W018", left, "!");
- }
-
- if (right.id === "!") {
- warning("W018", right, "!");
- }
-
- this.left = left;
- this.right = right;
- return this;
- };
- return x;
- }
-
- function isPoorRelation(node) {
- return node &&
- ((node.type === "(number)" && +node.value === 0) ||
- (node.type === "(string)" && node.value === "") ||
- (node.type === "null" && !state.option.eqnull) ||
- node.type === "true" ||
- node.type === "false" ||
- node.type === "undefined");
- }
-
- function assignop(s) {
- symbol(s, 20).exps = true;
-
- return infix(s, function (left, that) {
- that.left = left;
-
- if (left) {
- if (predefined[left.value] === false &&
- scope[left.value]["(global)"] === true) {
- warning("W020", left);
- } else if (left["function"]) {
- warning("W021", left, left.value);
- }
-
- if (funct[left.value] === "const") {
- error("E013", left, left.value);
- }
-
- if (left.id === ".") {
- if (!left.left) {
- warning("E031", that);
- } else if (left.left.value === "arguments" && !state.directive["use strict"]) {
- warning("E031", that);
- }
-
- that.right = expression(19);
- return that;
- } else if (left.id === "[") {
- if (state.tokens.curr.left.first) {
- state.tokens.curr.left.first.forEach(function (t) {
- if (funct[t.value] === "const") {
- error("E013", t, t.value);
- }
- });
- } else if (!left.left) {
- warning("E031", that);
- } else if (left.left.value === "arguments" && !state.directive["use strict"]) {
- warning("E031", that);
- }
- that.right = expression(19);
- return that;
- } else if (left.identifier && !isReserved(left)) {
- if (funct[left.value] === "exception") {
- warning("W022", left);
- }
- that.right = expression(19);
- return that;
- }
-
- if (left === state.syntax["function"]) {
- warning("W023", state.tokens.curr);
- }
- }
-
- error("E031", that);
- }, 20);
- }
-
-
- function bitwise(s, f, p) {
- var x = symbol(s, p);
- reserveName(x);
- x.led = (typeof f === "function") ? f : function (left) {
- if (state.option.bitwise) {
- warning("W016", this, this.id);
- }
- this.left = left;
- this.right = expression(p);
- return this;
- };
- return x;
- }
-
-
- function bitwiseassignop(s) {
- symbol(s, 20).exps = true;
- return infix(s, function (left, that) {
- if (state.option.bitwise) {
- warning("W016", that, that.id);
- }
- nonadjacent(state.tokens.prev, state.tokens.curr);
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (left) {
- if (left.id === "." || left.id === "[" ||
- (left.identifier && !isReserved(left))) {
- expression(19);
- return that;
- }
- if (left === state.syntax["function"]) {
- warning("W023", state.tokens.curr);
- }
- return that;
- }
- error("E031", that);
- }, 20);
- }
-
-
- function suffix(s) {
- var x = symbol(s, 150);
-
- x.led = function (left) {
- if (state.option.plusplus) {
- warning("W016", this, this.id);
- } else if ((!left.identifier || isReserved(left)) && left.id !== "." && left.id !== "[") {
- warning("W017", this);
- }
-
- this.left = left;
- return this;
- };
- return x;
- }
-
- function optionalidentifier(fnparam, prop) {
- if (!state.tokens.next.identifier) {
- return;
- }
-
- advance();
-
- var curr = state.tokens.curr;
- var meta = curr.meta || {};
- var val = state.tokens.curr.value;
-
- if (!isReserved(curr)) {
- return val;
- }
-
- if (prop) {
- if (state.option.inES5() || meta.isFutureReservedWord) {
- return val;
- }
- }
-
- if (fnparam && val === "undefined") {
- return val;
- }
- if (prop && !api.getCache("displayed:I002")) {
- api.setCache("displayed:I002", true);
- warning("I002");
- }
-
- warning("W024", state.tokens.curr, state.tokens.curr.id);
- return val;
- }
- function identifier(fnparam, prop) {
- var i = optionalidentifier(fnparam, prop);
- if (i) {
- return i;
- }
- if (state.tokens.curr.id === "function" && state.tokens.next.id === "(") {
- warning("W025");
- } else {
- error("E030", state.tokens.next, state.tokens.next.value);
- }
- }
-
-
- function reachable(s) {
- var i = 0, t;
- if (state.tokens.next.id !== ";" || noreach) {
- return;
- }
- for (;;) {
- t = peek(i);
- if (t.reach) {
- return;
- }
- if (t.id !== "(endline)") {
- if (t.id === "function") {
- if (!state.option.latedef) {
- break;
- }
-
- warning("W026", t);
- break;
- }
-
- warning("W027", t, t.value, s);
- break;
- }
- i += 1;
- }
- }
-
-
- function statement(noindent) {
- var values;
- var i = indent, r, s = scope, t = state.tokens.next;
-
- if (t.id === ";") {
- advance(";");
- return;
- }
- var res = isReserved(t);
-
- if (res && t.meta && t.meta.isFutureReservedWord && peek().id === ":") {
- warning("W024", t, t.id);
- res = false;
- }
- if (_.has(["[", "{"], t.value)) {
- if (lookupBlockType().isDestAssign) {
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "destructuring expression");
- }
- values = destructuringExpression();
- values.forEach(function (tok) {
- isundef(funct, "W117", tok.token, tok.id);
- });
- advance("=");
- destructuringExpressionMatch(values, expression(5, true));
- advance(";");
- return;
- }
- }
- if (t.identifier && !res && peek().id === ":") {
- advance();
- advance(":");
- scope = Object.create(s);
- addlabel(t.value, "label");
-
- if (!state.tokens.next.labelled && state.tokens.next.value !== "{") {
- warning("W028", state.tokens.next, t.value, state.tokens.next.value);
- }
-
- state.tokens.next.label = t.value;
- t = state.tokens.next;
- }
-
- if (t.id === "{") {
- block(true, true);
- return;
- }
-
- if (!noindent) {
- indentation();
- }
- r = expression(0, true);
-
- if (!t.block) {
- if (!state.option.expr && (!r || !r.exps)) {
- warning("W030", state.tokens.curr);
- } else if (state.option.nonew && r && r.left && r.id === "(" && r.left.id === "new") {
- warning("W031", t);
- }
-
- if (state.tokens.next.id !== ";") {
- if (!state.option.asi) {
- if (!state.option.lastsemic || state.tokens.next.id !== "}" ||
- state.tokens.next.line !== state.tokens.curr.line) {
- warningAt("W033", state.tokens.curr.line, state.tokens.curr.character);
- }
- }
- } else {
- adjacent(state.tokens.curr, state.tokens.next);
- advance(";");
- nonadjacent(state.tokens.curr, state.tokens.next);
- }
- }
-
- indent = i;
- scope = s;
- return r;
- }
-
-
- function statements(startLine) {
- var a = [], p;
-
- while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") {
- if (state.tokens.next.id === ";") {
- p = peek();
-
- if (!p || (p.id !== "(" && p.id !== "[")) {
- warning("W032");
- }
-
- advance(";");
- } else {
- a.push(statement(startLine === state.tokens.next.line));
- }
- }
- return a;
- }
- function directives() {
- var i, p, pn;
-
- for (;;) {
- if (state.tokens.next.id === "(string)") {
- p = peek(0);
- if (p.id === "(endline)") {
- i = 1;
- do {
- pn = peek(i);
- i = i + 1;
- } while (pn.id === "(endline)");
-
- if (pn.id !== ";") {
- if (pn.id !== "(string)" && pn.id !== "(number)" &&
- pn.id !== "(regexp)" && pn.identifier !== true &&
- pn.id !== "}") {
- break;
- }
- warning("W033", state.tokens.next);
- } else {
- p = pn;
- }
- } else if (p.id === "}") {
- warning("W033", p);
- } else if (p.id !== ";") {
- break;
- }
-
- indentation();
- advance();
- if (state.directive[state.tokens.curr.value]) {
- warning("W034", state.tokens.curr, state.tokens.curr.value);
- }
-
- if (state.tokens.curr.value === "use strict") {
- if (!state.option["(explicitNewcap)"])
- state.option.newcap = true;
- state.option.undef = true;
- }
- state.directive[state.tokens.curr.value] = true;
-
- if (p.id === ";") {
- advance(";");
- }
- continue;
- }
- break;
- }
- }
- function block(ordinary, stmt, isfunc, isfatarrow) {
- var a,
- b = inblock,
- old_indent = indent,
- m,
- s = scope,
- t,
- line,
- d;
-
- inblock = ordinary;
-
- if (!ordinary || !state.option.funcscope)
- scope = Object.create(scope);
-
- nonadjacent(state.tokens.curr, state.tokens.next);
- t = state.tokens.next;
-
- var metrics = funct["(metrics)"];
- metrics.nestedBlockDepth += 1;
- metrics.verifyMaxNestedBlockDepthPerFunction();
-
- if (state.tokens.next.id === "{") {
- advance("{");
- funct["(blockscope)"].stack();
-
- line = state.tokens.curr.line;
- if (state.tokens.next.id !== "}") {
- indent += state.option.indent;
- while (!ordinary && state.tokens.next.from > indent) {
- indent += state.option.indent;
- }
-
- if (isfunc) {
- m = {};
- for (d in state.directive) {
- if (_.has(state.directive, d)) {
- m[d] = state.directive[d];
- }
- }
- directives();
-
- if (state.option.strict && funct["(context)"]["(global)"]) {
- if (!m["use strict"] && !state.directive["use strict"]) {
- warning("E007");
- }
- }
- }
-
- a = statements(line);
-
- metrics.statementCount += a.length;
-
- if (isfunc) {
- state.directive = m;
- }
-
- indent -= state.option.indent;
- if (line !== state.tokens.next.line) {
- indentation();
- }
- } else if (line !== state.tokens.next.line) {
- indentation();
- }
- advance("}", t);
-
- funct["(blockscope)"].unstack();
-
- indent = old_indent;
- } else if (!ordinary) {
- if (isfunc) {
- m = {};
- if (stmt && !isfatarrow && !state.option.inMoz(true)) {
- error("W118", state.tokens.curr, "function closure expressions");
- }
-
- if (!stmt) {
- for (d in state.directive) {
- if (_.has(state.directive, d)) {
- m[d] = state.directive[d];
- }
- }
- }
- expression(5);
-
- if (state.option.strict && funct["(context)"]["(global)"]) {
- if (!m["use strict"] && !state.directive["use strict"]) {
- warning("E007");
- }
- }
- } else {
- error("E021", state.tokens.next, "{", state.tokens.next.value);
- }
- } else {
- funct["(nolet)"] = true;
-
- if (!stmt || state.option.curly) {
- warning("W116", state.tokens.next, "{", state.tokens.next.value);
- }
-
- noreach = true;
- indent += state.option.indent;
- a = [statement(state.tokens.next.line === state.tokens.curr.line)];
- indent -= state.option.indent;
- noreach = false;
-
- delete funct["(nolet)"];
- }
- funct["(verb)"] = null;
- if (!ordinary || !state.option.funcscope) scope = s;
- inblock = b;
- if (ordinary && state.option.noempty && (!a || a.length === 0)) {
- warning("W035");
- }
- metrics.nestedBlockDepth -= 1;
- return a;
- }
-
-
- function countMember(m) {
- if (membersOnly && typeof membersOnly[m] !== "boolean") {
- warning("W036", state.tokens.curr, m);
- }
- if (typeof member[m] === "number") {
- member[m] += 1;
- } else {
- member[m] = 1;
- }
- }
-
-
- function note_implied(tkn) {
- var name = tkn.value, line = tkn.line, a = implied[name];
- if (typeof a === "function") {
- a = false;
- }
-
- if (!a) {
- a = [line];
- implied[name] = a;
- } else if (a[a.length - 1] !== line) {
- a.push(line);
- }
- }
-
- type("(number)", function () {
- return this;
- });
-
- type("(string)", function () {
- return this;
- });
-
- state.syntax["(identifier)"] = {
- type: "(identifier)",
- lbp: 0,
- identifier: true,
- nud: function () {
- var v = this.value,
- s = scope[v],
- f;
-
- if (typeof s === "function") {
- s = undefined;
- } else if (typeof s === "boolean") {
- f = funct;
- funct = functions[0];
- addlabel(v, "var");
- s = funct;
- funct = f;
- }
- var block;
- if (_.has(funct, "(blockscope)")) {
- block = funct["(blockscope)"].getlabel(v);
- }
- if (funct === s || block) {
- switch (block ? block[v]["(type)"] : funct[v]) {
- case "unused":
- if (block) block[v]["(type)"] = "var";
- else funct[v] = "var";
- break;
- case "unction":
- if (block) block[v]["(type)"] = "function";
- else funct[v] = "function";
- this["function"] = true;
- break;
- case "function":
- this["function"] = true;
- break;
- case "label":
- warning("W037", state.tokens.curr, v);
- break;
- }
- } else if (funct["(global)"]) {
-
- if (typeof predefined[v] !== "boolean") {
- if (!(anonname === "typeof" || anonname === "delete") ||
- (state.tokens.next && (state.tokens.next.value === "." ||
- state.tokens.next.value === "["))) {
-
- if (!funct["(comparray)"].check(v)) {
- isundef(funct, "W117", state.tokens.curr, v);
- }
- }
- }
-
- note_implied(state.tokens.curr);
- } else {
-
- switch (funct[v]) {
- case "closure":
- case "function":
- case "var":
- case "unused":
- warning("W038", state.tokens.curr, v);
- break;
- case "label":
- warning("W037", state.tokens.curr, v);
- break;
- case "outer":
- case "global":
- break;
- default:
- if (s === true) {
- funct[v] = true;
- } else if (s === null) {
- warning("W039", state.tokens.curr, v);
- note_implied(state.tokens.curr);
- } else if (typeof s !== "object") {
- if (!(anonname === "typeof" || anonname === "delete") ||
- (state.tokens.next &&
- (state.tokens.next.value === "." || state.tokens.next.value === "["))) {
-
- isundef(funct, "W117", state.tokens.curr, v);
- }
- funct[v] = true;
- note_implied(state.tokens.curr);
- } else {
- switch (s[v]) {
- case "function":
- case "unction":
- this["function"] = true;
- s[v] = "closure";
- funct[v] = s["(global)"] ? "global" : "outer";
- break;
- case "var":
- case "unused":
- s[v] = "closure";
- funct[v] = s["(global)"] ? "global" : "outer";
- break;
- case "closure":
- funct[v] = s["(global)"] ? "global" : "outer";
- break;
- case "label":
- warning("W037", state.tokens.curr, v);
- }
- }
- }
- }
- return this;
- },
- led: function () {
- error("E033", state.tokens.next, state.tokens.next.value);
- }
- };
-
- type("(regexp)", function () {
- return this;
- });
-
- delim("(endline)");
- delim("(begin)");
- delim("(end)").reach = true;
- delim("(error)").reach = true;
- delim("}").reach = true;
- delim(")");
- delim("]");
- delim("\"").reach = true;
- delim("'").reach = true;
- delim(";");
- delim(":").reach = true;
- delim("#");
-
- reserve("else");
- reserve("case").reach = true;
- reserve("catch");
- reserve("default").reach = true;
- reserve("finally");
- reservevar("arguments", function (x) {
- if (state.directive["use strict"] && funct["(global)"]) {
- warning("E008", x);
- }
- });
- reservevar("eval");
- reservevar("false");
- reservevar("Infinity");
- reservevar("null");
- reservevar("this", function (x) {
- if (state.directive["use strict"] && !state.option.validthis && ((funct["(statement)"] &&
- funct["(name)"].charAt(0) > "Z") || funct["(global)"])) {
- warning("W040", x);
- }
- });
- reservevar("true");
- reservevar("undefined");
-
- assignop("=", "assign", 20);
- assignop("+=", "assignadd", 20);
- assignop("-=", "assignsub", 20);
- assignop("*=", "assignmult", 20);
- assignop("/=", "assigndiv", 20).nud = function () {
- error("E014");
- };
- assignop("%=", "assignmod", 20);
-
- bitwiseassignop("&=", "assignbitand", 20);
- bitwiseassignop("|=", "assignbitor", 20);
- bitwiseassignop("^=", "assignbitxor", 20);
- bitwiseassignop("<<=", "assignshiftleft", 20);
- bitwiseassignop(">>=", "assignshiftright", 20);
- bitwiseassignop(">>>=", "assignshiftrightunsigned", 20);
- infix(",", function (left, that) {
- var expr;
- that.exprs = [left];
- if (!comma({peek: true})) {
- return that;
- }
- while (true) {
- if (!(expr = expression(5))) {
- break;
- }
- that.exprs.push(expr);
- if (state.tokens.next.value !== "," || !comma()) {
- break;
- }
- }
- return that;
- }, 5, true);
- infix("?", function (left, that) {
- that.left = left;
- that.right = expression(10);
- advance(":");
- that["else"] = expression(10);
- return that;
- }, 30);
-
- infix("||", "or", 40);
- infix("&&", "and", 50);
- bitwise("|", "bitor", 70);
- bitwise("^", "bitxor", 80);
- bitwise("&", "bitand", 90);
- relation("==", function (left, right) {
- var eqnull = state.option.eqnull && (left.value === "null" || right.value === "null");
-
- if (!eqnull && state.option.eqeqeq)
- warning("W116", this, "===", "==");
- else if (isPoorRelation(left))
- warning("W041", this, "===", left.value);
- else if (isPoorRelation(right))
- warning("W041", this, "===", right.value);
-
- return this;
- });
- relation("===");
- relation("!=", function (left, right) {
- var eqnull = state.option.eqnull &&
- (left.value === "null" || right.value === "null");
-
- if (!eqnull && state.option.eqeqeq) {
- warning("W116", this, "!==", "!=");
- } else if (isPoorRelation(left)) {
- warning("W041", this, "!==", left.value);
- } else if (isPoorRelation(right)) {
- warning("W041", this, "!==", right.value);
- }
- return this;
- });
- relation("!==");
- relation("<");
- relation(">");
- relation("<=");
- relation(">=");
- bitwise("<<", "shiftleft", 120);
- bitwise(">>", "shiftright", 120);
- bitwise(">>>", "shiftrightunsigned", 120);
- infix("in", "in", 120);
- infix("instanceof", "instanceof", 120);
- infix("+", function (left, that) {
- var right = expression(130);
- if (left && right && left.id === "(string)" && right.id === "(string)") {
- left.value += right.value;
- left.character = right.character;
- if (!state.option.scripturl && reg.javascriptURL.test(left.value)) {
- warning("W050", left);
- }
- return left;
- }
- that.left = left;
- that.right = right;
- return that;
- }, 130);
- prefix("+", "num");
- prefix("+++", function () {
- warning("W007");
- this.right = expression(150);
- this.arity = "unary";
- return this;
- });
- infix("+++", function (left) {
- warning("W007");
- this.left = left;
- this.right = expression(130);
- return this;
- }, 130);
- infix("-", "sub", 130);
- prefix("-", "neg");
- prefix("---", function () {
- warning("W006");
- this.right = expression(150);
- this.arity = "unary";
- return this;
- });
- infix("---", function (left) {
- warning("W006");
- this.left = left;
- this.right = expression(130);
- return this;
- }, 130);
- infix("*", "mult", 140);
- infix("/", "div", 140);
- infix("%", "mod", 140);
-
- suffix("++", "postinc");
- prefix("++", "preinc");
- state.syntax["++"].exps = true;
-
- suffix("--", "postdec");
- prefix("--", "predec");
- state.syntax["--"].exps = true;
- prefix("delete", function () {
- var p = expression(5);
- if (!p || (p.id !== "." && p.id !== "[")) {
- warning("W051");
- }
- this.first = p;
- return this;
- }).exps = true;
-
- prefix("~", function () {
- if (state.option.bitwise) {
- warning("W052", this, "~");
- }
- expression(150);
- return this;
- });
-
- prefix("...", function () {
- if (!state.option.inESNext()) {
- warning("W104", this, "spread/rest operator");
- }
- if (!state.tokens.next.identifier) {
- error("E030", state.tokens.next, state.tokens.next.value);
- }
- expression(150);
- return this;
- });
-
- prefix("!", function () {
- this.right = expression(150);
- this.arity = "unary";
-
- if (!this.right) { // '!' followed by nothing? Give up.
- quit("E041", this.line || 0);
- }
-
- if (bang[this.right.id] === true) {
- warning("W018", this, "!");
- }
- return this;
- });
-
- prefix("typeof", "typeof");
- prefix("new", function () {
- var c = expression(155), i;
- if (c && c.id !== "function") {
- if (c.identifier) {
- c["new"] = true;
- switch (c.value) {
- case "Number":
- case "String":
- case "Boolean":
- case "Math":
- case "JSON":
- warning("W053", state.tokens.prev, c.value);
- break;
- case "Function":
- if (!state.option.evil) {
- warning("W054");
- }
- break;
- case "Date":
- case "RegExp":
- break;
- default:
- if (c.id !== "function") {
- i = c.value.substr(0, 1);
- if (state.option.newcap && (i < "A" || i > "Z") && !_.has(global, c.value)) {
- warning("W055", state.tokens.curr);
- }
- }
- }
- } else {
- if (c.id !== "." && c.id !== "[" && c.id !== "(") {
- warning("W056", state.tokens.curr);
- }
- }
- } else {
- if (!state.option.supernew)
- warning("W057", this);
- }
- adjacent(state.tokens.curr, state.tokens.next);
- if (state.tokens.next.id !== "(" && !state.option.supernew) {
- warning("W058", state.tokens.curr, state.tokens.curr.value);
- }
- this.first = c;
- return this;
- });
- state.syntax["new"].exps = true;
-
- prefix("void").exps = true;
-
- infix(".", function (left, that) {
- adjacent(state.tokens.prev, state.tokens.curr);
- nobreak();
- var m = identifier(false, true);
-
- if (typeof m === "string") {
- countMember(m);
- }
-
- that.left = left;
- that.right = m;
-
- if (m && m === "hasOwnProperty" && state.tokens.next.value === "=") {
- warning("W001");
- }
-
- if (left && left.value === "arguments" && (m === "callee" || m === "caller")) {
- if (state.option.noarg)
- warning("W059", left, m);
- else if (state.directive["use strict"])
- error("E008");
- } else if (!state.option.evil && left && left.value === "document" &&
- (m === "write" || m === "writeln")) {
- warning("W060", left);
- }
-
- if (!state.option.evil && (m === "eval" || m === "execScript")) {
- warning("W061");
- }
-
- return that;
- }, 160, true);
-
- infix("(", function (left, that) {
- if (state.tokens.prev.id !== "}" && state.tokens.prev.id !== ")") {
- nobreak(state.tokens.prev, state.tokens.curr);
- }
-
- nospace();
- if (state.option.immed && left && !left.immed && left.id === "function") {
- warning("W062");
- }
-
- var n = 0;
- var p = [];
-
- if (left) {
- if (left.type === "(identifier)") {
- if (left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)) {
- if ("Number String Boolean Date Object".indexOf(left.value) === -1) {
- if (left.value === "Math") {
- warning("W063", left);
- } else if (state.option.newcap) {
- warning("W064", left);
- }
- }
- }
- }
- }
-
- if (state.tokens.next.id !== ")") {
- for (;;) {
- p[p.length] = expression(10);
- n += 1;
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- }
-
- advance(")");
- nospace(state.tokens.prev, state.tokens.curr);
-
- if (typeof left === "object") {
- if (left.value === "parseInt" && n === 1) {
- warning("W065", state.tokens.curr);
- }
- if (!state.option.evil) {
- if (left.value === "eval" || left.value === "Function" ||
- left.value === "execScript") {
- warning("W061", left);
-
- if (p[0] && [0].id === "(string)") {
- addInternalSrc(left, p[0].value);
- }
- } else if (p[0] && p[0].id === "(string)" &&
- (left.value === "setTimeout" ||
- left.value === "setInterval")) {
- warning("W066", left);
- addInternalSrc(left, p[0].value);
- } else if (p[0] && p[0].id === "(string)" &&
- left.value === "." &&
- left.left.value === "window" &&
- (left.right === "setTimeout" ||
- left.right === "setInterval")) {
- warning("W066", left);
- addInternalSrc(left, p[0].value);
- }
- }
- if (!left.identifier && left.id !== "." && left.id !== "[" &&
- left.id !== "(" && left.id !== "&&" && left.id !== "||" &&
- left.id !== "?") {
- warning("W067", left);
- }
- }
-
- that.left = left;
- return that;
- }, 155, true).exps = true;
-
- prefix("(", function () {
- nospace();
- var bracket, brackets = [];
- var pn, pn1, i = 0;
- var ret;
-
- do {
- pn = peek(i);
- i += 1;
- pn1 = peek(i);
- i += 1;
- } while (pn.value !== ")" && pn1.value !== "=>" && pn1.value !== ";" && pn1.type !== "(end)");
-
- if (state.tokens.next.id === "function") {
- state.tokens.next.immed = true;
- }
-
- var exprs = [];
-
- if (state.tokens.next.id !== ")") {
- for (;;) {
- if (pn1.value === "=>" && state.tokens.next.value === "{") {
- bracket = state.tokens.next;
- bracket.left = destructuringExpression();
- brackets.push(bracket);
- for (var t in bracket.left) {
- exprs.push(bracket.left[t].token);
- }
- } else {
- exprs.push(expression(5));
- }
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- }
-
- advance(")", this);
- nospace(state.tokens.prev, state.tokens.curr);
- if (state.option.immed && exprs[0] && exprs[0].id === "function") {
- if (state.tokens.next.id !== "(" &&
- (state.tokens.next.id !== "." || (peek().value !== "call" && peek().value !== "apply"))) {
- warning("W068", this);
- }
- }
-
- if (state.tokens.next.value === "=>") {
- return exprs;
- }
- if (!exprs.length) {
- return;
- }
- if (exprs.length > 1) {
- ret = Object.create(state.syntax[","]);
- ret.exprs = exprs;
- } else {
- ret = exprs[0];
- }
- if (ret) {
- ret.paren = true;
- }
- return ret;
- });
-
- application("=>");
-
- infix("[", function (left, that) {
- nobreak(state.tokens.prev, state.tokens.curr);
- nospace();
- var e = expression(5), s;
- if (e && e.type === "(string)") {
- if (!state.option.evil && (e.value === "eval" || e.value === "execScript")) {
- warning("W061", that);
- }
-
- countMember(e.value);
- if (!state.option.sub && reg.identifier.test(e.value)) {
- s = state.syntax[e.value];
- if (!s || !isReserved(s)) {
- warning("W069", state.tokens.prev, e.value);
- }
- }
- }
- advance("]", that);
-
- if (e && e.value === "hasOwnProperty" && state.tokens.next.value === "=") {
- warning("W001");
- }
-
- nospace(state.tokens.prev, state.tokens.curr);
- that.left = left;
- that.right = e;
- return that;
- }, 160, true);
-
- function comprehensiveArrayExpression() {
- var res = {};
- res.exps = true;
- funct["(comparray)"].stack();
-
- res.right = expression(5);
- advance("for");
- if (state.tokens.next.value === "each") {
- advance("each");
- if (!state.option.inMoz(true)) {
- warning("W118", state.tokens.curr, "for each");
- }
- }
- advance("(");
- funct["(comparray)"].setState("define");
- res.left = expression(5);
- advance(")");
- if (state.tokens.next.value === "if") {
- advance("if");
- advance("(");
- funct["(comparray)"].setState("filter");
- res.filter = expression(5);
- advance(")");
- }
- advance("]");
- funct["(comparray)"].unstack();
- return res;
- }
-
- prefix("[", function () {
- var blocktype = lookupBlockType(true);
- if (blocktype.isCompArray) {
- if (!state.option.inMoz(true)) {
- warning("W118", state.tokens.curr, "array comprehension");
- }
- return comprehensiveArrayExpression();
- } else if (blocktype.isDestAssign && !state.option.inESNext()) {
- warning("W104", state.tokens.curr, "destructuring assignment");
- }
- var b = state.tokens.curr.line !== state.tokens.next.line;
- this.first = [];
- if (b) {
- indent += state.option.indent;
- if (state.tokens.next.from === indent + state.option.indent) {
- indent += state.option.indent;
- }
- }
- while (state.tokens.next.id !== "(end)") {
- while (state.tokens.next.id === ",") {
- if (!state.option.inES5())
- warning("W070");
- advance(",");
- }
- if (state.tokens.next.id === "]") {
- break;
- }
- if (b && state.tokens.curr.line !== state.tokens.next.line) {
- indentation();
- }
- this.first.push(expression(10));
- if (state.tokens.next.id === ",") {
- comma({ allowTrailing: true });
- if (state.tokens.next.id === "]" && !state.option.inES5(true)) {
- warning("W070", state.tokens.curr);
- break;
- }
- } else {
- break;
- }
- }
- if (b) {
- indent -= state.option.indent;
- indentation();
- }
- advance("]", this);
- return this;
- }, 160);
-
-
- function property_name() {
- var id = optionalidentifier(false, true);
-
- if (!id) {
- if (state.tokens.next.id === "(string)") {
- id = state.tokens.next.value;
- advance();
- } else if (state.tokens.next.id === "(number)") {
- id = state.tokens.next.value.toString();
- advance();
- }
- }
-
- if (id === "hasOwnProperty") {
- warning("W001");
- }
-
- return id;
- }
-
-
- function functionparams(parsed) {
- var curr, next;
- var params = [];
- var ident;
- var tokens = [];
- var t;
-
- if (parsed) {
- if (parsed instanceof Array) {
- for (var i in parsed) {
- curr = parsed[i];
- if (_.contains(["{", "["], curr.id)) {
- for (t in curr.left) {
- t = tokens[t];
- if (t.id) {
- params.push(t.id);
- addlabel(t.id, "unused", t.token);
- }
- }
- } else if (curr.value === "...") {
- if (!state.option.inESNext()) {
- warning("W104", curr, "spread/rest operator");
- }
- continue;
- } else {
- addlabel(curr.value, "unused", curr);
- }
- }
- return params;
- } else {
- if (parsed.identifier === true) {
- addlabel(parsed.value, "unused", parsed);
- return [parsed];
- }
- }
- }
-
- next = state.tokens.next;
-
- advance("(");
- nospace();
-
- if (state.tokens.next.id === ")") {
- advance(")");
- return;
- }
-
- for (;;) {
- if (_.contains(["{", "["], state.tokens.next.id)) {
- tokens = destructuringExpression();
- for (t in tokens) {
- t = tokens[t];
- if (t.id) {
- params.push(t.id);
- addlabel(t.id, "unused", t.token);
- }
- }
- } else if (state.tokens.next.value === "...") {
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.next, "spread/rest operator");
- }
- advance("...");
- nospace();
- ident = identifier(true);
- params.push(ident);
- addlabel(ident, "unused", state.tokens.curr);
- } else {
- ident = identifier(true);
- params.push(ident);
- addlabel(ident, "unused", state.tokens.curr);
- }
- if (state.tokens.next.id === ",") {
- comma();
- } else {
- advance(")", next);
- nospace(state.tokens.prev, state.tokens.curr);
- return params;
- }
- }
- }
-
-
- function doFunction(name, statement, generator, fatarrowparams) {
- var f;
- var oldOption = state.option;
- var oldIgnored = state.ignored;
- var oldScope = scope;
-
- state.option = Object.create(state.option);
- state.ignored = Object.create(state.ignored);
- scope = Object.create(scope);
-
- funct = {
- "(name)" : name || "\"" + anonname + "\"",
- "(line)" : state.tokens.next.line,
- "(character)" : state.tokens.next.character,
- "(context)" : funct,
- "(breakage)" : 0,
- "(loopage)" : 0,
- "(metrics)" : createMetrics(state.tokens.next),
- "(scope)" : scope,
- "(statement)" : statement,
- "(tokens)" : {},
- "(blockscope)": funct["(blockscope)"],
- "(comparray)" : funct["(comparray)"]
- };
-
- if (generator) {
- funct["(generator)"] = true;
- }
-
- f = funct;
- state.tokens.curr.funct = funct;
-
- functions.push(funct);
-
- if (name) {
- addlabel(name, "function");
- }
-
- funct["(params)"] = functionparams(fatarrowparams);
-
- funct["(metrics)"].verifyMaxParametersPerFunction(funct["(params)"]);
-
- block(false, true, true, fatarrowparams ? true:false);
-
- if (generator && funct["(generator)"] !== "yielded") {
- error("E047", state.tokens.curr);
- }
-
- funct["(metrics)"].verifyMaxStatementsPerFunction();
- funct["(metrics)"].verifyMaxComplexityPerFunction();
- funct["(unusedOption)"] = state.option.unused;
-
- scope = oldScope;
- state.option = oldOption;
- state.ignored = oldIgnored;
- funct["(last)"] = state.tokens.curr.line;
- funct["(lastcharacter)"] = state.tokens.curr.character;
- funct = funct["(context)"];
-
- return f;
- }
-
- function createMetrics(functionStartToken) {
- return {
- statementCount: 0,
- nestedBlockDepth: -1,
- ComplexityCount: 1,
- verifyMaxStatementsPerFunction: function () {
- if (state.option.maxstatements &&
- this.statementCount > state.option.maxstatements) {
- warning("W071", functionStartToken, this.statementCount);
- }
- },
-
- verifyMaxParametersPerFunction: function (params) {
- params = params || [];
-
- if (state.option.maxparams && params.length > state.option.maxparams) {
- warning("W072", functionStartToken, params.length);
- }
- },
-
- verifyMaxNestedBlockDepthPerFunction: function () {
- if (state.option.maxdepth &&
- this.nestedBlockDepth > 0 &&
- this.nestedBlockDepth === state.option.maxdepth + 1) {
- warning("W073", null, this.nestedBlockDepth);
- }
- },
-
- verifyMaxComplexityPerFunction: function () {
- var max = state.option.maxcomplexity;
- var cc = this.ComplexityCount;
- if (max && cc > max) {
- warning("W074", functionStartToken, cc);
- }
- }
- };
- }
-
- function increaseComplexityCount() {
- funct["(metrics)"].ComplexityCount += 1;
- }
-
- function checkCondAssignment(expr) {
- var id, paren;
- if (expr) {
- id = expr.id;
- paren = expr.paren;
- if (id === "," && (expr = expr.exprs[expr.exprs.length - 1])) {
- id = expr.id;
- paren = paren || expr.paren;
- }
- }
- switch (id) {
- case "=":
- case "+=":
- case "-=":
- case "*=":
- case "%=":
- case "&=":
- case "|=":
- case "^=":
- case "/=":
- if (!paren && !state.option.boss) {
- warning("W084");
- }
- }
- }
-
-
- (function (x) {
- x.nud = function (isclassdef) {
- var b, f, i, p, t, g;
- var props = {}; // All properties, including accessors
- var tag = "";
-
- function saveProperty(name, tkn) {
- if (props[name] && _.has(props, name))
- warning("W075", state.tokens.next, i);
- else
- props[name] = {};
-
- props[name].basic = true;
- props[name].basictkn = tkn;
- }
-
- function saveSetter(name, tkn) {
- if (props[name] && _.has(props, name)) {
- if (props[name].basic || props[name].setter)
- warning("W075", state.tokens.next, i);
- } else {
- props[name] = {};
- }
-
- props[name].setter = true;
- props[name].setterToken = tkn;
- }
-
- function saveGetter(name) {
- if (props[name] && _.has(props, name)) {
- if (props[name].basic || props[name].getter)
- warning("W075", state.tokens.next, i);
- } else {
- props[name] = {};
- }
-
- props[name].getter = true;
- props[name].getterToken = state.tokens.curr;
- }
-
- b = state.tokens.curr.line !== state.tokens.next.line;
- if (b) {
- indent += state.option.indent;
- if (state.tokens.next.from === indent + state.option.indent) {
- indent += state.option.indent;
- }
- }
-
- for (;;) {
- if (state.tokens.next.id === "}") {
- break;
- }
-
- if (b) {
- indentation();
- }
-
- if (isclassdef && state.tokens.next.value === "static") {
- advance("static");
- tag = "static ";
- }
-
- if (state.tokens.next.value === "get" && peek().id !== ":") {
- advance("get");
-
- if (!state.option.inES5(!isclassdef)) {
- error("E034");
- }
-
- i = property_name();
- if (!i) {
- error("E035");
- }
- if (isclassdef && i === "constructor") {
- error("E049", state.tokens.next, "class getter method", i);
- }
-
- saveGetter(tag + i);
- t = state.tokens.next;
- adjacent(state.tokens.curr, state.tokens.next);
- f = doFunction();
- p = f["(params)"];
-
- if (p) {
- warning("W076", t, p[0], i);
- }
-
- adjacent(state.tokens.curr, state.tokens.next);
- } else if (state.tokens.next.value === "set" && peek().id !== ":") {
- advance("set");
-
- if (!state.option.inES5(!isclassdef)) {
- error("E034");
- }
-
- i = property_name();
- if (!i) {
- error("E035");
- }
- if (isclassdef && i === "constructor") {
- error("E049", state.tokens.next, "class setter method", i);
- }
-
- saveSetter(tag + i, state.tokens.next);
- t = state.tokens.next;
- adjacent(state.tokens.curr, state.tokens.next);
- f = doFunction();
- p = f["(params)"];
-
- if (!p || p.length !== 1) {
- warning("W077", t, i);
- }
- } else {
- g = false;
- if (state.tokens.next.value === "*" && state.tokens.next.type === "(punctuator)") {
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.next, "generator functions");
- }
- advance("*");
- g = true;
- }
- i = property_name();
- saveProperty(tag + i, state.tokens.next);
-
- if (typeof i !== "string") {
- break;
- }
-
- if (state.tokens.next.value === "(") {
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "concise methods");
- }
- doFunction(i, undefined, g);
- } else if (!isclassdef) {
- advance(":");
- nonadjacent(state.tokens.curr, state.tokens.next);
- expression(10);
- }
- }
- if (isclassdef && i === "prototype") {
- error("E049", state.tokens.next, "class method", i);
- }
-
- countMember(i);
- if (isclassdef) {
- tag = "";
- continue;
- }
- if (state.tokens.next.id === ",") {
- comma({ allowTrailing: true, property: true });
- if (state.tokens.next.id === ",") {
- warning("W070", state.tokens.curr);
- } else if (state.tokens.next.id === "}" && !state.option.inES5(true)) {
- warning("W070", state.tokens.curr);
- }
- } else {
- break;
- }
- }
- if (b) {
- indent -= state.option.indent;
- indentation();
- }
- advance("}", this);
- if (state.option.inES5()) {
- for (var name in props) {
- if (_.has(props, name) && props[name].setter && !props[name].getter) {
- warning("W078", props[name].setterToken);
- }
- }
- }
- return this;
- };
- x.fud = function () {
- error("E036", state.tokens.curr);
- };
- }(delim("{")));
-
- function destructuringExpression() {
- var id, ids;
- var identifiers = [];
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "destructuring expression");
- }
- var nextInnerDE = function () {
- var ident;
- if (_.contains(["[", "{"], state.tokens.next.value)) {
- ids = destructuringExpression();
- for (var id in ids) {
- id = ids[id];
- identifiers.push({ id: id.id, token: id.token });
- }
- } else if (state.tokens.next.value === ",") {
- identifiers.push({ id: null, token: state.tokens.curr });
- } else {
- ident = identifier();
- if (ident)
- identifiers.push({ id: ident, token: state.tokens.curr });
- }
- };
- if (state.tokens.next.value === "[") {
- advance("[");
- nextInnerDE();
- while (state.tokens.next.value !== "]") {
- advance(",");
- nextInnerDE();
- }
- advance("]");
- } else if (state.tokens.next.value === "{") {
- advance("{");
- id = identifier();
- if (state.tokens.next.value === ":") {
- advance(":");
- nextInnerDE();
- } else {
- identifiers.push({ id: id, token: state.tokens.curr });
- }
- while (state.tokens.next.value !== "}") {
- advance(",");
- id = identifier();
- if (state.tokens.next.value === ":") {
- advance(":");
- nextInnerDE();
- } else {
- identifiers.push({ id: id, token: state.tokens.curr });
- }
- }
- advance("}");
- }
- return identifiers;
- }
- function destructuringExpressionMatch(tokens, value) {
- if (value.first) {
- _.zip(tokens, value.first).forEach(function (val) {
- var token = val[0];
- var value = val[1];
- if (token && value) {
- token.first = value;
- } else if (token && token.first && !value) {
- warning("W080", token.first, token.first.value);
- } /* else {
- XXX value is discarded: wouldn't it need a warning ?
- } */
- });
- }
- }
-
- var conststatement = stmt("const", function (prefix) {
- var tokens, value;
- var lone;
-
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "const");
- }
-
- this.first = [];
- for (;;) {
- var names = [];
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (_.contains(["{", "["], state.tokens.next.value)) {
- tokens = destructuringExpression();
- lone = false;
- } else {
- tokens = [ { id: identifier(), token: state.tokens.curr } ];
- lone = true;
- }
- for (var t in tokens) {
- t = tokens[t];
- if (funct[t.id] === "const") {
- warning("E011", null, t.id);
- }
- if (funct["(global)"] && predefined[t.id] === false) {
- warning("W079", t.token, t.id);
- }
- if (t.id) {
- addlabel(t.id, "const");
- names.push(t.token);
- }
- }
- if (prefix) {
- break;
- }
-
- this.first = this.first.concat(names);
-
- if (state.tokens.next.id !== "=") {
- warning("E012", state.tokens.curr, state.tokens.curr.value);
- }
-
- if (state.tokens.next.id === "=") {
- nonadjacent(state.tokens.curr, state.tokens.next);
- advance("=");
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (state.tokens.next.id === "undefined") {
- warning("W080", state.tokens.prev, state.tokens.prev.value);
- }
- if (peek(0).id === "=" && state.tokens.next.identifier) {
- error("E037", state.tokens.next, state.tokens.next.value);
- }
- value = expression(5);
- if (lone) {
- tokens[0].first = value;
- } else {
- destructuringExpressionMatch(names, value);
- }
- }
-
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- return this;
- });
- conststatement.exps = true;
- var varstatement = stmt("var", function (prefix) {
- var tokens, lone, value;
-
- if (funct["(onevar)"] && state.option.onevar) {
- warning("W081");
- } else if (!funct["(global)"]) {
- funct["(onevar)"] = true;
- }
-
- this.first = [];
- for (;;) {
- var names = [];
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (_.contains(["{", "["], state.tokens.next.value)) {
- tokens = destructuringExpression();
- lone = false;
- } else {
- tokens = [ { id: identifier(), token: state.tokens.curr } ];
- lone = true;
- }
- for (var t in tokens) {
- t = tokens[t];
- if (state.option.inESNext() && funct[t.id] === "const") {
- warning("E011", null, t.id);
- }
- if (funct["(global)"] && predefined[t.id] === false) {
- warning("W079", t.token, t.id);
- }
- if (t.id) {
- addlabel(t.id, "unused", t.token);
- names.push(t.token);
- }
- }
- if (prefix) {
- break;
- }
-
- this.first = this.first.concat(names);
-
- if (state.tokens.next.id === "=") {
- nonadjacent(state.tokens.curr, state.tokens.next);
- advance("=");
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (state.tokens.next.id === "undefined") {
- warning("W080", state.tokens.prev, state.tokens.prev.value);
- }
- if (peek(0).id === "=" && state.tokens.next.identifier) {
- error("E038", state.tokens.next, state.tokens.next.value);
- }
- value = expression(5);
- if (lone) {
- tokens[0].first = value;
- } else {
- destructuringExpressionMatch(names, value);
- }
- }
-
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- return this;
- });
- varstatement.exps = true;
- var letstatement = stmt("let", function (prefix) {
- var tokens, lone, value, letblock;
-
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "let");
- }
-
- if (state.tokens.next.value === "(") {
- if (!state.option.inMoz(true)) {
- warning("W118", state.tokens.next, "let block");
- }
- advance("(");
- funct["(blockscope)"].stack();
- letblock = true;
- } else if (funct["(nolet)"]) {
- error("E048", state.tokens.curr);
- }
-
- if (funct["(onevar)"] && state.option.onevar) {
- warning("W081");
- } else if (!funct["(global)"]) {
- funct["(onevar)"] = true;
- }
-
- this.first = [];
- for (;;) {
- var names = [];
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (_.contains(["{", "["], state.tokens.next.value)) {
- tokens = destructuringExpression();
- lone = false;
- } else {
- tokens = [ { id: identifier(), token: state.tokens.curr.value } ];
- lone = true;
- }
- for (var t in tokens) {
- t = tokens[t];
- if (state.option.inESNext() && funct[t.id] === "const") {
- warning("E011", null, t.id);
- }
- if (funct["(global)"] && predefined[t.id] === false) {
- warning("W079", t.token, t.id);
- }
- if (t.id && !funct["(nolet)"]) {
- addlabel(t.id, "unused", t.token, true);
- names.push(t.token);
- }
- }
- if (prefix) {
- break;
- }
-
- this.first = this.first.concat(names);
-
- if (state.tokens.next.id === "=") {
- nonadjacent(state.tokens.curr, state.tokens.next);
- advance("=");
- nonadjacent(state.tokens.curr, state.tokens.next);
- if (state.tokens.next.id === "undefined") {
- warning("W080", state.tokens.prev, state.tokens.prev.value);
- }
- if (peek(0).id === "=" && state.tokens.next.identifier) {
- error("E037", state.tokens.next, state.tokens.next.value);
- }
- value = expression(5);
- if (lone) {
- tokens[0].first = value;
- } else {
- destructuringExpressionMatch(names, value);
- }
- }
-
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- if (letblock) {
- advance(")");
- block(true, true);
- this.block = true;
- funct["(blockscope)"].unstack();
- }
-
- return this;
- });
- letstatement.exps = true;
-
- blockstmt("class", function () {
- return classdef.call(this, true);
- });
-
- function classdef(stmt) {
- if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "class");
- }
- if (stmt) {
- this.name = identifier();
- addlabel(this.name, "unused", state.tokens.curr);
- } else if (state.tokens.next.identifier && state.tokens.next.value !== "extends") {
- this.name = identifier();
- }
- classtail(this);
- return this;
- }
-
- function classtail(c) {
- var strictness = state.directive["use strict"];
- if (state.tokens.next.value === "extends") {
- advance("extends");
- c.heritage = expression(10);
- }
- state.directive["use strict"] = true;
- advance("{");
- c.body = state.syntax["{"].nud(true);
- state.directive["use strict"] = strictness;
- }
-
- blockstmt("function", function () {
- var generator = false;
- if (state.tokens.next.value === "*") {
- advance("*");
- if (state.option.inESNext(true)) {
- generator = true;
- } else {
- warning("W119", state.tokens.curr, "function*");
- }
- }
- if (inblock) {
- warning("W082", state.tokens.curr);
-
- }
- var i = identifier();
- if (funct[i] === "const") {
- warning("E011", null, i);
- }
- adjacent(state.tokens.curr, state.tokens.next);
- addlabel(i, "unction", state.tokens.curr);
-
- doFunction(i, { statement: true }, generator);
- if (state.tokens.next.id === "(" && state.tokens.next.line === state.tokens.curr.line) {
- error("E039");
- }
- return this;
- });
-
- prefix("function", function () {
- var generator = false;
- if (state.tokens.next.value === "*") {
- if (!state.option.inESNext()) {
- warning("W119", state.tokens.curr, "function*");
- }
- advance("*");
- generator = true;
- }
- var i = optionalidentifier();
- if (i || state.option.gcl) {
- adjacent(state.tokens.curr, state.tokens.next);
- } else {
- nonadjacent(state.tokens.curr, state.tokens.next);
- }
- doFunction(i, undefined, generator);
- if (!state.option.loopfunc && funct["(loopage)"]) {
- warning("W083");
- }
- return this;
- });
-
- blockstmt("if", function () {
- var t = state.tokens.next;
- increaseComplexityCount();
- state.condition = true;
- advance("(");
- nonadjacent(this, t);
- nospace();
- checkCondAssignment(expression(0));
- advance(")", t);
- state.condition = false;
- nospace(state.tokens.prev, state.tokens.curr);
- block(true, true);
- if (state.tokens.next.id === "else") {
- nonadjacent(state.tokens.curr, state.tokens.next);
- advance("else");
- if (state.tokens.next.id === "if" || state.tokens.next.id === "switch") {
- statement(true);
- } else {
- block(true, true);
- }
- }
- return this;
- });
-
- blockstmt("try", function () {
- var b;
-
- function doCatch() {
- var oldScope = scope;
- var e;
-
- advance("catch");
- nonadjacent(state.tokens.curr, state.tokens.next);
- advance("(");
-
- scope = Object.create(oldScope);
-
- e = state.tokens.next.value;
- if (state.tokens.next.type !== "(identifier)") {
- e = null;
- warning("E030", state.tokens.next, e);
- }
-
- advance();
-
- funct = {
- "(name)" : "(catch)",
- "(line)" : state.tokens.next.line,
- "(character)": state.tokens.next.character,
- "(context)" : funct,
- "(breakage)" : funct["(breakage)"],
- "(loopage)" : funct["(loopage)"],
- "(scope)" : scope,
- "(statement)": false,
- "(metrics)" : createMetrics(state.tokens.next),
- "(catch)" : true,
- "(tokens)" : {},
- "(blockscope)": funct["(blockscope)"],
- "(comparray)": funct["(comparray)"]
- };
-
- if (e) {
- addlabel(e, "exception");
- }
-
- if (state.tokens.next.value === "if") {
- if (!state.option.inMoz(true)) {
- warning("W118", state.tokens.curr, "catch filter");
- }
- advance("if");
- expression(0);
- }
-
- advance(")");
-
- state.tokens.curr.funct = funct;
- functions.push(funct);
-
- block(false);
-
- scope = oldScope;
-
- funct["(last)"] = state.tokens.curr.line;
- funct["(lastcharacter)"] = state.tokens.curr.character;
- funct = funct["(context)"];
- }
-
- block(false);
-
- while (state.tokens.next.id === "catch") {
- increaseComplexityCount();
- if (b && (!state.option.inMoz(true))) {
- warning("W118", state.tokens.next, "multiple catch blocks");
- }
- doCatch();
- b = true;
- }
-
- if (state.tokens.next.id === "finally") {
- advance("finally");
- block(false);
- return;
- }
-
- if (!b) {
- error("E021", state.tokens.next, "catch", state.tokens.next.value);
- }
-
- return this;
- });
-
- blockstmt("while", function () {
- var t = state.tokens.next;
- funct["(breakage)"] += 1;
- funct["(loopage)"] += 1;
- increaseComplexityCount();
- advance("(");
- nonadjacent(this, t);
- nospace();
- checkCondAssignment(expression(0));
- advance(")", t);
- nospace(state.tokens.prev, state.tokens.curr);
- block(true, true);
- funct["(breakage)"] -= 1;
- funct["(loopage)"] -= 1;
- return this;
- }).labelled = true;
-
- blockstmt("with", function () {
- var t = state.tokens.next;
- if (state.directive["use strict"]) {
- error("E010", state.tokens.curr);
- } else if (!state.option.withstmt) {
- warning("W085", state.tokens.curr);
- }
-
- advance("(");
- nonadjacent(this, t);
- nospace();
- expression(0);
- advance(")", t);
- nospace(state.tokens.prev, state.tokens.curr);
- block(true, true);
-
- return this;
- });
-
- blockstmt("switch", function () {
- var t = state.tokens.next,
- g = false;
- funct["(breakage)"] += 1;
- advance("(");
- nonadjacent(this, t);
- nospace();
- checkCondAssignment(expression(0));
- advance(")", t);
- nospace(state.tokens.prev, state.tokens.curr);
- nonadjacent(state.tokens.curr, state.tokens.next);
- t = state.tokens.next;
- advance("{");
- nonadjacent(state.tokens.curr, state.tokens.next);
- indent += state.option.indent;
- this.cases = [];
-
- for (;;) {
- switch (state.tokens.next.id) {
- case "case":
- switch (funct["(verb)"]) {
- case "yield":
- case "break":
- case "case":
- case "continue":
- case "return":
- case "switch":
- case "throw":
- break;
- default:
- if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) {
- warning("W086", state.tokens.curr, "case");
- }
- }
- indentation(-state.option.indent);
- advance("case");
- this.cases.push(expression(20));
- increaseComplexityCount();
- g = true;
- advance(":");
- funct["(verb)"] = "case";
- break;
- case "default":
- switch (funct["(verb)"]) {
- case "yield":
- case "break":
- case "continue":
- case "return":
- case "throw":
- break;
- default:
- if (this.cases.length) {
- if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) {
- warning("W086", state.tokens.curr, "default");
- }
- }
- }
- indentation(-state.option.indent);
- advance("default");
- g = true;
- advance(":");
- break;
- case "}":
- indent -= state.option.indent;
- indentation();
- advance("}", t);
- funct["(breakage)"] -= 1;
- funct["(verb)"] = undefined;
- return;
- case "(end)":
- error("E023", state.tokens.next, "}");
- return;
- default:
- if (g) {
- switch (state.tokens.curr.id) {
- case ",":
- error("E040");
- return;
- case ":":
- g = false;
- statements();
- break;
- default:
- error("E025", state.tokens.curr);
- return;
- }
- } else {
- if (state.tokens.curr.id === ":") {
- advance(":");
- error("E024", state.tokens.curr, ":");
- statements();
- } else {
- error("E021", state.tokens.next, "case", state.tokens.next.value);
- return;
- }
- }
- }
- }
- }).labelled = true;
-
- stmt("debugger", function () {
- if (!state.option.debug) {
- warning("W087");
- }
- return this;
- }).exps = true;
-
- (function () {
- var x = stmt("do", function () {
- funct["(breakage)"] += 1;
- funct["(loopage)"] += 1;
- increaseComplexityCount();
-
- this.first = block(true, true);
- advance("while");
- var t = state.tokens.next;
- nonadjacent(state.tokens.curr, t);
- advance("(");
- nospace();
- checkCondAssignment(expression(0));
- advance(")", t);
- nospace(state.tokens.prev, state.tokens.curr);
- funct["(breakage)"] -= 1;
- funct["(loopage)"] -= 1;
- return this;
- });
- x.labelled = true;
- x.exps = true;
- }());
-
- blockstmt("for", function () {
- var s, t = state.tokens.next;
- var letscope = false;
- var foreachtok = null;
-
- if (t.value === "each") {
- foreachtok = t;
- advance("each");
- if (!state.option.inMoz(true)) {
- warning("W118", state.tokens.curr, "for each");
- }
- }
-
- funct["(breakage)"] += 1;
- funct["(loopage)"] += 1;
- increaseComplexityCount();
- advance("(");
- nonadjacent(this, t);
- nospace();
- var nextop; // contains the token of the "in" or "of" operator
- var i = 0;
- var inof = ["in", "of"];
- do {
- nextop = peek(i);
- ++i;
- } while (!_.contains(inof, nextop.value) && nextop.value !== ";" &&
- nextop.type !== "(end)");
- if (_.contains(inof, nextop.value)) {
- if (!state.option.inESNext() && nextop.value === "of") {
- error("W104", nextop, "for of");
- }
- if (state.tokens.next.id === "var") {
- advance("var");
- state.syntax["var"].fud.call(state.syntax["var"].fud, true);
- } else if (state.tokens.next.id === "let") {
- advance("let");
- letscope = true;
- funct["(blockscope)"].stack();
- state.syntax["let"].fud.call(state.syntax["let"].fud, true);
- } else {
- switch (funct[state.tokens.next.value]) {
- case "unused":
- funct[state.tokens.next.value] = "var";
- break;
- case "var":
- break;
- default:
- if (!funct["(blockscope)"].getlabel(state.tokens.next.value))
- warning("W088", state.tokens.next, state.tokens.next.value);
- }
- advance();
- }
- advance(nextop.value);
- expression(20);
- advance(")", t);
- s = block(true, true);
- if (state.option.forin && s && (s.length > 1 || typeof s[0] !== "object" ||
- s[0].value !== "if")) {
- warning("W089", this);
- }
- funct["(breakage)"] -= 1;
- funct["(loopage)"] -= 1;
- } else {
- if (foreachtok) {
- error("E045", foreachtok);
- }
- if (state.tokens.next.id !== ";") {
- if (state.tokens.next.id === "var") {
- advance("var");
- state.syntax["var"].fud.call(state.syntax["var"].fud);
- } else if (state.tokens.next.id === "let") {
- advance("let");
- letscope = true;
- funct["(blockscope)"].stack();
- state.syntax["let"].fud.call(state.syntax["let"].fud);
- } else {
- for (;;) {
- expression(0, "for");
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- }
- }
- nolinebreak(state.tokens.curr);
- advance(";");
- if (state.tokens.next.id !== ";") {
- checkCondAssignment(expression(0));
- }
- nolinebreak(state.tokens.curr);
- advance(";");
- if (state.tokens.next.id === ";") {
- error("E021", state.tokens.next, ")", ";");
- }
- if (state.tokens.next.id !== ")") {
- for (;;) {
- expression(0, "for");
- if (state.tokens.next.id !== ",") {
- break;
- }
- comma();
- }
- }
- advance(")", t);
- nospace(state.tokens.prev, state.tokens.curr);
- block(true, true);
- funct["(breakage)"] -= 1;
- funct["(loopage)"] -= 1;
-
- }
- if (letscope) {
- funct["(blockscope)"].unstack();
- }
- return this;
- }).labelled = true;
-
-
- stmt("break", function () {
- var v = state.tokens.next.value;
-
- if (funct["(breakage)"] === 0)
- warning("W052", state.tokens.next, this.value);
-
- if (!state.option.asi)
- nolinebreak(this);
-
- if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
- if (state.tokens.curr.line === state.tokens.next.line) {
- if (funct[v] !== "label") {
- warning("W090", state.tokens.next, v);
- } else if (scope[v] !== funct) {
- warning("W091", state.tokens.next, v);
- }
- this.first = state.tokens.next;
- advance();
- }
- }
- reachable("break");
- return this;
- }).exps = true;
-
-
- stmt("continue", function () {
- var v = state.tokens.next.value;
-
- if (funct["(breakage)"] === 0)
- warning("W052", state.tokens.next, this.value);
-
- if (!state.option.asi)
- nolinebreak(this);
-
- if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
- if (state.tokens.curr.line === state.tokens.next.line) {
- if (funct[v] !== "label") {
- warning("W090", state.tokens.next, v);
- } else if (scope[v] !== funct) {
- warning("W091", state.tokens.next, v);
- }
- this.first = state.tokens.next;
- advance();
- }
- } else if (!funct["(loopage)"]) {
- warning("W052", state.tokens.next, this.value);
- }
- reachable("continue");
- return this;
- }).exps = true;
-
-
- stmt("return", function () {
- if (this.line === state.tokens.next.line) {
- if (state.tokens.next.id === "(regexp)")
- warning("W092");
-
- if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
- nonadjacent(state.tokens.curr, state.tokens.next);
- this.first = expression(0);
-
- if (this.first &&
- this.first.type === "(punctuator)" && this.first.value === "=" && !state.option.boss) {
- warningAt("W093", this.first.line, this.first.character);
- }
- }
- } else {
- if (state.tokens.next.type === "(punctuator)" &&
- ["[", "{", "+", "-"].indexOf(state.tokens.next.value) > -1) {
- nolinebreak(this); // always warn (Line breaking error)
- }
- }
- reachable("return");
- return this;
- }).exps = true;
-
- stmt("yield", function () {
- if (state.option.inESNext(true) && funct["(generator)"] !== true) {
- error("E046", state.tokens.curr, "yield");
- } else if (!state.option.inESNext()) {
- warning("W104", state.tokens.curr, "yield");
- }
- funct["(generator)"] = "yielded";
- if (this.line === state.tokens.next.line) {
- if (state.tokens.next.id === "(regexp)")
- warning("W092");
-
- if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
- nonadjacent(state.tokens.curr, state.tokens.next);
- this.first = expression(0);
-
- if (this.first.type === "(punctuator)" && this.first.value === "=" && !state.option.boss) {
- warningAt("W093", this.first.line, this.first.character);
- }
- }
- } else if (!state.option.asi) {
- nolinebreak(this); // always warn (Line breaking error)
- }
- return this;
- }).exps = true;
-
-
- stmt("throw", function () {
- nolinebreak(this);
- nonadjacent(state.tokens.curr, state.tokens.next);
- this.first = expression(20);
- reachable("throw");
- return this;
- }).exps = true;
-
- FutureReservedWord("abstract");
- FutureReservedWord("boolean");
- FutureReservedWord("byte");
- FutureReservedWord("char");
- FutureReservedWord("class", { es5: true, nud: classdef });
- FutureReservedWord("double");
- FutureReservedWord("enum", { es5: true });
- FutureReservedWord("export", { es5: true });
- FutureReservedWord("extends", { es5: true });
- FutureReservedWord("final");
- FutureReservedWord("float");
- FutureReservedWord("goto");
- FutureReservedWord("implements", { es5: true, strictOnly: true });
- FutureReservedWord("import", { es5: true });
- FutureReservedWord("int");
- FutureReservedWord("interface", { es5: true, strictOnly: true });
- FutureReservedWord("long");
- FutureReservedWord("native");
- FutureReservedWord("package", { es5: true, strictOnly: true });
- FutureReservedWord("private", { es5: true, strictOnly: true });
- FutureReservedWord("protected", { es5: true, strictOnly: true });
- FutureReservedWord("public", { es5: true, strictOnly: true });
- FutureReservedWord("short");
- FutureReservedWord("static", { es5: true, strictOnly: true });
- FutureReservedWord("super", { es5: true });
- FutureReservedWord("synchronized");
- FutureReservedWord("throws");
- FutureReservedWord("transient");
- FutureReservedWord("volatile");
-
- var lookupBlockType = function () {
- var pn, pn1;
- var i = 0;
- var bracketStack = 0;
- var ret = {};
- if (_.contains(["[", "{"], state.tokens.curr.value))
- bracketStack += 1;
- if (_.contains(["[", "{"], state.tokens.next.value))
- bracketStack += 1;
- if (_.contains(["]", "}"], state.tokens.next.value))
- bracketStack -= 1;
- do {
- pn = peek(i);
- pn1 = peek(i + 1);
- i = i + 1;
- if (_.contains(["[", "{"], pn.value)) {
- bracketStack += 1;
- } else if (_.contains(["]", "}"], pn.value)) {
- bracketStack -= 1;
- }
- if (pn.identifier && pn.value === "for" && bracketStack === 1) {
- ret.isCompArray = true;
- ret.notJson = true;
- break;
- }
- if (_.contains(["}", "]"], pn.value) && pn1.value === "=") {
- ret.isDestAssign = true;
- ret.notJson = true;
- break;
- }
- if (pn.value === ";") {
- ret.isBlock = true;
- ret.notJson = true;
- }
- } while (bracketStack > 0 && pn.id !== "(end)" && i < 15);
- return ret;
- };
- function destructuringAssignOrJsonValue() {
-
- var block = lookupBlockType();
- if (block.notJson) {
- if (!state.option.inESNext() && block.isDestAssign) {
- warning("W104", state.tokens.curr, "destructuring assignment");
- }
- statements();
- } else {
- state.option.laxbreak = true;
- state.jsonMode = true;
- jsonValue();
- }
- }
-
- var arrayComprehension = function () {
- var CompArray = function () {
- this.mode = "use";
- this.variables = [];
- };
- var _carrays = [];
- var _current;
- function declare(v) {
- var l = _current.variables.filter(function (elt) {
- if (elt.value === v) {
- elt.undef = false;
- return v;
- }
- }).length;
- return l !== 0;
- }
- function use(v) {
- var l = _current.variables.filter(function (elt) {
- if (elt.value === v && !elt.undef) {
- if (elt.unused === true) {
- elt.unused = false;
- }
- return v;
- }
- }).length;
- return (l === 0);
- }
- return {stack: function () {
- _current = new CompArray();
- _carrays.push(_current);
- },
- unstack: function () {
- _current.variables.filter(function (v) {
- if (v.unused)
- warning("W098", v.token, v.value);
- if (v.undef)
- isundef(v.funct, "W117", v.token, v.value);
- });
- _carrays.splice(_carrays[_carrays.length - 1], 1);
- _current = _carrays[_carrays.length - 1];
- },
- setState: function (s) {
- if (_.contains(["use", "define", "filter"], s))
- _current.mode = s;
- },
- check: function (v) {
- if (_current && _current.mode === "use") {
- _current.variables.push({funct: funct,
- token: state.tokens.curr,
- value: v,
- undef: true,
- unused: false});
- return true;
- } else if (_current && _current.mode === "define") {
- if (!declare(v)) {
- _current.variables.push({funct: funct,
- token: state.tokens.curr,
- value: v,
- undef: false,
- unused: true});
- }
- return true;
- } else if (_current && _current.mode === "filter") {
- if (use(v)) {
- isundef(funct, "W117", state.tokens.curr, v);
- }
- return true;
- }
- return false;
- }
- };
- };
-
- function jsonValue() {
-
- function jsonObject() {
- var o = {}, t = state.tokens.next;
- advance("{");
- if (state.tokens.next.id !== "}") {
- for (;;) {
- if (state.tokens.next.id === "(end)") {
- error("E026", state.tokens.next, t.line);
- } else if (state.tokens.next.id === "}") {
- warning("W094", state.tokens.curr);
- break;
- } else if (state.tokens.next.id === ",") {
- error("E028", state.tokens.next);
- } else if (state.tokens.next.id !== "(string)") {
- warning("W095", state.tokens.next, state.tokens.next.value);
- }
- if (o[state.tokens.next.value] === true) {
- warning("W075", state.tokens.next, state.tokens.next.value);
- } else if ((state.tokens.next.value === "__proto__" &&
- !state.option.proto) || (state.tokens.next.value === "__iterator__" &&
- !state.option.iterator)) {
- warning("W096", state.tokens.next, state.tokens.next.value);
- } else {
- o[state.tokens.next.value] = true;
- }
- advance();
- advance(":");
- jsonValue();
- if (state.tokens.next.id !== ",") {
- break;
- }
- advance(",");
- }
- }
- advance("}");
- }
-
- function jsonArray() {
- var t = state.tokens.next;
- advance("[");
- if (state.tokens.next.id !== "]") {
- for (;;) {
- if (state.tokens.next.id === "(end)") {
- error("E027", state.tokens.next, t.line);
- } else if (state.tokens.next.id === "]") {
- warning("W094", state.tokens.curr);
- break;
- } else if (state.tokens.next.id === ",") {
- error("E028", state.tokens.next);
- }
- jsonValue();
- if (state.tokens.next.id !== ",") {
- break;
- }
- advance(",");
- }
- }
- advance("]");
- }
-
- switch (state.tokens.next.id) {
- case "{":
- jsonObject();
- break;
- case "[":
- jsonArray();
- break;
- case "true":
- case "false":
- case "null":
- case "(number)":
- case "(string)":
- advance();
- break;
- case "-":
- advance("-");
- if (state.tokens.curr.character !== state.tokens.next.from) {
- warning("W011", state.tokens.curr);
- }
- adjacent(state.tokens.curr, state.tokens.next);
- advance("(number)");
- break;
- default:
- error("E003", state.tokens.next);
- }
- }
-
- var blockScope = function () {
- var _current = {};
- var _variables = [_current];
-
- function _checkBlockLabels() {
- for (var t in _current) {
- if (_current[t]["(type)"] === "unused") {
- if (state.option.unused) {
- var tkn = _current[t]["(token)"];
- var line = tkn.line;
- var chr = tkn.character;
- warningAt("W098", line, chr, t);
- }
- }
- }
- }
-
- return {
- stack: function () {
- _current = {};
- _variables.push(_current);
- },
-
- unstack: function () {
- _checkBlockLabels();
- _variables.splice(_variables.length - 1, 1);
- _current = _.last(_variables);
- },
-
- getlabel: function (l) {
- for (var i = _variables.length - 1 ; i >= 0; --i) {
- if (_.has(_variables[i], l)) {
- return _variables[i];
- }
- }
- },
-
- current: {
- has: function (t) {
- return _.has(_current, t);
- },
- add: function (t, type, tok) {
- _current[t] = { "(type)" : type,
- "(token)": tok };
- }
- }
- };
- };
- var itself = function (s, o, g) {
- var i, k, x;
- var optionKeys;
- var newOptionObj = {};
- var newIgnoredObj = {};
-
- state.reset();
-
- if (o && o.scope) {
- JSHINT.scope = o.scope;
- } else {
- JSHINT.errors = [];
- JSHINT.undefs = [];
- JSHINT.internals = [];
- JSHINT.blacklist = {};
- JSHINT.scope = "(main)";
- }
-
- predefined = Object.create(null);
- combine(predefined, vars.ecmaIdentifiers);
- combine(predefined, vars.reservedVars);
-
- combine(predefined, g || {});
-
- declared = Object.create(null);
- exported = Object.create(null);
-
- function each(obj, cb) {
- if (!obj)
- return;
-
- if (!Array.isArray(obj) && typeof obj === "object")
- obj = Object.keys(obj);
-
- obj.forEach(cb);
- }
-
- if (o) {
- each(o.predef || null, function (item) {
- var slice, prop;
-
- if (item[0] === "-") {
- slice = item.slice(1);
- JSHINT.blacklist[slice] = slice;
- } else {
- prop = Object.getOwnPropertyDescriptor(o.predef, item);
- predefined[item] = prop ? prop.value : false;
- }
- });
-
- each(o.exported || null, function (item) {
- exported[item] = true;
- });
-
- delete o.predef;
- delete o.exported;
-
- optionKeys = Object.keys(o);
- for (x = 0; x < optionKeys.length; x++) {
- if (/^-W\d{3}$/g.test(optionKeys[x])) {
- newIgnoredObj[optionKeys[x].slice(1)] = true;
- } else {
- newOptionObj[optionKeys[x]] = o[optionKeys[x]];
-
- if (optionKeys[x] === "newcap" && o[optionKeys[x]] === false)
- newOptionObj["(explicitNewcap)"] = true;
-
- if (optionKeys[x] === "indent")
- newOptionObj["(explicitIndent)"] = o[optionKeys[x]] === false ? false : true;
- }
- }
- }
-
- state.option = newOptionObj;
- state.ignored = newIgnoredObj;
-
- state.option.indent = state.option.indent || 4;
- state.option.maxerr = state.option.maxerr || 50;
-
- indent = 1;
- global = Object.create(predefined);
- scope = global;
- funct = {
- "(global)": true,
- "(name)": "(global)",
- "(scope)": scope,
- "(breakage)": 0,
- "(loopage)": 0,
- "(tokens)": {},
- "(metrics)": createMetrics(state.tokens.next),
- "(blockscope)": blockScope(),
- "(comparray)": arrayComprehension()
- };
- functions = [funct];
- urls = [];
- stack = null;
- member = {};
- membersOnly = null;
- implied = {};
- inblock = false;
- lookahead = [];
- warnings = 0;
- unuseds = [];
-
- if (!isString(s) && !Array.isArray(s)) {
- errorAt("E004", 0);
- return false;
- }
-
- api = {
- get isJSON() {
- return state.jsonMode;
- },
-
- getOption: function (name) {
- return state.option[name] || null;
- },
-
- getCache: function (name) {
- return state.cache[name];
- },
-
- setCache: function (name, value) {
- state.cache[name] = value;
- },
-
- warn: function (code, data) {
- warningAt.apply(null, [ code, data.line, data.char ].concat(data.data));
- },
-
- on: function (names, listener) {
- names.split(" ").forEach(function (name) {
- emitter.on(name, listener);
- }.bind(this));
- }
- };
-
- emitter.removeAllListeners();
- (extraModules || []).forEach(function (func) {
- func(api);
- });
-
- state.tokens.prev = state.tokens.curr = state.tokens.next = state.syntax["(begin)"];
-
- lex = new Lexer(s);
-
- lex.on("warning", function (ev) {
- warningAt.apply(null, [ ev.code, ev.line, ev.character].concat(ev.data));
- });
-
- lex.on("error", function (ev) {
- errorAt.apply(null, [ ev.code, ev.line, ev.character ].concat(ev.data));
- });
-
- lex.on("fatal", function (ev) {
- quit("E041", ev.line, ev.from);
- });
-
- lex.on("Identifier", function (ev) {
- emitter.emit("Identifier", ev);
- });
-
- lex.on("String", function (ev) {
- emitter.emit("String", ev);
- });
-
- lex.on("Number", function (ev) {
- emitter.emit("Number", ev);
- });
-
- lex.start();
- for (var name in o) {
- if (_.has(o, name)) {
- checkOption(name, state.tokens.curr);
- }
- }
-
- assume();
- combine(predefined, g || {});
- comma.first = true;
-
- try {
- advance();
- switch (state.tokens.next.id) {
- case "{":
- case "[":
- destructuringAssignOrJsonValue();
- break;
- default:
- directives();
-
- if (state.directive["use strict"]) {
- if (!state.option.globalstrict && !state.option.node) {
- warning("W097", state.tokens.prev);
- }
- }
-
- statements();
- }
- advance((state.tokens.next && state.tokens.next.value !== ".") ? "(end)" : undefined);
- funct["(blockscope)"].unstack();
-
- var markDefined = function (name, context) {
- do {
- if (typeof context[name] === "string") {
-
- if (context[name] === "unused")
- context[name] = "var";
- else if (context[name] === "unction")
- context[name] = "closure";
-
- return true;
- }
-
- context = context["(context)"];
- } while (context);
-
- return false;
- };
-
- var clearImplied = function (name, line) {
- if (!implied[name])
- return;
-
- var newImplied = [];
- for (var i = 0; i < implied[name].length; i += 1) {
- if (implied[name][i] !== line)
- newImplied.push(implied[name][i]);
- }
-
- if (newImplied.length === 0)
- delete implied[name];
- else
- implied[name] = newImplied;
- };
-
- var warnUnused = function (name, tkn, type, unused_opt) {
- var line = tkn.line;
- var chr = tkn.character;
-
- if (unused_opt === undefined) {
- unused_opt = state.option.unused;
- }
-
- if (unused_opt === true) {
- unused_opt = "last-param";
- }
-
- var warnable_types = {
- "vars": ["var"],
- "last-param": ["var", "param"],
- "strict": ["var", "param", "last-param"]
- };
-
- if (unused_opt) {
- if (warnable_types[unused_opt] && warnable_types[unused_opt].indexOf(type) !== -1) {
- warningAt("W098", line, chr, name);
- }
- }
-
- unuseds.push({
- name: name,
- line: line,
- character: chr
- });
- };
-
- var checkUnused = function (func, key) {
- var type = func[key];
- var tkn = func["(tokens)"][key];
-
- if (key.charAt(0) === "(")
- return;
-
- if (type !== "unused" && type !== "unction")
- return;
- if (func["(params)"] && func["(params)"].indexOf(key) !== -1)
- return;
- if (func["(global)"] && _.has(exported, key)) {
- return;
- }
-
- warnUnused(key, tkn, "var");
- };
- for (i = 0; i < JSHINT.undefs.length; i += 1) {
- k = JSHINT.undefs[i].slice(0);
-
- if (markDefined(k[2].value, k[0])) {
- clearImplied(k[2].value, k[2].line);
- } else if (state.option.undef) {
- warning.apply(warning, k.slice(1));
- }
- }
-
- functions.forEach(function (func) {
- if (func["(unusedOption)"] === false) {
- return;
- }
-
- for (var key in func) {
- if (_.has(func, key)) {
- checkUnused(func, key);
- }
- }
-
- if (!func["(params)"])
- return;
-
- var params = func["(params)"].slice();
- var param = params.pop();
- var type, unused_opt;
-
- while (param) {
- type = func[param];
- unused_opt = func["(unusedOption)"] || state.option.unused;
- unused_opt = unused_opt === true ? "last-param" : unused_opt;
-
- if (param === "undefined")
- return;
-
- if (type === "unused" || type === "unction") {
- warnUnused(param, func["(tokens)"][param], "param", func["(unusedOption)"]);
- } else if (unused_opt === "last-param") {
- return;
- }
-
- param = params.pop();
- }
- });
-
- for (var key in declared) {
- if (_.has(declared, key) && !_.has(global, key)) {
- warnUnused(key, declared[key], "var");
- }
- }
-
- } catch (err) {
- if (err && err.name === "JSHintError") {
- var nt = state.tokens.next || {};
- JSHINT.errors.push({
- scope : "(main)",
- raw : err.raw,
- reason : err.message,
- line : err.line || nt.line,
- character : err.character || nt.from
- }, null);
- } else {
- throw err;
- }
- }
-
- if (JSHINT.scope === "(main)") {
- o = o || {};
-
- for (i = 0; i < JSHINT.internals.length; i += 1) {
- k = JSHINT.internals[i];
- o.scope = k.elem;
- itself(k.value, o, g);
- }
- }
-
- return JSHINT.errors.length === 0;
- };
- itself.addModule = function (func) {
- extraModules.push(func);
- };
-
- itself.addModule(style.register);
- itself.data = function () {
- var data = {
- functions: [],
- options: state.option
- };
- var implieds = [];
- var members = [];
- var fu, f, i, j, n, globals;
-
- if (itself.errors.length) {
- data.errors = itself.errors;
- }
-
- if (state.jsonMode) {
- data.json = true;
- }
-
- for (n in implied) {
- if (_.has(implied, n)) {
- implieds.push({
- name: n,
- line: implied[n]
- });
- }
- }
-
- if (implieds.length > 0) {
- data.implieds = implieds;
- }
-
- if (urls.length > 0) {
- data.urls = urls;
- }
-
- globals = Object.keys(scope);
- if (globals.length > 0) {
- data.globals = globals;
- }
-
- for (i = 1; i < functions.length; i += 1) {
- f = functions[i];
- fu = {};
-
- for (j = 0; j < functionicity.length; j += 1) {
- fu[functionicity[j]] = [];
- }
-
- for (j = 0; j < functionicity.length; j += 1) {
- if (fu[functionicity[j]].length === 0) {
- delete fu[functionicity[j]];
- }
- }
-
- fu.name = f["(name)"];
- fu.param = f["(params)"];
- fu.line = f["(line)"];
- fu.character = f["(character)"];
- fu.last = f["(last)"];
- fu.lastcharacter = f["(lastcharacter)"];
- data.functions.push(fu);
- }
-
- if (unuseds.length > 0) {
- data.unused = unuseds;
- }
-
- members = [];
- for (n in member) {
- if (typeof member[n] === "number") {
- data.member = member;
- break;
- }
- }
-
- return data;
- };
-
- itself.jshint = itself;
-
- return itself;
-}());
-if (typeof exports === "object" && exports) {
- exports.JSHINT = JSHINT;
-}
-
-})()
-},
-{"events":2,"../shared/vars.js":3,"../shared/messages.js":10,"./lex.js":11,"./reg.js":4,"./state.js":5,"./style.js":6,"console-browserify":7,"underscore":12}],
-10:[function(req,module,exports){
-(function(){
-
-var _ = req("underscore");
-
-var errors = {
- E001: "Bad option: '{a}'.",
- E002: "Bad option value.",
- E003: "Expected a JSON value.",
- E004: "Input is neither a string nor an array of strings.",
- E005: "Input is empty.",
- E006: "Unexpected early end of program.",
- E007: "Missing \"use strict\" statement.",
- E008: "Strict violation.",
- E009: "Option 'validthis' can't be used in a global scope.",
- E010: "'with' is not allowed in strict mode.",
- E011: "const '{a}' has already been declared.",
- E012: "const '{a}' is initialized to 'undefined'.",
- E013: "Attempting to override '{a}' which is a constant.",
- E014: "A regular expression literal can be confused with '/='.",
- E015: "Unclosed regular expression.",
- E016: "Invalid regular expression.",
- E017: "Unclosed comment.",
- E018: "Unbegun comment.",
- E019: "Unmatched '{a}'.",
- E020: "Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",
- E021: "Expected '{a}' and instead saw '{b}'.",
- E022: "Line breaking error '{a}'.",
- E023: "Missing '{a}'.",
- E024: "Unexpected '{a}'.",
- E025: "Missing ':' on a case clause.",
- E026: "Missing '}' to match '{' from line {a}.",
- E027: "Missing ']' to match '[' form line {a}.",
- E028: "Illegal comma.",
- E029: "Unclosed string.",
- E030: "Expected an identifier and instead saw '{a}'.",
- E031: "Bad assignment.", // FIXME: Rephrase
- E032: "Expected a small integer or 'false' and instead saw '{a}'.",
- E033: "Expected an operator and instead saw '{a}'.",
- E034: "get/set are ES5 features.",
- E035: "Missing property name.",
- E036: "Expected to see a statement and instead saw a block.",
- E037: "Constant {a} was not declared correctly.",
- E038: "Variable {a} was not declared correctly.",
- E039: "Function declarations are not invocable. Wrap the whole function invocation in parens.",
- E040: "Each value should have its own case label.",
- E041: "Unrecoverable syntax error.",
- E042: "Stopping.",
- E043: "Too many errors.",
- E044: "'{a}' is already defined and can't be redefined.",
- E045: "Invalid for each loop.",
- E046: "A yield statement shall be within a generator function (with syntax: `function*`)",
- E047: "A generator function shall contain a yield statement.",
- E048: "Let declaration not directly within block.",
- E049: "A {a} cannot be named '{b}'."
-};
-
-var warnings = {
- W001: "'hasOwnProperty' is a really bad name.",
- W002: "Value of '{a}' may be overwritten in IE 8 and earlier.",
- W003: "'{a}' was used before it was defined.",
- W004: "'{a}' is already defined.",
- W005: "A dot following a number can be confused with a decimal point.",
- W006: "Confusing minuses.",
- W007: "Confusing pluses.",
- W008: "A leading decimal point can be confused with a dot: '{a}'.",
- W009: "The array literal notation [] is preferrable.",
- W010: "The object literal notation {} is preferrable.",
- W011: "Unexpected space after '{a}'.",
- W012: "Unexpected space before '{a}'.",
- W013: "Missing space after '{a}'.",
- W014: "Bad line breaking before '{a}'.",
- W015: "Expected '{a}' to have an indentation at {b} instead at {c}.",
- W016: "Unexpected use of '{a}'.",
- W017: "Bad operand.",
- W018: "Confusing use of '{a}'.",
- W019: "Use the isNaN function to compare with NaN.",
- W020: "Read only.",
- W021: "'{a}' is a function.",
- W022: "Do not assign to the exception parameter.",
- W023: "Expected an identifier in an assignment and instead saw a function invocation.",
- W024: "Expected an identifier and instead saw '{a}' (a reserved word).",
- W025: "Missing name in function declaration.",
- W026: "Inner functions should be listed at the top of the outer function.",
- W027: "Unreachable '{a}' after '{b}'.",
- W028: "Label '{a}' on {b} statement.",
- W030: "Expected an assignment or function call and instead saw an expression.",
- W031: "Do not use 'new' for side effects.",
- W032: "Unnecessary semicolon.",
- W033: "Missing semicolon.",
- W034: "Unnecessary directive \"{a}\".",
- W035: "Empty block.",
- W036: "Unexpected /*member '{a}'.",
- W037: "'{a}' is a statement label.",
- W038: "'{a}' used out of scope.",
- W039: "'{a}' is not allowed.",
- W040: "Possible strict violation.",
- W041: "Use '{a}' to compare with '{b}'.",
- W042: "Avoid EOL escaping.",
- W043: "Bad escaping of EOL. Use option multistr if needed.",
- W044: "Bad or unnecessary escaping.",
- W045: "Bad number '{a}'.",
- W046: "Don't use extra leading zeros '{a}'.",
- W047: "A trailing decimal point can be confused with a dot: '{a}'.",
- W048: "Unexpected control character in regular expression.",
- W049: "Unexpected escaped character '{a}' in regular expression.",
- W050: "JavaScript URL.",
- W051: "Variables should not be deleted.",
- W052: "Unexpected '{a}'.",
- W053: "Do not use {a} as a constructor.",
- W054: "The Function constructor is a form of eval.",
- W055: "A constructor name should start with an uppercase letter.",
- W056: "Bad constructor.",
- W057: "Weird construction. Is 'new' unnecessary?",
- W058: "Missing '()' invoking a constructor.",
- W059: "Avoid arguments.{a}.",
- W060: "document.write can be a form of eval.",
- W061: "eval can be harmful.",
- W062: "Wrap an immediate function invocation in parens " +
- "to assist the reader in understanding that the expression " +
- "is the result of a function, and not the function itself.",
- W063: "Math is not a function.",
- W064: "Missing 'new' prefix when invoking a constructor.",
- W065: "Missing radix parameter.",
- W066: "Implied eval. Consider passing a function instead of a string.",
- W067: "Bad invocation.",
- W068: "Wrapping non-IIFE function literals in parens is unnecessary.",
- W069: "['{a}'] is better written in dot notation.",
- W070: "Extra comma. (it breaks older versions of IE)",
- W071: "This function has too many statements. ({a})",
- W072: "This function has too many parameters. ({a})",
- W073: "Blocks are nested too deeply. ({a})",
- W074: "This function's cyclomatic complexity is too high. ({a})",
- W075: "Duplicate key '{a}'.",
- W076: "Unexpected parameter '{a}' in get {b} function.",
- W077: "Expected a single parameter in set {a} function.",
- W078: "Setter is defined without getter.",
- W079: "Redefinition of '{a}'.",
- W080: "It's not necessary to initialize '{a}' to 'undefined'.",
- W081: "Too many var statements.",
- W082: "Function declarations should not be placed in blocks. " +
- "Use a function expression or move the statement to the top of " +
- "the outer function.",
- W083: "Don't make functions within a loop.",
- W084: "Assignment in conditional expression",
- W085: "Don't use 'with'.",
- W086: "Expected a 'break' statement before '{a}'.",
- W087: "Forgotten 'debugger' statement?",
- W088: "Creating global 'for' variable. Should be 'for (var {a} ...'.",
- W089: "The body of a for in should be wrapped in an if statement to filter " +
- "unwanted properties from the prototype.",
- W090: "'{a}' is not a statement label.",
- W091: "'{a}' is out of scope.",
- W092: "Wrap the /regexp/ literal in parens to disambiguate the slash operator.",
- W093: "Did you mean to return a conditional instead of an assignment?",
- W094: "Unexpected comma.",
- W095: "Expected a string and instead saw {a}.",
- W096: "The '{a}' key may produce unexpected results.",
- W097: "Use the function form of \"use strict\".",
- W098: "'{a}' is defined but never used.",
- W099: "Mixed spaces and tabs.",
- W100: "This character may get silently deleted by one or more browsers.",
- W101: "Line is too long.",
- W102: "Trailing whitespace.",
- W103: "The '{a}' property is deprecated.",
- W104: "'{a}' is only available in JavaScript 1.7.",
- W105: "Unexpected {a} in '{b}'.",
- W106: "Identifier '{a}' is not in camel case.",
- W107: "Script URL.",
- W108: "Strings must use doublequote.",
- W109: "Strings must use singlequote.",
- W110: "Mixed double and single quotes.",
- W112: "Unclosed string.",
- W113: "Control character in string: {a}.",
- W114: "Avoid {a}.",
- W115: "Octal literals are not allowed in strict mode.",
- W116: "Expected '{a}' and instead saw '{b}'.",
- W117: "'{a}' is not defined.",
- W118: "'{a}' is only available in Mozilla JavaScript extensions (use moz option).",
- W119: "'{a}' is only available in ES6 (use esnext option)."
-};
-
-var info = {
- I001: "Comma warnings can be turned off with 'laxcomma'.",
- I002: "Reserved words as properties can be used under the 'es5' option.",
- I003: "ES5 option is now set per default"
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+
+var Mirror = exports.Mirror = function(sender) {
+ this.sender = sender;
+ var doc = this.doc = new Document("");
+
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ doc.applyDeltas(e.data);
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
};
-exports.errors = {};
-exports.warnings = {};
-exports.info = {};
-
-_.each(errors, function (desc, code) {
- exports.errors[code] = { code: code, desc: desc };
-});
-
-_.each(warnings, function (desc, code) {
- exports.warnings[code] = { code: code, desc: desc };
-});
+(function() {
+
+ this.$timeout = 500;
+
+ this.setTimeout = function(timeout) {
+ this.$timeout = timeout;
+ };
+
+ this.setValue = function(value) {
+ this.doc.setValue(value);
+ this.deferredUpdate.schedule(this.$timeout);
+ };
+
+ this.getValue = function(callbackId) {
+ this.sender.callback(this.doc.getValue(), callbackId);
+ };
+
+ this.onUpdate = function() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
-_.each(info, function (desc, code) {
- exports.info[code] = { code: code, desc: desc };
});
-})()
-},
-{"underscore":12}],
-11:[function(req,module,exports){
-(function(){/*
- * Lexical analysis and token construction.
- */
-
-
-
-var _ = req("underscore");
-var events = req("events");
-var reg = req("./reg.js");
-var state = req("./state.js").state;
-
-var Token = {
- Identifier: 1,
- Punctuator: 2,
- NumericLiteral: 3,
- StringLiteral: 4,
- Comment: 5,
- Keyword: 6,
- NullLiteral: 7,
- BooleanLiteral: 8,
- RegExp: 9
-};
-
-var unicodeLetterTable = [
- 170, 170, 181, 181, 186, 186, 192, 214,
- 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750,
- 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908,
- 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366,
- 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610,
- 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775,
- 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957,
- 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069,
- 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2308, 2361,
- 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431,
- 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482,
- 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529,
- 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608,
- 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654,
- 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736,
- 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785,
- 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867,
- 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929,
- 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970,
- 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001,
- 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123,
- 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212,
- 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261,
- 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344,
- 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455,
- 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526,
- 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716,
- 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743,
- 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760,
- 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805,
- 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138,
- 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198,
- 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4304, 4346,
- 4348, 4348, 4352, 4680, 4682, 4685, 4688, 4694, 4696, 4696,
- 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789,
- 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880,
- 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740,
- 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900,
- 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000,
- 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312,
- 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516,
- 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823,
- 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7104, 7141,
- 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409,
- 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013,
- 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061,
- 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140,
- 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188,
- 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455,
- 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486,
- 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521,
- 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358,
- 11360, 11492, 11499, 11502, 11520, 11557, 11568, 11621,
- 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694,
- 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726,
- 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295,
- 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438,
- 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589,
- 12593, 12686, 12704, 12730, 12784, 12799, 13312, 13312,
- 19893, 19893, 19968, 19968, 40907, 40907, 40960, 42124,
- 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539,
- 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783,
- 42786, 42888, 42891, 42894, 42896, 42897, 42912, 42921,
- 43002, 43009, 43011, 43013, 43015, 43018, 43020, 43042,
- 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259,
- 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442,
- 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595,
- 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697,
- 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714,
- 43739, 43741, 43777, 43782, 43785, 43790, 43793, 43798,
- 43808, 43814, 43816, 43822, 43968, 44002, 44032, 44032,
- 55203, 55203, 55216, 55238, 55243, 55291, 63744, 64045,
- 64048, 64109, 64112, 64217, 64256, 64262, 64275, 64279,
- 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316,
- 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433,
- 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019,
- 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370,
- 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495,
- 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594,
- 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786,
- 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66334,
- 66352, 66378, 66432, 66461, 66464, 66499, 66504, 66511,
- 66513, 66517, 66560, 66717, 67584, 67589, 67592, 67592,
- 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669,
- 67840, 67861, 67872, 67897, 68096, 68096, 68112, 68115,
- 68117, 68119, 68121, 68147, 68192, 68220, 68352, 68405,
- 68416, 68437, 68448, 68466, 68608, 68680, 69635, 69687,
- 69763, 69807, 73728, 74606, 74752, 74850, 77824, 78894,
- 92160, 92728, 110592, 110593, 119808, 119892, 119894, 119964,
- 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980,
- 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069,
- 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121,
- 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144,
- 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570,
- 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686,
- 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779,
- 131072, 131072, 173782, 173782, 173824, 173824, 177972, 177972,
- 177984, 177984, 178205, 178205, 194560, 195101
-];
-
+ace.define("ace/mode/javascript/jshint",["require","exports","module"], function(require, exports, module) {
+module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({
+1:[function(_dereq_,module,exports){
var identifierStartTable = [];
for (var i = 0; i < 128; i++) {
- identifierStartTable[i] =
- i === 36 || // $
- i >= 65 && i <= 90 || // A-Z
- i === 95 || // _
- i >= 97 && i <= 122; // a-z
+ identifierStartTable[i] =
+ i === 36 || // $
+ i >= 65 && i <= 90 || // A-Z
+ i === 95 || // _
+ i >= 97 && i <= 122; // a-z
}
var identifierPartTable = [];
for (var i = 0; i < 128; i++) {
- identifierPartTable[i] =
- identifierStartTable[i] || // $, _, A-Z, a-z
- i >= 48 && i <= 57; // 0-9
+ identifierPartTable[i] =
+ identifierStartTable[i] || // $, _, A-Z, a-z
+ i >= 48 && i <= 57; // 0-9
}
-function asyncTrigger() {
- var _checks = [];
-
- return {
- push: function (fn) {
- _checks.push(fn);
- },
-
- check: function () {
- for (var check = 0; check < _checks.length; ++check) {
- _checks[check]();
- }
-
- _checks.splice(0, _checks.length);
- }
- };
-}
-function Lexer(source) {
- var lines = source;
-
- if (typeof lines === "string") {
- lines = lines
- .replace(/\r\n/g, "\n")
- .replace(/\r/g, "\n")
- .split("\n");
- }
-
- if (lines[0] && lines[0].substr(0, 2) === "#!") {
- lines[0] = "";
- }
-
- this.emitter = new events.EventEmitter();
- this.source = source;
- this.setLines(lines);
- this.prereg = true;
-
- this.line = 0;
- this.char = 1;
- this.from = 1;
- this.input = "";
-
- for (var i = 0; i < state.option.indent; i += 1) {
- state.tab += " ";
- }
-}
-
-Lexer.prototype = {
- _lines: [],
-
- getLines: function () {
- this._lines = state.lines;
- return this._lines;
- },
-
- setLines: function (val) {
- this._lines = val;
- state.lines = this._lines;
- },
- peek: function (i) {
- return this.input.charAt(i || 0);
- },
- skip: function (i) {
- i = i || 1;
- this.char += i;
- this.input = this.input.slice(i);
- },
- on: function (names, listener) {
- names.split(" ").forEach(function (name) {
- this.emitter.on(name, listener);
- }.bind(this));
- },
- trigger: function () {
- this.emitter.emit.apply(this.emitter, Array.prototype.slice.call(arguments));
- },
- triggerAsync: function (type, args, checks, fn) {
- checks.push(function () {
- if (fn()) {
- this.trigger(type, args);
- }
- }.bind(this));
- },
- scanPunctuator: function () {
- var ch1 = this.peek();
- var ch2, ch3, ch4;
-
- switch (ch1) {
- case ".":
- if ((/^[0-9]$/).test(this.peek(1))) {
- return null;
- }
- if (this.peek(1) === "." && this.peek(2) === ".") {
- return {
- type: Token.Punctuator,
- value: "..."
- };
- }
- case "(":
- case ")":
- case ";":
- case ",":
- case "{":
- case "}":
- case "[":
- case "]":
- case ":":
- case "~":
- case "?":
- return {
- type: Token.Punctuator,
- value: ch1
- };
- case "#":
- return {
- type: Token.Punctuator,
- value: ch1
- };
- case "":
- return null;
- }
-
- ch2 = this.peek(1);
- ch3 = this.peek(2);
- ch4 = this.peek(3);
-
- if (ch1 === ">" && ch2 === ">" && ch3 === ">" && ch4 === "=") {
- return {
- type: Token.Punctuator,
- value: ">>>="
- };
- }
-
- if (ch1 === "=" && ch2 === "=" && ch3 === "=") {
- return {
- type: Token.Punctuator,
- value: "==="
- };
- }
-
- if (ch1 === "!" && ch2 === "=" && ch3 === "=") {
- return {
- type: Token.Punctuator,
- value: "!=="
- };
- }
-
- if (ch1 === ">" && ch2 === ">" && ch3 === ">") {
- return {
- type: Token.Punctuator,
- value: ">>>"
- };
- }
-
- if (ch1 === "<" && ch2 === "<" && ch3 === "=") {
- return {
- type: Token.Punctuator,
- value: "<<="
- };
- }
-
- if (ch1 === ">" && ch2 === ">" && ch3 === "=") {
- return {
- type: Token.Punctuator,
- value: ">>="
- };
- }
- if (ch1 === "=" && ch2 === ">") {
- return {
- type: Token.Punctuator,
- value: ch1 + ch2
- };
- }
- if (ch1 === ch2 && ("+-<>&|".indexOf(ch1) >= 0)) {
- return {
- type: Token.Punctuator,
- value: ch1 + ch2
- };
- }
-
- if ("<>=!+-*%&|^".indexOf(ch1) >= 0) {
- if (ch2 === "=") {
- return {
- type: Token.Punctuator,
- value: ch1 + ch2
- };
- }
-
- return {
- type: Token.Punctuator,
- value: ch1
- };
- }
-
- if (ch1 === "/") {
- if (ch2 === "=" && /\/=(?!(\S*\/[gim]?))/.test(this.input)) {
- return {
- type: Token.Punctuator,
- value: "/="
- };
- }
-
- return {
- type: Token.Punctuator,
- value: "/"
- };
- }
-
- return null;
- },
- scanComments: function () {
- var ch1 = this.peek();
- var ch2 = this.peek(1);
- var rest = this.input.substr(2);
- var startLine = this.line;
- var startChar = this.char;
-
- function commentToken(label, body, opt) {
- var special = ["jshint", "jslint", "members", "member", "globals", "global", "exported"];
- var isSpecial = false;
- var value = label + body;
- var commentType = "plain";
- opt = opt || {};
-
- if (opt.isMultiline) {
- value += "*/";
- }
-
- special.forEach(function (str) {
- if (isSpecial) {
- return;
- }
- if (label === "//" && str !== "jshint") {
- return;
- }
-
- if (body.substr(0, str.length) === str) {
- isSpecial = true;
- label = label + str;
- body = body.substr(str.length);
- }
-
- if (!isSpecial && body.charAt(0) === " " && body.substr(1, str.length) === str) {
- isSpecial = true;
- label = label + " " + str;
- body = body.substr(str.length + 1);
- }
-
- if (!isSpecial) {
- return;
- }
-
- switch (str) {
- case "member":
- commentType = "members";
- break;
- case "global":
- commentType = "globals";
- break;
- default:
- commentType = str;
- }
- });
-
- return {
- type: Token.Comment,
- commentType: commentType,
- value: value,
- body: body,
- isSpecial: isSpecial,
- isMultiline: opt.isMultiline || false,
- isMalformed: opt.isMalformed || false
- };
- }
- if (ch1 === "*" && ch2 === "/") {
- this.trigger("error", {
- code: "E018",
- line: startLine,
- character: startChar
- });
-
- this.skip(2);
- return null;
- }
- if (ch1 !== "/" || (ch2 !== "*" && ch2 !== "/")) {
- return null;
- }
- if (ch2 === "/") {
- this.skip(this.input.length); // Skip to the EOL.
- return commentToken("//", rest);
- }
-
- var body = "";
- if (ch2 === "*") {
- this.skip(2);
-
- while (this.peek() !== "*" || this.peek(1) !== "/") {
- if (this.peek() === "") { // End of Line
- body += "\n";
- if (!this.nextLine()) {
- this.trigger("error", {
- code: "E017",
- line: startLine,
- character: startChar
- });
-
- return commentToken("/*", body, {
- isMultiline: true,
- isMalformed: true
- });
- }
- } else {
- body += this.peek();
- this.skip();
- }
- }
-
- this.skip(2);
- return commentToken("/*", body, { isMultiline: true });
- }
- },
- scanKeyword: function () {
- var result = /^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input);
- var keywords = [
- "if", "in", "do", "var", "for", "new",
- "try", "let", "this", "else", "case",
- "void", "with", "enum", "while", "break",
- "catch", "throw", "const", "yield", "class",
- "super", "return", "typeof", "delete",
- "switch", "export", "import", "default",
- "finally", "extends", "function", "continue",
- "debugger", "instanceof"
- ];
-
- if (result && keywords.indexOf(result[0]) >= 0) {
- return {
- type: Token.Keyword,
- value: result[0]
- };
- }
-
- return null;
- },
- scanIdentifier: function () {
- var id = "";
- var index = 0;
- var type, char;
-
- function isUnicodeLetter(code) {
- for (var i = 0; i < unicodeLetterTable.length;) {
- if (code < unicodeLetterTable[i++]) {
- return false;
- }
-
- if (code <= unicodeLetterTable[i++]) {
- return true;
- }
- }
-
- return false;
- }
-
- function isHexDigit(str) {
- return (/^[0-9a-fA-F]$/).test(str);
- }
-
- var readUnicodeEscapeSequence = function () {
- index += 1;
-
- if (this.peek(index) !== "u") {
- return null;
- }
-
- var ch1 = this.peek(index + 1);
- var ch2 = this.peek(index + 2);
- var ch3 = this.peek(index + 3);
- var ch4 = this.peek(index + 4);
- var code;
-
- if (isHexDigit(ch1) && isHexDigit(ch2) && isHexDigit(ch3) && isHexDigit(ch4)) {
- code = parseInt(ch1 + ch2 + ch3 + ch4, 16);
-
- if (isUnicodeLetter(code)) {
- index += 5;
- return "\\u" + ch1 + ch2 + ch3 + ch4;
- }
-
- return null;
- }
-
- return null;
- }.bind(this);
-
- var getIdentifierStart = function () {
- var chr = this.peek(index);
- var code = chr.charCodeAt(0);
-
- if (code === 92) {
- return readUnicodeEscapeSequence();
- }
-
- if (code < 128) {
- if (identifierStartTable[code]) {
- index += 1;
- return chr;
- }
-
- return null;
- }
-
- if (isUnicodeLetter(code)) {
- index += 1;
- return chr;
- }
-
- return null;
- }.bind(this);
-
- var getIdentifierPart = function () {
- var chr = this.peek(index);
- var code = chr.charCodeAt(0);
-
- if (code === 92) {
- return readUnicodeEscapeSequence();
- }
-
- if (code < 128) {
- if (identifierPartTable[code]) {
- index += 1;
- return chr;
- }
-
- return null;
- }
-
- if (isUnicodeLetter(code)) {
- index += 1;
- return chr;
- }
-
- return null;
- }.bind(this);
-
- char = getIdentifierStart();
- if (char === null) {
- return null;
- }
-
- id = char;
- for (;;) {
- char = getIdentifierPart();
-
- if (char === null) {
- break;
- }
-
- id += char;
- }
-
- switch (id) {
- case "true":
- case "false":
- type = Token.BooleanLiteral;
- break;
- case "null":
- type = Token.NullLiteral;
- break;
- default:
- type = Token.Identifier;
- }
-
- return {
- type: type,
- value: id
- };
- },
- scanNumericLiteral: function () {
- var index = 0;
- var value = "";
- var length = this.input.length;
- var char = this.peek(index);
- var bad;
-
- function isDecimalDigit(str) {
- return (/^[0-9]$/).test(str);
- }
-
- function isOctalDigit(str) {
- return (/^[0-7]$/).test(str);
- }
-
- function isHexDigit(str) {
- return (/^[0-9a-fA-F]$/).test(str);
- }
-
- function isIdentifierStart(ch) {
- return (ch === "$") || (ch === "_") || (ch === "\\") ||
- (ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z");
- }
-
- if (char !== "." && !isDecimalDigit(char)) {
- return null;
- }
-
- if (char !== ".") {
- value = this.peek(index);
- index += 1;
- char = this.peek(index);
-
- if (value === "0") {
- if (char === "x" || char === "X") {
- index += 1;
- value += char;
-
- while (index < length) {
- char = this.peek(index);
- if (!isHexDigit(char)) {
- break;
- }
- value += char;
- index += 1;
- }
-
- if (value.length <= 2) { // 0x
- return {
- type: Token.NumericLiteral,
- value: value,
- isMalformed: true
- };
- }
-
- if (index < length) {
- char = this.peek(index);
- if (isIdentifierStart(char)) {
- return null;
- }
- }
-
- return {
- type: Token.NumericLiteral,
- value: value,
- base: 16,
- isMalformed: false
- };
- }
- if (isOctalDigit(char)) {
- index += 1;
- value += char;
- bad = false;
-
- while (index < length) {
- char = this.peek(index);
-
- if (isDecimalDigit(char)) {
- bad = true;
- } else if (!isOctalDigit(char)) {
- break;
- }
- value += char;
- index += 1;
- }
-
- if (index < length) {
- char = this.peek(index);
- if (isIdentifierStart(char)) {
- return null;
- }
- }
-
- return {
- type: Token.NumericLiteral,
- value: value,
- base: 8,
- isMalformed: false
- };
- }
-
- if (isDecimalDigit(char)) {
- index += 1;
- value += char;
- }
- }
-
- while (index < length) {
- char = this.peek(index);
- if (!isDecimalDigit(char)) {
- break;
- }
- value += char;
- index += 1;
- }
- }
-
- if (char === ".") {
- value += char;
- index += 1;
-
- while (index < length) {
- char = this.peek(index);
- if (!isDecimalDigit(char)) {
- break;
- }
- value += char;
- index += 1;
- }
- }
-
- if (char === "e" || char === "E") {
- value += char;
- index += 1;
- char = this.peek(index);
-
- if (char === "+" || char === "-") {
- value += this.peek(index);
- index += 1;
- }
-
- char = this.peek(index);
- if (isDecimalDigit(char)) {
- value += char;
- index += 1;
-
- while (index < length) {
- char = this.peek(index);
- if (!isDecimalDigit(char)) {
- break;
- }
- value += char;
- index += 1;
- }
- } else {
- return null;
- }
- }
-
- if (index < length) {
- char = this.peek(index);
- if (isIdentifierStart(char)) {
- return null;
- }
- }
-
- return {
- type: Token.NumericLiteral,
- value: value,
- base: 10,
- isMalformed: !isFinite(value)
- };
- },
- scanStringLiteral: function (checks) {
- var quote = this.peek();
- if (quote !== "\"" && quote !== "'") {
- return null;
- }
- this.triggerAsync("warning", {
- code: "W108",
- line: this.line,
- character: this.char // +1?
- }, checks, function () { return state.jsonMode && quote !== "\""; });
-
- var value = "";
- var startLine = this.line;
- var startChar = this.char;
- var allowNewLine = false;
-
- this.skip();
-
- while (this.peek() !== quote) {
- while (this.peek() === "") { // End Of Line
-
- if (!allowNewLine) {
- this.trigger("warning", {
- code: "W112",
- line: this.line,
- character: this.char
- });
- } else {
- allowNewLine = false;
-
- this.triggerAsync("warning", {
- code: "W043",
- line: this.line,
- character: this.char
- }, checks, function () { return !state.option.multistr; });
-
- this.triggerAsync("warning", {
- code: "W042",
- line: this.line,
- character: this.char
- }, checks, function () { return state.jsonMode && state.option.multistr; });
- }
-
- if (!this.nextLine()) {
- this.trigger("error", {
- code: "E029",
- line: startLine,
- character: startChar
- });
-
- return {
- type: Token.StringLiteral,
- value: value,
- isUnclosed: true,
- quote: quote
- };
- }
- }
-
- allowNewLine = false;
- var char = this.peek();
- var jump = 1; // A length of a jump, after we're done
-
- if (char < " ") {
- this.trigger("warning", {
- code: "W113",
- line: this.line,
- character: this.char,
- data: [ "<non-printable>" ]
- });
- }
-
- if (char === "\\") {
- this.skip();
- char = this.peek();
-
- switch (char) {
- case "'":
- this.triggerAsync("warning", {
- code: "W114",
- line: this.line,
- character: this.char,
- data: [ "\\'" ]
- }, checks, function () {return state.jsonMode; });
- break;
- case "b":
- char = "\b";
- break;
- case "f":
- char = "\f";
- break;
- case "n":
- char = "\n";
- break;
- case "r":
- char = "\r";
- break;
- case "t":
- char = "\t";
- break;
- case "0":
- char = "\0";
- var n = parseInt(this.peek(1), 10);
- this.triggerAsync("warning", {
- code: "W115",
- line: this.line,
- character: this.char
- }, checks,
- function () { return n >= 0 && n <= 7 && state.directive["use strict"]; });
- break;
- case "u":
- char = String.fromCharCode(parseInt(this.input.substr(1, 4), 16));
- jump = 5;
- break;
- case "v":
- this.triggerAsync("warning", {
- code: "W114",
- line: this.line,
- character: this.char,
- data: [ "\\v" ]
- }, checks, function () { return state.jsonMode; });
-
- char = "\v";
- break;
- case "x":
- var x = parseInt(this.input.substr(1, 2), 16);
-
- this.triggerAsync("warning", {
- code: "W114",
- line: this.line,
- character: this.char,
- data: [ "\\x-" ]
- }, checks, function () { return state.jsonMode; });
-
- char = String.fromCharCode(x);
- jump = 3;
- break;
- case "\\":
- case "\"":
- case "/":
- break;
- case "":
- allowNewLine = true;
- char = "";
- break;
- case "!":
- if (value.slice(value.length - 2) === "<") {
- break;
- }
- default:
- this.trigger("warning", {
- code: "W044",
- line: this.line,
- character: this.char
- });
- }
- }
-
- value += char;
- this.skip(jump);
- }
-
- this.skip();
- return {
- type: Token.StringLiteral,
- value: value,
- isUnclosed: false,
- quote: quote
- };
- },
- scanRegExp: function () {
- var index = 0;
- var length = this.input.length;
- var char = this.peek();
- var value = char;
- var body = "";
- var flags = [];
- var malformed = false;
- var isCharSet = false;
- var terminated;
-
- var scanUnexpectedChars = function () {
- if (char < " ") {
- malformed = true;
- this.trigger("warning", {
- code: "W048",
- line: this.line,
- character: this.char
- });
- }
- if (char === "<") {
- malformed = true;
- this.trigger("warning", {
- code: "W049",
- line: this.line,
- character: this.char,
- data: [ char ]
- });
- }
- }.bind(this);
- if (!this.prereg || char !== "/") {
- return null;
- }
-
- index += 1;
- terminated = false;
-
- while (index < length) {
- char = this.peek(index);
- value += char;
- body += char;
-
- if (isCharSet) {
- if (char === "]") {
- if (this.peek(index - 1) !== "\\" || this.peek(index - 2) === "\\") {
- isCharSet = false;
- }
- }
-
- if (char === "\\") {
- index += 1;
- char = this.peek(index);
- body += char;
- value += char;
-
- scanUnexpectedChars();
- }
-
- index += 1;
- continue;
- }
-
- if (char === "\\") {
- index += 1;
- char = this.peek(index);
- body += char;
- value += char;
-
- scanUnexpectedChars();
-
- if (char === "/") {
- index += 1;
- continue;
- }
-
- if (char === "[") {
- index += 1;
- continue;
- }
- }
-
- if (char === "[") {
- isCharSet = true;
- index += 1;
- continue;
- }
-
- if (char === "/") {
- body = body.substr(0, body.length - 1);
- terminated = true;
- index += 1;
- break;
- }
-
- index += 1;
- }
-
- if (!terminated) {
- this.trigger("error", {
- code: "E015",
- line: this.line,
- character: this.from
- });
-
- return void this.trigger("fatal", {
- line: this.line,
- from: this.from
- });
- }
-
- while (index < length) {
- char = this.peek(index);
- if (!/[gim]/.test(char)) {
- break;
- }
- flags.push(char);
- value += char;
- index += 1;
- }
-
- try {
- new RegExp(body, flags.join(""));
- } catch (err) {
- malformed = true;
- this.trigger("error", {
- code: "E016",
- line: this.line,
- character: this.char,
- data: [ err.message ] // Platform dependent!
- });
- }
-
- return {
- type: Token.RegExp,
- value: value,
- flags: flags,
- isMalformed: malformed
- };
- },
- scanMixedSpacesAndTabs: function () {
- var at, match;
-
- if (state.option.smarttabs) {
- match = this.input.match(/(\/\/|^\s?\*)? \t/);
- at = match && !match[1] ? 0 : -1;
- } else {
- at = this.input.search(/ \t|\t [^\*]/);
- }
-
- return at;
- },
- scanUnsafeChars: function () {
- return this.input.search(reg.unsafeChars);
- },
- next: function (checks) {
- this.from = this.char;
- var start;
- if (/\s/.test(this.peek())) {
- start = this.char;
-
- while (/\s/.test(this.peek())) {
- this.from += 1;
- this.skip();
- }
-
- if (this.peek() === "") { // EOL
- if (!/^\s*$/.test(this.getLines()[this.line - 1]) && state.option.trailing) {
- this.trigger("warning", { code: "W102", line: this.line, character: start });
- }
- }
- }
-
- var match = this.scanComments() ||
- this.scanStringLiteral(checks);
-
- if (match) {
- return match;
- }
-
- match =
- this.scanRegExp() ||
- this.scanPunctuator() ||
- this.scanKeyword() ||
- this.scanIdentifier() ||
- this.scanNumericLiteral();
-
- if (match) {
- this.skip(match.value.length);
- return match;
- }
-
- return null;
- },
- nextLine: function () {
- var char;
-
- if (this.line >= this.getLines().length) {
- return false;
- }
-
- this.input = this.getLines()[this.line];
- this.line += 1;
- this.char = 1;
- this.from = 1;
-
- char = this.scanMixedSpacesAndTabs();
- if (char >= 0) {
- this.trigger("warning", { code: "W099", line: this.line, character: char + 1 });
- }
-
- this.input = this.input.replace(/\t/g, state.tab);
- char = this.scanUnsafeChars();
-
- if (char >= 0) {
- this.trigger("warning", { code: "W100", line: this.line, character: char });
- }
-
- if (state.option.maxlen && state.option.maxlen < this.input.length) {
- this.trigger("warning", { code: "W101", line: this.line, character: this.input.length });
- }
-
- return true;
- },
- start: function () {
- this.nextLine();
- },
- token: function () {
- var checks = asyncTrigger();
- var token;
-
-
- function isReserved(token, isProperty) {
- if (!token.reserved) {
- return false;
- }
-
- if (token.meta && token.meta.isFutureReservedWord) {
- if (state.option.inES5(true) && !token.meta.es5) {
- return false;
- }
- if (token.meta.strictOnly) {
- if (!state.option.strict && !state.directive["use strict"]) {
- return false;
- }
- }
-
- if (isProperty) {
- return false;
- }
- }
-
- return true;
- }
- var create = function (type, value, isProperty) {
- var obj;
-
- if (type !== "(endline)" && type !== "(end)") {
- this.prereg = false;
- }
-
- if (type === "(punctuator)") {
- switch (value) {
- case ".":
- case ")":
- case "~":
- case "#":
- case "]":
- this.prereg = false;
- break;
- default:
- this.prereg = true;
- }
-
- obj = Object.create(state.syntax[value] || state.syntax["(error)"]);
- }
-
- if (type === "(identifier)") {
- if (value === "return" || value === "case" || value === "typeof") {
- this.prereg = true;
- }
-
- if (_.has(state.syntax, value)) {
- obj = Object.create(state.syntax[value] || state.syntax["(error)"]);
- if (!isReserved(obj, isProperty && type === "(identifier)")) {
- obj = null;
- }
- }
- }
-
- if (!obj) {
- obj = Object.create(state.syntax[type]);
- }
-
- obj.identifier = (type === "(identifier)");
- obj.type = obj.type || type;
- obj.value = value;
- obj.line = this.line;
- obj.character = this.char;
- obj.from = this.from;
-
- if (isProperty && obj.identifier) {
- obj.isProperty = isProperty;
- }
-
- obj.check = checks.check;
-
- return obj;
- }.bind(this);
-
- for (;;) {
- if (!this.input.length) {
- return create(this.nextLine() ? "(endline)" : "(end)", "");
- }
-
- token = this.next(checks);
-
- if (!token) {
- if (this.input.length) {
- this.trigger("error", {
- code: "E024",
- line: this.line,
- character: this.char,
- data: [ this.peek() ]
- });
-
- this.input = "";
- }
-
- continue;
- }
-
- switch (token.type) {
- case Token.StringLiteral:
- this.triggerAsync("String", {
- line: this.line,
- char: this.char,
- from: this.from,
- value: token.value,
- quote: token.quote
- }, checks, function () { return true; });
-
- return create("(string)", token.value);
- case Token.Identifier:
- this.trigger("Identifier", {
- line: this.line,
- char: this.char,
- from: this.form,
- name: token.value,
- isProperty: state.tokens.curr.id === "."
- });
- case Token.Keyword:
- case Token.NullLiteral:
- case Token.BooleanLiteral:
- return create("(identifier)", token.value, state.tokens.curr.id === ".");
-
- case Token.NumericLiteral:
- if (token.isMalformed) {
- this.trigger("warning", {
- code: "W045",
- line: this.line,
- character: this.char,
- data: [ token.value ]
- });
- }
-
- this.triggerAsync("warning", {
- code: "W114",
- line: this.line,
- character: this.char,
- data: [ "0x-" ]
- }, checks, function () { return token.base === 16 && state.jsonMode; });
-
- this.triggerAsync("warning", {
- code: "W115",
- line: this.line,
- character: this.char
- }, checks, function () {
- return state.directive["use strict"] && token.base === 8;
- });
-
- this.trigger("Number", {
- line: this.line,
- char: this.char,
- from: this.from,
- value: token.value,
- base: token.base,
- isMalformed: token.malformed
- });
-
- return create("(number)", token.value);
-
- case Token.RegExp:
- return create("(regexp)", token.value);
-
- case Token.Comment:
- state.tokens.curr.comment = true;
-
- if (token.isSpecial) {
- return {
- value: token.value,
- body: token.body,
- type: token.commentType,
- isSpecial: token.isSpecial,
- line: this.line,
- character: this.char,
- from: this.from
- };
- }
-
- break;
-
- case "":
- break;
-
- default:
- return create("(punctuator)", token.value);
- }
- }
- }
+module.exports = {
+ asciiIdentifierStartTable: identifierStartTable,
+ asciiIdentifierPartTable: identifierPartTable
};
-exports.Lexer = Lexer;
-
-})()
},
-{"events":2,"./reg.js":4,"./state.js":5,"underscore":12}],
-12:[function(req,module,exports){
-(function(){// Underscore.js 1.4.4
+{}],
+2:[function(_dereq_,module,exports){
(function() {
var root = this;
var previousUnderscore = root._;
- var breaker = {};
var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
- var push = ArrayProto.push,
- slice = ArrayProto.slice,
- concat = ArrayProto.concat,
- toString = ObjProto.toString,
- hasOwnProperty = ObjProto.hasOwnProperty;
var
- nativeForEach = ArrayProto.forEach,
- nativeMap = ArrayProto.map,
- nativeReduce = ArrayProto.reduce,
- nativeReduceRight = ArrayProto.reduceRight,
- nativeFilter = ArrayProto.filter,
- nativeEvery = ArrayProto.every,
- nativeSome = ArrayProto.some,
- nativeIndexOf = ArrayProto.indexOf,
- nativeLastIndexOf = ArrayProto.lastIndexOf,
+ push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
+ var
nativeIsArray = Array.isArray,
nativeKeys = Object.keys,
- nativeBind = FuncProto.bind;
+ nativeBind = FuncProto.bind,
+ nativeCreate = Object.create;
+ var Ctor = function(){};
var _ = function(obj) {
if (obj instanceof _) return obj;
if (!(this instanceof _)) return new _(obj);
@@ -9142,194 +1390,246 @@ exports.Lexer = Lexer;
} else {
root._ = _;
}
- _.VERSION = '1.4.4';
- var each = _.each = _.forEach = function(obj, iterator, context) {
- if (obj == null) return;
- if (nativeForEach && obj.forEach === nativeForEach) {
- obj.forEach(iterator, context);
- } else if (obj.length === +obj.length) {
- for (var i = 0, l = obj.length; i < l; i++) {
- if (iterator.call(context, obj[i], i, obj) === breaker) return;
+ _.VERSION = '1.8.2';
+ var optimizeCb = function(func, context, argCount) {
+ if (context === void 0) return func;
+ switch (argCount == null ? 3 : argCount) {
+ case 1: return function(value) {
+ return func.call(context, value);
+ };
+ case 2: return function(value, other) {
+ return func.call(context, value, other);
+ };
+ case 3: return function(value, index, collection) {
+ return func.call(context, value, index, collection);
+ };
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(context, accumulator, value, index, collection);
+ };
+ }
+ return function() {
+ return func.apply(context, arguments);
+ };
+ };
+ var cb = function(value, context, argCount) {
+ if (value == null) return _.identity;
+ if (_.isFunction(value)) return optimizeCb(value, context, argCount);
+ if (_.isObject(value)) return _.matcher(value);
+ return _.property(value);
+ };
+ _.iteratee = function(value, context) {
+ return cb(value, context, Infinity);
+ };
+ var createAssigner = function(keysFunc, undefinedOnly) {
+ return function(obj) {
+ var length = arguments.length;
+ if (length < 2 || obj == null) return obj;
+ for (var index = 1; index < length; index++) {
+ var source = arguments[index],
+ keys = keysFunc(source),
+ l = keys.length;
+ for (var i = 0; i < l; i++) {
+ var key = keys[i];
+ if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];
+ }
+ }
+ return obj;
+ };
+ };
+ var baseCreate = function(prototype) {
+ if (!_.isObject(prototype)) return {};
+ if (nativeCreate) return nativeCreate(prototype);
+ Ctor.prototype = prototype;
+ var result = new Ctor;
+ Ctor.prototype = null;
+ return result;
+ };
+ var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
+ var isArrayLike = function(collection) {
+ var length = collection && collection.length;
+ return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
+ };
+ _.each = _.forEach = function(obj, iteratee, context) {
+ iteratee = optimizeCb(iteratee, context);
+ var i, length;
+ if (isArrayLike(obj)) {
+ for (i = 0, length = obj.length; i < length; i++) {
+ iteratee(obj[i], i, obj);
}
} else {
- for (var key in obj) {
- if (_.has(obj, key)) {
- if (iterator.call(context, obj[key], key, obj) === breaker) return;
- }
+ var keys = _.keys(obj);
+ for (i = 0, length = keys.length; i < length; i++) {
+ iteratee(obj[keys[i]], keys[i], obj);
}
}
+ return obj;
};
- _.map = _.collect = function(obj, iterator, context) {
- var results = [];
- if (obj == null) return results;
- if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
- each(obj, function(value, index, list) {
- results[results.length] = iterator.call(context, value, index, list);
- });
+ _.map = _.collect = function(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var keys = !isArrayLike(obj) && _.keys(obj),
+ length = (keys || obj).length,
+ results = Array(length);
+ for (var index = 0; index < length; index++) {
+ var currentKey = keys ? keys[index] : index;
+ results[index] = iteratee(obj[currentKey], currentKey, obj);
+ }
return results;
};
-
- var reduceError = 'Reduce of empty array with no initial value';
- _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
- var initial = arguments.length > 2;
- if (obj == null) obj = [];
- if (nativeReduce && obj.reduce === nativeReduce) {
- if (context) iterator = _.bind(iterator, context);
- return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
- }
- each(obj, function(value, index, list) {
- if (!initial) {
- memo = value;
- initial = true;
- } else {
- memo = iterator.call(context, memo, value, index, list);
+ function createReduce(dir) {
+ function iterator(obj, iteratee, memo, keys, index, length) {
+ for (; index >= 0 && index < length; index += dir) {
+ var currentKey = keys ? keys[index] : index;
+ memo = iteratee(memo, obj[currentKey], currentKey, obj);
}
- });
- if (!initial) throw new TypeError(reduceError);
- return memo;
- };
- _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
- var initial = arguments.length > 2;
- if (obj == null) obj = [];
- if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
- if (context) iterator = _.bind(iterator, context);
- return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
- }
- var length = obj.length;
- if (length !== +length) {
- var keys = _.keys(obj);
- length = keys.length;
+ return memo;
}
- each(obj, function(value, index, list) {
- index = keys ? keys[--length] : --length;
- if (!initial) {
- memo = obj[index];
- initial = true;
- } else {
- memo = iterator.call(context, memo, obj[index], index, list);
- }
- });
- if (!initial) throw new TypeError(reduceError);
- return memo;
- };
- _.find = _.detect = function(obj, iterator, context) {
- var result;
- any(obj, function(value, index, list) {
- if (iterator.call(context, value, index, list)) {
- result = value;
- return true;
+
+ return function(obj, iteratee, memo, context) {
+ iteratee = optimizeCb(iteratee, context, 4);
+ var keys = !isArrayLike(obj) && _.keys(obj),
+ length = (keys || obj).length,
+ index = dir > 0 ? 0 : length - 1;
+ if (arguments.length < 3) {
+ memo = obj[keys ? keys[index] : index];
+ index += dir;
}
- });
- return result;
+ return iterator(obj, iteratee, memo, keys, index, length);
+ };
+ }
+ _.reduce = _.foldl = _.inject = createReduce(1);
+ _.reduceRight = _.foldr = createReduce(-1);
+ _.find = _.detect = function(obj, predicate, context) {
+ var key;
+ if (isArrayLike(obj)) {
+ key = _.findIndex(obj, predicate, context);
+ } else {
+ key = _.findKey(obj, predicate, context);
+ }
+ if (key !== void 0 && key !== -1) return obj[key];
};
- _.filter = _.select = function(obj, iterator, context) {
+ _.filter = _.select = function(obj, predicate, context) {
var results = [];
- if (obj == null) return results;
- if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
- each(obj, function(value, index, list) {
- if (iterator.call(context, value, index, list)) results[results.length] = value;
+ predicate = cb(predicate, context);
+ _.each(obj, function(value, index, list) {
+ if (predicate(value, index, list)) results.push(value);
});
return results;
};
- _.reject = function(obj, iterator, context) {
- return _.filter(obj, function(value, index, list) {
- return !iterator.call(context, value, index, list);
- }, context);
+ _.reject = function(obj, predicate, context) {
+ return _.filter(obj, _.negate(cb(predicate)), context);
};
- _.every = _.all = function(obj, iterator, context) {
- iterator || (iterator = _.identity);
- var result = true;
- if (obj == null) return result;
- if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
- each(obj, function(value, index, list) {
- if (!(result = result && iterator.call(context, value, index, list))) return breaker;
- });
- return !!result;
+ _.every = _.all = function(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var keys = !isArrayLike(obj) && _.keys(obj),
+ length = (keys || obj).length;
+ for (var index = 0; index < length; index++) {
+ var currentKey = keys ? keys[index] : index;
+ if (!predicate(obj[currentKey], currentKey, obj)) return false;
+ }
+ return true;
};
- var any = _.some = _.any = function(obj, iterator, context) {
- iterator || (iterator = _.identity);
- var result = false;
- if (obj == null) return result;
- if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
- each(obj, function(value, index, list) {
- if (result || (result = iterator.call(context, value, index, list))) return breaker;
- });
- return !!result;
+ _.some = _.any = function(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var keys = !isArrayLike(obj) && _.keys(obj),
+ length = (keys || obj).length;
+ for (var index = 0; index < length; index++) {
+ var currentKey = keys ? keys[index] : index;
+ if (predicate(obj[currentKey], currentKey, obj)) return true;
+ }
+ return false;
};
- _.contains = _.include = function(obj, target) {
- if (obj == null) return false;
- if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
- return any(obj, function(value) {
- return value === target;
- });
+ _.contains = _.includes = _.include = function(obj, target, fromIndex) {
+ if (!isArrayLike(obj)) obj = _.values(obj);
+ return _.indexOf(obj, target, typeof fromIndex == 'number' && fromIndex) >= 0;
};
_.invoke = function(obj, method) {
var args = slice.call(arguments, 2);
var isFunc = _.isFunction(method);
return _.map(obj, function(value) {
- return (isFunc ? method : value[method]).apply(value, args);
+ var func = isFunc ? method : value[method];
+ return func == null ? func : func.apply(value, args);
});
};
_.pluck = function(obj, key) {
- return _.map(obj, function(value){ return value[key]; });
+ return _.map(obj, _.property(key));
};
- _.where = function(obj, attrs, first) {
- if (_.isEmpty(attrs)) return first ? null : [];
- return _[first ? 'find' : 'filter'](obj, function(value) {
- for (var key in attrs) {
- if (attrs[key] !== value[key]) return false;
- }
- return true;
- });
+ _.where = function(obj, attrs) {
+ return _.filter(obj, _.matcher(attrs));
};
_.findWhere = function(obj, attrs) {
- return _.where(obj, attrs, true);
+ return _.find(obj, _.matcher(attrs));
};
- _.max = function(obj, iterator, context) {
- if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
- return Math.max.apply(Math, obj);
- }
- if (!iterator && _.isEmpty(obj)) return -Infinity;
- var result = {computed : -Infinity, value: -Infinity};
- each(obj, function(value, index, list) {
- var computed = iterator ? iterator.call(context, value, index, list) : value;
- computed >= result.computed && (result = {value : value, computed : computed});
- });
- return result.value;
+ _.max = function(obj, iteratee, context) {
+ var result = -Infinity, lastComputed = -Infinity,
+ value, computed;
+ if (iteratee == null && obj != null) {
+ obj = isArrayLike(obj) ? obj : _.values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value > result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = cb(iteratee, context);
+ _.each(obj, function(value, index, list) {
+ computed = iteratee(value, index, list);
+ if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
+ result = value;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
};
- _.min = function(obj, iterator, context) {
- if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
- return Math.min.apply(Math, obj);
- }
- if (!iterator && _.isEmpty(obj)) return Infinity;
- var result = {computed : Infinity, value: Infinity};
- each(obj, function(value, index, list) {
- var computed = iterator ? iterator.call(context, value, index, list) : value;
- computed < result.computed && (result = {value : value, computed : computed});
- });
- return result.value;
+ _.min = function(obj, iteratee, context) {
+ var result = Infinity, lastComputed = Infinity,
+ value, computed;
+ if (iteratee == null && obj != null) {
+ obj = isArrayLike(obj) ? obj : _.values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value < result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = cb(iteratee, context);
+ _.each(obj, function(value, index, list) {
+ computed = iteratee(value, index, list);
+ if (computed < lastComputed || computed === Infinity && result === Infinity) {
+ result = value;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
};
_.shuffle = function(obj) {
- var rand;
- var index = 0;
- var shuffled = [];
- each(obj, function(value) {
- rand = _.random(index++);
- shuffled[index - 1] = shuffled[rand];
- shuffled[rand] = value;
- });
+ var set = isArrayLike(obj) ? obj : _.values(obj);
+ var length = set.length;
+ var shuffled = Array(length);
+ for (var index = 0, rand; index < length; index++) {
+ rand = _.random(0, index);
+ if (rand !== index) shuffled[index] = shuffled[rand];
+ shuffled[rand] = set[index];
+ }
return shuffled;
};
- var lookupIterator = function(value) {
- return _.isFunction(value) ? value : function(obj){ return obj[value]; };
+ _.sample = function(obj, n, guard) {
+ if (n == null || guard) {
+ if (!isArrayLike(obj)) obj = _.values(obj);
+ return obj[_.random(obj.length - 1)];
+ }
+ return _.shuffle(obj).slice(0, Math.max(0, n));
};
- _.sortBy = function(obj, value, context) {
- var iterator = lookupIterator(value);
+ _.sortBy = function(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
return _.pluck(_.map(obj, function(value, index, list) {
return {
- value : value,
- index : index,
- criteria : iterator.call(context, value, index, list)
+ value: value,
+ index: index,
+ criteria: iteratee(value, index, list)
};
}).sort(function(left, right) {
var a = left.criteria;
@@ -9338,131 +1638,154 @@ exports.Lexer = Lexer;
if (a > b || a === void 0) return 1;
if (a < b || b === void 0) return -1;
}
- return left.index < right.index ? -1 : 1;
+ return left.index - right.index;
}), 'value');
};
- var group = function(obj, value, context, behavior) {
- var result = {};
- var iterator = lookupIterator(value || _.identity);
- each(obj, function(value, index) {
- var key = iterator.call(context, value, index, obj);
- behavior(result, key, value);
- });
- return result;
- };
- _.groupBy = function(obj, value, context) {
- return group(obj, value, context, function(result, key, value) {
- (_.has(result, key) ? result[key] : (result[key] = [])).push(value);
- });
- };
- _.countBy = function(obj, value, context) {
- return group(obj, value, context, function(result, key) {
- if (!_.has(result, key)) result[key] = 0;
- result[key]++;
- });
- };
- _.sortedIndex = function(array, obj, iterator, context) {
- iterator = iterator == null ? _.identity : lookupIterator(iterator);
- var value = iterator.call(context, obj);
- var low = 0, high = array.length;
- while (low < high) {
- var mid = (low + high) >>> 1;
- iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;
- }
- return low;
+ var group = function(behavior) {
+ return function(obj, iteratee, context) {
+ var result = {};
+ iteratee = cb(iteratee, context);
+ _.each(obj, function(value, index) {
+ var key = iteratee(value, index, obj);
+ behavior(result, value, key);
+ });
+ return result;
+ };
};
+ _.groupBy = group(function(result, value, key) {
+ if (_.has(result, key)) result[key].push(value); else result[key] = [value];
+ });
+ _.indexBy = group(function(result, value, key) {
+ result[key] = value;
+ });
+ _.countBy = group(function(result, value, key) {
+ if (_.has(result, key)) result[key]++; else result[key] = 1;
+ });
_.toArray = function(obj) {
if (!obj) return [];
if (_.isArray(obj)) return slice.call(obj);
- if (obj.length === +obj.length) return _.map(obj, _.identity);
+ if (isArrayLike(obj)) return _.map(obj, _.identity);
return _.values(obj);
};
_.size = function(obj) {
if (obj == null) return 0;
- return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;
+ return isArrayLike(obj) ? obj.length : _.keys(obj).length;
+ };
+ _.partition = function(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var pass = [], fail = [];
+ _.each(obj, function(value, key, obj) {
+ (predicate(value, key, obj) ? pass : fail).push(value);
+ });
+ return [pass, fail];
};
_.first = _.head = _.take = function(array, n, guard) {
if (array == null) return void 0;
- return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
+ if (n == null || guard) return array[0];
+ return _.initial(array, array.length - n);
};
_.initial = function(array, n, guard) {
- return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
+ return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
};
_.last = function(array, n, guard) {
if (array == null) return void 0;
- if ((n != null) && !guard) {
- return slice.call(array, Math.max(array.length - n, 0));
- } else {
- return array[array.length - 1];
- }
+ if (n == null || guard) return array[array.length - 1];
+ return _.rest(array, Math.max(0, array.length - n));
};
_.rest = _.tail = _.drop = function(array, n, guard) {
- return slice.call(array, (n == null) || guard ? 1 : n);
+ return slice.call(array, n == null || guard ? 1 : n);
};
_.compact = function(array) {
return _.filter(array, _.identity);
};
- var flatten = function(input, shallow, output) {
- each(input, function(value) {
- if (_.isArray(value)) {
- shallow ? push.apply(output, value) : flatten(value, shallow, output);
- } else {
- output.push(value);
+ var flatten = function(input, shallow, strict, startIndex) {
+ var output = [], idx = 0;
+ for (var i = startIndex || 0, length = input && input.length; i < length; i++) {
+ var value = input[i];
+ if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {
+ if (!shallow) value = flatten(value, shallow, strict);
+ var j = 0, len = value.length;
+ output.length += len;
+ while (j < len) {
+ output[idx++] = value[j++];
+ }
+ } else if (!strict) {
+ output[idx++] = value;
}
- });
+ }
return output;
};
_.flatten = function(array, shallow) {
- return flatten(array, shallow, []);
+ return flatten(array, shallow, false);
};
_.without = function(array) {
return _.difference(array, slice.call(arguments, 1));
};
- _.uniq = _.unique = function(array, isSorted, iterator, context) {
- if (_.isFunction(isSorted)) {
- context = iterator;
- iterator = isSorted;
+ _.uniq = _.unique = function(array, isSorted, iteratee, context) {
+ if (array == null) return [];
+ if (!_.isBoolean(isSorted)) {
+ context = iteratee;
+ iteratee = isSorted;
isSorted = false;
}
- var initial = iterator ? _.map(array, iterator, context) : array;
- var results = [];
+ if (iteratee != null) iteratee = cb(iteratee, context);
+ var result = [];
var seen = [];
- each(initial, function(value, index) {
- if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {
- seen.push(value);
- results.push(array[index]);
+ for (var i = 0, length = array.length; i < length; i++) {
+ var value = array[i],
+ computed = iteratee ? iteratee(value, i, array) : value;
+ if (isSorted) {
+ if (!i || seen !== computed) result.push(value);
+ seen = computed;
+ } else if (iteratee) {
+ if (!_.contains(seen, computed)) {
+ seen.push(computed);
+ result.push(value);
+ }
+ } else if (!_.contains(result, value)) {
+ result.push(value);
}
- });
- return results;
+ }
+ return result;
};
_.union = function() {
- return _.uniq(concat.apply(ArrayProto, arguments));
+ return _.uniq(flatten(arguments, true, true));
};
_.intersection = function(array) {
- var rest = slice.call(arguments, 1);
- return _.filter(_.uniq(array), function(item) {
- return _.every(rest, function(other) {
- return _.indexOf(other, item) >= 0;
- });
- });
+ if (array == null) return [];
+ var result = [];
+ var argsLength = arguments.length;
+ for (var i = 0, length = array.length; i < length; i++) {
+ var item = array[i];
+ if (_.contains(result, item)) continue;
+ for (var j = 1; j < argsLength; j++) {
+ if (!_.contains(arguments[j], item)) break;
+ }
+ if (j === argsLength) result.push(item);
+ }
+ return result;
};
_.difference = function(array) {
- var rest = concat.apply(ArrayProto, slice.call(arguments, 1));
- return _.filter(array, function(value){ return !_.contains(rest, value); });
+ var rest = flatten(arguments, true, true, 1);
+ return _.filter(array, function(value){
+ return !_.contains(rest, value);
+ });
};
_.zip = function() {
- var args = slice.call(arguments);
- var length = _.max(_.pluck(args, 'length'));
- var results = new Array(length);
- for (var i = 0; i < length; i++) {
- results[i] = _.pluck(args, "" + i);
+ return _.unzip(arguments);
+ };
+ _.unzip = function(array) {
+ var length = array && _.max(array, 'length').length || 0;
+ var result = Array(length);
+
+ for (var index = 0; index < length; index++) {
+ result[index] = _.pluck(array, index);
}
- return results;
+ return result;
};
_.object = function(list, values) {
- if (list == null) return {};
var result = {};
- for (var i = 0, l = list.length; i < l; i++) {
+ for (var i = 0, length = list && list.length; i < length; i++) {
if (values) {
result[list[i]] = values[i];
} else {
@@ -9472,175 +1795,293 @@ exports.Lexer = Lexer;
return result;
};
_.indexOf = function(array, item, isSorted) {
- if (array == null) return -1;
- var i = 0, l = array.length;
- if (isSorted) {
- if (typeof isSorted == 'number') {
- i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted);
- } else {
- i = _.sortedIndex(array, item);
- return array[i] === item ? i : -1;
- }
+ var i = 0, length = array && array.length;
+ if (typeof isSorted == 'number') {
+ i = isSorted < 0 ? Math.max(0, length + isSorted) : isSorted;
+ } else if (isSorted && length) {
+ i = _.sortedIndex(array, item);
+ return array[i] === item ? i : -1;
}
- if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);
- for (; i < l; i++) if (array[i] === item) return i;
+ if (item !== item) {
+ return _.findIndex(slice.call(array, i), _.isNaN);
+ }
+ for (; i < length; i++) if (array[i] === item) return i;
return -1;
};
+
_.lastIndexOf = function(array, item, from) {
- if (array == null) return -1;
- var hasIndex = from != null;
- if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {
- return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);
+ var idx = array ? array.length : 0;
+ if (typeof from == 'number') {
+ idx = from < 0 ? idx + from + 1 : Math.min(idx, from + 1);
}
- var i = (hasIndex ? from : array.length);
- while (i--) if (array[i] === item) return i;
+ if (item !== item) {
+ return _.findLastIndex(slice.call(array, 0, idx), _.isNaN);
+ }
+ while (--idx >= 0) if (array[idx] === item) return idx;
return -1;
};
+ function createIndexFinder(dir) {
+ return function(array, predicate, context) {
+ predicate = cb(predicate, context);
+ var length = array != null && array.length;
+ var index = dir > 0 ? 0 : length - 1;
+ for (; index >= 0 && index < length; index += dir) {
+ if (predicate(array[index], index, array)) return index;
+ }
+ return -1;
+ };
+ }
+ _.findIndex = createIndexFinder(1);
+
+ _.findLastIndex = createIndexFinder(-1);
+ _.sortedIndex = function(array, obj, iteratee, context) {
+ iteratee = cb(iteratee, context, 1);
+ var value = iteratee(obj);
+ var low = 0, high = array.length;
+ while (low < high) {
+ var mid = Math.floor((low + high) / 2);
+ if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
+ }
+ return low;
+ };
_.range = function(start, stop, step) {
if (arguments.length <= 1) {
stop = start || 0;
start = 0;
}
- step = arguments[2] || 1;
+ step = step || 1;
- var len = Math.max(Math.ceil((stop - start) / step), 0);
- var idx = 0;
- var range = new Array(len);
+ var length = Math.max(Math.ceil((stop - start) / step), 0);
+ var range = Array(length);
- while(idx < len) {
- range[idx++] = start;
- start += step;
+ for (var idx = 0; idx < length; idx++, start += step) {
+ range[idx] = start;
}
return range;
};
+ var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {
+ if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
+ var self = baseCreate(sourceFunc.prototype);
+ var result = sourceFunc.apply(self, args);
+ if (_.isObject(result)) return result;
+ return self;
+ };
_.bind = function(func, context) {
- if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
+ if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
+ if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');
var args = slice.call(arguments, 2);
- return function() {
- return func.apply(context, args.concat(slice.call(arguments)));
+ var bound = function() {
+ return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));
};
+ return bound;
};
_.partial = function(func) {
- var args = slice.call(arguments, 1);
- return function() {
- return func.apply(this, args.concat(slice.call(arguments)));
+ var boundArgs = slice.call(arguments, 1);
+ var bound = function() {
+ var position = 0, length = boundArgs.length;
+ var args = Array(length);
+ for (var i = 0; i < length; i++) {
+ args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];
+ }
+ while (position < arguments.length) args.push(arguments[position++]);
+ return executeBound(func, bound, this, this, args);
};
+ return bound;
};
_.bindAll = function(obj) {
- var funcs = slice.call(arguments, 1);
- if (funcs.length === 0) funcs = _.functions(obj);
- each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
+ var i, length = arguments.length, key;
+ if (length <= 1) throw new Error('bindAll must be passed function names');
+ for (i = 1; i < length; i++) {
+ key = arguments[i];
+ obj[key] = _.bind(obj[key], obj);
+ }
return obj;
};
_.memoize = function(func, hasher) {
- var memo = {};
- hasher || (hasher = _.identity);
- return function() {
- var key = hasher.apply(this, arguments);
- return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
- };
+ var memoize = function(key) {
+ var cache = memoize.cache;
+ var address = '' + (hasher ? hasher.apply(this, arguments) : key);
+ if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);
+ return cache[address];
+ };
+ memoize.cache = {};
+ return memoize;
};
_.delay = function(func, wait) {
var args = slice.call(arguments, 2);
- return setTimeout(function(){ return func.apply(null, args); }, wait);
- };
- _.defer = function(func) {
- return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
+ return setTimeout(function(){
+ return func.apply(null, args);
+ }, wait);
};
- _.throttle = function(func, wait) {
- var context, args, timeout, result;
+ _.defer = _.partial(_.delay, _, 1);
+ _.throttle = function(func, wait, options) {
+ var context, args, result;
+ var timeout = null;
var previous = 0;
+ if (!options) options = {};
var later = function() {
- previous = new Date;
+ previous = options.leading === false ? 0 : _.now();
timeout = null;
result = func.apply(context, args);
+ if (!timeout) context = args = null;
};
return function() {
- var now = new Date;
+ var now = _.now();
+ if (!previous && options.leading === false) previous = now;
var remaining = wait - (now - previous);
context = this;
args = arguments;
- if (remaining <= 0) {
- clearTimeout(timeout);
- timeout = null;
+ if (remaining <= 0 || remaining > wait) {
+ if (timeout) {
+ clearTimeout(timeout);
+ timeout = null;
+ }
previous = now;
result = func.apply(context, args);
- } else if (!timeout) {
+ if (!timeout) context = args = null;
+ } else if (!timeout && options.trailing !== false) {
timeout = setTimeout(later, remaining);
}
return result;
};
};
_.debounce = function(func, wait, immediate) {
- var timeout, result;
- return function() {
- var context = this, args = arguments;
- var later = function() {
+ var timeout, args, context, timestamp, result;
+
+ var later = function() {
+ var last = _.now() - timestamp;
+
+ if (last < wait && last >= 0) {
+ timeout = setTimeout(later, wait - last);
+ } else {
timeout = null;
- if (!immediate) result = func.apply(context, args);
- };
- var callNow = immediate && !timeout;
- clearTimeout(timeout);
- timeout = setTimeout(later, wait);
- if (callNow) result = func.apply(context, args);
- return result;
+ if (!immediate) {
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ }
+ }
};
- };
- _.once = function(func) {
- var ran = false, memo;
+
return function() {
- if (ran) return memo;
- ran = true;
- memo = func.apply(this, arguments);
- func = null;
- return memo;
+ context = this;
+ args = arguments;
+ timestamp = _.now();
+ var callNow = immediate && !timeout;
+ if (!timeout) timeout = setTimeout(later, wait);
+ if (callNow) {
+ result = func.apply(context, args);
+ context = args = null;
+ }
+
+ return result;
};
};
_.wrap = function(func, wrapper) {
+ return _.partial(wrapper, func);
+ };
+ _.negate = function(predicate) {
return function() {
- var args = [func];
- push.apply(args, arguments);
- return wrapper.apply(this, args);
+ return !predicate.apply(this, arguments);
};
};
_.compose = function() {
- var funcs = arguments;
+ var args = arguments;
+ var start = args.length - 1;
return function() {
- var args = arguments;
- for (var i = funcs.length - 1; i >= 0; i--) {
- args = [funcs[i].apply(this, args)];
- }
- return args[0];
+ var i = start;
+ var result = args[start].apply(this, arguments);
+ while (i--) result = args[i].call(this, result);
+ return result;
};
};
_.after = function(times, func) {
- if (times <= 0) return func();
return function() {
if (--times < 1) {
return func.apply(this, arguments);
}
};
};
- _.keys = nativeKeys || function(obj) {
- if (obj !== Object(obj)) throw new TypeError('Invalid object');
+ _.before = function(times, func) {
+ var memo;
+ return function() {
+ if (--times > 0) {
+ memo = func.apply(this, arguments);
+ }
+ if (times <= 1) func = null;
+ return memo;
+ };
+ };
+ _.once = _.partial(_.before, 2);
+ var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
+ var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
+ 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
+
+ function collectNonEnumProps(obj, keys) {
+ var nonEnumIdx = nonEnumerableProps.length;
+ var constructor = obj.constructor;
+ var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;
+ var prop = 'constructor';
+ if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);
+
+ while (nonEnumIdx--) {
+ prop = nonEnumerableProps[nonEnumIdx];
+ if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {
+ keys.push(prop);
+ }
+ }
+ }
+ _.keys = function(obj) {
+ if (!_.isObject(obj)) return [];
+ if (nativeKeys) return nativeKeys(obj);
+ var keys = [];
+ for (var key in obj) if (_.has(obj, key)) keys.push(key);
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
+ return keys;
+ };
+ _.allKeys = function(obj) {
+ if (!_.isObject(obj)) return [];
var keys = [];
- for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
+ for (var key in obj) keys.push(key);
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
return keys;
};
_.values = function(obj) {
- var values = [];
- for (var key in obj) if (_.has(obj, key)) values.push(obj[key]);
+ var keys = _.keys(obj);
+ var length = keys.length;
+ var values = Array(length);
+ for (var i = 0; i < length; i++) {
+ values[i] = obj[keys[i]];
+ }
return values;
};
+ _.mapObject = function(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var keys = _.keys(obj),
+ length = keys.length,
+ results = {},
+ currentKey;
+ for (var index = 0; index < length; index++) {
+ currentKey = keys[index];
+ results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
+ }
+ return results;
+ };
_.pairs = function(obj) {
- var pairs = [];
- for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]);
+ var keys = _.keys(obj);
+ var length = keys.length;
+ var pairs = Array(length);
+ for (var i = 0; i < length; i++) {
+ pairs[i] = [keys[i], obj[keys[i]]];
+ }
return pairs;
};
_.invert = function(obj) {
var result = {};
- for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key;
+ var keys = _.keys(obj);
+ for (var i = 0, length = keys.length; i < length; i++) {
+ result[obj[keys[i]]] = keys[i];
+ }
return result;
};
_.functions = _.methods = function(obj) {
@@ -9650,42 +2091,46 @@ exports.Lexer = Lexer;
}
return names.sort();
};
- _.extend = function(obj) {
- each(slice.call(arguments, 1), function(source) {
- if (source) {
- for (var prop in source) {
- obj[prop] = source[prop];
- }
- }
- });
- return obj;
- };
- _.pick = function(obj) {
- var copy = {};
- var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
- each(keys, function(key) {
- if (key in obj) copy[key] = obj[key];
- });
- return copy;
+ _.extend = createAssigner(_.allKeys);
+ _.extendOwn = _.assign = createAssigner(_.keys);
+ _.findKey = function(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var keys = _.keys(obj), key;
+ for (var i = 0, length = keys.length; i < length; i++) {
+ key = keys[i];
+ if (predicate(obj[key], key, obj)) return key;
+ }
};
- _.omit = function(obj) {
- var copy = {};
- var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
- for (var key in obj) {
- if (!_.contains(keys, key)) copy[key] = obj[key];
+ _.pick = function(object, oiteratee, context) {
+ var result = {}, obj = object, iteratee, keys;
+ if (obj == null) return result;
+ if (_.isFunction(oiteratee)) {
+ keys = _.allKeys(obj);
+ iteratee = optimizeCb(oiteratee, context);
+ } else {
+ keys = flatten(arguments, false, false, 1);
+ iteratee = function(value, key, obj) { return key in obj; };
+ obj = Object(obj);
}
- return copy;
+ for (var i = 0, length = keys.length; i < length; i++) {
+ var key = keys[i];
+ var value = obj[key];
+ if (iteratee(value, key, obj)) result[key] = value;
+ }
+ return result;
};
- _.defaults = function(obj) {
- each(slice.call(arguments, 1), function(source) {
- if (source) {
- for (var prop in source) {
- if (obj[prop] == null) obj[prop] = source[prop];
- }
- }
- });
- return obj;
+ _.omit = function(obj, iteratee, context) {
+ if (_.isFunction(iteratee)) {
+ iteratee = _.negate(iteratee);
+ } else {
+ var keys = _.map(flatten(arguments, false, false, 1), String);
+ iteratee = function(value, key) {
+ return !_.contains(keys, key);
+ };
+ }
+ return _.pick(obj, iteratee, context);
};
+ _.defaults = createAssigner(_.allKeys, true);
_.clone = function(obj) {
if (!_.isObject(obj)) return obj;
return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
@@ -9694,107 +2139,113 @@ exports.Lexer = Lexer;
interceptor(obj);
return obj;
};
+ _.isMatch = function(object, attrs) {
+ var keys = _.keys(attrs), length = keys.length;
+ if (object == null) return !length;
+ var obj = Object(object);
+ for (var i = 0; i < length; i++) {
+ var key = keys[i];
+ if (attrs[key] !== obj[key] || !(key in obj)) return false;
+ }
+ return true;
+ };
var eq = function(a, b, aStack, bStack) {
- if (a === b) return a !== 0 || 1 / a == 1 / b;
+ if (a === b) return a !== 0 || 1 / a === 1 / b;
if (a == null || b == null) return a === b;
if (a instanceof _) a = a._wrapped;
if (b instanceof _) b = b._wrapped;
var className = toString.call(a);
- if (className != toString.call(b)) return false;
+ if (className !== toString.call(b)) return false;
switch (className) {
+ case '[object RegExp]':
case '[object String]':
- return a == String(b);
+ return '' + a === '' + b;
case '[object Number]':
- return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
+ if (+a !== +a) return +b !== +b;
+ return +a === 0 ? 1 / +a === 1 / b : +a === +b;
case '[object Date]':
case '[object Boolean]':
- return +a == +b;
- case '[object RegExp]':
- return a.source == b.source &&
- a.global == b.global &&
- a.multiline == b.multiline &&
- a.ignoreCase == b.ignoreCase;
+ return +a === +b;
+ }
+
+ var areArrays = className === '[object Array]';
+ if (!areArrays) {
+ if (typeof a != 'object' || typeof b != 'object') return false;
+ var aCtor = a.constructor, bCtor = b.constructor;
+ if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&
+ _.isFunction(bCtor) && bCtor instanceof bCtor)
+ && ('constructor' in a && 'constructor' in b)) {
+ return false;
+ }
}
- if (typeof a != 'object' || typeof b != 'object') return false;
+ aStack = aStack || [];
+ bStack = bStack || [];
var length = aStack.length;
while (length--) {
- if (aStack[length] == a) return bStack[length] == b;
+ if (aStack[length] === a) return bStack[length] === b;
}
aStack.push(a);
bStack.push(b);
- var size = 0, result = true;
- if (className == '[object Array]') {
- size = a.length;
- result = size == b.length;
- if (result) {
- while (size--) {
- if (!(result = eq(a[size], b[size], aStack, bStack))) break;
- }
+ if (areArrays) {
+ length = a.length;
+ if (length !== b.length) return false;
+ while (length--) {
+ if (!eq(a[length], b[length], aStack, bStack)) return false;
}
} else {
- var aCtor = a.constructor, bCtor = b.constructor;
- if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&
- _.isFunction(bCtor) && (bCtor instanceof bCtor))) {
- return false;
- }
- for (var key in a) {
- if (_.has(a, key)) {
- size++;
- if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
- }
- }
- if (result) {
- for (key in b) {
- if (_.has(b, key) && !(size--)) break;
- }
- result = !size;
+ var keys = _.keys(a), key;
+ length = keys.length;
+ if (_.keys(b).length !== length) return false;
+ while (length--) {
+ key = keys[length];
+ if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
}
}
aStack.pop();
bStack.pop();
- return result;
+ return true;
};
_.isEqual = function(a, b) {
- return eq(a, b, [], []);
+ return eq(a, b);
};
_.isEmpty = function(obj) {
if (obj == null) return true;
- if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
- for (var key in obj) if (_.has(obj, key)) return false;
- return true;
+ if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;
+ return _.keys(obj).length === 0;
};
_.isElement = function(obj) {
return !!(obj && obj.nodeType === 1);
};
_.isArray = nativeIsArray || function(obj) {
- return toString.call(obj) == '[object Array]';
+ return toString.call(obj) === '[object Array]';
};
_.isObject = function(obj) {
- return obj === Object(obj);
+ var type = typeof obj;
+ return type === 'function' || type === 'object' && !!obj;
};
- each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
+ _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {
_['is' + name] = function(obj) {
- return toString.call(obj) == '[object ' + name + ']';
+ return toString.call(obj) === '[object ' + name + ']';
};
});
if (!_.isArguments(arguments)) {
_.isArguments = function(obj) {
- return !!(obj && _.has(obj, 'callee'));
+ return _.has(obj, 'callee');
};
}
- if (typeof (/./) !== 'function') {
+ if (typeof /./ != 'function' && typeof Int8Array != 'object') {
_.isFunction = function(obj) {
- return typeof obj === 'function';
+ return typeof obj == 'function' || false;
};
}
_.isFinite = function(obj) {
return isFinite(obj) && !isNaN(parseFloat(obj));
};
_.isNaN = function(obj) {
- return _.isNumber(obj) && obj != +obj;
+ return _.isNumber(obj) && obj !== +obj;
};
_.isBoolean = function(obj) {
- return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
+ return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
};
_.isNull = function(obj) {
return obj === null;
@@ -9803,7 +2254,7 @@ exports.Lexer = Lexer;
return obj === void 0;
};
_.has = function(obj, key) {
- return hasOwnProperty.call(obj, key);
+ return obj != null && hasOwnProperty.call(obj, key);
};
_.noConflict = function() {
root._ = previousUnderscore;
@@ -9812,9 +2263,34 @@ exports.Lexer = Lexer;
_.identity = function(value) {
return value;
};
- _.times = function(n, iterator, context) {
- var accum = Array(n);
- for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);
+ _.constant = function(value) {
+ return function() {
+ return value;
+ };
+ };
+
+ _.noop = function(){};
+
+ _.property = function(key) {
+ return function(obj) {
+ return obj == null ? void 0 : obj[key];
+ };
+ };
+ _.propertyOf = function(obj) {
+ return obj == null ? function(){} : function(key) {
+ return obj[key];
+ };
+ };
+ _.matcher = _.matches = function(attrs) {
+ attrs = _.extendOwn({}, attrs);
+ return function(obj) {
+ return _.isMatch(obj, attrs);
+ };
+ };
+ _.times = function(n, iteratee, context) {
+ var accum = Array(Math.max(0, n));
+ iteratee = optimizeCb(iteratee, context, 1);
+ for (var i = 0; i < n; i++) accum[i] = iteratee(i);
return accum;
};
_.random = function(min, max) {
@@ -9824,43 +2300,38 @@ exports.Lexer = Lexer;
}
return min + Math.floor(Math.random() * (max - min + 1));
};
- var entityMap = {
- escape: {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&quot;',
- "'": '&#x27;',
- '/': '&#x2F;'
- }
+ _.now = Date.now || function() {
+ return new Date().getTime();
};
- entityMap.unescape = _.invert(entityMap.escape);
- var entityRegexes = {
- escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),
- unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')
+ var escapeMap = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#x27;',
+ '`': '&#x60;'
};
- _.each(['escape', 'unescape'], function(method) {
- _[method] = function(string) {
- if (string == null) return '';
- return ('' + string).replace(entityRegexes[method], function(match) {
- return entityMap[method][match];
- });
+ var unescapeMap = _.invert(escapeMap);
+ var createEscaper = function(map) {
+ var escaper = function(match) {
+ return map[match];
+ };
+ var source = '(?:' + _.keys(map).join('|') + ')';
+ var testRegexp = RegExp(source);
+ var replaceRegexp = RegExp(source, 'g');
+ return function(string) {
+ string = string == null ? '' : '' + string;
+ return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
};
- });
- _.result = function(object, property) {
- if (object == null) return null;
- var value = object[property];
- return _.isFunction(value) ? value.call(object) : value;
};
- _.mixin = function(obj) {
- each(_.functions(obj), function(name){
- var func = _[name] = obj[name];
- _.prototype[name] = function() {
- var args = [this._wrapped];
- push.apply(args, arguments);
- return result.call(this, func.apply(_, args));
- };
- });
+ _.escape = createEscaper(escapeMap);
+ _.unescape = createEscaper(unescapeMap);
+ _.result = function(object, property, fallback) {
+ var value = object == null ? void 0 : object[property];
+ if (value === void 0) {
+ value = fallback;
+ }
+ return _.isFunction(value) ? value.call(object) : value;
};
var idCounter = 0;
_.uniqueId = function(prefix) {
@@ -9878,16 +2349,19 @@ exports.Lexer = Lexer;
'\\': '\\',
'\r': 'r',
'\n': 'n',
- '\t': 't',
'\u2028': 'u2028',
'\u2029': 'u2029'
};
- var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
- _.template = function(text, data, settings) {
- var render;
+ var escaper = /\\|'|\r|\n|\u2028|\u2029/g;
+
+ var escapeChar = function(match) {
+ return '\\' + escapes[match];
+ };
+ _.template = function(text, settings, oldSettings) {
+ if (!settings && oldSettings) settings = oldSettings;
settings = _.defaults({}, settings, _.templateSettings);
- var matcher = new RegExp([
+ var matcher = RegExp([
(settings.escape || noMatch).source,
(settings.interpolate || noMatch).source,
(settings.evaluate || noMatch).source
@@ -9895,19 +2369,16 @@ exports.Lexer = Lexer;
var index = 0;
var source = "__p+='";
text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
- source += text.slice(index, offset)
- .replace(escaper, function(match) { return '\\' + escapes[match]; });
+ source += text.slice(index, offset).replace(escaper, escapeChar);
+ index = offset + match.length;
if (escape) {
source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
- }
- if (interpolate) {
+ } else if (interpolate) {
source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
- }
- if (evaluate) {
+ } else if (evaluate) {
source += "';\n" + evaluate + "\n__p+='";
}
- index = offset + match.length;
return match;
});
source += "';\n";
@@ -9915,66 +2386,9086 @@ exports.Lexer = Lexer;
source = "var __t,__p='',__j=Array.prototype.join," +
"print=function(){__p+=__j.call(arguments,'');};\n" +
- source + "return __p;\n";
+ source + 'return __p;\n';
try {
- render = new Function(settings.variable || 'obj', '_', source);
+ var render = new Function(settings.variable || 'obj', '_', source);
} catch (e) {
e.source = source;
throw e;
}
- if (data) return render(data, _);
var template = function(data) {
return render.call(this, data, _);
};
- template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
+ var argument = settings.variable || 'obj';
+ template.source = 'function(' + argument + '){\n' + source + '}';
return template;
};
_.chain = function(obj) {
- return _(obj).chain();
+ var instance = _(obj);
+ instance._chain = true;
+ return instance;
};
- var result = function(obj) {
- return this._chain ? _(obj).chain() : obj;
+ var result = function(instance, obj) {
+ return instance._chain ? _(obj).chain() : obj;
+ };
+ _.mixin = function(obj) {
+ _.each(_.functions(obj), function(name) {
+ var func = _[name] = obj[name];
+ _.prototype[name] = function() {
+ var args = [this._wrapped];
+ push.apply(args, arguments);
+ return result(this, func.apply(_, args));
+ };
+ });
};
_.mixin(_);
- each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
var method = ArrayProto[name];
_.prototype[name] = function() {
var obj = this._wrapped;
method.apply(obj, arguments);
- if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];
- return result.call(this, obj);
+ if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
+ return result(this, obj);
};
});
- each(['concat', 'join', 'slice'], function(name) {
+ _.each(['concat', 'join', 'slice'], function(name) {
var method = ArrayProto[name];
_.prototype[name] = function() {
- return result.call(this, method.apply(this._wrapped, arguments));
+ return result(this, method.apply(this._wrapped, arguments));
};
});
+ _.prototype.value = function() {
+ return this._wrapped;
+ };
+ _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
+
+ _.prototype.toString = function() {
+ return '' + this._wrapped;
+ };
+ if (typeof define === 'function' && define.amd) {
+ ace.define('underscore', [], function() {
+ return _;
+ });
+ }
+}.call(this));
+
+},
+{}],
+3:[function(_dereq_,module,exports){
+
+var _ = _dereq_("underscore");
+var events = _dereq_("events");
+var vars = _dereq_("./vars.js");
+var messages = _dereq_("./messages.js");
+var Lexer = _dereq_("./lex.js").Lexer;
+var reg = _dereq_("./reg.js");
+var state = _dereq_("./state.js").state;
+var style = _dereq_("./style.js");
+var options = _dereq_("./options.js");
+
+var JSHINT = (function() {
+ "use strict";
+
+ var api, // Extension API
+ bang = {
+ "<" : true,
+ "<=" : true,
+ "==" : true,
+ "===": true,
+ "!==": true,
+ "!=" : true,
+ ">" : true,
+ ">=" : true,
+ "+" : true,
+ "-" : true,
+ "*" : true,
+ "/" : true,
+ "%" : true
+ },
+
+ declared, // Globals that were declared using /*global ... */ syntax.
+ exported, // Variables that are used outside of the current file.
+
+ functionicity = [
+ "closure", "exception", "global", "label",
+ "outer", "unused", "var"
+ ],
+
+ funct, // The current function
+ functions, // All of the functions
+
+ global, // The global scope
+ implied, // Implied globals
+ inblock,
+ indent,
+ lookahead,
+ lex,
+ member,
+ membersOnly,
+ predefined, // Global variables defined by option
+
+ scope, // The current scope
+ stack,
+ unuseds,
+ urls,
+
+ extraModules = [],
+ emitter = new events.EventEmitter();
+
+ function checkOption(name, t) {
+ name = name.trim();
+
+ if (/^[+-]W\d{3}$/g.test(name)) {
+ return true;
+ }
+
+ if (options.validNames.indexOf(name) === -1) {
+ if (t.type !== "jslint" && !_.has(options.removed, name)) {
+ error("E001", t, name);
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ function isString(obj) {
+ return Object.prototype.toString.call(obj) === "[object String]";
+ }
+
+ function isIdentifier(tkn, value) {
+ if (!tkn)
+ return false;
+
+ if (!tkn.identifier || tkn.value !== value)
+ return false;
+
+ return true;
+ }
+
+ function isReserved(token) {
+ if (!token.reserved) {
+ return false;
+ }
+ var meta = token.meta;
+
+ if (meta && meta.isFutureReservedWord && state.option.inES5()) {
+ if (!meta.es5) {
+ return false;
+ }
+ if (meta.strictOnly) {
+ if (!state.option.strict && !state.directive["use strict"]) {
+ return false;
+ }
+ }
+
+ if (token.isProperty) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ function supplant(str, data) {
+ return str.replace(/\{([^{}]*)\}/g, function(a, b) {
+ var r = data[b];
+ return typeof r === "string" || typeof r === "number" ? r : a;
+ });
+ }
+
+ function combine(dest, src) {
+ Object.keys(src).forEach(function(name) {
+ if (_.has(JSHINT.blacklist, name)) return;
+ dest[name] = src[name];
+ });
+ }
+
+ function processenforceall() {
+ if (state.option.enforceall) {
+ for (var enforceopt in options.bool.enforcing) {
+ if (state.option[enforceopt] === undefined) {
+ state.option[enforceopt] = true;
+ }
+ }
+ for (var relaxopt in options.bool.relaxing) {
+ if (state.option[relaxopt] === undefined) {
+ state.option[relaxopt] = false;
+ }
+ }
+ }
+ }
+
+ function assume() {
+ processenforceall();
+
+ if (!state.option.es3) {
+ combine(predefined, vars.ecmaIdentifiers[5]);
+ }
+
+ if (state.option.esnext) {
+ combine(predefined, vars.ecmaIdentifiers[6]);
+ }
+
+ if (state.option.couch) {
+ combine(predefined, vars.couch);
+ }
+
+ if (state.option.qunit) {
+ combine(predefined, vars.qunit);
+ }
+
+ if (state.option.rhino) {
+ combine(predefined, vars.rhino);
+ }
+
+ if (state.option.shelljs) {
+ combine(predefined, vars.shelljs);
+ combine(predefined, vars.node);
+ }
+ if (state.option.typed) {
+ combine(predefined, vars.typed);
+ }
+
+ if (state.option.phantom) {
+ combine(predefined, vars.phantom);
+ }
+
+ if (state.option.prototypejs) {
+ combine(predefined, vars.prototypejs);
+ }
+
+ if (state.option.node) {
+ combine(predefined, vars.node);
+ combine(predefined, vars.typed);
+ }
+
+ if (state.option.devel) {
+ combine(predefined, vars.devel);
+ }
+
+ if (state.option.dojo) {
+ combine(predefined, vars.dojo);
+ }
+
+ if (state.option.browser) {
+ combine(predefined, vars.browser);
+ combine(predefined, vars.typed);
+ }
+
+ if (state.option.browserify) {
+ combine(predefined, vars.browser);
+ combine(predefined, vars.typed);
+ combine(predefined, vars.browserify);
+ }
+
+ if (state.option.nonstandard) {
+ combine(predefined, vars.nonstandard);
+ }
+
+ if (state.option.jasmine) {
+ combine(predefined, vars.jasmine);
+ }
+
+ if (state.option.jquery) {
+ combine(predefined, vars.jquery);
+ }
+
+ if (state.option.mootools) {
+ combine(predefined, vars.mootools);
+ }
+
+ if (state.option.worker) {
+ combine(predefined, vars.worker);
+ }
+
+ if (state.option.wsh) {
+ combine(predefined, vars.wsh);
+ }
+
+ if (state.option.globalstrict && state.option.strict !== false) {
+ state.option.strict = true;
+ }
+
+ if (state.option.yui) {
+ combine(predefined, vars.yui);
+ }
+
+ if (state.option.mocha) {
+ combine(predefined, vars.mocha);
+ }
+
+ state.option.inMoz = function(strict) {
+ return state.option.moz;
+ };
+
+ state.option.inESNext = function(strict) {
+ return state.option.moz || state.option.esnext;
+ };
+
+ state.option.inES5 = function(/* strict */) {
+ return !state.option.es3;
+ };
+
+ state.option.inES3 = function(strict) {
+ if (strict) {
+ return !state.option.moz && !state.option.esnext && state.option.es3;
+ }
+ return state.option.es3;
+ };
+ }
+ function quit(code, line, chr) {
+ var percentage = Math.floor((line / state.lines.length) * 100);
+ var message = messages.errors[code].desc;
+
+ throw {
+ name: "JSHintError",
+ line: line,
+ character: chr,
+ message: message + " (" + percentage + "% scanned).",
+ raw: message,
+ code: code
+ };
+ }
+
+ function isundef(scope, code, token, a) {
+ if (!state.ignored[code] && state.option.undef !== false) {
+ JSHINT.undefs.push([scope, code, token, a]);
+ }
+ }
+
+ function removeIgnoredMessages() {
+ var ignored = state.ignoredLines;
+
+ if (_.isEmpty(ignored)) return;
+ JSHINT.errors = _.reject(JSHINT.errors, function(err) { return ignored[err.line] });
+ }
+
+ function warning(code, t, a, b, c, d) {
+ var ch, l, w, msg;
+
+ if (/^W\d{3}$/.test(code)) {
+ if (state.ignored[code])
+ return;
+
+ msg = messages.warnings[code];
+ } else if (/E\d{3}/.test(code)) {
+ msg = messages.errors[code];
+ } else if (/I\d{3}/.test(code)) {
+ msg = messages.info[code];
+ }
+
+ t = t || state.tokens.next;
+ if (t.id === "(end)") { // `~
+ t = state.tokens.curr;
+ }
+
+ l = t.line || 0;
+ ch = t.from || 0;
+
+ w = {
+ id: "(error)",
+ raw: msg.desc,
+ code: msg.code,
+ evidence: state.lines[l - 1] || "",
+ line: l,
+ character: ch,
+ scope: JSHINT.scope,
+ a: a,
+ b: b,
+ c: c,
+ d: d
+ };
+
+ w.reason = supplant(msg.desc, w);
+ JSHINT.errors.push(w);
+
+ removeIgnoredMessages();
+
+ if (JSHINT.errors.length >= state.option.maxerr)
+ quit("E043", l, ch);
+
+ return w;
+ }
+
+ function warningAt(m, l, ch, a, b, c, d) {
+ return warning(m, {
+ line: l,
+ from: ch
+ }, a, b, c, d);
+ }
+
+ function error(m, t, a, b, c, d) {
+ warning(m, t, a, b, c, d);
+ }
+
+ function errorAt(m, l, ch, a, b, c, d) {
+ return error(m, {
+ line: l,
+ from: ch
+ }, a, b, c, d);
+ }
+ function addInternalSrc(elem, src) {
+ var i;
+ i = {
+ id: "(internal)",
+ elem: elem,
+ value: src
+ };
+ JSHINT.internals.push(i);
+ return i;
+ }
+ function addlabel(name, opts) {
+ opts = opts || {};
+
+ var type = opts.type;
+ var token = opts.token;
+ var islet = opts.islet;
+ if (type === "exception") {
+ if (_.has(funct["(context)"], name)) {
+ if (funct[name] !== true && !state.option.node) {
+ warning("W002", state.tokens.next, name);
+ }
+ }
+ }
+
+ if (_.has(funct, name) && !funct["(global)"]) {
+ if (funct[name] === true) {
+ if (state.option.latedef) {
+ if ((state.option.latedef === true && _.contains([funct[name], type], "unction")) ||
+ !_.contains([funct[name], type], "unction")) {
+ warning("W003", state.tokens.next, name);
+ }
+ }
+ } else {
+ if ((!state.option.shadow || _.contains([ "inner", "outer" ], state.option.shadow)) &&
+ type !== "exception" || funct["(blockscope)"].getlabel(name)) {
+ warning("W004", state.tokens.next, name);
+ }
+ }
+ }
+
+ if (funct["(context)"] && _.has(funct["(context)"], name) && type !== "function") {
+ if (state.option.shadow === "outer") {
+ warning("W123", state.tokens.next, name);
+ }
+ }
+ if (islet) {
+ funct["(blockscope)"].current.add(name, type, state.tokens.curr);
+ if (funct["(blockscope)"].atTop() && exported[name]) {
+ state.tokens.curr.exported = true;
+ }
+ } else {
+ funct["(blockscope)"].shadow(name);
+ funct[name] = type;
+
+ if (token) {
+ funct["(tokens)"][name] = token;
+ }
+
+ setprop(funct, name, { unused: opts.unused || false });
+
+ if (funct["(global)"]) {
+ global[name] = funct;
+ if (_.has(implied, name)) {
+ if (state.option.latedef) {
+ if ((state.option.latedef === true && _.contains([funct[name], type], "unction")) ||
+ !_.contains([funct[name], type], "unction")) {
+ warning("W003", state.tokens.next, name);
+ }
+ }
+
+ delete implied[name];
+ }
+ } else {
+ scope[name] = funct;
+ }
+ }
+ }
+
+ function doOption() {
+ var nt = state.tokens.next;
+ var body = nt.body.match(/(-\s+)?[^\s,:]+(?:\s*:\s*(-\s+)?[^\s,]+)?/g) || [];
+ var predef = {};
+
+ if (nt.type === "globals") {
+ body.forEach(function(g) {
+ g = g.split(":");
+ var key = (g[0] || "").trim();
+ var val = (g[1] || "").trim();
+
+ if (key.charAt(0) === "-") {
+ key = key.slice(1);
+ val = false;
+
+ JSHINT.blacklist[key] = key;
+ delete predefined[key];
+ } else {
+ predef[key] = (val === "true");
+ }
+ });
+
+ combine(predefined, predef);
+
+ for (var key in predef) {
+ if (_.has(predef, key)) {
+ declared[key] = nt;
+ }
+ }
+ }
+
+ if (nt.type === "exported") {
+ body.forEach(function(e) {
+ exported[e] = true;
+ });
+ }
+
+ if (nt.type === "members") {
+ membersOnly = membersOnly || {};
+
+ body.forEach(function(m) {
+ var ch1 = m.charAt(0);
+ var ch2 = m.charAt(m.length - 1);
+
+ if (ch1 === ch2 && (ch1 === "\"" || ch1 === "'")) {
+ m = m
+ .substr(1, m.length - 2)
+ .replace("\\\"", "\"");
+ }
+
+ membersOnly[m] = false;
+ });
+ }
+
+ var numvals = [
+ "maxstatements",
+ "maxparams",
+ "maxdepth",
+ "maxcomplexity",
+ "maxerr",
+ "maxlen",
+ "indent"
+ ];
+
+ if (nt.type === "jshint" || nt.type === "jslint") {
+ body.forEach(function(g) {
+ g = g.split(":");
+ var key = (g[0] || "").trim();
+ var val = (g[1] || "").trim();
+
+ if (!checkOption(key, nt)) {
+ return;
+ }
+
+ if (numvals.indexOf(key) >= 0) {
+ if (val !== "false") {
+ val = +val;
+
+ if (typeof val !== "number" || !isFinite(val) || val <= 0 || Math.floor(val) !== val) {
+ error("E032", nt, g[1].trim());
+ return;
+ }
+
+ state.option[key] = val;
+ } else {
+ state.option[key] = key === "indent" ? 4 : false;
+ }
+
+ return;
+ }
+
+ if (key === "validthis") {
+
+ if (funct["(global)"])
+ return void error("E009");
+
+ if (val !== "true" && val !== "false")
+ return void error("E002", nt);
+
+ state.option.validthis = (val === "true");
+ return;
+ }
+
+ if (key === "quotmark") {
+ switch (val) {
+ case "true":
+ case "false":
+ state.option.quotmark = (val === "true");
+ break;
+ case "double":
+ case "single":
+ state.option.quotmark = val;
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ if (key === "shadow") {
+ switch (val) {
+ case "true":
+ state.option.shadow = true;
+ break;
+ case "outer":
+ state.option.shadow = "outer";
+ break;
+ case "false":
+ case "inner":
+ state.option.shadow = "inner";
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ if (key === "unused") {
+ switch (val) {
+ case "true":
+ state.option.unused = true;
+ break;
+ case "false":
+ state.option.unused = false;
+ break;
+ case "vars":
+ case "strict":
+ state.option.unused = val;
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ if (key === "latedef") {
+ switch (val) {
+ case "true":
+ state.option.latedef = true;
+ break;
+ case "false":
+ state.option.latedef = false;
+ break;
+ case "nofunc":
+ state.option.latedef = "nofunc";
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ if (key === "ignore") {
+ switch (val) {
+ case "start":
+ state.ignoreLinterErrors = true;
+ break;
+ case "end":
+ state.ignoreLinterErrors = false;
+ break;
+ case "line":
+ state.ignoredLines[nt.line] = true;
+ removeIgnoredMessages();
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ var match = /^([+-])(W\d{3})$/g.exec(key);
+ if (match) {
+ state.ignored[match[2]] = (match[1] === "-");
+ return;
+ }
+
+ var tn;
+ if (val === "true" || val === "false") {
+ if (nt.type === "jslint") {
+ tn = options.renamed[key] || key;
+ state.option[tn] = (val === "true");
- _.extend(_.prototype, {
- chain: function() {
- this._chain = true;
+ if (options.inverted[tn] !== undefined) {
+ state.option[tn] = !state.option[tn];
+ }
+ } else {
+ state.option[key] = (val === "true");
+ }
+
+ if (key === "newcap") {
+ state.option["(explicitNewcap)"] = true;
+ }
+ return;
+ }
+
+ error("E002", nt);
+ });
+
+ assume();
+ }
+ }
+
+ function peek(p) {
+ var i = p || 0, j = 0, t;
+
+ while (j <= i) {
+ t = lookahead[j];
+ if (!t) {
+ t = lookahead[j] = lex.token();
+ }
+ j += 1;
+ }
+ return t;
+ }
+
+ function peekIgnoreEOL() {
+ var i = 0;
+ var t;
+ do {
+ t = peek(i++);
+ } while (t.id === "(endline)");
+ return t;
+ }
+
+ function advance(id, t) {
+
+ switch (state.tokens.curr.id) {
+ case "(number)":
+ if (state.tokens.next.id === ".") {
+ warning("W005", state.tokens.curr);
+ }
+ break;
+ case "-":
+ if (state.tokens.next.id === "-" || state.tokens.next.id === "--") {
+ warning("W006");
+ }
+ break;
+ case "+":
+ if (state.tokens.next.id === "+" || state.tokens.next.id === "++") {
+ warning("W007");
+ }
+ break;
+ }
+
+ if (id && state.tokens.next.id !== id) {
+ if (t) {
+ if (state.tokens.next.id === "(end)") {
+ error("E019", t, t.id);
+ } else {
+ error("E020", state.tokens.next, id, t.id, t.line, state.tokens.next.value);
+ }
+ } else if (state.tokens.next.type !== "(identifier)" || state.tokens.next.value !== id) {
+ warning("W116", state.tokens.next, id, state.tokens.next.value);
+ }
+ }
+
+ state.tokens.prev = state.tokens.curr;
+ state.tokens.curr = state.tokens.next;
+ for (;;) {
+ state.tokens.next = lookahead.shift() || lex.token();
+
+ if (!state.tokens.next) { // No more tokens left, give up
+ quit("E041", state.tokens.curr.line);
+ }
+
+ if (state.tokens.next.id === "(end)" || state.tokens.next.id === "(error)") {
+ return;
+ }
+
+ if (state.tokens.next.check) {
+ state.tokens.next.check();
+ }
+
+ if (state.tokens.next.isSpecial) {
+ doOption();
+ } else {
+ if (state.tokens.next.id !== "(endline)") {
+ break;
+ }
+ }
+ }
+ }
+
+ function isInfix(token) {
+ return token.infix || (!token.identifier && !token.template && !!token.led);
+ }
+
+ function isEndOfExpr() {
+ var curr = state.tokens.curr;
+ var next = state.tokens.next;
+ if (next.id === ";" || next.id === "}" || next.id === ":") {
+ return true;
+ }
+ if (isInfix(next) === isInfix(curr) || (curr.id === "yield" && state.option.inMoz(true))) {
+ return curr.line !== startLine(next);
+ }
+ return false;
+ }
+
+ function isBeginOfExpr(prev) {
+ return !prev.left && prev.arity !== "unary";
+ }
+
+ function expression(rbp, initial) {
+ var left, isArray = false, isObject = false, isLetExpr = false;
+
+ state.nameStack.push();
+ if (!initial && state.tokens.next.value === "let" && peek(0).value === "(") {
+ if (!state.option.inMoz(true)) {
+ warning("W118", state.tokens.next, "let expressions");
+ }
+ isLetExpr = true;
+ funct["(blockscope)"].stack();
+ advance("let");
+ advance("(");
+ state.tokens.prev.fud();
+ advance(")");
+ }
+
+ if (state.tokens.next.id === "(end)")
+ error("E006", state.tokens.curr);
+
+ var isDangerous =
+ state.option.asi &&
+ state.tokens.prev.line !== startLine(state.tokens.curr) &&
+ _.contains(["]", ")"], state.tokens.prev.id) &&
+ _.contains(["[", "("], state.tokens.curr.id);
+
+ if (isDangerous)
+ warning("W014", state.tokens.curr, state.tokens.curr.id);
+
+ advance();
+
+ if (initial) {
+ funct["(verb)"] = state.tokens.curr.value;
+ state.tokens.curr.beginsStmt = true;
+ }
+
+ if (initial === true && state.tokens.curr.fud) {
+ left = state.tokens.curr.fud();
+ } else {
+ if (state.tokens.curr.nud) {
+ left = state.tokens.curr.nud();
+ } else {
+ error("E030", state.tokens.curr, state.tokens.curr.id);
+ }
+ while ((rbp < state.tokens.next.lbp || state.tokens.next.type === "(template)") &&
+ !isEndOfExpr()) {
+ isArray = state.tokens.curr.value === "Array";
+ isObject = state.tokens.curr.value === "Object";
+ if (left && (left.value || (left.first && left.first.value))) {
+ if (left.value !== "new" ||
+ (left.first && left.first.value && left.first.value === ".")) {
+ isArray = false;
+ if (left.value !== state.tokens.curr.value) {
+ isObject = false;
+ }
+ }
+ }
+
+ advance();
+
+ if (isArray && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
+ warning("W009", state.tokens.curr);
+ }
+
+ if (isObject && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
+ warning("W010", state.tokens.curr);
+ }
+
+ if (left && state.tokens.curr.led) {
+ left = state.tokens.curr.led(left);
+ } else {
+ error("E033", state.tokens.curr, state.tokens.curr.id);
+ }
+ }
+ }
+ if (isLetExpr) {
+ funct["(blockscope)"].unstack();
+ }
+
+ state.nameStack.pop();
+
+ return left;
+ }
+
+ function startLine(token) {
+ return token.startLine || token.line;
+ }
+
+ function nobreaknonadjacent(left, right) {
+ left = left || state.tokens.curr;
+ right = right || state.tokens.next;
+ if (!state.option.laxbreak && left.line !== startLine(right)) {
+ warning("W014", right, right.value);
+ }
+ }
+
+ function nolinebreak(t) {
+ t = t || state.tokens.curr;
+ if (t.line !== startLine(state.tokens.next)) {
+ warning("E022", t, t.value);
+ }
+ }
+
+ function nobreakcomma(left, right) {
+ if (left.line !== startLine(right)) {
+ if (!state.option.laxcomma) {
+ if (comma.first) {
+ warning("I001");
+ comma.first = false;
+ }
+ warning("W014", left, right.value);
+ }
+ }
+ }
+
+ function comma(opts) {
+ opts = opts || {};
+
+ if (!opts.peek) {
+ nobreakcomma(state.tokens.curr, state.tokens.next);
+ advance(",");
+ } else {
+ nobreakcomma(state.tokens.prev, state.tokens.curr);
+ }
+
+ if (state.tokens.next.identifier && !(opts.property && state.option.inES5())) {
+ switch (state.tokens.next.value) {
+ case "break":
+ case "case":
+ case "catch":
+ case "continue":
+ case "default":
+ case "do":
+ case "else":
+ case "finally":
+ case "for":
+ case "if":
+ case "in":
+ case "instanceof":
+ case "return":
+ case "switch":
+ case "throw":
+ case "try":
+ case "var":
+ case "let":
+ case "while":
+ case "with":
+ error("E024", state.tokens.next, state.tokens.next.value);
+ return false;
+ }
+ }
+
+ if (state.tokens.next.type === "(punctuator)") {
+ switch (state.tokens.next.value) {
+ case "}":
+ case "]":
+ case ",":
+ if (opts.allowTrailing) {
+ return true;
+ }
+ case ")":
+ error("E024", state.tokens.next, state.tokens.next.value);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ function symbol(s, p) {
+ var x = state.syntax[s];
+ if (!x || typeof x !== "object") {
+ state.syntax[s] = x = {
+ id: s,
+ lbp: p,
+ value: s
+ };
+ }
+ return x;
+ }
+
+ function delim(s) {
+ var x = symbol(s, 0);
+ x.delim = true;
+ return x;
+ }
+
+ function stmt(s, f) {
+ var x = delim(s);
+ x.identifier = x.reserved = true;
+ x.fud = f;
+ return x;
+ }
+
+ function blockstmt(s, f) {
+ var x = stmt(s, f);
+ x.block = true;
+ return x;
+ }
+
+ function reserveName(x) {
+ var c = x.id.charAt(0);
+ if ((c >= "a" && c <= "z") || (c >= "A" && c <= "Z")) {
+ x.identifier = x.reserved = true;
+ }
+ return x;
+ }
+
+ function prefix(s, f) {
+ var x = symbol(s, 150);
+ reserveName(x);
+
+ x.nud = (typeof f === "function") ? f : function() {
+ this.arity = "unary";
+ this.right = expression(150);
+
+ if (this.id === "++" || this.id === "--") {
+ if (state.option.plusplus) {
+ warning("W016", this, this.id);
+ } else if (this.right && (!this.right.identifier || isReserved(this.right)) &&
+ this.right.id !== "." && this.right.id !== "[") {
+ warning("W017", this);
+ }
+ }
+
+ return this;
+ };
+
+ return x;
+ }
+
+ function type(s, f) {
+ var x = delim(s);
+ x.type = s;
+ x.nud = f;
+ return x;
+ }
+
+ function reserve(name, func) {
+ var x = type(name, func);
+ x.identifier = true;
+ x.reserved = true;
+ return x;
+ }
+
+ function FutureReservedWord(name, meta) {
+ var x = type(name, (meta && meta.nud) || function() {
+ return this;
+ });
+
+ meta = meta || {};
+ meta.isFutureReservedWord = true;
+
+ x.value = name;
+ x.identifier = true;
+ x.reserved = true;
+ x.meta = meta;
+
+ return x;
+ }
+
+ function reservevar(s, v) {
+ return reserve(s, function() {
+ if (typeof v === "function") {
+ v(this);
+ }
+ return this;
+ });
+ }
+
+ function infix(s, f, p, w) {
+ var x = symbol(s, p);
+ reserveName(x);
+ x.infix = true;
+ x.led = function(left) {
+ if (!w) {
+ nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
+ }
+ if (s === "in" && left.id === "!") {
+ warning("W018", left, "!");
+ }
+ if (typeof f === "function") {
+ return f(left, this);
+ } else {
+ this.left = left;
+ this.right = expression(p);
+ return this;
+ }
+ };
+ return x;
+ }
+
+
+ function application(s) {
+ var x = symbol(s, 42);
+
+ x.led = function(left) {
+ nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
+
+ this.left = left;
+ this.right = doFunction({ type: "arrow", loneArg: left });
+ return this;
+ };
+ return x;
+ }
+
+ function relation(s, f) {
+ var x = symbol(s, 100);
+
+ x.led = function(left) {
+ nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
+ var right = expression(100);
+
+ if (isIdentifier(left, "NaN") || isIdentifier(right, "NaN")) {
+ warning("W019", this);
+ } else if (f) {
+ f.apply(this, [left, right]);
+ }
+
+ if (!left || !right) {
+ quit("E041", state.tokens.curr.line);
+ }
+
+ if (left.id === "!") {
+ warning("W018", left, "!");
+ }
+
+ if (right.id === "!") {
+ warning("W018", right, "!");
+ }
+
+ this.left = left;
+ this.right = right;
+ return this;
+ };
+ return x;
+ }
+
+ function isPoorRelation(node) {
+ return node &&
+ ((node.type === "(number)" && +node.value === 0) ||
+ (node.type === "(string)" && node.value === "") ||
+ (node.type === "null" && !state.option.eqnull) ||
+ node.type === "true" ||
+ node.type === "false" ||
+ node.type === "undefined");
+ }
+
+ function isTypoTypeof(left, right) {
+ if (state.option.notypeof)
+ return false;
+
+ if (!left || !right)
+ return false;
+
+ var values = [
+ "undefined", "object", "boolean", "number",
+ "string", "function", "xml", "object", "unknown", "symbol"
+ ];
+
+ if (right.type === "(identifier)" && right.value === "typeof" && left.type === "(string)")
+ return !_.contains(values, left.value);
+
+ return false;
+ }
+
+ function isGlobalEval(left, state, funct) {
+ var isGlobal = false;
+ if (left.type === "this" && funct["(context)"] === null) {
+ isGlobal = true;
+ }
+ else if (left.type === "(identifier)") {
+ if (state.option.node && left.value === "global") {
+ isGlobal = true;
+ }
+
+ else if (state.option.browser && (left.value === "window" || left.value === "document")) {
+ isGlobal = true;
+ }
+ }
+
+ return isGlobal;
+ }
+
+ function findNativePrototype(left) {
+ var natives = [
+ "Array", "ArrayBuffer", "Boolean", "Collator", "DataView", "Date",
+ "DateTimeFormat", "Error", "EvalError", "Float32Array", "Float64Array",
+ "Function", "Infinity", "Intl", "Int16Array", "Int32Array", "Int8Array",
+ "Iterator", "Number", "NumberFormat", "Object", "RangeError",
+ "ReferenceError", "RegExp", "StopIteration", "String", "SyntaxError",
+ "TypeError", "Uint16Array", "Uint32Array", "Uint8Array", "Uint8ClampedArray",
+ "URIError"
+ ];
+
+ function walkPrototype(obj) {
+ if (typeof obj !== "object") return;
+ return obj.right === "prototype" ? obj : walkPrototype(obj.left);
+ }
+
+ function walkNative(obj) {
+ while (!obj.identifier && typeof obj.left === "object")
+ obj = obj.left;
+
+ if (obj.identifier && natives.indexOf(obj.value) >= 0)
+ return obj.value;
+ }
+
+ var prototype = walkPrototype(left);
+ if (prototype) return walkNative(prototype);
+ }
+
+ function assignop(s, f, p) {
+ var x = infix(s, typeof f === "function" ? f : function(left, that) {
+ that.left = left;
+
+ if (left) {
+ if (state.option.freeze) {
+ var nativeObject = findNativePrototype(left);
+ if (nativeObject)
+ warning("W121", left, nativeObject);
+ }
+
+ if (predefined[left.value] === false &&
+ scope[left.value]["(global)"] === true) {
+ warning("W020", left);
+ } else if (left["function"]) {
+ warning("W021", left, left.value);
+ }
+
+ if (funct[left.value] === "const") {
+ error("E013", left, left.value);
+ }
+
+ if (left.id === ".") {
+ if (!left.left) {
+ warning("E031", that);
+ } else if (left.left.value === "arguments" && !state.directive["use strict"]) {
+ warning("E031", that);
+ }
+
+ state.nameStack.set(state.tokens.prev);
+ that.right = expression(10);
+ return that;
+ } else if (left.id === "[") {
+ if (state.tokens.curr.left.first) {
+ state.tokens.curr.left.first.forEach(function(t) {
+ if (t && funct[t.value] === "const") {
+ error("E013", t, t.value);
+ }
+ });
+ } else if (!left.left) {
+ warning("E031", that);
+ } else if (left.left.value === "arguments" && !state.directive["use strict"]) {
+ warning("E031", that);
+ }
+
+ state.nameStack.set(left.right);
+
+ that.right = expression(10);
+ return that;
+ } else if (left.identifier && !isReserved(left)) {
+ if (funct[left.value] === "exception") {
+ warning("W022", left);
+ }
+ state.nameStack.set(left);
+ that.right = expression(10);
+ return that;
+ }
+
+ if (left === state.syntax["function"]) {
+ warning("W023", state.tokens.curr);
+ }
+ }
+
+ error("E031", that);
+ }, p);
+
+ x.exps = true;
+ x.assign = true;
+ return x;
+ }
+
+
+ function bitwise(s, f, p) {
+ var x = symbol(s, p);
+ reserveName(x);
+ x.led = (typeof f === "function") ? f : function(left) {
+ if (state.option.bitwise) {
+ warning("W016", this, this.id);
+ }
+ this.left = left;
+ this.right = expression(p);
+ return this;
+ };
+ return x;
+ }
+
+
+ function bitwiseassignop(s) {
+ return assignop(s, function(left, that) {
+ if (state.option.bitwise) {
+ warning("W016", that, that.id);
+ }
+
+ if (left) {
+ if (left.id === "." || left.id === "[" ||
+ (left.identifier && !isReserved(left))) {
+ expression(10);
+ return that;
+ }
+ if (left === state.syntax["function"]) {
+ warning("W023", state.tokens.curr);
+ }
+ return that;
+ }
+ error("E031", that);
+ }, 20);
+ }
+
+
+ function suffix(s) {
+ var x = symbol(s, 150);
+
+ x.led = function(left) {
+ if (state.option.plusplus) {
+ warning("W016", this, this.id);
+ } else if ((!left.identifier || isReserved(left)) && left.id !== "." && left.id !== "[") {
+ warning("W017", this);
+ }
+
+ this.left = left;
+ return this;
+ };
+ return x;
+ }
+
+ function optionalidentifier(fnparam, prop, preserve) {
+ if (!state.tokens.next.identifier) {
+ return;
+ }
+
+ if (!preserve) {
+ advance();
+ }
+
+ var curr = state.tokens.curr;
+ var val = state.tokens.curr.value;
+
+ if (!isReserved(curr)) {
+ return val;
+ }
+
+ if (prop) {
+ if (state.option.inES5()) {
+ return val;
+ }
+ }
+
+ if (fnparam && val === "undefined") {
+ return val;
+ }
+
+ warning("W024", state.tokens.curr, state.tokens.curr.id);
+ return val;
+ }
+ function identifier(fnparam, prop) {
+ var i = optionalidentifier(fnparam, prop, false);
+ if (i) {
+ return i;
+ }
+ if (state.tokens.next.value === "...") {
+ if (!state.option.esnext) {
+ warning("W119", state.tokens.next, "spread/rest operator");
+ }
+ advance();
+
+ if (checkPunctuators(state.tokens.next, ["..."])) {
+ warning("E024", state.tokens.next, "...");
+ while (checkPunctuators(state.tokens.next, ["..."])) {
+ advance();
+ }
+ }
+
+ if (!state.tokens.next.identifier) {
+ warning("E024", state.tokens.curr, "...");
+ return;
+ }
+
+ return identifier(fnparam, prop);
+ } else {
+ error("E030", state.tokens.next, state.tokens.next.value);
+ if (state.tokens.next.id !== ";") {
+ advance();
+ }
+ }
+ }
+
+
+ function reachable(controlToken) {
+ var i = 0, t;
+ if (state.tokens.next.id !== ";" || controlToken.inBracelessBlock) {
+ return;
+ }
+ for (;;) {
+ do {
+ t = peek(i);
+ i += 1;
+ } while (t.id != "(end)" && t.id === "(comment)");
+
+ if (t.reach) {
+ return;
+ }
+ if (t.id !== "(endline)") {
+ if (t.id === "function") {
+ if (state.option.latedef === true) {
+ warning("W026", t);
+ }
+ break;
+ }
+
+ warning("W027", t, t.value, controlToken.value);
+ break;
+ }
+ }
+ }
+
+ function parseFinalSemicolon() {
+ if (state.tokens.next.id !== ";") {
+ if (state.tokens.next.isUnclosed) return advance();
+ if (!state.option.asi) {
+ if (!state.option.lastsemic || state.tokens.next.id !== "}" ||
+ startLine(state.tokens.next) !== state.tokens.curr.line) {
+ warningAt("W033", state.tokens.curr.line, state.tokens.curr.character);
+ }
+ }
+ } else {
+ advance(";");
+ }
+ }
+
+ function statement() {
+ var i = indent, r, s = scope, t = state.tokens.next;
+
+ if (t.id === ";") {
+ advance(";");
+ return;
+ }
+ var res = isReserved(t);
+
+ if (res && t.meta && t.meta.isFutureReservedWord && peek().id === ":") {
+ warning("W024", t, t.id);
+ res = false;
+ }
+ if (t.value === "module" && t.type === "(identifier)") {
+ if (peek().type === "(identifier)") {
+ if (!state.option.inESNext()) {
+ warning("W119", state.tokens.curr, "module");
+ }
+
+ advance("module");
+ var name = identifier();
+ addlabel(name, { type: "unused", token: state.tokens.curr });
+ advance("from");
+ advance("(string)");
+ parseFinalSemicolon();
+ return;
+ }
+ }
+
+ if (t.identifier && !res && peek().id === ":") {
+ advance();
+ advance(":");
+ scope = Object.create(s);
+ addlabel(t.value, { type: "label" });
+
+ if (!state.tokens.next.labelled && state.tokens.next.value !== "{") {
+ warning("W028", state.tokens.next, t.value, state.tokens.next.value);
+ }
+
+ state.tokens.next.label = t.value;
+ t = state.tokens.next;
+ }
+
+ if (t.id === "{") {
+ var iscase = (funct["(verb)"] === "case" && state.tokens.curr.value === ":");
+ block(true, true, false, false, iscase);
+ return;
+ }
+
+ r = expression(0, true);
+
+ if (r && (!r.identifier || r.value !== "function") && (r.type !== "(punctuator)")) {
+ if (!state.directive["use strict"] &&
+ state.option.globalstrict &&
+ state.option.strict) {
+ warning("E007");
+ }
+ }
+
+ if (!t.block) {
+ if (!state.option.expr && (!r || !r.exps)) {
+ warning("W030", state.tokens.curr);
+ } else if (state.option.nonew && r && r.left && r.id === "(" && r.left.id === "new") {
+ warning("W031", t);
+ }
+ parseFinalSemicolon();
+ }
+
+ indent = i;
+ scope = s;
+ return r;
+ }
+
+
+ function statements() {
+ var a = [], p;
+
+ while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") {
+ if (state.tokens.next.id === ";") {
+ p = peek();
+
+ if (!p || (p.id !== "(" && p.id !== "[")) {
+ warning("W032");
+ }
+
+ advance(";");
+ } else {
+ a.push(statement());
+ }
+ }
+ return a;
+ }
+ function directives() {
+ var i, p, pn;
+
+ while (state.tokens.next.id === "(string)") {
+ p = peek(0);
+ if (p.id === "(endline)") {
+ i = 1;
+ do {
+ pn = peek(i++);
+ } while (pn.id === "(endline)");
+ if (pn.id === ";") {
+ p = pn;
+ } else if (pn.value === "[" || pn.value === ".") {
+ return;
+ } else if (!state.option.asi || pn.value === "(") {
+ warning("W033", state.tokens.next);
+ }
+ } else if (p.id === "." || p.id === "[") {
+ return;
+ } else if (p.id !== ";") {
+ warning("W033", p);
+ }
+
+ advance();
+ if (state.directive[state.tokens.curr.value]) {
+ warning("W034", state.tokens.curr, state.tokens.curr.value);
+ }
+
+ if (state.tokens.curr.value === "use strict") {
+ if (!state.option["(explicitNewcap)"]) {
+ state.option.newcap = true;
+ }
+ state.option.undef = true;
+ }
+ state.directive[state.tokens.curr.value] = true;
+
+ if (p.id === ";") {
+ advance(";");
+ }
+ }
+ }
+ function block(ordinary, stmt, isfunc, isfatarrow, iscase) {
+ var a,
+ b = inblock,
+ old_indent = indent,
+ m,
+ s = scope,
+ t,
+ line,
+ d;
+
+ inblock = ordinary;
+
+ if (!ordinary || !state.option.funcscope)
+ scope = Object.create(scope);
+
+ t = state.tokens.next;
+
+ var metrics = funct["(metrics)"];
+ metrics.nestedBlockDepth += 1;
+ metrics.verifyMaxNestedBlockDepthPerFunction();
+
+ if (state.tokens.next.id === "{") {
+ advance("{");
+ funct["(blockscope)"].stack();
+
+ line = state.tokens.curr.line;
+ if (state.tokens.next.id !== "}") {
+ indent += state.option.indent;
+ while (!ordinary && state.tokens.next.from > indent) {
+ indent += state.option.indent;
+ }
+
+ if (isfunc) {
+ m = {};
+ for (d in state.directive) {
+ if (_.has(state.directive, d)) {
+ m[d] = state.directive[d];
+ }
+ }
+ directives();
+
+ if (state.option.strict && funct["(context)"]["(global)"]) {
+ if (!m["use strict"] && !state.directive["use strict"]) {
+ warning("E007");
+ }
+ }
+ }
+
+ a = statements();
+
+ metrics.statementCount += a.length;
+
+ if (isfunc) {
+ state.directive = m;
+ }
+
+ indent -= state.option.indent;
+ }
+
+ advance("}", t);
+
+ funct["(blockscope)"].unstack();
+
+ indent = old_indent;
+ } else if (!ordinary) {
+ if (isfunc) {
+ m = {};
+ if (stmt && !isfatarrow && !state.option.inMoz(true)) {
+ error("W118", state.tokens.curr, "function closure expressions");
+ }
+
+ if (!stmt) {
+ for (d in state.directive) {
+ if (_.has(state.directive, d)) {
+ m[d] = state.directive[d];
+ }
+ }
+ }
+ expression(10);
+
+ if (state.option.strict && funct["(context)"]["(global)"]) {
+ if (!m["use strict"] && !state.directive["use strict"]) {
+ warning("E007");
+ }
+ }
+ } else {
+ error("E021", state.tokens.next, "{", state.tokens.next.value);
+ }
+ } else {
+ funct["(nolet)"] = true;
+
+ if (!stmt || state.option.curly) {
+ warning("W116", state.tokens.next, "{", state.tokens.next.value);
+ }
+
+ state.tokens.next.inBracelessBlock = true;
+ indent += state.option.indent;
+ a = [statement()];
+ indent -= state.option.indent;
+
+ delete funct["(nolet)"];
+ }
+ switch (funct["(verb)"]) {
+ case "break":
+ case "continue":
+ case "return":
+ case "throw":
+ if (iscase) {
+ break;
+ }
+ default:
+ funct["(verb)"] = null;
+ }
+
+ if (!ordinary || !state.option.funcscope) scope = s;
+ inblock = b;
+ if (ordinary && state.option.noempty && (!a || a.length === 0)) {
+ warning("W035", state.tokens.prev);
+ }
+ metrics.nestedBlockDepth -= 1;
+ return a;
+ }
+
+
+ function countMember(m) {
+ if (membersOnly && typeof membersOnly[m] !== "boolean") {
+ warning("W036", state.tokens.curr, m);
+ }
+ if (typeof member[m] === "number") {
+ member[m] += 1;
+ } else {
+ member[m] = 1;
+ }
+ }
+
+
+ function note_implied(tkn) {
+ var name = tkn.value;
+ var desc = Object.getOwnPropertyDescriptor(implied, name);
+
+ if (!desc)
+ implied[name] = [tkn.line];
+ else
+ desc.value.push(tkn.line);
+ }
+
+ type("(number)", function() {
+ return this;
+ });
+
+ type("(string)", function() {
+ return this;
+ });
+
+ state.syntax["(identifier)"] = {
+ type: "(identifier)",
+ lbp: 0,
+ identifier: true,
+
+ nud: function() {
+ var v = this.value;
+ var s = scope[v];
+ var f;
+ var block;
+ if (state.tokens.next.id === "=>") {
+ return this;
+ }
+
+ if (typeof s === "function") {
+ s = undefined;
+ } else if (!funct["(blockscope)"].current.has(v) && typeof s === "boolean") {
+ f = funct;
+ funct = functions[0];
+ addlabel(v, { type: "var" });
+ s = funct;
+ funct = f;
+ }
+
+ block = funct["(blockscope)"].getlabel(v);
+ if (funct === s || block) {
+ switch (block ? block[v]["(type)"] : funct[v]) {
+ case "unused":
+ if (block) block[v]["(type)"] = "var";
+ else funct[v] = "var";
+ break;
+ case "unction":
+ if (block) block[v]["(type)"] = "function";
+ else funct[v] = "function";
+ this["function"] = true;
+ break;
+ case "const":
+ setprop(funct, v, { unused: false });
+ break;
+ case "function":
+ this["function"] = true;
+ break;
+ case "label":
+ warning("W037", state.tokens.curr, v);
+ break;
+ }
+ } else {
+
+ switch (funct[v]) {
+ case "closure":
+ case "function":
+ case "var":
+ case "unused":
+ warning("W038", state.tokens.curr, v);
+ break;
+ case "label":
+ warning("W037", state.tokens.curr, v);
+ break;
+ case "outer":
+ case "global":
+ break;
+ default:
+ if (s === true) {
+ funct[v] = true;
+ } else if (s === null) {
+ warning("W039", state.tokens.curr, v);
+ note_implied(state.tokens.curr);
+ } else if (typeof s !== "object") {
+
+ if (!funct["(comparray)"].check(v)) {
+ isundef(funct, "W117", state.tokens.curr, v);
+ }
+ if (!funct["(global)"]) {
+ funct[v] = true;
+ }
+
+ note_implied(state.tokens.curr);
+ } else {
+ switch (s[v]) {
+ case "function":
+ case "unction":
+ this["function"] = true;
+ s[v] = "closure";
+ funct[v] = s["(global)"] ? "global" : "outer";
+ break;
+ case "var":
+ case "unused":
+ s[v] = "closure";
+ funct[v] = s["(global)"] ? "global" : "outer";
+ break;
+ case "const":
+ setprop(s, v, { unused: false });
+ break;
+ case "closure":
+ funct[v] = s["(global)"] ? "global" : "outer";
+ break;
+ case "label":
+ warning("W037", state.tokens.curr, v);
+ }
+ }
+ }
+ }
return this;
},
- value: function() {
- return this._wrapped;
+
+ led: function() {
+ error("E033", state.tokens.next, state.tokens.next.value);
}
+ };
+ var baseTemplateSyntax = {
+ lbp: 0,
+ identifier: false,
+ template: true,
+ };
+ state.syntax["(template)"] = _.extend({
+ type: "(template)",
+ nud: doTemplateLiteral,
+ led: doTemplateLiteral,
+ noSubst: false
+ }, baseTemplateSyntax);
+
+ state.syntax["(template middle)"] = _.extend({
+ type: "(template middle)",
+ middle: true,
+ noSubst: false
+ }, baseTemplateSyntax);
+
+ state.syntax["(template tail)"] = _.extend({
+ type: "(template tail)",
+ tail: true,
+ noSubst: false
+ }, baseTemplateSyntax);
+
+ state.syntax["(no subst template)"] = _.extend({
+ type: "(template)",
+ nud: doTemplateLiteral,
+ led: doTemplateLiteral,
+ noSubst: true,
+ tail: true // mark as tail, since it's always the last component
+ }, baseTemplateSyntax);
+
+ type("(regexp)", function() {
+ return this;
+ });
+
+ delim("(endline)");
+ delim("(begin)");
+ delim("(end)").reach = true;
+ delim("(error)").reach = true;
+ delim("}").reach = true;
+ delim(")");
+ delim("]");
+ delim("\"").reach = true;
+ delim("'").reach = true;
+ delim(";");
+ delim(":").reach = true;
+ delim("#");
+
+ reserve("else");
+ reserve("case").reach = true;
+ reserve("catch");
+ reserve("default").reach = true;
+ reserve("finally");
+ reservevar("arguments", function(x) {
+ if (state.directive["use strict"] && funct["(global)"]) {
+ warning("E008", x);
+ }
});
+ reservevar("eval");
+ reservevar("false");
+ reservevar("Infinity");
+ reservevar("null");
+ reservevar("this", function(x) {
+ if (state.directive["use strict"] && !isMethod() &&
+ !state.option.validthis && ((funct["(statement)"] &&
+ funct["(name)"].charAt(0) > "Z") || funct["(global)"])) {
+ warning("W040", x);
+ }
+ });
+ reservevar("true");
+ reservevar("undefined");
+
+ assignop("=", "assign", 20);
+ assignop("+=", "assignadd", 20);
+ assignop("-=", "assignsub", 20);
+ assignop("*=", "assignmult", 20);
+ assignop("/=", "assigndiv", 20).nud = function() {
+ error("E014");
+ };
+ assignop("%=", "assignmod", 20);
+
+ bitwiseassignop("&=");
+ bitwiseassignop("|=");
+ bitwiseassignop("^=");
+ bitwiseassignop("<<=");
+ bitwiseassignop(">>=");
+ bitwiseassignop(">>>=");
+ infix(",", function(left, that) {
+ var expr;
+ that.exprs = [left];
+
+ if (state.option.nocomma) {
+ warning("W127");
+ }
+
+ if (!comma({ peek: true })) {
+ return that;
+ }
+ while (true) {
+ if (!(expr = expression(10))) {
+ break;
+ }
+ that.exprs.push(expr);
+ if (state.tokens.next.value !== "," || !comma()) {
+ break;
+ }
+ }
+ return that;
+ }, 10, true);
+
+ infix("?", function(left, that) {
+ increaseComplexityCount();
+ that.left = left;
+ that.right = expression(10);
+ advance(":");
+ that["else"] = expression(10);
+ return that;
+ }, 30);
+
+ var orPrecendence = 40;
+ infix("||", function(left, that) {
+ increaseComplexityCount();
+ that.left = left;
+ that.right = expression(orPrecendence);
+ return that;
+ }, orPrecendence);
+ infix("&&", "and", 50);
+ bitwise("|", "bitor", 70);
+ bitwise("^", "bitxor", 80);
+ bitwise("&", "bitand", 90);
+ relation("==", function(left, right) {
+ var eqnull = state.option.eqnull && (left.value === "null" || right.value === "null");
+
+ switch (true) {
+ case !eqnull && state.option.eqeqeq:
+ this.from = this.character;
+ warning("W116", this, "===", "==");
+ break;
+ case isPoorRelation(left):
+ warning("W041", this, "===", left.value);
+ break;
+ case isPoorRelation(right):
+ warning("W041", this, "===", right.value);
+ break;
+ case isTypoTypeof(right, left):
+ warning("W122", this, right.value);
+ break;
+ case isTypoTypeof(left, right):
+ warning("W122", this, left.value);
+ break;
+ }
+
+ return this;
+ });
+ relation("===", function(left, right) {
+ if (isTypoTypeof(right, left)) {
+ warning("W122", this, right.value);
+ } else if (isTypoTypeof(left, right)) {
+ warning("W122", this, left.value);
+ }
+ return this;
+ });
+ relation("!=", function(left, right) {
+ var eqnull = state.option.eqnull &&
+ (left.value === "null" || right.value === "null");
+
+ if (!eqnull && state.option.eqeqeq) {
+ this.from = this.character;
+ warning("W116", this, "!==", "!=");
+ } else if (isPoorRelation(left)) {
+ warning("W041", this, "!==", left.value);
+ } else if (isPoorRelation(right)) {
+ warning("W041", this, "!==", right.value);
+ } else if (isTypoTypeof(right, left)) {
+ warning("W122", this, right.value);
+ } else if (isTypoTypeof(left, right)) {
+ warning("W122", this, left.value);
+ }
+ return this;
+ });
+ relation("!==", function(left, right) {
+ if (isTypoTypeof(right, left)) {
+ warning("W122", this, right.value);
+ } else if (isTypoTypeof(left, right)) {
+ warning("W122", this, left.value);
+ }
+ return this;
+ });
+ relation("<");
+ relation(">");
+ relation("<=");
+ relation(">=");
+ bitwise("<<", "shiftleft", 120);
+ bitwise(">>", "shiftright", 120);
+ bitwise(">>>", "shiftrightunsigned", 120);
+ infix("in", "in", 120);
+ infix("instanceof", "instanceof", 120);
+ infix("+", function(left, that) {
+ var right;
+ that.left = left;
+ that.right = right = expression(130);
+
+ if (left && right && left.id === "(string)" && right.id === "(string)") {
+ left.value += right.value;
+ left.character = right.character;
+ if (!state.option.scripturl && reg.javascriptURL.test(left.value)) {
+ warning("W050", left);
+ }
+ return left;
+ }
+
+ return that;
+ }, 130);
+ prefix("+", "num");
+ prefix("+++", function() {
+ warning("W007");
+ this.arity = "unary";
+ this.right = expression(150);
+ return this;
+ });
+ infix("+++", function(left) {
+ warning("W007");
+ this.left = left;
+ this.right = expression(130);
+ return this;
+ }, 130);
+ infix("-", "sub", 130);
+ prefix("-", "neg");
+ prefix("---", function() {
+ warning("W006");
+ this.arity = "unary";
+ this.right = expression(150);
+ return this;
+ });
+ infix("---", function(left) {
+ warning("W006");
+ this.left = left;
+ this.right = expression(130);
+ return this;
+ }, 130);
+ infix("*", "mult", 140);
+ infix("/", "div", 140);
+ infix("%", "mod", 140);
+
+ suffix("++");
+ prefix("++", "preinc");
+ state.syntax["++"].exps = true;
+
+ suffix("--");
+ prefix("--", "predec");
+ state.syntax["--"].exps = true;
+ prefix("delete", function() {
+ var p = expression(10);
+ if (!p) {
+ return this;
+ }
+
+ if (p.id !== "." && p.id !== "[") {
+ warning("W051");
+ }
+ this.first = p;
+ if (p.identifier && !state.directive["use strict"]) {
+ p.forgiveUndef = true;
+ }
+ return this;
+ }).exps = true;
+
+ prefix("~", function() {
+ if (state.option.bitwise) {
+ warning("W016", this, "~");
+ }
+ this.arity = "unary";
+ expression(150);
+ return this;
+ });
+
+ prefix("...", function() {
+ if (!state.option.esnext) {
+ warning("W119", this, "spread/rest operator");
+ }
+ if (!state.tokens.next.identifier &&
+ state.tokens.next.type !== "(string)" &&
+ !checkPunctuators(state.tokens.next, ["[", "("])) {
+
+ error("E030", state.tokens.next, state.tokens.next.value);
+ }
+ expression(150);
+ return this;
+ });
+
+ prefix("!", function() {
+ this.arity = "unary";
+ this.right = expression(150);
+
+ if (!this.right) { // '!' followed by nothing? Give up.
+ quit("E041", this.line || 0);
+ }
+
+ if (bang[this.right.id] === true) {
+ warning("W018", this, "!");
+ }
+ return this;
+ });
+
+ prefix("typeof", (function() {
+ var p = expression(150);
+ this.first = p;
+ if (p.identifier) {
+ p.forgiveUndef = true;
+ }
+ return this;
+ }));
+ prefix("new", function() {
+ var c = expression(155), i;
+ if (c && c.id !== "function") {
+ if (c.identifier) {
+ c["new"] = true;
+ switch (c.value) {
+ case "Number":
+ case "String":
+ case "Boolean":
+ case "Math":
+ case "JSON":
+ warning("W053", state.tokens.prev, c.value);
+ break;
+ case "Symbol":
+ if (state.option.esnext) {
+ warning("W053", state.tokens.prev, c.value);
+ }
+ break;
+ case "Function":
+ if (!state.option.evil) {
+ warning("W054");
+ }
+ break;
+ case "Date":
+ case "RegExp":
+ case "this":
+ break;
+ default:
+ if (c.id !== "function") {
+ i = c.value.substr(0, 1);
+ if (state.option.newcap && (i < "A" || i > "Z") && !_.has(global, c.value)) {
+ warning("W055", state.tokens.curr);
+ }
+ }
+ }
+ } else {
+ if (c.id !== "." && c.id !== "[" && c.id !== "(") {
+ warning("W056", state.tokens.curr);
+ }
+ }
+ } else {
+ if (!state.option.supernew)
+ warning("W057", this);
+ }
+ if (state.tokens.next.id !== "(" && !state.option.supernew) {
+ warning("W058", state.tokens.curr, state.tokens.curr.value);
+ }
+ this.first = c;
+ return this;
+ });
+ state.syntax["new"].exps = true;
+
+ prefix("void").exps = true;
+
+ infix(".", function(left, that) {
+ var m = identifier(false, true);
+
+ if (typeof m === "string") {
+ countMember(m);
+ }
+
+ that.left = left;
+ that.right = m;
+
+ if (m && m === "hasOwnProperty" && state.tokens.next.value === "=") {
+ warning("W001");
+ }
+
+ if (left && left.value === "arguments" && (m === "callee" || m === "caller")) {
+ if (state.option.noarg)
+ warning("W059", left, m);
+ else if (state.directive["use strict"])
+ error("E008");
+ } else if (!state.option.evil && left && left.value === "document" &&
+ (m === "write" || m === "writeln")) {
+ warning("W060", left);
+ }
+
+ if (!state.option.evil && (m === "eval" || m === "execScript")) {
+ if (isGlobalEval(left, state, funct)) {
+ warning("W061");
+ }
+ }
+
+ return that;
+ }, 160, true);
-}).call(this);
+ infix("(", function(left, that) {
+ if (state.option.immed && left && !left.immed && left.id === "function") {
+ warning("W062");
+ }
+
+ var n = 0;
+ var p = [];
+
+ if (left) {
+ if (left.type === "(identifier)") {
+ if (left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)) {
+ if ("Number String Boolean Date Object Error Symbol".indexOf(left.value) === -1) {
+ if (left.value === "Math") {
+ warning("W063", left);
+ } else if (state.option.newcap) {
+ warning("W064", left);
+ }
+ }
+ }
+ }
+ }
+
+ if (state.tokens.next.id !== ")") {
+ for (;;) {
+ p[p.length] = expression(10);
+ n += 1;
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ }
+
+ advance(")");
+
+ if (typeof left === "object") {
+ if (state.option.inES3() && left.value === "parseInt" && n === 1) {
+ warning("W065", state.tokens.curr);
+ }
+ if (!state.option.evil) {
+ if (left.value === "eval" || left.value === "Function" ||
+ left.value === "execScript") {
+ warning("W061", left);
+
+ if (p[0] && [0].id === "(string)") {
+ addInternalSrc(left, p[0].value);
+ }
+ } else if (p[0] && p[0].id === "(string)" &&
+ (left.value === "setTimeout" ||
+ left.value === "setInterval")) {
+ warning("W066", left);
+ addInternalSrc(left, p[0].value);
+ } else if (p[0] && p[0].id === "(string)" &&
+ left.value === "." &&
+ left.left.value === "window" &&
+ (left.right === "setTimeout" ||
+ left.right === "setInterval")) {
+ warning("W066", left);
+ addInternalSrc(left, p[0].value);
+ }
+ }
+ if (!left.identifier && left.id !== "." && left.id !== "[" &&
+ left.id !== "(" && left.id !== "&&" && left.id !== "||" &&
+ left.id !== "?" && !(state.option.esnext && left["(name)"])) {
+ warning("W067", that);
+ }
+ }
+
+ that.left = left;
+ return that;
+ }, 155, true).exps = true;
+
+ prefix("(", function() {
+ var pn = state.tokens.next, pn1, i = -1;
+ var ret, triggerFnExpr, first, last;
+ var parens = 1;
+ var opening = state.tokens.curr;
+ var preceeding = state.tokens.prev;
+ var isNecessary = !state.option.singleGroups;
+
+ do {
+ if (pn.value === "(") {
+ parens += 1;
+ } else if (pn.value === ")") {
+ parens -= 1;
+ }
+
+ i += 1;
+ pn1 = pn;
+ pn = peek(i);
+ } while (!(parens === 0 && pn1.value === ")") && pn.value !== ";" && pn.type !== "(end)");
+
+ if (state.tokens.next.id === "function") {
+ triggerFnExpr = state.tokens.next.immed = true;
+ }
+ if (pn.value === "=>") {
+ return doFunction({ type: "arrow", parsedOpening: true });
+ }
+
+ var exprs = [];
+
+ if (state.tokens.next.id !== ")") {
+ for (;;) {
+ exprs.push(expression(10));
+
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+
+ if (state.option.nocomma) {
+ warning("W127");
+ }
+
+ comma();
+ }
+ }
+
+ advance(")", this);
+ if (state.option.immed && exprs[0] && exprs[0].id === "function") {
+ if (state.tokens.next.id !== "(" &&
+ state.tokens.next.id !== "." && state.tokens.next.id !== "[") {
+ warning("W068", this);
+ }
+ }
+
+ if (!exprs.length) {
+ return;
+ }
+ if (exprs.length > 1) {
+ ret = Object.create(state.syntax[","]);
+ ret.exprs = exprs;
+
+ first = exprs[0];
+ last = exprs[exprs.length - 1];
+
+ if (!isNecessary) {
+ isNecessary = preceeding.assign || preceeding.delim;
+ }
+ } else {
+ ret = first = last = exprs[0];
+
+ if (!isNecessary) {
+ isNecessary =
+ (opening.beginsStmt && (ret.id === "{" || triggerFnExpr || isFunctor(ret))) ||
+ (ret.id === "{" && preceeding.id === "=>") ||
+ (first.id === "+" && preceeding.id === "+");
+ }
+ }
+
+ if (ret) {
+ if (!isNecessary && (first.left || ret.exprs)) {
+ isNecessary =
+ (!isBeginOfExpr(preceeding) && first.lbp < preceeding.lbp) ||
+ (!isEndOfExpr() && last.lbp < state.tokens.next.lbp);
+ }
+
+ if (!isNecessary) {
+ warning("W126", opening);
+ }
+
+ ret.paren = true;
+ }
+
+ return ret;
+ });
+
+ application("=>");
+
+ infix("[", function(left, that) {
+ var e = expression(10), s;
+ if (e && e.type === "(string)") {
+ if (!state.option.evil && (e.value === "eval" || e.value === "execScript")) {
+ if (isGlobalEval(left, state, funct)) {
+ warning("W061");
+ }
+ }
+
+ countMember(e.value);
+ if (!state.option.sub && reg.identifier.test(e.value)) {
+ s = state.syntax[e.value];
+ if (!s || !isReserved(s)) {
+ warning("W069", state.tokens.prev, e.value);
+ }
+ }
+ }
+ advance("]", that);
+
+ if (e && e.value === "hasOwnProperty" && state.tokens.next.value === "=") {
+ warning("W001");
+ }
+
+ that.left = left;
+ that.right = e;
+ return that;
+ }, 160, true);
+
+ function comprehensiveArrayExpression() {
+ var res = {};
+ res.exps = true;
+ funct["(comparray)"].stack();
+ var reversed = false;
+ if (state.tokens.next.value !== "for") {
+ reversed = true;
+ if (!state.option.inMoz(true)) {
+ warning("W116", state.tokens.next, "for", state.tokens.next.value);
+ }
+ funct["(comparray)"].setState("use");
+ res.right = expression(10);
+ }
+
+ advance("for");
+ if (state.tokens.next.value === "each") {
+ advance("each");
+ if (!state.option.inMoz(true)) {
+ warning("W118", state.tokens.curr, "for each");
+ }
+ }
+ advance("(");
+ funct["(comparray)"].setState("define");
+ res.left = expression(130);
+ if (_.contains(["in", "of"], state.tokens.next.value)) {
+ advance();
+ } else {
+ error("E045", state.tokens.curr);
+ }
+ funct["(comparray)"].setState("generate");
+ expression(10);
+
+ advance(")");
+ if (state.tokens.next.value === "if") {
+ advance("if");
+ advance("(");
+ funct["(comparray)"].setState("filter");
+ res.filter = expression(10);
+ advance(")");
+ }
+
+ if (!reversed) {
+ funct["(comparray)"].setState("use");
+ res.right = expression(10);
+ }
+
+ advance("]");
+ funct["(comparray)"].unstack();
+ return res;
+ }
+
+ prefix("[", function() {
+ var blocktype = lookupBlockType();
+ if (blocktype.isCompArray) {
+ if (!state.option.inESNext()) {
+ warning("W119", state.tokens.curr, "array comprehension");
+ }
+ return comprehensiveArrayExpression();
+ } else if (blocktype.isDestAssign && !state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "destructuring assignment");
+ }
+ var b = state.tokens.curr.line !== startLine(state.tokens.next);
+ this.first = [];
+ if (b) {
+ indent += state.option.indent;
+ if (state.tokens.next.from === indent + state.option.indent) {
+ indent += state.option.indent;
+ }
+ }
+ while (state.tokens.next.id !== "(end)") {
+ while (state.tokens.next.id === ",") {
+ if (!state.option.elision) {
+ if (!state.option.inES5()) {
+ warning("W070");
+ } else {
+ warning("W128");
+ do {
+ advance(",");
+ } while (state.tokens.next.id === ",");
+ continue;
+ }
+ }
+ advance(",");
+ }
+
+ if (state.tokens.next.id === "]") {
+ break;
+ }
+
+ this.first.push(expression(10));
+ if (state.tokens.next.id === ",") {
+ comma({ allowTrailing: true });
+ if (state.tokens.next.id === "]" && !state.option.inES5(true)) {
+ warning("W070", state.tokens.curr);
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ if (b) {
+ indent -= state.option.indent;
+ }
+ advance("]", this);
+ return this;
+ });
+
+
+ function isMethod() {
+ return funct["(statement)"] && funct["(statement)"].type === "class" ||
+ funct["(context)"] && funct["(context)"]["(verb)"] === "class";
+ }
+
+
+ function isPropertyName(token) {
+ return token.identifier || token.id === "(string)" || token.id === "(number)";
+ }
+
+
+ function propertyName(preserveOrToken) {
+ var id;
+ var preserve = true;
+ if (typeof preserveOrToken === "object") {
+ id = preserveOrToken;
+ } else {
+ preserve = preserveOrToken;
+ id = optionalidentifier(false, true, preserve);
+ }
+
+ if (!id) {
+ if (state.tokens.next.id === "(string)") {
+ id = state.tokens.next.value;
+ if (!preserve) {
+ advance();
+ }
+ } else if (state.tokens.next.id === "(number)") {
+ id = state.tokens.next.value.toString();
+ if (!preserve) {
+ advance();
+ }
+ }
+ } else if (typeof id === "object") {
+ if (id.id === "(string)" || id.id === "(identifier)") id = id.value;
+ else if (id.id === "(number)") id = id.value.toString();
+ }
+
+ if (id === "hasOwnProperty") {
+ warning("W001");
+ }
+
+ return id;
+ }
+ function functionparams(options) {
+ var next;
+ var params = [];
+ var ident;
+ var tokens = [];
+ var t;
+ var pastDefault = false;
+ var pastRest = false;
+ var loneArg = options && options.loneArg;
+
+ if (loneArg && loneArg.identifier === true) {
+ addlabel(loneArg.value, { type: "unused", token: loneArg });
+ return [loneArg];
+ }
+
+ next = state.tokens.next;
+
+ if (!options || !options.parsedOpening) {
+ advance("(");
+ }
+
+ if (state.tokens.next.id === ")") {
+ advance(")");
+ return;
+ }
+
+ for (;;) {
+ if (_.contains(["{", "["], state.tokens.next.id)) {
+ tokens = destructuringExpression();
+ for (t in tokens) {
+ t = tokens[t];
+ if (t.id) {
+ params.push(t.id);
+ addlabel(t.id, { type: "unused", token: t.token });
+ }
+ }
+ } else {
+ if (checkPunctuators(state.tokens.next, ["..."])) pastRest = true;
+ ident = identifier(true);
+ if (ident) {
+ params.push(ident);
+ addlabel(ident, { type: "unused", token: state.tokens.curr });
+ } else {
+ while (!checkPunctuators(state.tokens.next, [",", ")"])) advance();
+ }
+ }
+ if (pastDefault) {
+ if (state.tokens.next.id !== "=") {
+ error("E051", state.tokens.current);
+ }
+ }
+ if (state.tokens.next.id === "=") {
+ if (!state.option.inESNext()) {
+ warning("W119", state.tokens.next, "default parameters");
+ }
+ advance("=");
+ pastDefault = true;
+ expression(10);
+ }
+ if (state.tokens.next.id === ",") {
+ if (pastRest) {
+ warning("W131", state.tokens.next);
+ }
+ comma();
+ } else {
+ advance(")", next);
+ return params;
+ }
+ }
+ }
+
+ function setprop(funct, name, values) {
+ if (!funct["(properties)"][name]) {
+ funct["(properties)"][name] = { unused: false };
+ }
+
+ _.extend(funct["(properties)"][name], values);
+ }
+
+ function getprop(funct, name, prop) {
+ if (!funct["(properties)"][name])
+ return null;
+
+ return funct["(properties)"][name][prop] || null;
+ }
+
+ function functor(name, token, scope, overwrites) {
+ var funct = {
+ "(name)" : name,
+ "(breakage)" : 0,
+ "(loopage)" : 0,
+ "(scope)" : scope,
+ "(tokens)" : {},
+ "(properties)": {},
+
+ "(catch)" : false,
+ "(global)" : false,
+
+ "(line)" : null,
+ "(character)" : null,
+ "(metrics)" : null,
+ "(statement)" : null,
+ "(context)" : null,
+ "(blockscope)": null,
+ "(comparray)" : null,
+ "(generator)" : null,
+ "(params)" : null
+ };
+
+ if (token) {
+ _.extend(funct, {
+ "(line)" : token.line,
+ "(character)": token.character,
+ "(metrics)" : createMetrics(token)
+ });
+ }
+
+ _.extend(funct, overwrites);
+
+ if (funct["(context)"]) {
+ funct["(blockscope)"] = funct["(context)"]["(blockscope)"];
+ funct["(comparray)"] = funct["(context)"]["(comparray)"];
+ }
+
+ return funct;
+ }
+
+ function isFunctor(token) {
+ return "(scope)" in token;
+ }
+
+ function doTemplateLiteral(left) {
+ var ctx = this.context;
+ var noSubst = this.noSubst;
+ var depth = this.depth;
+
+ if (!noSubst) {
+ while (!end() && state.tokens.next.id !== "(end)") {
+ if (!state.tokens.next.template || state.tokens.next.depth > depth) {
+ expression(0); // should probably have different rbp?
+ } else {
+ advance();
+ }
+ }
+ }
+
+ return {
+ id: "(template)",
+ type: "(template)",
+ tag: left
+ };
+
+ function end() {
+ if (state.tokens.curr.template && state.tokens.curr.tail &&
+ state.tokens.curr.context === ctx) return true;
+ var complete = (state.tokens.next.template && state.tokens.next.tail &&
+ state.tokens.next.context === ctx);
+ if (complete) advance();
+ return complete || state.tokens.next.isUnclosed;
+ }
+ }
+ function doFunction(options) {
+ var f, name, statement, classExprBinding, isGenerator, isArrow;
+ var oldOption = state.option;
+ var oldIgnored = state.ignored;
+ var oldScope = scope;
+
+ if (options) {
+ name = options.name;
+ statement = options.statement;
+ classExprBinding = options.classExprBinding;
+ isGenerator = options.type === "generator";
+ isArrow = options.type === "arrow";
+ }
+
+ state.option = Object.create(state.option);
+ state.ignored = Object.create(state.ignored);
+ scope = Object.create(scope);
+
+ funct = functor(name || state.nameStack.infer(), state.tokens.next, scope, {
+ "(statement)": statement,
+ "(context)": funct,
+ "(generator)": isGenerator
+ });
+
+ f = funct;
+ state.tokens.curr.funct = funct;
+
+ functions.push(funct);
+
+ if (name) {
+ addlabel(name, { type: "function" });
+ }
+
+ if (classExprBinding) {
+ addlabel(classExprBinding, { type: "function" });
+ }
+
+ funct["(params)"] = functionparams(options);
+ funct["(metrics)"].verifyMaxParametersPerFunction(funct["(params)"]);
+
+ if (isArrow) {
+ if (!state.option.esnext) {
+ warning("W119", state.tokens.curr, "arrow function syntax (=>)");
+ }
+
+ if (!options.loneArg) {
+ advance("=>");
+ }
+ }
+
+ block(false, true, true, isArrow);
+
+ if (!state.option.noyield && isGenerator &&
+ funct["(generator)"] !== "yielded") {
+ warning("W124", state.tokens.curr);
+ }
+
+ funct["(metrics)"].verifyMaxStatementsPerFunction();
+ funct["(metrics)"].verifyMaxComplexityPerFunction();
+ funct["(unusedOption)"] = state.option.unused;
+
+ scope = oldScope;
+ state.option = oldOption;
+ state.ignored = oldIgnored;
+ funct["(last)"] = state.tokens.curr.line;
+ funct["(lastcharacter)"] = state.tokens.curr.character;
+
+ _.map(Object.keys(funct), function(key) {
+ if (key[0] === "(") return;
+ funct["(blockscope)"].unshadow(key);
+ });
+
+ funct = funct["(context)"];
+
+ return f;
+ }
+
+ function createMetrics(functionStartToken) {
+ return {
+ statementCount: 0,
+ nestedBlockDepth: -1,
+ ComplexityCount: 1,
+
+ verifyMaxStatementsPerFunction: function() {
+ if (state.option.maxstatements &&
+ this.statementCount > state.option.maxstatements) {
+ warning("W071", functionStartToken, this.statementCount);
+ }
+ },
+
+ verifyMaxParametersPerFunction: function(params) {
+ params = params || [];
+
+ if (state.option.maxparams && params.length > state.option.maxparams) {
+ warning("W072", functionStartToken, params.length);
+ }
+ },
+
+ verifyMaxNestedBlockDepthPerFunction: function() {
+ if (state.option.maxdepth &&
+ this.nestedBlockDepth > 0 &&
+ this.nestedBlockDepth === state.option.maxdepth + 1) {
+ warning("W073", null, this.nestedBlockDepth);
+ }
+ },
+
+ verifyMaxComplexityPerFunction: function() {
+ var max = state.option.maxcomplexity;
+ var cc = this.ComplexityCount;
+ if (max && cc > max) {
+ warning("W074", functionStartToken, cc);
+ }
+ }
+ };
+ }
+
+ function increaseComplexityCount() {
+ funct["(metrics)"].ComplexityCount += 1;
+ }
+
+ function checkCondAssignment(expr) {
+ var id, paren;
+ if (expr) {
+ id = expr.id;
+ paren = expr.paren;
+ if (id === "," && (expr = expr.exprs[expr.exprs.length - 1])) {
+ id = expr.id;
+ paren = paren || expr.paren;
+ }
+ }
+ switch (id) {
+ case "=":
+ case "+=":
+ case "-=":
+ case "*=":
+ case "%=":
+ case "&=":
+ case "|=":
+ case "^=":
+ case "/=":
+ if (!paren && !state.option.boss) {
+ warning("W084");
+ }
+ }
+ }
+ function checkProperties(props) {
+ if (state.option.inES5()) {
+ for (var name in props) {
+ if (_.has(props, name) && props[name].setterToken && !props[name].getterToken) {
+ warning("W078", props[name].setterToken);
+ }
+ }
+ }
+ }
+
+ (function(x) {
+ x.nud = function() {
+ var b, f, i, p, t, g, nextVal;
+ var props = {}; // All properties, including accessors
+
+ b = state.tokens.curr.line !== startLine(state.tokens.next);
+ if (b) {
+ indent += state.option.indent;
+ if (state.tokens.next.from === indent + state.option.indent) {
+ indent += state.option.indent;
+ }
+ }
+
+ for (;;) {
+ if (state.tokens.next.id === "}") {
+ break;
+ }
+
+ nextVal = state.tokens.next.value;
+ if (peek().id !== ":" && (nextVal === "get" || nextVal === "set")) {
+ advance(nextVal);
+
+ if (!state.option.inES5()) {
+ error("E034");
+ }
+
+ i = propertyName();
+ if (!i && !state.option.inESNext()) {
+ error("E035");
+ }
+ if (i) {
+ saveAccessor(nextVal, props, i, state.tokens.curr);
+ }
+
+ t = state.tokens.next;
+ f = doFunction();
+ p = f["(params)"];
+ if (nextVal === "get" && i && p) {
+ warning("W076", t, p[0], i);
+ } else if (nextVal === "set" && i && (!p || p.length !== 1)) {
+ warning("W077", t, i);
+ }
+ } else {
+ if (state.tokens.next.value === "*" && state.tokens.next.type === "(punctuator)") {
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.next, "generator functions");
+ }
+ advance("*");
+ g = true;
+ }
+ if (state.tokens.next.identifier &&
+ (peekIgnoreEOL().id === "," || peekIgnoreEOL().id === "}")) {
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.next, "object short notation");
+ }
+ i = propertyName(true);
+ saveProperty(props, i, state.tokens.next);
+
+ expression(10);
+ } else {
+ if (state.tokens.next.id === "[") {
+ i = computedPropertyName();
+ state.nameStack.set(i);
+ } else {
+ state.nameStack.set(state.tokens.next);
+ i = propertyName();
+ saveProperty(props, i, state.tokens.next);
+
+ if (typeof i !== "string") {
+ break;
+ }
+ }
+
+ if (state.tokens.next.value === "(") {
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "concise methods");
+ }
+ doFunction({ type: g ? "generator" : null });
+ } else {
+ advance(":");
+ expression(10);
+ }
+ }
+ }
+
+ countMember(i);
+
+ if (state.tokens.next.id === ",") {
+ comma({ allowTrailing: true, property: true });
+ if (state.tokens.next.id === ",") {
+ warning("W070", state.tokens.curr);
+ } else if (state.tokens.next.id === "}" && !state.option.inES5(true)) {
+ warning("W070", state.tokens.curr);
+ }
+ } else {
+ break;
+ }
+ }
+ if (b) {
+ indent -= state.option.indent;
+ }
+ advance("}", this);
+
+ checkProperties(props);
+
+ return this;
+ };
+ x.fud = function() {
+ error("E036", state.tokens.curr);
+ };
+ }(delim("{")));
+
+ function destructuringExpression() {
+ var id, ids;
+ var identifiers = [];
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "destructuring expression");
+ }
+ var nextInnerDE = function() {
+ var ident;
+ if (checkPunctuators(state.tokens.next, ["[", "{"])) {
+ ids = destructuringExpression();
+ for (var id in ids) {
+ id = ids[id];
+ identifiers.push({ id: id.id, token: id.token });
+ }
+ } else if (checkPunctuators(state.tokens.next, [","])) {
+ identifiers.push({ id: null, token: state.tokens.curr });
+ } else if (checkPunctuators(state.tokens.next, ["("])) {
+ advance("(");
+ nextInnerDE();
+ advance(")");
+ } else {
+ var is_rest = checkPunctuators(state.tokens.next, ["..."]);
+ ident = identifier();
+ if (ident)
+ identifiers.push({ id: ident, token: state.tokens.curr });
+ return is_rest;
+ }
+ return false;
+ };
+ if (checkPunctuators(state.tokens.next, ["["])) {
+ advance("[");
+ var element_after_rest = false;
+ if (nextInnerDE() && checkPunctuators(state.tokens.next, [","]) &&
+ !element_after_rest) {
+ warning("W130", state.tokens.next);
+ element_after_rest = true;
+ }
+ while (!checkPunctuators(state.tokens.next, ["]"])) {
+ advance(",");
+ if (checkPunctuators(state.tokens.next, ["]"])) {
+ break;
+ }
+ if (nextInnerDE() && checkPunctuators(state.tokens.next, [","]) &&
+ !element_after_rest) {
+ warning("W130", state.tokens.next);
+ element_after_rest = true;
+ }
+ }
+ advance("]");
+ } else if (checkPunctuators(state.tokens.next, ["{"])) {
+ advance("{");
+ id = identifier();
+ if (checkPunctuators(state.tokens.next, [":"])) {
+ advance(":");
+ nextInnerDE();
+ } else {
+ identifiers.push({ id: id, token: state.tokens.curr });
+ }
+ while (!checkPunctuators(state.tokens.next, ["}"])) {
+ advance(",");
+ if (checkPunctuators(state.tokens.next, ["}"])) {
+ break;
+ }
+ id = identifier();
+ if (checkPunctuators(state.tokens.next, [":"])) {
+ advance(":");
+ nextInnerDE();
+ } else {
+ identifiers.push({ id: id, token: state.tokens.curr });
+ }
+ }
+ advance("}");
+ }
+ return identifiers;
+ }
+
+ function destructuringExpressionMatch(tokens, value) {
+ var first = value.first;
+
+ if (!first)
+ return;
+
+ _.zip(tokens, Array.isArray(first) ? first : [ first ]).forEach(function(val) {
+ var token = val[0];
+ var value = val[1];
+
+ if (token && value)
+ token.first = value;
+ else if (token && token.first && !value)
+ warning("W080", token.first, token.first.value);
+ });
+ }
+
+ var conststatement = stmt("const", function(context) {
+ var prefix = context && context.prefix;
+ var inexport = context && context.inexport;
+ var tokens;
+ var value;
+ var lone; // State variable to know if it is a lone identifier, or a destructuring statement.
+
+ if (!state.option.inESNext())
+ warning("W104", state.tokens.curr, "const");
+
+ this.first = [];
+ for (;;) {
+ var names = [];
+ if (_.contains(["{", "["], state.tokens.next.value)) {
+ tokens = destructuringExpression();
+ lone = false;
+ } else {
+ tokens = [ { id: identifier(), token: state.tokens.curr } ];
+ lone = true;
+ if (inexport) {
+ exported[state.tokens.curr.value] = true;
+ state.tokens.curr.exported = true;
+ }
+ }
+ for (var t in tokens) {
+ if (tokens.hasOwnProperty(t)) {
+ t = tokens[t];
+ if (funct[t.id] === "const") {
+ warning("E011", null, t.id);
+ }
+ if (funct["(global)"] && predefined[t.id] === false) {
+ warning("W079", t.token, t.id);
+ }
+ if (t.id) {
+ addlabel(t.id, { token: t.token, type: "const", unused: true });
+ names.push(t.token);
+ }
+ }
+ }
+ if (prefix) {
+ break;
+ }
+
+ this.first = this.first.concat(names);
+
+ if (state.tokens.next.id !== "=") {
+ warning("E012", state.tokens.curr, state.tokens.curr.value);
+ }
+
+ if (state.tokens.next.id === "=") {
+ advance("=");
+ if (state.tokens.next.id === "undefined") {
+ warning("W080", state.tokens.prev, state.tokens.prev.value);
+ }
+ if (peek(0).id === "=" && state.tokens.next.identifier) {
+ warning("W120", state.tokens.next, state.tokens.next.value);
+ }
+ value = expression(10);
+ if (lone) {
+ tokens[0].first = value;
+ } else {
+ destructuringExpressionMatch(names, value);
+ }
+ }
+
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ return this;
+ });
+
+ conststatement.exps = true;
+ var varstatement = stmt("var", function(context) {
+ var prefix = context && context.prefix;
+ var inexport = context && context.inexport;
+ var tokens, lone, value;
+
+ this.first = [];
+ for (;;) {
+ var names = [];
+ if (_.contains(["{", "["], state.tokens.next.value)) {
+ tokens = destructuringExpression();
+ lone = false;
+ } else {
+ tokens = [ { id: identifier(), token: state.tokens.curr } ];
+ lone = true;
+ if (inexport) {
+ exported[state.tokens.curr.value] = true;
+ state.tokens.curr.exported = true;
+ }
+ }
+ for (var t in tokens) {
+ if (tokens.hasOwnProperty(t)) {
+ t = tokens[t];
+ if (state.option.inESNext() && funct[t.id] === "const") {
+ warning("E011", null, t.id);
+ }
+ if (funct["(global)"]) {
+ if (predefined[t.id] === false) {
+ warning("W079", t.token, t.id);
+ } else if (state.option.futurehostile === false) {
+ if ((!state.option.inES5() && vars.ecmaIdentifiers[5][t.id] === false) ||
+ (!state.option.inESNext() && vars.ecmaIdentifiers[6][t.id] === false)) {
+ warning("W129", t.token, t.id);
+ }
+ }
+ }
+ if (t.id) {
+ addlabel(t.id, { type: "unused", token: t.token });
+ names.push(t.token);
+ }
+ }
+ }
+ if (prefix) {
+ break;
+ }
+
+ this.first = this.first.concat(names);
+
+ if (state.tokens.next.id === "=") {
+ state.nameStack.set(state.tokens.curr);
+ advance("=");
+ if (state.tokens.next.id === "undefined") {
+ warning("W080", state.tokens.prev, state.tokens.prev.value);
+ }
+ if (peek(0).id === "=" && state.tokens.next.identifier) {
+ if (!funct["(params)"] || funct["(params)"].indexOf(state.tokens.next.value) === -1) {
+ warning("W120", state.tokens.next, state.tokens.next.value);
+ }
+ }
+ value = expression(10);
+ if (lone) {
+ tokens[0].first = value;
+ } else {
+ destructuringExpressionMatch(names, value);
+ }
+ }
+
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ return this;
+ });
+ varstatement.exps = true;
+
+ var letstatement = stmt("let", function(context) {
+ var prefix = context && context.prefix;
+ var inexport = context && context.inexport;
+ var tokens, lone, value, letblock;
+
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "let");
+ }
+
+ if (state.tokens.next.value === "(") {
+ if (!state.option.inMoz(true)) {
+ warning("W118", state.tokens.next, "let block");
+ }
+ advance("(");
+ funct["(blockscope)"].stack();
+ letblock = true;
+ } else if (funct["(nolet)"]) {
+ error("E048", state.tokens.curr);
+ }
+
+ this.first = [];
+ for (;;) {
+ var names = [];
+ if (_.contains(["{", "["], state.tokens.next.value)) {
+ tokens = destructuringExpression();
+ lone = false;
+ } else {
+ tokens = [ { id: identifier(), token: state.tokens.curr.value } ];
+ lone = true;
+ if (inexport) {
+ exported[state.tokens.curr.value] = true;
+ state.tokens.curr.exported = true;
+ }
+ }
+ for (var t in tokens) {
+ if (tokens.hasOwnProperty(t)) {
+ t = tokens[t];
+ if (state.option.inESNext() && funct[t.id] === "const") {
+ warning("E011", null, t.id);
+ }
+ if (funct["(global)"] && predefined[t.id] === false) {
+ warning("W079", t.token, t.id);
+ }
+ if (t.id && !funct["(nolet)"]) {
+ addlabel(t.id, { type: "unused", token: t.token, islet: true });
+ names.push(t.token);
+ }
+ }
+ }
+ if (prefix) {
+ break;
+ }
+
+ this.first = this.first.concat(names);
+
+ if (state.tokens.next.id === "=") {
+ advance("=");
+ if (state.tokens.next.id === "undefined") {
+ warning("W080", state.tokens.prev, state.tokens.prev.value);
+ }
+ if (peek(0).id === "=" && state.tokens.next.identifier) {
+ warning("W120", state.tokens.next, state.tokens.next.value);
+ }
+ value = expression(10);
+ if (lone) {
+ tokens[0].first = value;
+ } else {
+ destructuringExpressionMatch(names, value);
+ }
+ }
+
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ if (letblock) {
+ advance(")");
+ block(true, true);
+ this.block = true;
+ funct["(blockscope)"].unstack();
+ }
+
+ return this;
+ });
+ letstatement.exps = true;
+
+ blockstmt("class", function() {
+ return classdef.call(this, true);
+ });
+
+ function classdef(isStatement) {
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "class");
+ }
+ if (isStatement) {
+ this.name = identifier();
+ addlabel(this.name, { type: "unused", token: state.tokens.curr });
+ } else if (state.tokens.next.identifier && state.tokens.next.value !== "extends") {
+ this.name = identifier();
+ this.namedExpr = true;
+ } else {
+ this.name = state.nameStack.infer();
+ }
+ classtail(this);
+ return this;
+ }
+
+ function classtail(c) {
+ var strictness = state.directive["use strict"];
+ if (state.tokens.next.value === "extends") {
+ advance("extends");
+ c.heritage = expression(10);
+ }
+ state.directive["use strict"] = true;
+ advance("{");
+ c.body = classbody(c);
+ advance("}");
+ state.directive["use strict"] = strictness;
+ }
+
+ function classbody(c) {
+ var name;
+ var isStatic;
+ var isGenerator;
+ var getset;
+ var props = {};
+ var staticProps = {};
+ var computed;
+ for (var i = 0; state.tokens.next.id !== "}"; ++i) {
+ name = state.tokens.next;
+ isStatic = false;
+ isGenerator = false;
+ getset = null;
+ if (name.id === "*") {
+ isGenerator = true;
+ advance("*");
+ name = state.tokens.next;
+ }
+ if (name.id === "[") {
+ name = computedPropertyName();
+ } else if (isPropertyName(name)) {
+ advance();
+ computed = false;
+ if (name.identifier && name.value === "static") {
+ if (checkPunctuators(state.tokens.next, ["*"])) {
+ isGenerator = true;
+ advance("*");
+ }
+ if (isPropertyName(state.tokens.next) || state.tokens.next.id === "[") {
+ computed = state.tokens.next.id === "[";
+ isStatic = true;
+ name = state.tokens.next;
+ if (state.tokens.next.id === "[") {
+ name = computedPropertyName();
+ } else advance();
+ }
+ }
+
+ if (name.identifier && (name.value === "get" || name.value === "set")) {
+ if (isPropertyName(state.tokens.next) || state.tokens.next.id === "[") {
+ computed = state.tokens.next.id === "[";
+ getset = name;
+ name = state.tokens.next;
+ if (state.tokens.next.id === "[") {
+ name = computedPropertyName();
+ } else advance();
+ }
+ }
+ } else {
+ warning("W052", state.tokens.next, state.tokens.next.value || state.tokens.next.type);
+ advance();
+ continue;
+ }
+
+ if (!checkPunctuators(state.tokens.next, ["("])) {
+ error("E054", state.tokens.next, state.tokens.next.value);
+ while (state.tokens.next.id !== "}" &&
+ !checkPunctuators(state.tokens.next, ["("])) {
+ advance();
+ }
+ if (state.tokens.next.value !== "(") {
+ doFunction({ statement: c });
+ }
+ }
+
+ if (!computed) {
+ if (getset) {
+ saveAccessor(
+ getset.value, isStatic ? staticProps : props, name.value, name, true, isStatic);
+ } else {
+ if (name.value === "constructor") {
+ state.nameStack.set(c);
+ } else {
+ state.nameStack.set(name);
+ }
+ saveProperty(isStatic ? staticProps : props, name.value, name, true, isStatic);
+ }
+ }
+
+ if (getset && name.value === "constructor") {
+ var propDesc = getset.value === "get" ? "class getter method" : "class setter method";
+ error("E049", name, propDesc, "constructor");
+ } else if (name.value === "prototype") {
+ error("E049", name, "class method", "prototype");
+ }
+
+ propertyName(name);
+
+ doFunction({
+ statement: c,
+ type: isGenerator ? "generator" : null,
+ classExprBinding: c.namedExpr ? c.name : null
+ });
+ }
+
+ checkProperties(props);
+ }
+
+ blockstmt("function", function() {
+ var generator = false;
+ if (state.tokens.next.value === "*") {
+ advance("*");
+ if (state.option.inESNext(true)) {
+ generator = true;
+ } else {
+ warning("W119", state.tokens.curr, "function*");
+ }
+ }
+ if (inblock) {
+ warning("W082", state.tokens.curr);
+
+ }
+ var i = optionalidentifier();
+
+ if (i === undefined) {
+ warning("W025");
+ }
+
+ if (funct[i] === "const") {
+ warning("E011", null, i);
+ }
+ addlabel(i, { type: "unction", token: state.tokens.curr });
+
+ doFunction({
+ name: i,
+ statement: this,
+ type: generator ? "generator" : null
+ });
+ if (state.tokens.next.id === "(" && state.tokens.next.line === state.tokens.curr.line) {
+ error("E039");
+ }
+ return this;
+ });
+
+ prefix("function", function() {
+ var generator = false;
+
+ if (state.tokens.next.value === "*") {
+ if (!state.option.inESNext()) {
+ warning("W119", state.tokens.curr, "function*");
+ }
+ advance("*");
+ generator = true;
+ }
+
+ var i = optionalidentifier();
+ var fn = doFunction({ name: i, type: generator ? "generator" : null });
+
+ function isVariable(name) { return name[0] !== "("; }
+ function isLocal(name) { return fn[name] === "var"; }
+
+ if (!state.option.loopfunc && funct["(loopage)"]) {
+ if (_.some(fn, function(val, name) { return isVariable(name) && !isLocal(name); })) {
+ warning("W083");
+ }
+ }
+ return this;
+ });
+
+ blockstmt("if", function() {
+ var t = state.tokens.next;
+ increaseComplexityCount();
+ state.condition = true;
+ advance("(");
+ var expr = expression(0);
+ checkCondAssignment(expr);
+ var forinifcheck = null;
+ if (state.option.forin && state.forinifcheckneeded) {
+ state.forinifcheckneeded = false; // We only need to analyze the first if inside the loop
+ forinifcheck = state.forinifchecks[state.forinifchecks.length - 1];
+ if (expr.type === "(punctuator)" && expr.value === "!") {
+ forinifcheck.type = "(negative)";
+ } else {
+ forinifcheck.type = "(positive)";
+ }
+ }
+
+ advance(")", t);
+ state.condition = false;
+ var s = block(true, true);
+ if (forinifcheck && forinifcheck.type === "(negative)") {
+ if (s && s.length === 1 && s[0].type === "(identifier)" && s[0].value === "continue") {
+ forinifcheck.type = "(negative-with-continue)";
+ }
+ }
+
+ if (state.tokens.next.id === "else") {
+ advance("else");
+ if (state.tokens.next.id === "if" || state.tokens.next.id === "switch") {
+ statement();
+ } else {
+ block(true, true);
+ }
+ }
+ return this;
+ });
+
+ blockstmt("try", function() {
+ var b;
+
+ function doCatch() {
+ var oldScope = scope;
+ var e;
+
+ advance("catch");
+ advance("(");
+
+ scope = Object.create(oldScope);
+
+ e = state.tokens.next.value;
+ if (state.tokens.next.type !== "(identifier)") {
+ e = null;
+ warning("E030", state.tokens.next, e);
+ }
+
+ advance();
+
+ funct = functor("(catch)", state.tokens.next, scope, {
+ "(context)" : funct,
+ "(breakage)" : funct["(breakage)"],
+ "(loopage)" : funct["(loopage)"],
+ "(statement)": false,
+ "(catch)" : true
+ });
+
+ if (e) {
+ addlabel(e, { type: "exception" });
+ }
+
+ if (state.tokens.next.value === "if") {
+ if (!state.option.inMoz(true)) {
+ warning("W118", state.tokens.curr, "catch filter");
+ }
+ advance("if");
+ expression(0);
+ }
+
+ advance(")");
+
+ state.tokens.curr.funct = funct;
+ functions.push(funct);
+
+ block(false);
+
+ scope = oldScope;
+
+ funct["(last)"] = state.tokens.curr.line;
+ funct["(lastcharacter)"] = state.tokens.curr.character;
+ funct = funct["(context)"];
+ }
+
+ block(true);
+
+ while (state.tokens.next.id === "catch") {
+ increaseComplexityCount();
+ if (b && (!state.option.inMoz(true))) {
+ warning("W118", state.tokens.next, "multiple catch blocks");
+ }
+ doCatch();
+ b = true;
+ }
+
+ if (state.tokens.next.id === "finally") {
+ advance("finally");
+ block(true);
+ return;
+ }
+
+ if (!b) {
+ error("E021", state.tokens.next, "catch", state.tokens.next.value);
+ }
+
+ return this;
+ });
+
+ blockstmt("while", function() {
+ var t = state.tokens.next;
+ funct["(breakage)"] += 1;
+ funct["(loopage)"] += 1;
+ increaseComplexityCount();
+ advance("(");
+ checkCondAssignment(expression(0));
+ advance(")", t);
+ block(true, true);
+ funct["(breakage)"] -= 1;
+ funct["(loopage)"] -= 1;
+ return this;
+ }).labelled = true;
+
+ blockstmt("with", function() {
+ var t = state.tokens.next;
+ if (state.directive["use strict"]) {
+ error("E010", state.tokens.curr);
+ } else if (!state.option.withstmt) {
+ warning("W085", state.tokens.curr);
+ }
+
+ advance("(");
+ expression(0);
+ advance(")", t);
+ block(true, true);
+
+ return this;
+ });
+
+ blockstmt("switch", function() {
+ var t = state.tokens.next;
+ var g = false;
+ var noindent = false;
+
+ funct["(breakage)"] += 1;
+ advance("(");
+ checkCondAssignment(expression(0));
+ advance(")", t);
+ t = state.tokens.next;
+ advance("{");
+
+ if (state.tokens.next.from === indent)
+ noindent = true;
+
+ if (!noindent)
+ indent += state.option.indent;
+
+ this.cases = [];
+
+ for (;;) {
+ switch (state.tokens.next.id) {
+ case "case":
+ switch (funct["(verb)"]) {
+ case "yield":
+ case "break":
+ case "case":
+ case "continue":
+ case "return":
+ case "switch":
+ case "throw":
+ break;
+ default:
+ if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) {
+ warning("W086", state.tokens.curr, "case");
+ }
+ }
+
+ advance("case");
+ this.cases.push(expression(0));
+ increaseComplexityCount();
+ g = true;
+ advance(":");
+ funct["(verb)"] = "case";
+ break;
+ case "default":
+ switch (funct["(verb)"]) {
+ case "yield":
+ case "break":
+ case "continue":
+ case "return":
+ case "throw":
+ break;
+ default:
+ if (this.cases.length) {
+ if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) {
+ warning("W086", state.tokens.curr, "default");
+ }
+ }
+ }
+
+ advance("default");
+ g = true;
+ advance(":");
+ break;
+ case "}":
+ if (!noindent)
+ indent -= state.option.indent;
+
+ advance("}", t);
+ funct["(breakage)"] -= 1;
+ funct["(verb)"] = undefined;
+ return;
+ case "(end)":
+ error("E023", state.tokens.next, "}");
+ return;
+ default:
+ indent += state.option.indent;
+ if (g) {
+ switch (state.tokens.curr.id) {
+ case ",":
+ error("E040");
+ return;
+ case ":":
+ g = false;
+ statements();
+ break;
+ default:
+ error("E025", state.tokens.curr);
+ return;
+ }
+ } else {
+ if (state.tokens.curr.id === ":") {
+ advance(":");
+ error("E024", state.tokens.curr, ":");
+ statements();
+ } else {
+ error("E021", state.tokens.next, "case", state.tokens.next.value);
+ return;
+ }
+ }
+ indent -= state.option.indent;
+ }
+ }
+ }).labelled = true;
+
+ stmt("debugger", function() {
+ if (!state.option.debug) {
+ warning("W087", this);
+ }
+ return this;
+ }).exps = true;
+
+ (function() {
+ var x = stmt("do", function() {
+ funct["(breakage)"] += 1;
+ funct["(loopage)"] += 1;
+ increaseComplexityCount();
+
+ this.first = block(true, true);
+ advance("while");
+ var t = state.tokens.next;
+ advance("(");
+ checkCondAssignment(expression(0));
+ advance(")", t);
+ funct["(breakage)"] -= 1;
+ funct["(loopage)"] -= 1;
+ return this;
+ });
+ x.labelled = true;
+ x.exps = true;
+ }());
+
+ blockstmt("for", function() {
+ var s, t = state.tokens.next;
+ var letscope = false;
+ var foreachtok = null;
+
+ if (t.value === "each") {
+ foreachtok = t;
+ advance("each");
+ if (!state.option.inMoz(true)) {
+ warning("W118", state.tokens.curr, "for each");
+ }
+ }
+
+ funct["(breakage)"] += 1;
+ funct["(loopage)"] += 1;
+ increaseComplexityCount();
+ advance("(");
+ var nextop; // contains the token of the "in" or "of" operator
+ var i = 0;
+ var inof = ["in", "of"];
+ do {
+ nextop = peek(i);
+ ++i;
+ } while (!_.contains(inof, nextop.value) && nextop.value !== ";" && nextop.type !== "(end)");
+ if (_.contains(inof, nextop.value)) {
+ if (!state.option.inESNext() && nextop.value === "of") {
+ error("W104", nextop, "for of");
+ }
+
+ if (state.tokens.next.id === "var") {
+ advance("var");
+ state.tokens.curr.fud({ prefix: true });
+ } else if (state.tokens.next.id === "let") {
+ advance("let");
+ letscope = true;
+ funct["(blockscope)"].stack();
+ state.tokens.curr.fud({ prefix: true });
+ } else if (!state.tokens.next.identifier) {
+ error("E030", state.tokens.next, state.tokens.next.type);
+ advance();
+ } else {
+ switch (funct[state.tokens.next.value]) {
+ case "unused":
+ funct[state.tokens.next.value] = "var";
+ break;
+ case "var":
+ break;
+ default:
+ var ident = state.tokens.next.value;
+ if (!funct["(blockscope)"].getlabel(ident) &&
+ !(scope[ident] || {})[ident]) {
+ warning("W088", state.tokens.next, state.tokens.next.value);
+ }
+ }
+ advance();
+ }
+ advance(nextop.value);
+ expression(20);
+ advance(")", t);
+
+ if (nextop.value === "in" && state.option.forin) {
+ state.forinifcheckneeded = true;
+
+ if (state.forinifchecks === undefined) {
+ state.forinifchecks = [];
+ }
+ state.forinifchecks.push({
+ type: "(none)"
+ });
+ }
+
+ s = block(true, true);
+
+ if (nextop.value === "in" && state.option.forin) {
+ if (state.forinifchecks && state.forinifchecks.length > 0) {
+ var check = state.forinifchecks.pop();
+
+ if (// No if statement or not the first statement in loop body
+ s && s.length > 0 && (typeof s[0] !== "object" || s[0].value !== "if") ||
+ check.type === "(positive)" && s.length > 1 ||
+ check.type === "(negative)") {
+ warning("W089", this);
+ }
+ }
+ state.forinifcheckneeded = false;
+ }
+
+ funct["(breakage)"] -= 1;
+ funct["(loopage)"] -= 1;
+ } else {
+ if (foreachtok) {
+ error("E045", foreachtok);
+ }
+ if (state.tokens.next.id !== ";") {
+ if (state.tokens.next.id === "var") {
+ advance("var");
+ state.tokens.curr.fud();
+ } else if (state.tokens.next.id === "let") {
+ advance("let");
+ letscope = true;
+ funct["(blockscope)"].stack();
+ state.tokens.curr.fud();
+ } else {
+ for (;;) {
+ expression(0, "for");
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ }
+ }
+ nolinebreak(state.tokens.curr);
+ advance(";");
+ if (state.tokens.next.id !== ";") {
+ checkCondAssignment(expression(0));
+ }
+ nolinebreak(state.tokens.curr);
+ advance(";");
+ if (state.tokens.next.id === ";") {
+ error("E021", state.tokens.next, ")", ";");
+ }
+ if (state.tokens.next.id !== ")") {
+ for (;;) {
+ expression(0, "for");
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ }
+ advance(")", t);
+ block(true, true);
+ funct["(breakage)"] -= 1;
+ funct["(loopage)"] -= 1;
+
+ }
+ if (letscope) {
+ funct["(blockscope)"].unstack();
+ }
+ return this;
+ }).labelled = true;
+
+
+ stmt("break", function() {
+ var v = state.tokens.next.value;
+
+ if (funct["(breakage)"] === 0)
+ warning("W052", state.tokens.next, this.value);
+
+ if (!state.option.asi)
+ nolinebreak(this);
+
+ if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
+ if (state.tokens.curr.line === startLine(state.tokens.next)) {
+ if (funct[v] !== "label") {
+ warning("W090", state.tokens.next, v);
+ } else if (scope[v] !== funct) {
+ warning("W091", state.tokens.next, v);
+ }
+ this.first = state.tokens.next;
+ advance();
+ }
+ }
+
+ reachable(this);
+
+ return this;
+ }).exps = true;
+
+
+ stmt("continue", function() {
+ var v = state.tokens.next.value;
+
+ if (funct["(breakage)"] === 0)
+ warning("W052", state.tokens.next, this.value);
+
+ if (!state.option.asi)
+ nolinebreak(this);
+
+ if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
+ if (state.tokens.curr.line === startLine(state.tokens.next)) {
+ if (funct[v] !== "label") {
+ warning("W090", state.tokens.next, v);
+ } else if (scope[v] !== funct) {
+ warning("W091", state.tokens.next, v);
+ }
+ this.first = state.tokens.next;
+ advance();
+ }
+ } else if (!funct["(loopage)"]) {
+ warning("W052", state.tokens.next, this.value);
+ }
+
+ reachable(this);
+
+ return this;
+ }).exps = true;
+
+
+ stmt("return", function() {
+ if (this.line === startLine(state.tokens.next)) {
+ if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
+ this.first = expression(0);
+
+ if (this.first &&
+ this.first.type === "(punctuator)" && this.first.value === "=" &&
+ !this.first.paren && !state.option.boss) {
+ warningAt("W093", this.first.line, this.first.character);
+ }
+ }
+ } else {
+ if (state.tokens.next.type === "(punctuator)" &&
+ ["[", "{", "+", "-"].indexOf(state.tokens.next.value) > -1) {
+ nolinebreak(this); // always warn (Line breaking error)
+ }
+ }
+
+ reachable(this);
+
+ return this;
+ }).exps = true;
+
+ (function(x) {
+ x.exps = true;
+ x.lbp = 25;
+ }(prefix("yield", function() {
+ var prev = state.tokens.prev;
+ if (state.option.inESNext(true) && !funct["(generator)"]) {
+ if (!("(catch)" === funct["(name)"] && funct["(context)"]["(generator)"])) {
+ error("E046", state.tokens.curr, "yield");
+ }
+ } else if (!state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "yield");
+ }
+ funct["(generator)"] = "yielded";
+ var delegatingYield = false;
+
+ if (state.tokens.next.value === "*") {
+ delegatingYield = true;
+ advance("*");
+ }
+
+ if (this.line === startLine(state.tokens.next) || !state.option.inMoz(true)) {
+ if (delegatingYield ||
+ (state.tokens.next.id !== ";" && !state.tokens.next.reach && state.tokens.next.nud)) {
+
+ nobreaknonadjacent(state.tokens.curr, state.tokens.next);
+ this.first = expression(10);
+
+ if (this.first.type === "(punctuator)" && this.first.value === "=" &&
+ !this.first.paren && !state.option.boss) {
+ warningAt("W093", this.first.line, this.first.character);
+ }
+ }
+
+ if (state.option.inMoz(true) && state.tokens.next.id !== ")" &&
+ (prev.lbp > 30 || (!prev.assign && !isEndOfExpr()) || prev.id === "yield")) {
+ error("E050", this);
+ }
+ } else if (!state.option.asi) {
+ nolinebreak(this); // always warn (Line breaking error)
+ }
+ return this;
+ })));
+
+
+ stmt("throw", function() {
+ nolinebreak(this);
+ this.first = expression(20);
+
+ reachable(this);
+
+ return this;
+ }).exps = true;
+
+ stmt("import", function() {
+ if (!state.option.inESNext()) {
+ warning("W119", state.tokens.curr, "import");
+ }
+
+ if (state.tokens.next.type === "(string)") {
+ advance("(string)");
+ return this;
+ }
+
+ if (state.tokens.next.identifier) {
+ this.name = identifier();
+ addlabel(this.name, { type: "unused", token: state.tokens.curr });
+ if (state.tokens.next.value === ",") {
+ advance(",");
+ } else {
+ advance("from");
+ advance("(string)");
+ return this;
+ }
+ }
+
+ if (state.tokens.next.id === "*") {
+ advance("*");
+ advance("as");
+ if (state.tokens.next.identifier) {
+ this.name = identifier();
+ addlabel(this.name, { type: "unused", token: state.tokens.curr });
+ }
+ } else {
+ advance("{");
+ for (;;) {
+ if (state.tokens.next.value === "}") {
+ advance("}");
+ break;
+ }
+ var importName;
+ if (state.tokens.next.type === "default") {
+ importName = "default";
+ advance("default");
+ } else {
+ importName = identifier();
+ }
+ if (state.tokens.next.value === "as") {
+ advance("as");
+ importName = identifier();
+ }
+ addlabel(importName, { type: "unused", token: state.tokens.curr });
+
+ if (state.tokens.next.value === ",") {
+ advance(",");
+ } else if (state.tokens.next.value === "}") {
+ advance("}");
+ break;
+ } else {
+ error("E024", state.tokens.next, state.tokens.next.value);
+ break;
+ }
+ }
+ }
+ advance("from");
+ advance("(string)");
+ return this;
+ }).exps = true;
+
+ stmt("export", function() {
+ var ok = true;
+ var token;
+ var identifier;
+
+ if (!state.option.inESNext()) {
+ warning("W119", state.tokens.curr, "export");
+ ok = false;
+ }
+
+ if (!funct["(global)"] || !funct["(blockscope)"].atTop()) {
+ error("E053", state.tokens.curr);
+ ok = false;
+ }
+
+ if (state.tokens.next.value === "*") {
+ advance("*");
+ advance("from");
+ advance("(string)");
+ return this;
+ }
+
+ if (state.tokens.next.type === "default") {
+ state.nameStack.set(state.tokens.next);
+ advance("default");
+ if (state.tokens.next.id === "function" || state.tokens.next.id === "class") {
+ this.block = true;
+ }
+
+ token = peek();
+
+ expression(10);
+
+ if (state.tokens.next.id === "class") {
+ identifier = token.name;
+ } else {
+ identifier = token.value;
+ }
+
+ addlabel(identifier, {
+ type: "function", token: token
+ });
+
+ return this;
+ }
+
+ if (state.tokens.next.value === "{") {
+ advance("{");
+ var exportedTokens = [];
+ for (;;) {
+ if (!state.tokens.next.identifier) {
+ error("E030", state.tokens.next, state.tokens.next.value);
+ }
+ advance();
+
+ state.tokens.curr.exported = ok;
+ exportedTokens.push(state.tokens.curr);
+
+ if (state.tokens.next.value === "as") {
+ advance("as");
+ if (!state.tokens.next.identifier) {
+ error("E030", state.tokens.next, state.tokens.next.value);
+ }
+ advance();
+ }
+
+ if (state.tokens.next.value === ",") {
+ advance(",");
+ } else if (state.tokens.next.value === "}") {
+ advance("}");
+ break;
+ } else {
+ error("E024", state.tokens.next, state.tokens.next.value);
+ break;
+ }
+ }
+ if (state.tokens.next.value === "from") {
+ advance("from");
+ advance("(string)");
+ } else if (ok) {
+ exportedTokens.forEach(function(token) {
+ if (!funct[token.value]) {
+ isundef(funct, "W117", token, token.value);
+ }
+ exported[token.value] = true;
+ funct["(blockscope)"].setExported(token.value);
+ });
+ }
+ return this;
+ }
+
+ if (state.tokens.next.id === "var") {
+ advance("var");
+ state.tokens.curr.fud({ inexport:true });
+ } else if (state.tokens.next.id === "let") {
+ advance("let");
+ state.tokens.curr.fud({ inexport:true });
+ } else if (state.tokens.next.id === "const") {
+ advance("const");
+ state.tokens.curr.fud({ inexport:true });
+ } else if (state.tokens.next.id === "function") {
+ this.block = true;
+ advance("function");
+ exported[state.tokens.next.value] = ok;
+ state.tokens.next.exported = true;
+ state.syntax["function"].fud();
+ } else if (state.tokens.next.id === "class") {
+ this.block = true;
+ advance("class");
+ exported[state.tokens.next.value] = ok;
+ state.tokens.next.exported = true;
+ state.syntax["class"].fud();
+ } else {
+ error("E024", state.tokens.next, state.tokens.next.value);
+ }
+
+ return this;
+ }).exps = true;
+
+ FutureReservedWord("abstract");
+ FutureReservedWord("boolean");
+ FutureReservedWord("byte");
+ FutureReservedWord("char");
+ FutureReservedWord("class", { es5: true, nud: classdef });
+ FutureReservedWord("double");
+ FutureReservedWord("enum", { es5: true });
+ FutureReservedWord("export", { es5: true });
+ FutureReservedWord("extends", { es5: true });
+ FutureReservedWord("final");
+ FutureReservedWord("float");
+ FutureReservedWord("goto");
+ FutureReservedWord("implements", { es5: true, strictOnly: true });
+ FutureReservedWord("import", { es5: true });
+ FutureReservedWord("int");
+ FutureReservedWord("interface", { es5: true, strictOnly: true });
+ FutureReservedWord("long");
+ FutureReservedWord("native");
+ FutureReservedWord("package", { es5: true, strictOnly: true });
+ FutureReservedWord("private", { es5: true, strictOnly: true });
+ FutureReservedWord("protected", { es5: true, strictOnly: true });
+ FutureReservedWord("public", { es5: true, strictOnly: true });
+ FutureReservedWord("short");
+ FutureReservedWord("static", { es5: true, strictOnly: true });
+ FutureReservedWord("super", { es5: true });
+ FutureReservedWord("synchronized");
+ FutureReservedWord("transient");
+ FutureReservedWord("volatile");
+
+ var lookupBlockType = function() {
+ var pn, pn1;
+ var i = -1;
+ var bracketStack = 0;
+ var ret = {};
+ if (checkPunctuators(state.tokens.curr, ["[", "{"]))
+ bracketStack += 1;
+ do {
+ pn = (i === -1) ? state.tokens.next : peek(i);
+ pn1 = peek(i + 1);
+ i = i + 1;
+ if (checkPunctuators(pn, ["[", "{"])) {
+ bracketStack += 1;
+ } else if (checkPunctuators(pn, ["]", "}"])) {
+ bracketStack -= 1;
+ }
+ if (pn.identifier && pn.value === "for" && bracketStack === 1) {
+ ret.isCompArray = true;
+ ret.notJson = true;
+ break;
+ }
+ if (checkPunctuators(pn, ["}", "]"]) && bracketStack === 0) {
+ if (pn1.value === "=") {
+ ret.isDestAssign = true;
+ ret.notJson = true;
+ break;
+ } else if (pn1.value === ".") {
+ ret.notJson = true;
+ break;
+ }
+ }
+ if (pn.value === ";") {
+ ret.isBlock = true;
+ ret.notJson = true;
+ }
+ } while (bracketStack > 0 && pn.id !== "(end)");
+ return ret;
+ };
+
+ function saveProperty(props, name, tkn, isClass, isStatic) {
+ var msg = ["key", "class method", "static class method"];
+ msg = msg[(isClass || false) + (isStatic || false)];
+ if (tkn.identifier) {
+ name = tkn.value;
+ }
+
+ if (props[name] && _.has(props, name)) {
+ warning("W075", state.tokens.next, msg, name);
+ } else {
+ props[name] = {};
+ }
+
+ props[name].basic = true;
+ props[name].basictkn = tkn;
+ }
+ function saveAccessor(accessorType, props, name, tkn, isClass, isStatic) {
+ var flagName = accessorType === "get" ? "getterToken" : "setterToken";
+ var msg = "";
+
+ if (isClass) {
+ if (isStatic) {
+ msg += "static ";
+ }
+ msg += accessorType + "ter method";
+ } else {
+ msg = "key";
+ }
+
+ state.tokens.curr.accessorType = accessorType;
+ state.nameStack.set(tkn);
+
+ if (props[name] && _.has(props, name)) {
+ if (props[name].basic || props[name][flagName]) {
+ warning("W075", state.tokens.next, msg, name);
+ }
+ } else {
+ props[name] = {};
+ }
+
+ props[name][flagName] = tkn;
+ }
+
+ function computedPropertyName() {
+ advance("[");
+ if (!state.option.esnext) {
+ warning("W119", state.tokens.curr, "computed property names");
+ }
+ var value = expression(10);
+ advance("]");
+ return value;
+ }
+ function checkPunctuators(token, values) {
+ return token.type === "(punctuator)" && _.contains(values, token.value);
+ }
+ function destructuringAssignOrJsonValue() {
+
+ var block = lookupBlockType();
+ if (block.notJson) {
+ if (!state.option.inESNext() && block.isDestAssign) {
+ warning("W104", state.tokens.curr, "destructuring assignment");
+ }
+ statements();
+ } else {
+ state.option.laxbreak = true;
+ state.jsonMode = true;
+ jsonValue();
+ }
+ }
+
+ var arrayComprehension = function() {
+ var CompArray = function() {
+ this.mode = "use";
+ this.variables = [];
+ };
+ var _carrays = [];
+ var _current;
+ function declare(v) {
+ var l = _current.variables.filter(function(elt) {
+ if (elt.value === v) {
+ elt.undef = false;
+ return v;
+ }
+ }).length;
+ return l !== 0;
+ }
+ function use(v) {
+ var l = _current.variables.filter(function(elt) {
+ if (elt.value === v && !elt.undef) {
+ if (elt.unused === true) {
+ elt.unused = false;
+ }
+ return v;
+ }
+ }).length;
+ return (l === 0);
+ }
+ return { stack: function() {
+ _current = new CompArray();
+ _carrays.push(_current);
+ },
+ unstack: function() {
+ _current.variables.filter(function(v) {
+ if (v.unused)
+ warning("W098", v.token, v.raw_text || v.value);
+ if (v.undef)
+ isundef(v.funct, "W117", v.token, v.value);
+ });
+ _carrays.splice(-1, 1);
+ _current = _carrays[_carrays.length - 1];
+ },
+ setState: function(s) {
+ if (_.contains(["use", "define", "generate", "filter"], s))
+ _current.mode = s;
+ },
+ check: function(v) {
+ if (!_current) {
+ return;
+ }
+ if (_current && _current.mode === "use") {
+ if (use(v)) {
+ _current.variables.push({
+ funct: funct,
+ token: state.tokens.curr,
+ value: v,
+ undef: true,
+ unused: false
+ });
+ }
+ return true;
+ } else if (_current && _current.mode === "define") {
+ if (!declare(v)) {
+ _current.variables.push({
+ funct: funct,
+ token: state.tokens.curr,
+ value: v,
+ undef: false,
+ unused: true
+ });
+ }
+ return true;
+ } else if (_current && _current.mode === "generate") {
+ isundef(funct, "W117", state.tokens.curr, v);
+ return true;
+ } else if (_current && _current.mode === "filter") {
+ if (use(v)) {
+ isundef(funct, "W117", state.tokens.curr, v);
+ }
+ return true;
+ }
+ return false;
+ }
+ };
+ };
+
+ function jsonValue() {
+ function jsonObject() {
+ var o = {}, t = state.tokens.next;
+ advance("{");
+ if (state.tokens.next.id !== "}") {
+ for (;;) {
+ if (state.tokens.next.id === "(end)") {
+ error("E026", state.tokens.next, t.line);
+ } else if (state.tokens.next.id === "}") {
+ warning("W094", state.tokens.curr);
+ break;
+ } else if (state.tokens.next.id === ",") {
+ error("E028", state.tokens.next);
+ } else if (state.tokens.next.id !== "(string)") {
+ warning("W095", state.tokens.next, state.tokens.next.value);
+ }
+ if (o[state.tokens.next.value] === true) {
+ warning("W075", state.tokens.next, "key", state.tokens.next.value);
+ } else if ((state.tokens.next.value === "__proto__" &&
+ !state.option.proto) || (state.tokens.next.value === "__iterator__" &&
+ !state.option.iterator)) {
+ warning("W096", state.tokens.next, state.tokens.next.value);
+ } else {
+ o[state.tokens.next.value] = true;
+ }
+ advance();
+ advance(":");
+ jsonValue();
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ advance(",");
+ }
+ }
+ advance("}");
+ }
+
+ function jsonArray() {
+ var t = state.tokens.next;
+ advance("[");
+ if (state.tokens.next.id !== "]") {
+ for (;;) {
+ if (state.tokens.next.id === "(end)") {
+ error("E027", state.tokens.next, t.line);
+ } else if (state.tokens.next.id === "]") {
+ warning("W094", state.tokens.curr);
+ break;
+ } else if (state.tokens.next.id === ",") {
+ error("E028", state.tokens.next);
+ }
+ jsonValue();
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ advance(",");
+ }
+ }
+ advance("]");
+ }
+
+ switch (state.tokens.next.id) {
+ case "{":
+ jsonObject();
+ break;
+ case "[":
+ jsonArray();
+ break;
+ case "true":
+ case "false":
+ case "null":
+ case "(number)":
+ case "(string)":
+ advance();
+ break;
+ case "-":
+ advance("-");
+ advance("(number)");
+ break;
+ default:
+ error("E003", state.tokens.next);
+ }
+ }
+
+ var blockScope = function() {
+ var _current = {};
+ var _variables = [_current];
+
+ function _checkBlockLabels() {
+ for (var t in _current) {
+ if (_current[t]["(type)"] === "unused") {
+ if (state.option.unused) {
+ var tkn = _current[t]["(token)"];
+ if (tkn.exported) {
+ continue;
+ }
+ var line = tkn.line;
+ var chr = tkn.character;
+ warningAt("W098", line, chr, t);
+ }
+ }
+ }
+ }
+
+ return {
+ stack: function() {
+ _current = {};
+ _variables.push(_current);
+ },
+
+ unstack: function() {
+ _checkBlockLabels();
+ _variables.splice(_variables.length - 1, 1);
+ _current = _.last(_variables);
+ },
+
+ getlabel: function(l) {
+ for (var i = _variables.length - 1 ; i >= 0; --i) {
+ if (_.has(_variables[i], l) && !_variables[i][l]["(shadowed)"]) {
+ return _variables[i];
+ }
+ }
+ },
+
+ shadow: function(name) {
+ for (var i = _variables.length - 1; i >= 0; i--) {
+ if (_.has(_variables[i], name)) {
+ _variables[i][name]["(shadowed)"] = true;
+ }
+ }
+ },
+
+ unshadow: function(name) {
+ for (var i = _variables.length - 1; i >= 0; i--) {
+ if (_.has(_variables[i], name)) {
+ _variables[i][name]["(shadowed)"] = false;
+ }
+ }
+ },
+
+ atTop: function() {
+ return _variables.length === 1;
+ },
+
+ setExported: function(id) {
+ if (funct["(blockscope)"].atTop()) {
+ var item = _current[id];
+ if (item && item["(token)"]) {
+ item["(token)"].exported = true;
+ }
+ }
+ },
+
+ current: {
+ has: function(t) {
+ return _.has(_current, t);
+ },
+
+ add: function(t, type, tok) {
+ _current[t] = { "(type)" : type, "(token)": tok, "(shadowed)": false };
+ }
+ }
+ };
+ };
+
+ var escapeRegex = function(str) {
+ return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
+ };
+ var itself = function(s, o, g) {
+ var i, k, x, reIgnoreStr, reIgnore;
+ var optionKeys;
+ var newOptionObj = {};
+ var newIgnoredObj = {};
+
+ o = _.clone(o);
+ state.reset();
+
+ if (o && o.scope) {
+ JSHINT.scope = o.scope;
+ } else {
+ JSHINT.errors = [];
+ JSHINT.undefs = [];
+ JSHINT.internals = [];
+ JSHINT.blacklist = {};
+ JSHINT.scope = "(main)";
+ }
+
+ predefined = Object.create(null);
+ combine(predefined, vars.ecmaIdentifiers[3]);
+ combine(predefined, vars.reservedVars);
+
+ combine(predefined, g || {});
+
+ declared = Object.create(null);
+ exported = Object.create(null);
+
+ function each(obj, cb) {
+ if (!obj)
+ return;
+
+ if (!Array.isArray(obj) && typeof obj === "object")
+ obj = Object.keys(obj);
+
+ obj.forEach(cb);
+ }
+
+ if (o) {
+ each(o.predef || null, function(item) {
+ var slice, prop;
+
+ if (item[0] === "-") {
+ slice = item.slice(1);
+ JSHINT.blacklist[slice] = slice;
+ delete predefined[slice];
+ } else {
+ prop = Object.getOwnPropertyDescriptor(o.predef, item);
+ predefined[item] = prop ? prop.value : false;
+ }
+ });
+
+ each(o.exported || null, function(item) {
+ exported[item] = true;
+ });
+
+ delete o.predef;
+ delete o.exported;
+
+ optionKeys = Object.keys(o);
+ for (x = 0; x < optionKeys.length; x++) {
+ if (/^-W\d{3}$/g.test(optionKeys[x])) {
+ newIgnoredObj[optionKeys[x].slice(1)] = true;
+ } else {
+ newOptionObj[optionKeys[x]] = o[optionKeys[x]];
+
+ if (optionKeys[x] === "newcap" && o[optionKeys[x]] === false)
+ newOptionObj["(explicitNewcap)"] = true;
+ }
+ }
+ }
+
+ state.option = newOptionObj;
+ state.ignored = newIgnoredObj;
+
+ state.option.indent = state.option.indent || 4;
+ state.option.maxerr = state.option.maxerr || 50;
+
+ indent = 1;
+ global = Object.create(predefined);
+ scope = global;
+
+ funct = functor("(global)", null, scope, {
+ "(global)" : true,
+ "(blockscope)": blockScope(),
+ "(comparray)" : arrayComprehension(),
+ "(metrics)" : createMetrics(state.tokens.next)
+ });
+
+ functions = [funct];
+ urls = [];
+ stack = null;
+ member = {};
+ membersOnly = null;
+ implied = {};
+ inblock = false;
+ lookahead = [];
+ unuseds = [];
+
+ if (!isString(s) && !Array.isArray(s)) {
+ errorAt("E004", 0);
+ return false;
+ }
+
+ api = {
+ get isJSON() {
+ return state.jsonMode;
+ },
+
+ getOption: function(name) {
+ return state.option[name] || null;
+ },
+
+ getCache: function(name) {
+ return state.cache[name];
+ },
+
+ setCache: function(name, value) {
+ state.cache[name] = value;
+ },
+
+ warn: function(code, data) {
+ warningAt.apply(null, [ code, data.line, data.char ].concat(data.data));
+ },
+
+ on: function(names, listener) {
+ names.split(" ").forEach(function(name) {
+ emitter.on(name, listener);
+ }.bind(this));
+ }
+ };
+
+ emitter.removeAllListeners();
+ (extraModules || []).forEach(function(func) {
+ func(api);
+ });
+
+ state.tokens.prev = state.tokens.curr = state.tokens.next = state.syntax["(begin)"];
+
+ if (o && o.ignoreDelimiters) {
+
+ if (!Array.isArray(o.ignoreDelimiters)) {
+ o.ignoreDelimiters = [o.ignoreDelimiters];
+ }
+
+ o.ignoreDelimiters.forEach(function(delimiterPair) {
+ if (!delimiterPair.start || !delimiterPair.end)
+ return;
+
+ reIgnoreStr = escapeRegex(delimiterPair.start) +
+ "[\\s\\S]*?" +
+ escapeRegex(delimiterPair.end);
+
+ reIgnore = new RegExp(reIgnoreStr, "ig");
+
+ s = s.replace(reIgnore, function(match) {
+ return match.replace(/./g, " ");
+ });
+ });
+ }
+
+ lex = new Lexer(s);
+
+ lex.on("warning", function(ev) {
+ warningAt.apply(null, [ ev.code, ev.line, ev.character].concat(ev.data));
+ });
+
+ lex.on("error", function(ev) {
+ errorAt.apply(null, [ ev.code, ev.line, ev.character ].concat(ev.data));
+ });
+
+ lex.on("fatal", function(ev) {
+ quit("E041", ev.line, ev.from);
+ });
+
+ lex.on("Identifier", function(ev) {
+ emitter.emit("Identifier", ev);
+ });
+
+ lex.on("String", function(ev) {
+ emitter.emit("String", ev);
+ });
+
+ lex.on("Number", function(ev) {
+ emitter.emit("Number", ev);
+ });
+
+ lex.start();
+ for (var name in o) {
+ if (_.has(o, name)) {
+ checkOption(name, state.tokens.curr);
+ }
+ }
+
+ assume();
+ combine(predefined, g || {});
+ comma.first = true;
+
+ try {
+ advance();
+ switch (state.tokens.next.id) {
+ case "{":
+ case "[":
+ destructuringAssignOrJsonValue();
+ break;
+ default:
+ directives();
+
+ if (state.directive["use strict"]) {
+ if (!state.option.globalstrict) {
+ if (!(state.option.node || state.option.phantom || state.option.browserify)) {
+ warning("W097", state.tokens.prev);
+ }
+ }
+ }
+
+ statements();
+ }
+ advance((state.tokens.next && state.tokens.next.value !== ".") ? "(end)" : undefined);
+ funct["(blockscope)"].unstack();
+
+ var markDefined = function(name, context) {
+ do {
+ if (typeof context[name] === "string") {
+
+ if (context[name] === "unused")
+ context[name] = "var";
+ else if (context[name] === "unction")
+ context[name] = "closure";
+
+ return true;
+ }
+
+ context = context["(context)"];
+ } while (context);
+
+ return false;
+ };
+
+ var clearImplied = function(name, line) {
+ if (!implied[name])
+ return;
+
+ var newImplied = [];
+ for (var i = 0; i < implied[name].length; i += 1) {
+ if (implied[name][i] !== line)
+ newImplied.push(implied[name][i]);
+ }
+
+ if (newImplied.length === 0)
+ delete implied[name];
+ else
+ implied[name] = newImplied;
+ };
+
+ var warnUnused = function(name, tkn, type, unused_opt) {
+ var line = tkn.line;
+ var chr = tkn.from;
+ var raw_name = tkn.raw_text || name;
+
+ if (unused_opt === undefined) {
+ unused_opt = state.option.unused;
+ }
+
+ if (unused_opt === true) {
+ unused_opt = "last-param";
+ }
+
+ var warnable_types = {
+ "vars": ["var"],
+ "last-param": ["var", "param"],
+ "strict": ["var", "param", "last-param"]
+ };
+
+ if (unused_opt) {
+ if (warnable_types[unused_opt] && warnable_types[unused_opt].indexOf(type) !== -1) {
+ if (!tkn.exported) {
+ warningAt("W098", line, chr, raw_name);
+ }
+ }
+ }
+
+ unuseds.push({
+ name: name,
+ line: line,
+ character: chr
+ });
+ };
+
+ var checkUnused = function(func, key) {
+ var type = func[key];
+ var tkn = func["(tokens)"][key];
+
+ if (key.charAt(0) === "(")
+ return;
+
+ if (type !== "unused" && type !== "unction" && type !== "const")
+ return;
+ if (func["(params)"] && func["(params)"].indexOf(key) !== -1)
+ return;
+ if (func["(global)"] && _.has(exported, key))
+ return;
+ if (type === "const" && !getprop(func, key, "unused"))
+ return;
+
+ warnUnused(key, tkn, "var");
+ };
+ for (i = 0; i < JSHINT.undefs.length; i += 1) {
+ k = JSHINT.undefs[i].slice(0);
+
+ if (markDefined(k[2].value, k[0]) || k[2].forgiveUndef) {
+ clearImplied(k[2].value, k[2].line);
+ } else if (state.option.undef) {
+ warning.apply(warning, k.slice(1));
+ }
+ }
+
+ functions.forEach(function(func) {
+ if (func["(unusedOption)"] === false) {
+ return;
+ }
+
+ for (var key in func) {
+ if (_.has(func, key)) {
+ checkUnused(func, key);
+ }
+ }
+
+ if (!func["(params)"])
+ return;
+
+ var params = func["(params)"].slice();
+ var param = params.pop();
+ var type, unused_opt;
+
+ while (param) {
+ type = func[param];
+ unused_opt = func["(unusedOption)"] || state.option.unused;
+ unused_opt = unused_opt === true ? "last-param" : unused_opt;
+
+ if (param === "undefined")
+ return;
+
+ if (type === "unused" || type === "unction") {
+ warnUnused(param, func["(tokens)"][param], "param", func["(unusedOption)"]);
+ } else if (unused_opt === "last-param") {
+ return;
+ }
+
+ param = params.pop();
+ }
+ });
+
+ for (var key in declared) {
+ if (_.has(declared, key) && !_.has(global, key) && !_.has(exported, key)) {
+ warnUnused(key, declared[key], "var");
+ }
+ }
+
+ } catch (err) {
+ if (err && err.name === "JSHintError") {
+ var nt = state.tokens.next || {};
+ JSHINT.errors.push({
+ scope : "(main)",
+ raw : err.raw,
+ code : err.code,
+ reason : err.message,
+ line : err.line || nt.line,
+ character : err.character || nt.from
+ }, null);
+ } else {
+ throw err;
+ }
+ }
+
+ if (JSHINT.scope === "(main)") {
+ o = o || {};
+
+ for (i = 0; i < JSHINT.internals.length; i += 1) {
+ k = JSHINT.internals[i];
+ o.scope = k.elem;
+ itself(k.value, o, g);
+ }
+ }
+
+ return JSHINT.errors.length === 0;
+ };
+ itself.addModule = function(func) {
+ extraModules.push(func);
+ };
+
+ itself.addModule(style.register);
+ itself.data = function() {
+ var data = {
+ functions: [],
+ options: state.option
+ };
+
+ var implieds = [];
+ var members = [];
+ var fu, f, i, j, n, globals;
+
+ if (itself.errors.length) {
+ data.errors = itself.errors;
+ }
+
+ if (state.jsonMode) {
+ data.json = true;
+ }
+
+ for (n in implied) {
+ if (_.has(implied, n)) {
+ implieds.push({
+ name: n,
+ line: implied[n]
+ });
+ }
+ }
+
+ if (implieds.length > 0) {
+ data.implieds = implieds;
+ }
+
+ if (urls.length > 0) {
+ data.urls = urls;
+ }
+
+ globals = Object.keys(scope);
+ if (globals.length > 0) {
+ data.globals = globals;
+ }
+
+ for (i = 1; i < functions.length; i += 1) {
+ f = functions[i];
+ fu = {};
+
+ for (j = 0; j < functionicity.length; j += 1) {
+ fu[functionicity[j]] = [];
+ }
+
+ for (j = 0; j < functionicity.length; j += 1) {
+ if (fu[functionicity[j]].length === 0) {
+ delete fu[functionicity[j]];
+ }
+ }
+
+ fu.name = f["(name)"];
+ fu.param = f["(params)"];
+ fu.line = f["(line)"];
+ fu.character = f["(character)"];
+ fu.last = f["(last)"];
+ fu.lastcharacter = f["(lastcharacter)"];
+
+ fu.metrics = {
+ complexity: f["(metrics)"].ComplexityCount,
+ parameters: (f["(params)"] || []).length,
+ statements: f["(metrics)"].statementCount
+ };
+
+ data.functions.push(fu);
+ }
+
+ if (unuseds.length > 0) {
+ data.unused = unuseds;
+ }
+
+ members = [];
+ for (n in member) {
+ if (typeof member[n] === "number") {
+ data.member = member;
+ break;
+ }
+ }
+
+ return data;
+ };
+
+ itself.jshint = itself;
+
+ return itself;
+}());
+if (typeof exports === "object" && exports) {
+ exports.JSHINT = JSHINT;
+}
-})()
},
-{}]
-},{},["E/GbHF"])
-;
+{"./lex.js":4,"./messages.js":5,"./options.js":7,"./reg.js":8,"./state.js":9,"./style.js":10,"./vars.js":11,"events":12,"underscore":2}],
+4:[function(_dereq_,module,exports){
+
+"use strict";
+
+var _ = _dereq_("underscore");
+var events = _dereq_("events");
+var reg = _dereq_("./reg.js");
+var state = _dereq_("./state.js").state;
+
+var unicodeData = _dereq_("../data/ascii-identifier-data.js");
+var asciiIdentifierStartTable = unicodeData.asciiIdentifierStartTable;
+var asciiIdentifierPartTable = unicodeData.asciiIdentifierPartTable;
+
+var Token = {
+ Identifier: 1,
+ Punctuator: 2,
+ NumericLiteral: 3,
+ StringLiteral: 4,
+ Comment: 5,
+ Keyword: 6,
+ NullLiteral: 7,
+ BooleanLiteral: 8,
+ RegExp: 9,
+ TemplateHead: 10,
+ TemplateMiddle: 11,
+ TemplateTail: 12,
+ NoSubstTemplate: 13
+};
+
+var Context = {
+ Block: 1,
+ Template: 2
+};
+
+function asyncTrigger() {
+ var _checks = [];
+
+ return {
+ push: function(fn) {
+ _checks.push(fn);
+ },
+
+ check: function() {
+ for (var check = 0; check < _checks.length; ++check) {
+ _checks[check]();
+ }
+
+ _checks.splice(0, _checks.length);
+ }
+ };
+}
+function Lexer(source) {
+ var lines = source;
+
+ if (typeof lines === "string") {
+ lines = lines
+ .replace(/\r\n/g, "\n")
+ .replace(/\r/g, "\n")
+ .split("\n");
+ }
+
+ if (lines[0] && lines[0].substr(0, 2) === "#!") {
+ if (lines[0].indexOf("node") !== -1) {
+ state.option.node = true;
+ }
+ lines[0] = "";
+ }
+
+ this.emitter = new events.EventEmitter();
+ this.source = source;
+ this.setLines(lines);
+ this.prereg = true;
+
+ this.line = 0;
+ this.char = 1;
+ this.from = 1;
+ this.input = "";
+ this.inComment = false;
+ this.context = [];
+ this.templateStarts = [];
+
+ for (var i = 0; i < state.option.indent; i += 1) {
+ state.tab += " ";
+ }
+}
+
+Lexer.prototype = {
+ _lines: [],
+
+ inContext: function(ctxType) {
+ return this.context.length > 0 && this.context[this.context.length - 1].type === ctxType;
+ },
+
+ pushContext: function(ctxType) {
+ this.context.push({ type: ctxType });
+ },
+
+ popContext: function() {
+ return this.context.pop();
+ },
+
+ isContext: function(context) {
+ return this.context.length > 0 && this.context[this.context.length - 1] === context;
+ },
+
+ currentContext: function() {
+ return this.context.length > 0 && this.context[this.context.length - 1];
+ },
+
+ getLines: function() {
+ this._lines = state.lines;
+ return this._lines;
+ },
+
+ setLines: function(val) {
+ this._lines = val;
+ state.lines = this._lines;
+ },
+ peek: function(i) {
+ return this.input.charAt(i || 0);
+ },
+ skip: function(i) {
+ i = i || 1;
+ this.char += i;
+ this.input = this.input.slice(i);
+ },
+ on: function(names, listener) {
+ names.split(" ").forEach(function(name) {
+ this.emitter.on(name, listener);
+ }.bind(this));
+ },
+ trigger: function() {
+ this.emitter.emit.apply(this.emitter, Array.prototype.slice.call(arguments));
+ },
+ triggerAsync: function(type, args, checks, fn) {
+ checks.push(function() {
+ if (fn()) {
+ this.trigger(type, args);
+ }
+ }.bind(this));
+ },
+ scanPunctuator: function() {
+ var ch1 = this.peek();
+ var ch2, ch3, ch4;
+
+ switch (ch1) {
+ case ".":
+ if ((/^[0-9]$/).test(this.peek(1))) {
+ return null;
+ }
+ if (this.peek(1) === "." && this.peek(2) === ".") {
+ return {
+ type: Token.Punctuator,
+ value: "..."
+ };
+ }
+ case "(":
+ case ")":
+ case ";":
+ case ",":
+ case "[":
+ case "]":
+ case ":":
+ case "~":
+ case "?":
+ return {
+ type: Token.Punctuator,
+ value: ch1
+ };
+ case "{":
+ this.pushContext(Context.Block);
+ return {
+ type: Token.Punctuator,
+ value: ch1
+ };
+ case "}":
+ if (this.inContext(Context.Block)) {
+ this.popContext();
+ }
+ return {
+ type: Token.Punctuator,
+ value: ch1
+ };
+ case "#":
+ return {
+ type: Token.Punctuator,
+ value: ch1
+ };
+ case "":
+ return null;
+ }
+
+ ch2 = this.peek(1);
+ ch3 = this.peek(2);
+ ch4 = this.peek(3);
+
+ if (ch1 === ">" && ch2 === ">" && ch3 === ">" && ch4 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: ">>>="
+ };
+ }
+
+ if (ch1 === "=" && ch2 === "=" && ch3 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: "==="
+ };
+ }
+
+ if (ch1 === "!" && ch2 === "=" && ch3 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: "!=="
+ };
+ }
+
+ if (ch1 === ">" && ch2 === ">" && ch3 === ">") {
+ return {
+ type: Token.Punctuator,
+ value: ">>>"
+ };
+ }
+
+ if (ch1 === "<" && ch2 === "<" && ch3 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: "<<="
+ };
+ }
+
+ if (ch1 === ">" && ch2 === ">" && ch3 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: ">>="
+ };
+ }
+ if (ch1 === "=" && ch2 === ">") {
+ return {
+ type: Token.Punctuator,
+ value: ch1 + ch2
+ };
+ }
+ if (ch1 === ch2 && ("+-<>&|".indexOf(ch1) >= 0)) {
+ return {
+ type: Token.Punctuator,
+ value: ch1 + ch2
+ };
+ }
+
+ if ("<>=!+-*%&|^".indexOf(ch1) >= 0) {
+ if (ch2 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: ch1 + ch2
+ };
+ }
+
+ return {
+ type: Token.Punctuator,
+ value: ch1
+ };
+ }
+
+ if (ch1 === "/") {
+ if (ch2 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: "/="
+ };
+ }
+
+ return {
+ type: Token.Punctuator,
+ value: "/"
+ };
+ }
+
+ return null;
+ },
+ scanComments: function() {
+ var ch1 = this.peek();
+ var ch2 = this.peek(1);
+ var rest = this.input.substr(2);
+ var startLine = this.line;
+ var startChar = this.char;
+
+ function commentToken(label, body, opt) {
+ var special = ["jshint", "jslint", "members", "member", "globals", "global", "exported"];
+ var isSpecial = false;
+ var value = label + body;
+ var commentType = "plain";
+ opt = opt || {};
+
+ if (opt.isMultiline) {
+ value += "*/";
+ }
+
+ body = body.replace(/\n/g, " ");
+
+ special.forEach(function(str) {
+ if (isSpecial) {
+ return;
+ }
+ if (label === "//" && str !== "jshint") {
+ return;
+ }
+
+ if (body.charAt(str.length) === " " && body.substr(0, str.length) === str) {
+ isSpecial = true;
+ label = label + str;
+ body = body.substr(str.length);
+ }
+
+ if (!isSpecial && body.charAt(0) === " " && body.charAt(str.length + 1) === " " &&
+ body.substr(1, str.length) === str) {
+ isSpecial = true;
+ label = label + " " + str;
+ body = body.substr(str.length + 1);
+ }
+
+ if (!isSpecial) {
+ return;
+ }
+
+ switch (str) {
+ case "member":
+ commentType = "members";
+ break;
+ case "global":
+ commentType = "globals";
+ break;
+ default:
+ commentType = str;
+ }
+ });
+
+ return {
+ type: Token.Comment,
+ commentType: commentType,
+ value: value,
+ body: body,
+ isSpecial: isSpecial,
+ isMultiline: opt.isMultiline || false,
+ isMalformed: opt.isMalformed || false
+ };
+ }
+ if (ch1 === "*" && ch2 === "/") {
+ this.trigger("error", {
+ code: "E018",
+ line: startLine,
+ character: startChar
+ });
+
+ this.skip(2);
+ return null;
+ }
+ if (ch1 !== "/" || (ch2 !== "*" && ch2 !== "/")) {
+ return null;
+ }
+ if (ch2 === "/") {
+ this.skip(this.input.length); // Skip to the EOL.
+ return commentToken("//", rest);
+ }
+
+ var body = "";
+ if (ch2 === "*") {
+ this.inComment = true;
+ this.skip(2);
+
+ while (this.peek() !== "*" || this.peek(1) !== "/") {
+ if (this.peek() === "") { // End of Line
+ body += "\n";
+ if (!this.nextLine()) {
+ this.trigger("error", {
+ code: "E017",
+ line: startLine,
+ character: startChar
+ });
+
+ this.inComment = false;
+ return commentToken("/*", body, {
+ isMultiline: true,
+ isMalformed: true
+ });
+ }
+ } else {
+ body += this.peek();
+ this.skip();
+ }
+ }
+
+ this.skip(2);
+ this.inComment = false;
+ return commentToken("/*", body, { isMultiline: true });
+ }
+ },
+ scanKeyword: function() {
+ var result = /^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input);
+ var keywords = [
+ "if", "in", "do", "var", "for", "new",
+ "try", "let", "this", "else", "case",
+ "void", "with", "enum", "while", "break",
+ "catch", "throw", "const", "yield", "class",
+ "super", "return", "typeof", "delete",
+ "switch", "export", "import", "default",
+ "finally", "extends", "function", "continue",
+ "debugger", "instanceof"
+ ];
+
+ if (result && keywords.indexOf(result[0]) >= 0) {
+ return {
+ type: Token.Keyword,
+ value: result[0]
+ };
+ }
+
+ return null;
+ },
+ scanIdentifier: function() {
+ var id = "";
+ var index = 0;
+ var type, char;
+
+ function isNonAsciiIdentifierStart(code) {
+ return code > 256;
+ }
+
+ function isNonAsciiIdentifierPart(code) {
+ return code > 256;
+ }
+
+ function isHexDigit(str) {
+ return (/^[0-9a-fA-F]$/).test(str);
+ }
+
+ var readUnicodeEscapeSequence = function() {
+ index += 1;
+
+ if (this.peek(index) !== "u") {
+ return null;
+ }
+
+ var ch1 = this.peek(index + 1);
+ var ch2 = this.peek(index + 2);
+ var ch3 = this.peek(index + 3);
+ var ch4 = this.peek(index + 4);
+ var code;
+
+ if (isHexDigit(ch1) && isHexDigit(ch2) && isHexDigit(ch3) && isHexDigit(ch4)) {
+ code = parseInt(ch1 + ch2 + ch3 + ch4, 16);
+
+ if (asciiIdentifierPartTable[code] || isNonAsciiIdentifierPart(code)) {
+ index += 5;
+ return "\\u" + ch1 + ch2 + ch3 + ch4;
+ }
+
+ return null;
+ }
+
+ return null;
+ }.bind(this);
+
+ var getIdentifierStart = function() {
+ var chr = this.peek(index);
+ var code = chr.charCodeAt(0);
+
+ if (code === 92) {
+ return readUnicodeEscapeSequence();
+ }
+
+ if (code < 128) {
+ if (asciiIdentifierStartTable[code]) {
+ index += 1;
+ return chr;
+ }
+
+ return null;
+ }
+
+ if (isNonAsciiIdentifierStart(code)) {
+ index += 1;
+ return chr;
+ }
+
+ return null;
+ }.bind(this);
+
+ var getIdentifierPart = function() {
+ var chr = this.peek(index);
+ var code = chr.charCodeAt(0);
+
+ if (code === 92) {
+ return readUnicodeEscapeSequence();
+ }
+
+ if (code < 128) {
+ if (asciiIdentifierPartTable[code]) {
+ index += 1;
+ return chr;
+ }
+
+ return null;
+ }
+
+ if (isNonAsciiIdentifierPart(code)) {
+ index += 1;
+ return chr;
+ }
+
+ return null;
+ }.bind(this);
+
+ function removeEscapeSequences(id) {
+ return id.replace(/\\u([0-9a-fA-F]{4})/g, function(m0, codepoint) {
+ return String.fromCharCode(parseInt(codepoint, 16));
+ });
+ }
+
+ char = getIdentifierStart();
+ if (char === null) {
+ return null;
+ }
+
+ id = char;
+ for (;;) {
+ char = getIdentifierPart();
+
+ if (char === null) {
+ break;
+ }
+
+ id += char;
+ }
+
+ switch (id) {
+ case "true":
+ case "false":
+ type = Token.BooleanLiteral;
+ break;
+ case "null":
+ type = Token.NullLiteral;
+ break;
+ default:
+ type = Token.Identifier;
+ }
-function req() {return require.apply(this, arguments)}
-module.exports = req("jshint");
+ return {
+ type: type,
+ value: removeEscapeSequences(id),
+ text: id,
+ tokenLength: id.length
+ };
+ },
+ scanNumericLiteral: function() {
+ var index = 0;
+ var value = "";
+ var length = this.input.length;
+ var char = this.peek(index);
+ var bad;
+ var isAllowedDigit = isDecimalDigit;
+ var base = 10;
+ var isLegacy = false;
+
+ function isDecimalDigit(str) {
+ return (/^[0-9]$/).test(str);
+ }
+
+ function isOctalDigit(str) {
+ return (/^[0-7]$/).test(str);
+ }
+
+ function isBinaryDigit(str) {
+ return (/^[01]$/).test(str);
+ }
+
+ function isHexDigit(str) {
+ return (/^[0-9a-fA-F]$/).test(str);
+ }
+
+ function isIdentifierStart(ch) {
+ return (ch === "$") || (ch === "_") || (ch === "\\") ||
+ (ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z");
+ }
+
+ if (char !== "." && !isDecimalDigit(char)) {
+ return null;
+ }
+
+ if (char !== ".") {
+ value = this.peek(index);
+ index += 1;
+ char = this.peek(index);
+
+ if (value === "0") {
+ if (char === "x" || char === "X") {
+ isAllowedDigit = isHexDigit;
+ base = 16;
+
+ index += 1;
+ value += char;
+ }
+ if (char === "o" || char === "O") {
+ isAllowedDigit = isOctalDigit;
+ base = 8;
+
+ if (!state.option.esnext) {
+ this.trigger("warning", {
+ code: "W119",
+ line: this.line,
+ character: this.char,
+ data: [ "Octal integer literal" ]
+ });
+ }
+
+ index += 1;
+ value += char;
+ }
+ if (char === "b" || char === "B") {
+ isAllowedDigit = isBinaryDigit;
+ base = 2;
+
+ if (!state.option.esnext) {
+ this.trigger("warning", {
+ code: "W119",
+ line: this.line,
+ character: this.char,
+ data: [ "Binary integer literal" ]
+ });
+ }
+
+ index += 1;
+ value += char;
+ }
+ if (isOctalDigit(char)) {
+ isAllowedDigit = isOctalDigit;
+ base = 8;
+ isLegacy = true;
+ bad = false;
+
+ index += 1;
+ value += char;
+ }
+
+ if (!isOctalDigit(char) && isDecimalDigit(char)) {
+ index += 1;
+ value += char;
+ }
+ }
+
+ while (index < length) {
+ char = this.peek(index);
+
+ if (isLegacy && isDecimalDigit(char)) {
+ bad = true;
+ } else if (!isAllowedDigit(char)) {
+ break;
+ }
+ value += char;
+ index += 1;
+ }
+
+ if (isAllowedDigit !== isDecimalDigit) {
+ if (!isLegacy && value.length <= 2) { // 0x
+ return {
+ type: Token.NumericLiteral,
+ value: value,
+ isMalformed: true
+ };
+ }
+
+ if (index < length) {
+ char = this.peek(index);
+ if (isIdentifierStart(char)) {
+ return null;
+ }
+ }
+
+ return {
+ type: Token.NumericLiteral,
+ value: value,
+ base: base,
+ isLegacy: isLegacy,
+ isMalformed: false
+ };
+ }
+ }
+
+ if (char === ".") {
+ value += char;
+ index += 1;
+
+ while (index < length) {
+ char = this.peek(index);
+ if (!isDecimalDigit(char)) {
+ break;
+ }
+ value += char;
+ index += 1;
+ }
+ }
+
+ if (char === "e" || char === "E") {
+ value += char;
+ index += 1;
+ char = this.peek(index);
+
+ if (char === "+" || char === "-") {
+ value += this.peek(index);
+ index += 1;
+ }
-}); \ No newline at end of file
+ char = this.peek(index);
+ if (isDecimalDigit(char)) {
+ value += char;
+ index += 1;
+
+ while (index < length) {
+ char = this.peek(index);
+ if (!isDecimalDigit(char)) {
+ break;
+ }
+ value += char;
+ index += 1;
+ }
+ } else {
+ return null;
+ }
+ }
+
+ if (index < length) {
+ char = this.peek(index);
+ if (isIdentifierStart(char)) {
+ return null;
+ }
+ }
+
+ return {
+ type: Token.NumericLiteral,
+ value: value,
+ base: base,
+ isMalformed: !isFinite(value)
+ };
+ },
+ scanEscapeSequence: function(checks) {
+ var allowNewLine = false;
+ var jump = 1;
+ this.skip();
+ var char = this.peek();
+
+ switch (char) {
+ case "'":
+ this.triggerAsync("warning", {
+ code: "W114",
+ line: this.line,
+ character: this.char,
+ data: [ "\\'" ]
+ }, checks, function() {return state.jsonMode; });
+ break;
+ case "b":
+ char = "\\b";
+ break;
+ case "f":
+ char = "\\f";
+ break;
+ case "n":
+ char = "\\n";
+ break;
+ case "r":
+ char = "\\r";
+ break;
+ case "t":
+ char = "\\t";
+ break;
+ case "0":
+ char = "\\0";
+ var n = parseInt(this.peek(1), 10);
+ this.triggerAsync("warning", {
+ code: "W115",
+ line: this.line,
+ character: this.char
+ }, checks,
+ function() { return n >= 0 && n <= 7 && state.directive["use strict"]; });
+ break;
+ case "u":
+ var hexCode = this.input.substr(1, 4);
+ var code = parseInt(hexCode, 16);
+ if (isNaN(code)) {
+ this.trigger("warning", {
+ code: "W052",
+ line: this.line,
+ character: this.char,
+ data: [ "u" + hexCode ]
+ });
+ }
+ char = String.fromCharCode(code);
+ jump = 5;
+ break;
+ case "v":
+ this.triggerAsync("warning", {
+ code: "W114",
+ line: this.line,
+ character: this.char,
+ data: [ "\\v" ]
+ }, checks, function() { return state.jsonMode; });
+
+ char = "\v";
+ break;
+ case "x":
+ var x = parseInt(this.input.substr(1, 2), 16);
+
+ this.triggerAsync("warning", {
+ code: "W114",
+ line: this.line,
+ character: this.char,
+ data: [ "\\x-" ]
+ }, checks, function() { return state.jsonMode; });
+
+ char = String.fromCharCode(x);
+ jump = 3;
+ break;
+ case "\\":
+ char = "\\\\";
+ break;
+ case "\"":
+ char = "\\\"";
+ break;
+ case "/":
+ break;
+ case "":
+ allowNewLine = true;
+ char = "";
+ break;
+ }
+
+ return { char: char, jump: jump, allowNewLine: allowNewLine };
+ },
+ scanTemplateLiteral: function(checks) {
+ var tokenType;
+ var value = "";
+ var ch;
+ var startLine = this.line;
+ var startChar = this.char;
+ var depth = this.templateStarts.length;
+
+ if (!state.option.esnext) {
+ return null;
+ } else if (this.peek() === "`") {
+ tokenType = Token.TemplateHead;
+ this.templateStarts.push({ line: this.line, char: this.char });
+ depth = this.templateStarts.length;
+ this.skip(1);
+ this.pushContext(Context.Template);
+ } else if (this.inContext(Context.Template) && this.peek() === "}") {
+ tokenType = Token.TemplateMiddle;
+ } else {
+ return null;
+ }
+
+ while (this.peek() !== "`") {
+ while ((ch = this.peek()) === "") {
+ value += "\n";
+ if (!this.nextLine()) {
+ var startPos = this.templateStarts.pop();
+ this.trigger("error", {
+ code: "E052",
+ line: startPos.line,
+ character: startPos.char
+ });
+ return {
+ type: tokenType,
+ value: value,
+ startLine: startLine,
+ startChar: startChar,
+ isUnclosed: true,
+ depth: depth,
+ context: this.popContext()
+ };
+ }
+ }
+
+ if (ch === '$' && this.peek(1) === '{') {
+ value += '${';
+ this.skip(2);
+ return {
+ type: tokenType,
+ value: value,
+ startLine: startLine,
+ startChar: startChar,
+ isUnclosed: false,
+ depth: depth,
+ context: this.currentContext()
+ };
+ } else if (ch === '\\') {
+ var escape = this.scanEscapeSequence(checks);
+ value += escape.char;
+ this.skip(escape.jump);
+ } else if (ch !== '`') {
+ value += ch;
+ this.skip(1);
+ }
+ }
+ tokenType = tokenType === Token.TemplateHead ? Token.NoSubstTemplate : Token.TemplateTail;
+ this.skip(1);
+ this.templateStarts.pop();
+
+ return {
+ type: tokenType,
+ value: value,
+ startLine: startLine,
+ startChar: startChar,
+ isUnclosed: false,
+ depth: depth,
+ context: this.popContext()
+ };
+ },
+ scanStringLiteral: function(checks) {
+ var quote = this.peek();
+ if (quote !== "\"" && quote !== "'") {
+ return null;
+ }
+ this.triggerAsync("warning", {
+ code: "W108",
+ line: this.line,
+ character: this.char // +1?
+ }, checks, function() { return state.jsonMode && quote !== "\""; });
+
+ var value = "";
+ var startLine = this.line;
+ var startChar = this.char;
+ var allowNewLine = false;
+
+ this.skip();
+
+ outer: while (this.peek() !== quote) {
+ while (this.peek() === "") { // End Of Line
+
+ if (!allowNewLine) {
+ this.trigger("warning", {
+ code: "W112",
+ line: this.line,
+ character: this.char
+ });
+ } else {
+ allowNewLine = false;
+
+ this.triggerAsync("warning", {
+ code: "W043",
+ line: this.line,
+ character: this.char
+ }, checks, function() { return !state.option.multistr; });
+
+ this.triggerAsync("warning", {
+ code: "W042",
+ line: this.line,
+ character: this.char
+ }, checks, function() { return state.jsonMode && state.option.multistr; });
+ }
+
+ if (!this.nextLine()) {
+ this.trigger("error", {
+ code: "E029",
+ line: startLine,
+ character: startChar
+ });
+
+ return {
+ type: Token.StringLiteral,
+ value: value,
+ startLine: startLine,
+ startChar: startChar,
+ isUnclosed: true,
+ quote: quote
+ };
+ }
+
+ if (this.peek() == quote)
+ break outer;
+ }
+
+ allowNewLine = false;
+ var char = this.peek();
+ var jump = 1; // A length of a jump, after we're done
+
+ if (char < " ") {
+ this.trigger("warning", {
+ code: "W113",
+ line: this.line,
+ character: this.char,
+ data: [ "<non-printable>" ]
+ });
+ }
+ if (char === "\\") {
+ var parsed = this.scanEscapeSequence(checks);
+ char = parsed.char;
+ jump = parsed.jump;
+ allowNewLine = parsed.allowNewLine;
+ }
+
+ value += char;
+ this.skip(jump);
+ }
+
+ this.skip();
+ return {
+ type: Token.StringLiteral,
+ value: value,
+ startLine: startLine,
+ startChar: startChar,
+ isUnclosed: false,
+ quote: quote
+ };
+ },
+ scanRegExp: function() {
+ var index = 0;
+ var length = this.input.length;
+ var char = this.peek();
+ var value = char;
+ var body = "";
+ var flags = [];
+ var malformed = false;
+ var isCharSet = false;
+ var terminated;
+
+ var scanUnexpectedChars = function() {
+ if (char < " ") {
+ malformed = true;
+ this.trigger("warning", {
+ code: "W048",
+ line: this.line,
+ character: this.char
+ });
+ }
+ if (char === "<") {
+ malformed = true;
+ this.trigger("warning", {
+ code: "W049",
+ line: this.line,
+ character: this.char,
+ data: [ char ]
+ });
+ }
+ }.bind(this);
+ if (!this.prereg || char !== "/") {
+ return null;
+ }
+
+ index += 1;
+ terminated = false;
+
+ while (index < length) {
+ char = this.peek(index);
+ value += char;
+ body += char;
+
+ if (isCharSet) {
+ if (char === "]") {
+ if (this.peek(index - 1) !== "\\" || this.peek(index - 2) === "\\") {
+ isCharSet = false;
+ }
+ }
+
+ if (char === "\\") {
+ index += 1;
+ char = this.peek(index);
+ body += char;
+ value += char;
+
+ scanUnexpectedChars();
+ }
+
+ index += 1;
+ continue;
+ }
+
+ if (char === "\\") {
+ index += 1;
+ char = this.peek(index);
+ body += char;
+ value += char;
+
+ scanUnexpectedChars();
+
+ if (char === "/") {
+ index += 1;
+ continue;
+ }
+
+ if (char === "[") {
+ index += 1;
+ continue;
+ }
+ }
+
+ if (char === "[") {
+ isCharSet = true;
+ index += 1;
+ continue;
+ }
+
+ if (char === "/") {
+ body = body.substr(0, body.length - 1);
+ terminated = true;
+ index += 1;
+ break;
+ }
+
+ index += 1;
+ }
+
+ if (!terminated) {
+ this.trigger("error", {
+ code: "E015",
+ line: this.line,
+ character: this.from
+ });
+
+ return void this.trigger("fatal", {
+ line: this.line,
+ from: this.from
+ });
+ }
+
+ while (index < length) {
+ char = this.peek(index);
+ if (!/[gim]/.test(char)) {
+ break;
+ }
+ flags.push(char);
+ value += char;
+ index += 1;
+ }
+
+ try {
+ new RegExp(body, flags.join(""));
+ } catch (err) {
+ malformed = true;
+ this.trigger("error", {
+ code: "E016",
+ line: this.line,
+ character: this.char,
+ data: [ err.message ] // Platform dependent!
+ });
+ }
+
+ return {
+ type: Token.RegExp,
+ value: value,
+ flags: flags,
+ isMalformed: malformed
+ };
+ },
+ scanNonBreakingSpaces: function() {
+ return state.option.nonbsp ?
+ this.input.search(/(\u00A0)/) : -1;
+ },
+ scanUnsafeChars: function() {
+ return this.input.search(reg.unsafeChars);
+ },
+ next: function(checks) {
+ this.from = this.char;
+ var start;
+ if (/\s/.test(this.peek())) {
+ start = this.char;
+
+ while (/\s/.test(this.peek())) {
+ this.from += 1;
+ this.skip();
+ }
+ }
+
+ var match = this.scanComments() ||
+ this.scanStringLiteral(checks) ||
+ this.scanTemplateLiteral(checks);
+
+ if (match) {
+ return match;
+ }
+
+ match =
+ this.scanRegExp() ||
+ this.scanPunctuator() ||
+ this.scanKeyword() ||
+ this.scanIdentifier() ||
+ this.scanNumericLiteral();
+
+ if (match) {
+ this.skip(match.tokenLength || match.value.length);
+ return match;
+ }
+
+ return null;
+ },
+ nextLine: function() {
+ var char;
+
+ if (this.line >= this.getLines().length) {
+ return false;
+ }
+
+ this.input = this.getLines()[this.line];
+ this.line += 1;
+ this.char = 1;
+ this.from = 1;
+
+ var inputTrimmed = this.input.trim();
+
+ var startsWith = function() {
+ return _.some(arguments, function(prefix) {
+ return inputTrimmed.indexOf(prefix) === 0;
+ });
+ };
+
+ var endsWith = function() {
+ return _.some(arguments, function(suffix) {
+ return inputTrimmed.indexOf(suffix, inputTrimmed.length - suffix.length) !== -1;
+ });
+ };
+ if (state.ignoreLinterErrors === true) {
+ if (!startsWith("/*", "//") && !(this.inComment && endsWith("*/"))) {
+ this.input = "";
+ }
+ }
+
+ char = this.scanNonBreakingSpaces();
+ if (char >= 0) {
+ this.trigger("warning", { code: "W125", line: this.line, character: char + 1 });
+ }
+
+ this.input = this.input.replace(/\t/g, state.tab);
+ char = this.scanUnsafeChars();
+
+ if (char >= 0) {
+ this.trigger("warning", { code: "W100", line: this.line, character: char });
+ }
+
+ if (state.option.maxlen && state.option.maxlen < this.input.length) {
+ var inComment = this.inComment ||
+ startsWith.call(inputTrimmed, "//") ||
+ startsWith.call(inputTrimmed, "/*");
+
+ var shouldTriggerError = !inComment || !reg.maxlenException.test(inputTrimmed);
+
+ if (shouldTriggerError) {
+ this.trigger("warning", { code: "W101", line: this.line, character: this.input.length });
+ }
+ }
+
+ return true;
+ },
+ start: function() {
+ this.nextLine();
+ },
+ token: function() {
+ var checks = asyncTrigger();
+ var token;
+
+
+ function isReserved(token, isProperty) {
+ if (!token.reserved) {
+ return false;
+ }
+ var meta = token.meta;
+
+ if (meta && meta.isFutureReservedWord && state.option.inES5()) {
+ if (!meta.es5) {
+ return false;
+ }
+ if (meta.strictOnly) {
+ if (!state.option.strict && !state.directive["use strict"]) {
+ return false;
+ }
+ }
+
+ if (isProperty) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ var create = function(type, value, isProperty, token) {
+ var obj;
+
+ if (type !== "(endline)" && type !== "(end)") {
+ this.prereg = false;
+ }
+
+ if (type === "(punctuator)") {
+ switch (value) {
+ case ".":
+ case ")":
+ case "~":
+ case "#":
+ case "]":
+ case "++":
+ case "--":
+ this.prereg = false;
+ break;
+ default:
+ this.prereg = true;
+ }
+
+ obj = Object.create(state.syntax[value] || state.syntax["(error)"]);
+ }
+
+ if (type === "(identifier)") {
+ if (value === "return" || value === "case" || value === "typeof") {
+ this.prereg = true;
+ }
+
+ if (_.has(state.syntax, value)) {
+ obj = Object.create(state.syntax[value] || state.syntax["(error)"]);
+ if (!isReserved(obj, isProperty && type === "(identifier)")) {
+ obj = null;
+ }
+ }
+ }
+
+ if (!obj) {
+ obj = Object.create(state.syntax[type]);
+ }
+
+ obj.identifier = (type === "(identifier)");
+ obj.type = obj.type || type;
+ obj.value = value;
+ obj.line = this.line;
+ obj.character = this.char;
+ obj.from = this.from;
+ if (obj.identifier && token) obj.raw_text = token.text || token.value;
+ if (token && token.startLine && token.startLine !== this.line) {
+ obj.startLine = token.startLine;
+ }
+ if (token && token.context) {
+ obj.context = token.context;
+ }
+ if (token && token.depth) {
+ obj.depth = token.depth;
+ }
+ if (token && token.isUnclosed) {
+ obj.isUnclosed = token.isUnclosed;
+ }
+
+ if (isProperty && obj.identifier) {
+ obj.isProperty = isProperty;
+ }
+
+ obj.check = checks.check;
+
+ return obj;
+ }.bind(this);
+
+ for (;;) {
+ if (!this.input.length) {
+ return create(this.nextLine() ? "(endline)" : "(end)", "");
+ }
+
+ token = this.next(checks);
+
+ if (!token) {
+ if (this.input.length) {
+ this.trigger("error", {
+ code: "E024",
+ line: this.line,
+ character: this.char,
+ data: [ this.peek() ]
+ });
+
+ this.input = "";
+ }
+
+ continue;
+ }
+
+ switch (token.type) {
+ case Token.StringLiteral:
+ this.triggerAsync("String", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ startLine: token.startLine,
+ startChar: token.startChar,
+ value: token.value,
+ quote: token.quote
+ }, checks, function() { return true; });
+
+ return create("(string)", token.value, null, token);
+
+ case Token.TemplateHead:
+ this.trigger("TemplateHead", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ startLine: token.startLine,
+ startChar: token.startChar,
+ value: token.value
+ });
+ return create("(template)", token.value, null, token);
+
+ case Token.TemplateMiddle:
+ this.trigger("TemplateMiddle", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ startLine: token.startLine,
+ startChar: token.startChar,
+ value: token.value
+ });
+ return create("(template middle)", token.value, null, token);
+
+ case Token.TemplateTail:
+ this.trigger("TemplateTail", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ startLine: token.startLine,
+ startChar: token.startChar,
+ value: token.value
+ });
+ return create("(template tail)", token.value, null, token);
+
+ case Token.NoSubstTemplate:
+ this.trigger("NoSubstTemplate", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ startLine: token.startLine,
+ startChar: token.startChar,
+ value: token.value
+ });
+ return create("(no subst template)", token.value, null, token);
+
+ case Token.Identifier:
+ this.trigger("Identifier", {
+ line: this.line,
+ char: this.char,
+ from: this.form,
+ name: token.value,
+ raw_name: token.text,
+ isProperty: state.tokens.curr.id === "."
+ });
+ case Token.Keyword:
+ case Token.NullLiteral:
+ case Token.BooleanLiteral:
+ return create("(identifier)", token.value, state.tokens.curr.id === ".", token);
+
+ case Token.NumericLiteral:
+ if (token.isMalformed) {
+ this.trigger("warning", {
+ code: "W045",
+ line: this.line,
+ character: this.char,
+ data: [ token.value ]
+ });
+ }
+
+ this.triggerAsync("warning", {
+ code: "W114",
+ line: this.line,
+ character: this.char,
+ data: [ "0x-" ]
+ }, checks, function() { return token.base === 16 && state.jsonMode; });
+
+ this.triggerAsync("warning", {
+ code: "W115",
+ line: this.line,
+ character: this.char
+ }, checks, function() {
+ return state.directive["use strict"] && token.base === 8 && token.isLegacy;
+ });
+
+ this.trigger("Number", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ value: token.value,
+ base: token.base,
+ isMalformed: token.malformed
+ });
+
+ return create("(number)", token.value);
+
+ case Token.RegExp:
+ return create("(regexp)", token.value);
+
+ case Token.Comment:
+ state.tokens.curr.comment = true;
+
+ if (token.isSpecial) {
+ return {
+ id: '(comment)',
+ value: token.value,
+ body: token.body,
+ type: token.commentType,
+ isSpecial: token.isSpecial,
+ line: this.line,
+ character: this.char,
+ from: this.from
+ };
+ }
+
+ break;
+
+ case "":
+ break;
+
+ default:
+ return create("(punctuator)", token.value);
+ }
+ }
+ }
+};
+
+exports.Lexer = Lexer;
+exports.Context = Context;
+
+},
+{"../data/ascii-identifier-data.js":1,"./reg.js":8,"./state.js":9,"events":12,"underscore":2}],
+5:[function(_dereq_,module,exports){
+"use strict";
+
+var _ = _dereq_("underscore");
+
+var errors = {
+ E001: "Bad option: '{a}'.",
+ E002: "Bad option value.",
+ E003: "Expected a JSON value.",
+ E004: "Input is neither a string nor an array of strings.",
+ E005: "Input is empty.",
+ E006: "Unexpected early end of program.",
+ E007: "Missing \"use strict\" statement.",
+ E008: "Strict violation.",
+ E009: "Option 'validthis' can't be used in a global scope.",
+ E010: "'with' is not allowed in strict mode.",
+ E011: "const '{a}' has already been declared.",
+ E012: "const '{a}' is initialized to 'undefined'.",
+ E013: "Attempting to override '{a}' which is a constant.",
+ E014: "A regular expression literal can be confused with '/='.",
+ E015: "Unclosed regular expression.",
+ E016: "Invalid regular expression.",
+ E017: "Unclosed comment.",
+ E018: "Unbegun comment.",
+ E019: "Unmatched '{a}'.",
+ E020: "Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",
+ E021: "Expected '{a}' and instead saw '{b}'.",
+ E022: "Line breaking error '{a}'.",
+ E023: "Missing '{a}'.",
+ E024: "Unexpected '{a}'.",
+ E025: "Missing ':' on a case clause.",
+ E026: "Missing '}' to match '{' from line {a}.",
+ E027: "Missing ']' to match '[' from line {a}.",
+ E028: "Illegal comma.",
+ E029: "Unclosed string.",
+ E030: "Expected an identifier and instead saw '{a}'.",
+ E031: "Bad assignment.", // FIXME: Rephrase
+ E032: "Expected a small integer or 'false' and instead saw '{a}'.",
+ E033: "Expected an operator and instead saw '{a}'.",
+ E034: "get/set are ES5 features.",
+ E035: "Missing property name.",
+ E036: "Expected to see a statement and instead saw a block.",
+ E037: null,
+ E038: null,
+ E039: "Function declarations are not invocable. Wrap the whole function invocation in parens.",
+ E040: "Each value should have its own case label.",
+ E041: "Unrecoverable syntax error.",
+ E042: "Stopping.",
+ E043: "Too many errors.",
+ E044: null,
+ E045: "Invalid for each loop.",
+ E046: "A yield statement shall be within a generator function (with syntax: `function*`)",
+ E047: null, // Vacant
+ E048: "Let declaration not directly within block.",
+ E049: "A {a} cannot be named '{b}'.",
+ E050: "Mozilla requires the yield expression to be parenthesized here.",
+ E051: "Regular parameters cannot come after default parameters.",
+ E052: "Unclosed template literal.",
+ E053: "Export declaration must be in global scope.",
+ E054: "Class properties must be methods. Expected '(' but instead saw '{a}'."
+};
+
+var warnings = {
+ W001: "'hasOwnProperty' is a really bad name.",
+ W002: "Value of '{a}' may be overwritten in IE 8 and earlier.",
+ W003: "'{a}' was used before it was defined.",
+ W004: "'{a}' is already defined.",
+ W005: "A dot following a number can be confused with a decimal point.",
+ W006: "Confusing minuses.",
+ W007: "Confusing plusses.",
+ W008: "A leading decimal point can be confused with a dot: '{a}'.",
+ W009: "The array literal notation [] is preferable.",
+ W010: "The object literal notation {} is preferable.",
+ W011: null,
+ W012: null,
+ W013: null,
+ W014: "Bad line breaking before '{a}'.",
+ W015: null,
+ W016: "Unexpected use of '{a}'.",
+ W017: "Bad operand.",
+ W018: "Confusing use of '{a}'.",
+ W019: "Use the isNaN function to compare with NaN.",
+ W020: "Read only.",
+ W021: "'{a}' is a function.",
+ W022: "Do not assign to the exception parameter.",
+ W023: "Expected an identifier in an assignment and instead saw a function invocation.",
+ W024: "Expected an identifier and instead saw '{a}' (a reserved word).",
+ W025: "Missing name in function declaration.",
+ W026: "Inner functions should be listed at the top of the outer function.",
+ W027: "Unreachable '{a}' after '{b}'.",
+ W028: "Label '{a}' on {b} statement.",
+ W030: "Expected an assignment or function call and instead saw an expression.",
+ W031: "Do not use 'new' for side effects.",
+ W032: "Unnecessary semicolon.",
+ W033: "Missing semicolon.",
+ W034: "Unnecessary directive \"{a}\".",
+ W035: "Empty block.",
+ W036: "Unexpected /*member '{a}'.",
+ W037: "'{a}' is a statement label.",
+ W038: "'{a}' used out of scope.",
+ W039: "'{a}' is not allowed.",
+ W040: "Possible strict violation.",
+ W041: "Use '{a}' to compare with '{b}'.",
+ W042: "Avoid EOL escaping.",
+ W043: "Bad escaping of EOL. Use option multistr if needed.",
+ W044: "Bad or unnecessary escaping.", /* TODO(caitp): remove W044 */
+ W045: "Bad number '{a}'.",
+ W046: "Don't use extra leading zeros '{a}'.",
+ W047: "A trailing decimal point can be confused with a dot: '{a}'.",
+ W048: "Unexpected control character in regular expression.",
+ W049: "Unexpected escaped character '{a}' in regular expression.",
+ W050: "JavaScript URL.",
+ W051: "Variables should not be deleted.",
+ W052: "Unexpected '{a}'.",
+ W053: "Do not use {a} as a constructor.",
+ W054: "The Function constructor is a form of eval.",
+ W055: "A constructor name should start with an uppercase letter.",
+ W056: "Bad constructor.",
+ W057: "Weird construction. Is 'new' necessary?",
+ W058: "Missing '()' invoking a constructor.",
+ W059: "Avoid arguments.{a}.",
+ W060: "document.write can be a form of eval.",
+ W061: "eval can be harmful.",
+ W062: "Wrap an immediate function invocation in parens " +
+ "to assist the reader in understanding that the expression " +
+ "is the result of a function, and not the function itself.",
+ W063: "Math is not a function.",
+ W064: "Missing 'new' prefix when invoking a constructor.",
+ W065: "Missing radix parameter.",
+ W066: "Implied eval. Consider passing a function instead of a string.",
+ W067: "Bad invocation.",
+ W068: "Wrapping non-IIFE function literals in parens is unnecessary.",
+ W069: "['{a}'] is better written in dot notation.",
+ W070: "Extra comma. (it breaks older versions of IE)",
+ W071: "This function has too many statements. ({a})",
+ W072: "This function has too many parameters. ({a})",
+ W073: "Blocks are nested too deeply. ({a})",
+ W074: "This function's cyclomatic complexity is too high. ({a})",
+ W075: "Duplicate {a} '{b}'.",
+ W076: "Unexpected parameter '{a}' in get {b} function.",
+ W077: "Expected a single parameter in set {a} function.",
+ W078: "Setter is defined without getter.",
+ W079: "Redefinition of '{a}'.",
+ W080: "It's not necessary to initialize '{a}' to 'undefined'.",
+ W081: null,
+ W082: "Function declarations should not be placed in blocks. " +
+ "Use a function expression or move the statement to the top of " +
+ "the outer function.",
+ W083: "Don't make functions within a loop.",
+ W084: "Assignment in conditional expression",
+ W085: "Don't use 'with'.",
+ W086: "Expected a 'break' statement before '{a}'.",
+ W087: "Forgotten 'debugger' statement?",
+ W088: "Creating global 'for' variable. Should be 'for (var {a} ...'.",
+ W089: "The body of a for in should be wrapped in an if statement to filter " +
+ "unwanted properties from the prototype.",
+ W090: "'{a}' is not a statement label.",
+ W091: "'{a}' is out of scope.",
+ W093: "Did you mean to return a conditional instead of an assignment?",
+ W094: "Unexpected comma.",
+ W095: "Expected a string and instead saw {a}.",
+ W096: "The '{a}' key may produce unexpected results.",
+ W097: "Use the function form of \"use strict\".",
+ W098: "'{a}' is defined but never used.",
+ W099: null,
+ W100: "This character may get silently deleted by one or more browsers.",
+ W101: "Line is too long.",
+ W102: null,
+ W103: "The '{a}' property is deprecated.",
+ W104: "'{a}' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz).",
+ W105: "Unexpected {a} in '{b}'.",
+ W106: "Identifier '{a}' is not in camel case.",
+ W107: "Script URL.",
+ W108: "Strings must use doublequote.",
+ W109: "Strings must use singlequote.",
+ W110: "Mixed double and single quotes.",
+ W112: "Unclosed string.",
+ W113: "Control character in string: {a}.",
+ W114: "Avoid {a}.",
+ W115: "Octal literals are not allowed in strict mode.",
+ W116: "Expected '{a}' and instead saw '{b}'.",
+ W117: "'{a}' is not defined.",
+ W118: "'{a}' is only available in Mozilla JavaScript extensions (use moz option).",
+ W119: "'{a}' is only available in ES6 (use esnext option).",
+ W120: "You might be leaking a variable ({a}) here.",
+ W121: "Extending prototype of native object: '{a}'.",
+ W122: "Invalid typeof value '{a}'",
+ W123: "'{a}' is already defined in outer scope.",
+ W124: "A generator function shall contain a yield statement.",
+ W125: "This line contains non-breaking spaces: http://jshint.com/doc/options/#nonbsp",
+ W126: "Unnecessary grouping operator.",
+ W127: "Unexpected use of a comma operator.",
+ W128: "Empty array elements require elision=true.",
+ W129: "'{a}' is defined in a future version of JavaScript. Use a " +
+ "different variable name to avoid migration issues.",
+ W130: "Invalid element after rest element.",
+ W131: "Invalid parameter after rest parameter."
+};
+
+var info = {
+ I001: "Comma warnings can be turned off with 'laxcomma'.",
+ I002: null,
+ I003: "ES5 option is now set per default"
+};
+
+exports.errors = {};
+exports.warnings = {};
+exports.info = {};
+
+_.each(errors, function(desc, code) {
+ exports.errors[code] = { code: code, desc: desc };
+});
+
+_.each(warnings, function(desc, code) {
+ exports.warnings[code] = { code: code, desc: desc };
+});
+
+_.each(info, function(desc, code) {
+ exports.info[code] = { code: code, desc: desc };
+});
+
+},
+{"underscore":2}],
+6:[function(_dereq_,module,exports){
+"use strict";
+
+function NameStack() {
+ this._stack = [];
+}
+
+Object.defineProperty(NameStack.prototype, "length", {
+ get: function() {
+ return this._stack.length;
+ }
+});
+NameStack.prototype.push = function() {
+ this._stack.push(null);
+};
+NameStack.prototype.pop = function() {
+ this._stack.pop();
+};
+NameStack.prototype.set = function(token) {
+ this._stack[this.length - 1] = token;
+};
+NameStack.prototype.infer = function() {
+ var nameToken = this._stack[this.length - 1];
+ var prefix = "";
+ var type;
+ if (!nameToken || nameToken.type === "class") {
+ nameToken = this._stack[this.length - 2];
+ }
+
+ if (!nameToken) {
+ return "(empty)";
+ }
+
+ type = nameToken.type;
+
+ if (type !== "(string)" && type !== "(number)" && type !== "(identifier)" && type !== "default") {
+ return "(expression)";
+ }
+
+ if (nameToken.accessorType) {
+ prefix = nameToken.accessorType + " ";
+ }
+
+ return prefix + nameToken.value;
+};
+
+module.exports = NameStack;
+
+},
+{}],
+7:[function(_dereq_,module,exports){
+"use strict";
+exports.bool = {
+ enforcing: {
+ bitwise : true,
+ freeze : true,
+ camelcase : true,
+ curly : true,
+ eqeqeq : true,
+ futurehostile: true,
+ notypeof : true,
+ es3 : true,
+ es5 : true,
+ forin : true,
+ funcscope : true,
+ globalstrict: true,
+ immed : true,
+ iterator : true,
+ newcap : true,
+ noarg : true,
+ nocomma : true,
+ noempty : true,
+ nonbsp : true,
+ nonew : true,
+ undef : true,
+ singleGroups: false,
+ enforceall : false
+ },
+ relaxing: {
+ asi : true,
+ multistr : true,
+ debug : true,
+ boss : true,
+ phantom : true,
+ evil : true,
+ plusplus : true,
+ proto : true,
+ scripturl : true,
+ strict : true,
+ sub : true,
+ supernew : true,
+ laxbreak : true,
+ laxcomma : true,
+ validthis : true,
+ withstmt : true,
+ moz : true,
+ noyield : true,
+ eqnull : true,
+ lastsemic : true,
+ loopfunc : true,
+ expr : true,
+ esnext : true,
+ elision : true,
+ },
+ environments: {
+ mootools : true,
+ couch : true,
+ jasmine : true,
+ jquery : true,
+ node : true,
+ qunit : true,
+ rhino : true,
+ shelljs : true,
+ prototypejs : true,
+ yui : true,
+ mocha : true,
+ wsh : true,
+ worker : true,
+ nonstandard : true,
+ browser : true,
+ browserify : true,
+ devel : true,
+ dojo : true,
+ typed : true
+ },
+ obsolete: {
+ onecase : true, // if one case switch statements should be allowed
+ regexp : true, // if the . should not be allowed in regexp literals
+ regexdash : true // if unescaped first/last dash (-) inside brackets
+ }
+};
+exports.val = {
+ maxlen : false,
+ indent : false,
+ maxerr : false,
+
+ predef : false, // predef is deprecated and being replaced by globals
+ globals : false,
+ quotmark : false,
+
+ scope : false,
+ maxstatements: false,
+ maxdepth : false,
+ maxparams : false,
+ maxcomplexity: false,
+ shadow : false,
+ unused : true,
+ latedef : false,
+
+ ignore : false, // start/end ignoring lines of code, bypassing the lexer
+ ignoreDelimiters: false // array of start/end delimiters used to ignore
+};
+exports.inverted = {
+ bitwise : true,
+ forin : true,
+ newcap : true,
+ plusplus: true,
+ regexp : true,
+ undef : true,
+ eqeqeq : true,
+ strict : true
+};
+
+exports.validNames = Object.keys(exports.val)
+ .concat(Object.keys(exports.bool.relaxing))
+ .concat(Object.keys(exports.bool.enforcing))
+ .concat(Object.keys(exports.bool.obsolete))
+ .concat(Object.keys(exports.bool.environments));
+exports.renamed = {
+ eqeq : "eqeqeq",
+ windows: "wsh",
+ sloppy : "strict"
+};
+
+exports.removed = {
+ nomen: true,
+ onevar: true,
+ passfail: true,
+ white: true,
+ gcl: true,
+ smarttabs: true,
+ trailing: true
+};
+
+},
+{}],
+8:[function(_dereq_,module,exports){
+
+"use strict";
+exports.unsafeString =
+ /@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i;
+exports.unsafeChars =
+ /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
+exports.needEsc =
+ /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
+
+exports.needEscGlobal =
+ /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
+exports.starSlash = /\*\//;
+exports.identifier = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/;
+exports.javascriptURL = /^(?:javascript|jscript|ecmascript|vbscript|livescript)\s*:/i;
+exports.fallsThrough = /^\s*\/\*\s*falls?\sthrough\s*\*\/\s*$/;
+exports.maxlenException = /^(?:(?:\/\/|\/\*|\*) ?)?[^ ]+$/;
+
+},
+{}],
+9:[function(_dereq_,module,exports){
+"use strict";
+var NameStack = _dereq_("./name-stack.js");
+
+var state = {
+ syntax: {},
+
+ reset: function() {
+ this.tokens = {
+ prev: null,
+ next: null,
+ curr: null
+ };
+
+ this.option = {};
+ this.ignored = {};
+ this.directive = {};
+ this.jsonMode = false;
+ this.jsonWarnings = [];
+ this.lines = [];
+ this.tab = "";
+ this.cache = {}; // Node.JS doesn't have Map. Sniff.
+ this.ignoredLines = {};
+ this.forinifcheckneeded = false;
+ this.nameStack = new NameStack();
+ this.ignoreLinterErrors = false;
+ }
+};
+
+exports.state = state;
+
+},
+{"./name-stack.js":6}],
+10:[function(_dereq_,module,exports){
+"use strict";
+
+exports.register = function(linter) {
+
+ linter.on("Identifier", function style_scanProto(data) {
+ if (linter.getOption("proto")) {
+ return;
+ }
+
+ if (data.name === "__proto__") {
+ linter.warn("W103", {
+ line: data.line,
+ char: data.char,
+ data: [ data.name ]
+ });
+ }
+ });
+
+ linter.on("Identifier", function style_scanIterator(data) {
+ if (linter.getOption("iterator")) {
+ return;
+ }
+
+ if (data.name === "__iterator__") {
+ linter.warn("W104", {
+ line: data.line,
+ char: data.char,
+ data: [ data.name ]
+ });
+ }
+ });
+
+ linter.on("Identifier", function style_scanCamelCase(data) {
+ if (!linter.getOption("camelcase")) {
+ return;
+ }
+
+ if (data.name.replace(/^_+|_+$/g, "").indexOf("_") > -1 && !data.name.match(/^[A-Z0-9_]*$/)) {
+ linter.warn("W106", {
+ line: data.line,
+ char: data.from,
+ data: [ data.name ]
+ });
+ }
+ });
+
+ linter.on("String", function style_scanQuotes(data) {
+ var quotmark = linter.getOption("quotmark");
+ var code;
+
+ if (!quotmark) {
+ return;
+ }
+
+ if (quotmark === "single" && data.quote !== "'") {
+ code = "W109";
+ }
+
+ if (quotmark === "double" && data.quote !== "\"") {
+ code = "W108";
+ }
+
+ if (quotmark === true) {
+ if (!linter.getCache("quotmark")) {
+ linter.setCache("quotmark", data.quote);
+ }
+
+ if (linter.getCache("quotmark") !== data.quote) {
+ code = "W110";
+ }
+ }
+
+ if (code) {
+ linter.warn(code, {
+ line: data.line,
+ char: data.char,
+ });
+ }
+ });
+
+ linter.on("Number", function style_scanNumbers(data) {
+ if (data.value.charAt(0) === ".") {
+ linter.warn("W008", {
+ line: data.line,
+ char: data.char,
+ data: [ data.value ]
+ });
+ }
+
+ if (data.value.substr(data.value.length - 1) === ".") {
+ linter.warn("W047", {
+ line: data.line,
+ char: data.char,
+ data: [ data.value ]
+ });
+ }
+
+ if (/^00+/.test(data.value)) {
+ linter.warn("W046", {
+ line: data.line,
+ char: data.char,
+ data: [ data.value ]
+ });
+ }
+ });
+
+ linter.on("String", function style_scanJavaScriptURLs(data) {
+ var re = /^(?:javascript|jscript|ecmascript|vbscript|livescript)\s*:/i;
+
+ if (linter.getOption("scripturl")) {
+ return;
+ }
+
+ if (re.test(data.value)) {
+ linter.warn("W107", {
+ line: data.line,
+ char: data.char
+ });
+ }
+ });
+};
+
+},
+{}],
+11:[function(_dereq_,module,exports){
+
+"use strict";
+
+exports.reservedVars = {
+ arguments : false,
+ NaN : false
+};
+
+exports.ecmaIdentifiers = {
+ 3: {
+ Array : false,
+ Boolean : false,
+ Date : false,
+ decodeURI : false,
+ decodeURIComponent : false,
+ encodeURI : false,
+ encodeURIComponent : false,
+ Error : false,
+ "eval" : false,
+ EvalError : false,
+ Function : false,
+ hasOwnProperty : false,
+ isFinite : false,
+ isNaN : false,
+ Math : false,
+ Number : false,
+ Object : false,
+ parseInt : false,
+ parseFloat : false,
+ RangeError : false,
+ ReferenceError : false,
+ RegExp : false,
+ String : false,
+ SyntaxError : false,
+ TypeError : false,
+ URIError : false
+ },
+ 5: {
+ JSON : false
+ },
+ 6: {
+ Map : false,
+ Promise : false,
+ Proxy : false,
+ Reflect : false,
+ Set : false,
+ Symbol : false,
+ WeakMap : false,
+ WeakSet : false
+ }
+};
+
+exports.browser = {
+ Audio : false,
+ Blob : false,
+ addEventListener : false,
+ applicationCache : false,
+ atob : false,
+ blur : false,
+ btoa : false,
+ cancelAnimationFrame : false,
+ CanvasGradient : false,
+ CanvasPattern : false,
+ CanvasRenderingContext2D: false,
+ CSS : false,
+ clearInterval : false,
+ clearTimeout : false,
+ close : false,
+ closed : false,
+ Comment : false,
+ CustomEvent : false,
+ DOMParser : false,
+ defaultStatus : false,
+ Document : false,
+ document : false,
+ DocumentFragment : false,
+ Element : false,
+ ElementTimeControl : false,
+ Event : false,
+ event : false,
+ FileReader : false,
+ FormData : false,
+ focus : false,
+ frames : false,
+ getComputedStyle : false,
+ HTMLElement : false,
+ HTMLAnchorElement : false,
+ HTMLBaseElement : false,
+ HTMLBlockquoteElement: false,
+ HTMLBodyElement : false,
+ HTMLBRElement : false,
+ HTMLButtonElement : false,
+ HTMLCanvasElement : false,
+ HTMLDirectoryElement : false,
+ HTMLDivElement : false,
+ HTMLDListElement : false,
+ HTMLFieldSetElement : false,
+ HTMLFontElement : false,
+ HTMLFormElement : false,
+ HTMLFrameElement : false,
+ HTMLFrameSetElement : false,
+ HTMLHeadElement : false,
+ HTMLHeadingElement : false,
+ HTMLHRElement : false,
+ HTMLHtmlElement : false,
+ HTMLIFrameElement : false,
+ HTMLImageElement : false,
+ HTMLInputElement : false,
+ HTMLIsIndexElement : false,
+ HTMLLabelElement : false,
+ HTMLLayerElement : false,
+ HTMLLegendElement : false,
+ HTMLLIElement : false,
+ HTMLLinkElement : false,
+ HTMLMapElement : false,
+ HTMLMenuElement : false,
+ HTMLMetaElement : false,
+ HTMLModElement : false,
+ HTMLObjectElement : false,
+ HTMLOListElement : false,
+ HTMLOptGroupElement : false,
+ HTMLOptionElement : false,
+ HTMLParagraphElement : false,
+ HTMLParamElement : false,
+ HTMLPreElement : false,
+ HTMLQuoteElement : false,
+ HTMLScriptElement : false,
+ HTMLSelectElement : false,
+ HTMLStyleElement : false,
+ HTMLTableCaptionElement: false,
+ HTMLTableCellElement : false,
+ HTMLTableColElement : false,
+ HTMLTableElement : false,
+ HTMLTableRowElement : false,
+ HTMLTableSectionElement: false,
+ HTMLTemplateElement : false,
+ HTMLTextAreaElement : false,
+ HTMLTitleElement : false,
+ HTMLUListElement : false,
+ HTMLVideoElement : false,
+ history : false,
+ Image : false,
+ Intl : false,
+ length : false,
+ localStorage : false,
+ location : false,
+ matchMedia : false,
+ MessageChannel : false,
+ MessageEvent : false,
+ MessagePort : false,
+ MouseEvent : false,
+ moveBy : false,
+ moveTo : false,
+ MutationObserver : false,
+ name : false,
+ Node : false,
+ NodeFilter : false,
+ NodeList : false,
+ Notification : false,
+ navigator : false,
+ onbeforeunload : true,
+ onblur : true,
+ onerror : true,
+ onfocus : true,
+ onload : true,
+ onresize : true,
+ onunload : true,
+ open : false,
+ openDatabase : false,
+ opener : false,
+ Option : false,
+ parent : false,
+ print : false,
+ Range : false,
+ requestAnimationFrame : false,
+ removeEventListener : false,
+ resizeBy : false,
+ resizeTo : false,
+ screen : false,
+ scroll : false,
+ scrollBy : false,
+ scrollTo : false,
+ sessionStorage : false,
+ setInterval : false,
+ setTimeout : false,
+ SharedWorker : false,
+ status : false,
+ SVGAElement : false,
+ SVGAltGlyphDefElement: false,
+ SVGAltGlyphElement : false,
+ SVGAltGlyphItemElement: false,
+ SVGAngle : false,
+ SVGAnimateColorElement: false,
+ SVGAnimateElement : false,
+ SVGAnimateMotionElement: false,
+ SVGAnimateTransformElement: false,
+ SVGAnimatedAngle : false,
+ SVGAnimatedBoolean : false,
+ SVGAnimatedEnumeration: false,
+ SVGAnimatedInteger : false,
+ SVGAnimatedLength : false,
+ SVGAnimatedLengthList: false,
+ SVGAnimatedNumber : false,
+ SVGAnimatedNumberList: false,
+ SVGAnimatedPathData : false,
+ SVGAnimatedPoints : false,
+ SVGAnimatedPreserveAspectRatio: false,
+ SVGAnimatedRect : false,
+ SVGAnimatedString : false,
+ SVGAnimatedTransformList: false,
+ SVGAnimationElement : false,
+ SVGCSSRule : false,
+ SVGCircleElement : false,
+ SVGClipPathElement : false,
+ SVGColor : false,
+ SVGColorProfileElement: false,
+ SVGColorProfileRule : false,
+ SVGComponentTransferFunctionElement: false,
+ SVGCursorElement : false,
+ SVGDefsElement : false,
+ SVGDescElement : false,
+ SVGDocument : false,
+ SVGElement : false,
+ SVGElementInstance : false,
+ SVGElementInstanceList: false,
+ SVGEllipseElement : false,
+ SVGExternalResourcesRequired: false,
+ SVGFEBlendElement : false,
+ SVGFEColorMatrixElement: false,
+ SVGFEComponentTransferElement: false,
+ SVGFECompositeElement: false,
+ SVGFEConvolveMatrixElement: false,
+ SVGFEDiffuseLightingElement: false,
+ SVGFEDisplacementMapElement: false,
+ SVGFEDistantLightElement: false,
+ SVGFEFloodElement : false,
+ SVGFEFuncAElement : false,
+ SVGFEFuncBElement : false,
+ SVGFEFuncGElement : false,
+ SVGFEFuncRElement : false,
+ SVGFEGaussianBlurElement: false,
+ SVGFEImageElement : false,
+ SVGFEMergeElement : false,
+ SVGFEMergeNodeElement: false,
+ SVGFEMorphologyElement: false,
+ SVGFEOffsetElement : false,
+ SVGFEPointLightElement: false,
+ SVGFESpecularLightingElement: false,
+ SVGFESpotLightElement: false,
+ SVGFETileElement : false,
+ SVGFETurbulenceElement: false,
+ SVGFilterElement : false,
+ SVGFilterPrimitiveStandardAttributes: false,
+ SVGFitToViewBox : false,
+ SVGFontElement : false,
+ SVGFontFaceElement : false,
+ SVGFontFaceFormatElement: false,
+ SVGFontFaceNameElement: false,
+ SVGFontFaceSrcElement: false,
+ SVGFontFaceUriElement: false,
+ SVGForeignObjectElement: false,
+ SVGGElement : false,
+ SVGGlyphElement : false,
+ SVGGlyphRefElement : false,
+ SVGGradientElement : false,
+ SVGHKernElement : false,
+ SVGICCColor : false,
+ SVGImageElement : false,
+ SVGLangSpace : false,
+ SVGLength : false,
+ SVGLengthList : false,
+ SVGLineElement : false,
+ SVGLinearGradientElement: false,
+ SVGLocatable : false,
+ SVGMPathElement : false,
+ SVGMarkerElement : false,
+ SVGMaskElement : false,
+ SVGMatrix : false,
+ SVGMetadataElement : false,
+ SVGMissingGlyphElement: false,
+ SVGNumber : false,
+ SVGNumberList : false,
+ SVGPaint : false,
+ SVGPathElement : false,
+ SVGPathSeg : false,
+ SVGPathSegArcAbs : false,
+ SVGPathSegArcRel : false,
+ SVGPathSegClosePath : false,
+ SVGPathSegCurvetoCubicAbs: false,
+ SVGPathSegCurvetoCubicRel: false,
+ SVGPathSegCurvetoCubicSmoothAbs: false,
+ SVGPathSegCurvetoCubicSmoothRel: false,
+ SVGPathSegCurvetoQuadraticAbs: false,
+ SVGPathSegCurvetoQuadraticRel: false,
+ SVGPathSegCurvetoQuadraticSmoothAbs: false,
+ SVGPathSegCurvetoQuadraticSmoothRel: false,
+ SVGPathSegLinetoAbs : false,
+ SVGPathSegLinetoHorizontalAbs: false,
+ SVGPathSegLinetoHorizontalRel: false,
+ SVGPathSegLinetoRel : false,
+ SVGPathSegLinetoVerticalAbs: false,
+ SVGPathSegLinetoVerticalRel: false,
+ SVGPathSegList : false,
+ SVGPathSegMovetoAbs : false,
+ SVGPathSegMovetoRel : false,
+ SVGPatternElement : false,
+ SVGPoint : false,
+ SVGPointList : false,
+ SVGPolygonElement : false,
+ SVGPolylineElement : false,
+ SVGPreserveAspectRatio: false,
+ SVGRadialGradientElement: false,
+ SVGRect : false,
+ SVGRectElement : false,
+ SVGRenderingIntent : false,
+ SVGSVGElement : false,
+ SVGScriptElement : false,
+ SVGSetElement : false,
+ SVGStopElement : false,
+ SVGStringList : false,
+ SVGStylable : false,
+ SVGStyleElement : false,
+ SVGSwitchElement : false,
+ SVGSymbolElement : false,
+ SVGTRefElement : false,
+ SVGTSpanElement : false,
+ SVGTests : false,
+ SVGTextContentElement: false,
+ SVGTextElement : false,
+ SVGTextPathElement : false,
+ SVGTextPositioningElement: false,
+ SVGTitleElement : false,
+ SVGTransform : false,
+ SVGTransformList : false,
+ SVGTransformable : false,
+ SVGURIReference : false,
+ SVGUnitTypes : false,
+ SVGUseElement : false,
+ SVGVKernElement : false,
+ SVGViewElement : false,
+ SVGViewSpec : false,
+ SVGZoomAndPan : false,
+ Text : false,
+ TextDecoder : false,
+ TextEncoder : false,
+ TimeEvent : false,
+ top : false,
+ URL : false,
+ WebGLActiveInfo : false,
+ WebGLBuffer : false,
+ WebGLContextEvent : false,
+ WebGLFramebuffer : false,
+ WebGLProgram : false,
+ WebGLRenderbuffer : false,
+ WebGLRenderingContext: false,
+ WebGLShader : false,
+ WebGLShaderPrecisionFormat: false,
+ WebGLTexture : false,
+ WebGLUniformLocation : false,
+ WebSocket : false,
+ window : false,
+ Worker : false,
+ XDomainRequest : false,
+ XMLHttpRequest : false,
+ XMLSerializer : false,
+ XPathEvaluator : false,
+ XPathException : false,
+ XPathExpression : false,
+ XPathNamespace : false,
+ XPathNSResolver : false,
+ XPathResult : false
+};
+
+exports.devel = {
+ alert : false,
+ confirm: false,
+ console: false,
+ Debug : false,
+ opera : false,
+ prompt : false
+};
+
+exports.worker = {
+ importScripts : true,
+ postMessage : true,
+ self : true,
+ FileReaderSync : true
+};
+exports.nonstandard = {
+ escape : false,
+ unescape: false
+};
+
+exports.couch = {
+ "require" : false,
+ respond : false,
+ getRow : false,
+ emit : false,
+ send : false,
+ start : false,
+ sum : false,
+ log : false,
+ exports : false,
+ module : false,
+ provides : false
+};
+
+exports.node = {
+ __filename : false,
+ __dirname : false,
+ GLOBAL : false,
+ global : false,
+ module : false,
+ require : false,
+
+ Buffer : true,
+ console : true,
+ exports : true,
+ process : true,
+ setTimeout : true,
+ clearTimeout : true,
+ setInterval : true,
+ clearInterval : true,
+ setImmediate : true, // v0.9.1+
+ clearImmediate: true // v0.9.1+
+};
+
+exports.browserify = {
+ __filename : false,
+ __dirname : false,
+ global : false,
+ module : false,
+ require : false,
+ Buffer : true,
+ exports : true,
+ process : true
+};
+
+exports.phantom = {
+ phantom : true,
+ require : true,
+ WebPage : true,
+ console : true, // in examples, but undocumented
+ exports : true // v1.7+
+};
+
+exports.qunit = {
+ asyncTest : false,
+ deepEqual : false,
+ equal : false,
+ expect : false,
+ module : false,
+ notDeepEqual : false,
+ notEqual : false,
+ notPropEqual : false,
+ notStrictEqual : false,
+ ok : false,
+ propEqual : false,
+ QUnit : false,
+ raises : false,
+ start : false,
+ stop : false,
+ strictEqual : false,
+ test : false,
+ "throws" : false
+};
+
+exports.rhino = {
+ defineClass : false,
+ deserialize : false,
+ gc : false,
+ help : false,
+ importClass : false,
+ importPackage: false,
+ "java" : false,
+ load : false,
+ loadClass : false,
+ Packages : false,
+ print : false,
+ quit : false,
+ readFile : false,
+ readUrl : false,
+ runCommand : false,
+ seal : false,
+ serialize : false,
+ spawn : false,
+ sync : false,
+ toint32 : false,
+ version : false
+};
+
+exports.shelljs = {
+ target : false,
+ echo : false,
+ exit : false,
+ cd : false,
+ pwd : false,
+ ls : false,
+ find : false,
+ cp : false,
+ rm : false,
+ mv : false,
+ mkdir : false,
+ test : false,
+ cat : false,
+ sed : false,
+ grep : false,
+ which : false,
+ dirs : false,
+ pushd : false,
+ popd : false,
+ env : false,
+ exec : false,
+ chmod : false,
+ config : false,
+ error : false,
+ tempdir : false
+};
+
+exports.typed = {
+ ArrayBuffer : false,
+ ArrayBufferView : false,
+ DataView : false,
+ Float32Array : false,
+ Float64Array : false,
+ Int16Array : false,
+ Int32Array : false,
+ Int8Array : false,
+ Uint16Array : false,
+ Uint32Array : false,
+ Uint8Array : false,
+ Uint8ClampedArray : false
+};
+
+exports.wsh = {
+ ActiveXObject : true,
+ Enumerator : true,
+ GetObject : true,
+ ScriptEngine : true,
+ ScriptEngineBuildVersion : true,
+ ScriptEngineMajorVersion : true,
+ ScriptEngineMinorVersion : true,
+ VBArray : true,
+ WSH : true,
+ WScript : true,
+ XDomainRequest : true
+};
+
+exports.dojo = {
+ dojo : false,
+ dijit : false,
+ dojox : false,
+ define : false,
+ "require": false
+};
+
+exports.jquery = {
+ "$" : false,
+ jQuery : false
+};
+
+exports.mootools = {
+ "$" : false,
+ "$$" : false,
+ Asset : false,
+ Browser : false,
+ Chain : false,
+ Class : false,
+ Color : false,
+ Cookie : false,
+ Core : false,
+ Document : false,
+ DomReady : false,
+ DOMEvent : false,
+ DOMReady : false,
+ Drag : false,
+ Element : false,
+ Elements : false,
+ Event : false,
+ Events : false,
+ Fx : false,
+ Group : false,
+ Hash : false,
+ HtmlTable : false,
+ IFrame : false,
+ IframeShim : false,
+ InputValidator: false,
+ instanceOf : false,
+ Keyboard : false,
+ Locale : false,
+ Mask : false,
+ MooTools : false,
+ Native : false,
+ Options : false,
+ OverText : false,
+ Request : false,
+ Scroller : false,
+ Slick : false,
+ Slider : false,
+ Sortables : false,
+ Spinner : false,
+ Swiff : false,
+ Tips : false,
+ Type : false,
+ typeOf : false,
+ URI : false,
+ Window : false
+};
+
+exports.prototypejs = {
+ "$" : false,
+ "$$" : false,
+ "$A" : false,
+ "$F" : false,
+ "$H" : false,
+ "$R" : false,
+ "$break" : false,
+ "$continue" : false,
+ "$w" : false,
+ Abstract : false,
+ Ajax : false,
+ Class : false,
+ Enumerable : false,
+ Element : false,
+ Event : false,
+ Field : false,
+ Form : false,
+ Hash : false,
+ Insertion : false,
+ ObjectRange : false,
+ PeriodicalExecuter: false,
+ Position : false,
+ Prototype : false,
+ Selector : false,
+ Template : false,
+ Toggle : false,
+ Try : false,
+ Autocompleter : false,
+ Builder : false,
+ Control : false,
+ Draggable : false,
+ Draggables : false,
+ Droppables : false,
+ Effect : false,
+ Sortable : false,
+ SortableObserver : false,
+ Sound : false,
+ Scriptaculous : false
+};
+
+exports.yui = {
+ YUI : false,
+ Y : false,
+ YUI_config: false
+};
+
+exports.mocha = {
+ describe : false,
+ xdescribe : false,
+ it : false,
+ xit : false,
+ context : false,
+ xcontext : false,
+ before : false,
+ after : false,
+ beforeEach : false,
+ afterEach : false,
+ suite : false,
+ test : false,
+ setup : false,
+ teardown : false,
+ suiteSetup : false,
+ suiteTeardown : false
+};
+
+exports.jasmine = {
+ jasmine : false,
+ describe : false,
+ it : false,
+ xit : false,
+ beforeEach : false,
+ afterEach : false,
+ setFixtures : false,
+ loadFixtures: false,
+ spyOn : false,
+ expect : false,
+ runs : false,
+ waitsFor : false,
+ waits : false,
+ beforeAll : false,
+ afterAll : false,
+ fail : false,
+ fdescribe : false,
+ fit : false
+};
+
+},
+{}],
+12:[function(_dereq_,module,exports){
+
+function EventEmitter() {
+ this._events = this._events || {};
+ this._maxListeners = this._maxListeners || undefined;
+}
+module.exports = EventEmitter;
+EventEmitter.EventEmitter = EventEmitter;
+
+EventEmitter.prototype._events = undefined;
+EventEmitter.prototype._maxListeners = undefined;
+EventEmitter.defaultMaxListeners = 10;
+EventEmitter.prototype.setMaxListeners = function(n) {
+ if (!isNumber(n) || n < 0 || isNaN(n))
+ throw TypeError('n must be a positive number');
+ this._maxListeners = n;
+ return this;
+};
+
+EventEmitter.prototype.emit = function(type) {
+ var er, handler, len, args, i, listeners;
+
+ if (!this._events)
+ this._events = {};
+ if (type === 'error') {
+ if (!this._events.error ||
+ (isObject(this._events.error) && !this._events.error.length)) {
+ er = arguments[1];
+ if (er instanceof Error) {
+ throw er; // Unhandled 'error' event
+ } else {
+ throw TypeError('Uncaught, unspecified "error" event.');
+ }
+ return false;
+ }
+ }
+
+ handler = this._events[type];
+
+ if (isUndefined(handler))
+ return false;
+
+ if (isFunction(handler)) {
+ switch (arguments.length) {
+ case 1:
+ handler.call(this);
+ break;
+ case 2:
+ handler.call(this, arguments[1]);
+ break;
+ case 3:
+ handler.call(this, arguments[1], arguments[2]);
+ break;
+ default:
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+ handler.apply(this, args);
+ }
+ } else if (isObject(handler)) {
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+
+ listeners = handler.slice();
+ len = listeners.length;
+ for (i = 0; i < len; i++)
+ listeners[i].apply(this, args);
+ }
+
+ return true;
+};
+
+EventEmitter.prototype.addListener = function(type, listener) {
+ var m;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events)
+ this._events = {};
+ if (this._events.newListener)
+ this.emit('newListener', type,
+ isFunction(listener.listener) ?
+ listener.listener : listener);
+
+ if (!this._events[type])
+ this._events[type] = listener;
+ else if (isObject(this._events[type]))
+ this._events[type].push(listener);
+ else
+ this._events[type] = [this._events[type], listener];
+ if (isObject(this._events[type]) && !this._events[type].warned) {
+ var m;
+ if (!isUndefined(this._maxListeners)) {
+ m = this._maxListeners;
+ } else {
+ m = EventEmitter.defaultMaxListeners;
+ }
+
+ if (m && m > 0 && this._events[type].length > m) {
+ this._events[type].warned = true;
+ console.error('(node) warning: possible EventEmitter memory ' +
+ 'leak detected. %d listeners added. ' +
+ 'Use emitter.setMaxListeners() to increase limit.',
+ this._events[type].length);
+ if (typeof console.trace === 'function') {
+ console.trace();
+ }
+ }
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+EventEmitter.prototype.once = function(type, listener) {
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ var fired = false;
+
+ function g() {
+ this.removeListener(type, g);
+
+ if (!fired) {
+ fired = true;
+ listener.apply(this, arguments);
+ }
+ }
+
+ g.listener = listener;
+ this.on(type, g);
+
+ return this;
+};
+EventEmitter.prototype.removeListener = function(type, listener) {
+ var list, position, length, i;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events || !this._events[type])
+ return this;
+
+ list = this._events[type];
+ length = list.length;
+ position = -1;
+
+ if (list === listener ||
+ (isFunction(list.listener) && list.listener === listener)) {
+ delete this._events[type];
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+
+ } else if (isObject(list)) {
+ for (i = length; i-- > 0;) {
+ if (list[i] === listener ||
+ (list[i].listener && list[i].listener === listener)) {
+ position = i;
+ break;
+ }
+ }
+
+ if (position < 0)
+ return this;
+
+ if (list.length === 1) {
+ list.length = 0;
+ delete this._events[type];
+ } else {
+ list.splice(position, 1);
+ }
+
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.removeAllListeners = function(type) {
+ var key, listeners;
+
+ if (!this._events)
+ return this;
+ if (!this._events.removeListener) {
+ if (arguments.length === 0)
+ this._events = {};
+ else if (this._events[type])
+ delete this._events[type];
+ return this;
+ }
+ if (arguments.length === 0) {
+ for (key in this._events) {
+ if (key === 'removeListener') continue;
+ this.removeAllListeners(key);
+ }
+ this.removeAllListeners('removeListener');
+ this._events = {};
+ return this;
+ }
+
+ listeners = this._events[type];
+
+ if (isFunction(listeners)) {
+ this.removeListener(type, listeners);
+ } else {
+ while (listeners.length)
+ this.removeListener(type, listeners[listeners.length - 1]);
+ }
+ delete this._events[type];
+
+ return this;
+};
+
+EventEmitter.prototype.listeners = function(type) {
+ var ret;
+ if (!this._events || !this._events[type])
+ ret = [];
+ else if (isFunction(this._events[type]))
+ ret = [this._events[type]];
+ else
+ ret = this._events[type].slice();
+ return ret;
+};
+
+EventEmitter.listenerCount = function(emitter, type) {
+ var ret;
+ if (!emitter._events || !emitter._events[type])
+ ret = 0;
+ else if (isFunction(emitter._events[type]))
+ ret = 1;
+ else
+ ret = emitter._events[type].length;
+ return ret;
+};
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+
+},
+{}]},{},[3])
+(3)
+
+});
+
+ace.define("ace/mode/javascript_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/javascript/jshint"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var lint = require("./javascript/jshint").JSHINT;
+
+function startRegex(arr) {
+ return RegExp("^(" + arr.join("|") + ")");
+}
+
+var disabledWarningsRe = startRegex([
+ "Bad for in variable '(.+)'.",
+ 'Missing "use strict"'
+]);
+var errorsRe = startRegex([
+ "Unexpected",
+ "Expected ",
+ "Confusing (plus|minus)",
+ "\\{a\\} unterminated regular expression",
+ "Unclosed ",
+ "Unmatched ",
+ "Unbegun comment",
+ "Bad invocation",
+ "Missing space after",
+ "Missing operator at"
+]);
+var infoRe = startRegex([
+ "Expected an assignment",
+ "Bad escapement of EOL",
+ "Unexpected comma",
+ "Unexpected space",
+ "Missing radix parameter.",
+ "A leading decimal point can",
+ "\\['{a}'\\] is better written in dot notation.",
+ "'{a}' used out of scope"
+]);
+
+var JavaScriptWorker = exports.JavaScriptWorker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(500);
+ this.setOptions();
+};
+
+oop.inherits(JavaScriptWorker, Mirror);
+
+(function() {
+ this.setOptions = function(options) {
+ this.options = options || {
+ esnext: true,
+ moz: true,
+ devel: true,
+ browser: true,
+ node: true,
+ laxcomma: true,
+ laxbreak: true,
+ lastsemic: true,
+ onevar: false,
+ passfail: false,
+ maxerr: 100,
+ expr: true,
+ multistr: true,
+ globalstrict: true
+ };
+ this.doc.getValue() && this.deferredUpdate.schedule(100);
+ };
+
+ this.changeOptions = function(newOptions) {
+ oop.mixin(this.options, newOptions);
+ this.doc.getValue() && this.deferredUpdate.schedule(100);
+ };
+
+ this.isValidJS = function(str) {
+ try {
+ eval("throw 0;" + str);
+ } catch(e) {
+ if (e === 0)
+ return true;
+ }
+ return false
+ };
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ value = value.replace(/^#!.*\n/, "\n");
+ if (!value)
+ return this.sender.emit("annotate", []);
+
+ var errors = [];
+ var maxErrorLevel = this.isValidJS(value) ? "warning" : "error";
+ lint(value, this.options);
+ var results = lint.errors;
+
+ var errorAdded = false
+ for (var i = 0; i < results.length; i++) {
+ var error = results[i];
+ if (!error)
+ continue;
+ var raw = error.raw;
+ var type = "warning";
+
+ if (raw == "Missing semicolon.") {
+ var str = error.evidence.substr(error.character);
+ str = str.charAt(str.search(/\S/));
+ if (maxErrorLevel == "error" && str && /[\w\d{(['"]/.test(str)) {
+ error.reason = 'Missing ";" before statement';
+ type = "error";
+ } else {
+ type = "info";
+ }
+ }
+ else if (disabledWarningsRe.test(raw)) {
+ continue;
+ }
+ else if (infoRe.test(raw)) {
+ type = "info"
+ }
+ else if (errorsRe.test(raw)) {
+ errorAdded = true;
+ type = maxErrorLevel;
+ }
+ else if (raw == "'{a}' is not defined.") {
+ type = "warning";
+ }
+ else if (raw == "'{a}' is defined but never used.") {
+ type = "info";
+ }
+
+ errors.push({
+ row: error.line-1,
+ column: error.character-1,
+ text: error.reason,
+ type: type,
+ raw: raw
+ });
+
+ if (errorAdded) {
+ }
+ }
+
+ this.sender.emit("annotate", errors);
+ };
+
+}).call(JavaScriptWorker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ return bound;
+ };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ while (++i < length) {
+ if (i in self) {
+ fun.call(thisp, self[i], i, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ var i = 0;
+ var result;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i++];
+ break;
+ }
+ if (++i >= length) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ var result, i = length - 1;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i--];
+ break;
+ }
+ if (--i < 0) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+
+ var i = 0;
+ if (arguments.length > 1) {
+ i = toInteger(arguments[1]);
+ }
+ i = i >= 0 ? i : Math.max(0, length + i);
+ for (; i < length; i++) {
+ if (i in self && self[i] === sought) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+ var i = length - 1;
+ if (arguments.length > 1) {
+ i = Math.min(i, toInteger(arguments[1]));
+ }
+ i = i >= 0 ? i : length - Math.abs(i);
+ for (; i >= 0; i--) {
+ if (i in self && sought === self[i]) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Object.getPrototypeOf) {
+ Object.getPrototypeOf = function getPrototypeOf(object) {
+ return object.__proto__ || (
+ object.constructor ?
+ object.constructor.prototype :
+ prototypeOfObject
+ );
+ };
+}
+if (!Object.getOwnPropertyDescriptor) {
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+ "non-object: ";
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT + object);
+ if (!owns(object, property))
+ return;
+
+ var descriptor, getter, setter;
+ descriptor = { enumerable: true, configurable: true };
+ if (supportsAccessors) {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+
+ var getter = lookupGetter(object, property);
+ var setter = lookupSetter(object, property);
+ object.__proto__ = prototype;
+
+ if (getter || setter) {
+ if (getter) descriptor.get = getter;
+ if (setter) descriptor.set = setter;
+ return descriptor;
+ }
+ }
+ descriptor.value = object[property];
+ return descriptor;
+ };
+}
+if (!Object.getOwnPropertyNames) {
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ return Object.keys(object);
+ };
+}
+if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
+ Object.create = function create(prototype, properties) {
+ var object;
+ if (prototype === null) {
+ object = createEmpty();
+ } else {
+ if (typeof prototype != "object")
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+ var Type = function () {};
+ Type.prototype = prototype;
+ object = new Type();
+ object.__proto__ = prototype;
+ }
+ if (properties !== void 0)
+ Object.defineProperties(object, properties);
+ return object;
+ };
+}
+
+function doesDefinePropertyWork(object) {
+ try {
+ Object.defineProperty(object, "sentinel", {});
+ return "sentinel" in object;
+ } catch (exception) {
+ }
+}
+if (Object.defineProperty) {
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
+ doesDefinePropertyWork(document.createElement("div"));
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+ var definePropertyFallback = Object.defineProperty;
+ }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+ "on this javascript engine";
+
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+ if (definePropertyFallback) {
+ try {
+ return definePropertyFallback.call(Object, object, property, descriptor);
+ } catch (exception) {
+ }
+ }
+ if (owns(descriptor, "value")) {
+
+ if (supportsAccessors && (lookupGetter(object, property) ||
+ lookupSetter(object, property)))
+ {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+ delete object[property];
+ object[property] = descriptor.value;
+ object.__proto__ = prototype;
+ } else {
+ object[property] = descriptor.value;
+ }
+ } else {
+ if (!supportsAccessors)
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+ if (owns(descriptor, "get"))
+ defineGetter(object, property, descriptor.get);
+ if (owns(descriptor, "set"))
+ defineSetter(object, property, descriptor.set);
+ }
+
+ return object;
+ };
+}
+if (!Object.defineProperties) {
+ Object.defineProperties = function defineProperties(object, properties) {
+ for (var property in properties) {
+ if (owns(properties, property))
+ Object.defineProperty(object, property, properties[property]);
+ }
+ return object;
+ };
+}
+if (!Object.seal) {
+ Object.seal = function seal(object) {
+ return object;
+ };
+}
+if (!Object.freeze) {
+ Object.freeze = function freeze(object) {
+ return object;
+ };
+}
+try {
+ Object.freeze(function () {});
+} catch (exception) {
+ Object.freeze = (function freeze(freezeObject) {
+ return function freeze(object) {
+ if (typeof object == "function") {
+ return object;
+ } else {
+ return freezeObject(object);
+ }
+ };
+ })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+ Object.preventExtensions = function preventExtensions(object) {
+ return object;
+ };
+}
+if (!Object.isSealed) {
+ Object.isSealed = function isSealed(object) {
+ return false;
+ };
+}
+if (!Object.isFrozen) {
+ Object.isFrozen = function isFrozen(object) {
+ return false;
+ };
+}
+if (!Object.isExtensible) {
+ Object.isExtensible = function isExtensible(object) {
+ if (Object(object) === object) {
+ throw new TypeError(); // TODO message
+ }
+ var name = '';
+ while (owns(object, name)) {
+ name += '?';
+ }
+ object[name] = true;
+ var returnValue = owns(object, name);
+ delete object[name];
+ return returnValue;
+ };
+}
+if (!Object.keys) {
+ var hasDontEnumBug = true,
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ for (var key in {"toString": null}) {
+ hasDontEnumBug = false;
+ }
+
+ Object.keys = function keys(object) {
+
+ if (
+ (typeof object != "object" && typeof object != "function") ||
+ object === null
+ ) {
+ throw new TypeError("Object.keys called on a non-object");
+ }
+
+ var keys = [];
+ for (var name in object) {
+ if (owns(object, name)) {
+ keys.push(name);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+ var dontEnum = dontEnums[i];
+ if (owns(object, dontEnum)) {
+ keys.push(dontEnum);
+ }
+ }
+ }
+ return keys;
+ };
+
+}
+if (!Date.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ };
+}
+
+function toInteger(n) {
+ n = +n;
+ if (n !== n) { // isNaN
+ n = 0;
+ } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ }
+ return n;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/js/vendor/ace/src-noconflict/worker-json.js b/js/vendor/ace/src-noconflict/worker-json.js
index 6ba5a8d..b6fec16 100644..100755
--- a/js/vendor/ace/src-noconflict/worker-json.js
+++ b/js/vendor/ace/src-noconflict/worker-json.js
@@ -16,18 +16,30 @@ window.console.trace = window.console;
window.window = window;
window.ace = window;
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
if (moduleName.indexOf("!") !== -1) {
var chunks = moduleName.split("!");
- return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
}
+ // normalize relative requires
if (moduleName.charAt(0) == ".") {
var base = parentId.split("/").slice(0, -1).join("/");
- moduleName = base + "/" + moduleName;
+ moduleName = (base ? base + "/" : "") + moduleName;
while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
var previous = moduleName;
- moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
@@ -36,15 +48,15 @@ window.normalizeModule = function(parentId, moduleName) {
window.require = function(parentId, id) {
if (!id) {
- id = parentId
+ id = parentId;
parentId = null;
}
if (!id.charAt)
throw new Error("worker.js require() accepts only (parentId, id) as arguments");
- id = normalizeModule(parentId, id);
+ id = window.normalizeModule(parentId, id);
- var module = require.modules[id];
+ var module = window.require.modules[id];
if (module) {
if (!module.initialized) {
module.initialized = true;
@@ -54,56 +66,80 @@ window.require = function(parentId, id) {
}
var chunks = id.split("/");
- chunks[0] = require.tlns[chunks[0]] || chunks[0];
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+ chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
var path = chunks.join("/") + ".js";
- require.id = id;
+ window.require.id = id;
importScripts(path);
- return require(parentId, id);
+ return window.require(parentId, id);
};
-
-require.modules = {};
-require.tlns = {};
+window.require.modules = {};
+window.require.tlns = {};
window.define = function(id, deps, factory) {
if (arguments.length == 2) {
factory = deps;
if (typeof id != "string") {
deps = id;
- id = require.id;
+ id = window.require.id;
}
} else if (arguments.length == 1) {
factory = id;
- id = require.id;
+ deps = [];
+ id = window.require.id;
}
-
- if (id.indexOf("text!") === 0)
- return;
- var req = function(deps, factory) {
- return require(id, deps, factory);
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject 'require', 'exports' and
+ // 'module' as dependencies, to provide CommonJS compatibility.
+ deps = ['require', 'exports', 'module'];
+
+ var req = function(childId) {
+ return window.require(id, childId);
};
- require.modules[id] = {
+ window.require.modules[id] = {
exports: {},
factory: function() {
var module = this;
- var returnExports = factory(req, module.exports, module);
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch(dep) {
+ // Because 'require', 'exports' and 'module' aren't actual
+ // dependencies, we must handle them seperately.
+ case 'require': return req;
+ case 'exports': return module.exports;
+ case 'module': return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
if (returnExports)
module.exports = returnExports;
return module;
}
};
};
+window.define.amd = {};
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
require.tlns = topLevelNamespaces;
-}
+};
window.initSender = function initSender() {
- var EventEmitter = require("ace/lib/event_emitter").EventEmitter;
- var oop = require("ace/lib/oop");
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("ace/lib/oop");
var Sender = function() {};
@@ -130,10 +166,10 @@ window.initSender = function initSender() {
}).call(Sender.prototype);
return new Sender();
-}
+};
-window.main = null;
-window.sender = null;
+var main = window.main = null;
+var sender = window.sender = null;
window.onmessage = function(e) {
var msg = e.data;
@@ -146,18 +182,46 @@ window.onmessage = function(e) {
else if (msg.init) {
initBaseUrls(msg.tlns);
require("ace/lib/es5-shim");
- sender = initSender();
+ sender = window.sender = initSender();
var clazz = require(msg.module)[msg.classname];
- main = new clazz(sender);
+ main = window.main = new clazz(sender);
}
else if (msg.event && sender) {
- sender._emit(msg.event, msg.data);
+ sender._signal(msg.event, msg.data);
}
};
})(this);
-ace.define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
var EventEmitter = {};
var stopPropagation = function() { this.propagationStopped = true; };
@@ -183,6 +247,7 @@ EventEmitter._dispatchEvent = function(eventName, e) {
if (!e.preventDefault)
e.preventDefault = preventDefault;
+ listeners = listeners.slice();
for (var i=0; i<listeners.length; i++) {
listeners[i](e, this);
if (e.propagationStopped)
@@ -198,7 +263,7 @@ EventEmitter._signal = function(eventName, e) {
var listeners = (this._eventRegistry || {})[eventName];
if (!listeners)
return;
-
+ listeners = listeners.slice();
for (var i=0; i<listeners.length; i++)
listeners[i](e, this);
};
@@ -281,811 +346,396 @@ exports.EventEmitter = EventEmitter;
});
-ace.define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-exports.inherits = (function() {
- var tempCtor = function() {};
- return function(ctor, superCtor) {
- tempCtor.prototype = superCtor.prototype;
- ctor.super_ = superCtor.prototype;
- ctor.prototype = new tempCtor();
- ctor.prototype.constructor = ctor;
- };
-}());
-
-exports.mixin = function(obj, mixin) {
- for (var key in mixin) {
- obj[key] = mixin[key];
- }
- return obj;
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
};
+var Range = function(startRow, startColumn, endRow, endColumn) {
+ this.start = {
+ row: startRow,
+ column: startColumn
+ };
-exports.implement = function(proto, mixin) {
- exports.mixin(proto, mixin);
+ this.end = {
+ row: endRow,
+ column: endColumn
+ };
};
-});
-
-ace.define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-function Empty() {}
-
-if (!Function.prototype.bind) {
- Function.prototype.bind = function bind(that) { // .length is 1
- var target = this;
- if (typeof target != "function") {
- throw new TypeError("Function.prototype.bind called on incompatible " + target);
- }
- var args = slice.call(arguments, 1); // for normal call
- var bound = function () {
-
- if (this instanceof bound) {
-
- var result = target.apply(
- this,
- args.concat(slice.call(arguments))
- );
- if (Object(result) === result) {
- return result;
- }
- return this;
-
- } else {
- return target.apply(
- that,
- args.concat(slice.call(arguments))
- );
-
- }
-
- };
- if(target.prototype) {
- Empty.prototype = target.prototype;
- bound.prototype = new Empty();
- Empty.prototype = null;
- }
- return bound;
+(function() {
+ this.isEqual = function(range) {
+ return this.start.row === range.start.row &&
+ this.end.row === range.end.row &&
+ this.start.column === range.start.column &&
+ this.end.column === range.end.column;
+ };
+ this.toString = function() {
+ return ("Range: [" + this.start.row + "/" + this.start.column +
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
};
-}
-var call = Function.prototype.call;
-var prototypeOfArray = Array.prototype;
-var prototypeOfObject = Object.prototype;
-var slice = prototypeOfArray.slice;
-var _toString = call.bind(prototypeOfObject.toString);
-var owns = call.bind(prototypeOfObject.hasOwnProperty);
-var defineGetter;
-var defineSetter;
-var lookupGetter;
-var lookupSetter;
-var supportsAccessors;
-if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
- defineGetter = call.bind(prototypeOfObject.__defineGetter__);
- defineSetter = call.bind(prototypeOfObject.__defineSetter__);
- lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
- lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
-}
-if ([1,2].splice(0).length != 2) {
- if(function() { // test IE < 9 to splice bug - see issue #138
- function makeArray(l) {
- var a = new Array(l+2);
- a[0] = a[1] = 0;
- return a;
- }
- var array = [], lengthBefore;
-
- array.splice.apply(array, makeArray(20));
- array.splice.apply(array, makeArray(26));
-
- lengthBefore = array.length; //46
- array.splice(5, 0, "XXX"); // add one element
- lengthBefore + 1 == array.length
+ this.contains = function(row, column) {
+ return this.compare(row, column) == 0;
+ };
+ this.compareRange = function(range) {
+ var cmp,
+ end = range.end,
+ start = range.start;
- if (lengthBefore + 1 == array.length) {
- return true;// has right splice implementation without bugs
- }
- }()) {//IE 6/7
- var array_splice = Array.prototype.splice;
- Array.prototype.splice = function(start, deleteCount) {
- if (!arguments.length) {
- return [];
+ cmp = this.compare(end.row, end.column);
+ if (cmp == 1) {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == 1) {
+ return 2;
+ } else if (cmp == 0) {
+ return 1;
} else {
- return array_splice.apply(this, [
- start === void 0 ? 0 : start,
- deleteCount === void 0 ? (this.length - start) : deleteCount
- ].concat(slice.call(arguments, 2)))
- }
- };
- } else {//IE8
- Array.prototype.splice = function(pos, removeCount){
- var length = this.length;
- if (pos > 0) {
- if (pos > length)
- pos = length;
- } else if (pos == void 0) {
- pos = 0;
- } else if (pos < 0) {
- pos = Math.max(length + pos, 0);
+ return 0;
}
-
- if (!(pos+removeCount < length))
- removeCount = length - pos;
-
- var removed = this.slice(pos, pos+removeCount);
- var insert = slice.call(arguments, 2);
- var add = insert.length;
- if (pos === length) {
- if (add) {
- this.push.apply(this, insert);
- }
+ } else if (cmp == -1) {
+ return -2;
+ } else {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == -1) {
+ return -1;
+ } else if (cmp == 1) {
+ return 42;
} else {
- var remove = Math.min(removeCount, length - pos);
- var tailOldPos = pos + remove;
- var tailNewPos = tailOldPos + add - remove;
- var tailCount = length - tailOldPos;
- var lengthAfterRemove = length - remove;
-
- if (tailNewPos < tailOldPos) { // case A
- for (var i = 0; i < tailCount; ++i) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } else if (tailNewPos > tailOldPos) { // case B
- for (i = tailCount; i--; ) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } // else, add == remove (nothing to do)
-
- if (add && pos === lengthAfterRemove) {
- this.length = lengthAfterRemove; // truncate array
- this.push.apply(this, insert);
- } else {
- this.length = lengthAfterRemove + add; // reserves space
- for (i = 0; i < add; ++i) {
- this[pos+i] = insert[i];
- }
- }
- }
- return removed;
- };
- }
-}
-if (!Array.isArray) {
- Array.isArray = function isArray(obj) {
- return _toString(obj) == "[object Array]";
- };
-}
-var boxedString = Object("a"),
- splitString = boxedString[0] != "a" || !(0 in boxedString);
-
-if (!Array.prototype.forEach) {
- Array.prototype.forEach = function forEach(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- thisp = arguments[1],
- i = -1,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- while (++i < length) {
- if (i in self) {
- fun.call(thisp, self[i], i, object);
+ return 0;
}
}
};
-}
-if (!Array.prototype.map) {
- Array.prototype.map = function map(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = Array(length),
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self)
- result[i] = fun.call(thisp, self[i], i, object);
- }
- return result;
+ this.comparePoint = function(p) {
+ return this.compare(p.row, p.column);
};
-}
-if (!Array.prototype.filter) {
- Array.prototype.filter = function filter(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = [],
- value,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self) {
- value = self[i];
- if (fun.call(thisp, value, i, object)) {
- result.push(value);
- }
- }
+ this.containsRange = function(range) {
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
+ this.isEnd = function(row, column) {
+ return this.end.row == row && this.end.column == column;
+ };
+ this.isStart = function(row, column) {
+ return this.start.row == row && this.start.column == column;
+ };
+ this.setStart = function(row, column) {
+ if (typeof row == "object") {
+ this.start.column = row.column;
+ this.start.row = row.row;
+ } else {
+ this.start.row = row;
+ this.start.column = column;
}
- return result;
};
-}
-if (!Array.prototype.every) {
- Array.prototype.every = function every(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
+ this.setEnd = function(row, column) {
+ if (typeof row == "object") {
+ this.end.column = row.column;
+ this.end.row = row.row;
+ } else {
+ this.end.row = row;
+ this.end.column = column;
}
-
- for (var i = 0; i < length; i++) {
- if (i in self && !fun.call(thisp, self[i], i, object)) {
+ };
+ this.inside = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
return false;
+ } else {
+ return true;
}
}
- return true;
+ return false;
};
-}
-if (!Array.prototype.some) {
- Array.prototype.some = function some(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, object)) {
+ this.insideStart = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column)) {
+ return false;
+ } else {
return true;
}
}
return false;
};
-}
-if (!Array.prototype.reduce) {
- Array.prototype.reduce = function reduce(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduce of empty array with no initial value");
- }
-
- var i = 0;
- var result;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i++];
- break;
- }
- if (++i >= length) {
- throw new TypeError("reduce of empty array with no initial value");
- }
- } while (true);
- }
-
- for (; i < length; i++) {
- if (i in self) {
- result = fun.call(void 0, result, self[i], i, object);
+ this.insideEnd = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
}
}
-
- return result;
+ return false;
};
-}
-if (!Array.prototype.reduceRight) {
- Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduceRight of empty array with no initial value");
+ this.compare = function(row, column) {
+ if (!this.isMultiLine()) {
+ if (row === this.start.row) {
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+ };
}
- var result, i = length - 1;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i--];
- break;
- }
- if (--i < 0) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
- } while (true);
- }
+ if (row < this.start.row)
+ return -1;
- do {
- if (i in this) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- } while (i--);
+ if (row > this.end.row)
+ return 1;
- return result;
- };
-}
-if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
- Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
+ if (this.start.row === row)
+ return column >= this.start.column ? 0 : -1;
- if (!length) {
- return -1;
- }
+ if (this.end.row === row)
+ return column <= this.end.column ? 0 : 1;
- var i = 0;
- if (arguments.length > 1) {
- i = toInteger(arguments[1]);
- }
- i = i >= 0 ? i : Math.max(0, length + i);
- for (; i < length; i++) {
- if (i in self && self[i] === sought) {
- return i;
- }
- }
- return -1;
+ return 0;
};
-}
-if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
- Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
-
- if (!length) {
+ this.compareStart = function(row, column) {
+ if (this.start.row == row && this.start.column == column) {
return -1;
+ } else {
+ return this.compare(row, column);
}
- var i = length - 1;
- if (arguments.length > 1) {
- i = Math.min(i, toInteger(arguments[1]));
- }
- i = i >= 0 ? i : length - Math.abs(i);
- for (; i >= 0; i--) {
- if (i in self && sought === self[i]) {
- return i;
- }
- }
- return -1;
};
-}
-if (!Object.getPrototypeOf) {
- Object.getPrototypeOf = function getPrototypeOf(object) {
- return object.__proto__ || (
- object.constructor ?
- object.constructor.prototype :
- prototypeOfObject
- );
- };
-}
-if (!Object.getOwnPropertyDescriptor) {
- var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
- "non-object: ";
- Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT + object);
- if (!owns(object, property))
- return;
-
- var descriptor, getter, setter;
- descriptor = { enumerable: true, configurable: true };
- if (supportsAccessors) {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
-
- var getter = lookupGetter(object, property);
- var setter = lookupSetter(object, property);
- object.__proto__ = prototype;
-
- if (getter || setter) {
- if (getter) descriptor.get = getter;
- if (setter) descriptor.set = setter;
- return descriptor;
- }
+ this.compareEnd = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else {
+ return this.compare(row, column);
}
- descriptor.value = object[property];
- return descriptor;
};
-}
-if (!Object.getOwnPropertyNames) {
- Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
- return Object.keys(object);
- };
-}
-if (!Object.create) {
- var createEmpty;
- if (Object.prototype.__proto__ === null) {
- createEmpty = function () {
- return { "__proto__": null };
- };
- } else {
- createEmpty = function () {
- var empty = {};
- for (var i in empty)
- empty[i] = null;
- empty.constructor =
- empty.hasOwnProperty =
- empty.propertyIsEnumerable =
- empty.isPrototypeOf =
- empty.toLocaleString =
- empty.toString =
- empty.valueOf =
- empty.__proto__ = null;
- return empty;
- }
- }
-
- Object.create = function create(prototype, properties) {
- var object;
- if (prototype === null) {
- object = createEmpty();
+ this.compareInside = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else if (this.start.row == row && this.start.column == column) {
+ return -1;
} else {
- if (typeof prototype != "object")
- throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
- var Type = function () {};
- Type.prototype = prototype;
- object = new Type();
- object.__proto__ = prototype;
+ return this.compare(row, column);
}
- if (properties !== void 0)
- Object.defineProperties(object, properties);
- return object;
};
-}
-
-function doesDefinePropertyWork(object) {
- try {
- Object.defineProperty(object, "sentinel", {});
- return "sentinel" in object;
- } catch (exception) {
- }
-}
-if (Object.defineProperty) {
- var definePropertyWorksOnObject = doesDefinePropertyWork({});
- var definePropertyWorksOnDom = typeof document == "undefined" ||
- doesDefinePropertyWork(document.createElement("div"));
- if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
- var definePropertyFallback = Object.defineProperty;
- }
-}
+ this.clipRows = function(firstRow, lastRow) {
+ if (this.end.row > lastRow)
+ var end = {row: lastRow + 1, column: 0};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
-if (!Object.defineProperty || definePropertyFallback) {
- var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
- var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
- var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
- "on this javascript engine";
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {row: firstRow, column: 0};
- Object.defineProperty = function defineProperty(object, property, descriptor) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT_TARGET + object);
- if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
- throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
- if (definePropertyFallback) {
- try {
- return definePropertyFallback.call(Object, object, property, descriptor);
- } catch (exception) {
- }
- }
- if (owns(descriptor, "value")) {
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+ this.extend = function(row, column) {
+ var cmp = this.compare(row, column);
- if (supportsAccessors && (lookupGetter(object, property) ||
- lookupSetter(object, property)))
- {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
- delete object[property];
- object[property] = descriptor.value;
- object.__proto__ = prototype;
- } else {
- object[property] = descriptor.value;
- }
- } else {
- if (!supportsAccessors)
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- if (owns(descriptor, "get"))
- defineGetter(object, property, descriptor.get);
- if (owns(descriptor, "set"))
- defineSetter(object, property, descriptor.set);
- }
+ if (cmp == 0)
+ return this;
+ else if (cmp == -1)
+ var start = {row: row, column: column};
+ else
+ var end = {row: row, column: column};
- return object;
- };
-}
-if (!Object.defineProperties) {
- Object.defineProperties = function defineProperties(object, properties) {
- for (var property in properties) {
- if (owns(properties, property))
- Object.defineProperty(object, property, properties[property]);
- }
- return object;
+ return Range.fromPoints(start || this.start, end || this.end);
};
-}
-if (!Object.seal) {
- Object.seal = function seal(object) {
- return object;
+
+ this.isEmpty = function() {
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
};
-}
-if (!Object.freeze) {
- Object.freeze = function freeze(object) {
- return object;
+ this.isMultiLine = function() {
+ return (this.start.row !== this.end.row);
};
-}
-try {
- Object.freeze(function () {});
-} catch (exception) {
- Object.freeze = (function freeze(freezeObject) {
- return function freeze(object) {
- if (typeof object == "function") {
- return object;
- } else {
- return freezeObject(object);
- }
- };
- })(Object.freeze);
-}
-if (!Object.preventExtensions) {
- Object.preventExtensions = function preventExtensions(object) {
- return object;
+ this.clone = function() {
+ return Range.fromPoints(this.start, this.end);
};
-}
-if (!Object.isSealed) {
- Object.isSealed = function isSealed(object) {
- return false;
+ this.collapseRows = function() {
+ if (this.end.column == 0)
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+ else
+ return new Range(this.start.row, 0, this.end.row, 0)
};
-}
-if (!Object.isFrozen) {
- Object.isFrozen = function isFrozen(object) {
- return false;
+ this.toScreenRange = function(session) {
+ var screenPosStart = session.documentToScreenPosition(this.start);
+ var screenPosEnd = session.documentToScreenPosition(this.end);
+
+ return new Range(
+ screenPosStart.row, screenPosStart.column,
+ screenPosEnd.row, screenPosEnd.column
+ );
};
-}
-if (!Object.isExtensible) {
- Object.isExtensible = function isExtensible(object) {
- if (Object(object) === object) {
- throw new TypeError(); // TODO message
- }
- var name = '';
- while (owns(object, name)) {
- name += '?';
- }
- object[name] = true;
- var returnValue = owns(object, name);
- delete object[name];
- return returnValue;
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
};
-}
-if (!Object.keys) {
- var hasDontEnumBug = true,
- dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor"
- ],
- dontEnumsLength = dontEnums.length;
- for (var key in {"toString": null}) {
- hasDontEnumBug = false;
- }
-
- Object.keys = function keys(object) {
-
- if (
- (typeof object != "object" && typeof object != "function") ||
- object === null
- ) {
- throw new TypeError("Object.keys called on a non-object");
- }
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
- var keys = [];
- for (var name in object) {
- if (owns(object, name)) {
- keys.push(name);
- }
- }
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
- if (hasDontEnumBug) {
- for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
- var dontEnum = dontEnums[i];
- if (owns(object, dontEnum)) {
- keys.push(dontEnum);
- }
- }
- }
- return keys;
- };
-}
-if (!Date.now) {
- Date.now = function now() {
- return new Date().getTime();
- };
-}
-var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
- "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
- "\u2029\uFEFF";
-if (!String.prototype.trim || ws.trim()) {
- ws = "[" + ws + "]";
- var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
- trimEndRegexp = new RegExp(ws + ws + "*$");
- String.prototype.trim = function trim() {
- return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
- };
-}
+exports.Range = Range;
+});
-function toInteger(n) {
- n = +n;
- if (n !== n) { // isNaN
- n = 0;
- } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- }
- return n;
-}
+ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
-function isPrimitive(input) {
- var type = typeof input;
- return (
- input === null ||
- type === "undefined" ||
- type === "boolean" ||
- type === "number" ||
- type === "string"
- );
-}
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
-function toPrimitive(input) {
- var val, valueOf, toString;
- if (isPrimitive(input)) {
- return input;
- }
- valueOf = input.valueOf;
- if (typeof valueOf === "function") {
- val = valueOf.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- toString = input.toString;
- if (typeof toString === "function") {
- val = toString.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- throw new TypeError();
-}
-var toObject = function (o) {
- if (o == null) { // this matches both null and undefined
- throw new TypeError("can't convert "+o+" to object");
- }
- return Object(o);
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
};
-});
-
-ace.define('ace/mode/json_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/json/json_parse'], function(require, exports, module) {
+(function() {
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
-var oop = require("../lib/oop");
-var Mirror = require("../worker/mirror").Mirror;
-var parse = require("./json/json_parse");
+ if (range.start.row == range.end.row && range.start.row != this.row)
+ return;
-var JsonWorker = exports.JsonWorker = function(sender) {
- Mirror.call(this, sender);
- this.setTimeout(200);
-};
+ if (range.start.row > this.row)
+ return;
-oop.inherits(JsonWorker, Mirror);
+ if (range.start.row == this.row && range.start.column > this.column)
+ return;
-(function() {
+ var row = this.row;
+ var column = this.column;
+ var start = range.start;
+ var end = range.end;
- this.onUpdate = function() {
- var value = this.doc.getValue();
+ if (delta.action === "insertText") {
+ if (start.row === row && start.column <= column) {
+ if (start.column === column && this.$insertRight) {
+ } else if (start.row === end.row) {
+ column += end.column - start.column;
+ } else {
+ column -= start.column;
+ row += end.row - start.row;
+ }
+ } else if (start.row !== end.row && start.row < row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "insertLines") {
+ if (start.row === row && column === 0 && this.$insertRight) {
+ }
+ else if (start.row <= row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "removeText") {
+ if (start.row === row && start.column < column) {
+ if (end.column >= column)
+ column = start.column;
+ else
+ column = Math.max(0, column - (end.column - start.column));
- try {
- var result = parse(value);
- } catch (e) {
- var pos = this.doc.indexToPosition(e.at-1);
- this.sender.emit("error", {
- row: pos.row,
- column: pos.column,
- text: e.message,
- type: "error"
- });
- return;
+ } else if (start.row !== end.row && start.row < row) {
+ if (end.row === row)
+ column = Math.max(0, column - end.column) + start.column;
+ row -= (end.row - start.row);
+ } else if (end.row === row) {
+ row -= end.row - start.row;
+ column = Math.max(0, column - end.column) + start.column;
+ }
+ } else if (delta.action == "removeLines") {
+ if (start.row <= row) {
+ if (end.row <= row)
+ row -= end.row - start.row;
+ else {
+ row = start.row;
+ column = 0;
+ }
+ }
}
- this.sender.emit("ok");
- };
-
-}).call(JsonWorker.prototype);
-});
-ace.define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
+ this.setPosition(row, column, true);
+ };
+ this.setPosition = function(row, column, noClip) {
+ var pos;
+ if (noClip) {
+ pos = {
+ row: row,
+ column: column
+ };
+ } else {
+ pos = this.$clipPositionToDocument(row, column);
+ }
+ if (this.row == pos.row && this.column == pos.column)
+ return;
-var Document = require("../document").Document;
-var lang = require("../lib/lang");
-
-var Mirror = exports.Mirror = function(sender) {
- this.sender = sender;
- var doc = this.doc = new Document("");
-
- var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
-
- var _self = this;
- sender.on("change", function(e) {
- doc.applyDeltas(e.data);
- deferredUpdate.schedule(_self.$timeout);
- });
-};
+ var old = {
+ row: this.row,
+ column: this.column
+ };
-(function() {
-
- this.$timeout = 500;
-
- this.setTimeout = function(timeout) {
- this.$timeout = timeout;
+ this.row = pos.row;
+ this.column = pos.column;
+ this._signal("change", {
+ old: old,
+ value: pos
+ });
};
-
- this.setValue = function(value) {
- this.doc.setValue(value);
- this.deferredUpdate.schedule(this.$timeout);
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
};
-
- this.getValue = function(callbackId) {
- this.sender.callback(this.doc.getValue(), callbackId);
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("change", this.$onChange);
};
-
- this.onUpdate = function() {
+ this.$clipPositionToDocument = function(row, column) {
+ var pos = {};
+
+ if (row >= this.document.getLength()) {
+ pos.row = Math.max(0, this.document.getLength() - 1);
+ pos.column = this.document.getLine(pos.row).length;
+ }
+ else if (row < 0) {
+ pos.row = 0;
+ pos.column = 0;
+ }
+ else {
+ pos.row = row;
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+ }
+
+ if (column < 0)
+ pos.column = 0;
+
+ return pos;
};
-
-}).call(Mirror.prototype);
-});
+}).call(Anchor.prototype);
-ace.define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
+});
+ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
@@ -1094,7 +744,7 @@ var Anchor = require("./anchor").Anchor;
var Document = function(text) {
this.$lines = [];
- if (text.length == 0) {
+ if (text.length === 0) {
this.$lines = [""];
} else if (Array.isArray(text)) {
this._insertLines(0, text);
@@ -1117,10 +767,10 @@ var Document = function(text) {
this.createAnchor = function(row, column) {
return new Anchor(this, row, column);
};
- if ("aaa".split(/a/).length == 0)
+ if ("aaa".split(/a/).length === 0)
this.$split = function(text) {
return text.replace(/\r\n|\r/g, "\n").split("\n");
- }
+ };
else
this.$split = function(text) {
return text.split(/\r\n|\r|\n/);
@@ -1130,6 +780,7 @@ var Document = function(text) {
this.$detectNewLine = function(text) {
var match = text.match(/^.*?(\r\n|\r|\n)/m);
this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
};
this.getNewLineCharacter = function() {
switch (this.$newLineMode) {
@@ -1138,17 +789,18 @@ var Document = function(text) {
case "unix":
return "\n";
default:
- return this.$autoNewLine;
+ return this.$autoNewLine || "\n";
}
};
- this.$autoNewLine = "\n";
+ this.$autoNewLine = "";
this.$newLineMode = "auto";
this.setNewLineMode = function(newLineMode) {
if (this.$newLineMode === newLineMode)
return;
this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
};
this.getNewLineMode = function() {
return this.$newLineMode;
@@ -1218,9 +870,10 @@ var Document = function(text) {
this._insertLines = function(row, lines) {
if (lines.length == 0)
return {row: row, column: 0};
- if (lines.length > 0xFFFF) {
- var end = this._insertLines(row, lines.slice(0xFFFF));
- lines = lines.slice(0, 0xFFFF);
+ while (lines.length > 20000) {
+ var end = this._insertLines(row, lines.slice(0, 20000));
+ lines = lines.slice(20000);
+ row = end.row;
}
var args = [row, 0];
@@ -1233,8 +886,8 @@ var Document = function(text) {
range: range,
lines: lines
};
- this._emit("change", { data: delta });
- return end || range.end;
+ this._signal("change", { data: delta });
+ return range.end;
};
this.insertNewLine = function(position) {
position = this.$clipPosition(position);
@@ -1253,7 +906,7 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
@@ -1276,11 +929,13 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: text
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
this.remove = function(range) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
range.start = this.$clipPosition(range.start);
range.end = this.$clipPosition(range.end);
@@ -1325,7 +980,7 @@ var Document = function(text) {
range: range,
text: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return range.start;
};
this.removeLines = function(firstRow, lastRow) {
@@ -1344,7 +999,7 @@ var Document = function(text) {
nl: this.getNewLineCharacter(),
lines: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return removed;
};
this.removeNewLine = function(row) {
@@ -1361,9 +1016,11 @@ var Document = function(text) {
range: range,
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
};
this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
if (text.length == 0 && range.isEmpty())
return range.start;
if (text == this.getTextRange(range))
@@ -1436,393 +1093,13 @@ var Document = function(text) {
exports.Document = Document;
});
-ace.define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-var comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function(startRow, startColumn, endRow, endColumn) {
- this.start = {
- row: startRow,
- column: startColumn
- };
-
- this.end = {
- row: endRow,
- column: endColumn
- };
-};
-
-(function() {
- this.isEqual = function(range) {
- return this.start.row === range.start.row &&
- this.end.row === range.end.row &&
- this.start.column === range.start.column &&
- this.end.column === range.end.column;
- };
- this.toString = function() {
- return ("Range: [" + this.start.row + "/" + this.start.column +
- "] -> [" + this.end.row + "/" + this.end.column + "]");
- };
-
- this.contains = function(row, column) {
- return this.compare(row, column) == 0;
- };
- this.compareRange = function(range) {
- var cmp,
- end = range.end,
- start = range.start;
-
- cmp = this.compare(end.row, end.column);
- if (cmp == 1) {
- cmp = this.compare(start.row, start.column);
- if (cmp == 1) {
- return 2;
- } else if (cmp == 0) {
- return 1;
- } else {
- return 0;
- }
- } else if (cmp == -1) {
- return -2;
- } else {
- cmp = this.compare(start.row, start.column);
- if (cmp == -1) {
- return -1;
- } else if (cmp == 1) {
- return 42;
- } else {
- return 0;
- }
- }
- };
- this.comparePoint = function(p) {
- return this.compare(p.row, p.column);
- };
- this.containsRange = function(range) {
- return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- };
- this.intersects = function(range) {
- var cmp = this.compareRange(range);
- return (cmp == -1 || cmp == 0 || cmp == 1);
- };
- this.isEnd = function(row, column) {
- return this.end.row == row && this.end.column == column;
- };
- this.isStart = function(row, column) {
- return this.start.row == row && this.start.column == column;
- };
- this.setStart = function(row, column) {
- if (typeof row == "object") {
- this.start.column = row.column;
- this.start.row = row.row;
- } else {
- this.start.row = row;
- this.start.column = column;
- }
- };
- this.setEnd = function(row, column) {
- if (typeof row == "object") {
- this.end.column = row.column;
- this.end.row = row.row;
- } else {
- this.end.row = row;
- this.end.column = column;
- }
- };
- this.inside = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column) || this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideStart = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideEnd = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.compare = function(row, column) {
- if (!this.isMultiLine()) {
- if (row === this.start.row) {
- return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
- };
- }
-
- if (row < this.start.row)
- return -1;
-
- if (row > this.end.row)
- return 1;
-
- if (this.start.row === row)
- return column >= this.start.column ? 0 : -1;
-
- if (this.end.row === row)
- return column <= this.end.column ? 0 : 1;
-
- return 0;
- };
- this.compareStart = function(row, column) {
- if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareEnd = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareInside = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.clipRows = function(firstRow, lastRow) {
- if (this.end.row > lastRow)
- var end = {row: lastRow + 1, column: 0};
- else if (this.end.row < firstRow)
- var end = {row: firstRow, column: 0};
-
- if (this.start.row > lastRow)
- var start = {row: lastRow + 1, column: 0};
- else if (this.start.row < firstRow)
- var start = {row: firstRow, column: 0};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
- this.extend = function(row, column) {
- var cmp = this.compare(row, column);
-
- if (cmp == 0)
- return this;
- else if (cmp == -1)
- var start = {row: row, column: column};
- else
- var end = {row: row, column: column};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.isEmpty = function() {
- return (this.start.row === this.end.row && this.start.column === this.end.column);
- };
- this.isMultiLine = function() {
- return (this.start.row !== this.end.row);
- };
- this.clone = function() {
- return Range.fromPoints(this.start, this.end);
- };
- this.collapseRows = function() {
- if (this.end.column == 0)
- return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
- else
- return new Range(this.start.row, 0, this.end.row, 0)
- };
- this.toScreenRange = function(session) {
- var screenPosStart = session.documentToScreenPosition(this.start);
- var screenPosEnd = session.documentToScreenPosition(this.end);
-
- return new Range(
- screenPosStart.row, screenPosStart.column,
- screenPosEnd.row, screenPosEnd.column
- );
- };
- this.moveBy = function(row, column) {
- this.start.row += row;
- this.start.column += column;
- this.end.row += row;
- this.end.column += column;
- };
-
-}).call(Range.prototype);
-Range.fromPoints = function(start, end) {
- return new Range(start.row, start.column, end.row, end.column);
-};
-Range.comparePoints = comparePoints;
-
-Range.comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-
-
-exports.Range = Range;
-});
-
-ace.define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
-var Anchor = exports.Anchor = function(doc, row, column) {
- this.$onChange = this.onChange.bind(this);
- this.attach(doc);
-
- if (typeof column == "undefined")
- this.setPosition(row.row, row.column);
- else
- this.setPosition(row, column);
+exports.last = function(a) {
+ return a[a.length - 1];
};
-(function() {
-
- oop.implement(this, EventEmitter);
- this.getPosition = function() {
- return this.$clipPositionToDocument(this.row, this.column);
- };
- this.getDocument = function() {
- return this.document;
- };
- this.onChange = function(e) {
- var delta = e.data;
- var range = delta.range;
-
- if (range.start.row == range.end.row && range.start.row != this.row)
- return;
-
- if (range.start.row > this.row)
- return;
-
- if (range.start.row == this.row && range.start.column > this.column)
- return;
-
- var row = this.row;
- var column = this.column;
- var start = range.start;
- var end = range.end;
-
- if (delta.action === "insertText") {
- if (start.row === row && start.column <= column) {
- if (start.row === end.row) {
- column += end.column - start.column;
- } else {
- column -= start.column;
- row += end.row - start.row;
- }
- } else if (start.row !== end.row && start.row < row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "insertLines") {
- if (start.row <= row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "removeText") {
- if (start.row === row && start.column < column) {
- if (end.column >= column)
- column = start.column;
- else
- column = Math.max(0, column - (end.column - start.column));
-
- } else if (start.row !== end.row && start.row < row) {
- if (end.row === row)
- column = Math.max(0, column - end.column) + start.column;
- row -= (end.row - start.row);
- } else if (end.row === row) {
- row -= end.row - start.row;
- column = Math.max(0, column - end.column) + start.column;
- }
- } else if (delta.action == "removeLines") {
- if (start.row <= row) {
- if (end.row <= row)
- row -= end.row - start.row;
- else {
- row = start.row;
- column = 0;
- }
- }
- }
-
- this.setPosition(row, column, true);
- };
- this.setPosition = function(row, column, noClip) {
- var pos;
- if (noClip) {
- pos = {
- row: row,
- column: column
- };
- } else {
- pos = this.$clipPositionToDocument(row, column);
- }
-
- if (this.row == pos.row && this.column == pos.column)
- return;
-
- var old = {
- row: this.row,
- column: this.column
- };
-
- this.row = pos.row;
- this.column = pos.column;
- this._emit("change", {
- old: old,
- value: pos
- });
- };
- this.detach = function() {
- this.document.removeEventListener("change", this.$onChange);
- };
- this.attach = function(doc) {
- this.document = doc || this.document;
- this.document.on("change", this.$onChange);
- };
- this.$clipPositionToDocument = function(row, column) {
- var pos = {};
-
- if (row >= this.document.getLength()) {
- pos.row = Math.max(0, this.document.getLength() - 1);
- pos.column = this.document.getLine(pos.row).length;
- }
- else if (row < 0) {
- pos.row = 0;
- pos.column = 0;
- }
- else {
- pos.row = row;
- pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
- }
-
- if (column < 0)
- pos.column = 0;
-
- return pos;
- };
-
-}).call(Anchor.prototype);
-
-});
-
-ace.define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
exports.stringReverse = function(string) {
return string.split("").reverse().join("");
};
@@ -1869,18 +1146,24 @@ exports.copyArray = function(array){
return copy;
};
-exports.deepCopy = function (obj) {
- if (typeof obj != "object") {
+exports.deepCopy = function deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
}
+ var cons = obj.constructor;
+ if (cons === RegExp)
+ return obj;
- var copy = obj.constructor();
+ copy = cons();
for (var key in obj) {
- if (typeof obj[key] == "object") {
- copy[key] = this.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
+ copy[key] = deepCopy(obj[key]);
}
return copy;
};
@@ -1930,7 +1213,6 @@ exports.getMatchOffsets = function(string, regExp) {
return matches;
};
exports.deferredCall = function(fcn) {
-
var timer = null;
var callback = function() {
timer = null;
@@ -1956,6 +1238,10 @@ exports.deferredCall = function(fcn) {
timer = null;
return deferred;
};
+
+ deferred.isPending = function() {
+ return timer;
+ };
return deferred;
};
@@ -1969,15 +1255,15 @@ exports.delayedCall = function(fcn, defaultTimeout) {
};
var _self = function(timeout) {
- timer && clearTimeout(timer);
- timer = setTimeout(callback, timeout || defaultTimeout);
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
- _self.delay = _self;
- _self.schedule = function(timeout) {
- if (timer == null)
- timer = setTimeout(callback, timeout || 0);
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
+ _self.schedule = _self;
_self.call = function() {
this.cancel();
@@ -1997,7 +1283,57 @@ exports.delayedCall = function(fcn, defaultTimeout) {
};
});
-ace.define('ace/mode/json/json_parse', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+
+var Mirror = exports.Mirror = function(sender) {
+ this.sender = sender;
+ var doc = this.doc = new Document("");
+
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ doc.applyDeltas(e.data);
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(function() {
+
+ this.$timeout = 500;
+
+ this.setTimeout = function(timeout) {
+ this.$timeout = timeout;
+ };
+
+ this.setValue = function(value) {
+ this.doc.setValue(value);
+ this.deferredUpdate.schedule(this.$timeout);
+ };
+
+ this.getValue = function(callbackId) {
+ this.sender.callback(this.doc.getValue(), callbackId);
+ };
+
+ this.onUpdate = function() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/json/json_parse",["require","exports","module"], function(require, exports, module) {
+"use strict";
var at, // The index of the current character
ch, // The current character
@@ -2249,3 +1585,738 @@ ace.define('ace/mode/json/json_parse', ['require', 'exports', 'module' ], functi
}({'': result}, '') : result;
};
});
+
+ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var parse = require("./json/json_parse");
+
+var JsonWorker = exports.JsonWorker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(200);
+};
+
+oop.inherits(JsonWorker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ var errors = [];
+ try {
+ if (value)
+ parse(value);
+ } catch (e) {
+ var pos = this.doc.indexToPosition(e.at-1);
+ errors.push({
+ row: pos.row,
+ column: pos.column,
+ text: e.message,
+ type: "error"
+ });
+ }
+ this.sender.emit("annotate", errors);
+ };
+
+}).call(JsonWorker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ return bound;
+ };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ while (++i < length) {
+ if (i in self) {
+ fun.call(thisp, self[i], i, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ var i = 0;
+ var result;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i++];
+ break;
+ }
+ if (++i >= length) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ var result, i = length - 1;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i--];
+ break;
+ }
+ if (--i < 0) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+
+ var i = 0;
+ if (arguments.length > 1) {
+ i = toInteger(arguments[1]);
+ }
+ i = i >= 0 ? i : Math.max(0, length + i);
+ for (; i < length; i++) {
+ if (i in self && self[i] === sought) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+ var i = length - 1;
+ if (arguments.length > 1) {
+ i = Math.min(i, toInteger(arguments[1]));
+ }
+ i = i >= 0 ? i : length - Math.abs(i);
+ for (; i >= 0; i--) {
+ if (i in self && sought === self[i]) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Object.getPrototypeOf) {
+ Object.getPrototypeOf = function getPrototypeOf(object) {
+ return object.__proto__ || (
+ object.constructor ?
+ object.constructor.prototype :
+ prototypeOfObject
+ );
+ };
+}
+if (!Object.getOwnPropertyDescriptor) {
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+ "non-object: ";
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT + object);
+ if (!owns(object, property))
+ return;
+
+ var descriptor, getter, setter;
+ descriptor = { enumerable: true, configurable: true };
+ if (supportsAccessors) {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+
+ var getter = lookupGetter(object, property);
+ var setter = lookupSetter(object, property);
+ object.__proto__ = prototype;
+
+ if (getter || setter) {
+ if (getter) descriptor.get = getter;
+ if (setter) descriptor.set = setter;
+ return descriptor;
+ }
+ }
+ descriptor.value = object[property];
+ return descriptor;
+ };
+}
+if (!Object.getOwnPropertyNames) {
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ return Object.keys(object);
+ };
+}
+if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
+ Object.create = function create(prototype, properties) {
+ var object;
+ if (prototype === null) {
+ object = createEmpty();
+ } else {
+ if (typeof prototype != "object")
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+ var Type = function () {};
+ Type.prototype = prototype;
+ object = new Type();
+ object.__proto__ = prototype;
+ }
+ if (properties !== void 0)
+ Object.defineProperties(object, properties);
+ return object;
+ };
+}
+
+function doesDefinePropertyWork(object) {
+ try {
+ Object.defineProperty(object, "sentinel", {});
+ return "sentinel" in object;
+ } catch (exception) {
+ }
+}
+if (Object.defineProperty) {
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
+ doesDefinePropertyWork(document.createElement("div"));
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+ var definePropertyFallback = Object.defineProperty;
+ }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+ "on this javascript engine";
+
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+ if (definePropertyFallback) {
+ try {
+ return definePropertyFallback.call(Object, object, property, descriptor);
+ } catch (exception) {
+ }
+ }
+ if (owns(descriptor, "value")) {
+
+ if (supportsAccessors && (lookupGetter(object, property) ||
+ lookupSetter(object, property)))
+ {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+ delete object[property];
+ object[property] = descriptor.value;
+ object.__proto__ = prototype;
+ } else {
+ object[property] = descriptor.value;
+ }
+ } else {
+ if (!supportsAccessors)
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+ if (owns(descriptor, "get"))
+ defineGetter(object, property, descriptor.get);
+ if (owns(descriptor, "set"))
+ defineSetter(object, property, descriptor.set);
+ }
+
+ return object;
+ };
+}
+if (!Object.defineProperties) {
+ Object.defineProperties = function defineProperties(object, properties) {
+ for (var property in properties) {
+ if (owns(properties, property))
+ Object.defineProperty(object, property, properties[property]);
+ }
+ return object;
+ };
+}
+if (!Object.seal) {
+ Object.seal = function seal(object) {
+ return object;
+ };
+}
+if (!Object.freeze) {
+ Object.freeze = function freeze(object) {
+ return object;
+ };
+}
+try {
+ Object.freeze(function () {});
+} catch (exception) {
+ Object.freeze = (function freeze(freezeObject) {
+ return function freeze(object) {
+ if (typeof object == "function") {
+ return object;
+ } else {
+ return freezeObject(object);
+ }
+ };
+ })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+ Object.preventExtensions = function preventExtensions(object) {
+ return object;
+ };
+}
+if (!Object.isSealed) {
+ Object.isSealed = function isSealed(object) {
+ return false;
+ };
+}
+if (!Object.isFrozen) {
+ Object.isFrozen = function isFrozen(object) {
+ return false;
+ };
+}
+if (!Object.isExtensible) {
+ Object.isExtensible = function isExtensible(object) {
+ if (Object(object) === object) {
+ throw new TypeError(); // TODO message
+ }
+ var name = '';
+ while (owns(object, name)) {
+ name += '?';
+ }
+ object[name] = true;
+ var returnValue = owns(object, name);
+ delete object[name];
+ return returnValue;
+ };
+}
+if (!Object.keys) {
+ var hasDontEnumBug = true,
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ for (var key in {"toString": null}) {
+ hasDontEnumBug = false;
+ }
+
+ Object.keys = function keys(object) {
+
+ if (
+ (typeof object != "object" && typeof object != "function") ||
+ object === null
+ ) {
+ throw new TypeError("Object.keys called on a non-object");
+ }
+
+ var keys = [];
+ for (var name in object) {
+ if (owns(object, name)) {
+ keys.push(name);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+ var dontEnum = dontEnums[i];
+ if (owns(object, dontEnum)) {
+ keys.push(dontEnum);
+ }
+ }
+ }
+ return keys;
+ };
+
+}
+if (!Date.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ };
+}
+
+function toInteger(n) {
+ n = +n;
+ if (n !== n) { // isNaN
+ n = 0;
+ } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ }
+ return n;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/js/vendor/ace/src-noconflict/worker-lua.js b/js/vendor/ace/src-noconflict/worker-lua.js
index 42ad831..2ece00b 100644..100755
--- a/js/vendor/ace/src-noconflict/worker-lua.js
+++ b/js/vendor/ace/src-noconflict/worker-lua.js
@@ -16,18 +16,30 @@ window.console.trace = window.console;
window.window = window;
window.ace = window;
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
if (moduleName.indexOf("!") !== -1) {
var chunks = moduleName.split("!");
- return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
}
+ // normalize relative requires
if (moduleName.charAt(0) == ".") {
var base = parentId.split("/").slice(0, -1).join("/");
- moduleName = base + "/" + moduleName;
+ moduleName = (base ? base + "/" : "") + moduleName;
while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
var previous = moduleName;
- moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
@@ -36,15 +48,15 @@ window.normalizeModule = function(parentId, moduleName) {
window.require = function(parentId, id) {
if (!id) {
- id = parentId
+ id = parentId;
parentId = null;
}
if (!id.charAt)
throw new Error("worker.js require() accepts only (parentId, id) as arguments");
- id = normalizeModule(parentId, id);
+ id = window.normalizeModule(parentId, id);
- var module = require.modules[id];
+ var module = window.require.modules[id];
if (module) {
if (!module.initialized) {
module.initialized = true;
@@ -54,56 +66,80 @@ window.require = function(parentId, id) {
}
var chunks = id.split("/");
- chunks[0] = require.tlns[chunks[0]] || chunks[0];
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+ chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
var path = chunks.join("/") + ".js";
- require.id = id;
+ window.require.id = id;
importScripts(path);
- return require(parentId, id);
+ return window.require(parentId, id);
};
-
-require.modules = {};
-require.tlns = {};
+window.require.modules = {};
+window.require.tlns = {};
window.define = function(id, deps, factory) {
if (arguments.length == 2) {
factory = deps;
if (typeof id != "string") {
deps = id;
- id = require.id;
+ id = window.require.id;
}
} else if (arguments.length == 1) {
factory = id;
- id = require.id;
+ deps = [];
+ id = window.require.id;
}
-
- if (id.indexOf("text!") === 0)
- return;
- var req = function(deps, factory) {
- return require(id, deps, factory);
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject 'require', 'exports' and
+ // 'module' as dependencies, to provide CommonJS compatibility.
+ deps = ['require', 'exports', 'module'];
+
+ var req = function(childId) {
+ return window.require(id, childId);
};
- require.modules[id] = {
+ window.require.modules[id] = {
exports: {},
factory: function() {
var module = this;
- var returnExports = factory(req, module.exports, module);
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch(dep) {
+ // Because 'require', 'exports' and 'module' aren't actual
+ // dependencies, we must handle them seperately.
+ case 'require': return req;
+ case 'exports': return module.exports;
+ case 'module': return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
if (returnExports)
module.exports = returnExports;
return module;
}
};
};
+window.define.amd = {};
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
require.tlns = topLevelNamespaces;
-}
+};
window.initSender = function initSender() {
- var EventEmitter = require("ace/lib/event_emitter").EventEmitter;
- var oop = require("ace/lib/oop");
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("ace/lib/oop");
var Sender = function() {};
@@ -130,10 +166,10 @@ window.initSender = function initSender() {
}).call(Sender.prototype);
return new Sender();
-}
+};
-window.main = null;
-window.sender = null;
+var main = window.main = null;
+var sender = window.sender = null;
window.onmessage = function(e) {
var msg = e.data;
@@ -146,18 +182,46 @@ window.onmessage = function(e) {
else if (msg.init) {
initBaseUrls(msg.tlns);
require("ace/lib/es5-shim");
- sender = initSender();
+ sender = window.sender = initSender();
var clazz = require(msg.module)[msg.classname];
- main = new clazz(sender);
+ main = window.main = new clazz(sender);
}
else if (msg.event && sender) {
- sender._emit(msg.event, msg.data);
+ sender._signal(msg.event, msg.data);
}
};
})(this);
-ace.define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
var EventEmitter = {};
var stopPropagation = function() { this.propagationStopped = true; };
@@ -183,6 +247,7 @@ EventEmitter._dispatchEvent = function(eventName, e) {
if (!e.preventDefault)
e.preventDefault = preventDefault;
+ listeners = listeners.slice();
for (var i=0; i<listeners.length; i++) {
listeners[i](e, this);
if (e.propagationStopped)
@@ -198,7 +263,7 @@ EventEmitter._signal = function(eventName, e) {
var listeners = (this._eventRegistry || {})[eventName];
if (!listeners)
return;
-
+ listeners = listeners.slice();
for (var i=0; i<listeners.length; i++)
listeners[i](e, this);
};
@@ -281,811 +346,396 @@ exports.EventEmitter = EventEmitter;
});
-ace.define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-exports.inherits = (function() {
- var tempCtor = function() {};
- return function(ctor, superCtor) {
- tempCtor.prototype = superCtor.prototype;
- ctor.super_ = superCtor.prototype;
- ctor.prototype = new tempCtor();
- ctor.prototype.constructor = ctor;
- };
-}());
-
-exports.mixin = function(obj, mixin) {
- for (var key in mixin) {
- obj[key] = mixin[key];
- }
- return obj;
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
};
+var Range = function(startRow, startColumn, endRow, endColumn) {
+ this.start = {
+ row: startRow,
+ column: startColumn
+ };
-exports.implement = function(proto, mixin) {
- exports.mixin(proto, mixin);
+ this.end = {
+ row: endRow,
+ column: endColumn
+ };
};
-});
-
-ace.define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-function Empty() {}
-
-if (!Function.prototype.bind) {
- Function.prototype.bind = function bind(that) { // .length is 1
- var target = this;
- if (typeof target != "function") {
- throw new TypeError("Function.prototype.bind called on incompatible " + target);
- }
- var args = slice.call(arguments, 1); // for normal call
- var bound = function () {
-
- if (this instanceof bound) {
-
- var result = target.apply(
- this,
- args.concat(slice.call(arguments))
- );
- if (Object(result) === result) {
- return result;
- }
- return this;
-
- } else {
- return target.apply(
- that,
- args.concat(slice.call(arguments))
- );
-
- }
-
- };
- if(target.prototype) {
- Empty.prototype = target.prototype;
- bound.prototype = new Empty();
- Empty.prototype = null;
- }
- return bound;
+(function() {
+ this.isEqual = function(range) {
+ return this.start.row === range.start.row &&
+ this.end.row === range.end.row &&
+ this.start.column === range.start.column &&
+ this.end.column === range.end.column;
+ };
+ this.toString = function() {
+ return ("Range: [" + this.start.row + "/" + this.start.column +
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
};
-}
-var call = Function.prototype.call;
-var prototypeOfArray = Array.prototype;
-var prototypeOfObject = Object.prototype;
-var slice = prototypeOfArray.slice;
-var _toString = call.bind(prototypeOfObject.toString);
-var owns = call.bind(prototypeOfObject.hasOwnProperty);
-var defineGetter;
-var defineSetter;
-var lookupGetter;
-var lookupSetter;
-var supportsAccessors;
-if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
- defineGetter = call.bind(prototypeOfObject.__defineGetter__);
- defineSetter = call.bind(prototypeOfObject.__defineSetter__);
- lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
- lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
-}
-if ([1,2].splice(0).length != 2) {
- if(function() { // test IE < 9 to splice bug - see issue #138
- function makeArray(l) {
- var a = new Array(l+2);
- a[0] = a[1] = 0;
- return a;
- }
- var array = [], lengthBefore;
-
- array.splice.apply(array, makeArray(20));
- array.splice.apply(array, makeArray(26));
-
- lengthBefore = array.length; //46
- array.splice(5, 0, "XXX"); // add one element
- lengthBefore + 1 == array.length
+ this.contains = function(row, column) {
+ return this.compare(row, column) == 0;
+ };
+ this.compareRange = function(range) {
+ var cmp,
+ end = range.end,
+ start = range.start;
- if (lengthBefore + 1 == array.length) {
- return true;// has right splice implementation without bugs
- }
- }()) {//IE 6/7
- var array_splice = Array.prototype.splice;
- Array.prototype.splice = function(start, deleteCount) {
- if (!arguments.length) {
- return [];
+ cmp = this.compare(end.row, end.column);
+ if (cmp == 1) {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == 1) {
+ return 2;
+ } else if (cmp == 0) {
+ return 1;
} else {
- return array_splice.apply(this, [
- start === void 0 ? 0 : start,
- deleteCount === void 0 ? (this.length - start) : deleteCount
- ].concat(slice.call(arguments, 2)))
- }
- };
- } else {//IE8
- Array.prototype.splice = function(pos, removeCount){
- var length = this.length;
- if (pos > 0) {
- if (pos > length)
- pos = length;
- } else if (pos == void 0) {
- pos = 0;
- } else if (pos < 0) {
- pos = Math.max(length + pos, 0);
+ return 0;
}
-
- if (!(pos+removeCount < length))
- removeCount = length - pos;
-
- var removed = this.slice(pos, pos+removeCount);
- var insert = slice.call(arguments, 2);
- var add = insert.length;
- if (pos === length) {
- if (add) {
- this.push.apply(this, insert);
- }
+ } else if (cmp == -1) {
+ return -2;
+ } else {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == -1) {
+ return -1;
+ } else if (cmp == 1) {
+ return 42;
} else {
- var remove = Math.min(removeCount, length - pos);
- var tailOldPos = pos + remove;
- var tailNewPos = tailOldPos + add - remove;
- var tailCount = length - tailOldPos;
- var lengthAfterRemove = length - remove;
-
- if (tailNewPos < tailOldPos) { // case A
- for (var i = 0; i < tailCount; ++i) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } else if (tailNewPos > tailOldPos) { // case B
- for (i = tailCount; i--; ) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } // else, add == remove (nothing to do)
-
- if (add && pos === lengthAfterRemove) {
- this.length = lengthAfterRemove; // truncate array
- this.push.apply(this, insert);
- } else {
- this.length = lengthAfterRemove + add; // reserves space
- for (i = 0; i < add; ++i) {
- this[pos+i] = insert[i];
- }
- }
- }
- return removed;
- };
- }
-}
-if (!Array.isArray) {
- Array.isArray = function isArray(obj) {
- return _toString(obj) == "[object Array]";
- };
-}
-var boxedString = Object("a"),
- splitString = boxedString[0] != "a" || !(0 in boxedString);
-
-if (!Array.prototype.forEach) {
- Array.prototype.forEach = function forEach(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- thisp = arguments[1],
- i = -1,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- while (++i < length) {
- if (i in self) {
- fun.call(thisp, self[i], i, object);
+ return 0;
}
}
};
-}
-if (!Array.prototype.map) {
- Array.prototype.map = function map(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = Array(length),
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self)
- result[i] = fun.call(thisp, self[i], i, object);
- }
- return result;
+ this.comparePoint = function(p) {
+ return this.compare(p.row, p.column);
};
-}
-if (!Array.prototype.filter) {
- Array.prototype.filter = function filter(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = [],
- value,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self) {
- value = self[i];
- if (fun.call(thisp, value, i, object)) {
- result.push(value);
- }
- }
+ this.containsRange = function(range) {
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
+ this.isEnd = function(row, column) {
+ return this.end.row == row && this.end.column == column;
+ };
+ this.isStart = function(row, column) {
+ return this.start.row == row && this.start.column == column;
+ };
+ this.setStart = function(row, column) {
+ if (typeof row == "object") {
+ this.start.column = row.column;
+ this.start.row = row.row;
+ } else {
+ this.start.row = row;
+ this.start.column = column;
}
- return result;
};
-}
-if (!Array.prototype.every) {
- Array.prototype.every = function every(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
+ this.setEnd = function(row, column) {
+ if (typeof row == "object") {
+ this.end.column = row.column;
+ this.end.row = row.row;
+ } else {
+ this.end.row = row;
+ this.end.column = column;
}
-
- for (var i = 0; i < length; i++) {
- if (i in self && !fun.call(thisp, self[i], i, object)) {
+ };
+ this.inside = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
return false;
+ } else {
+ return true;
}
}
- return true;
+ return false;
};
-}
-if (!Array.prototype.some) {
- Array.prototype.some = function some(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, object)) {
+ this.insideStart = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column)) {
+ return false;
+ } else {
return true;
}
}
return false;
};
-}
-if (!Array.prototype.reduce) {
- Array.prototype.reduce = function reduce(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduce of empty array with no initial value");
- }
-
- var i = 0;
- var result;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i++];
- break;
- }
- if (++i >= length) {
- throw new TypeError("reduce of empty array with no initial value");
- }
- } while (true);
- }
-
- for (; i < length; i++) {
- if (i in self) {
- result = fun.call(void 0, result, self[i], i, object);
+ this.insideEnd = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
}
}
-
- return result;
+ return false;
};
-}
-if (!Array.prototype.reduceRight) {
- Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduceRight of empty array with no initial value");
+ this.compare = function(row, column) {
+ if (!this.isMultiLine()) {
+ if (row === this.start.row) {
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+ };
}
- var result, i = length - 1;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i--];
- break;
- }
- if (--i < 0) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
- } while (true);
- }
+ if (row < this.start.row)
+ return -1;
- do {
- if (i in this) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- } while (i--);
+ if (row > this.end.row)
+ return 1;
- return result;
- };
-}
-if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
- Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
+ if (this.start.row === row)
+ return column >= this.start.column ? 0 : -1;
- if (!length) {
- return -1;
- }
+ if (this.end.row === row)
+ return column <= this.end.column ? 0 : 1;
- var i = 0;
- if (arguments.length > 1) {
- i = toInteger(arguments[1]);
- }
- i = i >= 0 ? i : Math.max(0, length + i);
- for (; i < length; i++) {
- if (i in self && self[i] === sought) {
- return i;
- }
- }
- return -1;
+ return 0;
};
-}
-if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
- Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
-
- if (!length) {
+ this.compareStart = function(row, column) {
+ if (this.start.row == row && this.start.column == column) {
return -1;
+ } else {
+ return this.compare(row, column);
}
- var i = length - 1;
- if (arguments.length > 1) {
- i = Math.min(i, toInteger(arguments[1]));
- }
- i = i >= 0 ? i : length - Math.abs(i);
- for (; i >= 0; i--) {
- if (i in self && sought === self[i]) {
- return i;
- }
- }
- return -1;
};
-}
-if (!Object.getPrototypeOf) {
- Object.getPrototypeOf = function getPrototypeOf(object) {
- return object.__proto__ || (
- object.constructor ?
- object.constructor.prototype :
- prototypeOfObject
- );
- };
-}
-if (!Object.getOwnPropertyDescriptor) {
- var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
- "non-object: ";
- Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT + object);
- if (!owns(object, property))
- return;
-
- var descriptor, getter, setter;
- descriptor = { enumerable: true, configurable: true };
- if (supportsAccessors) {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
-
- var getter = lookupGetter(object, property);
- var setter = lookupSetter(object, property);
- object.__proto__ = prototype;
-
- if (getter || setter) {
- if (getter) descriptor.get = getter;
- if (setter) descriptor.set = setter;
- return descriptor;
- }
+ this.compareEnd = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else {
+ return this.compare(row, column);
}
- descriptor.value = object[property];
- return descriptor;
};
-}
-if (!Object.getOwnPropertyNames) {
- Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
- return Object.keys(object);
- };
-}
-if (!Object.create) {
- var createEmpty;
- if (Object.prototype.__proto__ === null) {
- createEmpty = function () {
- return { "__proto__": null };
- };
- } else {
- createEmpty = function () {
- var empty = {};
- for (var i in empty)
- empty[i] = null;
- empty.constructor =
- empty.hasOwnProperty =
- empty.propertyIsEnumerable =
- empty.isPrototypeOf =
- empty.toLocaleString =
- empty.toString =
- empty.valueOf =
- empty.__proto__ = null;
- return empty;
- }
- }
-
- Object.create = function create(prototype, properties) {
- var object;
- if (prototype === null) {
- object = createEmpty();
+ this.compareInside = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else if (this.start.row == row && this.start.column == column) {
+ return -1;
} else {
- if (typeof prototype != "object")
- throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
- var Type = function () {};
- Type.prototype = prototype;
- object = new Type();
- object.__proto__ = prototype;
+ return this.compare(row, column);
}
- if (properties !== void 0)
- Object.defineProperties(object, properties);
- return object;
};
-}
-
-function doesDefinePropertyWork(object) {
- try {
- Object.defineProperty(object, "sentinel", {});
- return "sentinel" in object;
- } catch (exception) {
- }
-}
-if (Object.defineProperty) {
- var definePropertyWorksOnObject = doesDefinePropertyWork({});
- var definePropertyWorksOnDom = typeof document == "undefined" ||
- doesDefinePropertyWork(document.createElement("div"));
- if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
- var definePropertyFallback = Object.defineProperty;
- }
-}
+ this.clipRows = function(firstRow, lastRow) {
+ if (this.end.row > lastRow)
+ var end = {row: lastRow + 1, column: 0};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
-if (!Object.defineProperty || definePropertyFallback) {
- var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
- var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
- var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
- "on this javascript engine";
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {row: firstRow, column: 0};
- Object.defineProperty = function defineProperty(object, property, descriptor) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT_TARGET + object);
- if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
- throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
- if (definePropertyFallback) {
- try {
- return definePropertyFallback.call(Object, object, property, descriptor);
- } catch (exception) {
- }
- }
- if (owns(descriptor, "value")) {
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+ this.extend = function(row, column) {
+ var cmp = this.compare(row, column);
- if (supportsAccessors && (lookupGetter(object, property) ||
- lookupSetter(object, property)))
- {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
- delete object[property];
- object[property] = descriptor.value;
- object.__proto__ = prototype;
- } else {
- object[property] = descriptor.value;
- }
- } else {
- if (!supportsAccessors)
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- if (owns(descriptor, "get"))
- defineGetter(object, property, descriptor.get);
- if (owns(descriptor, "set"))
- defineSetter(object, property, descriptor.set);
- }
+ if (cmp == 0)
+ return this;
+ else if (cmp == -1)
+ var start = {row: row, column: column};
+ else
+ var end = {row: row, column: column};
- return object;
- };
-}
-if (!Object.defineProperties) {
- Object.defineProperties = function defineProperties(object, properties) {
- for (var property in properties) {
- if (owns(properties, property))
- Object.defineProperty(object, property, properties[property]);
- }
- return object;
+ return Range.fromPoints(start || this.start, end || this.end);
};
-}
-if (!Object.seal) {
- Object.seal = function seal(object) {
- return object;
+
+ this.isEmpty = function() {
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
};
-}
-if (!Object.freeze) {
- Object.freeze = function freeze(object) {
- return object;
+ this.isMultiLine = function() {
+ return (this.start.row !== this.end.row);
};
-}
-try {
- Object.freeze(function () {});
-} catch (exception) {
- Object.freeze = (function freeze(freezeObject) {
- return function freeze(object) {
- if (typeof object == "function") {
- return object;
- } else {
- return freezeObject(object);
- }
- };
- })(Object.freeze);
-}
-if (!Object.preventExtensions) {
- Object.preventExtensions = function preventExtensions(object) {
- return object;
+ this.clone = function() {
+ return Range.fromPoints(this.start, this.end);
};
-}
-if (!Object.isSealed) {
- Object.isSealed = function isSealed(object) {
- return false;
+ this.collapseRows = function() {
+ if (this.end.column == 0)
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+ else
+ return new Range(this.start.row, 0, this.end.row, 0)
};
-}
-if (!Object.isFrozen) {
- Object.isFrozen = function isFrozen(object) {
- return false;
+ this.toScreenRange = function(session) {
+ var screenPosStart = session.documentToScreenPosition(this.start);
+ var screenPosEnd = session.documentToScreenPosition(this.end);
+
+ return new Range(
+ screenPosStart.row, screenPosStart.column,
+ screenPosEnd.row, screenPosEnd.column
+ );
};
-}
-if (!Object.isExtensible) {
- Object.isExtensible = function isExtensible(object) {
- if (Object(object) === object) {
- throw new TypeError(); // TODO message
- }
- var name = '';
- while (owns(object, name)) {
- name += '?';
- }
- object[name] = true;
- var returnValue = owns(object, name);
- delete object[name];
- return returnValue;
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
};
-}
-if (!Object.keys) {
- var hasDontEnumBug = true,
- dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor"
- ],
- dontEnumsLength = dontEnums.length;
- for (var key in {"toString": null}) {
- hasDontEnumBug = false;
- }
-
- Object.keys = function keys(object) {
-
- if (
- (typeof object != "object" && typeof object != "function") ||
- object === null
- ) {
- throw new TypeError("Object.keys called on a non-object");
- }
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
- var keys = [];
- for (var name in object) {
- if (owns(object, name)) {
- keys.push(name);
- }
- }
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
- if (hasDontEnumBug) {
- for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
- var dontEnum = dontEnums[i];
- if (owns(object, dontEnum)) {
- keys.push(dontEnum);
- }
- }
- }
- return keys;
- };
-}
-if (!Date.now) {
- Date.now = function now() {
- return new Date().getTime();
- };
-}
-var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
- "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
- "\u2029\uFEFF";
-if (!String.prototype.trim || ws.trim()) {
- ws = "[" + ws + "]";
- var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
- trimEndRegexp = new RegExp(ws + ws + "*$");
- String.prototype.trim = function trim() {
- return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
- };
-}
+exports.Range = Range;
+});
-function toInteger(n) {
- n = +n;
- if (n !== n) { // isNaN
- n = 0;
- } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- }
- return n;
-}
+ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
-function isPrimitive(input) {
- var type = typeof input;
- return (
- input === null ||
- type === "undefined" ||
- type === "boolean" ||
- type === "number" ||
- type === "string"
- );
-}
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
-function toPrimitive(input) {
- var val, valueOf, toString;
- if (isPrimitive(input)) {
- return input;
- }
- valueOf = input.valueOf;
- if (typeof valueOf === "function") {
- val = valueOf.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- toString = input.toString;
- if (typeof toString === "function") {
- val = toString.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- throw new TypeError();
-}
-var toObject = function (o) {
- if (o == null) { // this matches both null and undefined
- throw new TypeError("can't convert "+o+" to object");
- }
- return Object(o);
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
};
-});
+(function() {
-ace.define('ace/mode/lua_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/lua/luaparse'], function(require, exports, module) {
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+ if (range.start.row == range.end.row && range.start.row != this.row)
+ return;
-var oop = require("../lib/oop");
-var Mirror = require("../worker/mirror").Mirror;
-var luaparse = require("../mode/lua/luaparse");
+ if (range.start.row > this.row)
+ return;
-var Worker = exports.Worker = function(sender) {
- Mirror.call(this, sender);
- this.setTimeout(500);
-};
+ if (range.start.row == this.row && range.start.column > this.column)
+ return;
-oop.inherits(Worker, Mirror);
+ var row = this.row;
+ var column = this.column;
+ var start = range.start;
+ var end = range.end;
-(function() {
+ if (delta.action === "insertText") {
+ if (start.row === row && start.column <= column) {
+ if (start.column === column && this.$insertRight) {
+ } else if (start.row === end.row) {
+ column += end.column - start.column;
+ } else {
+ column -= start.column;
+ row += end.row - start.row;
+ }
+ } else if (start.row !== end.row && start.row < row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "insertLines") {
+ if (start.row === row && column === 0 && this.$insertRight) {
+ }
+ else if (start.row <= row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "removeText") {
+ if (start.row === row && start.column < column) {
+ if (end.column >= column)
+ column = start.column;
+ else
+ column = Math.max(0, column - (end.column - start.column));
- this.onUpdate = function() {
- var value = this.doc.getValue();
- try {
- luaparse.parse(value);
- } catch(e) {
- if (e instanceof SyntaxError) {
- this.sender.emit("error", {
- row: e.line - 1,
- column: e.column,
- text: e.message,
- type: "error"
- });
+ } else if (start.row !== end.row && start.row < row) {
+ if (end.row === row)
+ column = Math.max(0, column - end.column) + start.column;
+ row -= (end.row - start.row);
+ } else if (end.row === row) {
+ row -= end.row - start.row;
+ column = Math.max(0, column - end.column) + start.column;
+ }
+ } else if (delta.action == "removeLines") {
+ if (start.row <= row) {
+ if (end.row <= row)
+ row -= end.row - start.row;
+ else {
+ row = start.row;
+ column = 0;
+ }
}
- return;
}
- this.sender.emit("ok");
- };
-
-}).call(Worker.prototype);
-});
-ace.define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
+ this.setPosition(row, column, true);
+ };
+ this.setPosition = function(row, column, noClip) {
+ var pos;
+ if (noClip) {
+ pos = {
+ row: row,
+ column: column
+ };
+ } else {
+ pos = this.$clipPositionToDocument(row, column);
+ }
+ if (this.row == pos.row && this.column == pos.column)
+ return;
-var Document = require("../document").Document;
-var lang = require("../lib/lang");
-
-var Mirror = exports.Mirror = function(sender) {
- this.sender = sender;
- var doc = this.doc = new Document("");
-
- var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
-
- var _self = this;
- sender.on("change", function(e) {
- doc.applyDeltas(e.data);
- deferredUpdate.schedule(_self.$timeout);
- });
-};
+ var old = {
+ row: this.row,
+ column: this.column
+ };
-(function() {
-
- this.$timeout = 500;
-
- this.setTimeout = function(timeout) {
- this.$timeout = timeout;
+ this.row = pos.row;
+ this.column = pos.column;
+ this._signal("change", {
+ old: old,
+ value: pos
+ });
};
-
- this.setValue = function(value) {
- this.doc.setValue(value);
- this.deferredUpdate.schedule(this.$timeout);
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
};
-
- this.getValue = function(callbackId) {
- this.sender.callback(this.doc.getValue(), callbackId);
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("change", this.$onChange);
};
-
- this.onUpdate = function() {
+ this.$clipPositionToDocument = function(row, column) {
+ var pos = {};
+
+ if (row >= this.document.getLength()) {
+ pos.row = Math.max(0, this.document.getLength() - 1);
+ pos.column = this.document.getLine(pos.row).length;
+ }
+ else if (row < 0) {
+ pos.row = 0;
+ pos.column = 0;
+ }
+ else {
+ pos.row = row;
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+ }
+
+ if (column < 0)
+ pos.column = 0;
+
+ return pos;
};
-
-}).call(Mirror.prototype);
-});
+}).call(Anchor.prototype);
-ace.define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
+});
+ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
@@ -1094,7 +744,7 @@ var Anchor = require("./anchor").Anchor;
var Document = function(text) {
this.$lines = [];
- if (text.length == 0) {
+ if (text.length === 0) {
this.$lines = [""];
} else if (Array.isArray(text)) {
this._insertLines(0, text);
@@ -1117,10 +767,10 @@ var Document = function(text) {
this.createAnchor = function(row, column) {
return new Anchor(this, row, column);
};
- if ("aaa".split(/a/).length == 0)
+ if ("aaa".split(/a/).length === 0)
this.$split = function(text) {
return text.replace(/\r\n|\r/g, "\n").split("\n");
- }
+ };
else
this.$split = function(text) {
return text.split(/\r\n|\r|\n/);
@@ -1130,6 +780,7 @@ var Document = function(text) {
this.$detectNewLine = function(text) {
var match = text.match(/^.*?(\r\n|\r|\n)/m);
this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
};
this.getNewLineCharacter = function() {
switch (this.$newLineMode) {
@@ -1138,17 +789,18 @@ var Document = function(text) {
case "unix":
return "\n";
default:
- return this.$autoNewLine;
+ return this.$autoNewLine || "\n";
}
};
- this.$autoNewLine = "\n";
+ this.$autoNewLine = "";
this.$newLineMode = "auto";
this.setNewLineMode = function(newLineMode) {
if (this.$newLineMode === newLineMode)
return;
this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
};
this.getNewLineMode = function() {
return this.$newLineMode;
@@ -1218,9 +870,10 @@ var Document = function(text) {
this._insertLines = function(row, lines) {
if (lines.length == 0)
return {row: row, column: 0};
- if (lines.length > 0xFFFF) {
- var end = this._insertLines(row, lines.slice(0xFFFF));
- lines = lines.slice(0, 0xFFFF);
+ while (lines.length > 20000) {
+ var end = this._insertLines(row, lines.slice(0, 20000));
+ lines = lines.slice(20000);
+ row = end.row;
}
var args = [row, 0];
@@ -1233,8 +886,8 @@ var Document = function(text) {
range: range,
lines: lines
};
- this._emit("change", { data: delta });
- return end || range.end;
+ this._signal("change", { data: delta });
+ return range.end;
};
this.insertNewLine = function(position) {
position = this.$clipPosition(position);
@@ -1253,7 +906,7 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
@@ -1276,11 +929,13 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: text
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
this.remove = function(range) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
range.start = this.$clipPosition(range.start);
range.end = this.$clipPosition(range.end);
@@ -1325,7 +980,7 @@ var Document = function(text) {
range: range,
text: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return range.start;
};
this.removeLines = function(firstRow, lastRow) {
@@ -1344,7 +999,7 @@ var Document = function(text) {
nl: this.getNewLineCharacter(),
lines: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return removed;
};
this.removeNewLine = function(row) {
@@ -1361,9 +1016,11 @@ var Document = function(text) {
range: range,
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
};
this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
if (text.length == 0 && range.isEmpty())
return range.start;
if (text == this.getTextRange(range))
@@ -1436,392 +1093,12 @@ var Document = function(text) {
exports.Document = Document;
});
-ace.define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
-var comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
+exports.last = function(a) {
+ return a[a.length - 1];
};
-var Range = function(startRow, startColumn, endRow, endColumn) {
- this.start = {
- row: startRow,
- column: startColumn
- };
-
- this.end = {
- row: endRow,
- column: endColumn
- };
-};
-
-(function() {
- this.isEqual = function(range) {
- return this.start.row === range.start.row &&
- this.end.row === range.end.row &&
- this.start.column === range.start.column &&
- this.end.column === range.end.column;
- };
- this.toString = function() {
- return ("Range: [" + this.start.row + "/" + this.start.column +
- "] -> [" + this.end.row + "/" + this.end.column + "]");
- };
-
- this.contains = function(row, column) {
- return this.compare(row, column) == 0;
- };
- this.compareRange = function(range) {
- var cmp,
- end = range.end,
- start = range.start;
-
- cmp = this.compare(end.row, end.column);
- if (cmp == 1) {
- cmp = this.compare(start.row, start.column);
- if (cmp == 1) {
- return 2;
- } else if (cmp == 0) {
- return 1;
- } else {
- return 0;
- }
- } else if (cmp == -1) {
- return -2;
- } else {
- cmp = this.compare(start.row, start.column);
- if (cmp == -1) {
- return -1;
- } else if (cmp == 1) {
- return 42;
- } else {
- return 0;
- }
- }
- };
- this.comparePoint = function(p) {
- return this.compare(p.row, p.column);
- };
- this.containsRange = function(range) {
- return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- };
- this.intersects = function(range) {
- var cmp = this.compareRange(range);
- return (cmp == -1 || cmp == 0 || cmp == 1);
- };
- this.isEnd = function(row, column) {
- return this.end.row == row && this.end.column == column;
- };
- this.isStart = function(row, column) {
- return this.start.row == row && this.start.column == column;
- };
- this.setStart = function(row, column) {
- if (typeof row == "object") {
- this.start.column = row.column;
- this.start.row = row.row;
- } else {
- this.start.row = row;
- this.start.column = column;
- }
- };
- this.setEnd = function(row, column) {
- if (typeof row == "object") {
- this.end.column = row.column;
- this.end.row = row.row;
- } else {
- this.end.row = row;
- this.end.column = column;
- }
- };
- this.inside = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column) || this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideStart = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideEnd = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.compare = function(row, column) {
- if (!this.isMultiLine()) {
- if (row === this.start.row) {
- return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
- };
- }
-
- if (row < this.start.row)
- return -1;
-
- if (row > this.end.row)
- return 1;
-
- if (this.start.row === row)
- return column >= this.start.column ? 0 : -1;
-
- if (this.end.row === row)
- return column <= this.end.column ? 0 : 1;
-
- return 0;
- };
- this.compareStart = function(row, column) {
- if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareEnd = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareInside = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.clipRows = function(firstRow, lastRow) {
- if (this.end.row > lastRow)
- var end = {row: lastRow + 1, column: 0};
- else if (this.end.row < firstRow)
- var end = {row: firstRow, column: 0};
-
- if (this.start.row > lastRow)
- var start = {row: lastRow + 1, column: 0};
- else if (this.start.row < firstRow)
- var start = {row: firstRow, column: 0};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
- this.extend = function(row, column) {
- var cmp = this.compare(row, column);
-
- if (cmp == 0)
- return this;
- else if (cmp == -1)
- var start = {row: row, column: column};
- else
- var end = {row: row, column: column};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.isEmpty = function() {
- return (this.start.row === this.end.row && this.start.column === this.end.column);
- };
- this.isMultiLine = function() {
- return (this.start.row !== this.end.row);
- };
- this.clone = function() {
- return Range.fromPoints(this.start, this.end);
- };
- this.collapseRows = function() {
- if (this.end.column == 0)
- return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
- else
- return new Range(this.start.row, 0, this.end.row, 0)
- };
- this.toScreenRange = function(session) {
- var screenPosStart = session.documentToScreenPosition(this.start);
- var screenPosEnd = session.documentToScreenPosition(this.end);
-
- return new Range(
- screenPosStart.row, screenPosStart.column,
- screenPosEnd.row, screenPosEnd.column
- );
- };
- this.moveBy = function(row, column) {
- this.start.row += row;
- this.start.column += column;
- this.end.row += row;
- this.end.column += column;
- };
-
-}).call(Range.prototype);
-Range.fromPoints = function(start, end) {
- return new Range(start.row, start.column, end.row, end.column);
-};
-Range.comparePoints = comparePoints;
-
-Range.comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-
-
-exports.Range = Range;
-});
-
-ace.define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-
-var Anchor = exports.Anchor = function(doc, row, column) {
- this.$onChange = this.onChange.bind(this);
- this.attach(doc);
-
- if (typeof column == "undefined")
- this.setPosition(row.row, row.column);
- else
- this.setPosition(row, column);
-};
-
-(function() {
-
- oop.implement(this, EventEmitter);
- this.getPosition = function() {
- return this.$clipPositionToDocument(this.row, this.column);
- };
- this.getDocument = function() {
- return this.document;
- };
- this.onChange = function(e) {
- var delta = e.data;
- var range = delta.range;
-
- if (range.start.row == range.end.row && range.start.row != this.row)
- return;
-
- if (range.start.row > this.row)
- return;
-
- if (range.start.row == this.row && range.start.column > this.column)
- return;
-
- var row = this.row;
- var column = this.column;
- var start = range.start;
- var end = range.end;
-
- if (delta.action === "insertText") {
- if (start.row === row && start.column <= column) {
- if (start.row === end.row) {
- column += end.column - start.column;
- } else {
- column -= start.column;
- row += end.row - start.row;
- }
- } else if (start.row !== end.row && start.row < row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "insertLines") {
- if (start.row <= row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "removeText") {
- if (start.row === row && start.column < column) {
- if (end.column >= column)
- column = start.column;
- else
- column = Math.max(0, column - (end.column - start.column));
-
- } else if (start.row !== end.row && start.row < row) {
- if (end.row === row)
- column = Math.max(0, column - end.column) + start.column;
- row -= (end.row - start.row);
- } else if (end.row === row) {
- row -= end.row - start.row;
- column = Math.max(0, column - end.column) + start.column;
- }
- } else if (delta.action == "removeLines") {
- if (start.row <= row) {
- if (end.row <= row)
- row -= end.row - start.row;
- else {
- row = start.row;
- column = 0;
- }
- }
- }
-
- this.setPosition(row, column, true);
- };
- this.setPosition = function(row, column, noClip) {
- var pos;
- if (noClip) {
- pos = {
- row: row,
- column: column
- };
- } else {
- pos = this.$clipPositionToDocument(row, column);
- }
-
- if (this.row == pos.row && this.column == pos.column)
- return;
-
- var old = {
- row: this.row,
- column: this.column
- };
-
- this.row = pos.row;
- this.column = pos.column;
- this._emit("change", {
- old: old,
- value: pos
- });
- };
- this.detach = function() {
- this.document.removeEventListener("change", this.$onChange);
- };
- this.attach = function(doc) {
- this.document = doc || this.document;
- this.document.on("change", this.$onChange);
- };
- this.$clipPositionToDocument = function(row, column) {
- var pos = {};
-
- if (row >= this.document.getLength()) {
- pos.row = Math.max(0, this.document.getLength() - 1);
- pos.column = this.document.getLine(pos.row).length;
- }
- else if (row < 0) {
- pos.row = 0;
- pos.column = 0;
- }
- else {
- pos.row = row;
- pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
- }
-
- if (column < 0)
- pos.column = 0;
-
- return pos;
- };
-
-}).call(Anchor.prototype);
-
-});
-
-ace.define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-
exports.stringReverse = function(string) {
return string.split("").reverse().join("");
@@ -1869,18 +1146,24 @@ exports.copyArray = function(array){
return copy;
};
-exports.deepCopy = function (obj) {
- if (typeof obj != "object") {
+exports.deepCopy = function deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
}
+ var cons = obj.constructor;
+ if (cons === RegExp)
+ return obj;
- var copy = obj.constructor();
+ copy = cons();
for (var key in obj) {
- if (typeof obj[key] == "object") {
- copy[key] = this.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
+ copy[key] = deepCopy(obj[key]);
}
return copy;
};
@@ -1930,7 +1213,6 @@ exports.getMatchOffsets = function(string, regExp) {
return matches;
};
exports.deferredCall = function(fcn) {
-
var timer = null;
var callback = function() {
timer = null;
@@ -1956,6 +1238,10 @@ exports.deferredCall = function(fcn) {
timer = null;
return deferred;
};
+
+ deferred.isPending = function() {
+ return timer;
+ };
return deferred;
};
@@ -1969,15 +1255,15 @@ exports.delayedCall = function(fcn, defaultTimeout) {
};
var _self = function(timeout) {
- timer && clearTimeout(timer);
- timer = setTimeout(callback, timeout || defaultTimeout);
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
- _self.delay = _self;
- _self.schedule = function(timeout) {
- if (timer == null)
- timer = setTimeout(callback, timeout || 0);
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
+ _self.schedule = _self;
_self.call = function() {
this.cancel();
@@ -1996,12 +1282,62 @@ exports.delayedCall = function(fcn, defaultTimeout) {
return _self;
};
});
-ace.define('ace/mode/lua/luaparse', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+
+var Mirror = exports.Mirror = function(sender) {
+ this.sender = sender;
+ var doc = this.doc = new Document("");
+
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ doc.applyDeltas(e.data);
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(function() {
+
+ this.$timeout = 500;
+
+ this.setTimeout = function(timeout) {
+ this.$timeout = timeout;
+ };
+
+ this.setValue = function(value) {
+ this.doc.setValue(value);
+ this.deferredUpdate.schedule(this.$timeout);
+ };
+
+ this.getValue = function(callbackId) {
+ this.sender.callback(this.doc.getValue(), callbackId);
+ };
+
+ this.onUpdate = function() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/lua/luaparse",["require","exports","module"], function(require, exports, module) {
(function (root, name, factory) {
factory(exports)
}(this, 'luaparse', function (exports) {
-
+ 'use strict';
exports.version = '0.1.4';
@@ -3484,4 +2820,739 @@ ace.define('ace/mode/lua/luaparse', ['require', 'exports', 'module' ], function(
}));
-}); \ No newline at end of file
+});
+
+ace.define("ace/mode/lua_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/lua/luaparse"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var luaparse = require("../mode/lua/luaparse");
+
+var Worker = exports.Worker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(500);
+};
+
+oop.inherits(Worker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ var errors = [];
+ try {
+ luaparse.parse(value);
+ } catch(e) {
+ if (e instanceof SyntaxError) {
+ errors.push({
+ row: e.line - 1,
+ column: e.column,
+ text: e.message,
+ type: "error"
+ });
+ }
+ }
+ this.sender.emit("annotate", errors);
+ };
+
+}).call(Worker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ return bound;
+ };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ while (++i < length) {
+ if (i in self) {
+ fun.call(thisp, self[i], i, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ var i = 0;
+ var result;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i++];
+ break;
+ }
+ if (++i >= length) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ var result, i = length - 1;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i--];
+ break;
+ }
+ if (--i < 0) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+
+ var i = 0;
+ if (arguments.length > 1) {
+ i = toInteger(arguments[1]);
+ }
+ i = i >= 0 ? i : Math.max(0, length + i);
+ for (; i < length; i++) {
+ if (i in self && self[i] === sought) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+ var i = length - 1;
+ if (arguments.length > 1) {
+ i = Math.min(i, toInteger(arguments[1]));
+ }
+ i = i >= 0 ? i : length - Math.abs(i);
+ for (; i >= 0; i--) {
+ if (i in self && sought === self[i]) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Object.getPrototypeOf) {
+ Object.getPrototypeOf = function getPrototypeOf(object) {
+ return object.__proto__ || (
+ object.constructor ?
+ object.constructor.prototype :
+ prototypeOfObject
+ );
+ };
+}
+if (!Object.getOwnPropertyDescriptor) {
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+ "non-object: ";
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT + object);
+ if (!owns(object, property))
+ return;
+
+ var descriptor, getter, setter;
+ descriptor = { enumerable: true, configurable: true };
+ if (supportsAccessors) {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+
+ var getter = lookupGetter(object, property);
+ var setter = lookupSetter(object, property);
+ object.__proto__ = prototype;
+
+ if (getter || setter) {
+ if (getter) descriptor.get = getter;
+ if (setter) descriptor.set = setter;
+ return descriptor;
+ }
+ }
+ descriptor.value = object[property];
+ return descriptor;
+ };
+}
+if (!Object.getOwnPropertyNames) {
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ return Object.keys(object);
+ };
+}
+if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
+ Object.create = function create(prototype, properties) {
+ var object;
+ if (prototype === null) {
+ object = createEmpty();
+ } else {
+ if (typeof prototype != "object")
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+ var Type = function () {};
+ Type.prototype = prototype;
+ object = new Type();
+ object.__proto__ = prototype;
+ }
+ if (properties !== void 0)
+ Object.defineProperties(object, properties);
+ return object;
+ };
+}
+
+function doesDefinePropertyWork(object) {
+ try {
+ Object.defineProperty(object, "sentinel", {});
+ return "sentinel" in object;
+ } catch (exception) {
+ }
+}
+if (Object.defineProperty) {
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
+ doesDefinePropertyWork(document.createElement("div"));
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+ var definePropertyFallback = Object.defineProperty;
+ }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+ "on this javascript engine";
+
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+ if (definePropertyFallback) {
+ try {
+ return definePropertyFallback.call(Object, object, property, descriptor);
+ } catch (exception) {
+ }
+ }
+ if (owns(descriptor, "value")) {
+
+ if (supportsAccessors && (lookupGetter(object, property) ||
+ lookupSetter(object, property)))
+ {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+ delete object[property];
+ object[property] = descriptor.value;
+ object.__proto__ = prototype;
+ } else {
+ object[property] = descriptor.value;
+ }
+ } else {
+ if (!supportsAccessors)
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+ if (owns(descriptor, "get"))
+ defineGetter(object, property, descriptor.get);
+ if (owns(descriptor, "set"))
+ defineSetter(object, property, descriptor.set);
+ }
+
+ return object;
+ };
+}
+if (!Object.defineProperties) {
+ Object.defineProperties = function defineProperties(object, properties) {
+ for (var property in properties) {
+ if (owns(properties, property))
+ Object.defineProperty(object, property, properties[property]);
+ }
+ return object;
+ };
+}
+if (!Object.seal) {
+ Object.seal = function seal(object) {
+ return object;
+ };
+}
+if (!Object.freeze) {
+ Object.freeze = function freeze(object) {
+ return object;
+ };
+}
+try {
+ Object.freeze(function () {});
+} catch (exception) {
+ Object.freeze = (function freeze(freezeObject) {
+ return function freeze(object) {
+ if (typeof object == "function") {
+ return object;
+ } else {
+ return freezeObject(object);
+ }
+ };
+ })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+ Object.preventExtensions = function preventExtensions(object) {
+ return object;
+ };
+}
+if (!Object.isSealed) {
+ Object.isSealed = function isSealed(object) {
+ return false;
+ };
+}
+if (!Object.isFrozen) {
+ Object.isFrozen = function isFrozen(object) {
+ return false;
+ };
+}
+if (!Object.isExtensible) {
+ Object.isExtensible = function isExtensible(object) {
+ if (Object(object) === object) {
+ throw new TypeError(); // TODO message
+ }
+ var name = '';
+ while (owns(object, name)) {
+ name += '?';
+ }
+ object[name] = true;
+ var returnValue = owns(object, name);
+ delete object[name];
+ return returnValue;
+ };
+}
+if (!Object.keys) {
+ var hasDontEnumBug = true,
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ for (var key in {"toString": null}) {
+ hasDontEnumBug = false;
+ }
+
+ Object.keys = function keys(object) {
+
+ if (
+ (typeof object != "object" && typeof object != "function") ||
+ object === null
+ ) {
+ throw new TypeError("Object.keys called on a non-object");
+ }
+
+ var keys = [];
+ for (var name in object) {
+ if (owns(object, name)) {
+ keys.push(name);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+ var dontEnum = dontEnums[i];
+ if (owns(object, dontEnum)) {
+ keys.push(dontEnum);
+ }
+ }
+ }
+ return keys;
+ };
+
+}
+if (!Date.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ };
+}
+
+function toInteger(n) {
+ n = +n;
+ if (n !== n) { // isNaN
+ n = 0;
+ } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ }
+ return n;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/js/vendor/ace/src-noconflict/worker-php.js b/js/vendor/ace/src-noconflict/worker-php.js
index 2419c1b..ef586fb 100644..100755
--- a/js/vendor/ace/src-noconflict/worker-php.js
+++ b/js/vendor/ace/src-noconflict/worker-php.js
@@ -16,18 +16,30 @@ window.console.trace = window.console;
window.window = window;
window.ace = window;
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
if (moduleName.indexOf("!") !== -1) {
var chunks = moduleName.split("!");
- return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
}
+ // normalize relative requires
if (moduleName.charAt(0) == ".") {
var base = parentId.split("/").slice(0, -1).join("/");
- moduleName = base + "/" + moduleName;
+ moduleName = (base ? base + "/" : "") + moduleName;
while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
var previous = moduleName;
- moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
@@ -36,15 +48,15 @@ window.normalizeModule = function(parentId, moduleName) {
window.require = function(parentId, id) {
if (!id) {
- id = parentId
+ id = parentId;
parentId = null;
}
if (!id.charAt)
throw new Error("worker.js require() accepts only (parentId, id) as arguments");
- id = normalizeModule(parentId, id);
+ id = window.normalizeModule(parentId, id);
- var module = require.modules[id];
+ var module = window.require.modules[id];
if (module) {
if (!module.initialized) {
module.initialized = true;
@@ -54,56 +66,80 @@ window.require = function(parentId, id) {
}
var chunks = id.split("/");
- chunks[0] = require.tlns[chunks[0]] || chunks[0];
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+ chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
var path = chunks.join("/") + ".js";
- require.id = id;
+ window.require.id = id;
importScripts(path);
- return require(parentId, id);
+ return window.require(parentId, id);
};
-
-require.modules = {};
-require.tlns = {};
+window.require.modules = {};
+window.require.tlns = {};
window.define = function(id, deps, factory) {
if (arguments.length == 2) {
factory = deps;
if (typeof id != "string") {
deps = id;
- id = require.id;
+ id = window.require.id;
}
} else if (arguments.length == 1) {
factory = id;
- id = require.id;
+ deps = [];
+ id = window.require.id;
}
-
- if (id.indexOf("text!") === 0)
- return;
- var req = function(deps, factory) {
- return require(id, deps, factory);
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject 'require', 'exports' and
+ // 'module' as dependencies, to provide CommonJS compatibility.
+ deps = ['require', 'exports', 'module'];
+
+ var req = function(childId) {
+ return window.require(id, childId);
};
- require.modules[id] = {
+ window.require.modules[id] = {
exports: {},
factory: function() {
var module = this;
- var returnExports = factory(req, module.exports, module);
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch(dep) {
+ // Because 'require', 'exports' and 'module' aren't actual
+ // dependencies, we must handle them seperately.
+ case 'require': return req;
+ case 'exports': return module.exports;
+ case 'module': return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
if (returnExports)
module.exports = returnExports;
return module;
}
};
};
+window.define.amd = {};
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
require.tlns = topLevelNamespaces;
-}
+};
window.initSender = function initSender() {
- var EventEmitter = require("ace/lib/event_emitter").EventEmitter;
- var oop = require("ace/lib/oop");
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("ace/lib/oop");
var Sender = function() {};
@@ -130,10 +166,10 @@ window.initSender = function initSender() {
}).call(Sender.prototype);
return new Sender();
-}
+};
-window.main = null;
-window.sender = null;
+var main = window.main = null;
+var sender = window.sender = null;
window.onmessage = function(e) {
var msg = e.data;
@@ -146,18 +182,46 @@ window.onmessage = function(e) {
else if (msg.init) {
initBaseUrls(msg.tlns);
require("ace/lib/es5-shim");
- sender = initSender();
+ sender = window.sender = initSender();
var clazz = require(msg.module)[msg.classname];
- main = new clazz(sender);
+ main = window.main = new clazz(sender);
}
else if (msg.event && sender) {
- sender._emit(msg.event, msg.data);
+ sender._signal(msg.event, msg.data);
}
};
})(this);
-ace.define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
var EventEmitter = {};
var stopPropagation = function() { this.propagationStopped = true; };
@@ -183,6 +247,7 @@ EventEmitter._dispatchEvent = function(eventName, e) {
if (!e.preventDefault)
e.preventDefault = preventDefault;
+ listeners = listeners.slice();
for (var i=0; i<listeners.length; i++) {
listeners[i](e, this);
if (e.propagationStopped)
@@ -198,7 +263,7 @@ EventEmitter._signal = function(eventName, e) {
var listeners = (this._eventRegistry || {})[eventName];
if (!listeners)
return;
-
+ listeners = listeners.slice();
for (var i=0; i<listeners.length; i++)
listeners[i](e, this);
};
@@ -281,816 +346,396 @@ exports.EventEmitter = EventEmitter;
});
-ace.define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-exports.inherits = (function() {
- var tempCtor = function() {};
- return function(ctor, superCtor) {
- tempCtor.prototype = superCtor.prototype;
- ctor.super_ = superCtor.prototype;
- ctor.prototype = new tempCtor();
- ctor.prototype.constructor = ctor;
- };
-}());
-
-exports.mixin = function(obj, mixin) {
- for (var key in mixin) {
- obj[key] = mixin[key];
- }
- return obj;
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
};
+var Range = function(startRow, startColumn, endRow, endColumn) {
+ this.start = {
+ row: startRow,
+ column: startColumn
+ };
-exports.implement = function(proto, mixin) {
- exports.mixin(proto, mixin);
+ this.end = {
+ row: endRow,
+ column: endColumn
+ };
};
-});
-
-ace.define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-function Empty() {}
-
-if (!Function.prototype.bind) {
- Function.prototype.bind = function bind(that) { // .length is 1
- var target = this;
- if (typeof target != "function") {
- throw new TypeError("Function.prototype.bind called on incompatible " + target);
- }
- var args = slice.call(arguments, 1); // for normal call
- var bound = function () {
-
- if (this instanceof bound) {
-
- var result = target.apply(
- this,
- args.concat(slice.call(arguments))
- );
- if (Object(result) === result) {
- return result;
- }
- return this;
-
- } else {
- return target.apply(
- that,
- args.concat(slice.call(arguments))
- );
-
- }
-
- };
- if(target.prototype) {
- Empty.prototype = target.prototype;
- bound.prototype = new Empty();
- Empty.prototype = null;
- }
- return bound;
+(function() {
+ this.isEqual = function(range) {
+ return this.start.row === range.start.row &&
+ this.end.row === range.end.row &&
+ this.start.column === range.start.column &&
+ this.end.column === range.end.column;
+ };
+ this.toString = function() {
+ return ("Range: [" + this.start.row + "/" + this.start.column +
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
};
-}
-var call = Function.prototype.call;
-var prototypeOfArray = Array.prototype;
-var prototypeOfObject = Object.prototype;
-var slice = prototypeOfArray.slice;
-var _toString = call.bind(prototypeOfObject.toString);
-var owns = call.bind(prototypeOfObject.hasOwnProperty);
-var defineGetter;
-var defineSetter;
-var lookupGetter;
-var lookupSetter;
-var supportsAccessors;
-if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
- defineGetter = call.bind(prototypeOfObject.__defineGetter__);
- defineSetter = call.bind(prototypeOfObject.__defineSetter__);
- lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
- lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
-}
-if ([1,2].splice(0).length != 2) {
- if(function() { // test IE < 9 to splice bug - see issue #138
- function makeArray(l) {
- var a = new Array(l+2);
- a[0] = a[1] = 0;
- return a;
- }
- var array = [], lengthBefore;
-
- array.splice.apply(array, makeArray(20));
- array.splice.apply(array, makeArray(26));
-
- lengthBefore = array.length; //46
- array.splice(5, 0, "XXX"); // add one element
- lengthBefore + 1 == array.length
+ this.contains = function(row, column) {
+ return this.compare(row, column) == 0;
+ };
+ this.compareRange = function(range) {
+ var cmp,
+ end = range.end,
+ start = range.start;
- if (lengthBefore + 1 == array.length) {
- return true;// has right splice implementation without bugs
- }
- }()) {//IE 6/7
- var array_splice = Array.prototype.splice;
- Array.prototype.splice = function(start, deleteCount) {
- if (!arguments.length) {
- return [];
+ cmp = this.compare(end.row, end.column);
+ if (cmp == 1) {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == 1) {
+ return 2;
+ } else if (cmp == 0) {
+ return 1;
} else {
- return array_splice.apply(this, [
- start === void 0 ? 0 : start,
- deleteCount === void 0 ? (this.length - start) : deleteCount
- ].concat(slice.call(arguments, 2)))
- }
- };
- } else {//IE8
- Array.prototype.splice = function(pos, removeCount){
- var length = this.length;
- if (pos > 0) {
- if (pos > length)
- pos = length;
- } else if (pos == void 0) {
- pos = 0;
- } else if (pos < 0) {
- pos = Math.max(length + pos, 0);
+ return 0;
}
-
- if (!(pos+removeCount < length))
- removeCount = length - pos;
-
- var removed = this.slice(pos, pos+removeCount);
- var insert = slice.call(arguments, 2);
- var add = insert.length;
- if (pos === length) {
- if (add) {
- this.push.apply(this, insert);
- }
+ } else if (cmp == -1) {
+ return -2;
+ } else {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == -1) {
+ return -1;
+ } else if (cmp == 1) {
+ return 42;
} else {
- var remove = Math.min(removeCount, length - pos);
- var tailOldPos = pos + remove;
- var tailNewPos = tailOldPos + add - remove;
- var tailCount = length - tailOldPos;
- var lengthAfterRemove = length - remove;
-
- if (tailNewPos < tailOldPos) { // case A
- for (var i = 0; i < tailCount; ++i) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } else if (tailNewPos > tailOldPos) { // case B
- for (i = tailCount; i--; ) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } // else, add == remove (nothing to do)
-
- if (add && pos === lengthAfterRemove) {
- this.length = lengthAfterRemove; // truncate array
- this.push.apply(this, insert);
- } else {
- this.length = lengthAfterRemove + add; // reserves space
- for (i = 0; i < add; ++i) {
- this[pos+i] = insert[i];
- }
- }
- }
- return removed;
- };
- }
-}
-if (!Array.isArray) {
- Array.isArray = function isArray(obj) {
- return _toString(obj) == "[object Array]";
- };
-}
-var boxedString = Object("a"),
- splitString = boxedString[0] != "a" || !(0 in boxedString);
-
-if (!Array.prototype.forEach) {
- Array.prototype.forEach = function forEach(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- thisp = arguments[1],
- i = -1,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- while (++i < length) {
- if (i in self) {
- fun.call(thisp, self[i], i, object);
+ return 0;
}
}
};
-}
-if (!Array.prototype.map) {
- Array.prototype.map = function map(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = Array(length),
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self)
- result[i] = fun.call(thisp, self[i], i, object);
- }
- return result;
+ this.comparePoint = function(p) {
+ return this.compare(p.row, p.column);
};
-}
-if (!Array.prototype.filter) {
- Array.prototype.filter = function filter(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = [],
- value,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self) {
- value = self[i];
- if (fun.call(thisp, value, i, object)) {
- result.push(value);
- }
- }
+ this.containsRange = function(range) {
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
+ this.isEnd = function(row, column) {
+ return this.end.row == row && this.end.column == column;
+ };
+ this.isStart = function(row, column) {
+ return this.start.row == row && this.start.column == column;
+ };
+ this.setStart = function(row, column) {
+ if (typeof row == "object") {
+ this.start.column = row.column;
+ this.start.row = row.row;
+ } else {
+ this.start.row = row;
+ this.start.column = column;
}
- return result;
};
-}
-if (!Array.prototype.every) {
- Array.prototype.every = function every(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
+ this.setEnd = function(row, column) {
+ if (typeof row == "object") {
+ this.end.column = row.column;
+ this.end.row = row.row;
+ } else {
+ this.end.row = row;
+ this.end.column = column;
}
-
- for (var i = 0; i < length; i++) {
- if (i in self && !fun.call(thisp, self[i], i, object)) {
+ };
+ this.inside = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
return false;
+ } else {
+ return true;
}
}
- return true;
+ return false;
};
-}
-if (!Array.prototype.some) {
- Array.prototype.some = function some(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, object)) {
+ this.insideStart = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column)) {
+ return false;
+ } else {
return true;
}
}
return false;
};
-}
-if (!Array.prototype.reduce) {
- Array.prototype.reduce = function reduce(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduce of empty array with no initial value");
- }
-
- var i = 0;
- var result;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i++];
- break;
- }
- if (++i >= length) {
- throw new TypeError("reduce of empty array with no initial value");
- }
- } while (true);
- }
-
- for (; i < length; i++) {
- if (i in self) {
- result = fun.call(void 0, result, self[i], i, object);
+ this.insideEnd = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
}
}
-
- return result;
+ return false;
};
-}
-if (!Array.prototype.reduceRight) {
- Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduceRight of empty array with no initial value");
+ this.compare = function(row, column) {
+ if (!this.isMultiLine()) {
+ if (row === this.start.row) {
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+ };
}
- var result, i = length - 1;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i--];
- break;
- }
- if (--i < 0) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
- } while (true);
- }
+ if (row < this.start.row)
+ return -1;
- do {
- if (i in this) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- } while (i--);
+ if (row > this.end.row)
+ return 1;
- return result;
- };
-}
-if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
- Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
+ if (this.start.row === row)
+ return column >= this.start.column ? 0 : -1;
- if (!length) {
- return -1;
- }
+ if (this.end.row === row)
+ return column <= this.end.column ? 0 : 1;
- var i = 0;
- if (arguments.length > 1) {
- i = toInteger(arguments[1]);
- }
- i = i >= 0 ? i : Math.max(0, length + i);
- for (; i < length; i++) {
- if (i in self && self[i] === sought) {
- return i;
- }
- }
- return -1;
+ return 0;
};
-}
-if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
- Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
-
- if (!length) {
+ this.compareStart = function(row, column) {
+ if (this.start.row == row && this.start.column == column) {
return -1;
+ } else {
+ return this.compare(row, column);
}
- var i = length - 1;
- if (arguments.length > 1) {
- i = Math.min(i, toInteger(arguments[1]));
- }
- i = i >= 0 ? i : length - Math.abs(i);
- for (; i >= 0; i--) {
- if (i in self && sought === self[i]) {
- return i;
- }
- }
- return -1;
};
-}
-if (!Object.getPrototypeOf) {
- Object.getPrototypeOf = function getPrototypeOf(object) {
- return object.__proto__ || (
- object.constructor ?
- object.constructor.prototype :
- prototypeOfObject
- );
- };
-}
-if (!Object.getOwnPropertyDescriptor) {
- var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
- "non-object: ";
- Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT + object);
- if (!owns(object, property))
- return;
-
- var descriptor, getter, setter;
- descriptor = { enumerable: true, configurable: true };
- if (supportsAccessors) {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
-
- var getter = lookupGetter(object, property);
- var setter = lookupSetter(object, property);
- object.__proto__ = prototype;
-
- if (getter || setter) {
- if (getter) descriptor.get = getter;
- if (setter) descriptor.set = setter;
- return descriptor;
- }
+ this.compareEnd = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else {
+ return this.compare(row, column);
}
- descriptor.value = object[property];
- return descriptor;
- };
-}
-if (!Object.getOwnPropertyNames) {
- Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
- return Object.keys(object);
};
-}
-if (!Object.create) {
- var createEmpty;
- if (Object.prototype.__proto__ === null) {
- createEmpty = function () {
- return { "__proto__": null };
- };
- } else {
- createEmpty = function () {
- var empty = {};
- for (var i in empty)
- empty[i] = null;
- empty.constructor =
- empty.hasOwnProperty =
- empty.propertyIsEnumerable =
- empty.isPrototypeOf =
- empty.toLocaleString =
- empty.toString =
- empty.valueOf =
- empty.__proto__ = null;
- return empty;
- }
- }
-
- Object.create = function create(prototype, properties) {
- var object;
- if (prototype === null) {
- object = createEmpty();
+ this.compareInside = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else if (this.start.row == row && this.start.column == column) {
+ return -1;
} else {
- if (typeof prototype != "object")
- throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
- var Type = function () {};
- Type.prototype = prototype;
- object = new Type();
- object.__proto__ = prototype;
+ return this.compare(row, column);
}
- if (properties !== void 0)
- Object.defineProperties(object, properties);
- return object;
};
-}
-
-function doesDefinePropertyWork(object) {
- try {
- Object.defineProperty(object, "sentinel", {});
- return "sentinel" in object;
- } catch (exception) {
- }
-}
-if (Object.defineProperty) {
- var definePropertyWorksOnObject = doesDefinePropertyWork({});
- var definePropertyWorksOnDom = typeof document == "undefined" ||
- doesDefinePropertyWork(document.createElement("div"));
- if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
- var definePropertyFallback = Object.defineProperty;
- }
-}
+ this.clipRows = function(firstRow, lastRow) {
+ if (this.end.row > lastRow)
+ var end = {row: lastRow + 1, column: 0};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
-if (!Object.defineProperty || definePropertyFallback) {
- var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
- var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
- var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
- "on this javascript engine";
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {row: firstRow, column: 0};
- Object.defineProperty = function defineProperty(object, property, descriptor) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT_TARGET + object);
- if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
- throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
- if (definePropertyFallback) {
- try {
- return definePropertyFallback.call(Object, object, property, descriptor);
- } catch (exception) {
- }
- }
- if (owns(descriptor, "value")) {
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+ this.extend = function(row, column) {
+ var cmp = this.compare(row, column);
- if (supportsAccessors && (lookupGetter(object, property) ||
- lookupSetter(object, property)))
- {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
- delete object[property];
- object[property] = descriptor.value;
- object.__proto__ = prototype;
- } else {
- object[property] = descriptor.value;
- }
- } else {
- if (!supportsAccessors)
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- if (owns(descriptor, "get"))
- defineGetter(object, property, descriptor.get);
- if (owns(descriptor, "set"))
- defineSetter(object, property, descriptor.set);
- }
+ if (cmp == 0)
+ return this;
+ else if (cmp == -1)
+ var start = {row: row, column: column};
+ else
+ var end = {row: row, column: column};
- return object;
- };
-}
-if (!Object.defineProperties) {
- Object.defineProperties = function defineProperties(object, properties) {
- for (var property in properties) {
- if (owns(properties, property))
- Object.defineProperty(object, property, properties[property]);
- }
- return object;
+ return Range.fromPoints(start || this.start, end || this.end);
};
-}
-if (!Object.seal) {
- Object.seal = function seal(object) {
- return object;
+
+ this.isEmpty = function() {
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
};
-}
-if (!Object.freeze) {
- Object.freeze = function freeze(object) {
- return object;
+ this.isMultiLine = function() {
+ return (this.start.row !== this.end.row);
};
-}
-try {
- Object.freeze(function () {});
-} catch (exception) {
- Object.freeze = (function freeze(freezeObject) {
- return function freeze(object) {
- if (typeof object == "function") {
- return object;
- } else {
- return freezeObject(object);
- }
- };
- })(Object.freeze);
-}
-if (!Object.preventExtensions) {
- Object.preventExtensions = function preventExtensions(object) {
- return object;
+ this.clone = function() {
+ return Range.fromPoints(this.start, this.end);
};
-}
-if (!Object.isSealed) {
- Object.isSealed = function isSealed(object) {
- return false;
+ this.collapseRows = function() {
+ if (this.end.column == 0)
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+ else
+ return new Range(this.start.row, 0, this.end.row, 0)
};
-}
-if (!Object.isFrozen) {
- Object.isFrozen = function isFrozen(object) {
- return false;
+ this.toScreenRange = function(session) {
+ var screenPosStart = session.documentToScreenPosition(this.start);
+ var screenPosEnd = session.documentToScreenPosition(this.end);
+
+ return new Range(
+ screenPosStart.row, screenPosStart.column,
+ screenPosEnd.row, screenPosEnd.column
+ );
};
-}
-if (!Object.isExtensible) {
- Object.isExtensible = function isExtensible(object) {
- if (Object(object) === object) {
- throw new TypeError(); // TODO message
- }
- var name = '';
- while (owns(object, name)) {
- name += '?';
- }
- object[name] = true;
- var returnValue = owns(object, name);
- delete object[name];
- return returnValue;
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
};
-}
-if (!Object.keys) {
- var hasDontEnumBug = true,
- dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor"
- ],
- dontEnumsLength = dontEnums.length;
- for (var key in {"toString": null}) {
- hasDontEnumBug = false;
- }
-
- Object.keys = function keys(object) {
-
- if (
- (typeof object != "object" && typeof object != "function") ||
- object === null
- ) {
- throw new TypeError("Object.keys called on a non-object");
- }
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
- var keys = [];
- for (var name in object) {
- if (owns(object, name)) {
- keys.push(name);
- }
- }
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
- if (hasDontEnumBug) {
- for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
- var dontEnum = dontEnums[i];
- if (owns(object, dontEnum)) {
- keys.push(dontEnum);
- }
- }
- }
- return keys;
- };
-}
-if (!Date.now) {
- Date.now = function now() {
- return new Date().getTime();
- };
-}
-var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
- "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
- "\u2029\uFEFF";
-if (!String.prototype.trim || ws.trim()) {
- ws = "[" + ws + "]";
- var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
- trimEndRegexp = new RegExp(ws + ws + "*$");
- String.prototype.trim = function trim() {
- return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
- };
-}
+exports.Range = Range;
+});
-function toInteger(n) {
- n = +n;
- if (n !== n) { // isNaN
- n = 0;
- } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- }
- return n;
-}
+ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
-function isPrimitive(input) {
- var type = typeof input;
- return (
- input === null ||
- type === "undefined" ||
- type === "boolean" ||
- type === "number" ||
- type === "string"
- );
-}
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
-function toPrimitive(input) {
- var val, valueOf, toString;
- if (isPrimitive(input)) {
- return input;
- }
- valueOf = input.valueOf;
- if (typeof valueOf === "function") {
- val = valueOf.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- toString = input.toString;
- if (typeof toString === "function") {
- val = toString.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- throw new TypeError();
-}
-var toObject = function (o) {
- if (o == null) { // this matches both null and undefined
- throw new TypeError("can't convert "+o+" to object");
- }
- return Object(o);
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
};
-});
-
-ace.define('ace/mode/php_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/php/php'], function(require, exports, module) {
+(function() {
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
-var oop = require("../lib/oop");
-var Mirror = require("../worker/mirror").Mirror;
-var PHP = require("./php/php").PHP;
+ if (range.start.row == range.end.row && range.start.row != this.row)
+ return;
-var PhpWorker = exports.PhpWorker = function(sender) {
- Mirror.call(this, sender);
- this.setTimeout(500);
-};
+ if (range.start.row > this.row)
+ return;
-oop.inherits(PhpWorker, Mirror);
+ if (range.start.row == this.row && range.start.column > this.column)
+ return;
-(function() {
+ var row = this.row;
+ var column = this.column;
+ var start = range.start;
+ var end = range.end;
- this.onUpdate = function() {
- var value = this.doc.getValue();
- var errors = [];
+ if (delta.action === "insertText") {
+ if (start.row === row && start.column <= column) {
+ if (start.column === column && this.$insertRight) {
+ } else if (start.row === end.row) {
+ column += end.column - start.column;
+ } else {
+ column -= start.column;
+ row += end.row - start.row;
+ }
+ } else if (start.row !== end.row && start.row < row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "insertLines") {
+ if (start.row === row && column === 0 && this.$insertRight) {
+ }
+ else if (start.row <= row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "removeText") {
+ if (start.row === row && start.column < column) {
+ if (end.column >= column)
+ column = start.column;
+ else
+ column = Math.max(0, column - (end.column - start.column));
- var tokens = PHP.Lexer(value, {short_open_tag: 1});
- try {
- new PHP.Parser(tokens);
- } catch(e) {
- errors.push({
- row: e.line - 1,
- column: null,
- text: e.message.charAt(0).toUpperCase() + e.message.substring(1),
- type: "error"
- });
+ } else if (start.row !== end.row && start.row < row) {
+ if (end.row === row)
+ column = Math.max(0, column - end.column) + start.column;
+ row -= (end.row - start.row);
+ } else if (end.row === row) {
+ row -= end.row - start.row;
+ column = Math.max(0, column - end.column) + start.column;
+ }
+ } else if (delta.action == "removeLines") {
+ if (start.row <= row) {
+ if (end.row <= row)
+ row -= end.row - start.row;
+ else {
+ row = start.row;
+ column = 0;
+ }
+ }
}
- if (errors.length) {
- this.sender.emit("error", errors);
+ this.setPosition(row, column, true);
+ };
+ this.setPosition = function(row, column, noClip) {
+ var pos;
+ if (noClip) {
+ pos = {
+ row: row,
+ column: column
+ };
} else {
- this.sender.emit("ok");
+ pos = this.$clipPositionToDocument(row, column);
}
- };
-
-}).call(PhpWorker.prototype);
-
-});
-ace.define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
+ if (this.row == pos.row && this.column == pos.column)
+ return;
-var Document = require("../document").Document;
-var lang = require("../lib/lang");
-
-var Mirror = exports.Mirror = function(sender) {
- this.sender = sender;
- var doc = this.doc = new Document("");
-
- var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
-
- var _self = this;
- sender.on("change", function(e) {
- doc.applyDeltas(e.data);
- deferredUpdate.schedule(_self.$timeout);
- });
-};
+ var old = {
+ row: this.row,
+ column: this.column
+ };
-(function() {
-
- this.$timeout = 500;
-
- this.setTimeout = function(timeout) {
- this.$timeout = timeout;
+ this.row = pos.row;
+ this.column = pos.column;
+ this._signal("change", {
+ old: old,
+ value: pos
+ });
};
-
- this.setValue = function(value) {
- this.doc.setValue(value);
- this.deferredUpdate.schedule(this.$timeout);
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
};
-
- this.getValue = function(callbackId) {
- this.sender.callback(this.doc.getValue(), callbackId);
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("change", this.$onChange);
};
-
- this.onUpdate = function() {
+ this.$clipPositionToDocument = function(row, column) {
+ var pos = {};
+
+ if (row >= this.document.getLength()) {
+ pos.row = Math.max(0, this.document.getLength() - 1);
+ pos.column = this.document.getLine(pos.row).length;
+ }
+ else if (row < 0) {
+ pos.row = 0;
+ pos.column = 0;
+ }
+ else {
+ pos.row = row;
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+ }
+
+ if (column < 0)
+ pos.column = 0;
+
+ return pos;
};
-
-}).call(Mirror.prototype);
-});
+}).call(Anchor.prototype);
-ace.define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
+});
+ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
@@ -1099,7 +744,7 @@ var Anchor = require("./anchor").Anchor;
var Document = function(text) {
this.$lines = [];
- if (text.length == 0) {
+ if (text.length === 0) {
this.$lines = [""];
} else if (Array.isArray(text)) {
this._insertLines(0, text);
@@ -1122,10 +767,10 @@ var Document = function(text) {
this.createAnchor = function(row, column) {
return new Anchor(this, row, column);
};
- if ("aaa".split(/a/).length == 0)
+ if ("aaa".split(/a/).length === 0)
this.$split = function(text) {
return text.replace(/\r\n|\r/g, "\n").split("\n");
- }
+ };
else
this.$split = function(text) {
return text.split(/\r\n|\r|\n/);
@@ -1135,6 +780,7 @@ var Document = function(text) {
this.$detectNewLine = function(text) {
var match = text.match(/^.*?(\r\n|\r|\n)/m);
this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
};
this.getNewLineCharacter = function() {
switch (this.$newLineMode) {
@@ -1143,17 +789,18 @@ var Document = function(text) {
case "unix":
return "\n";
default:
- return this.$autoNewLine;
+ return this.$autoNewLine || "\n";
}
};
- this.$autoNewLine = "\n";
+ this.$autoNewLine = "";
this.$newLineMode = "auto";
this.setNewLineMode = function(newLineMode) {
if (this.$newLineMode === newLineMode)
return;
this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
};
this.getNewLineMode = function() {
return this.$newLineMode;
@@ -1223,9 +870,10 @@ var Document = function(text) {
this._insertLines = function(row, lines) {
if (lines.length == 0)
return {row: row, column: 0};
- if (lines.length > 0xFFFF) {
- var end = this._insertLines(row, lines.slice(0xFFFF));
- lines = lines.slice(0, 0xFFFF);
+ while (lines.length > 20000) {
+ var end = this._insertLines(row, lines.slice(0, 20000));
+ lines = lines.slice(20000);
+ row = end.row;
}
var args = [row, 0];
@@ -1238,8 +886,8 @@ var Document = function(text) {
range: range,
lines: lines
};
- this._emit("change", { data: delta });
- return end || range.end;
+ this._signal("change", { data: delta });
+ return range.end;
};
this.insertNewLine = function(position) {
position = this.$clipPosition(position);
@@ -1258,7 +906,7 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
@@ -1281,11 +929,13 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: text
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
this.remove = function(range) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
range.start = this.$clipPosition(range.start);
range.end = this.$clipPosition(range.end);
@@ -1330,7 +980,7 @@ var Document = function(text) {
range: range,
text: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return range.start;
};
this.removeLines = function(firstRow, lastRow) {
@@ -1349,7 +999,7 @@ var Document = function(text) {
nl: this.getNewLineCharacter(),
lines: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return removed;
};
this.removeNewLine = function(row) {
@@ -1366,9 +1016,11 @@ var Document = function(text) {
range: range,
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
};
this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
if (text.length == 0 && range.isEmpty())
return range.start;
if (text == this.getTextRange(range))
@@ -1441,393 +1093,13 @@ var Document = function(text) {
exports.Document = Document;
});
-ace.define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-var comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function(startRow, startColumn, endRow, endColumn) {
- this.start = {
- row: startRow,
- column: startColumn
- };
-
- this.end = {
- row: endRow,
- column: endColumn
- };
-};
-
-(function() {
- this.isEqual = function(range) {
- return this.start.row === range.start.row &&
- this.end.row === range.end.row &&
- this.start.column === range.start.column &&
- this.end.column === range.end.column;
- };
- this.toString = function() {
- return ("Range: [" + this.start.row + "/" + this.start.column +
- "] -> [" + this.end.row + "/" + this.end.column + "]");
- };
-
- this.contains = function(row, column) {
- return this.compare(row, column) == 0;
- };
- this.compareRange = function(range) {
- var cmp,
- end = range.end,
- start = range.start;
-
- cmp = this.compare(end.row, end.column);
- if (cmp == 1) {
- cmp = this.compare(start.row, start.column);
- if (cmp == 1) {
- return 2;
- } else if (cmp == 0) {
- return 1;
- } else {
- return 0;
- }
- } else if (cmp == -1) {
- return -2;
- } else {
- cmp = this.compare(start.row, start.column);
- if (cmp == -1) {
- return -1;
- } else if (cmp == 1) {
- return 42;
- } else {
- return 0;
- }
- }
- };
- this.comparePoint = function(p) {
- return this.compare(p.row, p.column);
- };
- this.containsRange = function(range) {
- return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- };
- this.intersects = function(range) {
- var cmp = this.compareRange(range);
- return (cmp == -1 || cmp == 0 || cmp == 1);
- };
- this.isEnd = function(row, column) {
- return this.end.row == row && this.end.column == column;
- };
- this.isStart = function(row, column) {
- return this.start.row == row && this.start.column == column;
- };
- this.setStart = function(row, column) {
- if (typeof row == "object") {
- this.start.column = row.column;
- this.start.row = row.row;
- } else {
- this.start.row = row;
- this.start.column = column;
- }
- };
- this.setEnd = function(row, column) {
- if (typeof row == "object") {
- this.end.column = row.column;
- this.end.row = row.row;
- } else {
- this.end.row = row;
- this.end.column = column;
- }
- };
- this.inside = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column) || this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideStart = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideEnd = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.compare = function(row, column) {
- if (!this.isMultiLine()) {
- if (row === this.start.row) {
- return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
- };
- }
-
- if (row < this.start.row)
- return -1;
-
- if (row > this.end.row)
- return 1;
-
- if (this.start.row === row)
- return column >= this.start.column ? 0 : -1;
-
- if (this.end.row === row)
- return column <= this.end.column ? 0 : 1;
-
- return 0;
- };
- this.compareStart = function(row, column) {
- if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareEnd = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareInside = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.clipRows = function(firstRow, lastRow) {
- if (this.end.row > lastRow)
- var end = {row: lastRow + 1, column: 0};
- else if (this.end.row < firstRow)
- var end = {row: firstRow, column: 0};
-
- if (this.start.row > lastRow)
- var start = {row: lastRow + 1, column: 0};
- else if (this.start.row < firstRow)
- var start = {row: firstRow, column: 0};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
- this.extend = function(row, column) {
- var cmp = this.compare(row, column);
-
- if (cmp == 0)
- return this;
- else if (cmp == -1)
- var start = {row: row, column: column};
- else
- var end = {row: row, column: column};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.isEmpty = function() {
- return (this.start.row === this.end.row && this.start.column === this.end.column);
- };
- this.isMultiLine = function() {
- return (this.start.row !== this.end.row);
- };
- this.clone = function() {
- return Range.fromPoints(this.start, this.end);
- };
- this.collapseRows = function() {
- if (this.end.column == 0)
- return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
- else
- return new Range(this.start.row, 0, this.end.row, 0)
- };
- this.toScreenRange = function(session) {
- var screenPosStart = session.documentToScreenPosition(this.start);
- var screenPosEnd = session.documentToScreenPosition(this.end);
-
- return new Range(
- screenPosStart.row, screenPosStart.column,
- screenPosEnd.row, screenPosEnd.column
- );
- };
- this.moveBy = function(row, column) {
- this.start.row += row;
- this.start.column += column;
- this.end.row += row;
- this.end.column += column;
- };
-
-}).call(Range.prototype);
-Range.fromPoints = function(start, end) {
- return new Range(start.row, start.column, end.row, end.column);
-};
-Range.comparePoints = comparePoints;
-
-Range.comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-
-
-exports.Range = Range;
-});
-
-ace.define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
-var Anchor = exports.Anchor = function(doc, row, column) {
- this.$onChange = this.onChange.bind(this);
- this.attach(doc);
-
- if (typeof column == "undefined")
- this.setPosition(row.row, row.column);
- else
- this.setPosition(row, column);
+exports.last = function(a) {
+ return a[a.length - 1];
};
-(function() {
-
- oop.implement(this, EventEmitter);
- this.getPosition = function() {
- return this.$clipPositionToDocument(this.row, this.column);
- };
- this.getDocument = function() {
- return this.document;
- };
- this.onChange = function(e) {
- var delta = e.data;
- var range = delta.range;
-
- if (range.start.row == range.end.row && range.start.row != this.row)
- return;
-
- if (range.start.row > this.row)
- return;
-
- if (range.start.row == this.row && range.start.column > this.column)
- return;
-
- var row = this.row;
- var column = this.column;
- var start = range.start;
- var end = range.end;
-
- if (delta.action === "insertText") {
- if (start.row === row && start.column <= column) {
- if (start.row === end.row) {
- column += end.column - start.column;
- } else {
- column -= start.column;
- row += end.row - start.row;
- }
- } else if (start.row !== end.row && start.row < row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "insertLines") {
- if (start.row <= row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "removeText") {
- if (start.row === row && start.column < column) {
- if (end.column >= column)
- column = start.column;
- else
- column = Math.max(0, column - (end.column - start.column));
-
- } else if (start.row !== end.row && start.row < row) {
- if (end.row === row)
- column = Math.max(0, column - end.column) + start.column;
- row -= (end.row - start.row);
- } else if (end.row === row) {
- row -= end.row - start.row;
- column = Math.max(0, column - end.column) + start.column;
- }
- } else if (delta.action == "removeLines") {
- if (start.row <= row) {
- if (end.row <= row)
- row -= end.row - start.row;
- else {
- row = start.row;
- column = 0;
- }
- }
- }
-
- this.setPosition(row, column, true);
- };
- this.setPosition = function(row, column, noClip) {
- var pos;
- if (noClip) {
- pos = {
- row: row,
- column: column
- };
- } else {
- pos = this.$clipPositionToDocument(row, column);
- }
-
- if (this.row == pos.row && this.column == pos.column)
- return;
-
- var old = {
- row: this.row,
- column: this.column
- };
-
- this.row = pos.row;
- this.column = pos.column;
- this._emit("change", {
- old: old,
- value: pos
- });
- };
- this.detach = function() {
- this.document.removeEventListener("change", this.$onChange);
- };
- this.attach = function(doc) {
- this.document = doc || this.document;
- this.document.on("change", this.$onChange);
- };
- this.$clipPositionToDocument = function(row, column) {
- var pos = {};
-
- if (row >= this.document.getLength()) {
- pos.row = Math.max(0, this.document.getLength() - 1);
- pos.column = this.document.getLine(pos.row).length;
- }
- else if (row < 0) {
- pos.row = 0;
- pos.column = 0;
- }
- else {
- pos.row = row;
- pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
- }
-
- if (column < 0)
- pos.column = 0;
-
- return pos;
- };
-
-}).call(Anchor.prototype);
-
-});
-
-ace.define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
exports.stringReverse = function(string) {
return string.split("").reverse().join("");
};
@@ -1874,18 +1146,24 @@ exports.copyArray = function(array){
return copy;
};
-exports.deepCopy = function (obj) {
- if (typeof obj != "object") {
+exports.deepCopy = function deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
}
+ var cons = obj.constructor;
+ if (cons === RegExp)
+ return obj;
- var copy = obj.constructor();
+ copy = cons();
for (var key in obj) {
- if (typeof obj[key] == "object") {
- copy[key] = this.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
+ copy[key] = deepCopy(obj[key]);
}
return copy;
};
@@ -1935,7 +1213,6 @@ exports.getMatchOffsets = function(string, regExp) {
return matches;
};
exports.deferredCall = function(fcn) {
-
var timer = null;
var callback = function() {
timer = null;
@@ -1961,6 +1238,10 @@ exports.deferredCall = function(fcn) {
timer = null;
return deferred;
};
+
+ deferred.isPending = function() {
+ return timer;
+ };
return deferred;
};
@@ -1974,15 +1255,15 @@ exports.delayedCall = function(fcn, defaultTimeout) {
};
var _self = function(timeout) {
- timer && clearTimeout(timer);
- timer = setTimeout(callback, timeout || defaultTimeout);
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
- _self.delay = _self;
- _self.schedule = function(timeout) {
- if (timer == null)
- timer = setTimeout(callback, timeout || 0);
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
+ _self.schedule = _self;
_self.call = function() {
this.cancel();
@@ -2002,9 +1283,56 @@ exports.delayedCall = function(fcn, defaultTimeout) {
};
});
+ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+
+var Mirror = exports.Mirror = function(sender) {
+ this.sender = sender;
+ var doc = this.doc = new Document("");
+
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ doc.applyDeltas(e.data);
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
-ace.define('ace/mode/php/php', ['require', 'exports', 'module' ], function(require, exports, module) {
+(function() {
+
+ this.$timeout = 500;
+
+ this.setTimeout = function(timeout) {
+ this.$timeout = timeout;
+ };
+
+ this.setValue = function(value) {
+ this.doc.setValue(value);
+ this.deferredUpdate.schedule(this.$timeout);
+ };
+
+ this.getValue = function(callbackId) {
+ this.sender.callback(this.doc.getValue(), callbackId);
+ };
+
+ this.onUpdate = function() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/php/php",["require","exports","module"], function(require, exports, module) {
var PHP = {Constants:{}};
@@ -2608,7 +1936,7 @@ PHP.Lexer = function( src, ini ) {
},
{
value: PHP.Constants.T_VARIABLE,
- re: /^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/
+ re: /^\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/
},
{
value: PHP.Constants.T_WHITESPACE,
@@ -2627,7 +1955,7 @@ PHP.Lexer = function( src, ini ) {
return result;
}
- var match = result.match( /(?:[^\\]|\\.)*[^\\]\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/g );
+ var match = result.match( /(?:[^\\]|\\.)*[^\\]\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/g );
if ( match !== null ) {
while( result.length > 0 ) {
@@ -2653,7 +1981,7 @@ PHP.Lexer = function( src, ini ) {
}
- match = result.match(/^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/);
+ match = result.match(/^\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/);
@@ -2667,7 +1995,7 @@ PHP.Lexer = function( src, ini ) {
result = result.substring( match[ 0 ].length );
- match = result.match(/^(\-\>)([a-zA-Z0-9_\x7f-\xff]*)/);
+ match = result.match(/^(\-\>)\s*([a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*)\s*(\()/);
if ( match !== null ) {
@@ -2681,6 +2009,9 @@ PHP.Lexer = function( src, ini ) {
match[ 2 ],
line
]);
+ if (match[3]) {
+ results.push(match[3]);
+ }
result = result.substring( match[ 0 ].length );
}
@@ -2692,34 +2023,52 @@ PHP.Lexer = function( src, ini ) {
var re;
if ( curlyOpen > 0) {
- re = /^([^\\\$"{}\]]|\\.)+/g;
+ re = /^([^\\\$"{}\]\(\)\->]|\\.)+/g;
} else {
- re = /^([^\\\$"{]|\\.|{[^\$])+/g;
+ re = /^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\uffff]))+/g;;
}
+ var type, match2;
while(( match = result.match( re )) !== null ) {
-
-
if (result.length === 1) {
throw new Error(match);
}
+
+ type = 0;
+
+ if( curlyOpen > 0 ){
+ if( match2 = match[0].match(/^[\[\]\;\:\?\(\)\!\.\,\>\<\=\+\-\/\*\|\&\{\}\@\^\%\$\~]/) ){
+ results.push(match2[0]);
+ }else{
+ type = PHP.Constants.T_STRING;
+ }
+ }else{
+ type = PHP.Constants.T_ENCAPSED_AND_WHITESPACE;
+ }
+
+ if( type ){
+ results.push([
+ parseInt(type, 10),
+ match[ 0 ].replace(/\n/g,"\\n").replace(/\r/g,""),
+ line
+ ]);
+ }
+ line += match[ 0 ].split('\n').length - 1;
+ result = result.substring( match[ 0 ].length );
+ }
+ if( curlyOpen > 0 && result.match(/^\->/) !== null ) {
results.push([
- parseInt(( curlyOpen > 0 ) ? PHP.Constants.T_CONSTANT_ENCAPSED_STRING : PHP.Constants.T_ENCAPSED_AND_WHITESPACE, 10),
- match[ 0 ].replace(/\n/g,"\\n").replace(/\r/g,""),
+ parseInt(PHP.Constants.T_OBJECT_OPERATOR, 10),
+ '->',
line
]);
-
- line += match[ 0 ].split('\n').length - 1;
-
- result = result.substring( match[ 0 ].length );
-
+ result = result.substring( 2 );
}
if( result.match(/^{\$/) !== null ) {
-
results.push([
parseInt(PHP.Constants.T_CURLY_OPEN, 10),
"{",
@@ -2730,7 +2079,7 @@ PHP.Lexer = function( src, ini ) {
}
if (len === result.length) {
- if ((match = result.match( /^(([^\\]|\\.)*?[^\\]\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)/g )) !== null) {
+ if ((match = result.match( /^(([^\\]|\\.)*?[^\\]\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*)/g )) !== null) {
return;
}
}
@@ -2740,7 +2089,7 @@ PHP.Lexer = function( src, ini ) {
return undefined;
} else {
- result = result.replace(/\n/g,"\\n").replace(/\r/g,"");
+ result = result.replace(/\r/g,"");
}
return result;
}
@@ -2751,7 +2100,7 @@ PHP.Lexer = function( src, ini ) {
},
{
value: PHP.Constants.T_STRING,
- re: /^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/
+ re: /^[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/
},
{
value: -1,
@@ -2783,7 +2132,7 @@ PHP.Lexer = function( src, ini ) {
if ( heredoc !== undefined ) {
- var regexp = new RegExp('([\\S\\s]*)(\\r\\n|\\n|\\r)(' + heredoc + ')(;|\\r\\n|\\n)',"i");
+ var regexp = new RegExp('([\\S\\s]*?)(\\r\\n|\\n|\\r)(' + heredoc + ')(;|\\r\\n|\\n)',"i");
@@ -6659,6 +6008,16 @@ PHP.Parser.prototype.Node_Expr_BitwiseOr = function() {
};
+PHP.Parser.prototype.Node_Expr_BitwiseXor = function() {
+ return {
+ type: "Node_Expr_BitwiseXor",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
PHP.Parser.prototype.Node_Expr_BitwiseNot = function() {
return {
type: "Node_Expr_BitwiseNot",
@@ -6845,3 +6204,744 @@ PHP.Parser.prototype.Node_Const = function() {
exports.PHP = PHP;
});
+
+ace.define("ace/mode/php_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/php/php"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var PHP = require("./php/php").PHP;
+
+var PhpWorker = exports.PhpWorker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(500);
+};
+
+oop.inherits(PhpWorker, Mirror);
+
+(function() {
+ this.setOptions = function(opts) {
+ this.inlinePhp = opts && opts.inline;
+ };
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ var errors = [];
+ if (this.inlinePhp)
+ value = "<?" + value + "?>";
+
+ var tokens = PHP.Lexer(value, {short_open_tag: 1});
+ try {
+ new PHP.Parser(tokens);
+ } catch(e) {
+ errors.push({
+ row: e.line - 1,
+ column: null,
+ text: e.message.charAt(0).toUpperCase() + e.message.substring(1),
+ type: "error"
+ });
+ }
+
+ this.sender.emit("annotate", errors);
+ };
+
+}).call(PhpWorker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ return bound;
+ };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ while (++i < length) {
+ if (i in self) {
+ fun.call(thisp, self[i], i, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ var i = 0;
+ var result;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i++];
+ break;
+ }
+ if (++i >= length) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ var result, i = length - 1;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i--];
+ break;
+ }
+ if (--i < 0) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+
+ var i = 0;
+ if (arguments.length > 1) {
+ i = toInteger(arguments[1]);
+ }
+ i = i >= 0 ? i : Math.max(0, length + i);
+ for (; i < length; i++) {
+ if (i in self && self[i] === sought) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+ var i = length - 1;
+ if (arguments.length > 1) {
+ i = Math.min(i, toInteger(arguments[1]));
+ }
+ i = i >= 0 ? i : length - Math.abs(i);
+ for (; i >= 0; i--) {
+ if (i in self && sought === self[i]) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Object.getPrototypeOf) {
+ Object.getPrototypeOf = function getPrototypeOf(object) {
+ return object.__proto__ || (
+ object.constructor ?
+ object.constructor.prototype :
+ prototypeOfObject
+ );
+ };
+}
+if (!Object.getOwnPropertyDescriptor) {
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+ "non-object: ";
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT + object);
+ if (!owns(object, property))
+ return;
+
+ var descriptor, getter, setter;
+ descriptor = { enumerable: true, configurable: true };
+ if (supportsAccessors) {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+
+ var getter = lookupGetter(object, property);
+ var setter = lookupSetter(object, property);
+ object.__proto__ = prototype;
+
+ if (getter || setter) {
+ if (getter) descriptor.get = getter;
+ if (setter) descriptor.set = setter;
+ return descriptor;
+ }
+ }
+ descriptor.value = object[property];
+ return descriptor;
+ };
+}
+if (!Object.getOwnPropertyNames) {
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ return Object.keys(object);
+ };
+}
+if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
+ Object.create = function create(prototype, properties) {
+ var object;
+ if (prototype === null) {
+ object = createEmpty();
+ } else {
+ if (typeof prototype != "object")
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+ var Type = function () {};
+ Type.prototype = prototype;
+ object = new Type();
+ object.__proto__ = prototype;
+ }
+ if (properties !== void 0)
+ Object.defineProperties(object, properties);
+ return object;
+ };
+}
+
+function doesDefinePropertyWork(object) {
+ try {
+ Object.defineProperty(object, "sentinel", {});
+ return "sentinel" in object;
+ } catch (exception) {
+ }
+}
+if (Object.defineProperty) {
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
+ doesDefinePropertyWork(document.createElement("div"));
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+ var definePropertyFallback = Object.defineProperty;
+ }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+ "on this javascript engine";
+
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+ if (definePropertyFallback) {
+ try {
+ return definePropertyFallback.call(Object, object, property, descriptor);
+ } catch (exception) {
+ }
+ }
+ if (owns(descriptor, "value")) {
+
+ if (supportsAccessors && (lookupGetter(object, property) ||
+ lookupSetter(object, property)))
+ {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+ delete object[property];
+ object[property] = descriptor.value;
+ object.__proto__ = prototype;
+ } else {
+ object[property] = descriptor.value;
+ }
+ } else {
+ if (!supportsAccessors)
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+ if (owns(descriptor, "get"))
+ defineGetter(object, property, descriptor.get);
+ if (owns(descriptor, "set"))
+ defineSetter(object, property, descriptor.set);
+ }
+
+ return object;
+ };
+}
+if (!Object.defineProperties) {
+ Object.defineProperties = function defineProperties(object, properties) {
+ for (var property in properties) {
+ if (owns(properties, property))
+ Object.defineProperty(object, property, properties[property]);
+ }
+ return object;
+ };
+}
+if (!Object.seal) {
+ Object.seal = function seal(object) {
+ return object;
+ };
+}
+if (!Object.freeze) {
+ Object.freeze = function freeze(object) {
+ return object;
+ };
+}
+try {
+ Object.freeze(function () {});
+} catch (exception) {
+ Object.freeze = (function freeze(freezeObject) {
+ return function freeze(object) {
+ if (typeof object == "function") {
+ return object;
+ } else {
+ return freezeObject(object);
+ }
+ };
+ })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+ Object.preventExtensions = function preventExtensions(object) {
+ return object;
+ };
+}
+if (!Object.isSealed) {
+ Object.isSealed = function isSealed(object) {
+ return false;
+ };
+}
+if (!Object.isFrozen) {
+ Object.isFrozen = function isFrozen(object) {
+ return false;
+ };
+}
+if (!Object.isExtensible) {
+ Object.isExtensible = function isExtensible(object) {
+ if (Object(object) === object) {
+ throw new TypeError(); // TODO message
+ }
+ var name = '';
+ while (owns(object, name)) {
+ name += '?';
+ }
+ object[name] = true;
+ var returnValue = owns(object, name);
+ delete object[name];
+ return returnValue;
+ };
+}
+if (!Object.keys) {
+ var hasDontEnumBug = true,
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ for (var key in {"toString": null}) {
+ hasDontEnumBug = false;
+ }
+
+ Object.keys = function keys(object) {
+
+ if (
+ (typeof object != "object" && typeof object != "function") ||
+ object === null
+ ) {
+ throw new TypeError("Object.keys called on a non-object");
+ }
+
+ var keys = [];
+ for (var name in object) {
+ if (owns(object, name)) {
+ keys.push(name);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+ var dontEnum = dontEnums[i];
+ if (owns(object, dontEnum)) {
+ keys.push(dontEnum);
+ }
+ }
+ }
+ return keys;
+ };
+
+}
+if (!Date.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ };
+}
+
+function toInteger(n) {
+ n = +n;
+ if (n !== n) { // isNaN
+ n = 0;
+ } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ }
+ return n;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/js/vendor/ace/src-noconflict/worker-xml.js b/js/vendor/ace/src-noconflict/worker-xml.js
new file mode 100755
index 0000000..5b098eb
--- /dev/null
+++ b/js/vendor/ace/src-noconflict/worker-xml.js
@@ -0,0 +1,3813 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document) {
+ return;
+}
+
+window.console = function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+};
+window.console.error =
+window.console.warn =
+window.console.log =
+window.console.trace = window.console;
+
+window.window = window;
+window.ace = window;
+
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
+window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = (base ? base + "/" : "") + moduleName;
+
+ while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+window.require = function(parentId, id) {
+ if (!id) {
+ id = parentId;
+ parentId = null;
+ }
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = window.normalizeModule(parentId, id);
+
+ var module = window.require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ var chunks = id.split("/");
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+ chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
+ var path = chunks.join("/") + ".js";
+
+ window.require.id = id;
+ importScripts(path);
+ return window.require(parentId, id);
+};
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = window.require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ deps = [];
+ id = window.require.id;
+ }
+
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject 'require', 'exports' and
+ // 'module' as dependencies, to provide CommonJS compatibility.
+ deps = ['require', 'exports', 'module'];
+
+ var req = function(childId) {
+ return window.require(id, childId);
+ };
+
+ window.require.modules[id] = {
+ exports: {},
+ factory: function() {
+ var module = this;
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch(dep) {
+ // Because 'require', 'exports' and 'module' aren't actual
+ // dependencies, we must handle them seperately.
+ case 'require': return req;
+ case 'exports': return module.exports;
+ case 'module': return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+window.define.amd = {};
+
+window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
+ require.tlns = topLevelNamespaces;
+};
+
+window.initSender = function initSender() {
+
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("ace/lib/oop");
+
+ var Sender = function() {};
+
+ (function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.callback = function(data, callbackId) {
+ postMessage({
+ type: "call",
+ id: callbackId,
+ data: data
+ });
+ };
+
+ this.emit = function(name, data) {
+ postMessage({
+ type: "event",
+ name: name,
+ data: data
+ });
+ };
+
+ }).call(Sender.prototype);
+
+ return new Sender();
+};
+
+var main = window.main = null;
+var sender = window.sender = null;
+
+window.onmessage = function(e) {
+ var msg = e.data;
+ if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ initBaseUrls(msg.tlns);
+ require("ace/lib/es5-shim");
+ sender = window.sender = initSender();
+ var clazz = require(msg.module)[msg.classname];
+ main = window.main = new clazz(sender);
+ }
+ else if (msg.event && sender) {
+ sender._signal(msg.event, msg.data);
+ }
+};
+})(this);
+
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.last = function(a) {
+ return a[a.length - 1];
+};
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ var result = '';
+ while (count > 0) {
+ if (count & 1)
+ result += string;
+
+ if (count >>= 1)
+ string += string;
+ }
+ return result;
+};
+
+var trimBeginRegexp = /^\s\s*/;
+var trimEndRegexp = /\s\s*$/;
+
+exports.stringTrimLeft = function (string) {
+ return string.replace(trimBeginRegexp, '');
+};
+
+exports.stringTrimRight = function (string) {
+ return string.replace(trimEndRegexp, '');
+};
+
+exports.copyObject = function(obj) {
+ var copy = {};
+ for (var key in obj) {
+ copy[key] = obj[key];
+ }
+ return copy;
+};
+
+exports.copyArray = function(array){
+ var copy = [];
+ for (var i=0, l=array.length; i<l; i++) {
+ if (array[i] && typeof array[i] == "object")
+ copy[i] = this.copyObject( array[i] );
+ else
+ copy[i] = array[i];
+ }
+ return copy;
+};
+
+exports.deepCopy = function deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
+ return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+ }
+ var cons = obj.constructor;
+ if (cons === RegExp)
+ return obj;
+
+ copy = cons();
+ for (var key in obj) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+};
+
+exports.arrayToMap = function(arr) {
+ var map = {};
+ for (var i=0; i<arr.length; i++) {
+ map[arr[i]] = 1;
+ }
+ return map;
+
+};
+
+exports.createMap = function(props) {
+ var map = Object.create(null);
+ for (var i in props) {
+ map[i] = props[i];
+ }
+ return map;
+};
+exports.arrayRemove = function(array, value) {
+ for (var i = 0; i <= array.length; i++) {
+ if (value === array[i]) {
+ array.splice(i, 1);
+ }
+ }
+};
+
+exports.escapeRegExp = function(str) {
+ return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
+};
+
+exports.escapeHTML = function(str) {
+ return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
+};
+
+exports.getMatchOffsets = function(string, regExp) {
+ var matches = [];
+
+ string.replace(regExp, function(str) {
+ matches.push({
+ offset: arguments[arguments.length-2],
+ length: str.length
+ });
+ });
+
+ return matches;
+};
+exports.deferredCall = function(fcn) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var deferred = function(timeout) {
+ deferred.cancel();
+ timer = setTimeout(callback, timeout || 0);
+ return deferred;
+ };
+
+ deferred.schedule = deferred;
+
+ deferred.call = function() {
+ this.cancel();
+ fcn();
+ return deferred;
+ };
+
+ deferred.cancel = function() {
+ clearTimeout(timer);
+ timer = null;
+ return deferred;
+ };
+
+ deferred.isPending = function() {
+ return timer;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+ _self.schedule = _self;
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+EventEmitter._emit =
+EventEmitter._dispatchEvent = function(eventName, e) {
+ this._eventRegistry || (this._eventRegistry = {});
+ this._defaultHandlers || (this._defaultHandlers = {});
+
+ var listeners = this._eventRegistry[eventName] || [];
+ var defaultHandler = this._defaultHandlers[eventName];
+ if (!listeners.length && !defaultHandler)
+ return;
+
+ if (typeof e != "object" || !e)
+ e = {};
+
+ if (!e.type)
+ e.type = eventName;
+ if (!e.stopPropagation)
+ e.stopPropagation = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+EventEmitter.removeListener =
+EventEmitter.removeEventListener = function(eventName, callback) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ return;
+
+ var index = listeners.indexOf(callback);
+ if (index !== -1)
+ listeners.splice(index, 1);
+};
+
+EventEmitter.removeAllListeners = function(eventName) {
+ if (this._eventRegistry) this._eventRegistry[eventName] = [];
+};
+
+exports.EventEmitter = EventEmitter;
+
+});
+
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+var Range = function(startRow, startColumn, endRow, endColumn) {
+ this.start = {
+ row: startRow,
+ column: startColumn
+ };
+
+ this.end = {
+ row: endRow,
+ column: endColumn
+ };
+};
+
+(function() {
+ this.isEqual = function(range) {
+ return this.start.row === range.start.row &&
+ this.end.row === range.end.row &&
+ this.start.column === range.start.column &&
+ this.end.column === range.end.column;
+ };
+ this.toString = function() {
+ return ("Range: [" + this.start.row + "/" + this.start.column +
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
+ };
+
+ this.contains = function(row, column) {
+ return this.compare(row, column) == 0;
+ };
+ this.compareRange = function(range) {
+ var cmp,
+ end = range.end,
+ start = range.start;
+
+ cmp = this.compare(end.row, end.column);
+ if (cmp == 1) {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == 1) {
+ return 2;
+ } else if (cmp == 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+ } else if (cmp == -1) {
+ return -2;
+ } else {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == -1) {
+ return -1;
+ } else if (cmp == 1) {
+ return 42;
+ } else {
+ return 0;
+ }
+ }
+ };
+ this.comparePoint = function(p) {
+ return this.compare(p.row, p.column);
+ };
+ this.containsRange = function(range) {
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
+ this.isEnd = function(row, column) {
+ return this.end.row == row && this.end.column == column;
+ };
+ this.isStart = function(row, column) {
+ return this.start.row == row && this.start.column == column;
+ };
+ this.setStart = function(row, column) {
+ if (typeof row == "object") {
+ this.start.column = row.column;
+ this.start.row = row.row;
+ } else {
+ this.start.row = row;
+ this.start.column = column;
+ }
+ };
+ this.setEnd = function(row, column) {
+ if (typeof row == "object") {
+ this.end.column = row.column;
+ this.end.row = row.row;
+ } else {
+ this.end.row = row;
+ this.end.column = column;
+ }
+ };
+ this.inside = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.insideStart = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.insideEnd = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+ this.compare = function(row, column) {
+ if (!this.isMultiLine()) {
+ if (row === this.start.row) {
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+ };
+ }
+
+ if (row < this.start.row)
+ return -1;
+
+ if (row > this.end.row)
+ return 1;
+
+ if (this.start.row === row)
+ return column >= this.start.column ? 0 : -1;
+
+ if (this.end.row === row)
+ return column <= this.end.column ? 0 : 1;
+
+ return 0;
+ };
+ this.compareStart = function(row, column) {
+ if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.compareEnd = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.compareInside = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+ this.clipRows = function(firstRow, lastRow) {
+ if (this.end.row > lastRow)
+ var end = {row: lastRow + 1, column: 0};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {row: firstRow, column: 0};
+
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+ this.extend = function(row, column) {
+ var cmp = this.compare(row, column);
+
+ if (cmp == 0)
+ return this;
+ else if (cmp == -1)
+ var start = {row: row, column: column};
+ else
+ var end = {row: row, column: column};
+
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+
+ this.isEmpty = function() {
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
+ };
+ this.isMultiLine = function() {
+ return (this.start.row !== this.end.row);
+ };
+ this.clone = function() {
+ return Range.fromPoints(this.start, this.end);
+ };
+ this.collapseRows = function() {
+ if (this.end.column == 0)
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+ else
+ return new Range(this.start.row, 0, this.end.row, 0)
+ };
+ this.toScreenRange = function(session) {
+ var screenPosStart = session.documentToScreenPosition(this.start);
+ var screenPosEnd = session.documentToScreenPosition(this.end);
+
+ return new Range(
+ screenPosStart.row, screenPosStart.column,
+ screenPosEnd.row, screenPosEnd.column
+ );
+ };
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+
+ if (range.start.row == range.end.row && range.start.row != this.row)
+ return;
+
+ if (range.start.row > this.row)
+ return;
+
+ if (range.start.row == this.row && range.start.column > this.column)
+ return;
+
+ var row = this.row;
+ var column = this.column;
+ var start = range.start;
+ var end = range.end;
+
+ if (delta.action === "insertText") {
+ if (start.row === row && start.column <= column) {
+ if (start.column === column && this.$insertRight) {
+ } else if (start.row === end.row) {
+ column += end.column - start.column;
+ } else {
+ column -= start.column;
+ row += end.row - start.row;
+ }
+ } else if (start.row !== end.row && start.row < row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "insertLines") {
+ if (start.row === row && column === 0 && this.$insertRight) {
+ }
+ else if (start.row <= row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "removeText") {
+ if (start.row === row && start.column < column) {
+ if (end.column >= column)
+ column = start.column;
+ else
+ column = Math.max(0, column - (end.column - start.column));
+
+ } else if (start.row !== end.row && start.row < row) {
+ if (end.row === row)
+ column = Math.max(0, column - end.column) + start.column;
+ row -= (end.row - start.row);
+ } else if (end.row === row) {
+ row -= end.row - start.row;
+ column = Math.max(0, column - end.column) + start.column;
+ }
+ } else if (delta.action == "removeLines") {
+ if (start.row <= row) {
+ if (end.row <= row)
+ row -= end.row - start.row;
+ else {
+ row = start.row;
+ column = 0;
+ }
+ }
+ }
+
+ this.setPosition(row, column, true);
+ };
+ this.setPosition = function(row, column, noClip) {
+ var pos;
+ if (noClip) {
+ pos = {
+ row: row,
+ column: column
+ };
+ } else {
+ pos = this.$clipPositionToDocument(row, column);
+ }
+
+ if (this.row == pos.row && this.column == pos.column)
+ return;
+
+ var old = {
+ row: this.row,
+ column: this.column
+ };
+
+ this.row = pos.row;
+ this.column = pos.column;
+ this._signal("change", {
+ old: old,
+ value: pos
+ });
+ };
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("change", this.$onChange);
+ };
+ this.$clipPositionToDocument = function(row, column) {
+ var pos = {};
+
+ if (row >= this.document.getLength()) {
+ pos.row = Math.max(0, this.document.getLength() - 1);
+ pos.column = this.document.getLine(pos.row).length;
+ }
+ else if (row < 0) {
+ pos.row = 0;
+ pos.column = 0;
+ }
+ else {
+ pos.row = row;
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+ }
+
+ if (column < 0)
+ pos.column = 0;
+
+ return pos;
+ };
+
+}).call(Anchor.prototype);
+
+});
+
+ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(text) {
+ this.$lines = [];
+ if (text.length === 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(text)) {
+ this._insertLines(0, text);
+ } else {
+ this.insert({row: 0, column:0}, text);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength();
+ this.remove(new Range(0, 0, len, this.getLine(len-1).length));
+ this.insert({row: 0, column:0}, text);
+ };
+ this.getValue = function() {
+ return this.getAllLines().join(this.getNewLineCharacter());
+ };
+ this.createAnchor = function(row, column) {
+ return new Anchor(this, row, column);
+ };
+ if ("aaa".split(/a/).length === 0)
+ this.$split = function(text) {
+ return text.replace(/\r\n|\r/g, "\n").split("\n");
+ };
+ else
+ this.$split = function(text) {
+ return text.split(/\r\n|\r|\n/);
+ };
+
+
+ this.$detectNewLine = function(text) {
+ var match = text.match(/^.*?(\r\n|\r|\n)/m);
+ this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine || "\n";
+ }
+ };
+
+ this.$autoNewLine = "";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineMode = function() {
+ return this.$newLineMode;
+ };
+ this.isNewLine = function(text) {
+ return (text == "\r\n" || text == "\r" || text == "\n");
+ };
+ this.getLine = function(row) {
+ return this.$lines[row] || "";
+ };
+ this.getLines = function(firstRow, lastRow) {
+ return this.$lines.slice(firstRow, lastRow + 1);
+ };
+ this.getAllLines = function() {
+ return this.getLines(0, this.getLength());
+ };
+ this.getLength = function() {
+ return this.$lines.length;
+ };
+ this.getTextRange = function(range) {
+ if (range.start.row == range.end.row) {
+ return this.getLine(range.start.row)
+ .substring(range.start.column, range.end.column);
+ }
+ var lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ return lines.join(this.getNewLineCharacter());
+ };
+
+ this.$clipPosition = function(position) {
+ var length = this.getLength();
+ if (position.row >= length) {
+ position.row = Math.max(0, length - 1);
+ position.column = this.getLine(length-1).length;
+ } else if (position.row < 0)
+ position.row = 0;
+ return position;
+ };
+ this.insert = function(position, text) {
+ if (!text || text.length === 0)
+ return position;
+
+ position = this.$clipPosition(position);
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ var lines = this.$split(text);
+ var firstLine = lines.splice(0, 1)[0];
+ var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
+
+ position = this.insertInLine(position, firstLine);
+ if (lastLine !== null) {
+ position = this.insertNewLine(position); // terminate first line
+ position = this._insertLines(position.row, lines);
+ position = this.insertInLine(position, lastLine || "");
+ }
+ return position;
+ };
+ this.insertLines = function(row, lines) {
+ if (row >= this.getLength())
+ return this.insert({row: row, column: 0}, "\n" + lines.join("\n"));
+ return this._insertLines(Math.max(row, 0), lines);
+ };
+ this._insertLines = function(row, lines) {
+ if (lines.length == 0)
+ return {row: row, column: 0};
+ while (lines.length > 20000) {
+ var end = this._insertLines(row, lines.slice(0, 20000));
+ lines = lines.slice(20000);
+ row = end.row;
+ }
+
+ var args = [row, 0];
+ args.push.apply(args, lines);
+ this.$lines.splice.apply(this.$lines, args);
+
+ var range = new Range(row, 0, row + lines.length, 0);
+ var delta = {
+ action: "insertLines",
+ range: range,
+ lines: lines
+ };
+ this._signal("change", { data: delta });
+ return range.end;
+ };
+ this.insertNewLine = function(position) {
+ position = this.$clipPosition(position);
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column);
+ this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
+
+ var end = {
+ row : position.row + 1,
+ column : 0
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: this.getNewLineCharacter()
+ };
+ this._signal("change", { data: delta });
+
+ return end;
+ };
+ this.insertInLine = function(position, text) {
+ if (text.length == 0)
+ return position;
+
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column) + text
+ + line.substring(position.column);
+
+ var end = {
+ row : position.row,
+ column : position.column + text.length
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: text
+ };
+ this._signal("change", { data: delta });
+
+ return end;
+ };
+ this.remove = function(range) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ range.start = this.$clipPosition(range.start);
+ range.end = this.$clipPosition(range.end);
+
+ if (range.isEmpty())
+ return range.start;
+
+ var firstRow = range.start.row;
+ var lastRow = range.end.row;
+
+ if (range.isMultiLine()) {
+ var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
+ var lastFullRow = lastRow - 1;
+
+ if (range.end.column > 0)
+ this.removeInLine(lastRow, 0, range.end.column);
+
+ if (lastFullRow >= firstFullRow)
+ this._removeLines(firstFullRow, lastFullRow);
+
+ if (firstFullRow != firstRow) {
+ this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
+ this.removeNewLine(range.start.row);
+ }
+ }
+ else {
+ this.removeInLine(firstRow, range.start.column, range.end.column);
+ }
+ return range.start;
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ if (startColumn == endColumn)
+ return;
+
+ var range = new Range(row, startColumn, row, endColumn);
+ var line = this.getLine(row);
+ var removed = line.substring(startColumn, endColumn);
+ var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
+ this.$lines.splice(row, 1, newLine);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: removed
+ };
+ this._signal("change", { data: delta });
+ return range.start;
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ if (firstRow < 0 || lastRow >= this.getLength())
+ return this.remove(new Range(firstRow, 0, lastRow + 1, 0));
+ return this._removeLines(firstRow, lastRow);
+ };
+
+ this._removeLines = function(firstRow, lastRow) {
+ var range = new Range(firstRow, 0, lastRow + 1, 0);
+ var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
+
+ var delta = {
+ action: "removeLines",
+ range: range,
+ nl: this.getNewLineCharacter(),
+ lines: removed
+ };
+ this._signal("change", { data: delta });
+ return removed;
+ };
+ this.removeNewLine = function(row) {
+ var firstLine = this.getLine(row);
+ var secondLine = this.getLine(row+1);
+
+ var range = new Range(row, firstLine.length, row+1, 0);
+ var line = firstLine + secondLine;
+
+ this.$lines.splice(row, 2, line);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: this.getNewLineCharacter()
+ };
+ this._signal("change", { data: delta });
+ };
+ this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length == 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ if (text) {
+ var end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ var delta = deltas[i];
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this.insertLines(range.start.row, delta.lines);
+ else if (delta.action == "insertText")
+ this.insert(range.start, delta.text);
+ else if (delta.action == "removeLines")
+ this._removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "removeText")
+ this.remove(range);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ var delta = deltas[i];
+
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this._removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "insertText")
+ this.remove(range);
+ else if (delta.action == "removeLines")
+ this._insertLines(range.start.row, delta.lines);
+ else if (delta.action == "removeText")
+ this.insert(range.start, delta.text);
+ }
+ };
+ this.indexToPosition = function(index, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
+ index -= lines[i].length + newlineLength;
+ if (index < 0)
+ return {row: i, column: index + lines[i].length + newlineLength};
+ }
+ return {row: l-1, column: lines[l-1].length};
+ };
+ this.positionToIndex = function(pos, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ var index = 0;
+ var row = Math.min(pos.row, lines.length);
+ for (var i = startRow || 0; i < row; ++i)
+ index += lines[i].length + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+
+var Mirror = exports.Mirror = function(sender) {
+ this.sender = sender;
+ var doc = this.doc = new Document("");
+
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ doc.applyDeltas(e.data);
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(function() {
+
+ this.$timeout = 500;
+
+ this.setTimeout = function(timeout) {
+ this.$timeout = timeout;
+ };
+
+ this.setValue = function(value) {
+ this.doc.setValue(value);
+ this.deferredUpdate.schedule(this.$timeout);
+ };
+
+ this.getValue = function(callbackId) {
+ this.sender.callback(this.doc.getValue(), callbackId);
+ };
+
+ this.onUpdate = function() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/xml/sax",["require","exports","module"], function(require, exports, module) {
+var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF
+var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\u00B7\u0300-\u036F\\ux203F-\u2040]");
+var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
+var S_TAG = 0;//tag name offerring
+var S_ATTR = 1;//attr name offerring
+var S_ATTR_S=2;//attr name end and space offer
+var S_EQ = 3;//=space?
+var S_V = 4;//attr value(no quot value only)
+var S_E = 5;//attr value end and no space(quot end)
+var S_S = 6;//(attr value end || tag end ) && (space offer)
+var S_C = 7;//closed el<el />
+
+function XMLReader(){
+
+}
+
+XMLReader.prototype = {
+ parse:function(source,defaultNSMap,entityMap){
+ var domBuilder = this.domBuilder;
+ domBuilder.startDocument();
+ _copy(defaultNSMap ,defaultNSMap = {})
+ parse(source,defaultNSMap,entityMap,
+ domBuilder,this.errorHandler);
+ domBuilder.endDocument();
+ }
+}
+function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){
+ function fixedFromCharCode(code) {
+ if (code > 0xffff) {
+ code -= 0x10000;
+ var surrogate1 = 0xd800 + (code >> 10)
+ , surrogate2 = 0xdc00 + (code & 0x3ff);
+
+ return String.fromCharCode(surrogate1, surrogate2);
+ } else {
+ return String.fromCharCode(code);
+ }
+ }
+ function entityReplacer(a){
+ var k = a.slice(1,-1);
+ if(k in entityMap){
+ return entityMap[k];
+ }else if(k.charAt(0) === '#'){
+ return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))
+ }else{
+ errorHandler.error('entity not found:'+a);
+ return a;
+ }
+ }
+ function appendText(end){//has some bugs
+ var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer);
+ locator&&position(start);
+ domBuilder.characters(xt,0,end-start);
+ start = end
+ }
+ function position(start,m){
+ while(start>=endPos && (m = linePattern.exec(source))){
+ startPos = m.index;
+ endPos = startPos + m[0].length;
+ locator.lineNumber++;
+ }
+ locator.columnNumber = start-startPos+1;
+ }
+ var startPos = 0;
+ var endPos = 0;
+ var linePattern = /.+(?:\r\n?|\n)|.*$/g
+ var locator = domBuilder.locator;
+
+ var parseStack = [{currentNSMap:defaultNSMapCopy}]
+ var closeMap = {};
+ var start = 0;
+ while(true){
+ var i = source.indexOf('<',start);
+ if(i<0){
+ if(!source.substr(start).match(/^\s*$/)){
+ var doc = domBuilder.document;
+ var text = doc.createTextNode(source.substr(start));
+ doc.appendChild(text);
+ domBuilder.currentElement = text;
+ }
+ return;
+ }
+ if(i>start){
+ appendText(i);
+ }
+ switch(source.charAt(i+1)){
+ case '/':
+ var end = source.indexOf('>',i+3);
+ var tagName = source.substring(i+2,end);
+ var config;
+ if (parseStack.length > 1) {
+ config = parseStack.pop();
+ } else {
+ errorHandler.fatalError("end tag name not found for: "+tagName);
+ break;
+ }
+ var localNSMap = config.localNSMap;
+
+ if(config.tagName != tagName){
+ errorHandler.fatalError("end tag name: " + tagName + " does not match the current start tagName: "+config.tagName );
+ }
+ domBuilder.endElement(config.uri,config.localName,tagName);
+ if(localNSMap){
+ for(var prefix in localNSMap){
+ domBuilder.endPrefixMapping(prefix) ;
+ }
+ }
+ end++;
+ break;
+ case '?':// <?...?>
+ locator&&position(i);
+ end = parseInstruction(source,i,domBuilder);
+ break;
+ case '!':// <!doctype,<![CDATA,<!--
+ locator&&position(i);
+ end = parseDCC(source,i,domBuilder,errorHandler);
+ break;
+ default:
+ try{
+ locator&&position(i);
+
+ var el = new ElementAttributes();
+ var end = parseElementStartPart(source,i,el,entityReplacer,errorHandler);
+ var len = el.length;
+ if(len && locator){
+ var backup = copyLocator(locator,{});
+ for(var i = 0;i<len;i++){
+ var a = el[i];
+ position(a.offset);
+ a.offset = copyLocator(locator,{});
+ }
+ copyLocator(backup,locator);
+ }
+ if(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){
+ el.closed = true;
+ if(!entityMap.nbsp){
+ errorHandler.warning('unclosed xml attribute');
+ }
+ }
+ appendElement(el,domBuilder,parseStack);
+
+
+ if(el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed){
+ end = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)
+ }else{
+ end++;
+ }
+ }catch(e){
+ errorHandler.error('element parse error: '+e);
+ end = -1;
+ }
+
+ }
+ if(end<0){
+ appendText(i+1);
+ }else{
+ start = end;
+ }
+ }
+}
+function copyLocator(f,t){
+ t.lineNumber = f.lineNumber;
+ t.columnNumber = f.columnNumber;
+ return t;
+
+}
+function parseElementStartPart(source,start,el,entityReplacer,errorHandler){
+ var attrName;
+ var value;
+ var p = ++start;
+ var s = S_TAG;//status
+ while(true){
+ var c = source.charAt(p);
+ switch(c){
+ case '=':
+ if(s === S_ATTR){//attrName
+ attrName = source.slice(start,p);
+ s = S_EQ;
+ }else if(s === S_ATTR_S){
+ s = S_EQ;
+ }else{
+ throw new Error('attribute equal must after attrName');
+ }
+ break;
+ case '\'':
+ case '"':
+ if(s === S_EQ){//equal
+ start = p+1;
+ p = source.indexOf(c,start)
+ if(p>0){
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ el.add(attrName,value,start-1);
+ s = S_E;
+ }else{
+ throw new Error('attribute value no end \''+c+'\' match');
+ }
+ }else if(s == S_V){
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ el.add(attrName,value,start);
+ errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!');
+ start = p+1;
+ s = S_E
+ }else{
+ throw new Error('attribute value must after "="');
+ }
+ break;
+ case '/':
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));
+ case S_E:
+ case S_S:
+ case S_C:
+ s = S_C;
+ el.closed = true;
+ case S_V:
+ case S_ATTR:
+ case S_ATTR_S:
+ break;
+ default:
+ throw new Error("attribute invalid close char('/')")
+ }
+ break;
+ case ''://end document
+ errorHandler.error('unexpected end of input');
+ case '>':
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));
+ case S_E:
+ case S_S:
+ case S_C:
+ break;//normal
+ case S_V://Compatible state
+ case S_ATTR:
+ value = source.slice(start,p);
+ if(value.slice(-1) === '/'){
+ el.closed = true;
+ value = value.slice(0,-1)
+ }
+ case S_ATTR_S:
+ if(s === S_ATTR_S){
+ value = attrName;
+ }
+ if(s == S_V){
+ errorHandler.warning('attribute "'+value+'" missed quot(")!!');
+ el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start)
+ }else{
+ errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!')
+ el.add(value,value,start)
+ }
+ break;
+ case S_EQ:
+ throw new Error('attribute value missed!!');
+ }
+ return p;
+ case '\u0080':
+ c = ' ';
+ default:
+ if(c<= ' '){//space
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));//tagName
+ s = S_S;
+ break;
+ case S_ATTR:
+ attrName = source.slice(start,p)
+ s = S_ATTR_S;
+ break;
+ case S_V:
+ var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ errorHandler.warning('attribute "'+value+'" missed quot(")!!');
+ el.add(attrName,value,start)
+ case S_E:
+ s = S_S;
+ break;
+ }
+ }else{//not space
+ switch(s){
+ case S_ATTR_S:
+ errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!')
+ el.add(attrName,attrName,start);
+ start = p;
+ s = S_ATTR;
+ break;
+ case S_E:
+ errorHandler.warning('attribute space is required"'+attrName+'"!!')
+ case S_S:
+ s = S_ATTR;
+ start = p;
+ break;
+ case S_EQ:
+ s = S_V;
+ start = p;
+ break;
+ case S_C:
+ throw new Error("elements closed character '/' and '>' must be connected to");
+ }
+ }
+ }
+ p++;
+ }
+}
+function appendElement(el,domBuilder,parseStack){
+ var tagName = el.tagName;
+ var localNSMap = null;
+ var currentNSMap = parseStack[parseStack.length-1].currentNSMap;
+ var i = el.length;
+ while(i--){
+ var a = el[i];
+ var qName = a.qName;
+ var value = a.value;
+ var nsp = qName.indexOf(':');
+ if(nsp>0){
+ var prefix = a.prefix = qName.slice(0,nsp);
+ var localName = qName.slice(nsp+1);
+ var nsPrefix = prefix === 'xmlns' && localName
+ }else{
+ localName = qName;
+ prefix = null
+ nsPrefix = qName === 'xmlns' && ''
+ }
+ a.localName = localName ;
+ if(nsPrefix !== false){//hack!!
+ if(localNSMap == null){
+ localNSMap = {}
+ _copy(currentNSMap,currentNSMap={})
+ }
+ currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
+ a.uri = 'http://www.w3.org/2000/xmlns/'
+ domBuilder.startPrefixMapping(nsPrefix, value)
+ }
+ }
+ var i = el.length;
+ while(i--){
+ a = el[i];
+ var prefix = a.prefix;
+ if(prefix){//no prefix attribute has no namespace
+ if(prefix === 'xml'){
+ a.uri = 'http://www.w3.org/XML/1998/namespace';
+ }if(prefix !== 'xmlns'){
+ a.uri = currentNSMap[prefix]
+ }
+ }
+ }
+ var nsp = tagName.indexOf(':');
+ if(nsp>0){
+ prefix = el.prefix = tagName.slice(0,nsp);
+ localName = el.localName = tagName.slice(nsp+1);
+ }else{
+ prefix = null;//important!!
+ localName = el.localName = tagName;
+ }
+ var ns = el.uri = currentNSMap[prefix || ''];
+ domBuilder.startElement(ns,localName,tagName,el);
+ if(el.closed){
+ domBuilder.endElement(ns,localName,tagName);
+ if(localNSMap){
+ for(prefix in localNSMap){
+ domBuilder.endPrefixMapping(prefix)
+ }
+ }
+ }else{
+ el.currentNSMap = currentNSMap;
+ el.localNSMap = localNSMap;
+ parseStack.push(el);
+ }
+}
+function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){
+ if(/^(?:script|textarea)$/i.test(tagName)){
+ var elEndStart = source.indexOf('</'+tagName+'>',elStartEnd);
+ var text = source.substring(elStartEnd+1,elEndStart);
+ if(/[&<]/.test(text)){
+ if(/^script$/i.test(tagName)){
+ domBuilder.characters(text,0,text.length);
+ return elEndStart;
+ }//}else{//text area
+ text = text.replace(/&#?\w+;/g,entityReplacer);
+ domBuilder.characters(text,0,text.length);
+ return elEndStart;
+
+ }
+ }
+ return elStartEnd+1;
+}
+function fixSelfClosed(source,elStartEnd,tagName,closeMap){
+ var pos = closeMap[tagName];
+ if(pos == null){
+ pos = closeMap[tagName] = source.lastIndexOf('</'+tagName+'>')
+ }
+ return pos<elStartEnd;
+}
+function _copy(source,target){
+ for(var n in source){target[n] = source[n]}
+}
+function parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'
+ var next= source.charAt(start+2)
+ switch(next){
+ case '-':
+ if(source.charAt(start + 3) === '-'){
+ var end = source.indexOf('-->',start+4);
+ if(end>start){
+ domBuilder.comment(source,start+4,end-start-4);
+ return end+3;
+ }else{
+ errorHandler.error("Unclosed comment");
+ return -1;
+ }
+ }else{
+ return -1;
+ }
+ default:
+ if(source.substr(start+3,6) == 'CDATA['){
+ var end = source.indexOf(']]>',start+9);
+ domBuilder.startCDATA();
+ domBuilder.characters(source,start+9,end-start-9);
+ domBuilder.endCDATA()
+ return end+3;
+ }
+ var matchs = split(source,start);
+ var len = matchs.length;
+ if(len>1 && /!doctype/i.test(matchs[0][0])){
+ var name = matchs[1][0];
+ var pubid = len>3 && /^public$/i.test(matchs[2][0]) && matchs[3][0]
+ var sysid = len>4 && matchs[4][0];
+ var lastMatch = matchs[len-1]
+ domBuilder.startDTD(name,pubid && pubid.replace(/^(['"])(.*?)\1$/,'$2'),
+ sysid && sysid.replace(/^(['"])(.*?)\1$/,'$2'));
+ domBuilder.endDTD();
+
+ return lastMatch.index+lastMatch[0].length
+ }
+ }
+ return -1;
+}
+
+
+
+function parseInstruction(source,start,domBuilder){
+ var end = source.indexOf('?>',start);
+ if(end){
+ var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);
+ if(match){
+ var len = match[0].length;
+ domBuilder.processingInstruction(match[1], match[2]) ;
+ return end+2;
+ }else{//error
+ return -1;
+ }
+ }
+ return -1;
+}
+function ElementAttributes(source){
+
+}
+ElementAttributes.prototype = {
+ setTagName:function(tagName){
+ if(!tagNamePattern.test(tagName)){
+ throw new Error('invalid tagName:'+tagName)
+ }
+ this.tagName = tagName
+ },
+ add:function(qName,value,offset){
+ if(!tagNamePattern.test(qName)){
+ throw new Error('invalid attribute:'+qName)
+ }
+ this[this.length++] = {qName:qName,value:value,offset:offset}
+ },
+ length:0,
+ getLocalName:function(i){return this[i].localName},
+ getOffset:function(i){return this[i].offset},
+ getQName:function(i){return this[i].qName},
+ getURI:function(i){return this[i].uri},
+ getValue:function(i){return this[i].value}
+}
+
+
+
+
+function _set_proto_(thiz,parent){
+ thiz.__proto__ = parent;
+ return thiz;
+}
+if(!(_set_proto_({},_set_proto_.prototype) instanceof _set_proto_)){
+ _set_proto_ = function(thiz,parent){
+ function p(){};
+ p.prototype = parent;
+ p = new p();
+ for(parent in thiz){
+ p[parent] = thiz[parent];
+ }
+ return p;
+ }
+}
+
+function split(source,start){
+ var match;
+ var buf = [];
+ var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;
+ reg.lastIndex = start;
+ reg.exec(source);//skip <
+ while(match = reg.exec(source)){
+ buf.push(match);
+ if(match[1])return buf;
+ }
+}
+
+return XMLReader;
+});
+
+ace.define("ace/mode/xml/dom",["require","exports","module"], function(require, exports, module) {
+
+function copy(src,dest){
+ for(var p in src){
+ dest[p] = src[p];
+ }
+}
+function _extends(Class,Super){
+ var pt = Class.prototype;
+ if(Object.create){
+ var ppt = Object.create(Super.prototype)
+ pt.__proto__ = ppt;
+ }
+ if(!(pt instanceof Super)){
+ function t(){};
+ t.prototype = Super.prototype;
+ t = new t();
+ copy(pt,t);
+ Class.prototype = pt = t;
+ }
+ if(pt.constructor != Class){
+ if(typeof Class != 'function'){
+ console.error("unknow Class:"+Class)
+ }
+ pt.constructor = Class
+ }
+}
+var htmlns = 'http://www.w3.org/1999/xhtml' ;
+var NodeType = {}
+var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;
+var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;
+var TEXT_NODE = NodeType.TEXT_NODE = 3;
+var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;
+var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;
+var ENTITY_NODE = NodeType.ENTITY_NODE = 6;
+var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;
+var COMMENT_NODE = NodeType.COMMENT_NODE = 8;
+var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;
+var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;
+var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;
+var NOTATION_NODE = NodeType.NOTATION_NODE = 12;
+var ExceptionCode = {}
+var ExceptionMessage = {};
+var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1);
+var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
+var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
+var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
+var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
+var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
+var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
+var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
+var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
+var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
+var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
+var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
+var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
+var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
+var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15);
+
+
+function DOMException(code, message) {
+ if(message instanceof Error){
+ var error = message;
+ }else{
+ error = this;
+ Error.call(this, ExceptionMessage[code]);
+ this.message = ExceptionMessage[code];
+ if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
+ }
+ error.code = code;
+ if(message) this.message = this.message + ": " + message;
+ return error;
+};
+DOMException.prototype = Error.prototype;
+copy(ExceptionCode,DOMException)
+function NodeList() {
+};
+NodeList.prototype = {
+ length:0,
+ item: function(index) {
+ return this[index] || null;
+ }
+};
+function LiveNodeList(node,refresh){
+ this._node = node;
+ this._refresh = refresh
+ _updateLiveList(this);
+}
+function _updateLiveList(list){
+ var inc = list._node._inc || list._node.ownerDocument._inc;
+ if(list._inc != inc){
+ var ls = list._refresh(list._node);
+ __set__(list,'length',ls.length);
+ copy(ls,list);
+ list._inc = inc;
+ }
+}
+LiveNodeList.prototype.item = function(i){
+ _updateLiveList(this);
+ return this[i];
+}
+
+_extends(LiveNodeList,NodeList);
+function NamedNodeMap() {
+};
+
+function _findNodeIndex(list,node){
+ var i = list.length;
+ while(i--){
+ if(list[i] === node){return i}
+ }
+}
+
+function _addNamedNode(el,list,newAttr,oldAttr){
+ if(oldAttr){
+ list[_findNodeIndex(list,oldAttr)] = newAttr;
+ }else{
+ list[list.length++] = newAttr;
+ }
+ if(el){
+ newAttr.ownerElement = el;
+ var doc = el.ownerDocument;
+ if(doc){
+ oldAttr && _onRemoveAttribute(doc,el,oldAttr);
+ _onAddAttribute(doc,el,newAttr);
+ }
+ }
+}
+function _removeNamedNode(el,list,attr){
+ var i = _findNodeIndex(list,attr);
+ if(i>=0){
+ var lastIndex = list.length-1
+ while(i<lastIndex){
+ list[i] = list[++i]
+ }
+ list.length = lastIndex;
+ if(el){
+ var doc = el.ownerDocument;
+ if(doc){
+ _onRemoveAttribute(doc,el,attr);
+ attr.ownerElement = null;
+ }
+ }
+ }else{
+ throw DOMException(NOT_FOUND_ERR,new Error())
+ }
+}
+NamedNodeMap.prototype = {
+ length:0,
+ item:NodeList.prototype.item,
+ getNamedItem: function(key) {
+ var i = this.length;
+ while(i--){
+ var attr = this[i];
+ if(attr.nodeName == key){
+ return attr;
+ }
+ }
+ },
+ setNamedItem: function(attr) {
+ var el = attr.ownerElement;
+ if(el && el!=this._ownerElement){
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
+ }
+ var oldAttr = this.getNamedItem(attr.nodeName);
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
+ return oldAttr;
+ },
+ setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR
+ var el = attr.ownerElement, oldAttr;
+ if(el && el!=this._ownerElement){
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
+ }
+ oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
+ return oldAttr;
+ },
+ removeNamedItem: function(key) {
+ var attr = this.getNamedItem(key);
+ _removeNamedNode(this._ownerElement,this,attr);
+ return attr;
+
+
+ },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR
+ removeNamedItemNS:function(namespaceURI,localName){
+ var attr = this.getNamedItemNS(namespaceURI,localName);
+ _removeNamedNode(this._ownerElement,this,attr);
+ return attr;
+ },
+ getNamedItemNS: function(namespaceURI, localName) {
+ var i = this.length;
+ while(i--){
+ var node = this[i];
+ if(node.localName == localName && node.namespaceURI == namespaceURI){
+ return node;
+ }
+ }
+ return null;
+ }
+};
+function DOMImplementation(/* Object */ features) {
+ this._features = {};
+ if (features) {
+ for (var feature in features) {
+ this._features = features[feature];
+ }
+ }
+};
+
+DOMImplementation.prototype = {
+ hasFeature: function(/* string */ feature, /* string */ version) {
+ var versions = this._features[feature.toLowerCase()];
+ if (versions && (!version || version in versions)) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+ createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR
+ var doc = new Document();
+ doc.implementation = this;
+ doc.childNodes = new NodeList();
+ doc.doctype = doctype;
+ if(doctype){
+ doc.appendChild(doctype);
+ }
+ if(qualifiedName){
+ var root = doc.createElementNS(namespaceURI,qualifiedName);
+ doc.appendChild(root);
+ }
+ return doc;
+ },
+ createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR
+ var node = new DocumentType();
+ node.name = qualifiedName;
+ node.nodeName = qualifiedName;
+ node.publicId = publicId;
+ node.systemId = systemId;
+ return node;
+ }
+};
+
+function Node() {
+};
+
+Node.prototype = {
+ firstChild : null,
+ lastChild : null,
+ previousSibling : null,
+ nextSibling : null,
+ attributes : null,
+ parentNode : null,
+ childNodes : null,
+ ownerDocument : null,
+ nodeValue : null,
+ namespaceURI : null,
+ prefix : null,
+ localName : null,
+ insertBefore:function(newChild, refChild){//raises
+ return _insertBefore(this,newChild,refChild);
+ },
+ replaceChild:function(newChild, oldChild){//raises
+ this.insertBefore(newChild,oldChild);
+ if(oldChild){
+ this.removeChild(oldChild);
+ }
+ },
+ removeChild:function(oldChild){
+ return _removeChild(this,oldChild);
+ },
+ appendChild:function(newChild){
+ return this.insertBefore(newChild,null);
+ },
+ hasChildNodes:function(){
+ return this.firstChild != null;
+ },
+ cloneNode:function(deep){
+ return cloneNode(this.ownerDocument||this,this,deep);
+ },
+ normalize:function(){
+ var child = this.firstChild;
+ while(child){
+ var next = child.nextSibling;
+ if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){
+ this.removeChild(next);
+ child.appendData(next.data);
+ }else{
+ child.normalize();
+ child = next;
+ }
+ }
+ },
+ isSupported:function(feature, version){
+ return this.ownerDocument.implementation.hasFeature(feature,version);
+ },
+ hasAttributes:function(){
+ return this.attributes.length>0;
+ },
+ lookupPrefix:function(namespaceURI){
+ var el = this;
+ while(el){
+ var map = el._nsMap;
+ if(map){
+ for(var n in map){
+ if(map[n] == namespaceURI){
+ return n;
+ }
+ }
+ }
+ el = el.nodeType == 2?el.ownerDocument : el.parentNode;
+ }
+ return null;
+ },
+ lookupNamespaceURI:function(prefix){
+ var el = this;
+ while(el){
+ var map = el._nsMap;
+ if(map){
+ if(prefix in map){
+ return map[prefix] ;
+ }
+ }
+ el = el.nodeType == 2?el.ownerDocument : el.parentNode;
+ }
+ return null;
+ },
+ isDefaultNamespace:function(namespaceURI){
+ var prefix = this.lookupPrefix(namespaceURI);
+ return prefix == null;
+ }
+};
+
+
+function _xmlEncoder(c){
+ return c == '<' && '&lt;' ||
+ c == '>' && '&gt;' ||
+ c == '&' && '&amp;' ||
+ c == '"' && '&quot;' ||
+ '&#'+c.charCodeAt()+';'
+}
+
+
+copy(NodeType,Node);
+copy(NodeType,Node.prototype);
+function _visitNode(node,callback){
+ if(callback(node)){
+ return true;
+ }
+ if(node = node.firstChild){
+ do{
+ if(_visitNode(node,callback)){return true}
+ }while(node=node.nextSibling)
+ }
+}
+
+
+
+function Document(){
+}
+function _onAddAttribute(doc,el,newAttr){
+ doc && doc._inc++;
+ var ns = newAttr.namespaceURI ;
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
+ el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value
+ }
+}
+function _onRemoveAttribute(doc,el,newAttr,remove){
+ doc && doc._inc++;
+ var ns = newAttr.namespaceURI ;
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
+ delete el._nsMap[newAttr.prefix?newAttr.localName:'']
+ }
+}
+function _onUpdateChild(doc,el,newChild){
+ if(doc && doc._inc){
+ doc._inc++;
+ var cs = el.childNodes;
+ if(newChild){
+ cs[cs.length++] = newChild;
+ }else{
+ var child = el.firstChild;
+ var i = 0;
+ while(child){
+ cs[i++] = child;
+ child =child.nextSibling;
+ }
+ cs.length = i;
+ }
+ }
+}
+function _removeChild(parentNode,child){
+ var previous = child.previousSibling;
+ var next = child.nextSibling;
+ if(previous){
+ previous.nextSibling = next;
+ }else{
+ parentNode.firstChild = next
+ }
+ if(next){
+ next.previousSibling = previous;
+ }else{
+ parentNode.lastChild = previous;
+ }
+ _onUpdateChild(parentNode.ownerDocument,parentNode);
+ return child;
+}
+function _insertBefore(parentNode,newChild,nextChild){
+ var cp = newChild.parentNode;
+ if(cp){
+ cp.removeChild(newChild);//remove and update
+ }
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
+ var newFirst = newChild.firstChild;
+ if (newFirst == null) {
+ return newChild;
+ }
+ var newLast = newChild.lastChild;
+ }else{
+ newFirst = newLast = newChild;
+ }
+ var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;
+
+ newFirst.previousSibling = pre;
+ newLast.nextSibling = nextChild;
+
+
+ if(pre){
+ pre.nextSibling = newFirst;
+ }else{
+ parentNode.firstChild = newFirst;
+ }
+ if(nextChild == null){
+ parentNode.lastChild = newLast;
+ }else{
+ nextChild.previousSibling = newLast;
+ }
+ do{
+ newFirst.parentNode = parentNode;
+ }while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
+ _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);
+ if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {
+ newChild.firstChild = newChild.lastChild = null;
+ }
+ return newChild;
+}
+function _appendSingleChild(parentNode,newChild){
+ var cp = newChild.parentNode;
+ if(cp){
+ var pre = parentNode.lastChild;
+ cp.removeChild(newChild);//remove and update
+ var pre = parentNode.lastChild;
+ }
+ var pre = parentNode.lastChild;
+ newChild.parentNode = parentNode;
+ newChild.previousSibling = pre;
+ newChild.nextSibling = null;
+ if(pre){
+ pre.nextSibling = newChild;
+ }else{
+ parentNode.firstChild = newChild;
+ }
+ parentNode.lastChild = newChild;
+ _onUpdateChild(parentNode.ownerDocument,parentNode,newChild);
+ return newChild;
+}
+Document.prototype = {
+ nodeName : '#document',
+ nodeType : DOCUMENT_NODE,
+ doctype : null,
+ documentElement : null,
+ _inc : 1,
+
+ insertBefore : function(newChild, refChild){//raises
+ if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){
+ var child = newChild.firstChild;
+ while(child){
+ var next = child.nextSibling;
+ this.insertBefore(child,refChild);
+ child = next;
+ }
+ return newChild;
+ }
+ if(this.documentElement == null && newChild.nodeType == 1){
+ this.documentElement = newChild;
+ }
+
+ return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild;
+ },
+ removeChild : function(oldChild){
+ if(this.documentElement == oldChild){
+ this.documentElement = null;
+ }
+ return _removeChild(this,oldChild);
+ },
+ importNode : function(importedNode,deep){
+ return importNode(this,importedNode,deep);
+ },
+ getElementById : function(id){
+ var rtv = null;
+ _visitNode(this.documentElement,function(node){
+ if(node.nodeType == 1){
+ if(node.getAttribute('id') == id){
+ rtv = node;
+ return true;
+ }
+ }
+ })
+ return rtv;
+ },
+ createElement : function(tagName){
+ var node = new Element();
+ node.ownerDocument = this;
+ node.nodeName = tagName;
+ node.tagName = tagName;
+ node.childNodes = new NodeList();
+ var attrs = node.attributes = new NamedNodeMap();
+ attrs._ownerElement = node;
+ return node;
+ },
+ createDocumentFragment : function(){
+ var node = new DocumentFragment();
+ node.ownerDocument = this;
+ node.childNodes = new NodeList();
+ return node;
+ },
+ createTextNode : function(data){
+ var node = new Text();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createComment : function(data){
+ var node = new Comment();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createCDATASection : function(data){
+ var node = new CDATASection();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createProcessingInstruction : function(target,data){
+ var node = new ProcessingInstruction();
+ node.ownerDocument = this;
+ node.tagName = node.target = target;
+ node.nodeValue= node.data = data;
+ return node;
+ },
+ createAttribute : function(name){
+ var node = new Attr();
+ node.ownerDocument = this;
+ node.name = name;
+ node.nodeName = name;
+ node.localName = name;
+ node.specified = true;
+ return node;
+ },
+ createEntityReference : function(name){
+ var node = new EntityReference();
+ node.ownerDocument = this;
+ node.nodeName = name;
+ return node;
+ },
+ createElementNS : function(namespaceURI,qualifiedName){
+ var node = new Element();
+ var pl = qualifiedName.split(':');
+ var attrs = node.attributes = new NamedNodeMap();
+ node.childNodes = new NodeList();
+ node.ownerDocument = this;
+ node.nodeName = qualifiedName;
+ node.tagName = qualifiedName;
+ node.namespaceURI = namespaceURI;
+ if(pl.length == 2){
+ node.prefix = pl[0];
+ node.localName = pl[1];
+ }else{
+ node.localName = qualifiedName;
+ }
+ attrs._ownerElement = node;
+ return node;
+ },
+ createAttributeNS : function(namespaceURI,qualifiedName){
+ var node = new Attr();
+ var pl = qualifiedName.split(':');
+ node.ownerDocument = this;
+ node.nodeName = qualifiedName;
+ node.name = qualifiedName;
+ node.namespaceURI = namespaceURI;
+ node.specified = true;
+ if(pl.length == 2){
+ node.prefix = pl[0];
+ node.localName = pl[1];
+ }else{
+ node.localName = qualifiedName;
+ }
+ return node;
+ }
+};
+_extends(Document,Node);
+
+
+function Element() {
+ this._nsMap = {};
+};
+Element.prototype = {
+ nodeType : ELEMENT_NODE,
+ hasAttribute : function(name){
+ return this.getAttributeNode(name)!=null;
+ },
+ getAttribute : function(name){
+ var attr = this.getAttributeNode(name);
+ return attr && attr.value || '';
+ },
+ getAttributeNode : function(name){
+ return this.attributes.getNamedItem(name);
+ },
+ setAttribute : function(name, value){
+ var attr = this.ownerDocument.createAttribute(name);
+ attr.value = attr.nodeValue = "" + value;
+ this.setAttributeNode(attr)
+ },
+ removeAttribute : function(name){
+ var attr = this.getAttributeNode(name)
+ attr && this.removeAttributeNode(attr);
+ },
+ appendChild:function(newChild){
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
+ return this.insertBefore(newChild,null);
+ }else{
+ return _appendSingleChild(this,newChild);
+ }
+ },
+ setAttributeNode : function(newAttr){
+ return this.attributes.setNamedItem(newAttr);
+ },
+ setAttributeNodeNS : function(newAttr){
+ return this.attributes.setNamedItemNS(newAttr);
+ },
+ removeAttributeNode : function(oldAttr){
+ return this.attributes.removeNamedItem(oldAttr.nodeName);
+ },
+ removeAttributeNS : function(namespaceURI, localName){
+ var old = this.getAttributeNodeNS(namespaceURI, localName);
+ old && this.removeAttributeNode(old);
+ },
+
+ hasAttributeNS : function(namespaceURI, localName){
+ return this.getAttributeNodeNS(namespaceURI, localName)!=null;
+ },
+ getAttributeNS : function(namespaceURI, localName){
+ var attr = this.getAttributeNodeNS(namespaceURI, localName);
+ return attr && attr.value || '';
+ },
+ setAttributeNS : function(namespaceURI, qualifiedName, value){
+ var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);
+ attr.value = attr.nodeValue = "" + value;
+ this.setAttributeNode(attr)
+ },
+ getAttributeNodeNS : function(namespaceURI, localName){
+ return this.attributes.getNamedItemNS(namespaceURI, localName);
+ },
+
+ getElementsByTagName : function(tagName){
+ return new LiveNodeList(this,function(base){
+ var ls = [];
+ _visitNode(base,function(node){
+ if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){
+ ls.push(node);
+ }
+ });
+ return ls;
+ });
+ },
+ getElementsByTagNameNS : function(namespaceURI, localName){
+ return new LiveNodeList(this,function(base){
+ var ls = [];
+ _visitNode(base,function(node){
+ if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){
+ ls.push(node);
+ }
+ });
+ return ls;
+ });
+ }
+};
+Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
+Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
+
+
+_extends(Element,Node);
+function Attr() {
+};
+Attr.prototype.nodeType = ATTRIBUTE_NODE;
+_extends(Attr,Node);
+
+
+function CharacterData() {
+};
+CharacterData.prototype = {
+ data : '',
+ substringData : function(offset, count) {
+ return this.data.substring(offset, offset+count);
+ },
+ appendData: function(text) {
+ text = this.data+text;
+ this.nodeValue = this.data = text;
+ this.length = text.length;
+ },
+ insertData: function(offset,text) {
+ this.replaceData(offset,0,text);
+
+ },
+ appendChild:function(newChild){
+ throw new Error(ExceptionMessage[3])
+ return Node.prototype.appendChild.apply(this,arguments)
+ },
+ deleteData: function(offset, count) {
+ this.replaceData(offset,count,"");
+ },
+ replaceData: function(offset, count, text) {
+ var start = this.data.substring(0,offset);
+ var end = this.data.substring(offset+count);
+ text = start + text + end;
+ this.nodeValue = this.data = text;
+ this.length = text.length;
+ }
+}
+_extends(CharacterData,Node);
+function Text() {
+};
+Text.prototype = {
+ nodeName : "#text",
+ nodeType : TEXT_NODE,
+ splitText : function(offset) {
+ var text = this.data;
+ var newText = text.substring(offset);
+ text = text.substring(0, offset);
+ this.data = this.nodeValue = text;
+ this.length = text.length;
+ var newNode = this.ownerDocument.createTextNode(newText);
+ if(this.parentNode){
+ this.parentNode.insertBefore(newNode, this.nextSibling);
+ }
+ return newNode;
+ }
+}
+_extends(Text,CharacterData);
+function Comment() {
+};
+Comment.prototype = {
+ nodeName : "#comment",
+ nodeType : COMMENT_NODE
+}
+_extends(Comment,CharacterData);
+
+function CDATASection() {
+};
+CDATASection.prototype = {
+ nodeName : "#cdata-section",
+ nodeType : CDATA_SECTION_NODE
+}
+_extends(CDATASection,CharacterData);
+
+
+function DocumentType() {
+};
+DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
+_extends(DocumentType,Node);
+
+function Notation() {
+};
+Notation.prototype.nodeType = NOTATION_NODE;
+_extends(Notation,Node);
+
+function Entity() {
+};
+Entity.prototype.nodeType = ENTITY_NODE;
+_extends(Entity,Node);
+
+function EntityReference() {
+};
+EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
+_extends(EntityReference,Node);
+
+function DocumentFragment() {
+};
+DocumentFragment.prototype.nodeName = "#document-fragment";
+DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
+_extends(DocumentFragment,Node);
+
+
+function ProcessingInstruction() {
+}
+ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
+_extends(ProcessingInstruction,Node);
+function XMLSerializer(){}
+XMLSerializer.prototype.serializeToString = function(node){
+ var buf = [];
+ serializeToString(node,buf);
+ return buf.join('');
+}
+Node.prototype.toString =function(){
+ return XMLSerializer.prototype.serializeToString(this);
+}
+function serializeToString(node,buf){
+ switch(node.nodeType){
+ case ELEMENT_NODE:
+ var attrs = node.attributes;
+ var len = attrs.length;
+ var child = node.firstChild;
+ var nodeName = node.tagName;
+ var isHTML = htmlns === node.namespaceURI
+ buf.push('<',nodeName);
+ for(var i=0;i<len;i++){
+ serializeToString(attrs.item(i),buf,isHTML);
+ }
+ if(child || isHTML && !/^(?:meta|link|img|br|hr|input|button)$/i.test(nodeName)){
+ buf.push('>');
+ if(isHTML && /^script$/i.test(nodeName)){
+ if(child){
+ buf.push(child.data);
+ }
+ }else{
+ while(child){
+ serializeToString(child,buf);
+ child = child.nextSibling;
+ }
+ }
+ buf.push('</',nodeName,'>');
+ }else{
+ buf.push('/>');
+ }
+ return;
+ case DOCUMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ var child = node.firstChild;
+ while(child){
+ serializeToString(child,buf);
+ child = child.nextSibling;
+ }
+ return;
+ case ATTRIBUTE_NODE:
+ return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"');
+ case TEXT_NODE:
+ return buf.push(node.data.replace(/[<&]/g,_xmlEncoder));
+ case CDATA_SECTION_NODE:
+ return buf.push( '<![CDATA[',node.data,']]>');
+ case COMMENT_NODE:
+ return buf.push( "<!--",node.data,"-->");
+ case DOCUMENT_TYPE_NODE:
+ var pubid = node.publicId;
+ var sysid = node.systemId;
+ buf.push('<!DOCTYPE ',node.name);
+ if(pubid){
+ buf.push(' PUBLIC "',pubid);
+ if (sysid && sysid!='.') {
+ buf.push( '" "',sysid);
+ }
+ buf.push('">');
+ }else if(sysid && sysid!='.'){
+ buf.push(' SYSTEM "',sysid,'">');
+ }else{
+ var sub = node.internalSubset;
+ if(sub){
+ buf.push(" [",sub,"]");
+ }
+ buf.push(">");
+ }
+ return;
+ case PROCESSING_INSTRUCTION_NODE:
+ return buf.push( "<?",node.target," ",node.data,"?>");
+ case ENTITY_REFERENCE_NODE:
+ return buf.push( '&',node.nodeName,';');
+ default:
+ buf.push('??',node.nodeName);
+ }
+}
+function importNode(doc,node,deep){
+ var node2;
+ switch (node.nodeType) {
+ case ELEMENT_NODE:
+ node2 = node.cloneNode(false);
+ node2.ownerDocument = doc;
+ case DOCUMENT_FRAGMENT_NODE:
+ break;
+ case ATTRIBUTE_NODE:
+ deep = true;
+ break;
+ }
+ if(!node2){
+ node2 = node.cloneNode(false);//false
+ }
+ node2.ownerDocument = doc;
+ node2.parentNode = null;
+ if(deep){
+ var child = node.firstChild;
+ while(child){
+ node2.appendChild(importNode(doc,child,deep));
+ child = child.nextSibling;
+ }
+ }
+ return node2;
+}
+function cloneNode(doc,node,deep){
+ var node2 = new node.constructor();
+ for(var n in node){
+ var v = node[n];
+ if(typeof v != 'object' ){
+ if(v != node2[n]){
+ node2[n] = v;
+ }
+ }
+ }
+ if(node.childNodes){
+ node2.childNodes = new NodeList();
+ }
+ node2.ownerDocument = doc;
+ switch (node2.nodeType) {
+ case ELEMENT_NODE:
+ var attrs = node.attributes;
+ var attrs2 = node2.attributes = new NamedNodeMap();
+ var len = attrs.length
+ attrs2._ownerElement = node2;
+ for(var i=0;i<len;i++){
+ node2.setAttributeNode(cloneNode(doc,attrs.item(i),true));
+ }
+ break;;
+ case ATTRIBUTE_NODE:
+ deep = true;
+ }
+ if(deep){
+ var child = node.firstChild;
+ while(child){
+ node2.appendChild(cloneNode(doc,child,deep));
+ child = child.nextSibling;
+ }
+ }
+ return node2;
+}
+
+function __set__(object,key,value){
+ object[key] = value
+}
+try{
+ if(Object.defineProperty){
+ Object.defineProperty(LiveNodeList.prototype,'length',{
+ get:function(){
+ _updateLiveList(this);
+ return this.$$length;
+ }
+ });
+ Object.defineProperty(Node.prototype,'textContent',{
+ get:function(){
+ return getTextContent(this);
+ },
+ set:function(data){
+ switch(this.nodeType){
+ case 1:
+ case 11:
+ while(this.firstChild){
+ this.removeChild(this.firstChild);
+ }
+ if(data || String(data)){
+ this.appendChild(this.ownerDocument.createTextNode(data));
+ }
+ break;
+ default:
+ this.data = data;
+ this.value = value;
+ this.nodeValue = data;
+ }
+ }
+ })
+
+ function getTextContent(node){
+ switch(node.nodeType){
+ case 1:
+ case 11:
+ var buf = [];
+ node = node.firstChild;
+ while(node){
+ if(node.nodeType!==7 && node.nodeType !==8){
+ buf.push(getTextContent(node));
+ }
+ node = node.nextSibling;
+ }
+ return buf.join('');
+ default:
+ return node.nodeValue;
+ }
+ }
+ __set__ = function(object,key,value){
+ object['$$'+key] = value
+ }
+ }
+}catch(e){//ie8
+}
+
+return DOMImplementation;
+});
+
+ace.define("ace/mode/xml/dom-parser",["require","exports","module","ace/mode/xml/sax","ace/mode/xml/dom"], function(require, exports, module) {
+ 'use strict';
+
+ var XMLReader = require('./sax'),
+ DOMImplementation = require('./dom');
+
+function DOMParser(options){
+ this.options = options ||{locator:{}};
+
+}
+DOMParser.prototype.parseFromString = function(source,mimeType){
+ var options = this.options;
+ var sax = new XMLReader();
+ var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler
+ var errorHandler = options.errorHandler;
+ var locator = options.locator;
+ var defaultNSMap = options.xmlns||{};
+ var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"}
+ if(locator){
+ domBuilder.setDocumentLocator(locator)
+ }
+
+ sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);
+ sax.domBuilder = options.domBuilder || domBuilder;
+ if(/\/x?html?$/.test(mimeType)){
+ entityMap.nbsp = '\xa0';
+ entityMap.copy = '\xa9';
+ defaultNSMap['']= 'http://www.w3.org/1999/xhtml';
+ }
+ if(source){
+ sax.parse(source,defaultNSMap,entityMap);
+ }else{
+ sax.errorHandler.error("invalid document source");
+ }
+ return domBuilder.document;
+}
+function buildErrorHandler(errorImpl,domBuilder,locator){
+ if(!errorImpl){
+ if(domBuilder instanceof DOMHandler){
+ return domBuilder;
+ }
+ errorImpl = domBuilder ;
+ }
+ var errorHandler = {}
+ var isCallback = errorImpl instanceof Function;
+ locator = locator||{}
+ function build(key){
+ var fn = errorImpl[key];
+ if(!fn){
+ if(isCallback){
+ fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;
+ }else{
+ var i=arguments.length;
+ while(--i){
+ if(fn = errorImpl[arguments[i]]){
+ break;
+ }
+ }
+ }
+ }
+ errorHandler[key] = fn && function(msg){
+ fn(msg+_locator(locator), msg, locator);
+ }||function(){};
+ }
+ build('warning','warn');
+ build('error','warn','warning');
+ build('fatalError','warn','warning','error');
+ return errorHandler;
+}
+function DOMHandler() {
+ this.cdata = false;
+}
+function position(locator,node){
+ node.lineNumber = locator.lineNumber;
+ node.columnNumber = locator.columnNumber;
+}
+DOMHandler.prototype = {
+ startDocument : function() {
+ this.document = new DOMImplementation().createDocument(null, null, null);
+ if (this.locator) {
+ this.document.documentURI = this.locator.systemId;
+ }
+ },
+ startElement:function(namespaceURI, localName, qName, attrs) {
+ var doc = this.document;
+ var el = doc.createElementNS(namespaceURI, qName||localName);
+ var len = attrs.length;
+ appendElement(this, el);
+ this.currentElement = el;
+
+ this.locator && position(this.locator,el)
+ for (var i = 0 ; i < len; i++) {
+ var namespaceURI = attrs.getURI(i);
+ var value = attrs.getValue(i);
+ var qName = attrs.getQName(i);
+ var attr = doc.createAttributeNS(namespaceURI, qName);
+ if( attr.getOffset){
+ position(attr.getOffset(1),attr)
+ }
+ attr.value = attr.nodeValue = value;
+ el.setAttributeNode(attr)
+ }
+ },
+ endElement:function(namespaceURI, localName, qName) {
+ var current = this.currentElement
+ var tagName = current.tagName;
+ this.currentElement = current.parentNode;
+ },
+ startPrefixMapping:function(prefix, uri) {
+ },
+ endPrefixMapping:function(prefix) {
+ },
+ processingInstruction:function(target, data) {
+ var ins = this.document.createProcessingInstruction(target, data);
+ this.locator && position(this.locator,ins)
+ appendElement(this, ins);
+ },
+ ignorableWhitespace:function(ch, start, length) {
+ },
+ characters:function(chars, start, length) {
+ chars = _toString.apply(this,arguments)
+ if(this.currentElement && chars){
+ if (this.cdata) {
+ var charNode = this.document.createCDATASection(chars);
+ this.currentElement.appendChild(charNode);
+ } else {
+ var charNode = this.document.createTextNode(chars);
+ this.currentElement.appendChild(charNode);
+ }
+ this.locator && position(this.locator,charNode)
+ }
+ },
+ skippedEntity:function(name) {
+ },
+ endDocument:function() {
+ this.document.normalize();
+ },
+ setDocumentLocator:function (locator) {
+ if(this.locator = locator){// && !('lineNumber' in locator)){
+ locator.lineNumber = 0;
+ }
+ },
+ comment:function(chars, start, length) {
+ chars = _toString.apply(this,arguments)
+ var comm = this.document.createComment(chars);
+ this.locator && position(this.locator,comm)
+ appendElement(this, comm);
+ },
+
+ startCDATA:function() {
+ this.cdata = true;
+ },
+ endCDATA:function() {
+ this.cdata = false;
+ },
+
+ startDTD:function(name, publicId, systemId) {
+ var impl = this.document.implementation;
+ if (impl && impl.createDocumentType) {
+ var dt = impl.createDocumentType(name, publicId, systemId);
+ this.locator && position(this.locator,dt)
+ appendElement(this, dt);
+ }
+ },
+ warning:function(error) {
+ console.warn(error,_locator(this.locator));
+ },
+ error:function(error) {
+ console.error(error,_locator(this.locator));
+ },
+ fatalError:function(error) {
+ console.error(error,_locator(this.locator));
+ throw error;
+ }
+}
+function _locator(l){
+ if(l){
+ return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'
+ }
+}
+function _toString(chars,start,length){
+ if(typeof chars == 'string'){
+ return chars.substr(start,length)
+ }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)")
+ if(chars.length >= start+length || start){
+ return new java.lang.String(chars,start,length)+'';
+ }
+ return chars;
+ }
+}
+"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){
+ DOMHandler.prototype[key] = function(){return null}
+})
+function appendElement (hander,node) {
+ if (!hander.currentElement) {
+ hander.document.appendChild(node);
+ } else {
+ hander.currentElement.appendChild(node);
+ }
+}//appendChild and setAttributeNS are preformance key
+
+return {
+ DOMParser: DOMParser
+ };
+});
+
+ace.define("ace/mode/xml_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/xml/dom-parser"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var Mirror = require("../worker/mirror").Mirror;
+var DOMParser = require("./xml/dom-parser").DOMParser;
+
+var Worker = exports.Worker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(400);
+ this.context = null;
+};
+
+oop.inherits(Worker, Mirror);
+
+(function() {
+
+ this.setOptions = function(options) {
+ this.context = options.context;
+ };
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ if (!value)
+ return;
+ var parser = new DOMParser();
+ var errors = [];
+ parser.options.errorHandler = {
+ fatalError: function(fullMsg, errorMsg, locator) {
+ errors.push({
+ row: locator.lineNumber,
+ column: locator.columnNumber,
+ text: errorMsg,
+ type: "error"
+ });
+ },
+ error: function(fullMsg, errorMsg, locator) {
+ errors.push({
+ row: locator.lineNumber,
+ column: locator.columnNumber,
+ text: errorMsg,
+ type: "error"
+ });
+ },
+ warning: function(fullMsg, errorMsg, locator) {
+ errors.push({
+ row: locator.lineNumber,
+ column: locator.columnNumber,
+ text: errorMsg,
+ type: "warning"
+ });
+ }
+ };
+
+ parser.parseFromString(value);
+ this.sender.emit("error", errors);
+ };
+
+}).call(Worker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ return bound;
+ };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ while (++i < length) {
+ if (i in self) {
+ fun.call(thisp, self[i], i, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ var i = 0;
+ var result;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i++];
+ break;
+ }
+ if (++i >= length) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ var result, i = length - 1;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i--];
+ break;
+ }
+ if (--i < 0) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+
+ var i = 0;
+ if (arguments.length > 1) {
+ i = toInteger(arguments[1]);
+ }
+ i = i >= 0 ? i : Math.max(0, length + i);
+ for (; i < length; i++) {
+ if (i in self && self[i] === sought) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+ var i = length - 1;
+ if (arguments.length > 1) {
+ i = Math.min(i, toInteger(arguments[1]));
+ }
+ i = i >= 0 ? i : length - Math.abs(i);
+ for (; i >= 0; i--) {
+ if (i in self && sought === self[i]) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Object.getPrototypeOf) {
+ Object.getPrototypeOf = function getPrototypeOf(object) {
+ return object.__proto__ || (
+ object.constructor ?
+ object.constructor.prototype :
+ prototypeOfObject
+ );
+ };
+}
+if (!Object.getOwnPropertyDescriptor) {
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+ "non-object: ";
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT + object);
+ if (!owns(object, property))
+ return;
+
+ var descriptor, getter, setter;
+ descriptor = { enumerable: true, configurable: true };
+ if (supportsAccessors) {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+
+ var getter = lookupGetter(object, property);
+ var setter = lookupSetter(object, property);
+ object.__proto__ = prototype;
+
+ if (getter || setter) {
+ if (getter) descriptor.get = getter;
+ if (setter) descriptor.set = setter;
+ return descriptor;
+ }
+ }
+ descriptor.value = object[property];
+ return descriptor;
+ };
+}
+if (!Object.getOwnPropertyNames) {
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ return Object.keys(object);
+ };
+}
+if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
+ Object.create = function create(prototype, properties) {
+ var object;
+ if (prototype === null) {
+ object = createEmpty();
+ } else {
+ if (typeof prototype != "object")
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+ var Type = function () {};
+ Type.prototype = prototype;
+ object = new Type();
+ object.__proto__ = prototype;
+ }
+ if (properties !== void 0)
+ Object.defineProperties(object, properties);
+ return object;
+ };
+}
+
+function doesDefinePropertyWork(object) {
+ try {
+ Object.defineProperty(object, "sentinel", {});
+ return "sentinel" in object;
+ } catch (exception) {
+ }
+}
+if (Object.defineProperty) {
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
+ doesDefinePropertyWork(document.createElement("div"));
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+ var definePropertyFallback = Object.defineProperty;
+ }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+ "on this javascript engine";
+
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+ if (definePropertyFallback) {
+ try {
+ return definePropertyFallback.call(Object, object, property, descriptor);
+ } catch (exception) {
+ }
+ }
+ if (owns(descriptor, "value")) {
+
+ if (supportsAccessors && (lookupGetter(object, property) ||
+ lookupSetter(object, property)))
+ {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+ delete object[property];
+ object[property] = descriptor.value;
+ object.__proto__ = prototype;
+ } else {
+ object[property] = descriptor.value;
+ }
+ } else {
+ if (!supportsAccessors)
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+ if (owns(descriptor, "get"))
+ defineGetter(object, property, descriptor.get);
+ if (owns(descriptor, "set"))
+ defineSetter(object, property, descriptor.set);
+ }
+
+ return object;
+ };
+}
+if (!Object.defineProperties) {
+ Object.defineProperties = function defineProperties(object, properties) {
+ for (var property in properties) {
+ if (owns(properties, property))
+ Object.defineProperty(object, property, properties[property]);
+ }
+ return object;
+ };
+}
+if (!Object.seal) {
+ Object.seal = function seal(object) {
+ return object;
+ };
+}
+if (!Object.freeze) {
+ Object.freeze = function freeze(object) {
+ return object;
+ };
+}
+try {
+ Object.freeze(function () {});
+} catch (exception) {
+ Object.freeze = (function freeze(freezeObject) {
+ return function freeze(object) {
+ if (typeof object == "function") {
+ return object;
+ } else {
+ return freezeObject(object);
+ }
+ };
+ })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+ Object.preventExtensions = function preventExtensions(object) {
+ return object;
+ };
+}
+if (!Object.isSealed) {
+ Object.isSealed = function isSealed(object) {
+ return false;
+ };
+}
+if (!Object.isFrozen) {
+ Object.isFrozen = function isFrozen(object) {
+ return false;
+ };
+}
+if (!Object.isExtensible) {
+ Object.isExtensible = function isExtensible(object) {
+ if (Object(object) === object) {
+ throw new TypeError(); // TODO message
+ }
+ var name = '';
+ while (owns(object, name)) {
+ name += '?';
+ }
+ object[name] = true;
+ var returnValue = owns(object, name);
+ delete object[name];
+ return returnValue;
+ };
+}
+if (!Object.keys) {
+ var hasDontEnumBug = true,
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ for (var key in {"toString": null}) {
+ hasDontEnumBug = false;
+ }
+
+ Object.keys = function keys(object) {
+
+ if (
+ (typeof object != "object" && typeof object != "function") ||
+ object === null
+ ) {
+ throw new TypeError("Object.keys called on a non-object");
+ }
+
+ var keys = [];
+ for (var name in object) {
+ if (owns(object, name)) {
+ keys.push(name);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+ var dontEnum = dontEnums[i];
+ if (owns(object, dontEnum)) {
+ keys.push(dontEnum);
+ }
+ }
+ }
+ return keys;
+ };
+
+}
+if (!Date.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ };
+}
+
+function toInteger(n) {
+ n = +n;
+ if (n !== n) { // isNaN
+ n = 0;
+ } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ }
+ return n;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/js/vendor/ace/src-noconflict/worker-xquery.js b/js/vendor/ace/src-noconflict/worker-xquery.js
index 9c282bf..ee38231 100644..100755
--- a/js/vendor/ace/src-noconflict/worker-xquery.js
+++ b/js/vendor/ace/src-noconflict/worker-xquery.js
@@ -16,18 +16,30 @@ window.console.trace = window.console;
window.window = window;
window.ace = window;
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
if (moduleName.indexOf("!") !== -1) {
var chunks = moduleName.split("!");
- return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
}
+ // normalize relative requires
if (moduleName.charAt(0) == ".") {
var base = parentId.split("/").slice(0, -1).join("/");
- moduleName = base + "/" + moduleName;
+ moduleName = (base ? base + "/" : "") + moduleName;
while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
var previous = moduleName;
- moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
@@ -36,15 +48,15 @@ window.normalizeModule = function(parentId, moduleName) {
window.require = function(parentId, id) {
if (!id) {
- id = parentId
+ id = parentId;
parentId = null;
}
if (!id.charAt)
throw new Error("worker.js require() accepts only (parentId, id) as arguments");
- id = normalizeModule(parentId, id);
+ id = window.normalizeModule(parentId, id);
- var module = require.modules[id];
+ var module = window.require.modules[id];
if (module) {
if (!module.initialized) {
module.initialized = true;
@@ -54,56 +66,80 @@ window.require = function(parentId, id) {
}
var chunks = id.split("/");
- chunks[0] = require.tlns[chunks[0]] || chunks[0];
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+ chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
var path = chunks.join("/") + ".js";
- require.id = id;
+ window.require.id = id;
importScripts(path);
- return require(parentId, id);
+ return window.require(parentId, id);
};
-
-require.modules = {};
-require.tlns = {};
+window.require.modules = {};
+window.require.tlns = {};
window.define = function(id, deps, factory) {
if (arguments.length == 2) {
factory = deps;
if (typeof id != "string") {
deps = id;
- id = require.id;
+ id = window.require.id;
}
} else if (arguments.length == 1) {
factory = id;
- id = require.id;
+ deps = [];
+ id = window.require.id;
}
-
- if (id.indexOf("text!") === 0)
- return;
- var req = function(deps, factory) {
- return require(id, deps, factory);
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject 'require', 'exports' and
+ // 'module' as dependencies, to provide CommonJS compatibility.
+ deps = ['require', 'exports', 'module'];
+
+ var req = function(childId) {
+ return window.require(id, childId);
};
- require.modules[id] = {
+ window.require.modules[id] = {
exports: {},
factory: function() {
var module = this;
- var returnExports = factory(req, module.exports, module);
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch(dep) {
+ // Because 'require', 'exports' and 'module' aren't actual
+ // dependencies, we must handle them seperately.
+ case 'require': return req;
+ case 'exports': return module.exports;
+ case 'module': return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
if (returnExports)
module.exports = returnExports;
return module;
}
};
};
+window.define.amd = {};
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
require.tlns = topLevelNamespaces;
-}
+};
window.initSender = function initSender() {
- var EventEmitter = require("ace/lib/event_emitter").EventEmitter;
- var oop = require("ace/lib/oop");
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("ace/lib/oop");
var Sender = function() {};
@@ -130,10 +166,10 @@ window.initSender = function initSender() {
}).call(Sender.prototype);
return new Sender();
-}
+};
-window.main = null;
-window.sender = null;
+var main = window.main = null;
+var sender = window.sender = null;
window.onmessage = function(e) {
var msg = e.data;
@@ -146,18 +182,46 @@ window.onmessage = function(e) {
else if (msg.init) {
initBaseUrls(msg.tlns);
require("ace/lib/es5-shim");
- sender = initSender();
+ sender = window.sender = initSender();
var clazz = require(msg.module)[msg.classname];
- main = new clazz(sender);
+ main = window.main = new clazz(sender);
}
else if (msg.event && sender) {
- sender._emit(msg.event, msg.data);
+ sender._signal(msg.event, msg.data);
}
};
})(this);
-ace.define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
var EventEmitter = {};
var stopPropagation = function() { this.propagationStopped = true; };
@@ -183,6 +247,7 @@ EventEmitter._dispatchEvent = function(eventName, e) {
if (!e.preventDefault)
e.preventDefault = preventDefault;
+ listeners = listeners.slice();
for (var i=0; i<listeners.length; i++) {
listeners[i](e, this);
if (e.propagationStopped)
@@ -198,7 +263,7 @@ EventEmitter._signal = function(eventName, e) {
var listeners = (this._eventRegistry || {})[eventName];
if (!listeners)
return;
-
+ listeners = listeners.slice();
for (var i=0; i<listeners.length; i++)
listeners[i](e, this);
};
@@ -281,825 +346,396 @@ exports.EventEmitter = EventEmitter;
});
-ace.define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
-exports.inherits = (function() {
- var tempCtor = function() {};
- return function(ctor, superCtor) {
- tempCtor.prototype = superCtor.prototype;
- ctor.super_ = superCtor.prototype;
- ctor.prototype = new tempCtor();
- ctor.prototype.constructor = ctor;
- };
-}());
-
-exports.mixin = function(obj, mixin) {
- for (var key in mixin) {
- obj[key] = mixin[key];
- }
- return obj;
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
};
+var Range = function(startRow, startColumn, endRow, endColumn) {
+ this.start = {
+ row: startRow,
+ column: startColumn
+ };
-exports.implement = function(proto, mixin) {
- exports.mixin(proto, mixin);
+ this.end = {
+ row: endRow,
+ column: endColumn
+ };
};
-});
-
-ace.define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-function Empty() {}
-
-if (!Function.prototype.bind) {
- Function.prototype.bind = function bind(that) { // .length is 1
- var target = this;
- if (typeof target != "function") {
- throw new TypeError("Function.prototype.bind called on incompatible " + target);
- }
- var args = slice.call(arguments, 1); // for normal call
- var bound = function () {
-
- if (this instanceof bound) {
-
- var result = target.apply(
- this,
- args.concat(slice.call(arguments))
- );
- if (Object(result) === result) {
- return result;
- }
- return this;
-
- } else {
- return target.apply(
- that,
- args.concat(slice.call(arguments))
- );
-
- }
-
- };
- if(target.prototype) {
- Empty.prototype = target.prototype;
- bound.prototype = new Empty();
- Empty.prototype = null;
- }
- return bound;
+(function() {
+ this.isEqual = function(range) {
+ return this.start.row === range.start.row &&
+ this.end.row === range.end.row &&
+ this.start.column === range.start.column &&
+ this.end.column === range.end.column;
+ };
+ this.toString = function() {
+ return ("Range: [" + this.start.row + "/" + this.start.column +
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
};
-}
-var call = Function.prototype.call;
-var prototypeOfArray = Array.prototype;
-var prototypeOfObject = Object.prototype;
-var slice = prototypeOfArray.slice;
-var _toString = call.bind(prototypeOfObject.toString);
-var owns = call.bind(prototypeOfObject.hasOwnProperty);
-var defineGetter;
-var defineSetter;
-var lookupGetter;
-var lookupSetter;
-var supportsAccessors;
-if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
- defineGetter = call.bind(prototypeOfObject.__defineGetter__);
- defineSetter = call.bind(prototypeOfObject.__defineSetter__);
- lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
- lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
-}
-if ([1,2].splice(0).length != 2) {
- if(function() { // test IE < 9 to splice bug - see issue #138
- function makeArray(l) {
- var a = new Array(l+2);
- a[0] = a[1] = 0;
- return a;
- }
- var array = [], lengthBefore;
-
- array.splice.apply(array, makeArray(20));
- array.splice.apply(array, makeArray(26));
-
- lengthBefore = array.length; //46
- array.splice(5, 0, "XXX"); // add one element
- lengthBefore + 1 == array.length
+ this.contains = function(row, column) {
+ return this.compare(row, column) == 0;
+ };
+ this.compareRange = function(range) {
+ var cmp,
+ end = range.end,
+ start = range.start;
- if (lengthBefore + 1 == array.length) {
- return true;// has right splice implementation without bugs
- }
- }()) {//IE 6/7
- var array_splice = Array.prototype.splice;
- Array.prototype.splice = function(start, deleteCount) {
- if (!arguments.length) {
- return [];
+ cmp = this.compare(end.row, end.column);
+ if (cmp == 1) {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == 1) {
+ return 2;
+ } else if (cmp == 0) {
+ return 1;
} else {
- return array_splice.apply(this, [
- start === void 0 ? 0 : start,
- deleteCount === void 0 ? (this.length - start) : deleteCount
- ].concat(slice.call(arguments, 2)))
- }
- };
- } else {//IE8
- Array.prototype.splice = function(pos, removeCount){
- var length = this.length;
- if (pos > 0) {
- if (pos > length)
- pos = length;
- } else if (pos == void 0) {
- pos = 0;
- } else if (pos < 0) {
- pos = Math.max(length + pos, 0);
+ return 0;
}
-
- if (!(pos+removeCount < length))
- removeCount = length - pos;
-
- var removed = this.slice(pos, pos+removeCount);
- var insert = slice.call(arguments, 2);
- var add = insert.length;
- if (pos === length) {
- if (add) {
- this.push.apply(this, insert);
- }
+ } else if (cmp == -1) {
+ return -2;
+ } else {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == -1) {
+ return -1;
+ } else if (cmp == 1) {
+ return 42;
} else {
- var remove = Math.min(removeCount, length - pos);
- var tailOldPos = pos + remove;
- var tailNewPos = tailOldPos + add - remove;
- var tailCount = length - tailOldPos;
- var lengthAfterRemove = length - remove;
-
- if (tailNewPos < tailOldPos) { // case A
- for (var i = 0; i < tailCount; ++i) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } else if (tailNewPos > tailOldPos) { // case B
- for (i = tailCount; i--; ) {
- this[tailNewPos+i] = this[tailOldPos+i];
- }
- } // else, add == remove (nothing to do)
-
- if (add && pos === lengthAfterRemove) {
- this.length = lengthAfterRemove; // truncate array
- this.push.apply(this, insert);
- } else {
- this.length = lengthAfterRemove + add; // reserves space
- for (i = 0; i < add; ++i) {
- this[pos+i] = insert[i];
- }
- }
- }
- return removed;
- };
- }
-}
-if (!Array.isArray) {
- Array.isArray = function isArray(obj) {
- return _toString(obj) == "[object Array]";
- };
-}
-var boxedString = Object("a"),
- splitString = boxedString[0] != "a" || !(0 in boxedString);
-
-if (!Array.prototype.forEach) {
- Array.prototype.forEach = function forEach(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- thisp = arguments[1],
- i = -1,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(); // TODO message
- }
-
- while (++i < length) {
- if (i in self) {
- fun.call(thisp, self[i], i, object);
+ return 0;
}
}
};
-}
-if (!Array.prototype.map) {
- Array.prototype.map = function map(fun /*, thisp*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = Array(length),
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self)
- result[i] = fun.call(thisp, self[i], i, object);
+ this.comparePoint = function(p) {
+ return this.compare(p.row, p.column);
+ };
+ this.containsRange = function(range) {
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+ };
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
+ this.isEnd = function(row, column) {
+ return this.end.row == row && this.end.column == column;
+ };
+ this.isStart = function(row, column) {
+ return this.start.row == row && this.start.column == column;
+ };
+ this.setStart = function(row, column) {
+ if (typeof row == "object") {
+ this.start.column = row.column;
+ this.start.row = row.row;
+ } else {
+ this.start.row = row;
+ this.start.column = column;
}
- return result;
};
-}
-if (!Array.prototype.filter) {
- Array.prototype.filter = function filter(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- result = [],
- value,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
+ this.setEnd = function(row, column) {
+ if (typeof row == "object") {
+ this.end.column = row.column;
+ this.end.row = row.row;
+ } else {
+ this.end.row = row;
+ this.end.column = column;
}
-
- for (var i = 0; i < length; i++) {
- if (i in self) {
- value = self[i];
- if (fun.call(thisp, value, i, object)) {
- result.push(value);
- }
+ };
+ this.inside = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
}
}
- return result;
+ return false;
};
-}
-if (!Array.prototype.every) {
- Array.prototype.every = function every(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && !fun.call(thisp, self[i], i, object)) {
+ this.insideStart = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column)) {
return false;
+ } else {
+ return true;
}
}
- return true;
+ return false;
};
-}
-if (!Array.prototype.some) {
- Array.prototype.some = function some(fun /*, thisp */) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0,
- thisp = arguments[1];
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
-
- for (var i = 0; i < length; i++) {
- if (i in self && fun.call(thisp, self[i], i, object)) {
+ this.insideEnd = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isStart(row, column)) {
+ return false;
+ } else {
return true;
}
}
return false;
};
-}
-if (!Array.prototype.reduce) {
- Array.prototype.reduce = function reduce(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
- }
- if (!length && arguments.length == 1) {
- throw new TypeError("reduce of empty array with no initial value");
+ this.compare = function(row, column) {
+ if (!this.isMultiLine()) {
+ if (row === this.start.row) {
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+ };
}
- var i = 0;
- var result;
- if (arguments.length >= 2) {
- result = arguments[1];
- } else {
- do {
- if (i in self) {
- result = self[i++];
- break;
- }
- if (++i >= length) {
- throw new TypeError("reduce of empty array with no initial value");
- }
- } while (true);
- }
+ if (row < this.start.row)
+ return -1;
- for (; i < length; i++) {
- if (i in self) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- }
+ if (row > this.end.row)
+ return 1;
- return result;
+ if (this.start.row === row)
+ return column >= this.start.column ? 0 : -1;
+
+ if (this.end.row === row)
+ return column <= this.end.column ? 0 : 1;
+
+ return 0;
};
-}
-if (!Array.prototype.reduceRight) {
- Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
- var object = toObject(this),
- self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- object,
- length = self.length >>> 0;
- if (_toString(fun) != "[object Function]") {
- throw new TypeError(fun + " is not a function");
+ this.compareStart = function(row, column) {
+ if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
}
- if (!length && arguments.length == 1) {
- throw new TypeError("reduceRight of empty array with no initial value");
+ };
+ this.compareEnd = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else {
+ return this.compare(row, column);
}
-
- var result, i = length - 1;
- if (arguments.length >= 2) {
- result = arguments[1];
+ };
+ this.compareInside = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else if (this.start.row == row && this.start.column == column) {
+ return -1;
} else {
- do {
- if (i in self) {
- result = self[i--];
- break;
- }
- if (--i < 0) {
- throw new TypeError("reduceRight of empty array with no initial value");
- }
- } while (true);
+ return this.compare(row, column);
}
+ };
+ this.clipRows = function(firstRow, lastRow) {
+ if (this.end.row > lastRow)
+ var end = {row: lastRow + 1, column: 0};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
- do {
- if (i in this) {
- result = fun.call(void 0, result, self[i], i, object);
- }
- } while (i--);
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {row: firstRow, column: 0};
- return result;
+ return Range.fromPoints(start || this.start, end || this.end);
};
-}
-if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
- Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
+ this.extend = function(row, column) {
+ var cmp = this.compare(row, column);
- if (!length) {
- return -1;
- }
+ if (cmp == 0)
+ return this;
+ else if (cmp == -1)
+ var start = {row: row, column: column};
+ else
+ var end = {row: row, column: column};
- var i = 0;
- if (arguments.length > 1) {
- i = toInteger(arguments[1]);
- }
- i = i >= 0 ? i : Math.max(0, length + i);
- for (; i < length; i++) {
- if (i in self && self[i] === sought) {
- return i;
- }
- }
- return -1;
+ return Range.fromPoints(start || this.start, end || this.end);
};
-}
-if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
- Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
- var self = splitString && _toString(this) == "[object String]" ?
- this.split("") :
- toObject(this),
- length = self.length >>> 0;
- if (!length) {
- return -1;
- }
- var i = length - 1;
- if (arguments.length > 1) {
- i = Math.min(i, toInteger(arguments[1]));
- }
- i = i >= 0 ? i : length - Math.abs(i);
- for (; i >= 0; i--) {
- if (i in self && sought === self[i]) {
- return i;
- }
- }
- return -1;
+ this.isEmpty = function() {
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
};
-}
-if (!Object.getPrototypeOf) {
- Object.getPrototypeOf = function getPrototypeOf(object) {
- return object.__proto__ || (
- object.constructor ?
- object.constructor.prototype :
- prototypeOfObject
+ this.isMultiLine = function() {
+ return (this.start.row !== this.end.row);
+ };
+ this.clone = function() {
+ return Range.fromPoints(this.start, this.end);
+ };
+ this.collapseRows = function() {
+ if (this.end.column == 0)
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+ else
+ return new Range(this.start.row, 0, this.end.row, 0)
+ };
+ this.toScreenRange = function(session) {
+ var screenPosStart = session.documentToScreenPosition(this.start);
+ var screenPosEnd = session.documentToScreenPosition(this.end);
+
+ return new Range(
+ screenPosStart.row, screenPosStart.column,
+ screenPosEnd.row, screenPosEnd.column
);
};
-}
-if (!Object.getOwnPropertyDescriptor) {
- var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
- "non-object: ";
- Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT + object);
- if (!owns(object, property))
- return;
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
- var descriptor, getter, setter;
- descriptor = { enumerable: true, configurable: true };
- if (supportsAccessors) {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
- var getter = lookupGetter(object, property);
- var setter = lookupSetter(object, property);
- object.__proto__ = prototype;
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
- if (getter || setter) {
- if (getter) descriptor.get = getter;
- if (setter) descriptor.set = setter;
- return descriptor;
- }
- }
- descriptor.value = object[property];
- return descriptor;
- };
-}
-if (!Object.getOwnPropertyNames) {
- Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
- return Object.keys(object);
- };
-}
-if (!Object.create) {
- var createEmpty;
- if (Object.prototype.__proto__ === null) {
- createEmpty = function () {
- return { "__proto__": null };
- };
- } else {
- createEmpty = function () {
- var empty = {};
- for (var i in empty)
- empty[i] = null;
- empty.constructor =
- empty.hasOwnProperty =
- empty.propertyIsEnumerable =
- empty.isPrototypeOf =
- empty.toLocaleString =
- empty.toString =
- empty.valueOf =
- empty.__proto__ = null;
- return empty;
- }
- }
- Object.create = function create(prototype, properties) {
- var object;
- if (prototype === null) {
- object = createEmpty();
- } else {
- if (typeof prototype != "object")
- throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
- var Type = function () {};
- Type.prototype = prototype;
- object = new Type();
- object.__proto__ = prototype;
- }
- if (properties !== void 0)
- Object.defineProperties(object, properties);
- return object;
- };
-}
+exports.Range = Range;
+});
-function doesDefinePropertyWork(object) {
- try {
- Object.defineProperty(object, "sentinel", {});
- return "sentinel" in object;
- } catch (exception) {
- }
-}
-if (Object.defineProperty) {
- var definePropertyWorksOnObject = doesDefinePropertyWork({});
- var definePropertyWorksOnDom = typeof document == "undefined" ||
- doesDefinePropertyWork(document.createElement("div"));
- if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
- var definePropertyFallback = Object.defineProperty;
- }
-}
+ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
-if (!Object.defineProperty || definePropertyFallback) {
- var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
- var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
- var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
- "on this javascript engine";
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
- Object.defineProperty = function defineProperty(object, property, descriptor) {
- if ((typeof object != "object" && typeof object != "function") || object === null)
- throw new TypeError(ERR_NON_OBJECT_TARGET + object);
- if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
- throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
- if (definePropertyFallback) {
- try {
- return definePropertyFallback.call(Object, object, property, descriptor);
- } catch (exception) {
- }
- }
- if (owns(descriptor, "value")) {
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
- if (supportsAccessors && (lookupGetter(object, property) ||
- lookupSetter(object, property)))
- {
- var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
- delete object[property];
- object[property] = descriptor.value;
- object.__proto__ = prototype;
- } else {
- object[property] = descriptor.value;
- }
- } else {
- if (!supportsAccessors)
- throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
- if (owns(descriptor, "get"))
- defineGetter(object, property, descriptor.get);
- if (owns(descriptor, "set"))
- defineSetter(object, property, descriptor.set);
- }
+(function() {
- return object;
- };
-}
-if (!Object.defineProperties) {
- Object.defineProperties = function defineProperties(object, properties) {
- for (var property in properties) {
- if (owns(properties, property))
- Object.defineProperty(object, property, properties[property]);
- }
- return object;
- };
-}
-if (!Object.seal) {
- Object.seal = function seal(object) {
- return object;
- };
-}
-if (!Object.freeze) {
- Object.freeze = function freeze(object) {
- return object;
- };
-}
-try {
- Object.freeze(function () {});
-} catch (exception) {
- Object.freeze = (function freeze(freezeObject) {
- return function freeze(object) {
- if (typeof object == "function") {
- return object;
- } else {
- return freezeObject(object);
- }
- };
- })(Object.freeze);
-}
-if (!Object.preventExtensions) {
- Object.preventExtensions = function preventExtensions(object) {
- return object;
- };
-}
-if (!Object.isSealed) {
- Object.isSealed = function isSealed(object) {
- return false;
- };
-}
-if (!Object.isFrozen) {
- Object.isFrozen = function isFrozen(object) {
- return false;
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
};
-}
-if (!Object.isExtensible) {
- Object.isExtensible = function isExtensible(object) {
- if (Object(object) === object) {
- throw new TypeError(); // TODO message
- }
- var name = '';
- while (owns(object, name)) {
- name += '?';
- }
- object[name] = true;
- var returnValue = owns(object, name);
- delete object[name];
- return returnValue;
+ this.getDocument = function() {
+ return this.document;
};
-}
-if (!Object.keys) {
- var hasDontEnumBug = true,
- dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor"
- ],
- dontEnumsLength = dontEnums.length;
+ this.$insertRight = false;
+ this.onChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
- for (var key in {"toString": null}) {
- hasDontEnumBug = false;
- }
+ if (range.start.row == range.end.row && range.start.row != this.row)
+ return;
- Object.keys = function keys(object) {
+ if (range.start.row > this.row)
+ return;
- if (
- (typeof object != "object" && typeof object != "function") ||
- object === null
- ) {
- throw new TypeError("Object.keys called on a non-object");
- }
+ if (range.start.row == this.row && range.start.column > this.column)
+ return;
- var keys = [];
- for (var name in object) {
- if (owns(object, name)) {
- keys.push(name);
+ var row = this.row;
+ var column = this.column;
+ var start = range.start;
+ var end = range.end;
+
+ if (delta.action === "insertText") {
+ if (start.row === row && start.column <= column) {
+ if (start.column === column && this.$insertRight) {
+ } else if (start.row === end.row) {
+ column += end.column - start.column;
+ } else {
+ column -= start.column;
+ row += end.row - start.row;
+ }
+ } else if (start.row !== end.row && start.row < row) {
+ row += end.row - start.row;
}
- }
+ } else if (delta.action === "insertLines") {
+ if (start.row === row && column === 0 && this.$insertRight) {
+ }
+ else if (start.row <= row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "removeText") {
+ if (start.row === row && start.column < column) {
+ if (end.column >= column)
+ column = start.column;
+ else
+ column = Math.max(0, column - (end.column - start.column));
- if (hasDontEnumBug) {
- for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
- var dontEnum = dontEnums[i];
- if (owns(object, dontEnum)) {
- keys.push(dontEnum);
+ } else if (start.row !== end.row && start.row < row) {
+ if (end.row === row)
+ column = Math.max(0, column - end.column) + start.column;
+ row -= (end.row - start.row);
+ } else if (end.row === row) {
+ row -= end.row - start.row;
+ column = Math.max(0, column - end.column) + start.column;
+ }
+ } else if (delta.action == "removeLines") {
+ if (start.row <= row) {
+ if (end.row <= row)
+ row -= end.row - start.row;
+ else {
+ row = start.row;
+ column = 0;
}
}
}
- return keys;
- };
-}
-if (!Date.now) {
- Date.now = function now() {
- return new Date().getTime();
- };
-}
-var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
- "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
- "\u2029\uFEFF";
-if (!String.prototype.trim || ws.trim()) {
- ws = "[" + ws + "]";
- var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
- trimEndRegexp = new RegExp(ws + ws + "*$");
- String.prototype.trim = function trim() {
- return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ this.setPosition(row, column, true);
};
-}
-
-function toInteger(n) {
- n = +n;
- if (n !== n) { // isNaN
- n = 0;
- } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
- n = (n > 0 || -1) * Math.floor(Math.abs(n));
- }
- return n;
-}
-
-function isPrimitive(input) {
- var type = typeof input;
- return (
- input === null ||
- type === "undefined" ||
- type === "boolean" ||
- type === "number" ||
- type === "string"
- );
-}
-
-function toPrimitive(input) {
- var val, valueOf, toString;
- if (isPrimitive(input)) {
- return input;
- }
- valueOf = input.valueOf;
- if (typeof valueOf === "function") {
- val = valueOf.call(input);
- if (isPrimitive(val)) {
- return val;
- }
- }
- toString = input.toString;
- if (typeof toString === "function") {
- val = toString.call(input);
- if (isPrimitive(val)) {
- return val;
+ this.setPosition = function(row, column, noClip) {
+ var pos;
+ if (noClip) {
+ pos = {
+ row: row,
+ column: column
+ };
+ } else {
+ pos = this.$clipPositionToDocument(row, column);
}
- }
- throw new TypeError();
-}
-var toObject = function (o) {
- if (o == null) { // this matches both null and undefined
- throw new TypeError("can't convert "+o+" to object");
- }
- return Object(o);
-};
-
-});
-
-ace.define('ace/mode/xquery_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/xquery/JSONParseTreeHandler', 'ace/mode/xquery/XQueryParser', 'ace/mode/xquery/visitors/SemanticHighlighter'], function(require, exports, module) {
-
-var oop = require("../lib/oop");
-var Mirror = require("../worker/mirror").Mirror;
-var JSONParseTreeHandler = require("./xquery/JSONParseTreeHandler").JSONParseTreeHandler;
-var XQueryParser = require("./xquery/XQueryParser").XQueryParser;
-var SemanticHighlighter = require("./xquery/visitors/SemanticHighlighter").SemanticHighlighter;
-
-var XQueryWorker = exports.XQueryWorker = function(sender) {
- Mirror.call(this, sender);
- this.setTimeout(200);
-};
+ if (this.row == pos.row && this.column == pos.column)
+ return;
-oop.inherits(XQueryWorker, Mirror);
+ var old = {
+ row: this.row,
+ column: this.column
+ };
-(function() {
-
- this.onUpdate = function() {
- this.sender.emit("start");
- var value = this.doc.getValue();
- var h = new JSONParseTreeHandler(value);
- var parser = new XQueryParser(value, h);
- try {
- parser.parse_XQuery();
- this.sender.emit("ok");
- var ast = h.getParseTree();
- var highlighter = new SemanticHighlighter(ast, value);
- var tokens = highlighter.getTokens();
- this.sender.emit("highlight", { tokens: tokens, lines: highlighter.lines });
- } catch(e) {
- if(e instanceof parser.ParseException) {
- var prefix = value.substring(0, e.getBegin());
- var line = prefix.split("\n").length;
- var column = e.getBegin() - prefix.lastIndexOf("\n");
- var message = parser.getErrorMessage(e);
- this.sender.emit("error", {
- row: line - 1,
- column: column,
- text: message,
- type: "error"
+ this.row = pos.row;
+ this.column = pos.column;
+ this._signal("change", {
+ old: old,
+ value: pos
});
- } else {
- throw e;
- }
- }
- };
-
-}).call(XQueryWorker.prototype);
-
-});
-ace.define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
-
-
-var Document = require("../document").Document;
-var lang = require("../lib/lang");
-
-var Mirror = exports.Mirror = function(sender) {
- this.sender = sender;
- var doc = this.doc = new Document("");
-
- var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
-
- var _self = this;
- sender.on("change", function(e) {
- doc.applyDeltas(e.data);
- deferredUpdate.schedule(_self.$timeout);
- });
-};
-
-(function() {
-
- this.$timeout = 500;
-
- this.setTimeout = function(timeout) {
- this.$timeout = timeout;
};
-
- this.setValue = function(value) {
- this.doc.setValue(value);
- this.deferredUpdate.schedule(this.$timeout);
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
};
-
- this.getValue = function(callbackId) {
- this.sender.callback(this.doc.getValue(), callbackId);
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("change", this.$onChange);
};
-
- this.onUpdate = function() {
+ this.$clipPositionToDocument = function(row, column) {
+ var pos = {};
+
+ if (row >= this.document.getLength()) {
+ pos.row = Math.max(0, this.document.getLength() - 1);
+ pos.column = this.document.getLine(pos.row).length;
+ }
+ else if (row < 0) {
+ pos.row = 0;
+ pos.column = 0;
+ }
+ else {
+ pos.row = row;
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+ }
+
+ if (column < 0)
+ pos.column = 0;
+
+ return pos;
};
-
-}).call(Mirror.prototype);
-});
+}).call(Anchor.prototype);
-ace.define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
+});
+ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
var oop = require("./lib/oop");
var EventEmitter = require("./lib/event_emitter").EventEmitter;
@@ -1108,7 +744,7 @@ var Anchor = require("./anchor").Anchor;
var Document = function(text) {
this.$lines = [];
- if (text.length == 0) {
+ if (text.length === 0) {
this.$lines = [""];
} else if (Array.isArray(text)) {
this._insertLines(0, text);
@@ -1131,10 +767,10 @@ var Document = function(text) {
this.createAnchor = function(row, column) {
return new Anchor(this, row, column);
};
- if ("aaa".split(/a/).length == 0)
+ if ("aaa".split(/a/).length === 0)
this.$split = function(text) {
return text.replace(/\r\n|\r/g, "\n").split("\n");
- }
+ };
else
this.$split = function(text) {
return text.split(/\r\n|\r|\n/);
@@ -1144,6 +780,7 @@ var Document = function(text) {
this.$detectNewLine = function(text) {
var match = text.match(/^.*?(\r\n|\r|\n)/m);
this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
};
this.getNewLineCharacter = function() {
switch (this.$newLineMode) {
@@ -1152,17 +789,18 @@ var Document = function(text) {
case "unix":
return "\n";
default:
- return this.$autoNewLine;
+ return this.$autoNewLine || "\n";
}
};
- this.$autoNewLine = "\n";
+ this.$autoNewLine = "";
this.$newLineMode = "auto";
this.setNewLineMode = function(newLineMode) {
if (this.$newLineMode === newLineMode)
return;
this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
};
this.getNewLineMode = function() {
return this.$newLineMode;
@@ -1232,9 +870,10 @@ var Document = function(text) {
this._insertLines = function(row, lines) {
if (lines.length == 0)
return {row: row, column: 0};
- if (lines.length > 0xFFFF) {
- var end = this._insertLines(row, lines.slice(0xFFFF));
- lines = lines.slice(0, 0xFFFF);
+ while (lines.length > 20000) {
+ var end = this._insertLines(row, lines.slice(0, 20000));
+ lines = lines.slice(20000);
+ row = end.row;
}
var args = [row, 0];
@@ -1247,8 +886,8 @@ var Document = function(text) {
range: range,
lines: lines
};
- this._emit("change", { data: delta });
- return end || range.end;
+ this._signal("change", { data: delta });
+ return range.end;
};
this.insertNewLine = function(position) {
position = this.$clipPosition(position);
@@ -1267,7 +906,7 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
@@ -1290,11 +929,13 @@ var Document = function(text) {
range: Range.fromPoints(position, end),
text: text
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return end;
};
this.remove = function(range) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
range.start = this.$clipPosition(range.start);
range.end = this.$clipPosition(range.end);
@@ -1339,7 +980,7 @@ var Document = function(text) {
range: range,
text: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return range.start;
};
this.removeLines = function(firstRow, lastRow) {
@@ -1358,7 +999,7 @@ var Document = function(text) {
nl: this.getNewLineCharacter(),
lines: removed
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
return removed;
};
this.removeNewLine = function(row) {
@@ -1375,9 +1016,11 @@ var Document = function(text) {
range: range,
text: this.getNewLineCharacter()
};
- this._emit("change", { data: delta });
+ this._signal("change", { data: delta });
};
this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
if (text.length == 0 && range.isEmpty())
return range.start;
if (text == this.getTextRange(range))
@@ -1450,393 +1093,13 @@ var Document = function(text) {
exports.Document = Document;
});
-ace.define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-var comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function(startRow, startColumn, endRow, endColumn) {
- this.start = {
- row: startRow,
- column: startColumn
- };
-
- this.end = {
- row: endRow,
- column: endColumn
- };
-};
-
-(function() {
- this.isEqual = function(range) {
- return this.start.row === range.start.row &&
- this.end.row === range.end.row &&
- this.start.column === range.start.column &&
- this.end.column === range.end.column;
- };
- this.toString = function() {
- return ("Range: [" + this.start.row + "/" + this.start.column +
- "] -> [" + this.end.row + "/" + this.end.column + "]");
- };
-
- this.contains = function(row, column) {
- return this.compare(row, column) == 0;
- };
- this.compareRange = function(range) {
- var cmp,
- end = range.end,
- start = range.start;
-
- cmp = this.compare(end.row, end.column);
- if (cmp == 1) {
- cmp = this.compare(start.row, start.column);
- if (cmp == 1) {
- return 2;
- } else if (cmp == 0) {
- return 1;
- } else {
- return 0;
- }
- } else if (cmp == -1) {
- return -2;
- } else {
- cmp = this.compare(start.row, start.column);
- if (cmp == -1) {
- return -1;
- } else if (cmp == 1) {
- return 42;
- } else {
- return 0;
- }
- }
- };
- this.comparePoint = function(p) {
- return this.compare(p.row, p.column);
- };
- this.containsRange = function(range) {
- return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
- };
- this.intersects = function(range) {
- var cmp = this.compareRange(range);
- return (cmp == -1 || cmp == 0 || cmp == 1);
- };
- this.isEnd = function(row, column) {
- return this.end.row == row && this.end.column == column;
- };
- this.isStart = function(row, column) {
- return this.start.row == row && this.start.column == column;
- };
- this.setStart = function(row, column) {
- if (typeof row == "object") {
- this.start.column = row.column;
- this.start.row = row.row;
- } else {
- this.start.row = row;
- this.start.column = column;
- }
- };
- this.setEnd = function(row, column) {
- if (typeof row == "object") {
- this.end.column = row.column;
- this.end.row = row.row;
- } else {
- this.end.row = row;
- this.end.column = column;
- }
- };
- this.inside = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column) || this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideStart = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isEnd(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.insideEnd = function(row, column) {
- if (this.compare(row, column) == 0) {
- if (this.isStart(row, column)) {
- return false;
- } else {
- return true;
- }
- }
- return false;
- };
- this.compare = function(row, column) {
- if (!this.isMultiLine()) {
- if (row === this.start.row) {
- return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
- };
- }
-
- if (row < this.start.row)
- return -1;
-
- if (row > this.end.row)
- return 1;
-
- if (this.start.row === row)
- return column >= this.start.column ? 0 : -1;
-
- if (this.end.row === row)
- return column <= this.end.column ? 0 : 1;
-
- return 0;
- };
- this.compareStart = function(row, column) {
- if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareEnd = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else {
- return this.compare(row, column);
- }
- };
- this.compareInside = function(row, column) {
- if (this.end.row == row && this.end.column == column) {
- return 1;
- } else if (this.start.row == row && this.start.column == column) {
- return -1;
- } else {
- return this.compare(row, column);
- }
- };
- this.clipRows = function(firstRow, lastRow) {
- if (this.end.row > lastRow)
- var end = {row: lastRow + 1, column: 0};
- else if (this.end.row < firstRow)
- var end = {row: firstRow, column: 0};
-
- if (this.start.row > lastRow)
- var start = {row: lastRow + 1, column: 0};
- else if (this.start.row < firstRow)
- var start = {row: firstRow, column: 0};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
- this.extend = function(row, column) {
- var cmp = this.compare(row, column);
-
- if (cmp == 0)
- return this;
- else if (cmp == -1)
- var start = {row: row, column: column};
- else
- var end = {row: row, column: column};
-
- return Range.fromPoints(start || this.start, end || this.end);
- };
-
- this.isEmpty = function() {
- return (this.start.row === this.end.row && this.start.column === this.end.column);
- };
- this.isMultiLine = function() {
- return (this.start.row !== this.end.row);
- };
- this.clone = function() {
- return Range.fromPoints(this.start, this.end);
- };
- this.collapseRows = function() {
- if (this.end.column == 0)
- return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
- else
- return new Range(this.start.row, 0, this.end.row, 0)
- };
- this.toScreenRange = function(session) {
- var screenPosStart = session.documentToScreenPosition(this.start);
- var screenPosEnd = session.documentToScreenPosition(this.end);
-
- return new Range(
- screenPosStart.row, screenPosStart.column,
- screenPosEnd.row, screenPosEnd.column
- );
- };
- this.moveBy = function(row, column) {
- this.start.row += row;
- this.start.column += column;
- this.end.row += row;
- this.end.column += column;
- };
-
-}).call(Range.prototype);
-Range.fromPoints = function(start, end) {
- return new Range(start.row, start.column, end.row, end.column);
-};
-Range.comparePoints = comparePoints;
-
-Range.comparePoints = function(p1, p2) {
- return p1.row - p2.row || p1.column - p2.column;
-};
-
-
-exports.Range = Range;
-});
-
-ace.define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
-
-
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
-var Anchor = exports.Anchor = function(doc, row, column) {
- this.$onChange = this.onChange.bind(this);
- this.attach(doc);
-
- if (typeof column == "undefined")
- this.setPosition(row.row, row.column);
- else
- this.setPosition(row, column);
+exports.last = function(a) {
+ return a[a.length - 1];
};
-(function() {
-
- oop.implement(this, EventEmitter);
- this.getPosition = function() {
- return this.$clipPositionToDocument(this.row, this.column);
- };
- this.getDocument = function() {
- return this.document;
- };
- this.onChange = function(e) {
- var delta = e.data;
- var range = delta.range;
-
- if (range.start.row == range.end.row && range.start.row != this.row)
- return;
-
- if (range.start.row > this.row)
- return;
-
- if (range.start.row == this.row && range.start.column > this.column)
- return;
-
- var row = this.row;
- var column = this.column;
- var start = range.start;
- var end = range.end;
-
- if (delta.action === "insertText") {
- if (start.row === row && start.column <= column) {
- if (start.row === end.row) {
- column += end.column - start.column;
- } else {
- column -= start.column;
- row += end.row - start.row;
- }
- } else if (start.row !== end.row && start.row < row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "insertLines") {
- if (start.row <= row) {
- row += end.row - start.row;
- }
- } else if (delta.action === "removeText") {
- if (start.row === row && start.column < column) {
- if (end.column >= column)
- column = start.column;
- else
- column = Math.max(0, column - (end.column - start.column));
-
- } else if (start.row !== end.row && start.row < row) {
- if (end.row === row)
- column = Math.max(0, column - end.column) + start.column;
- row -= (end.row - start.row);
- } else if (end.row === row) {
- row -= end.row - start.row;
- column = Math.max(0, column - end.column) + start.column;
- }
- } else if (delta.action == "removeLines") {
- if (start.row <= row) {
- if (end.row <= row)
- row -= end.row - start.row;
- else {
- row = start.row;
- column = 0;
- }
- }
- }
-
- this.setPosition(row, column, true);
- };
- this.setPosition = function(row, column, noClip) {
- var pos;
- if (noClip) {
- pos = {
- row: row,
- column: column
- };
- } else {
- pos = this.$clipPositionToDocument(row, column);
- }
-
- if (this.row == pos.row && this.column == pos.column)
- return;
-
- var old = {
- row: this.row,
- column: this.column
- };
-
- this.row = pos.row;
- this.column = pos.column;
- this._emit("change", {
- old: old,
- value: pos
- });
- };
- this.detach = function() {
- this.document.removeEventListener("change", this.$onChange);
- };
- this.attach = function(doc) {
- this.document = doc || this.document;
- this.document.on("change", this.$onChange);
- };
- this.$clipPositionToDocument = function(row, column) {
- var pos = {};
-
- if (row >= this.document.getLength()) {
- pos.row = Math.max(0, this.document.getLength() - 1);
- pos.column = this.document.getLine(pos.row).length;
- }
- else if (row < 0) {
- pos.row = 0;
- pos.column = 0;
- }
- else {
- pos.row = row;
- pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
- }
-
- if (column < 0)
- pos.column = 0;
-
- return pos;
- };
-
-}).call(Anchor.prototype);
-
-});
-
-ace.define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
-
-
exports.stringReverse = function(string) {
return string.split("").reverse().join("");
};
@@ -1883,18 +1146,24 @@ exports.copyArray = function(array){
return copy;
};
-exports.deepCopy = function (obj) {
- if (typeof obj != "object") {
+exports.deepCopy = function deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
}
+ var cons = obj.constructor;
+ if (cons === RegExp)
+ return obj;
- var copy = obj.constructor();
+ copy = cons();
for (var key in obj) {
- if (typeof obj[key] == "object") {
- copy[key] = this.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
+ copy[key] = deepCopy(obj[key]);
}
return copy;
};
@@ -1944,7 +1213,6 @@ exports.getMatchOffsets = function(string, regExp) {
return matches;
};
exports.deferredCall = function(fcn) {
-
var timer = null;
var callback = function() {
timer = null;
@@ -1970,6 +1238,10 @@ exports.deferredCall = function(fcn) {
timer = null;
return deferred;
};
+
+ deferred.isPending = function() {
+ return timer;
+ };
return deferred;
};
@@ -1983,15 +1255,15 @@ exports.delayedCall = function(fcn, defaultTimeout) {
};
var _self = function(timeout) {
- timer && clearTimeout(timer);
- timer = setTimeout(callback, timeout || defaultTimeout);
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
- _self.delay = _self;
- _self.schedule = function(timeout) {
- if (timer == null)
- timer = setTimeout(callback, timeout || 0);
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
};
+ _self.schedule = _self;
_self.call = function() {
this.cancel();
@@ -2010,141 +1282,26876 @@ exports.delayedCall = function(fcn, defaultTimeout) {
return _self;
};
});
-
-ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'module' ], function(require, exports, module) {
- var JSONParseTreeHandler = exports.JSONParseTreeHandler = function(code) {
+ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+
+var Mirror = exports.Mirror = function(sender) {
+ this.sender = sender;
+ var doc = this.doc = new Document("");
+
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ doc.applyDeltas(e.data);
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(function() {
+
+ this.$timeout = 500;
+
+ this.setTimeout = function(timeout) {
+ this.$timeout = timeout;
+ };
+
+ this.setValue = function(value) {
+ this.doc.setValue(value);
+ this.deferredUpdate.schedule(this.$timeout);
+ };
+
+ this.getValue = function(callbackId) {
+ this.sender.callback(this.doc.getValue(), callbackId);
+ };
+
+ this.onUpdate = function() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/xquery/xqlint",["require","exports","module","ace/mode/tree_ops","ace/mode/xquery/errors","ace/mode/tree_ops","ace/mode/xquery/errors","ace/mode/xquery/schema_built-in_types","ace/mode/xquery/errors","ace/mode/tree_ops","ace/mode/xquery/static_context","ace/mode/xquery/handlers","ace/mode/tree_ops","ace/mode/xquery/parsers/JSONiqParser","ace/mode/xquery/parsers/XQueryParser","ace/mode/xquery/parsers/JSONParseTreeHandler","ace/mode/xquery/compiler/translator","ace/mode/xquery/formatter/style_checker","ace/mode/lib/completion/completer","ace/mode/xquery/compiler/static_context"], function(require, exports, module) {
+module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({
+1:[function(require,module,exports){
+'use strict';
+
+var init = function(that, code, message, pos, type){
+ if(!code) {
+ throw new Error(type + ' code is missing.');
+ }
+
+ if(!message) {
+ throw new Error(type + ' message is missing.');
+ }
+
+ if(!pos) {
+ throw new Error(type + ' position is missing.');
+ }
+
+ that.getCode = function(){
+ return code;
+ };
+
+ that.getMessage = function(){
+ return message;
+ };
+
+ that.getPos = function(){
+ return pos;
+ };
+};
+
+var StaticError = {};
+var StaticWarning = {};
+StaticError.prototype = new Error();
+StaticWarning.prototype = new Error();
+
+exports.StaticError = StaticError.prototype.constructor = function(code, message, pos) {
+ init(this, code, message, pos, 'Error');
+};
+
+exports.StaticWarning = StaticWarning.prototype.constructor = function(code, message, pos) {
+ init(this, code, message, pos, 'Warning');
+};
+},
+{}],
+2:[function(require,module,exports){
+'use strict';
+
+var TreeOps = require('../tree_ops').TreeOps;
+var Errors = require('./errors');
+var StaticWarning = Errors.StaticWarning;
+exports.ModuleDecl = function(translator, rootSctx, node){
+ var prefix = '';
+ return {
+ NCName: function(ncname){
+ prefix = TreeOps.flatten(ncname);
+ },
+
+ URILiteral: function(uri) {
+ uri = TreeOps.flatten(uri);
+ uri = uri.substring(1, uri.length - 1);
+ translator.apply(function(){
+ rootSctx.moduleNamespace = uri;
+ rootSctx.addNamespace(uri, prefix, node.pos, 'moduleDecl');
+ });
+ }
+ };
+};
+
+exports.ModuleImport = function(translator, rootSctx, node) {
+ var prefix = '';
+ var moduleURI;
+
+ return {
+ NCName: function(ncname){
+ prefix = TreeOps.flatten(ncname);
+ },
+
+ URILiteral: function(uri) {
+ if(moduleURI !== undefined) {
+ return;
+ }
+ uri = TreeOps.flatten(uri);
+ uri = uri.substring(1, uri.length - 1);
+ moduleURI = uri;
+ translator.apply(function(){
+ rootSctx.importModule(uri, prefix, node.pos);
+ });
+ }
+ };
+};
+
+exports.SchemaImport = function(translator, rootSctx, node) {
+ var prefix = '';
+ var schemaURI;
+
+ return {
+ SchemaPrefix: function(schemaPrefix) {
+ var SchemaPrefixHandler = function () {
+ this.NCName = function (ncname) {
+ prefix = TreeOps.flatten(ncname);
+ };
+ };
+ translator.visitChildren(schemaPrefix, new SchemaPrefixHandler());
+ },
+
+ URILiteral: function(uri) {
+ if(schemaURI !== undefined) {
+ return;
+ }
+ uri = TreeOps.flatten(uri);
+ uri = uri.substring(1, uri.length - 1);
+ schemaURI = uri;
+ translator.apply(function(){
+ rootSctx.addNamespace(uri, prefix, node.pos, 'schema');
+ });
+ }
+ };
+};
+
+exports.DefaultNamespaceDecl = function(translator, rootSctx, node) {
+ var fn = false;
+ var ns = '';
+
+ return {
+ TOKEN: function(token){
+ fn = fn ? true : (token.value === 'function');
+ },
+ URILiteral: function(uri){
+ ns = TreeOps.flatten(uri);
+ ns = ns.substring(1, ns.length - 1);
+ if(!fn) {
+ translator.apply(function(){
+ throw new StaticWarning('W06', 'Avoid default element namespace declarations.', node.pos);
+ });
+ rootSctx.defaultElementNamespace = ns;
+ } else {
+ rootSctx.defaultFunctionNamespace = ns;
+ }
+ }
+ };
+};
+
+exports.NamespaceDecl = function(translator, rootSctx, node) {
+ var prefix = '';
+ return {
+ NCName: function(ncname) {
+ prefix = TreeOps.flatten(ncname);
+ },
+ URILiteral: function(uri) {
+ uri = TreeOps.flatten(uri);
+ uri = uri.substring(1, uri.length - 1);
+ translator.apply(function(){
+ rootSctx.addNamespace(uri, prefix, node.pos, 'declare');
+ });
+ }
+ };
+};
+exports.VarHandler = function(translator, sctx, node){
+ var EQNameHandler = function(eqname){
+ var value = TreeOps.flatten(eqname);
+ translator.apply(function(){
+ var qname = sctx.resolveQName(value, eqname.pos);
+ sctx.addVariable(qname, node.name, eqname.pos);
+ });
+ };
+ return {
+ ExprSingle: function(){ return true; },
+ VarValue: function(){ return true; },
+ VarDefaultValue: function(){ return true; },
+ VarName: EQNameHandler,
+ EQName: EQNameHandler
+ };
+};
+
+exports.VarRefHandler = function(translator, sctx, node){
+ return {
+ VarName: function(eqname){
+ var value = TreeOps.flatten(eqname);
+ translator.apply(function(){
+ var qname = sctx.resolveQName(value, node.pos);
+ if(qname.uri !== '') {
+ sctx.root.namespaces[qname.uri].used = true;
+ }
+ sctx.addVarRef(qname, eqname.pos);
+ });
+ }
+ };
+};
+},
+{"../tree_ops":11,"./errors":1}],
+3:[function(require,module,exports){
+'use strict';
+exports.getSchemaBuiltinTypes = function(){
+ var ns = 'http://www.w3.org/2001/XMLSchema';
+ var SchemaBuiltinTypes = {};
+ SchemaBuiltinTypes[ns] = {
+ variables: {},
+ functions: {}
+ };
+ SchemaBuiltinTypes[ns].functions[ns + '#string#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'string', arity: 1, eqname: { uri: ns, name: 'string' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#boolean#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'boolean', arity: 1, eqname: { uri: ns, name: 'boolean' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#decimal#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'decimal', arity: 1, eqname: { uri: ns, name: 'decimal' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#float#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'float', arity: 1, eqname: { uri: ns, name: 'float' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#double#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'double', arity: 1, eqname: { uri: ns, name: 'double' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#duration#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'duration', arity: 1, eqname: { uri: ns, name: 'duration' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#dateTime#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'dateTime', arity: 1, eqname: { uri: ns, name: 'dateTime' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#time#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'time', arity: 1, eqname: { uri: ns, name: 'time' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#date#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'date', arity: 1, eqname: { uri: ns, name: 'date' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#gYearMonth#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'gYearMonth', arity: 1, eqname: { uri: ns, name: 'gYearMonth' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#gYear#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'gYear', arity: 1, eqname: { uri: ns, name: 'gYear' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#gMonthDay#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'gMonthDay', arity: 1, eqname: { uri: ns, name: 'gMonthDay' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#gDay#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'gDay', arity: 1, eqname: { uri: ns, name: 'gDay' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#gMonth#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'gMonth', arity: 1, eqname: { uri: ns, name: 'gMonth' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#hexBinary#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'hexBinary', arity: 1, eqname: { uri: ns, name: 'hexBinary' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#base64Binary#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'base64Binary', arity: 1, eqname: { uri: ns, name: 'base64Binary' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#anyURI#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'anyURI', arity: 1, eqname: { uri: ns, name: 'anyURI' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#QName#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'QName', arity: 1, eqname: { uri: ns, name: 'QName' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#normalizedString#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'normalizedString', arity: 1, eqname: { uri: ns, name: 'normalizedString' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#token#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'token', arity: 1, eqname: { uri: ns, name: 'token' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#language#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'language', arity: 1, eqname: { uri: ns, name: 'language' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#NMTOKEN#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'NMTOKEN', arity: 1, eqname: { uri: ns, name: 'NMTOKEN' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#Name#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'Name', arity: 1, eqname: { uri: ns, name: 'Name' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#NCName#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'NCName', arity: 1, eqname: { uri: ns, name: 'NCName' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#ID#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'ID', arity: 1, eqname: { uri: ns, name: 'ID' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#IDREF#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'IDREF', arity: 1, eqname: { uri: ns, name: 'IDREF' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#ENTITY#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'ENTITY', arity: 1, eqname: { uri: ns, name: 'ENTITY' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#integer#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'integer', arity: 1, eqname: { uri: ns, name: 'integer' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#nonPositiveInteger#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'nonPositiveInteger', arity: 1, eqname: { uri: ns, name: 'nonPositiveInteger' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#negativeInteger#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'negativeInteger', arity: 1, eqname: { uri: ns, name: 'negativeInteger' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#long#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'long', arity: 1, eqname: { uri: ns, name: 'long' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#int#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'int', arity: 1, eqname: { uri: ns, name: 'int' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#short#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'short', arity: 1, eqname: { uri: ns, name: 'short' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#byte#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'byte', arity: 1, eqname: { uri: ns, name: 'byte' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#nonNegativeInteger#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'nonNegativeInteger', arity: 1, eqname: { uri: ns, name: 'nonNegativeInteger' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#unsignedLong#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'unsignedLong', arity: 1, eqname: { uri: ns, name: 'unsignedLong' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#unsignedInt#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'unsignedInt', arity: 1, eqname: { uri: ns, name: 'unsignedInt' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#unsignedShort#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'unsignedShort', arity: 1, eqname: { uri: ns, name: 'unsignedShort' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#unsignedByte#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'unsignedByte', arity: 1, eqname: { uri: ns, name: 'unsignedByte' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#positiveInteger#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'positiveInteger', arity: 1, eqname: { uri: ns, name: 'positiveInteger' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#yearMonthDuration#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'yearMonthDuration', arity: 1, eqname: { uri: ns, name: 'yearMonthDuration' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#dayTimeDuration#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'dayTimeDuration', arity: 1, eqname: { uri: ns, name: 'dayTimeDuration' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#untypedAtomic#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'untypedAtomic', arity: 1, eqname: { uri: ns, name: 'untypedAtomic' } };
+ return SchemaBuiltinTypes;
+};
+},
+{}],
+4:[function(require,module,exports){
+exports.StaticContext = function (parent, pos) {
+ 'use strict';
+
+ var TreeOps = require('../tree_ops').TreeOps;
+
+ var Errors = require('./errors');
+ var StaticError = Errors.StaticError;
+ var StaticWarning = Errors.StaticWarning;
+
+ var getSchemaBuiltinTypes = require('./schema_built-in_types').getSchemaBuiltinTypes;
+
+ var emptyPos = { sl:0, sc: 0, el: 0, ec: 0 };
+ var namespaces = {};
+
+ var getVarKey = function(qname) {
+ return qname.uri + '#' + qname.name;
+ };
+
+ var getFnKey = function(qname, arity) {
+ return getVarKey(qname) + '#' + arity;
+ };
+
+ if(!parent) {
+ namespaces['http://jsoniq.org/functions'] = {
+ prefix: 'jn',
+ pos: emptyPos,
+ type: 'module',
+ override: true
+ };
+ namespaces['http://www.28msec.com/modules/collections'] = {
+ prefix: 'db',
+ pos: emptyPos,
+ type: 'module',
+ override: true
+ };
+ namespaces['http://www.28msec.com/modules/store'] = {
+ prefix: 'store',
+ pos: emptyPos,
+ type: 'module',
+ override: true
+ };
+ namespaces['http://jsoniq.org/function-library'] = {
+ prefix: 'libjn',
+ pos: emptyPos,
+ type: 'module',
+ override: true
+ };
+ namespaces['http://www.w3.org/2005/xpath-functions'] = {
+ prefix: 'fn',
+ pos: emptyPos,
+ type: 'module',
+ override: true
+ };
+ namespaces['http://www.w3.org/2005/xquery-local-functions'] = {
+ prefix: 'local',
+ pos: emptyPos,
+ type: 'declare',
+ override: true
+ };
+ namespaces['http://www.w3.org/2001/XMLSchema-instance'] = {
+ prefix: 'xsi',
+ pos: emptyPos,
+ type: 'declare'
+ };
+ namespaces['http://www.w3.org/2001/XMLSchema'] = {
+ prefix: 'xs',
+ pos: emptyPos,
+ type: 'declare'
+ };
+ namespaces['http://www.w3.org/XML/1998/namespace'] = {
+ prefix: 'xml',
+ pos: emptyPos,
+ type: 'declare'
+ };
+ namespaces['http://zorba.io/annotations'] = {
+ prefix: 'an',
+ pos: emptyPos,
+ type: 'declare',
+ override: true
+ };
+ namespaces['http://www.28msec.com/annotations/rest'] = {
+ prefix: 'rest',
+ pos: emptyPos,
+ type: 'declare',
+ override: true
+ };
+ namespaces['http://www.w3.org/2005/xqt-errors'] = {
+ prefix: 'err',
+ pos: emptyPos,
+ type: 'declare',
+ override: true
+ };
+ namespaces['http://zorba.io/errors'] = {
+ prefix: 'zerr',
+ pos: emptyPos,
+ type: 'declare',
+ override: true
+ };
+ }
+
+ var s = {
+ parent: parent,
+ children: [],
+ pos: pos,
+ setModuleResolver: function(resolver){
+ this.root.moduleResolver = resolver;
+ return this;
+ },
+ setModules: function(index){
+ if(this !== this.root){
+ throw new Error('setModules() not invoked from the root static context.');
+ }
+ this.moduleResolver = function(uri){
+ return index[uri];
+ };
+ var that = this;
+ Object.keys(this.namespaces).forEach(function(uri){
+ var ns = that.namespaces[uri];
+ if(ns.type === 'module') {
+ var mod = that.moduleResolver(uri);
+ if(mod.variables) {
+ TreeOps.concat(that.variables, mod.variables);
+ }
+ if(mod.functions) {
+ TreeOps.concat(that.functions, mod.functions);
+ }
+ }
+ });
+ return this;
+ },
+ setModulesFromXQDoc: function(xqdoc){
+ if(this !== this.root){
+ throw new Error('setModulesFromXQDoc() not invoked from the root static context.');
+ }
+ var index = {};
+ Object.keys(xqdoc).forEach(function(uri) {
+ var mod = xqdoc[uri];
+ var variables = {};
+ var functions = {};
+ mod.functions.forEach(function(fn){
+ functions[uri + '#' + fn.name + '#' + fn.arity] = {
+ params: [],
+ annotations: [],
+ name: fn.name,
+ arity: fn.arity,
+ eqname: { uri: uri, name: fn.name }
+ };
+ fn.parameters.forEach(function(param){
+ functions[uri + '#' + fn.name + '#' + fn.arity].params.push('$' + param.name);
+ });
+ });
+ mod.variables.forEach(function(variable){
+ var name = variable.name.substring(variable.name.indexOf(':') + 1);
+ variables[uri + '#' + name] = { type: 'VarDecl', annotations: [], eqname: { uri: uri, name: name } };
+ });
+ index[uri] = {
+ variables: variables,
+ functions: functions
+ };
+ });
+ this.root.moduleResolver = function(uri){
+ return index[uri];
+ };
+ var that = this;
+ Object.keys(this.namespaces).forEach(function(uri){
+ var ns = that.namespaces[uri];
+ if(ns.type === 'module') {
+ var mod = that.moduleResolver(uri);
+ if(mod.variables) {
+ TreeOps.concat(that.variables, mod.variables);
+ }
+ if(mod.functions) {
+ TreeOps.concat(that.functions, mod.functions);
+ }
+ }
+ });
+ return this;
+ },
+ moduleNamespace: '',
+ defaultFunctionNamespace: 'http://www.w3.org/2005/xpath-functions',
+ defaultFunctionNamespaces: [
+ 'http://www.28msec.com/modules/collections',
+ 'http://www.28msec.com/modules/store',
+ 'http://jsoniq.org/functions',
+ 'http://jsoniq.org/function-library',
+ 'http://www.w3.org/2001/XMLSchema' //Built-in type constructors
+ ],
+ defaultElementNamespace: '',
+ namespaces: namespaces,
+ availableModuleNamespaces: [],
+ importModule: function(uri, prefix, pos) {
+ if(this !== this.root){
+ throw new Error('Function not invoked from the root static context.');
+ }
+ this.addNamespace(uri, prefix, pos, 'module');
+ if(this.moduleResolver) {
+ try {
+ var mod = this.moduleResolver(uri, []);
+ if(mod.variables) {
+ TreeOps.concat(this.variables, mod.variables);
+ }
+ if(mod.functions) {
+ TreeOps.concat(this.functions, mod.functions);
+ }
+ } catch(e) {
+ throw new StaticError('XQST0059', 'module "' + uri + '" not found', pos);
+ }
+ }
+ return this;
+ },
+ getAvailableModuleNamespaces: function(){
+ return this.root.availableModuleNamespaces;
+ },
+ getPrefixByNamespace: function(uri){
+ return this.root.namespaces[uri].prefix;
+ },
+ addNamespace: function (uri, prefix, pos, type) {
+ if(prefix === '' && type === 'module') {
+ throw new StaticWarning('W01', 'Avoid this type of import. Use import module namespace instead', pos);
+ }
+ if (uri === '') {
+ throw new StaticError('XQST0088', 'empty target namespace in module import or module declaration', pos);
+ }
+ var namespace = this.getNamespace(uri);
+ if (namespace && namespace.type === type && type !== 'declare' && !namespace.override) {
+ throw new StaticError('XQST0047', '"' + uri + '": duplicate target namespace', pos);
+ }
+ namespace = this.getNamespaceByPrefix(prefix);
+ if (namespace && !namespace.override) {
+ throw new StaticError('XQST0033', '"' + prefix + '": namespace prefix already bound to "' + namespace.uri + '"', pos);
+ }
+
+ namespace = this.namespaces[uri];
+ this.namespaces[uri] = {
+ prefix: prefix,
+ pos: pos,
+ type: type
+ };
+
+ if (namespace) {
+ throw new StaticWarning('W02', '"' + uri + '" already bound to the "' + namespace.prefix + '" prefix', pos);
+ }
+
+ },
+
+ getNamespaces: function(){
+ return this.root.namespaces;
+ },
+
+ getNamespace: function (uri) {
+ var that = this;
+ while (that) {
+ var namespace = that.namespaces[uri];
+ if (namespace) {
+ return namespace;
+ }
+ that = that.parent;
+ }
+
+ },
+
+ getNamespaceByPrefix: function (prefix) {
+ var handler = function (uri) {
+ var namespace = that.namespaces[uri];
+ if (namespace.prefix === prefix) {
+ namespace.uri = uri;
+ throw namespace;
+ }
+ };
+ var that = this;
+ while (that) {
+ try {
+ Object.keys(that.namespaces).forEach(handler);
+ } catch (e) {
+ return e;
+ }
+ that = that.parent;
+ }
+
+ },
+
+ resolveQName: function(value, pos){
+ var qname = {
+ uri: '',
+ prefix: '',
+ name: ''
+ };
+ var idx;
+ if (value.substring(0, 2) === 'Q{') {
+ idx = value.indexOf('}');
+ qname.uri = value.substring(2, idx);
+ qname.name = value.substring(idx + 1);
+ } else {
+ idx = value.indexOf(':');
+ qname.prefix = value.substring(0, idx);
+ var namespace = this.getNamespaceByPrefix(qname.prefix);
+ if(!namespace && qname.prefix !== '' && ['fn', 'jn'].indexOf(qname.prefix) === -1) {
+ throw new StaticError('XPST0081', '"' + qname.prefix + '": can not expand prefix of lexical QName to namespace URI', pos);
+ }
+ if(namespace) {
+ qname.uri = namespace.uri;
+ }
+ qname.name = value.substring(idx + 1);
+ }
+ return qname;
+ },
+
+ variables: {},
+ varRefs: {},
+ functionCalls: {},
+
+ addVariable: function(qname, type, pos){
+ if(
+ type === 'VarDecl' && this.moduleNamespace !== '' &&
+ !(this.moduleNamespace === qname.uri || (qname.uri === '' && this.defaultFunctionNamespace === this.moduleNamespace))
+ ) {
+ throw new StaticError('XQST0048', '"' + qname.prefix + ':' + qname.name + '": Qname not library namespace', pos);
+ }
+ var key = getVarKey(qname);
+ if(type === 'VarDecl' && this.variables[key]) {
+ throw new StaticError('XQST0049', '"' + qname.name + '": duplicate variable declaration', pos);
+ }
+ this.variables[key] = {
+ type: type,
+ pos: pos,
+ qname: qname,
+ annotations: {}
+ };
+ return this;
+ },
+
+ getVariables: function(){
+ var variables = {};
+ var that = this;
+ var handler = function(key){
+ if(!variables[key]){
+ variables[key] = that.variables[key];
+ }
+ };
+ while(that){
+ Object.keys(that.variables).forEach(handler);
+ that = that.parent;
+ }
+ return variables;
+ },
+
+ getVariable: function(qname) {
+ var key = getVarKey(qname);
+ var that = this;
+ while(that) {
+ if(that.variables[key]) {
+ return that.variables[key];
+ }
+ that = that.parent;
+ }
+ },
+
+ addVarRef: function(qname, pos){
+ var varDecl = this.getVariable(qname);
+ if(!varDecl && (qname.uri === '' || this.root.moduleResolver)) {
+ throw new StaticError('XPST0008', '"' + qname.name + '": undeclared variable', pos);
+ }
+ var key = getVarKey(qname);
+ this.varRefs[key] = true;
+ },
+
+ addFunctionCall: function(qname, arity, pos){
+ var fn = this.getFunction(qname, arity);
+ if(!fn && (qname.uri === 'http://www.w3.org/2005/xquery-local-functions' || this.root.moduleResolver)){
+ if((qname.uri === 'http://www.w3.org/2005/xpath-functions' ||
+ (qname.uri === '' && this.root.defaultFunctionNamespaces.concat(this.root.defaultFunctionNamespace).indexOf('http://www.w3.org/2005/xpath-functions') !== -1)) && qname.name === 'concat') {
+ } else if(!fn){
+ throw new StaticError('XPST0008', '"' + qname.name + '#' + arity + '": undeclared function', pos);
+ }
+ }
+ var key = getFnKey(qname, arity);
+ this.functionCalls[key] = true;
+ },
+
+ functions: getSchemaBuiltinTypes()['http://www.w3.org/2001/XMLSchema'].functions,
+
+ getFunctions: function(){
+ return this.root.functions;
+ },
+
+ getFunction: function(qname, arity){
+ var key = getFnKey(qname, arity);
+ var fn;
+ if(qname.uri === '') {
+ var that = this;
+ this.root.defaultFunctionNamespaces.concat([this.root.defaultFunctionNamespace]).forEach(function(defaultFunctionNamespace){
+ if(!fn){
+ fn = that.getFunction({ uri: defaultFunctionNamespace, prefix: qname.prefix, name: qname.name }, arity);
+ } else {
+ return false;
+ }
+ });
+ return fn;
+ } else {
+ return this.root.functions[key];
+ }
+ },
+
+ addFunction: function(qname, pos, params) {
+ if(this !== this.root){
+ throw new Error('addFunction() not invoked from the root static context.');
+ }
+ var arity = params.length;
+ if(
+ this.moduleNamespace !== '' &&
+ !(this.moduleNamespace === qname.uri || (qname.uri === '' && this.defaultFunctionNamespace === this.moduleNamespace))
+ ) {
+ throw new StaticError('XQST0048', '"' + qname.prefix + ':' + qname.name + '": Qname not library namespace', pos);
+ }
+ var key = getFnKey(qname, arity);
+ if(this.functions[key]) {
+ throw new StaticError('XQST0034', '"' + qname.name + '": duplicate function declaration', pos);
+ }
+ this.functions[key] = {
+ pos: pos,
+ params: params
+ };
+ return this;
+ }
+
+ };
+ s.root = parent ? parent.root : s;
+ return s;
+};
+
+},
+{"../tree_ops":11,"./errors":1,"./schema_built-in_types":3}],
+5:[function(require,module,exports){
+exports.Translator = function(rootStcx, ast){
+ 'use strict';
+
+ var Errors = require('./errors');
+ var StaticError = Errors.StaticError;
+ var StaticWarning = Errors.StaticWarning;
+
+ var TreeOps = require('../tree_ops').TreeOps;
+ var StaticContext = require('./static_context').StaticContext;
+ var Handlers = require('./handlers');
+
+ var get = function(node, path){
+ var result = [];
+ if(path.length === 0){
+ return node;
+ }
+ node.children.forEach(function(child){
+ if(child.name === path[0] && path.length > 1) {
+ result = get(child, path.slice(1));
+ } else if(child.name === path[0]) {
+ result.push(child);
+ }
+ });
+ return result;
+ };
+
+ var markers = [];
+ this.apply = function(fn) {
+ try {
+ fn();
+ } catch(e) {
+ if(e instanceof StaticError) {
+ addStaticError(e);
+ } else if(e instanceof StaticWarning) {
+ addWarning(e.getCode(), e.getMessage(), e.getPos());
+ } else {
+ throw e;
+ }
+ }
+ };
+
+ var addStaticError = function(e){
+ markers.push({
+ pos: e.getPos(),
+ type: 'error',
+ level: 'error',
+ message: '[' + e.getCode() + '] ' + e.getMessage()
+ });
+ };
+
+ var addWarning = function(code, message, pos) {
+ markers.push({
+ pos: pos,
+ type: 'warning',
+ level: 'warning',
+ message: '[' + code + '] ' + message
+ });
+ };
+
+ this.getMarkers = function(){
+ return markers;
+ };
+
+ var translator = this;
+
+ rootStcx.pos = ast.pos;
+ var sctx = rootStcx;
+ var pushSctx = function(pos){
+ sctx = new StaticContext(sctx, pos);
+ sctx.parent.children.push(sctx);
+ };
+
+ var popSctx = function(pos){
+ if (pos !== undefined) {
+ sctx.pos.el = pos.el;
+ sctx.pos.ec = pos.ec;
+ }
+
+ Object.keys(sctx.varRefs).forEach(function(key){
+ if(!sctx.variables[key]) {
+ sctx.parent.varRefs[key] = true;
+ }
+ });
+ Object.keys(sctx.variables).forEach(function(key){
+ if(!sctx.varRefs[key] && sctx.variables[key].type !== 'GroupingVariable' && sctx.variables[key].type !== 'CatchVar') {
+ addWarning('W03', 'Unused variable "$' + sctx.variables[key].qname.name + '"', sctx.variables[key].pos);
+ }
+ });
+
+ sctx = sctx.parent;
+ };
+
+ this.visitOnly = function(node, names) {
+ node.children.forEach(function(child){
+ if (names.indexOf(child.name) !== -1){
+ translator.visit(child);
+ }
+ });
+ };
+
+ this.getFirstChild = function(node, name) {
+ var result;
+ node.children.forEach(function(child){
+ if(child.name === name && result === undefined){
+ result = child;
+ }
+ });
+ return result;
+ };
+
+ this.ModuleDecl = function(node){
+ this.visitChildren(node, Handlers.ModuleDecl(translator, rootStcx, node));
+ return true;
+ };
+
+ this.Prolog = function(node){
+ this.visitOnly(node, ['DefaultNamespaceDecl', 'Setter', 'NamespaceDecl', 'Import']);
+ ast.index.forEach(function(node){
+ if(node.name === 'VarDecl') {
+ node.children.forEach(function(child){
+ if(child.name === 'VarName') {
+ translator.apply(function(){
+ var value = TreeOps.flatten(child);
+ var qname = rootStcx.resolveQName(value, child.pos);
+ rootStcx.addVariable(qname, node.name, child.pos);
+ });
+ }
+ });
+ } else if(node.name === 'FunctionDecl') {
+ var qname, pos, params = [];
+ node.children.forEach(function(child){
+ if(child.name === 'EQName') {
+ qname = child;
+ pos = child.pos;
+ } else if(child.name === 'ParamList'){
+ child.children.forEach(function(c){
+ if(c.name === 'Param') {
+ params.push(TreeOps.flatten(c));
+ }
+ });
+ }
+ });
+ translator.apply(function(){
+ qname = TreeOps.flatten(qname);
+ qname = rootStcx.resolveQName(qname, pos);
+ rootStcx.addFunction(qname, pos, params);
+ });
+ }
+ });
+ this.visitOnly(node, ['ContextItemDecl', 'AnnotatedDecl', 'OptionDecl']);
+ return true;
+ };
+
+ this.ModuleImport = function (node) {
+ this.visitChildren(node, Handlers.ModuleImport(translator, rootStcx, node));
+ return true;
+ };
+
+ this.SchemaImport = function (node) {
+ this.visitChildren(node, Handlers.SchemaImport(translator, rootStcx, node));
+ return true;
+ };
+
+ this.DefaultNamespaceDecl = function(node){
+ this.visitChildren(node, Handlers.DefaultNamespaceDecl(translator, rootStcx, node));
+ return true;
+ };
+
+ this.NamespaceDecl = function (node) {
+ this.visitChildren(node, Handlers.NamespaceDecl(translator, rootStcx, node));
+ return true;
+ };
+
+ var annotations = {};
+ this.AnnotatedDecl = function(node) {
+ annotations = {};
+ this.visitChildren(node, Handlers.NamespaceDecl(translator, rootStcx, node));
+ return true;
+ };
+
+ this.CompatibilityAnnotation = function(){
+ annotations['http://www.w3.org/2012/xquery#updating'] = [];
+ return true;
+ };
+
+ this.Annotation = function(node){
+ this.visitChildren(node, {
+ EQName: function(eqname){
+ var value = TreeOps.flatten(eqname);
+ translator.apply(function(){
+ var qname = sctx.resolveQName(value, eqname.pos);
+ annotations[qname.uri + '#' + qname.name] = [];
+ });
+ }
+ });
+ return true;
+ };
+
+ this.VarDecl = function(node){
+ try {
+ var varname = translator.getFirstChild(node, 'VarName');
+ var value = TreeOps.flatten(varname);
+ var qname = sctx.resolveQName(value, varname.pos);
+ var variable = rootStcx.getVariable(qname);
+ if(variable) {
+ variable.annotations = annotations;
+ }
+ } catch(e) {
+ }
+ this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']);
+ return true;
+ };
+
+ this.FunctionDecl = function(node) {
+ var isUpdating = annotations['http://www.w3.org/2012/xquery#updating'] !== undefined;
+ var typeDecl = get(node, ['ReturnType'])[0];
+ var name = get(node, ['EQName'])[0];
+ if(!typeDecl && !isUpdating){
+ addWarning('W05', 'Untyped return value', name.pos);
+ }
+ var isExternal = false;
+ node.children.forEach(function(child){
+ if(child.name === 'TOKEN' && child.value === 'external') {
+ isExternal = true;
+ return false;
+ }
+ });
+ if(!isExternal) {
+ pushSctx(node.pos);
+ this.visitChildren(node);
+ popSctx();
+ }
+ return true;
+ };
+
+ this.VarRef = function(node) {
+ this.visitChildren(node, Handlers.VarRefHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.Param = function(node){
+ var typeDecl = get(node, ['TypeDeclaration'])[0];
+ if(!typeDecl){
+ addWarning('W05', 'Untyped function parameter', node.pos);
+ }
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.InlineFunctionExpr = function(node) {
+ pushSctx(node.pos);
+ this.visitChildren(node);
+ popSctx();
+ return true;
+ };
+ var statementCount = [];
+ var handleStatements = function(node) {
+ pushSctx(node.pos);
+ statementCount.push(0);
+ translator.visitChildren(node);
+ for (var i = 1; i <= statementCount[statementCount.length - 1]; i++) {
+ popSctx(node.pos);
+ }
+ statementCount.pop();
+ popSctx();
+ };
+
+ this.StatementsAndOptionalExpr = function (node) {
+ handleStatements(node);
+ return true;
+ };
+
+ this.StatementsAndExpr = function (node) {
+ handleStatements(node);
+ return true;
+ };
+
+ this.BlockStatement = function (node) {
+ handleStatements(node);
+ return true;
+ };
+
+ this.VarDeclStatement = function(node){
+ pushSctx(node.pos);
+ statementCount[statementCount.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ };
+ var clauses = [];
+ this.FLWORExpr = this.FLWORStatement = function (node) {
+ pushSctx(node.pos);
+ clauses.push(0);
+ this.visitChildren(node);
+ for(var i=1; i <= clauses[clauses.length - 1]; i++) {
+ popSctx(node.pos);
+ }
+ clauses.pop();
+ popSctx();
+ return true;
+ };
+
+ this.ForBinding = function (node) {
+ this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']);
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.LetBinding = function(node){
+ this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']);
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.GroupingSpec = function(node){
+ var isVarDecl = false;
+ node.children.forEach(function(child){
+ if(child.value === ':=') {
+ isVarDecl = true;
+ return false;
+ }
+ });
+ if(isVarDecl) {
+ var groupingVariable = node.children[0];
+ this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']);
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(groupingVariable, Handlers.VarHandler(translator, sctx, groupingVariable));
+ return true;
+ } else {
+
+ }
+ };
+
+ this.TumblingWindowClause = function (node) {
+ this.visitOnly(node, ['ExprSingle']);
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ this.visitOnly(node, ['WindowStartCondition', 'WindowEndCondition']);
+ return true;
+ };
+
+ this.WindowVars = function (node) {
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.SlidingWindowClause = function (node) {
+ this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']);
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ this.visitOnly(node, ['WindowStartCondition', 'WindowEndCondition']);
+ return true;
+ };
+
+ this.PositionalVar = function (node) {
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.PositionalVar = function (node) {
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.CurrentItem = function (node) {
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.PreviousItem = function (node) {
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.NextItem = function (node) {
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.CountClause = function (node) {
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.CaseClause = function(node) {
+ pushSctx(node.pos);
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ this.visitOnly(node, ['ExprSingle']);
+ popSctx();
+ return true;
+ };
+
+ this.TransformExpr = function (node) {
+ pushSctx(node.pos);
+ this.visitChildren(node);
+ popSctx();
+ return true;
+ };
+
+ this.TransformSpec = function(node) {
+ this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']);
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+ var quantifiedDecls = [];
+ this.QuantifiedExpr = function (node) {
+ pushSctx(node.pos);
+ quantifiedDecls.push(0);
+ this.visitChildren(node);
+ for(var i=1; i <= quantifiedDecls[quantifiedDecls.length - 1]; i++) {
+ popSctx(node.pos);
+ }
+ quantifiedDecls.pop();
+ popSctx();
+ return true;
+ };
+
+ this.QuantifiedVarDecl = function(node) {
+ this.visitOnly(node, ['ExprSingle']);
+ pushSctx(node.pos);
+ quantifiedDecls[quantifiedDecls.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.FunctionCall = function(node){
+ this.visitOnly(node, ['ArgumentList']);
+ var name = translator.getFirstChild(node, 'EQName');
+ var eqname = TreeOps.flatten(name);
+ var arity = get(node, ['ArgumentList', 'Argument']).length;
+ translator.apply(function(){
+ var qname = sctx.resolveQName(eqname, node.pos);
+ try {
+ if(qname.uri !== '') {
+ sctx.root.namespaces[qname.uri].used = true;
+ }
+ } catch(e){
+ }
+ sctx.addFunctionCall(qname, arity, name.pos);
+ });
+ return true;
+ };
+
+ this.TryClause = function(node){
+ pushSctx(node.pos);
+ this.visitChildren(node);
+ popSctx();
+ return true;
+ };
+
+ this.CatchClause = function(node){
+ pushSctx(node.pos);
+ var prefix = 'err';
+ var uri = 'http://www.w3.org/2005/xqt-errors';
+ var emptyPos = { sl: 0, sc: 0, el: 0, ec: 0 };
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'code' }, 'CatchVar', emptyPos);
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'description' }, 'CatchVar', emptyPos);
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'value' }, 'CatchVar', emptyPos);
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'module' }, 'CatchVar', emptyPos);
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'line-number' }, 'CatchVar', emptyPos);
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'column-number' }, 'CatchVar', emptyPos);
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'additional' }, 'CatchVar', emptyPos);
+ this.visitChildren(node);
+ popSctx();
+ return true;
+ };
+
+ this.Pragma = function(node){
+ var qname = TreeOps.flatten(get(node, ['EQName'])[0]);
+ qname = rootStcx.resolveQName(qname, node);
+ var value = TreeOps.flatten(get(node, ['PragmaContents'])[0]);
+ if (qname.name === 'xqlint' && qname.uri === 'http://xqlint.io') {
+ pushSctx(node.pos);
+ var commands = value.match(/[a-zA-Z]+\(([^)]+)\)/g);
+ commands.forEach(function (command) {
+ var name = command.substring(0, command.indexOf('('));
+ var args = command.substring(0, command.length - 1).substring(command.indexOf('(') + 1).split(',').map(function (val) {
+ return val.trim();
+ });
+ if (name === 'varrefs') {
+ args.forEach(function (arg) {
+ var qname = sctx.resolveQName(arg.substring(1), node.pos);
+ if (qname.uri !== '') {
+ sctx.root.namespaces[qname.uri].used = true;
+ }
+ sctx.addVarRef(qname, node.pos);
+ });
+ }
+ });
+ this.visitChildren(node);
+ popSctx();
+ return true;
+ }
+ };
+
+ this.visit = function (node) {
+ var name = node.name;
+ var skip = false;
+
+ if (typeof this[name] === 'function') {
+ skip = this[name](node) === true;
+ }
+
+ if (!skip) {
+ this.visitChildren(node);
+ }
+ };
+
+ this.visitChildren = function (node, handler) {
+ for (var i = 0; i < node.children.length; i++) {
+ var child = node.children[i];
+ if (handler !== undefined && typeof handler[child.name] === 'function') {
+ handler[child.name](child);
+ } else {
+ this.visit(child);
+ }
+ }
+ };
+
+ this.visit(ast);
+ Object.keys(rootStcx.variables).forEach(function(key){
+ if(!rootStcx.varRefs[key] && (rootStcx.variables[key].annotations['http://www.w3.org/2005/xpath-functions#private'] || rootStcx.moduleNamespace === '') && rootStcx.variables[key].pos) {
+ addWarning('W03', 'Unused variable "' + rootStcx.variables[key].qname.name + '"', rootStcx.variables[key].pos);
+ }
+ });
+ Object.keys(rootStcx.namespaces).forEach(function(uri){
+ var namespace = rootStcx.namespaces[uri];
+ if(namespace.used === undefined && !namespace.override && namespace.type === 'module') {
+ addWarning('W04', 'Unused module "' + uri + '"', namespace.pos);
+ }
+ });
+};
+
+},
+{"../tree_ops":11,"./errors":1,"./handlers":2,"./static_context":4}],
+6:[function(require,module,exports){
+'use strict';
+
+var TreeOps = require('../tree_ops').TreeOps;
+
+var ID_REGEX = /[a-zA-Z_0-9\$]/;
+
+function retrievePrecedingIdentifier(text, pos, regex) {
+ regex = regex || ID_REGEX;
+ var buf = [];
+ for (var i = pos-1; i >= 0; i--) {
+ if (regex.test(text[i])) {
+ buf.push(text[i]);
+ } else {
+ break;
+ }
+ }
+ return buf.reverse().join('');
+}
+
+function prefixBinarySearch(items, prefix) {
+ var startIndex = 0;
+ var stopIndex = items.length - 1;
+ var middle = Math.floor((stopIndex + startIndex) / 2);
+
+ while (stopIndex > startIndex && middle >= 0 && items[middle].indexOf(prefix) !== 0) {
+ if (prefix < items[middle]) {
+ stopIndex = middle - 1;
+ } else if (prefix > items[middle]) {
+ startIndex = middle + 1;
+ }
+ middle = Math.floor((stopIndex + startIndex) / 2);
+ }
+ while (middle > 0 && items[middle-1].indexOf(prefix) === 0) {
+ middle--;
+ }
+ return middle >= 0 ? middle : 0; // ensure we're not returning a negative index
+}
+
+var uriRegex = /[a-zA-Z_0-9\/\.:\-#]/;
+var char = '-._A-Za-z0-9:\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02ff\u0300-\u037D\u037F-\u1FFF\u200C\u200D\u203f\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD';
+var nameChar = '[' + char + ']';
+var varChar = '[' + char + '\\$]';
+var nameCharRegExp = new RegExp(nameChar);
+var varCharRegExp = new RegExp(varChar);
+
+var varDeclLabels = {
+ 'LetBinding': 'Let binding',
+ 'Param': 'Function parameter',
+ 'QuantifiedExpr': 'Quantified expression binding',
+ 'VarDeclStatement': 'Local variable',
+ 'ForBinding': 'For binding',
+ 'TumblingWindowClause': 'Tumbling window binding',
+ 'WindowVars': 'Window variable',
+ 'SlidingWindowClause': 'Sliding window binding',
+ 'PositionalVar': 'Positional variable',
+ 'CurrentItem': 'Current item',
+ 'PreviousItem': 'Previous item',
+ 'NextItem': 'Next item',
+ 'CountClause': 'Count binding',
+ 'GroupingVariable': 'Grouping variable',
+ 'VarDecl': 'Module variable'
+};
+
+var findCompletions = function(prefix, allIdentifiers) {
+ allIdentifiers.sort();
+ var startIdx = prefixBinarySearch(allIdentifiers, prefix);
+ var matches = [];
+ for (var i = startIdx; i < allIdentifiers.length && allIdentifiers[i].indexOf(prefix) === 0; i++) {
+ matches.push(allIdentifiers[i]);
+ }
+ return matches;
+};
+
+
+var completePrefix = function(identifier, pos, sctx){
+ var idx = identifier.indexOf(':');
+ if(idx === -1) {
+ var prefixes = [];
+ var namespaces = sctx.getNamespaces();
+ Object.keys(namespaces).forEach(function(key){
+ if(namespaces[key].type === 'module' || key === 'http://www.w3.org/2005/xquery-local-functions') {
+ prefixes.push(namespaces[key].prefix);
+ }
+ });
+ var matches = findCompletions(identifier, prefixes);
+ var match = function(name) {
+ return {
+ name: name + ':',
+ value: name + ':',
+ meta: 'prefix'
+ };
+ };
+ return matches.map(match);
+ } else {
+ return [];
+ }
+};
+
+var completeFunction = function(identifier, pos, sctx){
+ var names = [];
+ var snippets = {};
+ var functions = sctx.getFunctions();
+ var uri = '';
+ var prefix = '';
+ var name = identifier;
+ var idx = identifier.indexOf(':');
+ var defaultNamespace = false;
+ if(idx !== -1){
+ prefix = identifier.substring(0, idx);
+ name = identifier.substring(idx + 1);
+ var ns = sctx.getNamespaceByPrefix(prefix);
+ if(ns){
+ uri = sctx.getNamespaceByPrefix(prefix).uri;
+ }
+ } else {
+ defaultNamespace = true;
+ uri = sctx.root.defaultFunctionNamespace;
+ }
+ Object.keys(functions).forEach(function(key){
+ var fn = functions[key];
+ var ns = key.substring(0, key.indexOf('#'));
+ var name = key.substring(key.indexOf('#') + 1);
+ name = name.substring(0, name.indexOf('#'));
+ if(ns !== uri) {
+ return;
+ }
+ if(!defaultNamespace){
+ name = sctx.getNamespaces()[ns].prefix + ':' + name;
+ }
+ name += '(';
+ var snippet = name;
+ snippet += fn.params.map(function(param, index){
+ return '${' + (index + 1) + ':\\' + param.split(' ')[0] + '}';
+ }).join(', ');
+ name += fn.params.join(', ');
+ name += ')';
+ snippet += ')';
+ names.push(name);
+ snippets[name] = snippet;
+ });
+ var matches = findCompletions(identifier, names);
+ var match = function(name) {
+ return {
+ name: name,
+ value: name,
+ meta: 'function',
+ priority: 4,
+ identifierRegex: nameCharRegExp,
+ snippet: snippets[name]
+ };
+ };
+ return matches.map(match);
+};
+
+var completeVariable = function(identifier, pos, sctx){
+ var uri = '';
+ var prefix = '';
+ var idx = identifier.indexOf(':');
+ if(idx !== -1){
+ prefix = identifier.substring(0, idx);
+ uri = sctx.getNamespaceByPrefix(prefix).uri;
+ }
+ var decls = sctx.getVariables();
+ var names = [];
+ var types = {};
+ Object.keys(decls).forEach(function(key){
+ var i = key.indexOf('#');
+ var ns = key.substring(0, i);
+ var name = key.substring(i+1);
+ if(ns !== ''){
+ names.push(sctx.getPrefixByNamespace(ns) + ':' + name);
+ types[sctx.getPrefixByNamespace(ns) + ':' + name] = decls[key].type;
+ } else {
+ names.push(name);
+ types[name] = decls[key].type;
+ }
+ });
+
+ var matches = findCompletions(identifier, names);
+ var match = function(name) {
+ return {
+ name: '$' + name,
+ value: '$' + name,
+ meta: varDeclLabels[types[name]],
+ priority: 4,
+ identifierRegex: varCharRegExp
+ };
+ };
+ return matches.map(match);
+};
+
+var completeExpr = function(line, pos, sctx){
+ var identifier = retrievePrecedingIdentifier(line, pos.col, nameCharRegExp);
+ var before = line.substring(0, pos.col - (identifier.length === 0 ? 0 : identifier.length));
+ var isVar = before[before.length - 1] === '$';
+ if(isVar) {
+ return completeVariable(identifier, pos, sctx);
+ } else if(identifier !== '') {
+ return completeFunction(identifier, pos, sctx).concat(completePrefix(identifier, pos, sctx));
+ } else {
+ return completeVariable(identifier, pos, sctx).concat(completeFunction(identifier, pos, sctx)).concat(completePrefix(identifier, pos, sctx));
+ }
+};
+
+var completeModuleUri = function(line, pos, sctx){
+ var identifier = retrievePrecedingIdentifier(line, pos.col, uriRegex);
+ var matches = findCompletions(identifier, sctx.getAvailableModuleNamespaces());
+ var match = function(uri) {
+ return {
+ name: uri,
+ value: uri,
+ meta: 'module',
+ priority: 4,
+ identifierRegex: uriRegex
+ };
+ };
+ return matches.map(match);
+};
+
+exports.complete = function(source, ast, rootSctx, pos){
+ var line = source.split('\n')[pos.line];
+ var node = TreeOps.findNode(ast, pos);
+ var sctx = TreeOps.findNode(rootSctx, pos);
+ sctx = sctx ? sctx : rootSctx;
+ if(node && node.name === 'URILiteral' && node.getParent && node.getParent.name === 'ModuleImport'){
+ return completeModuleUri(line, pos, sctx);
+ } else {
+ return completeExpr(line, pos, sctx);
+ }
+};
+
+},
+{"../tree_ops":11}],
+7:[function(require,module,exports){
+exports.StyleChecker = function (ast, source) {
+ 'use strict';
+
+ var tab = ' ';
+ var markers = [];
+
+ this.getMarkers = function(){
+ return markers;
+ };
+
+ this.WS = function(node) {
+ var lines = node.value.split('\n');
+ lines.forEach(function(line, index){
+ var isFirst = index === 0;
+ var isLast = index === (lines.length - 1);
+
+ if(/\r$/.test(line)) {
+ markers.push({
+ pos: {
+ sl: node.pos.sl + index,
+ el: node.pos.sl + index,
+ sc: line.length - 1,
+ ec: line.length
+ },
+ type: 'warning',
+ level: 'warning',
+ message: '[SW01] Detected CRLF'
+ });
+ }
+
+ var match = line.match(/\t+/);
+ if(match !== null){
+ markers.push({
+ pos: {
+ sl: node.pos.sl + index,
+ el: node.pos.sl + index,
+ sc: match.index,
+ ec: match.index + match[0].length
+ },
+ type: 'warning',
+ level: 'warning',
+ message: '[SW02] Tabs detected'
+ });
+ }
+
+ if((!isFirst) && isLast){
+ match = line.match(/^\ +/);
+ if(match !== null) {
+ var mod = match[0].length % tab.length;
+ if(mod !== 0) {
+ markers.push({
+ pos: {
+ sl: node.pos.sl + index,
+ el: node.pos.sl + index,
+ sc: match.index,
+ ec: match.index + match[0].length
+ },
+ type: 'warning',
+ level: 'warning',
+ message: '[SW03] Unexcepted indentation of ' + match[0].length
+ });
+ }
+ }
+ }
+ });
+ return true;
+ };
+
+ this.visit = function (node, index) {
+ var name = node.name;
+ var skip = false;
+
+ if (typeof this[name] === 'function') {
+ skip = this[name](node, index) === true;
+ }
+
+ if (!skip) {
+ this.visitChildren(node);
+ }
+ };
+
+ this.visitChildren = function (node, handler) {
+ for (var i = 0; i < node.children.length; i++) {
+ var child = node.children[i];
+ if (handler !== undefined && typeof handler[child.name] === 'function') {
+ handler[child.name](child);
+ } else {
+ this.visit(child);
+ }
+ }
+ };
+
+ source.split('\n').forEach(function(line, index){
+ var match = line.match(/\ +$/);
+ if(match){
+ markers.push({
+ pos: {
+ sl: index,
+ el: index,
+ sc: match.index,
+ ec: match.index + match[0].length
+ },
+ type: 'warning',
+ level: 'warning',
+ message: '[SW04] Trailing whitespace'
+ });
+ }
+ });
+ this.visit(ast);
+};
+},
+{}],
+8:[function(require,module,exports){
+exports.JSONParseTreeHandler = function (code) {
+ 'use strict';
+ var toBeIndex = ['VarDecl', 'FunctionDecl'];
var list = [
- "OrExpr", "AndExpr", "ComparisonExpr", "StringConcatExpr", "RangeExpr"
- , "UnionExpr", "IntersectExceptExpr", "InstanceofExpr", "TreatExpr", "CastableExpr"
- , "CastExpr", "UnaryExpr", "ValueExpr", "FTContainsExpr", "SimpleMapExpr", "PathExpr", "RelativePathExpr"
- , "PostfixExpr", "StepExpr"
+ 'OrExpr', 'AndExpr', 'ComparisonExpr', 'StringConcatExpr', 'RangeExpr',
+ 'UnionExpr', 'IntersectExceptExpr', 'InstanceofExpr', 'TreatExpr', 'CastableExpr', 'CastExpr', 'UnaryExpr', 'ValueExpr',
+ 'FTContainsExpr', 'SimpleMapExpr', 'PathExpr', 'RelativePathExpr', 'PostfixExpr', 'StepExpr'
];
-
+
var ast = null;
var ptr = null;
var remains = code;
var cursor = 0;
var lineCursor = 0;
var line = 0;
- var col = 0;
- function createNode(name){
- return { name: name, children: [], getParent: null, pos: { sl: 0, sc: 0, el: 0, ec: 0 } };
+ function createNode(name) {
+ return {
+ name: name,
+ children: [],
+ getParent: null,
+ pos: {
+ sl: 0,
+ sc: 0,
+ el: 0,
+ ec: 0
+ }
+ };
}
-
- function pushNode(name, begin){
- var node = createNode(name);
- if(ast === null) {
- ast = node;
- ptr = node;
- } else {
- node.getParent = ptr;
- ptr.children.push(node);
- ptr = ptr.children[ptr.children.length - 1];
- }
+
+ function pushNode(name) { //begin
+ var node = createNode(name);
+ if (ast === null) {
+ ast = node;
+ ast.index = [];
+ ptr = node;
+ } else {
+ node.getParent = ptr;
+ ptr.children.push(node);
+ ptr = ptr.children[ptr.children.length - 1];
+ }
}
+
+ function popNode() {
+
+ if (ptr.children.length > 0) {
+ var s = ptr.children[0];
+ var e = null;
+ for (var i = ptr.children.length - 1; i >= 0; i--) {
+ e = ptr.children[i];
+ if (e.pos.el !== 0 || e.pos.ec !== 0) {
+ break;
+ }
+ }
+ ptr.pos.sl = s.pos.sl;
+ ptr.pos.sc = s.pos.sc;
+ ptr.pos.el = e.pos.el;
+ ptr.pos.ec = e.pos.ec;
+ }
+ if (ptr.name === 'FunctionName') {
+ ptr.name = 'EQName';
+ }
+ if (ptr.name === 'EQName' && ptr.value === undefined) {
+ ptr.value = ptr.children[0].value;
+ ptr.children.pop();
+ }
- function popNode(){
-
- if(ptr.children.length > 0) {
- var s = ptr.children[0];
- var e = null;
- for(var i= ptr.children.length - 1; i >= 0;i--) {
- e = ptr.children[i];
- if(e.pos.el !== 0 || e.pos.ec !== 0) {
- break;
- }
+ if(toBeIndex.indexOf(ptr.name) !== -1) {
+ ast.index.push(ptr);
}
- ptr.pos.sl = s.pos.sl;
- ptr.pos.sc = s.pos.sc;
- ptr.pos.el = e.pos.el;
- ptr.pos.ec = e.pos.ec;
- }
- if(ptr.name === "FunctionName") {
- ptr.name = "EQName";
- }
- if(ptr.name === "EQName" && ptr.value === undefined) {
- ptr.value = ptr.children[0].value;
- ptr.children.pop();
- }
-
- if(ptr.getParent !== null) {
- ptr = ptr.getParent;
- } else {
- }
- if(ptr.children.length > 0) {
- var lastChild = ptr.children[ptr.children.length - 1];
- if(lastChild.children.length === 1 && list.indexOf(lastChild.name) !== -1) {
- ptr.children[ptr.children.length - 1] = lastChild.children[0];
+
+ if (ptr.getParent !== null) {
+ ptr = ptr.getParent;
+ } else {
+ }
+ if (ptr.children.length > 0) {
+ var lastChild = ptr.children[ptr.children.length - 1];
+ if (lastChild.children.length === 1 && list.indexOf(lastChild.name) !== -1) {
+ ptr.children[ptr.children.length - 1] = lastChild.children[0];
+ }
}
- }
}
-
- this.closeParseTree = function() {
- while(ptr.getParent !== null) {
+
+ this.closeParseTree = function () {
+ while (ptr.getParent !== null) {
+ popNode();
+ }
popNode();
- }
- popNode();
};
- this.peek = function() {
- return ptr;
+ this.peek = function () {
+ return ptr;
};
-
- this.getParseTree = function() {
- return ast;
+
+ this.getParseTree = function () {
+ return ast;
};
-
- this.reset = function(input) {};
- this.startNonterminal = function(name, begin) {
- pushNode(name, begin);
+ this.reset = function () {}; //input
+
+ this.startNonterminal = function (name, begin) {
+ pushNode(name, begin);
};
- this.endNonterminal = function(name, end) {
- popNode();
+ this.endNonterminal = function () {//name, end
+ popNode();
};
- this.terminal = function(name, begin, end) {
- name = (name.substring(0, 1) === "'" && name.substring(name.length - 1) === "'") ? "TOKEN" : name;
- pushNode(name, begin);
- setValue(ptr, begin, end);
- popNode();
+ this.terminal = function (name, begin, end) {
+ name = (name.substring(0, 1) === '\'' && name.substring(name.length - 1) === '\'') ? 'TOKEN' : name;
+ pushNode(name, begin);
+ setValue(ptr, begin, end);
+ popNode();
};
- this.whitespace = function(begin, end) {
- var name = "WS";
- pushNode(name, begin);
- setValue(ptr, begin, end);
- popNode();
+ this.whitespace = function (begin, end) {
+ var name = 'WS';
+ pushNode(name, begin);
+ setValue(ptr, begin, end);
+ popNode();
};
function setValue(node, begin, end) {
-
- var e = end - cursor;
- ptr.value = remains.substring(0, e);
- remains = remains.substring(e);
- cursor = end;
-
- var sl = line;
- var sc = lineCursor;
- var el = sl + ptr.value.split("\n").length - 1;
- var lastIdx = ptr.value.lastIndexOf("\n");
- var ec = lastIdx === -1 ? sc + ptr.value.length : ptr.value.substring(lastIdx + 1).length;
-
- line = el;
- lineCursor = ec;
-
- ptr.pos.sl = sl;
- ptr.pos.sc = sc;
- ptr.pos.el = el;
- ptr.pos.ec = ec;
- }
+
+ var e = end - cursor;
+ ptr.value = remains.substring(0, e);
+ remains = remains.substring(e);
+ cursor = end;
+
+ var sl = line;
+ var sc = lineCursor;
+ var el = sl + ptr.value.split('\n').length - 1;
+ var lastIdx = ptr.value.lastIndexOf('\n');
+ var ec = lastIdx === -1 ? sc + ptr.value.length : ptr.value.substring(lastIdx + 1).length;
+
+ line = el;
+ lineCursor = ec;
+
+ ptr.pos.sl = sl;
+ ptr.pos.sc = sc;
+ ptr.pos.el = el;
+ ptr.pos.ec = ec;
+ }
+};
+},
+{}],
+9:[function(require,module,exports){
+ var JSONiqParser = exports.JSONiqParser = function JSONiqParser(string, parsingEventHandler)
+ {
+ init(string, parsingEventHandler);
+ var self = this;
+
+ this.ParseException = function(b, e, s, o, x)
+ {
+ var
+ begin = b,
+ end = e,
+ state = s,
+ offending = o,
+ expected = x;
+
+ this.getBegin = function() {return begin;};
+ this.getEnd = function() {return end;};
+ this.getState = function() {return state;};
+ this.getExpected = function() {return expected;};
+ this.getOffending = function() {return offending;};
+
+ this.getMessage = function()
+ {
+ return offending < 0 ? "lexical analysis failed" : "syntax error";
+ };
};
-});
- ace.define('ace/mode/xquery/XQueryParser', ['require', 'exports', 'module' ], function(require, exports, module) {
+ function init(string, parsingEventHandler)
+ {
+ eventHandler = parsingEventHandler;
+ input = string;
+ size = string.length;
+ reset(0, 0, 0);
+ }
+
+ this.getInput = function()
+ {
+ return input;
+ };
+
+ function reset(l, b, e)
+ {
+ b0 = b; e0 = b;
+ l1 = l; b1 = b; e1 = e;
+ l2 = 0;
+ end = e;
+ ex = -1;
+ memo = {};
+ eventHandler.reset(input);
+ }
+
+ this.getOffendingToken = function(e)
+ {
+ var o = e.getOffending();
+ return o >= 0 ? JSONiqParser.TOKEN[o] : null;
+ };
+
+ this.getExpectedTokenSet = function(e)
+ {
+ var expected;
+ if (e.getExpected() < 0)
+ {
+ expected = JSONiqParser.getTokenSet(- e.getState());
+ }
+ else
+ {
+ expected = [JSONiqParser.TOKEN[e.getExpected()]];
+ }
+ return expected;
+ };
+
+ this.getErrorMessage = function(e)
+ {
+ var tokenSet = this.getExpectedTokenSet(e);
+ var found = this.getOffendingToken(e);
+ var prefix = input.substring(0, e.getBegin());
+ var lines = prefix.split("\n");
+ var line = lines.length;
+ var column = lines[line - 1].length + 1;
+ var size = e.getEnd() - e.getBegin();
+ return e.getMessage()
+ + (found == null ? "" : ", found " + found)
+ + "\nwhile expecting "
+ + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]"))
+ + "\n"
+ + (size == 0 || found != null ? "" : "after successfully scanning " + size + " characters beginning ")
+ + "at line " + line + ", column " + column + ":\n..."
+ + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64))
+ + "...";
+ };
+
+ this.parse_XQuery = function()
+ {
+ eventHandler.startNonterminal("XQuery", e0);
+ lookahead1W(278); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Module();
+ shift(25); // EOF
+ eventHandler.endNonterminal("XQuery", e0);
+ };
+
+ function parse_Module()
+ {
+ eventHandler.startNonterminal("Module", e0);
+ switch (l1)
+ {
+ case 170: // 'jsoniq'
+ lookahead2W(168); // S^WS | '#' | '(' | '(:' | 'encoding' | 'version'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 64682 // 'jsoniq' 'encoding'
+ || lk == 137898) // 'jsoniq' 'version'
+ {
+ parse_VersionDecl();
+ }
+ lookahead1W(278); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 185: // 'module'
+ lookahead2W(146); // S^WS | '#' | '(' | '(:' | 'namespace'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 95929: // 'module' 'namespace'
+ whitespace();
+ parse_LibraryModule();
+ break;
+ default:
+ whitespace();
+ parse_MainModule();
+ }
+ eventHandler.endNonterminal("Module", e0);
+ }
+
+ function parse_VersionDecl()
+ {
+ eventHandler.startNonterminal("VersionDecl", e0);
+ shift(170); // 'jsoniq'
+ lookahead1W(120); // S^WS | '(:' | 'encoding' | 'version'
+ switch (l1)
+ {
+ case 126: // 'encoding'
+ shift(126); // 'encoding'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ break;
+ default:
+ shift(269); // 'version'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ lookahead1W(113); // S^WS | '(:' | ';' | 'encoding'
+ if (l1 == 126) // 'encoding'
+ {
+ shift(126); // 'encoding'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ }
+ lookahead1W(29); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ eventHandler.endNonterminal("VersionDecl", e0);
+ }
+
+ function parse_LibraryModule()
+ {
+ eventHandler.startNonterminal("LibraryModule", e0);
+ parse_ModuleDecl();
+ lookahead1W(142); // S^WS | EOF | '(:' | 'declare' | 'import'
+ whitespace();
+ parse_Prolog();
+ eventHandler.endNonterminal("LibraryModule", e0);
+ }
+
+ function parse_ModuleDecl()
+ {
+ eventHandler.startNonterminal("ModuleDecl", e0);
+ shift(185); // 'module'
+ lookahead1W(64); // S^WS | '(:' | 'namespace'
+ shift(187); // 'namespace'
+ lookahead1W(240); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NCName();
+ lookahead1W(30); // S^WS | '(:' | '='
+ shift(61); // '='
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(29); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ eventHandler.endNonterminal("ModuleDecl", e0);
+ }
+
+ function parse_Prolog()
+ {
+ eventHandler.startNonterminal("Prolog", e0);
+ for (;;)
+ {
+ lookahead1W(278); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 109: // 'declare'
+ lookahead2W(207); // S^WS | '#' | '%' | '(' | '(:' | 'base-uri' | 'boundary-space' | 'collection' |
+ break;
+ case 155: // 'import'
+ lookahead2W(169); // S^WS | '#' | '(' | '(:' | 'module' | 'schema'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 43117 // 'declare' 'base-uri'
+ && lk != 44141 // 'declare' 'boundary-space'
+ && lk != 50797 // 'declare' 'construction'
+ && lk != 53869 // 'declare' 'copy-namespaces'
+ && lk != 54893 // 'declare' 'decimal-format'
+ && lk != 56429 // 'declare' 'default'
+ && lk != 73325 // 'declare' 'ft-option'
+ && lk != 94875 // 'import' 'module'
+ && lk != 95853 // 'declare' 'namespace'
+ && lk != 106093 // 'declare' 'ordering'
+ && lk != 115821 // 'declare' 'revalidation'
+ && lk != 117403) // 'import' 'schema'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 109: // 'declare'
+ lookahead2W(201); // S^WS | '(:' | 'base-uri' | 'boundary-space' | 'construction' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 56429) // 'declare' 'default'
+ {
+ lk = memoized(0, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_DefaultNamespaceDecl();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(0, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ whitespace();
+ parse_DefaultNamespaceDecl();
+ break;
+ case 95853: // 'declare' 'namespace'
+ whitespace();
+ parse_NamespaceDecl();
+ break;
+ case 155: // 'import'
+ whitespace();
+ parse_Import();
+ break;
+ case 73325: // 'declare' 'ft-option'
+ whitespace();
+ parse_FTOptionDecl();
+ break;
+ default:
+ whitespace();
+ parse_Setter();
+ }
+ lookahead1W(29); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ }
+ for (;;)
+ {
+ lookahead1W(278); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 109: // 'declare'
+ lookahead2W(202); // S^WS | '#' | '%' | '(' | '(:' | 'collection' | 'context' | 'function' | 'index' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 17005 // 'declare' '%'
+ && lk != 49261 // 'declare' 'collection'
+ && lk != 52333 // 'declare' 'context'
+ && lk != 75373 // 'declare' 'function'
+ && lk != 80493 // 'declare' 'index'
+ && lk != 83565 // 'declare' 'integrity'
+ && lk != 104045 // 'declare' 'option'
+ && lk != 134765 // 'declare' 'updating'
+ && lk != 137325) // 'declare' 'variable'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 109: // 'declare'
+ lookahead2W(197); // S^WS | '%' | '(:' | 'collection' | 'context' | 'function' | 'index' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 52333: // 'declare' 'context'
+ whitespace();
+ parse_ContextItemDecl();
+ break;
+ case 104045: // 'declare' 'option'
+ whitespace();
+ parse_OptionDecl();
+ break;
+ default:
+ whitespace();
+ parse_AnnotatedDecl();
+ }
+ lookahead1W(29); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ }
+ eventHandler.endNonterminal("Prolog", e0);
+ }
+
+ function parse_Separator()
+ {
+ eventHandler.startNonterminal("Separator", e0);
+ shift(54); // ';'
+ eventHandler.endNonterminal("Separator", e0);
+ }
+
+ function parse_Setter()
+ {
+ eventHandler.startNonterminal("Setter", e0);
+ switch (l1)
+ {
+ case 109: // 'declare'
+ lookahead2W(194); // S^WS | '(:' | 'base-uri' | 'boundary-space' | 'construction' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 56429) // 'declare' 'default'
+ {
+ lk = memoized(1, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_DefaultCollationDecl();
+ lk = -2;
+ }
+ catch (p2A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_EmptyOrderDecl();
+ lk = -6;
+ }
+ catch (p6A)
+ {
+ lk = -9;
+ }
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(1, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case 44141: // 'declare' 'boundary-space'
+ parse_BoundarySpaceDecl();
+ break;
+ case -2:
+ parse_DefaultCollationDecl();
+ break;
+ case 43117: // 'declare' 'base-uri'
+ parse_BaseURIDecl();
+ break;
+ case 50797: // 'declare' 'construction'
+ parse_ConstructionDecl();
+ break;
+ case 106093: // 'declare' 'ordering'
+ parse_OrderingModeDecl();
+ break;
+ case -6:
+ parse_EmptyOrderDecl();
+ break;
+ case 115821: // 'declare' 'revalidation'
+ parse_RevalidationDecl();
+ break;
+ case 53869: // 'declare' 'copy-namespaces'
+ parse_CopyNamespacesDecl();
+ break;
+ default:
+ parse_DecimalFormatDecl();
+ }
+ eventHandler.endNonterminal("Setter", e0);
+ }
+
+ function parse_BoundarySpaceDecl()
+ {
+ eventHandler.startNonterminal("BoundarySpaceDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(36); // S^WS | '(:' | 'boundary-space'
+ shift(86); // 'boundary-space'
+ lookahead1W(137); // S^WS | '(:' | 'preserve' | 'strip'
+ switch (l1)
+ {
+ case 218: // 'preserve'
+ shift(218); // 'preserve'
+ break;
+ default:
+ shift(246); // 'strip'
+ }
+ eventHandler.endNonterminal("BoundarySpaceDecl", e0);
+ }
+
+ function parse_DefaultCollationDecl()
+ {
+ eventHandler.startNonterminal("DefaultCollationDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(49); // S^WS | '(:' | 'default'
+ shift(110); // 'default'
+ lookahead1W(41); // S^WS | '(:' | 'collation'
+ shift(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("DefaultCollationDecl", e0);
+ }
+
+ function try_DefaultCollationDecl()
+ {
+ shiftT(109); // 'declare'
+ lookahead1W(49); // S^WS | '(:' | 'default'
+ shiftT(110); // 'default'
+ lookahead1W(41); // S^WS | '(:' | 'collation'
+ shiftT(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+
+ function parse_BaseURIDecl()
+ {
+ eventHandler.startNonterminal("BaseURIDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(35); // S^WS | '(:' | 'base-uri'
+ shift(84); // 'base-uri'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("BaseURIDecl", e0);
+ }
+
+ function parse_ConstructionDecl()
+ {
+ eventHandler.startNonterminal("ConstructionDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(44); // S^WS | '(:' | 'construction'
+ shift(99); // 'construction'
+ lookahead1W(137); // S^WS | '(:' | 'preserve' | 'strip'
+ switch (l1)
+ {
+ case 246: // 'strip'
+ shift(246); // 'strip'
+ break;
+ default:
+ shift(218); // 'preserve'
+ }
+ eventHandler.endNonterminal("ConstructionDecl", e0);
+ }
+
+ function parse_OrderingModeDecl()
+ {
+ eventHandler.startNonterminal("OrderingModeDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(71); // S^WS | '(:' | 'ordering'
+ shift(207); // 'ordering'
+ lookahead1W(135); // S^WS | '(:' | 'ordered' | 'unordered'
+ switch (l1)
+ {
+ case 206: // 'ordered'
+ shift(206); // 'ordered'
+ break;
+ default:
+ shift(262); // 'unordered'
+ }
+ eventHandler.endNonterminal("OrderingModeDecl", e0);
+ }
+
+ function parse_EmptyOrderDecl()
+ {
+ eventHandler.startNonterminal("EmptyOrderDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(49); // S^WS | '(:' | 'default'
+ shift(110); // 'default'
+ lookahead1W(70); // S^WS | '(:' | 'order'
+ shift(205); // 'order'
+ lookahead1W(52); // S^WS | '(:' | 'empty'
+ shift(124); // 'empty'
+ lookahead1W(125); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 149: // 'greatest'
+ shift(149); // 'greatest'
+ break;
+ default:
+ shift(176); // 'least'
+ }
+ eventHandler.endNonterminal("EmptyOrderDecl", e0);
+ }
+
+ function try_EmptyOrderDecl()
+ {
+ shiftT(109); // 'declare'
+ lookahead1W(49); // S^WS | '(:' | 'default'
+ shiftT(110); // 'default'
+ lookahead1W(70); // S^WS | '(:' | 'order'
+ shiftT(205); // 'order'
+ lookahead1W(52); // S^WS | '(:' | 'empty'
+ shiftT(124); // 'empty'
+ lookahead1W(125); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 149: // 'greatest'
+ shiftT(149); // 'greatest'
+ break;
+ default:
+ shiftT(176); // 'least'
+ }
+ }
+
+ function parse_CopyNamespacesDecl()
+ {
+ eventHandler.startNonterminal("CopyNamespacesDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(47); // S^WS | '(:' | 'copy-namespaces'
+ shift(105); // 'copy-namespaces'
+ lookahead1W(132); // S^WS | '(:' | 'no-preserve' | 'preserve'
+ whitespace();
+ parse_PreserveMode();
+ lookahead1W(25); // S^WS | '(:' | ','
+ shift(42); // ','
+ lookahead1W(127); // S^WS | '(:' | 'inherit' | 'no-inherit'
+ whitespace();
+ parse_InheritMode();
+ eventHandler.endNonterminal("CopyNamespacesDecl", e0);
+ }
+
+ function parse_PreserveMode()
+ {
+ eventHandler.startNonterminal("PreserveMode", e0);
+ switch (l1)
+ {
+ case 218: // 'preserve'
+ shift(218); // 'preserve'
+ break;
+ default:
+ shift(193); // 'no-preserve'
+ }
+ eventHandler.endNonterminal("PreserveMode", e0);
+ }
+
+ function parse_InheritMode()
+ {
+ eventHandler.startNonterminal("InheritMode", e0);
+ switch (l1)
+ {
+ case 159: // 'inherit'
+ shift(159); // 'inherit'
+ break;
+ default:
+ shift(192); // 'no-inherit'
+ }
+ eventHandler.endNonterminal("InheritMode", e0);
+ }
+
+ function parse_DecimalFormatDecl()
+ {
+ eventHandler.startNonterminal("DecimalFormatDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(118); // S^WS | '(:' | 'decimal-format' | 'default'
+ switch (l1)
+ {
+ case 107: // 'decimal-format'
+ shift(107); // 'decimal-format'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ break;
+ default:
+ shift(110); // 'default'
+ lookahead1W(48); // S^WS | '(:' | 'decimal-format'
+ shift(107); // 'decimal-format'
+ }
+ for (;;)
+ {
+ lookahead1W(204); // S^WS | '(:' | ';' | 'NaN' | 'decimal-separator' | 'digit' |
+ if (l1 == 54) // ';'
+ {
+ break;
+ }
+ whitespace();
+ parse_DFPropertyName();
+ lookahead1W(30); // S^WS | '(:' | '='
+ shift(61); // '='
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ eventHandler.endNonterminal("DecimalFormatDecl", e0);
+ }
+
+ function parse_DFPropertyName()
+ {
+ eventHandler.startNonterminal("DFPropertyName", e0);
+ switch (l1)
+ {
+ case 108: // 'decimal-separator'
+ shift(108); // 'decimal-separator'
+ break;
+ case 151: // 'grouping-separator'
+ shift(151); // 'grouping-separator'
+ break;
+ case 158: // 'infinity'
+ shift(158); // 'infinity'
+ break;
+ case 182: // 'minus-sign'
+ shift(182); // 'minus-sign'
+ break;
+ case 68: // 'NaN'
+ shift(68); // 'NaN'
+ break;
+ case 213: // 'percent'
+ shift(213); // 'percent'
+ break;
+ case 212: // 'per-mille'
+ shift(212); // 'per-mille'
+ break;
+ case 280: // 'zero-digit'
+ shift(280); // 'zero-digit'
+ break;
+ case 117: // 'digit'
+ shift(117); // 'digit'
+ break;
+ default:
+ shift(211); // 'pattern-separator'
+ }
+ eventHandler.endNonterminal("DFPropertyName", e0);
+ }
+
+ function parse_Import()
+ {
+ eventHandler.startNonterminal("Import", e0);
+ switch (l1)
+ {
+ case 155: // 'import'
+ lookahead2W(130); // S^WS | '(:' | 'module' | 'schema'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 117403: // 'import' 'schema'
+ parse_SchemaImport();
+ break;
+ default:
+ parse_ModuleImport();
+ }
+ eventHandler.endNonterminal("Import", e0);
+ }
+
+ function parse_SchemaImport()
+ {
+ eventHandler.startNonterminal("SchemaImport", e0);
+ shift(155); // 'import'
+ lookahead1W(76); // S^WS | '(:' | 'schema'
+ shift(229); // 'schema'
+ lookahead1W(141); // URILiteral | S^WS | '(:' | 'default' | 'namespace'
+ if (l1 != 7) // URILiteral
+ {
+ whitespace();
+ parse_SchemaPrefix();
+ }
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(112); // S^WS | '(:' | ';' | 'at'
+ if (l1 == 82) // 'at'
+ {
+ shift(82); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ for (;;)
+ {
+ lookahead1W(107); // S^WS | '(:' | ',' | ';'
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ }
+ eventHandler.endNonterminal("SchemaImport", e0);
+ }
+
+ function parse_SchemaPrefix()
+ {
+ eventHandler.startNonterminal("SchemaPrefix", e0);
+ switch (l1)
+ {
+ case 187: // 'namespace'
+ shift(187); // 'namespace'
+ lookahead1W(240); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NCName();
+ lookahead1W(30); // S^WS | '(:' | '='
+ shift(61); // '='
+ break;
+ default:
+ shift(110); // 'default'
+ lookahead1W(50); // S^WS | '(:' | 'element'
+ shift(122); // 'element'
+ lookahead1W(64); // S^WS | '(:' | 'namespace'
+ shift(187); // 'namespace'
+ }
+ eventHandler.endNonterminal("SchemaPrefix", e0);
+ }
+
+ function parse_ModuleImport()
+ {
+ eventHandler.startNonterminal("ModuleImport", e0);
+ shift(155); // 'import'
+ lookahead1W(63); // S^WS | '(:' | 'module'
+ shift(185); // 'module'
+ lookahead1W(93); // URILiteral | S^WS | '(:' | 'namespace'
+ if (l1 == 187) // 'namespace'
+ {
+ shift(187); // 'namespace'
+ lookahead1W(240); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NCName();
+ lookahead1W(30); // S^WS | '(:' | '='
+ shift(61); // '='
+ }
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(112); // S^WS | '(:' | ';' | 'at'
+ if (l1 == 82) // 'at'
+ {
+ shift(82); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ for (;;)
+ {
+ lookahead1W(107); // S^WS | '(:' | ',' | ';'
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ }
+ eventHandler.endNonterminal("ModuleImport", e0);
+ }
+
+ function parse_NamespaceDecl()
+ {
+ eventHandler.startNonterminal("NamespaceDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(64); // S^WS | '(:' | 'namespace'
+ shift(187); // 'namespace'
+ lookahead1W(240); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NCName();
+ lookahead1W(30); // S^WS | '(:' | '='
+ shift(61); // '='
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("NamespaceDecl", e0);
+ }
+
+ function parse_DefaultNamespaceDecl()
+ {
+ eventHandler.startNonterminal("DefaultNamespaceDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(49); // S^WS | '(:' | 'default'
+ shift(110); // 'default'
+ lookahead1W(119); // S^WS | '(:' | 'element' | 'function'
+ switch (l1)
+ {
+ case 122: // 'element'
+ shift(122); // 'element'
+ break;
+ default:
+ shift(147); // 'function'
+ }
+ lookahead1W(64); // S^WS | '(:' | 'namespace'
+ shift(187); // 'namespace'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("DefaultNamespaceDecl", e0);
+ }
+
+ function try_DefaultNamespaceDecl()
+ {
+ shiftT(109); // 'declare'
+ lookahead1W(49); // S^WS | '(:' | 'default'
+ shiftT(110); // 'default'
+ lookahead1W(119); // S^WS | '(:' | 'element' | 'function'
+ switch (l1)
+ {
+ case 122: // 'element'
+ shiftT(122); // 'element'
+ break;
+ default:
+ shiftT(147); // 'function'
+ }
+ lookahead1W(64); // S^WS | '(:' | 'namespace'
+ shiftT(187); // 'namespace'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+
+ function parse_FTOptionDecl()
+ {
+ eventHandler.startNonterminal("FTOptionDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(55); // S^WS | '(:' | 'ft-option'
+ shift(143); // 'ft-option'
+ lookahead1W(84); // S^WS | '(:' | 'using'
+ whitespace();
+ parse_FTMatchOptions();
+ eventHandler.endNonterminal("FTOptionDecl", e0);
+ }
+
+ function parse_AnnotatedDecl()
+ {
+ eventHandler.startNonterminal("AnnotatedDecl", e0);
+ shift(109); // 'declare'
+ for (;;)
+ {
+ lookahead1W(192); // S^WS | '%' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
+ if (l1 != 33 // '%'
+ && l1 != 263) // 'updating'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 263: // 'updating'
+ whitespace();
+ parse_CompatibilityAnnotation();
+ break;
+ default:
+ whitespace();
+ parse_Annotation();
+ }
+ }
+ switch (l1)
+ {
+ case 268: // 'variable'
+ whitespace();
+ parse_VarDecl();
+ break;
+ case 147: // 'function'
+ whitespace();
+ parse_FunctionDecl();
+ break;
+ case 96: // 'collection'
+ whitespace();
+ parse_CollectionDecl();
+ break;
+ case 157: // 'index'
+ whitespace();
+ parse_IndexDecl();
+ break;
+ default:
+ whitespace();
+ parse_ICDecl();
+ }
+ eventHandler.endNonterminal("AnnotatedDecl", e0);
+ }
+
+ function parse_CompatibilityAnnotation()
+ {
+ eventHandler.startNonterminal("CompatibilityAnnotation", e0);
+ shift(263); // 'updating'
+ eventHandler.endNonterminal("CompatibilityAnnotation", e0);
+ }
+
+ function parse_Annotation()
+ {
+ eventHandler.startNonterminal("Annotation", e0);
+ shift(33); // '%'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(193); // S^WS | '%' | '(' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
+ if (l1 == 35) // '('
+ {
+ shift(35); // '('
+ lookahead1W(190); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:' |
+ whitespace();
+ parse_Literal();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(190); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:' |
+ whitespace();
+ parse_Literal();
+ }
+ shift(38); // ')'
+ }
+ eventHandler.endNonterminal("Annotation", e0);
+ }
+
+ function try_Annotation()
+ {
+ shiftT(33); // '%'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_EQName();
+ lookahead1W(193); // S^WS | '%' | '(' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
+ if (l1 == 35) // '('
+ {
+ shiftT(35); // '('
+ lookahead1W(190); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:' |
+ try_Literal();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(190); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:' |
+ try_Literal();
+ }
+ shiftT(38); // ')'
+ }
+ }
+
+ function parse_VarDecl()
+ {
+ eventHandler.startNonterminal("VarDecl", e0);
+ shift(268); // 'variable'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(157); // S^WS | '(:' | ':=' | 'as' | 'external'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(110); // S^WS | '(:' | ':=' | 'external'
+ switch (l1)
+ {
+ case 53: // ':='
+ shift(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_VarValue();
+ break;
+ default:
+ shift(134); // 'external'
+ lookahead1W(108); // S^WS | '(:' | ':=' | ';'
+ if (l1 == 53) // ':='
+ {
+ shift(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_VarDefaultValue();
+ }
+ }
+ eventHandler.endNonterminal("VarDecl", e0);
+ }
+
+ function parse_VarValue()
+ {
+ eventHandler.startNonterminal("VarValue", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("VarValue", e0);
+ }
+
+ function parse_VarDefaultValue()
+ {
+ eventHandler.startNonterminal("VarDefaultValue", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("VarDefaultValue", e0);
+ }
+
+ function parse_ContextItemDecl()
+ {
+ eventHandler.startNonterminal("ContextItemDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'context'
+ shift(102); // 'context'
+ lookahead1W(58); // S^WS | '(:' | 'item'
+ shift(167); // 'item'
+ lookahead1W(157); // S^WS | '(:' | ':=' | 'as' | 'external'
+ if (l1 == 80) // 'as'
+ {
+ shift(80); // 'as'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_ItemType();
+ }
+ lookahead1W(110); // S^WS | '(:' | ':=' | 'external'
+ switch (l1)
+ {
+ case 53: // ':='
+ shift(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_VarValue();
+ break;
+ default:
+ shift(134); // 'external'
+ lookahead1W(108); // S^WS | '(:' | ':=' | ';'
+ if (l1 == 53) // ':='
+ {
+ shift(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_VarDefaultValue();
+ }
+ }
+ eventHandler.endNonterminal("ContextItemDecl", e0);
+ }
+
+ function parse_ParamList()
+ {
+ eventHandler.startNonterminal("ParamList", e0);
+ parse_Param();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_Param();
+ }
+ eventHandler.endNonterminal("ParamList", e0);
+ }
+
+ function try_ParamList()
+ {
+ try_Param();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_Param();
+ }
+ }
+
+ function parse_Param()
+ {
+ eventHandler.startNonterminal("Param", e0);
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(153); // S^WS | '(:' | ')' | ',' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ eventHandler.endNonterminal("Param", e0);
+ }
+
+ function try_Param()
+ {
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_EQName();
+ lookahead1W(153); // S^WS | '(:' | ')' | ',' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ }
+
+ function parse_FunctionBody()
+ {
+ eventHandler.startNonterminal("FunctionBody", e0);
+ parse_EnclosedExpr();
+ eventHandler.endNonterminal("FunctionBody", e0);
+ }
+
+ function try_FunctionBody()
+ {
+ try_EnclosedExpr();
+ }
+
+ function parse_EnclosedExpr()
+ {
+ eventHandler.startNonterminal("EnclosedExpr", e0);
+ shift(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("EnclosedExpr", e0);
+ }
+
+ function try_EnclosedExpr()
+ {
+ shiftT(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+
+ function parse_OptionDecl()
+ {
+ eventHandler.startNonterminal("OptionDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(69); // S^WS | '(:' | 'option'
+ shift(203); // 'option'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ eventHandler.endNonterminal("OptionDecl", e0);
+ }
+
+ function parse_Expr()
+ {
+ eventHandler.startNonterminal("Expr", e0);
+ parse_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("Expr", e0);
+ }
+
+ function try_Expr()
+ {
+ try_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ }
+
+ function parse_FLWORExpr()
+ {
+ eventHandler.startNonterminal("FLWORExpr", e0);
+ parse_InitialClause();
+ for (;;)
+ {
+ lookahead1W(195); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ if (l1 == 224) // 'return'
+ {
+ break;
+ }
+ whitespace();
+ parse_IntermediateClause();
+ }
+ whitespace();
+ parse_ReturnClause();
+ eventHandler.endNonterminal("FLWORExpr", e0);
+ }
+
+ function try_FLWORExpr()
+ {
+ try_InitialClause();
+ for (;;)
+ {
+ lookahead1W(195); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ if (l1 == 224) // 'return'
+ {
+ break;
+ }
+ try_IntermediateClause();
+ }
+ try_ReturnClause();
+ }
+
+ function parse_InitialClause()
+ {
+ eventHandler.startNonterminal("InitialClause", e0);
+ switch (l1)
+ {
+ case 139: // 'for'
+ lookahead2W(151); // S^WS | '$' | '(:' | 'sliding' | 'tumbling'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16011: // 'for' '$'
+ parse_ForClause();
+ break;
+ case 177: // 'let'
+ parse_LetClause();
+ break;
+ default:
+ parse_WindowClause();
+ }
+ eventHandler.endNonterminal("InitialClause", e0);
+ }
+
+ function try_InitialClause()
+ {
+ switch (l1)
+ {
+ case 139: // 'for'
+ lookahead2W(151); // S^WS | '$' | '(:' | 'sliding' | 'tumbling'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16011: // 'for' '$'
+ try_ForClause();
+ break;
+ case 177: // 'let'
+ try_LetClause();
+ break;
+ default:
+ try_WindowClause();
+ }
+ }
+
+ function parse_IntermediateClause()
+ {
+ eventHandler.startNonterminal("IntermediateClause", e0);
+ switch (l1)
+ {
+ case 139: // 'for'
+ case 177: // 'let'
+ parse_InitialClause();
+ break;
+ case 272: // 'where'
+ parse_WhereClause();
+ break;
+ case 150: // 'group'
+ parse_GroupByClause();
+ break;
+ case 106: // 'count'
+ parse_CountClause();
+ break;
+ default:
+ parse_OrderByClause();
+ }
+ eventHandler.endNonterminal("IntermediateClause", e0);
+ }
+
+ function try_IntermediateClause()
+ {
+ switch (l1)
+ {
+ case 139: // 'for'
+ case 177: // 'let'
+ try_InitialClause();
+ break;
+ case 272: // 'where'
+ try_WhereClause();
+ break;
+ case 150: // 'group'
+ try_GroupByClause();
+ break;
+ case 106: // 'count'
+ try_CountClause();
+ break;
+ default:
+ try_OrderByClause();
+ }
+ }
+
+ function parse_ForClause()
+ {
+ eventHandler.startNonterminal("ForClause", e0);
+ shift(139); // 'for'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_ForBinding();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_ForBinding();
+ }
+ eventHandler.endNonterminal("ForClause", e0);
+ }
+
+ function try_ForClause()
+ {
+ shiftT(139); // 'for'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_ForBinding();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_ForBinding();
+ }
+ }
+
+ function parse_ForBinding()
+ {
+ eventHandler.startNonterminal("ForBinding", e0);
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(182); // S^WS | '(:' | 'allowing' | 'as' | 'at' | 'in' | 'score'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(173); // S^WS | '(:' | 'allowing' | 'at' | 'in' | 'score'
+ if (l1 == 73) // 'allowing'
+ {
+ whitespace();
+ parse_AllowingEmpty();
+ }
+ lookahead1W(160); // S^WS | '(:' | 'at' | 'in' | 'score'
+ if (l1 == 82) // 'at'
+ {
+ whitespace();
+ parse_PositionalVar();
+ }
+ lookahead1W(126); // S^WS | '(:' | 'in' | 'score'
+ if (l1 == 232) // 'score'
+ {
+ whitespace();
+ parse_FTScoreVar();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shift(156); // 'in'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ForBinding", e0);
+ }
+
+ function try_ForBinding()
+ {
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(182); // S^WS | '(:' | 'allowing' | 'as' | 'at' | 'in' | 'score'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(173); // S^WS | '(:' | 'allowing' | 'at' | 'in' | 'score'
+ if (l1 == 73) // 'allowing'
+ {
+ try_AllowingEmpty();
+ }
+ lookahead1W(160); // S^WS | '(:' | 'at' | 'in' | 'score'
+ if (l1 == 82) // 'at'
+ {
+ try_PositionalVar();
+ }
+ lookahead1W(126); // S^WS | '(:' | 'in' | 'score'
+ if (l1 == 232) // 'score'
+ {
+ try_FTScoreVar();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shiftT(156); // 'in'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_AllowingEmpty()
+ {
+ eventHandler.startNonterminal("AllowingEmpty", e0);
+ shift(73); // 'allowing'
+ lookahead1W(52); // S^WS | '(:' | 'empty'
+ shift(124); // 'empty'
+ eventHandler.endNonterminal("AllowingEmpty", e0);
+ }
+
+ function try_AllowingEmpty()
+ {
+ shiftT(73); // 'allowing'
+ lookahead1W(52); // S^WS | '(:' | 'empty'
+ shiftT(124); // 'empty'
+ }
+
+ function parse_PositionalVar()
+ {
+ eventHandler.startNonterminal("PositionalVar", e0);
+ shift(82); // 'at'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("PositionalVar", e0);
+ }
+
+ function try_PositionalVar()
+ {
+ shiftT(82); // 'at'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ function parse_FTScoreVar()
+ {
+ eventHandler.startNonterminal("FTScoreVar", e0);
+ shift(232); // 'score'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("FTScoreVar", e0);
+ }
+
+ function try_FTScoreVar()
+ {
+ shiftT(232); // 'score'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ function parse_LetClause()
+ {
+ eventHandler.startNonterminal("LetClause", e0);
+ shift(177); // 'let'
+ lookahead1W(100); // S^WS | '$' | '(:' | 'score'
+ whitespace();
+ parse_LetBinding();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(100); // S^WS | '$' | '(:' | 'score'
+ whitespace();
+ parse_LetBinding();
+ }
+ eventHandler.endNonterminal("LetClause", e0);
+ }
+
+ function try_LetClause()
+ {
+ shiftT(177); // 'let'
+ lookahead1W(100); // S^WS | '$' | '(:' | 'score'
+ try_LetBinding();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(100); // S^WS | '$' | '(:' | 'score'
+ try_LetBinding();
+ }
+ }
+
+ function parse_LetBinding()
+ {
+ eventHandler.startNonterminal("LetBinding", e0);
+ switch (l1)
+ {
+ case 31: // '$'
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(109); // S^WS | '(:' | ':=' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ break;
+ default:
+ parse_FTScoreVar();
+ }
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shift(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("LetBinding", e0);
+ }
+
+ function try_LetBinding()
+ {
+ switch (l1)
+ {
+ case 31: // '$'
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(109); // S^WS | '(:' | ':=' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ break;
+ default:
+ try_FTScoreVar();
+ }
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shiftT(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_WindowClause()
+ {
+ eventHandler.startNonterminal("WindowClause", e0);
+ shift(139); // 'for'
+ lookahead1W(139); // S^WS | '(:' | 'sliding' | 'tumbling'
+ switch (l1)
+ {
+ case 257: // 'tumbling'
+ whitespace();
+ parse_TumblingWindowClause();
+ break;
+ default:
+ whitespace();
+ parse_SlidingWindowClause();
+ }
+ eventHandler.endNonterminal("WindowClause", e0);
+ }
+
+ function try_WindowClause()
+ {
+ shiftT(139); // 'for'
+ lookahead1W(139); // S^WS | '(:' | 'sliding' | 'tumbling'
+ switch (l1)
+ {
+ case 257: // 'tumbling'
+ try_TumblingWindowClause();
+ break;
+ default:
+ try_SlidingWindowClause();
+ }
+ }
+
+ function parse_TumblingWindowClause()
+ {
+ eventHandler.startNonterminal("TumblingWindowClause", e0);
+ shift(257); // 'tumbling'
+ lookahead1W(88); // S^WS | '(:' | 'window'
+ shift(275); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(114); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shift(156); // 'in'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ whitespace();
+ parse_WindowStartCondition();
+ if (l1 == 127 // 'end'
+ || l1 == 202) // 'only'
+ {
+ whitespace();
+ parse_WindowEndCondition();
+ }
+ eventHandler.endNonterminal("TumblingWindowClause", e0);
+ }
+
+ function try_TumblingWindowClause()
+ {
+ shiftT(257); // 'tumbling'
+ lookahead1W(88); // S^WS | '(:' | 'window'
+ shiftT(275); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(114); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shiftT(156); // 'in'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ try_WindowStartCondition();
+ if (l1 == 127 // 'end'
+ || l1 == 202) // 'only'
+ {
+ try_WindowEndCondition();
+ }
+ }
+
+ function parse_SlidingWindowClause()
+ {
+ eventHandler.startNonterminal("SlidingWindowClause", e0);
+ shift(239); // 'sliding'
+ lookahead1W(88); // S^WS | '(:' | 'window'
+ shift(275); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(114); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shift(156); // 'in'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ whitespace();
+ parse_WindowStartCondition();
+ whitespace();
+ parse_WindowEndCondition();
+ eventHandler.endNonterminal("SlidingWindowClause", e0);
+ }
+
+ function try_SlidingWindowClause()
+ {
+ shiftT(239); // 'sliding'
+ lookahead1W(88); // S^WS | '(:' | 'window'
+ shiftT(275); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(114); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shiftT(156); // 'in'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ try_WindowStartCondition();
+ try_WindowEndCondition();
+ }
+
+ function parse_WindowStartCondition()
+ {
+ eventHandler.startNonterminal("WindowStartCondition", e0);
+ shift(242); // 'start'
+ lookahead1W(181); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ whitespace();
+ parse_WindowVars();
+ lookahead1W(86); // S^WS | '(:' | 'when'
+ shift(271); // 'when'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("WindowStartCondition", e0);
+ }
+
+ function try_WindowStartCondition()
+ {
+ shiftT(242); // 'start'
+ lookahead1W(181); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ try_WindowVars();
+ lookahead1W(86); // S^WS | '(:' | 'when'
+ shiftT(271); // 'when'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_WindowEndCondition()
+ {
+ eventHandler.startNonterminal("WindowEndCondition", e0);
+ if (l1 == 202) // 'only'
+ {
+ shift(202); // 'only'
+ }
+ lookahead1W(53); // S^WS | '(:' | 'end'
+ shift(127); // 'end'
+ lookahead1W(181); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ whitespace();
+ parse_WindowVars();
+ lookahead1W(86); // S^WS | '(:' | 'when'
+ shift(271); // 'when'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("WindowEndCondition", e0);
+ }
+
+ function try_WindowEndCondition()
+ {
+ if (l1 == 202) // 'only'
+ {
+ shiftT(202); // 'only'
+ }
+ lookahead1W(53); // S^WS | '(:' | 'end'
+ shiftT(127); // 'end'
+ lookahead1W(181); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ try_WindowVars();
+ lookahead1W(86); // S^WS | '(:' | 'when'
+ shiftT(271); // 'when'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_WindowVars()
+ {
+ eventHandler.startNonterminal("WindowVars", e0);
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_CurrentItem();
+ }
+ lookahead1W(174); // S^WS | '(:' | 'at' | 'next' | 'previous' | 'when'
+ if (l1 == 82) // 'at'
+ {
+ whitespace();
+ parse_PositionalVar();
+ }
+ lookahead1W(163); // S^WS | '(:' | 'next' | 'previous' | 'when'
+ if (l1 == 219) // 'previous'
+ {
+ shift(219); // 'previous'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_PreviousItem();
+ }
+ lookahead1W(131); // S^WS | '(:' | 'next' | 'when'
+ if (l1 == 190) // 'next'
+ {
+ shift(190); // 'next'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NextItem();
+ }
+ eventHandler.endNonterminal("WindowVars", e0);
+ }
+
+ function try_WindowVars()
+ {
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CurrentItem();
+ }
+ lookahead1W(174); // S^WS | '(:' | 'at' | 'next' | 'previous' | 'when'
+ if (l1 == 82) // 'at'
+ {
+ try_PositionalVar();
+ }
+ lookahead1W(163); // S^WS | '(:' | 'next' | 'previous' | 'when'
+ if (l1 == 219) // 'previous'
+ {
+ shiftT(219); // 'previous'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_PreviousItem();
+ }
+ lookahead1W(131); // S^WS | '(:' | 'next' | 'when'
+ if (l1 == 190) // 'next'
+ {
+ shiftT(190); // 'next'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NextItem();
+ }
+ }
+
+ function parse_CurrentItem()
+ {
+ eventHandler.startNonterminal("CurrentItem", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("CurrentItem", e0);
+ }
+
+ function try_CurrentItem()
+ {
+ try_EQName();
+ }
+
+ function parse_PreviousItem()
+ {
+ eventHandler.startNonterminal("PreviousItem", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("PreviousItem", e0);
+ }
+
+ function try_PreviousItem()
+ {
+ try_EQName();
+ }
+
+ function parse_NextItem()
+ {
+ eventHandler.startNonterminal("NextItem", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("NextItem", e0);
+ }
+
+ function try_NextItem()
+ {
+ try_EQName();
+ }
+
+ function parse_CountClause()
+ {
+ eventHandler.startNonterminal("CountClause", e0);
+ shift(106); // 'count'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("CountClause", e0);
+ }
+
+ function try_CountClause()
+ {
+ shiftT(106); // 'count'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ function parse_WhereClause()
+ {
+ eventHandler.startNonterminal("WhereClause", e0);
+ shift(272); // 'where'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("WhereClause", e0);
+ }
+
+ function try_WhereClause()
+ {
+ shiftT(272); // 'where'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_GroupByClause()
+ {
+ eventHandler.startNonterminal("GroupByClause", e0);
+ shift(150); // 'group'
+ lookahead1W(37); // S^WS | '(:' | 'by'
+ shift(88); // 'by'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_GroupingSpecList();
+ eventHandler.endNonterminal("GroupByClause", e0);
+ }
+
+ function try_GroupByClause()
+ {
+ shiftT(150); // 'group'
+ lookahead1W(37); // S^WS | '(:' | 'by'
+ shiftT(88); // 'by'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_GroupingSpecList();
+ }
+
+ function parse_GroupingSpecList()
+ {
+ eventHandler.startNonterminal("GroupingSpecList", e0);
+ parse_GroupingSpec();
+ for (;;)
+ {
+ lookahead1W(198); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_GroupingSpec();
+ }
+ eventHandler.endNonterminal("GroupingSpecList", e0);
+ }
+
+ function try_GroupingSpecList()
+ {
+ try_GroupingSpec();
+ for (;;)
+ {
+ lookahead1W(198); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_GroupingSpec();
+ }
+ }
+
+ function parse_GroupingSpec()
+ {
+ eventHandler.startNonterminal("GroupingSpec", e0);
+ switch (l1)
+ {
+ case 31: // '$'
+ lookahead2W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 3103 // '$' EQName^Token
+ || lk == 36383 // '$' 'after'
+ || lk == 37407 // '$' 'allowing'
+ || lk == 37919 // '$' 'ancestor'
+ || lk == 38431 // '$' 'ancestor-or-self'
+ || lk == 38943 // '$' 'and'
+ || lk == 39967 // '$' 'append'
+ || lk == 40479 // '$' 'array'
+ || lk == 40991 // '$' 'as'
+ || lk == 41503 // '$' 'ascending'
+ || lk == 42015 // '$' 'at'
+ || lk == 42527 // '$' 'attribute'
+ || lk == 43039 // '$' 'base-uri'
+ || lk == 43551 // '$' 'before'
+ || lk == 44063 // '$' 'boundary-space'
+ || lk == 44575 // '$' 'break'
+ || lk == 45599 // '$' 'case'
+ || lk == 46111 // '$' 'cast'
+ || lk == 46623 // '$' 'castable'
+ || lk == 47135 // '$' 'catch'
+ || lk == 48159 // '$' 'child'
+ || lk == 48671 // '$' 'collation'
+ || lk == 49695 // '$' 'comment'
+ || lk == 50207 // '$' 'constraint'
+ || lk == 50719 // '$' 'construction'
+ || lk == 52255 // '$' 'context'
+ || lk == 52767 // '$' 'continue'
+ || lk == 53279 // '$' 'copy'
+ || lk == 53791 // '$' 'copy-namespaces'
+ || lk == 54303 // '$' 'count'
+ || lk == 54815 // '$' 'decimal-format'
+ || lk == 55839 // '$' 'declare'
+ || lk == 56351 // '$' 'default'
+ || lk == 56863 // '$' 'delete'
+ || lk == 57375 // '$' 'descendant'
+ || lk == 57887 // '$' 'descendant-or-self'
+ || lk == 58399 // '$' 'descending'
+ || lk == 60959 // '$' 'div'
+ || lk == 61471 // '$' 'document'
+ || lk == 61983 // '$' 'document-node'
+ || lk == 62495 // '$' 'element'
+ || lk == 63007 // '$' 'else'
+ || lk == 63519 // '$' 'empty'
+ || lk == 64031 // '$' 'empty-sequence'
+ || lk == 64543 // '$' 'encoding'
+ || lk == 65055 // '$' 'end'
+ || lk == 66079 // '$' 'eq'
+ || lk == 66591 // '$' 'every'
+ || lk == 67615 // '$' 'except'
+ || lk == 68127 // '$' 'exit'
+ || lk == 68639 // '$' 'external'
+ || lk == 69151 // '$' 'false'
+ || lk == 69663 // '$' 'first'
+ || lk == 70175 // '$' 'following'
+ || lk == 70687 // '$' 'following-sibling'
+ || lk == 71199 // '$' 'for'
+ || lk == 72735 // '$' 'from'
+ || lk == 73247 // '$' 'ft-option'
+ || lk == 75295 // '$' 'function'
+ || lk == 75807 // '$' 'ge'
+ || lk == 76831 // '$' 'group'
+ || lk == 77855 // '$' 'gt'
+ || lk == 78367 // '$' 'idiv'
+ || lk == 78879 // '$' 'if'
+ || lk == 79391 // '$' 'import'
+ || lk == 79903 // '$' 'in'
+ || lk == 80415 // '$' 'index'
+ || lk == 82463 // '$' 'insert'
+ || lk == 82975 // '$' 'instance'
+ || lk == 83487 // '$' 'integrity'
+ || lk == 83999 // '$' 'intersect'
+ || lk == 84511 // '$' 'into'
+ || lk == 85023 // '$' 'is'
+ || lk == 85535 // '$' 'item'
+ || lk == 86047 // '$' 'json'
+ || lk == 86559 // '$' 'json-item'
+ || lk == 87071 // '$' 'jsoniq'
+ || lk == 88607 // '$' 'last'
+ || lk == 89119 // '$' 'lax'
+ || lk == 89631 // '$' 'le'
+ || lk == 90655 // '$' 'let'
+ || lk == 91679 // '$' 'loop'
+ || lk == 92703 // '$' 'lt'
+ || lk == 93727 // '$' 'mod'
+ || lk == 94239 // '$' 'modify'
+ || lk == 94751 // '$' 'module'
+ || lk == 95775 // '$' 'namespace'
+ || lk == 96287 // '$' 'namespace-node'
+ || lk == 96799 // '$' 'ne'
+ || lk == 99359 // '$' 'node'
+ || lk == 99871 // '$' 'nodes'
+ || lk == 100895 // '$' 'null'
+ || lk == 101407 // '$' 'object'
+ || lk == 103455 // '$' 'only'
+ || lk == 103967 // '$' 'option'
+ || lk == 104479 // '$' 'or'
+ || lk == 104991 // '$' 'order'
+ || lk == 105503 // '$' 'ordered'
+ || lk == 106015 // '$' 'ordering'
+ || lk == 107551 // '$' 'parent'
+ || lk == 110623 // '$' 'preceding'
+ || lk == 111135 // '$' 'preceding-sibling'
+ || lk == 112671 // '$' 'processing-instruction'
+ || lk == 113695 // '$' 'rename'
+ || lk == 114207 // '$' 'replace'
+ || lk == 114719 // '$' 'return'
+ || lk == 115231 // '$' 'returning'
+ || lk == 115743 // '$' 'revalidation'
+ || lk == 116767 // '$' 'satisfies'
+ || lk == 117279 // '$' 'schema'
+ || lk == 117791 // '$' 'schema-attribute'
+ || lk == 118303 // '$' 'schema-element'
+ || lk == 118815 // '$' 'score'
+ || lk == 119327 // '$' 'select'
+ || lk == 119839 // '$' 'self'
+ || lk == 122399 // '$' 'sliding'
+ || lk == 122911 // '$' 'some'
+ || lk == 123423 // '$' 'stable'
+ || lk == 123935 // '$' 'start'
+ || lk == 125471 // '$' 'strict'
+ || lk == 126495 // '$' 'structured-item'
+ || lk == 127007 // '$' 'switch'
+ || lk == 127519 // '$' 'text'
+ || lk == 129567 // '$' 'to'
+ || lk == 130079 // '$' 'treat'
+ || lk == 130591 // '$' 'true'
+ || lk == 131103 // '$' 'try'
+ || lk == 131615 // '$' 'tumbling'
+ || lk == 132127 // '$' 'type'
+ || lk == 132639 // '$' 'typeswitch'
+ || lk == 133151 // '$' 'union'
+ || lk == 134175 // '$' 'unordered'
+ || lk == 134687 // '$' 'updating'
+ || lk == 136223 // '$' 'validate'
+ || lk == 136735 // '$' 'value'
+ || lk == 137247 // '$' 'variable'
+ || lk == 137759 // '$' 'version'
+ || lk == 139295 // '$' 'where'
+ || lk == 139807 // '$' 'while'
+ || lk == 141343) // '$' 'with'
+ {
+ lk = memoized(2, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_GroupingVariable();
+ lookahead1W(206); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 53 // ':='
+ || l1 == 80) // 'as'
+ {
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shiftT(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ if (l1 == 95) // 'collation'
+ {
+ shiftT(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(2, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ parse_GroupingVariable();
+ lookahead1W(206); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 53 // ':='
+ || l1 == 80) // 'as'
+ {
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shift(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ if (l1 == 95) // 'collation'
+ {
+ shift(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ break;
+ default:
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("GroupingSpec", e0);
+ }
+
+ function try_GroupingSpec()
+ {
+ switch (l1)
+ {
+ case 31: // '$'
+ lookahead2W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 3103 // '$' EQName^Token
+ || lk == 36383 // '$' 'after'
+ || lk == 37407 // '$' 'allowing'
+ || lk == 37919 // '$' 'ancestor'
+ || lk == 38431 // '$' 'ancestor-or-self'
+ || lk == 38943 // '$' 'and'
+ || lk == 39967 // '$' 'append'
+ || lk == 40479 // '$' 'array'
+ || lk == 40991 // '$' 'as'
+ || lk == 41503 // '$' 'ascending'
+ || lk == 42015 // '$' 'at'
+ || lk == 42527 // '$' 'attribute'
+ || lk == 43039 // '$' 'base-uri'
+ || lk == 43551 // '$' 'before'
+ || lk == 44063 // '$' 'boundary-space'
+ || lk == 44575 // '$' 'break'
+ || lk == 45599 // '$' 'case'
+ || lk == 46111 // '$' 'cast'
+ || lk == 46623 // '$' 'castable'
+ || lk == 47135 // '$' 'catch'
+ || lk == 48159 // '$' 'child'
+ || lk == 48671 // '$' 'collation'
+ || lk == 49695 // '$' 'comment'
+ || lk == 50207 // '$' 'constraint'
+ || lk == 50719 // '$' 'construction'
+ || lk == 52255 // '$' 'context'
+ || lk == 52767 // '$' 'continue'
+ || lk == 53279 // '$' 'copy'
+ || lk == 53791 // '$' 'copy-namespaces'
+ || lk == 54303 // '$' 'count'
+ || lk == 54815 // '$' 'decimal-format'
+ || lk == 55839 // '$' 'declare'
+ || lk == 56351 // '$' 'default'
+ || lk == 56863 // '$' 'delete'
+ || lk == 57375 // '$' 'descendant'
+ || lk == 57887 // '$' 'descendant-or-self'
+ || lk == 58399 // '$' 'descending'
+ || lk == 60959 // '$' 'div'
+ || lk == 61471 // '$' 'document'
+ || lk == 61983 // '$' 'document-node'
+ || lk == 62495 // '$' 'element'
+ || lk == 63007 // '$' 'else'
+ || lk == 63519 // '$' 'empty'
+ || lk == 64031 // '$' 'empty-sequence'
+ || lk == 64543 // '$' 'encoding'
+ || lk == 65055 // '$' 'end'
+ || lk == 66079 // '$' 'eq'
+ || lk == 66591 // '$' 'every'
+ || lk == 67615 // '$' 'except'
+ || lk == 68127 // '$' 'exit'
+ || lk == 68639 // '$' 'external'
+ || lk == 69151 // '$' 'false'
+ || lk == 69663 // '$' 'first'
+ || lk == 70175 // '$' 'following'
+ || lk == 70687 // '$' 'following-sibling'
+ || lk == 71199 // '$' 'for'
+ || lk == 72735 // '$' 'from'
+ || lk == 73247 // '$' 'ft-option'
+ || lk == 75295 // '$' 'function'
+ || lk == 75807 // '$' 'ge'
+ || lk == 76831 // '$' 'group'
+ || lk == 77855 // '$' 'gt'
+ || lk == 78367 // '$' 'idiv'
+ || lk == 78879 // '$' 'if'
+ || lk == 79391 // '$' 'import'
+ || lk == 79903 // '$' 'in'
+ || lk == 80415 // '$' 'index'
+ || lk == 82463 // '$' 'insert'
+ || lk == 82975 // '$' 'instance'
+ || lk == 83487 // '$' 'integrity'
+ || lk == 83999 // '$' 'intersect'
+ || lk == 84511 // '$' 'into'
+ || lk == 85023 // '$' 'is'
+ || lk == 85535 // '$' 'item'
+ || lk == 86047 // '$' 'json'
+ || lk == 86559 // '$' 'json-item'
+ || lk == 87071 // '$' 'jsoniq'
+ || lk == 88607 // '$' 'last'
+ || lk == 89119 // '$' 'lax'
+ || lk == 89631 // '$' 'le'
+ || lk == 90655 // '$' 'let'
+ || lk == 91679 // '$' 'loop'
+ || lk == 92703 // '$' 'lt'
+ || lk == 93727 // '$' 'mod'
+ || lk == 94239 // '$' 'modify'
+ || lk == 94751 // '$' 'module'
+ || lk == 95775 // '$' 'namespace'
+ || lk == 96287 // '$' 'namespace-node'
+ || lk == 96799 // '$' 'ne'
+ || lk == 99359 // '$' 'node'
+ || lk == 99871 // '$' 'nodes'
+ || lk == 100895 // '$' 'null'
+ || lk == 101407 // '$' 'object'
+ || lk == 103455 // '$' 'only'
+ || lk == 103967 // '$' 'option'
+ || lk == 104479 // '$' 'or'
+ || lk == 104991 // '$' 'order'
+ || lk == 105503 // '$' 'ordered'
+ || lk == 106015 // '$' 'ordering'
+ || lk == 107551 // '$' 'parent'
+ || lk == 110623 // '$' 'preceding'
+ || lk == 111135 // '$' 'preceding-sibling'
+ || lk == 112671 // '$' 'processing-instruction'
+ || lk == 113695 // '$' 'rename'
+ || lk == 114207 // '$' 'replace'
+ || lk == 114719 // '$' 'return'
+ || lk == 115231 // '$' 'returning'
+ || lk == 115743 // '$' 'revalidation'
+ || lk == 116767 // '$' 'satisfies'
+ || lk == 117279 // '$' 'schema'
+ || lk == 117791 // '$' 'schema-attribute'
+ || lk == 118303 // '$' 'schema-element'
+ || lk == 118815 // '$' 'score'
+ || lk == 119327 // '$' 'select'
+ || lk == 119839 // '$' 'self'
+ || lk == 122399 // '$' 'sliding'
+ || lk == 122911 // '$' 'some'
+ || lk == 123423 // '$' 'stable'
+ || lk == 123935 // '$' 'start'
+ || lk == 125471 // '$' 'strict'
+ || lk == 126495 // '$' 'structured-item'
+ || lk == 127007 // '$' 'switch'
+ || lk == 127519 // '$' 'text'
+ || lk == 129567 // '$' 'to'
+ || lk == 130079 // '$' 'treat'
+ || lk == 130591 // '$' 'true'
+ || lk == 131103 // '$' 'try'
+ || lk == 131615 // '$' 'tumbling'
+ || lk == 132127 // '$' 'type'
+ || lk == 132639 // '$' 'typeswitch'
+ || lk == 133151 // '$' 'union'
+ || lk == 134175 // '$' 'unordered'
+ || lk == 134687 // '$' 'updating'
+ || lk == 136223 // '$' 'validate'
+ || lk == 136735 // '$' 'value'
+ || lk == 137247 // '$' 'variable'
+ || lk == 137759 // '$' 'version'
+ || lk == 139295 // '$' 'where'
+ || lk == 139807 // '$' 'while'
+ || lk == 141343) // '$' 'with'
+ {
+ lk = memoized(2, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_GroupingVariable();
+ lookahead1W(206); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 53 // ':='
+ || l1 == 80) // 'as'
+ {
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shiftT(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ if (l1 == 95) // 'collation'
+ {
+ shiftT(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ memoize(2, e0A, -1);
+ lk = -3;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(2, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ try_GroupingVariable();
+ lookahead1W(206); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 53 // ':='
+ || l1 == 80) // 'as'
+ {
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shiftT(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ if (l1 == 95) // 'collation'
+ {
+ shiftT(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ break;
+ case -3:
+ break;
+ default:
+ try_ExprSingle();
+ }
+ }
+
+ function parse_GroupingVariable()
+ {
+ eventHandler.startNonterminal("GroupingVariable", e0);
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("GroupingVariable", e0);
+ }
+
+ function try_GroupingVariable()
+ {
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ function parse_OrderByClause()
+ {
+ eventHandler.startNonterminal("OrderByClause", e0);
+ switch (l1)
+ {
+ case 205: // 'order'
+ shift(205); // 'order'
+ lookahead1W(37); // S^WS | '(:' | 'by'
+ shift(88); // 'by'
+ break;
+ default:
+ shift(241); // 'stable'
+ lookahead1W(70); // S^WS | '(:' | 'order'
+ shift(205); // 'order'
+ lookahead1W(37); // S^WS | '(:' | 'by'
+ shift(88); // 'by'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_OrderSpecList();
+ eventHandler.endNonterminal("OrderByClause", e0);
+ }
+
+ function try_OrderByClause()
+ {
+ switch (l1)
+ {
+ case 205: // 'order'
+ shiftT(205); // 'order'
+ lookahead1W(37); // S^WS | '(:' | 'by'
+ shiftT(88); // 'by'
+ break;
+ default:
+ shiftT(241); // 'stable'
+ lookahead1W(70); // S^WS | '(:' | 'order'
+ shiftT(205); // 'order'
+ lookahead1W(37); // S^WS | '(:' | 'by'
+ shiftT(88); // 'by'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_OrderSpecList();
+ }
+
+ function parse_OrderSpecList()
+ {
+ eventHandler.startNonterminal("OrderSpecList", e0);
+ parse_OrderSpec();
+ for (;;)
+ {
+ lookahead1W(198); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_OrderSpec();
+ }
+ eventHandler.endNonterminal("OrderSpecList", e0);
+ }
+
+ function try_OrderSpecList()
+ {
+ try_OrderSpec();
+ for (;;)
+ {
+ lookahead1W(198); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_OrderSpec();
+ }
+ }
+
+ function parse_OrderSpec()
+ {
+ eventHandler.startNonterminal("OrderSpec", e0);
+ parse_ExprSingle();
+ whitespace();
+ parse_OrderModifier();
+ eventHandler.endNonterminal("OrderSpec", e0);
+ }
+
+ function try_OrderSpec()
+ {
+ try_ExprSingle();
+ try_OrderModifier();
+ }
+
+ function parse_OrderModifier()
+ {
+ eventHandler.startNonterminal("OrderModifier", e0);
+ if (l1 == 81 // 'ascending'
+ || l1 == 114) // 'descending'
+ {
+ switch (l1)
+ {
+ case 81: // 'ascending'
+ shift(81); // 'ascending'
+ break;
+ default:
+ shift(114); // 'descending'
+ }
+ }
+ lookahead1W(203); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' |
+ if (l1 == 124) // 'empty'
+ {
+ shift(124); // 'empty'
+ lookahead1W(125); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 149: // 'greatest'
+ shift(149); // 'greatest'
+ break;
+ default:
+ shift(176); // 'least'
+ }
+ }
+ lookahead1W(199); // S^WS | '(:' | ',' | 'collation' | 'count' | 'for' | 'group' | 'let' | 'order' |
+ if (l1 == 95) // 'collation'
+ {
+ shift(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ eventHandler.endNonterminal("OrderModifier", e0);
+ }
+
+ function try_OrderModifier()
+ {
+ if (l1 == 81 // 'ascending'
+ || l1 == 114) // 'descending'
+ {
+ switch (l1)
+ {
+ case 81: // 'ascending'
+ shiftT(81); // 'ascending'
+ break;
+ default:
+ shiftT(114); // 'descending'
+ }
+ }
+ lookahead1W(203); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' |
+ if (l1 == 124) // 'empty'
+ {
+ shiftT(124); // 'empty'
+ lookahead1W(125); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 149: // 'greatest'
+ shiftT(149); // 'greatest'
+ break;
+ default:
+ shiftT(176); // 'least'
+ }
+ }
+ lookahead1W(199); // S^WS | '(:' | ',' | 'collation' | 'count' | 'for' | 'group' | 'let' | 'order' |
+ if (l1 == 95) // 'collation'
+ {
+ shiftT(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ }
+
+ function parse_ReturnClause()
+ {
+ eventHandler.startNonterminal("ReturnClause", e0);
+ shift(224); // 'return'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ReturnClause", e0);
+ }
+
+ function try_ReturnClause()
+ {
+ shiftT(224); // 'return'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_QuantifiedExpr()
+ {
+ eventHandler.startNonterminal("QuantifiedExpr", e0);
+ switch (l1)
+ {
+ case 240: // 'some'
+ shift(240); // 'some'
+ break;
+ default:
+ shift(130); // 'every'
+ }
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_QuantifiedVarDecl();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_QuantifiedVarDecl();
+ }
+ shift(228); // 'satisfies'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("QuantifiedExpr", e0);
+ }
+
+ function try_QuantifiedExpr()
+ {
+ switch (l1)
+ {
+ case 240: // 'some'
+ shiftT(240); // 'some'
+ break;
+ default:
+ shiftT(130); // 'every'
+ }
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_QuantifiedVarDecl();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_QuantifiedVarDecl();
+ }
+ shiftT(228); // 'satisfies'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_QuantifiedVarDecl()
+ {
+ eventHandler.startNonterminal("QuantifiedVarDecl", e0);
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(114); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shift(156); // 'in'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("QuantifiedVarDecl", e0);
+ }
+
+ function try_QuantifiedVarDecl()
+ {
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(114); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shiftT(156); // 'in'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_SwitchExpr()
+ {
+ eventHandler.startNonterminal("SwitchExpr", e0);
+ shift(248); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_SwitchCaseClause();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shift(110); // 'default'
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shift(224); // 'return'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SwitchExpr", e0);
+ }
+
+ function try_SwitchExpr()
+ {
+ shiftT(248); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ try_SwitchCaseClause();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(110); // 'default'
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shiftT(224); // 'return'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_SwitchCaseClause()
+ {
+ eventHandler.startNonterminal("SwitchCaseClause", e0);
+ for (;;)
+ {
+ shift(89); // 'case'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_SwitchCaseOperand();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shift(224); // 'return'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SwitchCaseClause", e0);
+ }
+
+ function try_SwitchCaseClause()
+ {
+ for (;;)
+ {
+ shiftT(89); // 'case'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_SwitchCaseOperand();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(224); // 'return'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_SwitchCaseOperand()
+ {
+ eventHandler.startNonterminal("SwitchCaseOperand", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SwitchCaseOperand", e0);
+ }
+
+ function try_SwitchCaseOperand()
+ {
+ try_ExprSingle();
+ }
+
+ function parse_TypeswitchExpr()
+ {
+ eventHandler.startNonterminal("TypeswitchExpr", e0);
+ shift(259); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_CaseClause();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shift(110); // 'default'
+ lookahead1W(99); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ }
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shift(224); // 'return'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TypeswitchExpr", e0);
+ }
+
+ function try_TypeswitchExpr()
+ {
+ shiftT(259); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ try_CaseClause();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(110); // 'default'
+ lookahead1W(99); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shiftT(224); // 'return'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_CaseClause()
+ {
+ eventHandler.startNonterminal("CaseClause", e0);
+ shift(89); // 'case'
+ lookahead1W(258); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shift(80); // 'as'
+ }
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceTypeUnion();
+ shift(224); // 'return'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("CaseClause", e0);
+ }
+
+ function try_CaseClause()
+ {
+ shiftT(89); // 'case'
+ lookahead1W(258); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shiftT(80); // 'as'
+ }
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceTypeUnion();
+ shiftT(224); // 'return'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_SequenceTypeUnion()
+ {
+ eventHandler.startNonterminal("SequenceTypeUnion", e0);
+ parse_SequenceType();
+ for (;;)
+ {
+ lookahead1W(138); // S^WS | '(:' | 'return' | '|'
+ if (l1 != 284) // '|'
+ {
+ break;
+ }
+ shift(284); // '|'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ eventHandler.endNonterminal("SequenceTypeUnion", e0);
+ }
+
+ function try_SequenceTypeUnion()
+ {
+ try_SequenceType();
+ for (;;)
+ {
+ lookahead1W(138); // S^WS | '(:' | 'return' | '|'
+ if (l1 != 284) // '|'
+ {
+ break;
+ }
+ shiftT(284); // '|'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ }
+
+ function parse_IfExpr()
+ {
+ eventHandler.startNonterminal("IfExpr", e0);
+ shift(154); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ lookahead1W(80); // S^WS | '(:' | 'then'
+ shift(250); // 'then'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(123); // 'else'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("IfExpr", e0);
+ }
+
+ function try_IfExpr()
+ {
+ shiftT(154); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ lookahead1W(80); // S^WS | '(:' | 'then'
+ shiftT(250); // 'then'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(123); // 'else'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_TryCatchExpr()
+ {
+ eventHandler.startNonterminal("TryCatchExpr", e0);
+ parse_TryClause();
+ for (;;)
+ {
+ lookahead1W(39); // S^WS | '(:' | 'catch'
+ whitespace();
+ parse_CatchClause();
+ lookahead1W(208); // S^WS | EOF | '(:' | ')' | ',' | ':' | ';' | ']' | 'after' | 'as' | 'ascending' |
+ if (l1 != 92) // 'catch'
+ {
+ break;
+ }
+ }
+ eventHandler.endNonterminal("TryCatchExpr", e0);
+ }
+
+ function try_TryCatchExpr()
+ {
+ try_TryClause();
+ for (;;)
+ {
+ lookahead1W(39); // S^WS | '(:' | 'catch'
+ try_CatchClause();
+ lookahead1W(208); // S^WS | EOF | '(:' | ')' | ',' | ':' | ';' | ']' | 'after' | 'as' | 'ascending' |
+ if (l1 != 92) // 'catch'
+ {
+ break;
+ }
+ }
+ }
+
+ function parse_TryClause()
+ {
+ eventHandler.startNonterminal("TryClause", e0);
+ shift(256); // 'try'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_TryTargetExpr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("TryClause", e0);
+ }
+
+ function try_TryClause()
+ {
+ shiftT(256); // 'try'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_TryTargetExpr();
+ shiftT(287); // '}'
+ }
+
+ function parse_TryTargetExpr()
+ {
+ eventHandler.startNonterminal("TryTargetExpr", e0);
+ parse_Expr();
+ eventHandler.endNonterminal("TryTargetExpr", e0);
+ }
+
+ function try_TryTargetExpr()
+ {
+ try_Expr();
+ }
+
+ function parse_CatchClause()
+ {
+ eventHandler.startNonterminal("CatchClause", e0);
+ shift(92); // 'catch'
+ lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_CatchErrorList();
+ shift(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("CatchClause", e0);
+ }
+
+ function try_CatchClause()
+ {
+ shiftT(92); // 'catch'
+ lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CatchErrorList();
+ shiftT(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+
+ function parse_CatchErrorList()
+ {
+ eventHandler.startNonterminal("CatchErrorList", e0);
+ parse_NameTest();
+ for (;;)
+ {
+ lookahead1W(140); // S^WS | '(:' | '{' | '|'
+ if (l1 != 284) // '|'
+ {
+ break;
+ }
+ shift(284); // '|'
+ lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NameTest();
+ }
+ eventHandler.endNonterminal("CatchErrorList", e0);
+ }
+
+ function try_CatchErrorList()
+ {
+ try_NameTest();
+ for (;;)
+ {
+ lookahead1W(140); // S^WS | '(:' | '{' | '|'
+ if (l1 != 284) // '|'
+ {
+ break;
+ }
+ shiftT(284); // '|'
+ lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NameTest();
+ }
+ }
+
+ function parse_OrExpr()
+ {
+ eventHandler.startNonterminal("OrExpr", e0);
+ parse_AndExpr();
+ for (;;)
+ {
+ if (l1 != 204) // 'or'
+ {
+ break;
+ }
+ shift(204); // 'or'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AndExpr();
+ }
+ eventHandler.endNonterminal("OrExpr", e0);
+ }
+
+ function try_OrExpr()
+ {
+ try_AndExpr();
+ for (;;)
+ {
+ if (l1 != 204) // 'or'
+ {
+ break;
+ }
+ shiftT(204); // 'or'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AndExpr();
+ }
+ }
+
+ function parse_AndExpr()
+ {
+ eventHandler.startNonterminal("AndExpr", e0);
+ parse_NotExpr();
+ for (;;)
+ {
+ if (l1 != 76) // 'and'
+ {
+ break;
+ }
+ shift(76); // 'and'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_NotExpr();
+ }
+ eventHandler.endNonterminal("AndExpr", e0);
+ }
+
+ function try_AndExpr()
+ {
+ try_NotExpr();
+ for (;;)
+ {
+ if (l1 != 76) // 'and'
+ {
+ break;
+ }
+ shiftT(76); // 'and'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_NotExpr();
+ }
+ }
+
+ function parse_NotExpr()
+ {
+ eventHandler.startNonterminal("NotExpr", e0);
+ if (l1 == 196) // 'not'
+ {
+ shift(196); // 'not'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ComparisonExpr();
+ eventHandler.endNonterminal("NotExpr", e0);
+ }
+
+ function try_NotExpr()
+ {
+ if (l1 == 196) // 'not'
+ {
+ shiftT(196); // 'not'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ComparisonExpr();
+ }
+
+ function parse_ComparisonExpr()
+ {
+ eventHandler.startNonterminal("ComparisonExpr", e0);
+ parse_FTContainsExpr();
+ if (l1 == 27 // '!='
+ || l1 == 55 // '<'
+ || l1 == 58 // '<<'
+ || l1 == 59 // '<='
+ || l1 == 61 // '='
+ || l1 == 62 // '>'
+ || l1 == 63 // '>='
+ || l1 == 64 // '>>'
+ || l1 == 129 // 'eq'
+ || l1 == 148 // 'ge'
+ || l1 == 152 // 'gt'
+ || l1 == 166 // 'is'
+ || l1 == 175 // 'le'
+ || l1 == 181 // 'lt'
+ || l1 == 189) // 'ne'
+ {
+ switch (l1)
+ {
+ case 129: // 'eq'
+ case 148: // 'ge'
+ case 152: // 'gt'
+ case 175: // 'le'
+ case 181: // 'lt'
+ case 189: // 'ne'
+ whitespace();
+ parse_ValueComp();
+ break;
+ case 58: // '<<'
+ case 64: // '>>'
+ case 166: // 'is'
+ whitespace();
+ parse_NodeComp();
+ break;
+ default:
+ whitespace();
+ parse_GeneralComp();
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_FTContainsExpr();
+ }
+ eventHandler.endNonterminal("ComparisonExpr", e0);
+ }
+
+ function try_ComparisonExpr()
+ {
+ try_FTContainsExpr();
+ if (l1 == 27 // '!='
+ || l1 == 55 // '<'
+ || l1 == 58 // '<<'
+ || l1 == 59 // '<='
+ || l1 == 61 // '='
+ || l1 == 62 // '>'
+ || l1 == 63 // '>='
+ || l1 == 64 // '>>'
+ || l1 == 129 // 'eq'
+ || l1 == 148 // 'ge'
+ || l1 == 152 // 'gt'
+ || l1 == 166 // 'is'
+ || l1 == 175 // 'le'
+ || l1 == 181 // 'lt'
+ || l1 == 189) // 'ne'
+ {
+ switch (l1)
+ {
+ case 129: // 'eq'
+ case 148: // 'ge'
+ case 152: // 'gt'
+ case 175: // 'le'
+ case 181: // 'lt'
+ case 189: // 'ne'
+ try_ValueComp();
+ break;
+ case 58: // '<<'
+ case 64: // '>>'
+ case 166: // 'is'
+ try_NodeComp();
+ break;
+ default:
+ try_GeneralComp();
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_FTContainsExpr();
+ }
+ }
+
+ function parse_FTContainsExpr()
+ {
+ eventHandler.startNonterminal("FTContainsExpr", e0);
+ parse_StringConcatExpr();
+ if (l1 == 100) // 'contains'
+ {
+ shift(100); // 'contains'
+ lookahead1W(79); // S^WS | '(:' | 'text'
+ shift(249); // 'text'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTSelection();
+ if (l1 == 277) // 'without'
+ {
+ whitespace();
+ parse_FTIgnoreOption();
+ }
+ }
+ eventHandler.endNonterminal("FTContainsExpr", e0);
+ }
+
+ function try_FTContainsExpr()
+ {
+ try_StringConcatExpr();
+ if (l1 == 100) // 'contains'
+ {
+ shiftT(100); // 'contains'
+ lookahead1W(79); // S^WS | '(:' | 'text'
+ shiftT(249); // 'text'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTSelection();
+ if (l1 == 277) // 'without'
+ {
+ try_FTIgnoreOption();
+ }
+ }
+ }
+
+ function parse_StringConcatExpr()
+ {
+ eventHandler.startNonterminal("StringConcatExpr", e0);
+ parse_RangeExpr();
+ for (;;)
+ {
+ if (l1 != 285) // '||'
+ {
+ break;
+ }
+ shift(285); // '||'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_RangeExpr();
+ }
+ eventHandler.endNonterminal("StringConcatExpr", e0);
+ }
+
+ function try_StringConcatExpr()
+ {
+ try_RangeExpr();
+ for (;;)
+ {
+ if (l1 != 285) // '||'
+ {
+ break;
+ }
+ shiftT(285); // '||'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_RangeExpr();
+ }
+ }
+
+ function parse_RangeExpr()
+ {
+ eventHandler.startNonterminal("RangeExpr", e0);
+ parse_AdditiveExpr();
+ if (l1 == 253) // 'to'
+ {
+ shift(253); // 'to'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ }
+ eventHandler.endNonterminal("RangeExpr", e0);
+ }
+
+ function try_RangeExpr()
+ {
+ try_AdditiveExpr();
+ if (l1 == 253) // 'to'
+ {
+ shiftT(253); // 'to'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ }
+ }
+
+ function parse_AdditiveExpr()
+ {
+ eventHandler.startNonterminal("AdditiveExpr", e0);
+ parse_MultiplicativeExpr();
+ for (;;)
+ {
+ if (l1 != 41 // '+'
+ && l1 != 43) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 41: // '+'
+ shift(41); // '+'
+ break;
+ default:
+ shift(43); // '-'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_MultiplicativeExpr();
+ }
+ eventHandler.endNonterminal("AdditiveExpr", e0);
+ }
+
+ function try_AdditiveExpr()
+ {
+ try_MultiplicativeExpr();
+ for (;;)
+ {
+ if (l1 != 41 // '+'
+ && l1 != 43) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 41: // '+'
+ shiftT(41); // '+'
+ break;
+ default:
+ shiftT(43); // '-'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_MultiplicativeExpr();
+ }
+ }
+
+ function parse_MultiplicativeExpr()
+ {
+ eventHandler.startNonterminal("MultiplicativeExpr", e0);
+ parse_UnionExpr();
+ for (;;)
+ {
+ if (l1 != 39 // '*'
+ && l1 != 119 // 'div'
+ && l1 != 153 // 'idiv'
+ && l1 != 183) // 'mod'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 39: // '*'
+ shift(39); // '*'
+ break;
+ case 119: // 'div'
+ shift(119); // 'div'
+ break;
+ case 153: // 'idiv'
+ shift(153); // 'idiv'
+ break;
+ default:
+ shift(183); // 'mod'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_UnionExpr();
+ }
+ eventHandler.endNonterminal("MultiplicativeExpr", e0);
+ }
+
+ function try_MultiplicativeExpr()
+ {
+ try_UnionExpr();
+ for (;;)
+ {
+ if (l1 != 39 // '*'
+ && l1 != 119 // 'div'
+ && l1 != 153 // 'idiv'
+ && l1 != 183) // 'mod'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 39: // '*'
+ shiftT(39); // '*'
+ break;
+ case 119: // 'div'
+ shiftT(119); // 'div'
+ break;
+ case 153: // 'idiv'
+ shiftT(153); // 'idiv'
+ break;
+ default:
+ shiftT(183); // 'mod'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_UnionExpr();
+ }
+ }
+
+ function parse_UnionExpr()
+ {
+ eventHandler.startNonterminal("UnionExpr", e0);
+ parse_IntersectExceptExpr();
+ for (;;)
+ {
+ if (l1 != 260 // 'union'
+ && l1 != 284) // '|'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 260: // 'union'
+ shift(260); // 'union'
+ break;
+ default:
+ shift(284); // '|'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_IntersectExceptExpr();
+ }
+ eventHandler.endNonterminal("UnionExpr", e0);
+ }
+
+ function try_UnionExpr()
+ {
+ try_IntersectExceptExpr();
+ for (;;)
+ {
+ if (l1 != 260 // 'union'
+ && l1 != 284) // '|'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 260: // 'union'
+ shiftT(260); // 'union'
+ break;
+ default:
+ shiftT(284); // '|'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_IntersectExceptExpr();
+ }
+ }
+
+ function parse_IntersectExceptExpr()
+ {
+ eventHandler.startNonterminal("IntersectExceptExpr", e0);
+ parse_InstanceofExpr();
+ for (;;)
+ {
+ lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 != 132 // 'except'
+ && l1 != 164) // 'intersect'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 164: // 'intersect'
+ shift(164); // 'intersect'
+ break;
+ default:
+ shift(132); // 'except'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_InstanceofExpr();
+ }
+ eventHandler.endNonterminal("IntersectExceptExpr", e0);
+ }
+
+ function try_IntersectExceptExpr()
+ {
+ try_InstanceofExpr();
+ for (;;)
+ {
+ lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 != 132 // 'except'
+ && l1 != 164) // 'intersect'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 164: // 'intersect'
+ shiftT(164); // 'intersect'
+ break;
+ default:
+ shiftT(132); // 'except'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_InstanceofExpr();
+ }
+ }
+
+ function parse_InstanceofExpr()
+ {
+ eventHandler.startNonterminal("InstanceofExpr", e0);
+ parse_TreatExpr();
+ lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 162) // 'instance'
+ {
+ shift(162); // 'instance'
+ lookahead1W(67); // S^WS | '(:' | 'of'
+ shift(200); // 'of'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ eventHandler.endNonterminal("InstanceofExpr", e0);
+ }
+
+ function try_InstanceofExpr()
+ {
+ try_TreatExpr();
+ lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 162) // 'instance'
+ {
+ shiftT(162); // 'instance'
+ lookahead1W(67); // S^WS | '(:' | 'of'
+ shiftT(200); // 'of'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ }
+
+ function parse_TreatExpr()
+ {
+ eventHandler.startNonterminal("TreatExpr", e0);
+ parse_CastableExpr();
+ lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 254) // 'treat'
+ {
+ shift(254); // 'treat'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shift(80); // 'as'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ eventHandler.endNonterminal("TreatExpr", e0);
+ }
+
+ function try_TreatExpr()
+ {
+ try_CastableExpr();
+ lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 254) // 'treat'
+ {
+ shiftT(254); // 'treat'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shiftT(80); // 'as'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ }
+
+ function parse_CastableExpr()
+ {
+ eventHandler.startNonterminal("CastableExpr", e0);
+ parse_CastExpr();
+ lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 91) // 'castable'
+ {
+ shift(91); // 'castable'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shift(80); // 'as'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SingleType();
+ }
+ eventHandler.endNonterminal("CastableExpr", e0);
+ }
+
+ function try_CastableExpr()
+ {
+ try_CastExpr();
+ lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 91) // 'castable'
+ {
+ shiftT(91); // 'castable'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shiftT(80); // 'as'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SingleType();
+ }
+ }
+
+ function parse_CastExpr()
+ {
+ eventHandler.startNonterminal("CastExpr", e0);
+ parse_UnaryExpr();
+ lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 90) // 'cast'
+ {
+ shift(90); // 'cast'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shift(80); // 'as'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SingleType();
+ }
+ eventHandler.endNonterminal("CastExpr", e0);
+ }
+
+ function try_CastExpr()
+ {
+ try_UnaryExpr();
+ lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 90) // 'cast'
+ {
+ shiftT(90); // 'cast'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shiftT(80); // 'as'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SingleType();
+ }
+ }
+
+ function parse_UnaryExpr()
+ {
+ eventHandler.startNonterminal("UnaryExpr", e0);
+ for (;;)
+ {
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 41 // '+'
+ && l1 != 43) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 43: // '-'
+ shift(43); // '-'
+ break;
+ default:
+ shift(41); // '+'
+ }
+ }
+ whitespace();
+ parse_ValueExpr();
+ eventHandler.endNonterminal("UnaryExpr", e0);
+ }
+
+ function try_UnaryExpr()
+ {
+ for (;;)
+ {
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 41 // '+'
+ && l1 != 43) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 43: // '-'
+ shiftT(43); // '-'
+ break;
+ default:
+ shiftT(41); // '+'
+ }
+ }
+ try_ValueExpr();
+ }
+
+ function parse_ValueExpr()
+ {
+ eventHandler.startNonterminal("ValueExpr", e0);
+ switch (l1)
+ {
+ case 266: // 'validate'
+ lookahead2W(188); // S^WS | '#' | '(' | '(:' | 'lax' | 'strict' | 'type' | '{'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 89354: // 'validate' 'lax'
+ case 125706: // 'validate' 'strict'
+ case 132362: // 'validate' 'type'
+ case 144138: // 'validate' '{'
+ parse_ValidateExpr();
+ break;
+ case 36: // '(#'
+ parse_ExtensionExpr();
+ break;
+ default:
+ parse_SimpleMapExpr();
+ }
+ eventHandler.endNonterminal("ValueExpr", e0);
+ }
+
+ function try_ValueExpr()
+ {
+ switch (l1)
+ {
+ case 266: // 'validate'
+ lookahead2W(188); // S^WS | '#' | '(' | '(:' | 'lax' | 'strict' | 'type' | '{'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 89354: // 'validate' 'lax'
+ case 125706: // 'validate' 'strict'
+ case 132362: // 'validate' 'type'
+ case 144138: // 'validate' '{'
+ try_ValidateExpr();
+ break;
+ case 36: // '(#'
+ try_ExtensionExpr();
+ break;
+ default:
+ try_SimpleMapExpr();
+ }
+ }
+
+ function parse_SimpleMapExpr()
+ {
+ eventHandler.startNonterminal("SimpleMapExpr", e0);
+ parse_PathExpr();
+ for (;;)
+ {
+ if (l1 != 26) // '!'
+ {
+ break;
+ }
+ shift(26); // '!'
+ lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PathExpr();
+ }
+ eventHandler.endNonterminal("SimpleMapExpr", e0);
+ }
+
+ function try_SimpleMapExpr()
+ {
+ try_PathExpr();
+ for (;;)
+ {
+ if (l1 != 26) // '!'
+ {
+ break;
+ }
+ shiftT(26); // '!'
+ lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PathExpr();
+ }
+ }
+
+ function parse_GeneralComp()
+ {
+ eventHandler.startNonterminal("GeneralComp", e0);
+ switch (l1)
+ {
+ case 61: // '='
+ shift(61); // '='
+ break;
+ case 27: // '!='
+ shift(27); // '!='
+ break;
+ case 55: // '<'
+ shift(55); // '<'
+ break;
+ case 59: // '<='
+ shift(59); // '<='
+ break;
+ case 62: // '>'
+ shift(62); // '>'
+ break;
+ default:
+ shift(63); // '>='
+ }
+ eventHandler.endNonterminal("GeneralComp", e0);
+ }
+
+ function try_GeneralComp()
+ {
+ switch (l1)
+ {
+ case 61: // '='
+ shiftT(61); // '='
+ break;
+ case 27: // '!='
+ shiftT(27); // '!='
+ break;
+ case 55: // '<'
+ shiftT(55); // '<'
+ break;
+ case 59: // '<='
+ shiftT(59); // '<='
+ break;
+ case 62: // '>'
+ shiftT(62); // '>'
+ break;
+ default:
+ shiftT(63); // '>='
+ }
+ }
+
+ function parse_ValueComp()
+ {
+ eventHandler.startNonterminal("ValueComp", e0);
+ switch (l1)
+ {
+ case 129: // 'eq'
+ shift(129); // 'eq'
+ break;
+ case 189: // 'ne'
+ shift(189); // 'ne'
+ break;
+ case 181: // 'lt'
+ shift(181); // 'lt'
+ break;
+ case 175: // 'le'
+ shift(175); // 'le'
+ break;
+ case 152: // 'gt'
+ shift(152); // 'gt'
+ break;
+ default:
+ shift(148); // 'ge'
+ }
+ eventHandler.endNonterminal("ValueComp", e0);
+ }
+
+ function try_ValueComp()
+ {
+ switch (l1)
+ {
+ case 129: // 'eq'
+ shiftT(129); // 'eq'
+ break;
+ case 189: // 'ne'
+ shiftT(189); // 'ne'
+ break;
+ case 181: // 'lt'
+ shiftT(181); // 'lt'
+ break;
+ case 175: // 'le'
+ shiftT(175); // 'le'
+ break;
+ case 152: // 'gt'
+ shiftT(152); // 'gt'
+ break;
+ default:
+ shiftT(148); // 'ge'
+ }
+ }
+
+ function parse_NodeComp()
+ {
+ eventHandler.startNonterminal("NodeComp", e0);
+ switch (l1)
+ {
+ case 166: // 'is'
+ shift(166); // 'is'
+ break;
+ case 58: // '<<'
+ shift(58); // '<<'
+ break;
+ default:
+ shift(64); // '>>'
+ }
+ eventHandler.endNonterminal("NodeComp", e0);
+ }
+
+ function try_NodeComp()
+ {
+ switch (l1)
+ {
+ case 166: // 'is'
+ shiftT(166); // 'is'
+ break;
+ case 58: // '<<'
+ shiftT(58); // '<<'
+ break;
+ default:
+ shiftT(64); // '>>'
+ }
+ }
+
+ function parse_ValidateExpr()
+ {
+ eventHandler.startNonterminal("ValidateExpr", e0);
+ shift(266); // 'validate'
+ lookahead1W(175); // S^WS | '(:' | 'lax' | 'strict' | 'type' | '{'
+ if (l1 != 281) // '{'
+ {
+ switch (l1)
+ {
+ case 258: // 'type'
+ shift(258); // 'type'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_TypeName();
+ break;
+ default:
+ whitespace();
+ parse_ValidationMode();
+ }
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("ValidateExpr", e0);
+ }
+
+ function try_ValidateExpr()
+ {
+ shiftT(266); // 'validate'
+ lookahead1W(175); // S^WS | '(:' | 'lax' | 'strict' | 'type' | '{'
+ if (l1 != 281) // '{'
+ {
+ switch (l1)
+ {
+ case 258: // 'type'
+ shiftT(258); // 'type'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_TypeName();
+ break;
+ default:
+ try_ValidationMode();
+ }
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+
+ function parse_ValidationMode()
+ {
+ eventHandler.startNonterminal("ValidationMode", e0);
+ switch (l1)
+ {
+ case 174: // 'lax'
+ shift(174); // 'lax'
+ break;
+ default:
+ shift(245); // 'strict'
+ }
+ eventHandler.endNonterminal("ValidationMode", e0);
+ }
+
+ function try_ValidationMode()
+ {
+ switch (l1)
+ {
+ case 174: // 'lax'
+ shiftT(174); // 'lax'
+ break;
+ default:
+ shiftT(245); // 'strict'
+ }
+ }
+
+ function parse_ExtensionExpr()
+ {
+ eventHandler.startNonterminal("ExtensionExpr", e0);
+ for (;;)
+ {
+ whitespace();
+ parse_Pragma();
+ lookahead1W(104); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 36) // '(#'
+ {
+ break;
+ }
+ }
+ shift(281); // '{'
+ lookahead1W(275); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 287) // '}'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(287); // '}'
+ eventHandler.endNonterminal("ExtensionExpr", e0);
+ }
+
+ function try_ExtensionExpr()
+ {
+ for (;;)
+ {
+ try_Pragma();
+ lookahead1W(104); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 36) // '(#'
+ {
+ break;
+ }
+ }
+ shiftT(281); // '{'
+ lookahead1W(275); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 287) // '}'
+ {
+ try_Expr();
+ }
+ shiftT(287); // '}'
+ }
+
+ function parse_Pragma()
+ {
+ eventHandler.startNonterminal("Pragma", e0);
+ shift(36); // '(#'
+ lookahead1(243); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ parse_EQName();
+ lookahead1(10); // S | '#)'
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ lookahead1(0); // PragmaContents
+ shift(1); // PragmaContents
+ }
+ lookahead1(5); // '#)'
+ shift(30); // '#)'
+ eventHandler.endNonterminal("Pragma", e0);
+ }
+
+ function try_Pragma()
+ {
+ shiftT(36); // '(#'
+ lookahead1(243); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ try_EQName();
+ lookahead1(10); // S | '#)'
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ lookahead1(0); // PragmaContents
+ shiftT(1); // PragmaContents
+ }
+ lookahead1(5); // '#)'
+ shiftT(30); // '#)'
+ }
+
+ function parse_PathExpr()
+ {
+ eventHandler.startNonterminal("PathExpr", e0);
+ switch (l1)
+ {
+ case 47: // '/'
+ shift(47); // '/'
+ lookahead1W(289); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 25: // EOF
+ case 26: // '!'
+ case 27: // '!='
+ case 38: // ')'
+ case 39: // '*'
+ case 41: // '+'
+ case 42: // ','
+ case 43: // '-'
+ case 50: // ':'
+ case 54: // ';'
+ case 58: // '<<'
+ case 59: // '<='
+ case 61: // '='
+ case 62: // '>'
+ case 63: // '>='
+ case 64: // '>>'
+ case 70: // ']'
+ case 88: // 'by'
+ case 100: // 'contains'
+ case 209: // 'paragraphs'
+ case 237: // 'sentences'
+ case 252: // 'times'
+ case 279: // 'words'
+ case 284: // '|'
+ case 285: // '||'
+ case 286: // '|}'
+ case 287: // '}'
+ break;
+ default:
+ whitespace();
+ parse_RelativePathExpr();
+ }
+ break;
+ case 48: // '//'
+ shift(48); // '//'
+ lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_RelativePathExpr();
+ break;
+ default:
+ parse_RelativePathExpr();
+ }
+ eventHandler.endNonterminal("PathExpr", e0);
+ }
+
+ function try_PathExpr()
+ {
+ switch (l1)
+ {
+ case 47: // '/'
+ shiftT(47); // '/'
+ lookahead1W(289); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 25: // EOF
+ case 26: // '!'
+ case 27: // '!='
+ case 38: // ')'
+ case 39: // '*'
+ case 41: // '+'
+ case 42: // ','
+ case 43: // '-'
+ case 50: // ':'
+ case 54: // ';'
+ case 58: // '<<'
+ case 59: // '<='
+ case 61: // '='
+ case 62: // '>'
+ case 63: // '>='
+ case 64: // '>>'
+ case 70: // ']'
+ case 88: // 'by'
+ case 100: // 'contains'
+ case 209: // 'paragraphs'
+ case 237: // 'sentences'
+ case 252: // 'times'
+ case 279: // 'words'
+ case 284: // '|'
+ case 285: // '||'
+ case 286: // '|}'
+ case 287: // '}'
+ break;
+ default:
+ try_RelativePathExpr();
+ }
+ break;
+ case 48: // '//'
+ shiftT(48); // '//'
+ lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_RelativePathExpr();
+ break;
+ default:
+ try_RelativePathExpr();
+ }
+ }
+
+ function parse_RelativePathExpr()
+ {
+ eventHandler.startNonterminal("RelativePathExpr", e0);
+ parse_PostfixExpr();
+ for (;;)
+ {
+ switch (l1)
+ {
+ case 26: // '!'
+ lookahead2W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 27 // '!='
+ && lk != 38 // ')'
+ && lk != 39 // '*'
+ && lk != 41 // '+'
+ && lk != 42 // ','
+ && lk != 43 // '-'
+ && lk != 47 // '/'
+ && lk != 48 // '//'
+ && lk != 50 // ':'
+ && lk != 54 // ';'
+ && lk != 55 // '<'
+ && lk != 58 // '<<'
+ && lk != 59 // '<='
+ && lk != 61 // '='
+ && lk != 62 // '>'
+ && lk != 63 // '>='
+ && lk != 64 // '>>'
+ && lk != 70 // ']'
+ && lk != 71 // 'after'
+ && lk != 76 // 'and'
+ && lk != 80 // 'as'
+ && lk != 81 // 'ascending'
+ && lk != 82 // 'at'
+ && lk != 85 // 'before'
+ && lk != 88 // 'by'
+ && lk != 89 // 'case'
+ && lk != 90 // 'cast'
+ && lk != 91 // 'castable'
+ && lk != 95 // 'collation'
+ && lk != 100 // 'contains'
+ && lk != 106 // 'count'
+ && lk != 110 // 'default'
+ && lk != 114 // 'descending'
+ && lk != 119 // 'div'
+ && lk != 123 // 'else'
+ && lk != 124 // 'empty'
+ && lk != 127 // 'end'
+ && lk != 129 // 'eq'
+ && lk != 132 // 'except'
+ && lk != 139 // 'for'
+ && lk != 148 // 'ge'
+ && lk != 150 // 'group'
+ && lk != 152 // 'gt'
+ && lk != 153 // 'idiv'
+ && lk != 162 // 'instance'
+ && lk != 164 // 'intersect'
+ && lk != 165 // 'into'
+ && lk != 166 // 'is'
+ && lk != 175 // 'le'
+ && lk != 177 // 'let'
+ && lk != 181 // 'lt'
+ && lk != 183 // 'mod'
+ && lk != 184 // 'modify'
+ && lk != 189 // 'ne'
+ && lk != 202 // 'only'
+ && lk != 204 // 'or'
+ && lk != 205 // 'order'
+ && lk != 209 // 'paragraphs'
+ && lk != 224 // 'return'
+ && lk != 228 // 'satisfies'
+ && lk != 237 // 'sentences'
+ && lk != 241 // 'stable'
+ && lk != 242 // 'start'
+ && lk != 252 // 'times'
+ && lk != 253 // 'to'
+ && lk != 254 // 'treat'
+ && lk != 260 // 'union'
+ && lk != 272 // 'where'
+ && lk != 276 // 'with'
+ && lk != 279 // 'words'
+ && lk != 284 // '|'
+ && lk != 285 // '||'
+ && lk != 286 // '|}'
+ && lk != 287 // '}'
+ && lk != 2586 // '!' Wildcard
+ && lk != 23578 // '!' '..'
+ && lk != 24090 // '!' '/'
+ && lk != 24602 // '!' '//'
+ && lk != 34330) // '!' '@'
+ {
+ lk = memoized(3, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ switch (l1)
+ {
+ case 47: // '/'
+ shiftT(47); // '/'
+ break;
+ case 48: // '//'
+ shiftT(48); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_StepExpr();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(3, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 47 // '/'
+ && lk != 48 // '//'
+ && lk != 2586 // '!' Wildcard
+ && lk != 23578 // '!' '..'
+ && lk != 34330) // '!' '@'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 47: // '/'
+ shift(47); // '/'
+ break;
+ case 48: // '//'
+ shift(48); // '//'
+ break;
+ default:
+ shift(26); // '!'
+ }
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_StepExpr();
+ }
+ eventHandler.endNonterminal("RelativePathExpr", e0);
+ }
+
+ function try_RelativePathExpr()
+ {
+ try_PostfixExpr();
+ for (;;)
+ {
+ switch (l1)
+ {
+ case 26: // '!'
+ lookahead2W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 27 // '!='
+ && lk != 38 // ')'
+ && lk != 39 // '*'
+ && lk != 41 // '+'
+ && lk != 42 // ','
+ && lk != 43 // '-'
+ && lk != 47 // '/'
+ && lk != 48 // '//'
+ && lk != 50 // ':'
+ && lk != 54 // ';'
+ && lk != 55 // '<'
+ && lk != 58 // '<<'
+ && lk != 59 // '<='
+ && lk != 61 // '='
+ && lk != 62 // '>'
+ && lk != 63 // '>='
+ && lk != 64 // '>>'
+ && lk != 70 // ']'
+ && lk != 71 // 'after'
+ && lk != 76 // 'and'
+ && lk != 80 // 'as'
+ && lk != 81 // 'ascending'
+ && lk != 82 // 'at'
+ && lk != 85 // 'before'
+ && lk != 88 // 'by'
+ && lk != 89 // 'case'
+ && lk != 90 // 'cast'
+ && lk != 91 // 'castable'
+ && lk != 95 // 'collation'
+ && lk != 100 // 'contains'
+ && lk != 106 // 'count'
+ && lk != 110 // 'default'
+ && lk != 114 // 'descending'
+ && lk != 119 // 'div'
+ && lk != 123 // 'else'
+ && lk != 124 // 'empty'
+ && lk != 127 // 'end'
+ && lk != 129 // 'eq'
+ && lk != 132 // 'except'
+ && lk != 139 // 'for'
+ && lk != 148 // 'ge'
+ && lk != 150 // 'group'
+ && lk != 152 // 'gt'
+ && lk != 153 // 'idiv'
+ && lk != 162 // 'instance'
+ && lk != 164 // 'intersect'
+ && lk != 165 // 'into'
+ && lk != 166 // 'is'
+ && lk != 175 // 'le'
+ && lk != 177 // 'let'
+ && lk != 181 // 'lt'
+ && lk != 183 // 'mod'
+ && lk != 184 // 'modify'
+ && lk != 189 // 'ne'
+ && lk != 202 // 'only'
+ && lk != 204 // 'or'
+ && lk != 205 // 'order'
+ && lk != 209 // 'paragraphs'
+ && lk != 224 // 'return'
+ && lk != 228 // 'satisfies'
+ && lk != 237 // 'sentences'
+ && lk != 241 // 'stable'
+ && lk != 242 // 'start'
+ && lk != 252 // 'times'
+ && lk != 253 // 'to'
+ && lk != 254 // 'treat'
+ && lk != 260 // 'union'
+ && lk != 272 // 'where'
+ && lk != 276 // 'with'
+ && lk != 279 // 'words'
+ && lk != 284 // '|'
+ && lk != 285 // '||'
+ && lk != 286 // '|}'
+ && lk != 287 // '}'
+ && lk != 2586 // '!' Wildcard
+ && lk != 23578 // '!' '..'
+ && lk != 24090 // '!' '/'
+ && lk != 24602 // '!' '//'
+ && lk != 34330) // '!' '@'
+ {
+ lk = memoized(3, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ switch (l1)
+ {
+ case 47: // '/'
+ shiftT(47); // '/'
+ break;
+ case 48: // '//'
+ shiftT(48); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_StepExpr();
+ memoize(3, e0A, -1);
+ continue;
+ }
+ catch (p1A)
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(3, e0A, -2);
+ break;
+ }
+ }
+ }
+ if (lk != -1
+ && lk != 47 // '/'
+ && lk != 48 // '//'
+ && lk != 2586 // '!' Wildcard
+ && lk != 23578 // '!' '..'
+ && lk != 34330) // '!' '@'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 47: // '/'
+ shiftT(47); // '/'
+ break;
+ case 48: // '//'
+ shiftT(48); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_StepExpr();
+ }
+ }
+
+ function parse_StepExpr()
+ {
+ eventHandler.startNonterminal("StepExpr", e0);
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ lookahead2W(288); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 122: // 'element'
+ lookahead2W(287); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 187: // 'namespace'
+ case 220: // 'processing-instruction'
+ lookahead2W(285); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(237); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '.' |
+ break;
+ case 97: // 'comment'
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 249: // 'text'
+ case 262: // 'unordered'
+ lookahead2W(239); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 79: // 'array'
+ case 125: // 'empty-sequence'
+ case 154: // 'if'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 247: // 'structured-item'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ lookahead2W(230); // S^WS | EOF | '!' | '!=' | '#' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 94: // 'child'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 234: // 'self'
+ lookahead2W(238); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 6: // EQName^Token
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 76: // 'and'
+ case 78: // 'append'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 87: // 'break'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 103: // 'continue'
+ case 104: // 'copy'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 111: // 'delete'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 121: // 'document-node'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 130: // 'every'
+ case 132: // 'except'
+ case 133: // 'exit'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 139: // 'for'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 147: // 'function'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 161: // 'insert'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 177: // 'let'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 188: // 'namespace-node'
+ case 189: // 'ne'
+ case 194: // 'node'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 222: // 'rename'
+ case 223: // 'replace'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 239: // 'sliding'
+ case 240: // 'some'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 256: // 'try'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 266: // 'validate'
+ case 267: // 'value'
+ case 268: // 'variable'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(234); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 12935 // 'false' EOF
+ || lk == 12997 // 'null' EOF
+ || lk == 13055 // 'true' EOF
+ || lk == 13447 // 'false' '!'
+ || lk == 13509 // 'null' '!'
+ || lk == 13567 // 'true' '!'
+ || lk == 13959 // 'false' '!='
+ || lk == 14021 // 'null' '!='
+ || lk == 14079 // 'true' '!='
+ || lk == 19591 // 'false' ')'
+ || lk == 19653 // 'null' ')'
+ || lk == 19711 // 'true' ')'
+ || lk == 20103 // 'false' '*'
+ || lk == 20165 // 'null' '*'
+ || lk == 20223 // 'true' '*'
+ || lk == 21127 // 'false' '+'
+ || lk == 21189 // 'null' '+'
+ || lk == 21247 // 'true' '+'
+ || lk == 21639 // 'false' ','
+ || lk == 21701 // 'null' ','
+ || lk == 21759 // 'true' ','
+ || lk == 22151 // 'false' '-'
+ || lk == 22213 // 'null' '-'
+ || lk == 22271 // 'true' '-'
+ || lk == 24199 // 'false' '/'
+ || lk == 24261 // 'null' '/'
+ || lk == 24319 // 'true' '/'
+ || lk == 24711 // 'false' '//'
+ || lk == 24773 // 'null' '//'
+ || lk == 24831 // 'true' '//'
+ || lk == 25735 // 'false' ':'
+ || lk == 25797 // 'null' ':'
+ || lk == 25855 // 'true' ':'
+ || lk == 27783 // 'false' ';'
+ || lk == 27845 // 'null' ';'
+ || lk == 27903 // 'true' ';'
+ || lk == 28295 // 'false' '<'
+ || lk == 28357 // 'null' '<'
+ || lk == 28415 // 'true' '<'
+ || lk == 29831 // 'false' '<<'
+ || lk == 29893 // 'null' '<<'
+ || lk == 29951 // 'true' '<<'
+ || lk == 30343 // 'false' '<='
+ || lk == 30405 // 'null' '<='
+ || lk == 30463 // 'true' '<='
+ || lk == 31367 // 'false' '='
+ || lk == 31429 // 'null' '='
+ || lk == 31487 // 'true' '='
+ || lk == 31879 // 'false' '>'
+ || lk == 31941 // 'null' '>'
+ || lk == 31999 // 'true' '>'
+ || lk == 32391 // 'false' '>='
+ || lk == 32453 // 'null' '>='
+ || lk == 32511 // 'true' '>='
+ || lk == 32903 // 'false' '>>'
+ || lk == 32965 // 'null' '>>'
+ || lk == 33023 // 'true' '>>'
+ || lk == 35463 // 'false' '['
+ || lk == 35525 // 'null' '['
+ || lk == 35583 // 'true' '['
+ || lk == 35975 // 'false' ']'
+ || lk == 36037 // 'null' ']'
+ || lk == 36095 // 'true' ']'
+ || lk == 36435 // 'attribute' 'after'
+ || lk == 36474 // 'element' 'after'
+ || lk == 36487 // 'false' 'after'
+ || lk == 36539 // 'namespace' 'after'
+ || lk == 36549 // 'null' 'after'
+ || lk == 36572 // 'processing-instruction' 'after'
+ || lk == 36607 // 'true' 'after'
+ || lk == 38995 // 'attribute' 'and'
+ || lk == 39034 // 'element' 'and'
+ || lk == 39047 // 'false' 'and'
+ || lk == 39099 // 'namespace' 'and'
+ || lk == 39109 // 'null' 'and'
+ || lk == 39132 // 'processing-instruction' 'and'
+ || lk == 39167 // 'true' 'and'
+ || lk == 41043 // 'attribute' 'as'
+ || lk == 41082 // 'element' 'as'
+ || lk == 41095 // 'false' 'as'
+ || lk == 41147 // 'namespace' 'as'
+ || lk == 41157 // 'null' 'as'
+ || lk == 41180 // 'processing-instruction' 'as'
+ || lk == 41215 // 'true' 'as'
+ || lk == 41555 // 'attribute' 'ascending'
+ || lk == 41594 // 'element' 'ascending'
+ || lk == 41607 // 'false' 'ascending'
+ || lk == 41659 // 'namespace' 'ascending'
+ || lk == 41669 // 'null' 'ascending'
+ || lk == 41692 // 'processing-instruction' 'ascending'
+ || lk == 41727 // 'true' 'ascending'
+ || lk == 42067 // 'attribute' 'at'
+ || lk == 42106 // 'element' 'at'
+ || lk == 42119 // 'false' 'at'
+ || lk == 42171 // 'namespace' 'at'
+ || lk == 42181 // 'null' 'at'
+ || lk == 42204 // 'processing-instruction' 'at'
+ || lk == 42239 // 'true' 'at'
+ || lk == 43603 // 'attribute' 'before'
+ || lk == 43642 // 'element' 'before'
+ || lk == 43655 // 'false' 'before'
+ || lk == 43707 // 'namespace' 'before'
+ || lk == 43717 // 'null' 'before'
+ || lk == 43740 // 'processing-instruction' 'before'
+ || lk == 43775 // 'true' 'before'
+ || lk == 45191 // 'false' 'by'
+ || lk == 45253 // 'null' 'by'
+ || lk == 45311 // 'true' 'by'
+ || lk == 45651 // 'attribute' 'case'
+ || lk == 45690 // 'element' 'case'
+ || lk == 45703 // 'false' 'case'
+ || lk == 45755 // 'namespace' 'case'
+ || lk == 45765 // 'null' 'case'
+ || lk == 45788 // 'processing-instruction' 'case'
+ || lk == 45823 // 'true' 'case'
+ || lk == 46163 // 'attribute' 'cast'
+ || lk == 46202 // 'element' 'cast'
+ || lk == 46215 // 'false' 'cast'
+ || lk == 46267 // 'namespace' 'cast'
+ || lk == 46277 // 'null' 'cast'
+ || lk == 46300 // 'processing-instruction' 'cast'
+ || lk == 46335 // 'true' 'cast'
+ || lk == 46675 // 'attribute' 'castable'
+ || lk == 46714 // 'element' 'castable'
+ || lk == 46727 // 'false' 'castable'
+ || lk == 46779 // 'namespace' 'castable'
+ || lk == 46789 // 'null' 'castable'
+ || lk == 46812 // 'processing-instruction' 'castable'
+ || lk == 46847 // 'true' 'castable'
+ || lk == 48723 // 'attribute' 'collation'
+ || lk == 48762 // 'element' 'collation'
+ || lk == 48775 // 'false' 'collation'
+ || lk == 48827 // 'namespace' 'collation'
+ || lk == 48837 // 'null' 'collation'
+ || lk == 48860 // 'processing-instruction' 'collation'
+ || lk == 48895 // 'true' 'collation'
+ || lk == 51335 // 'false' 'contains'
+ || lk == 51397 // 'null' 'contains'
+ || lk == 51455 // 'true' 'contains'
+ || lk == 54355 // 'attribute' 'count'
+ || lk == 54394 // 'element' 'count'
+ || lk == 54407 // 'false' 'count'
+ || lk == 54459 // 'namespace' 'count'
+ || lk == 54469 // 'null' 'count'
+ || lk == 54492 // 'processing-instruction' 'count'
+ || lk == 54527 // 'true' 'count'
+ || lk == 56403 // 'attribute' 'default'
+ || lk == 56442 // 'element' 'default'
+ || lk == 56455 // 'false' 'default'
+ || lk == 56507 // 'namespace' 'default'
+ || lk == 56517 // 'null' 'default'
+ || lk == 56540 // 'processing-instruction' 'default'
+ || lk == 56575 // 'true' 'default'
+ || lk == 58451 // 'attribute' 'descending'
+ || lk == 58490 // 'element' 'descending'
+ || lk == 58503 // 'false' 'descending'
+ || lk == 58555 // 'namespace' 'descending'
+ || lk == 58565 // 'null' 'descending'
+ || lk == 58588 // 'processing-instruction' 'descending'
+ || lk == 58623 // 'true' 'descending'
+ || lk == 61011 // 'attribute' 'div'
+ || lk == 61050 // 'element' 'div'
+ || lk == 61063 // 'false' 'div'
+ || lk == 61115 // 'namespace' 'div'
+ || lk == 61125 // 'null' 'div'
+ || lk == 61148 // 'processing-instruction' 'div'
+ || lk == 61183 // 'true' 'div'
+ || lk == 63059 // 'attribute' 'else'
+ || lk == 63098 // 'element' 'else'
+ || lk == 63111 // 'false' 'else'
+ || lk == 63163 // 'namespace' 'else'
+ || lk == 63173 // 'null' 'else'
+ || lk == 63196 // 'processing-instruction' 'else'
+ || lk == 63231 // 'true' 'else'
+ || lk == 63571 // 'attribute' 'empty'
+ || lk == 63610 // 'element' 'empty'
+ || lk == 63623 // 'false' 'empty'
+ || lk == 63675 // 'namespace' 'empty'
+ || lk == 63685 // 'null' 'empty'
+ || lk == 63708 // 'processing-instruction' 'empty'
+ || lk == 63743 // 'true' 'empty'
+ || lk == 65107 // 'attribute' 'end'
+ || lk == 65146 // 'element' 'end'
+ || lk == 65159 // 'false' 'end'
+ || lk == 65211 // 'namespace' 'end'
+ || lk == 65221 // 'null' 'end'
+ || lk == 65244 // 'processing-instruction' 'end'
+ || lk == 65279 // 'true' 'end'
+ || lk == 66131 // 'attribute' 'eq'
+ || lk == 66170 // 'element' 'eq'
+ || lk == 66183 // 'false' 'eq'
+ || lk == 66235 // 'namespace' 'eq'
+ || lk == 66245 // 'null' 'eq'
+ || lk == 66268 // 'processing-instruction' 'eq'
+ || lk == 66303 // 'true' 'eq'
+ || lk == 67667 // 'attribute' 'except'
+ || lk == 67706 // 'element' 'except'
+ || lk == 67719 // 'false' 'except'
+ || lk == 67771 // 'namespace' 'except'
+ || lk == 67781 // 'null' 'except'
+ || lk == 67804 // 'processing-instruction' 'except'
+ || lk == 67839 // 'true' 'except'
+ || lk == 71251 // 'attribute' 'for'
+ || lk == 71290 // 'element' 'for'
+ || lk == 71303 // 'false' 'for'
+ || lk == 71355 // 'namespace' 'for'
+ || lk == 71365 // 'null' 'for'
+ || lk == 71388 // 'processing-instruction' 'for'
+ || lk == 71423 // 'true' 'for'
+ || lk == 75859 // 'attribute' 'ge'
+ || lk == 75898 // 'element' 'ge'
+ || lk == 75911 // 'false' 'ge'
+ || lk == 75963 // 'namespace' 'ge'
+ || lk == 75973 // 'null' 'ge'
+ || lk == 75996 // 'processing-instruction' 'ge'
+ || lk == 76031 // 'true' 'ge'
+ || lk == 76883 // 'attribute' 'group'
+ || lk == 76922 // 'element' 'group'
+ || lk == 76935 // 'false' 'group'
+ || lk == 76987 // 'namespace' 'group'
+ || lk == 76997 // 'null' 'group'
+ || lk == 77020 // 'processing-instruction' 'group'
+ || lk == 77055 // 'true' 'group'
+ || lk == 77907 // 'attribute' 'gt'
+ || lk == 77946 // 'element' 'gt'
+ || lk == 77959 // 'false' 'gt'
+ || lk == 78011 // 'namespace' 'gt'
+ || lk == 78021 // 'null' 'gt'
+ || lk == 78044 // 'processing-instruction' 'gt'
+ || lk == 78079 // 'true' 'gt'
+ || lk == 78419 // 'attribute' 'idiv'
+ || lk == 78458 // 'element' 'idiv'
+ || lk == 78471 // 'false' 'idiv'
+ || lk == 78523 // 'namespace' 'idiv'
+ || lk == 78533 // 'null' 'idiv'
+ || lk == 78556 // 'processing-instruction' 'idiv'
+ || lk == 78591 // 'true' 'idiv'
+ || lk == 83027 // 'attribute' 'instance'
+ || lk == 83066 // 'element' 'instance'
+ || lk == 83079 // 'false' 'instance'
+ || lk == 83131 // 'namespace' 'instance'
+ || lk == 83141 // 'null' 'instance'
+ || lk == 83164 // 'processing-instruction' 'instance'
+ || lk == 83199 // 'true' 'instance'
+ || lk == 84051 // 'attribute' 'intersect'
+ || lk == 84090 // 'element' 'intersect'
+ || lk == 84103 // 'false' 'intersect'
+ || lk == 84155 // 'namespace' 'intersect'
+ || lk == 84165 // 'null' 'intersect'
+ || lk == 84188 // 'processing-instruction' 'intersect'
+ || lk == 84223 // 'true' 'intersect'
+ || lk == 84563 // 'attribute' 'into'
+ || lk == 84602 // 'element' 'into'
+ || lk == 84615 // 'false' 'into'
+ || lk == 84667 // 'namespace' 'into'
+ || lk == 84677 // 'null' 'into'
+ || lk == 84700 // 'processing-instruction' 'into'
+ || lk == 84735 // 'true' 'into'
+ || lk == 85075 // 'attribute' 'is'
+ || lk == 85114 // 'element' 'is'
+ || lk == 85127 // 'false' 'is'
+ || lk == 85179 // 'namespace' 'is'
+ || lk == 85189 // 'null' 'is'
+ || lk == 85212 // 'processing-instruction' 'is'
+ || lk == 85247 // 'true' 'is'
+ || lk == 89683 // 'attribute' 'le'
+ || lk == 89722 // 'element' 'le'
+ || lk == 89735 // 'false' 'le'
+ || lk == 89787 // 'namespace' 'le'
+ || lk == 89797 // 'null' 'le'
+ || lk == 89820 // 'processing-instruction' 'le'
+ || lk == 89855 // 'true' 'le'
+ || lk == 90707 // 'attribute' 'let'
+ || lk == 90746 // 'element' 'let'
+ || lk == 90759 // 'false' 'let'
+ || lk == 90811 // 'namespace' 'let'
+ || lk == 90821 // 'null' 'let'
+ || lk == 90844 // 'processing-instruction' 'let'
+ || lk == 90879 // 'true' 'let'
+ || lk == 92755 // 'attribute' 'lt'
+ || lk == 92794 // 'element' 'lt'
+ || lk == 92807 // 'false' 'lt'
+ || lk == 92859 // 'namespace' 'lt'
+ || lk == 92869 // 'null' 'lt'
+ || lk == 92892 // 'processing-instruction' 'lt'
+ || lk == 92927 // 'true' 'lt'
+ || lk == 93779 // 'attribute' 'mod'
+ || lk == 93818 // 'element' 'mod'
+ || lk == 93831 // 'false' 'mod'
+ || lk == 93883 // 'namespace' 'mod'
+ || lk == 93893 // 'null' 'mod'
+ || lk == 93916 // 'processing-instruction' 'mod'
+ || lk == 93951 // 'true' 'mod'
+ || lk == 94291 // 'attribute' 'modify'
+ || lk == 94330 // 'element' 'modify'
+ || lk == 94343 // 'false' 'modify'
+ || lk == 94395 // 'namespace' 'modify'
+ || lk == 94405 // 'null' 'modify'
+ || lk == 94428 // 'processing-instruction' 'modify'
+ || lk == 94463 // 'true' 'modify'
+ || lk == 96851 // 'attribute' 'ne'
+ || lk == 96890 // 'element' 'ne'
+ || lk == 96903 // 'false' 'ne'
+ || lk == 96955 // 'namespace' 'ne'
+ || lk == 96965 // 'null' 'ne'
+ || lk == 96988 // 'processing-instruction' 'ne'
+ || lk == 97023 // 'true' 'ne'
+ || lk == 103507 // 'attribute' 'only'
+ || lk == 103546 // 'element' 'only'
+ || lk == 103559 // 'false' 'only'
+ || lk == 103611 // 'namespace' 'only'
+ || lk == 103621 // 'null' 'only'
+ || lk == 103644 // 'processing-instruction' 'only'
+ || lk == 103679 // 'true' 'only'
+ || lk == 104531 // 'attribute' 'or'
+ || lk == 104570 // 'element' 'or'
+ || lk == 104583 // 'false' 'or'
+ || lk == 104635 // 'namespace' 'or'
+ || lk == 104645 // 'null' 'or'
+ || lk == 104668 // 'processing-instruction' 'or'
+ || lk == 104703 // 'true' 'or'
+ || lk == 105043 // 'attribute' 'order'
+ || lk == 105082 // 'element' 'order'
+ || lk == 105095 // 'false' 'order'
+ || lk == 105147 // 'namespace' 'order'
+ || lk == 105157 // 'null' 'order'
+ || lk == 105180 // 'processing-instruction' 'order'
+ || lk == 105215 // 'true' 'order'
+ || lk == 107143 // 'false' 'paragraphs'
+ || lk == 107205 // 'null' 'paragraphs'
+ || lk == 107263 // 'true' 'paragraphs'
+ || lk == 114771 // 'attribute' 'return'
+ || lk == 114810 // 'element' 'return'
+ || lk == 114823 // 'false' 'return'
+ || lk == 114875 // 'namespace' 'return'
+ || lk == 114885 // 'null' 'return'
+ || lk == 114908 // 'processing-instruction' 'return'
+ || lk == 114943 // 'true' 'return'
+ || lk == 116819 // 'attribute' 'satisfies'
+ || lk == 116858 // 'element' 'satisfies'
+ || lk == 116871 // 'false' 'satisfies'
+ || lk == 116923 // 'namespace' 'satisfies'
+ || lk == 116933 // 'null' 'satisfies'
+ || lk == 116956 // 'processing-instruction' 'satisfies'
+ || lk == 116991 // 'true' 'satisfies'
+ || lk == 121479 // 'false' 'sentences'
+ || lk == 121541 // 'null' 'sentences'
+ || lk == 121599 // 'true' 'sentences'
+ || lk == 123475 // 'attribute' 'stable'
+ || lk == 123514 // 'element' 'stable'
+ || lk == 123527 // 'false' 'stable'
+ || lk == 123579 // 'namespace' 'stable'
+ || lk == 123589 // 'null' 'stable'
+ || lk == 123612 // 'processing-instruction' 'stable'
+ || lk == 123647 // 'true' 'stable'
+ || lk == 123987 // 'attribute' 'start'
+ || lk == 124026 // 'element' 'start'
+ || lk == 124039 // 'false' 'start'
+ || lk == 124091 // 'namespace' 'start'
+ || lk == 124101 // 'null' 'start'
+ || lk == 124124 // 'processing-instruction' 'start'
+ || lk == 124159 // 'true' 'start'
+ || lk == 129159 // 'false' 'times'
+ || lk == 129221 // 'null' 'times'
+ || lk == 129279 // 'true' 'times'
+ || lk == 129619 // 'attribute' 'to'
+ || lk == 129658 // 'element' 'to'
+ || lk == 129671 // 'false' 'to'
+ || lk == 129723 // 'namespace' 'to'
+ || lk == 129733 // 'null' 'to'
+ || lk == 129756 // 'processing-instruction' 'to'
+ || lk == 129791 // 'true' 'to'
+ || lk == 130131 // 'attribute' 'treat'
+ || lk == 130170 // 'element' 'treat'
+ || lk == 130183 // 'false' 'treat'
+ || lk == 130235 // 'namespace' 'treat'
+ || lk == 130245 // 'null' 'treat'
+ || lk == 130268 // 'processing-instruction' 'treat'
+ || lk == 130303 // 'true' 'treat'
+ || lk == 133203 // 'attribute' 'union'
+ || lk == 133242 // 'element' 'union'
+ || lk == 133255 // 'false' 'union'
+ || lk == 133307 // 'namespace' 'union'
+ || lk == 133317 // 'null' 'union'
+ || lk == 133340 // 'processing-instruction' 'union'
+ || lk == 133375 // 'true' 'union'
+ || lk == 139347 // 'attribute' 'where'
+ || lk == 139386 // 'element' 'where'
+ || lk == 139399 // 'false' 'where'
+ || lk == 139451 // 'namespace' 'where'
+ || lk == 139461 // 'null' 'where'
+ || lk == 139484 // 'processing-instruction' 'where'
+ || lk == 139519 // 'true' 'where'
+ || lk == 141395 // 'attribute' 'with'
+ || lk == 141434 // 'element' 'with'
+ || lk == 141447 // 'false' 'with'
+ || lk == 141499 // 'namespace' 'with'
+ || lk == 141509 // 'null' 'with'
+ || lk == 141532 // 'processing-instruction' 'with'
+ || lk == 141567 // 'true' 'with'
+ || lk == 142983 // 'false' 'words'
+ || lk == 143045 // 'null' 'words'
+ || lk == 143103 // 'true' 'words'
+ || lk == 145543 // 'false' '|'
+ || lk == 145605 // 'null' '|'
+ || lk == 145663 // 'true' '|'
+ || lk == 146055 // 'false' '||'
+ || lk == 146117 // 'null' '||'
+ || lk == 146175 // 'true' '||'
+ || lk == 146567 // 'false' '|}'
+ || lk == 146629 // 'null' '|}'
+ || lk == 146687 // 'true' '|}'
+ || lk == 147079 // 'false' '}'
+ || lk == 147141 // 'null' '}'
+ || lk == 147199) // 'true' '}'
+ {
+ lk = memoized(4, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_PostfixExpr();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(4, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 31: // '$'
+ case 32: // '$$'
+ case 33: // '%'
+ case 35: // '('
+ case 55: // '<'
+ case 56: // '<!--'
+ case 60: // '<?'
+ case 69: // '['
+ case 281: // '{'
+ case 283: // '{|'
+ case 3155: // 'attribute' EQName^Token
+ case 3194: // 'element' EQName^Token
+ case 9915: // 'namespace' NCName^Token
+ case 9948: // 'processing-instruction' NCName^Token
+ case 14854: // EQName^Token '#'
+ case 14919: // 'after' '#'
+ case 14921: // 'allowing' '#'
+ case 14922: // 'ancestor' '#'
+ case 14923: // 'ancestor-or-self' '#'
+ case 14924: // 'and' '#'
+ case 14926: // 'append' '#'
+ case 14927: // 'array' '#'
+ case 14928: // 'as' '#'
+ case 14929: // 'ascending' '#'
+ case 14930: // 'at' '#'
+ case 14931: // 'attribute' '#'
+ case 14932: // 'base-uri' '#'
+ case 14933: // 'before' '#'
+ case 14934: // 'boundary-space' '#'
+ case 14935: // 'break' '#'
+ case 14937: // 'case' '#'
+ case 14938: // 'cast' '#'
+ case 14939: // 'castable' '#'
+ case 14940: // 'catch' '#'
+ case 14942: // 'child' '#'
+ case 14943: // 'collation' '#'
+ case 14945: // 'comment' '#'
+ case 14946: // 'constraint' '#'
+ case 14947: // 'construction' '#'
+ case 14950: // 'context' '#'
+ case 14951: // 'continue' '#'
+ case 14952: // 'copy' '#'
+ case 14953: // 'copy-namespaces' '#'
+ case 14954: // 'count' '#'
+ case 14955: // 'decimal-format' '#'
+ case 14957: // 'declare' '#'
+ case 14958: // 'default' '#'
+ case 14959: // 'delete' '#'
+ case 14960: // 'descendant' '#'
+ case 14961: // 'descendant-or-self' '#'
+ case 14962: // 'descending' '#'
+ case 14967: // 'div' '#'
+ case 14968: // 'document' '#'
+ case 14969: // 'document-node' '#'
+ case 14970: // 'element' '#'
+ case 14971: // 'else' '#'
+ case 14972: // 'empty' '#'
+ case 14973: // 'empty-sequence' '#'
+ case 14974: // 'encoding' '#'
+ case 14975: // 'end' '#'
+ case 14977: // 'eq' '#'
+ case 14978: // 'every' '#'
+ case 14980: // 'except' '#'
+ case 14981: // 'exit' '#'
+ case 14982: // 'external' '#'
+ case 14983: // 'false' '#'
+ case 14984: // 'first' '#'
+ case 14985: // 'following' '#'
+ case 14986: // 'following-sibling' '#'
+ case 14987: // 'for' '#'
+ case 14990: // 'from' '#'
+ case 14991: // 'ft-option' '#'
+ case 14995: // 'function' '#'
+ case 14996: // 'ge' '#'
+ case 14998: // 'group' '#'
+ case 15000: // 'gt' '#'
+ case 15001: // 'idiv' '#'
+ case 15002: // 'if' '#'
+ case 15003: // 'import' '#'
+ case 15004: // 'in' '#'
+ case 15005: // 'index' '#'
+ case 15009: // 'insert' '#'
+ case 15010: // 'instance' '#'
+ case 15011: // 'integrity' '#'
+ case 15012: // 'intersect' '#'
+ case 15013: // 'into' '#'
+ case 15014: // 'is' '#'
+ case 15015: // 'item' '#'
+ case 15016: // 'json' '#'
+ case 15017: // 'json-item' '#'
+ case 15018: // 'jsoniq' '#'
+ case 15021: // 'last' '#'
+ case 15022: // 'lax' '#'
+ case 15023: // 'le' '#'
+ case 15025: // 'let' '#'
+ case 15027: // 'loop' '#'
+ case 15029: // 'lt' '#'
+ case 15031: // 'mod' '#'
+ case 15032: // 'modify' '#'
+ case 15033: // 'module' '#'
+ case 15035: // 'namespace' '#'
+ case 15036: // 'namespace-node' '#'
+ case 15037: // 'ne' '#'
+ case 15042: // 'node' '#'
+ case 15043: // 'nodes' '#'
+ case 15045: // 'null' '#'
+ case 15046: // 'object' '#'
+ case 15050: // 'only' '#'
+ case 15051: // 'option' '#'
+ case 15052: // 'or' '#'
+ case 15053: // 'order' '#'
+ case 15054: // 'ordered' '#'
+ case 15055: // 'ordering' '#'
+ case 15058: // 'parent' '#'
+ case 15064: // 'preceding' '#'
+ case 15065: // 'preceding-sibling' '#'
+ case 15068: // 'processing-instruction' '#'
+ case 15070: // 'rename' '#'
+ case 15071: // 'replace' '#'
+ case 15072: // 'return' '#'
+ case 15073: // 'returning' '#'
+ case 15074: // 'revalidation' '#'
+ case 15076: // 'satisfies' '#'
+ case 15077: // 'schema' '#'
+ case 15078: // 'schema-attribute' '#'
+ case 15079: // 'schema-element' '#'
+ case 15080: // 'score' '#'
+ case 15081: // 'select' '#'
+ case 15082: // 'self' '#'
+ case 15087: // 'sliding' '#'
+ case 15088: // 'some' '#'
+ case 15089: // 'stable' '#'
+ case 15090: // 'start' '#'
+ case 15093: // 'strict' '#'
+ case 15095: // 'structured-item' '#'
+ case 15096: // 'switch' '#'
+ case 15097: // 'text' '#'
+ case 15101: // 'to' '#'
+ case 15102: // 'treat' '#'
+ case 15103: // 'true' '#'
+ case 15104: // 'try' '#'
+ case 15105: // 'tumbling' '#'
+ case 15106: // 'type' '#'
+ case 15107: // 'typeswitch' '#'
+ case 15108: // 'union' '#'
+ case 15110: // 'unordered' '#'
+ case 15111: // 'updating' '#'
+ case 15114: // 'validate' '#'
+ case 15115: // 'value' '#'
+ case 15116: // 'variable' '#'
+ case 15117: // 'version' '#'
+ case 15120: // 'where' '#'
+ case 15121: // 'while' '#'
+ case 15124: // 'with' '#'
+ case 17926: // EQName^Token '('
+ case 17991: // 'after' '('
+ case 17993: // 'allowing' '('
+ case 17994: // 'ancestor' '('
+ case 17995: // 'ancestor-or-self' '('
+ case 17996: // 'and' '('
+ case 17998: // 'append' '('
+ case 18000: // 'as' '('
+ case 18001: // 'ascending' '('
+ case 18002: // 'at' '('
+ case 18004: // 'base-uri' '('
+ case 18005: // 'before' '('
+ case 18006: // 'boundary-space' '('
+ case 18007: // 'break' '('
+ case 18009: // 'case' '('
+ case 18010: // 'cast' '('
+ case 18011: // 'castable' '('
+ case 18012: // 'catch' '('
+ case 18014: // 'child' '('
+ case 18015: // 'collation' '('
+ case 18018: // 'constraint' '('
+ case 18019: // 'construction' '('
+ case 18022: // 'context' '('
+ case 18023: // 'continue' '('
+ case 18024: // 'copy' '('
+ case 18025: // 'copy-namespaces' '('
+ case 18026: // 'count' '('
+ case 18027: // 'decimal-format' '('
+ case 18029: // 'declare' '('
+ case 18030: // 'default' '('
+ case 18031: // 'delete' '('
+ case 18032: // 'descendant' '('
+ case 18033: // 'descendant-or-self' '('
+ case 18034: // 'descending' '('
+ case 18039: // 'div' '('
+ case 18040: // 'document' '('
+ case 18043: // 'else' '('
+ case 18044: // 'empty' '('
+ case 18046: // 'encoding' '('
+ case 18047: // 'end' '('
+ case 18049: // 'eq' '('
+ case 18050: // 'every' '('
+ case 18052: // 'except' '('
+ case 18053: // 'exit' '('
+ case 18054: // 'external' '('
+ case 18055: // 'false' '('
+ case 18056: // 'first' '('
+ case 18057: // 'following' '('
+ case 18058: // 'following-sibling' '('
+ case 18059: // 'for' '('
+ case 18062: // 'from' '('
+ case 18063: // 'ft-option' '('
+ case 18067: // 'function' '('
+ case 18068: // 'ge' '('
+ case 18070: // 'group' '('
+ case 18072: // 'gt' '('
+ case 18073: // 'idiv' '('
+ case 18075: // 'import' '('
+ case 18076: // 'in' '('
+ case 18077: // 'index' '('
+ case 18081: // 'insert' '('
+ case 18082: // 'instance' '('
+ case 18083: // 'integrity' '('
+ case 18084: // 'intersect' '('
+ case 18085: // 'into' '('
+ case 18086: // 'is' '('
+ case 18088: // 'json' '('
+ case 18090: // 'jsoniq' '('
+ case 18093: // 'last' '('
+ case 18094: // 'lax' '('
+ case 18095: // 'le' '('
+ case 18097: // 'let' '('
+ case 18099: // 'loop' '('
+ case 18101: // 'lt' '('
+ case 18103: // 'mod' '('
+ case 18104: // 'modify' '('
+ case 18105: // 'module' '('
+ case 18107: // 'namespace' '('
+ case 18109: // 'ne' '('
+ case 18115: // 'nodes' '('
+ case 18117: // 'null' '('
+ case 18118: // 'object' '('
+ case 18122: // 'only' '('
+ case 18123: // 'option' '('
+ case 18124: // 'or' '('
+ case 18125: // 'order' '('
+ case 18126: // 'ordered' '('
+ case 18127: // 'ordering' '('
+ case 18130: // 'parent' '('
+ case 18136: // 'preceding' '('
+ case 18137: // 'preceding-sibling' '('
+ case 18142: // 'rename' '('
+ case 18143: // 'replace' '('
+ case 18144: // 'return' '('
+ case 18145: // 'returning' '('
+ case 18146: // 'revalidation' '('
+ case 18148: // 'satisfies' '('
+ case 18149: // 'schema' '('
+ case 18152: // 'score' '('
+ case 18153: // 'select' '('
+ case 18154: // 'self' '('
+ case 18159: // 'sliding' '('
+ case 18160: // 'some' '('
+ case 18161: // 'stable' '('
+ case 18162: // 'start' '('
+ case 18165: // 'strict' '('
+ case 18173: // 'to' '('
+ case 18174: // 'treat' '('
+ case 18175: // 'true' '('
+ case 18176: // 'try' '('
+ case 18177: // 'tumbling' '('
+ case 18178: // 'type' '('
+ case 18180: // 'union' '('
+ case 18182: // 'unordered' '('
+ case 18183: // 'updating' '('
+ case 18186: // 'validate' '('
+ case 18187: // 'value' '('
+ case 18188: // 'variable' '('
+ case 18189: // 'version' '('
+ case 18192: // 'where' '('
+ case 18193: // 'while' '('
+ case 18196: // 'with' '('
+ case 23175: // 'false' '.'
+ case 23237: // 'null' '.'
+ case 23295: // 'true' '.'
+ case 37459: // 'attribute' 'allowing'
+ case 37498: // 'element' 'allowing'
+ case 37563: // 'namespace' 'allowing'
+ case 37596: // 'processing-instruction' 'allowing'
+ case 37971: // 'attribute' 'ancestor'
+ case 38010: // 'element' 'ancestor'
+ case 38075: // 'namespace' 'ancestor'
+ case 38108: // 'processing-instruction' 'ancestor'
+ case 38483: // 'attribute' 'ancestor-or-self'
+ case 38522: // 'element' 'ancestor-or-self'
+ case 38587: // 'namespace' 'ancestor-or-self'
+ case 38620: // 'processing-instruction' 'ancestor-or-self'
+ case 40019: // 'attribute' 'append'
+ case 40058: // 'element' 'append'
+ case 40123: // 'namespace' 'append'
+ case 40156: // 'processing-instruction' 'append'
+ case 40531: // 'attribute' 'array'
+ case 40570: // 'element' 'array'
+ case 42579: // 'attribute' 'attribute'
+ case 42618: // 'element' 'attribute'
+ case 42683: // 'namespace' 'attribute'
+ case 42716: // 'processing-instruction' 'attribute'
+ case 43091: // 'attribute' 'base-uri'
+ case 43130: // 'element' 'base-uri'
+ case 43195: // 'namespace' 'base-uri'
+ case 43228: // 'processing-instruction' 'base-uri'
+ case 44115: // 'attribute' 'boundary-space'
+ case 44154: // 'element' 'boundary-space'
+ case 44219: // 'namespace' 'boundary-space'
+ case 44252: // 'processing-instruction' 'boundary-space'
+ case 44627: // 'attribute' 'break'
+ case 44666: // 'element' 'break'
+ case 44731: // 'namespace' 'break'
+ case 44764: // 'processing-instruction' 'break'
+ case 47187: // 'attribute' 'catch'
+ case 47226: // 'element' 'catch'
+ case 47291: // 'namespace' 'catch'
+ case 47324: // 'processing-instruction' 'catch'
+ case 48211: // 'attribute' 'child'
+ case 48250: // 'element' 'child'
+ case 48315: // 'namespace' 'child'
+ case 48348: // 'processing-instruction' 'child'
+ case 49747: // 'attribute' 'comment'
+ case 49786: // 'element' 'comment'
+ case 49851: // 'namespace' 'comment'
+ case 49884: // 'processing-instruction' 'comment'
+ case 50259: // 'attribute' 'constraint'
+ case 50298: // 'element' 'constraint'
+ case 50363: // 'namespace' 'constraint'
+ case 50396: // 'processing-instruction' 'constraint'
+ case 50771: // 'attribute' 'construction'
+ case 50810: // 'element' 'construction'
+ case 50875: // 'namespace' 'construction'
+ case 50908: // 'processing-instruction' 'construction'
+ case 52307: // 'attribute' 'context'
+ case 52346: // 'element' 'context'
+ case 52411: // 'namespace' 'context'
+ case 52444: // 'processing-instruction' 'context'
+ case 52819: // 'attribute' 'continue'
+ case 52858: // 'element' 'continue'
+ case 52923: // 'namespace' 'continue'
+ case 52956: // 'processing-instruction' 'continue'
+ case 53331: // 'attribute' 'copy'
+ case 53370: // 'element' 'copy'
+ case 53435: // 'namespace' 'copy'
+ case 53468: // 'processing-instruction' 'copy'
+ case 53843: // 'attribute' 'copy-namespaces'
+ case 53882: // 'element' 'copy-namespaces'
+ case 53947: // 'namespace' 'copy-namespaces'
+ case 53980: // 'processing-instruction' 'copy-namespaces'
+ case 54867: // 'attribute' 'decimal-format'
+ case 54906: // 'element' 'decimal-format'
+ case 54971: // 'namespace' 'decimal-format'
+ case 55004: // 'processing-instruction' 'decimal-format'
+ case 55891: // 'attribute' 'declare'
+ case 55930: // 'element' 'declare'
+ case 55995: // 'namespace' 'declare'
+ case 56028: // 'processing-instruction' 'declare'
+ case 56915: // 'attribute' 'delete'
+ case 56954: // 'element' 'delete'
+ case 57019: // 'namespace' 'delete'
+ case 57052: // 'processing-instruction' 'delete'
+ case 57427: // 'attribute' 'descendant'
+ case 57466: // 'element' 'descendant'
+ case 57531: // 'namespace' 'descendant'
+ case 57564: // 'processing-instruction' 'descendant'
+ case 57939: // 'attribute' 'descendant-or-self'
+ case 57978: // 'element' 'descendant-or-self'
+ case 58043: // 'namespace' 'descendant-or-self'
+ case 58076: // 'processing-instruction' 'descendant-or-self'
+ case 61523: // 'attribute' 'document'
+ case 61562: // 'element' 'document'
+ case 61627: // 'namespace' 'document'
+ case 61660: // 'processing-instruction' 'document'
+ case 62035: // 'attribute' 'document-node'
+ case 62074: // 'element' 'document-node'
+ case 62139: // 'namespace' 'document-node'
+ case 62172: // 'processing-instruction' 'document-node'
+ case 62547: // 'attribute' 'element'
+ case 62586: // 'element' 'element'
+ case 62651: // 'namespace' 'element'
+ case 62684: // 'processing-instruction' 'element'
+ case 64083: // 'attribute' 'empty-sequence'
+ case 64122: // 'element' 'empty-sequence'
+ case 64187: // 'namespace' 'empty-sequence'
+ case 64220: // 'processing-instruction' 'empty-sequence'
+ case 64595: // 'attribute' 'encoding'
+ case 64634: // 'element' 'encoding'
+ case 64699: // 'namespace' 'encoding'
+ case 64732: // 'processing-instruction' 'encoding'
+ case 66643: // 'attribute' 'every'
+ case 66682: // 'element' 'every'
+ case 66747: // 'namespace' 'every'
+ case 66780: // 'processing-instruction' 'every'
+ case 68179: // 'attribute' 'exit'
+ case 68218: // 'element' 'exit'
+ case 68283: // 'namespace' 'exit'
+ case 68316: // 'processing-instruction' 'exit'
+ case 68691: // 'attribute' 'external'
+ case 68730: // 'element' 'external'
+ case 68795: // 'namespace' 'external'
+ case 68828: // 'processing-instruction' 'external'
+ case 69203: // 'attribute' 'false'
+ case 69242: // 'element' 'false'
+ case 69307: // 'namespace' 'false'
+ case 69340: // 'processing-instruction' 'false'
+ case 69715: // 'attribute' 'first'
+ case 69754: // 'element' 'first'
+ case 69819: // 'namespace' 'first'
+ case 69852: // 'processing-instruction' 'first'
+ case 70227: // 'attribute' 'following'
+ case 70266: // 'element' 'following'
+ case 70331: // 'namespace' 'following'
+ case 70364: // 'processing-instruction' 'following'
+ case 70739: // 'attribute' 'following-sibling'
+ case 70778: // 'element' 'following-sibling'
+ case 70843: // 'namespace' 'following-sibling'
+ case 70876: // 'processing-instruction' 'following-sibling'
+ case 72787: // 'attribute' 'from'
+ case 72826: // 'element' 'from'
+ case 72891: // 'namespace' 'from'
+ case 72924: // 'processing-instruction' 'from'
+ case 73299: // 'attribute' 'ft-option'
+ case 73338: // 'element' 'ft-option'
+ case 73403: // 'namespace' 'ft-option'
+ case 73436: // 'processing-instruction' 'ft-option'
+ case 75347: // 'attribute' 'function'
+ case 75386: // 'element' 'function'
+ case 75451: // 'namespace' 'function'
+ case 75484: // 'processing-instruction' 'function'
+ case 78931: // 'attribute' 'if'
+ case 78970: // 'element' 'if'
+ case 79035: // 'namespace' 'if'
+ case 79068: // 'processing-instruction' 'if'
+ case 79443: // 'attribute' 'import'
+ case 79482: // 'element' 'import'
+ case 79547: // 'namespace' 'import'
+ case 79580: // 'processing-instruction' 'import'
+ case 79955: // 'attribute' 'in'
+ case 79994: // 'element' 'in'
+ case 80059: // 'namespace' 'in'
+ case 80092: // 'processing-instruction' 'in'
+ case 80467: // 'attribute' 'index'
+ case 80506: // 'element' 'index'
+ case 80571: // 'namespace' 'index'
+ case 80604: // 'processing-instruction' 'index'
+ case 82515: // 'attribute' 'insert'
+ case 82554: // 'element' 'insert'
+ case 82619: // 'namespace' 'insert'
+ case 82652: // 'processing-instruction' 'insert'
+ case 83539: // 'attribute' 'integrity'
+ case 83578: // 'element' 'integrity'
+ case 83643: // 'namespace' 'integrity'
+ case 83676: // 'processing-instruction' 'integrity'
+ case 85587: // 'attribute' 'item'
+ case 85626: // 'element' 'item'
+ case 85691: // 'namespace' 'item'
+ case 85724: // 'processing-instruction' 'item'
+ case 86099: // 'attribute' 'json'
+ case 86138: // 'element' 'json'
+ case 86203: // 'namespace' 'json'
+ case 86236: // 'processing-instruction' 'json'
+ case 86611: // 'attribute' 'json-item'
+ case 86650: // 'element' 'json-item'
+ case 87123: // 'attribute' 'jsoniq'
+ case 87162: // 'element' 'jsoniq'
+ case 87227: // 'namespace' 'jsoniq'
+ case 87260: // 'processing-instruction' 'jsoniq'
+ case 88659: // 'attribute' 'last'
+ case 88698: // 'element' 'last'
+ case 88763: // 'namespace' 'last'
+ case 88796: // 'processing-instruction' 'last'
+ case 89171: // 'attribute' 'lax'
+ case 89210: // 'element' 'lax'
+ case 89275: // 'namespace' 'lax'
+ case 89308: // 'processing-instruction' 'lax'
+ case 91731: // 'attribute' 'loop'
+ case 91770: // 'element' 'loop'
+ case 91835: // 'namespace' 'loop'
+ case 91868: // 'processing-instruction' 'loop'
+ case 94803: // 'attribute' 'module'
+ case 94842: // 'element' 'module'
+ case 94907: // 'namespace' 'module'
+ case 94940: // 'processing-instruction' 'module'
+ case 95827: // 'attribute' 'namespace'
+ case 95866: // 'element' 'namespace'
+ case 95931: // 'namespace' 'namespace'
+ case 95964: // 'processing-instruction' 'namespace'
+ case 96339: // 'attribute' 'namespace-node'
+ case 96378: // 'element' 'namespace-node'
+ case 96443: // 'namespace' 'namespace-node'
+ case 96476: // 'processing-instruction' 'namespace-node'
+ case 99411: // 'attribute' 'node'
+ case 99450: // 'element' 'node'
+ case 99515: // 'namespace' 'node'
+ case 99548: // 'processing-instruction' 'node'
+ case 99923: // 'attribute' 'nodes'
+ case 99962: // 'element' 'nodes'
+ case 100027: // 'namespace' 'nodes'
+ case 100060: // 'processing-instruction' 'nodes'
+ case 100947: // 'attribute' 'null'
+ case 100986: // 'element' 'null'
+ case 101051: // 'namespace' 'null'
+ case 101084: // 'processing-instruction' 'null'
+ case 101459: // 'attribute' 'object'
+ case 101498: // 'element' 'object'
+ case 101563: // 'namespace' 'object'
+ case 101596: // 'processing-instruction' 'object'
+ case 104019: // 'attribute' 'option'
+ case 104058: // 'element' 'option'
+ case 104123: // 'namespace' 'option'
+ case 104156: // 'processing-instruction' 'option'
+ case 105555: // 'attribute' 'ordered'
+ case 105594: // 'element' 'ordered'
+ case 105659: // 'namespace' 'ordered'
+ case 105692: // 'processing-instruction' 'ordered'
+ case 106067: // 'attribute' 'ordering'
+ case 106106: // 'element' 'ordering'
+ case 106171: // 'namespace' 'ordering'
+ case 106204: // 'processing-instruction' 'ordering'
+ case 107603: // 'attribute' 'parent'
+ case 107642: // 'element' 'parent'
+ case 107707: // 'namespace' 'parent'
+ case 107740: // 'processing-instruction' 'parent'
+ case 110675: // 'attribute' 'preceding'
+ case 110714: // 'element' 'preceding'
+ case 110779: // 'namespace' 'preceding'
+ case 110812: // 'processing-instruction' 'preceding'
+ case 111187: // 'attribute' 'preceding-sibling'
+ case 111226: // 'element' 'preceding-sibling'
+ case 111291: // 'namespace' 'preceding-sibling'
+ case 111324: // 'processing-instruction' 'preceding-sibling'
+ case 112723: // 'attribute' 'processing-instruction'
+ case 112762: // 'element' 'processing-instruction'
+ case 112827: // 'namespace' 'processing-instruction'
+ case 112860: // 'processing-instruction' 'processing-instruction'
+ case 113747: // 'attribute' 'rename'
+ case 113786: // 'element' 'rename'
+ case 113851: // 'namespace' 'rename'
+ case 113884: // 'processing-instruction' 'rename'
+ case 114259: // 'attribute' 'replace'
+ case 114298: // 'element' 'replace'
+ case 114363: // 'namespace' 'replace'
+ case 114396: // 'processing-instruction' 'replace'
+ case 115283: // 'attribute' 'returning'
+ case 115322: // 'element' 'returning'
+ case 115387: // 'namespace' 'returning'
+ case 115420: // 'processing-instruction' 'returning'
+ case 115795: // 'attribute' 'revalidation'
+ case 115834: // 'element' 'revalidation'
+ case 115899: // 'namespace' 'revalidation'
+ case 115932: // 'processing-instruction' 'revalidation'
+ case 117331: // 'attribute' 'schema'
+ case 117370: // 'element' 'schema'
+ case 117435: // 'namespace' 'schema'
+ case 117468: // 'processing-instruction' 'schema'
+ case 117843: // 'attribute' 'schema-attribute'
+ case 117882: // 'element' 'schema-attribute'
+ case 117947: // 'namespace' 'schema-attribute'
+ case 117980: // 'processing-instruction' 'schema-attribute'
+ case 118355: // 'attribute' 'schema-element'
+ case 118394: // 'element' 'schema-element'
+ case 118459: // 'namespace' 'schema-element'
+ case 118492: // 'processing-instruction' 'schema-element'
+ case 118867: // 'attribute' 'score'
+ case 118906: // 'element' 'score'
+ case 118971: // 'namespace' 'score'
+ case 119004: // 'processing-instruction' 'score'
+ case 119379: // 'attribute' 'select'
+ case 119418: // 'element' 'select'
+ case 119483: // 'namespace' 'select'
+ case 119516: // 'processing-instruction' 'select'
+ case 119891: // 'attribute' 'self'
+ case 119930: // 'element' 'self'
+ case 119995: // 'namespace' 'self'
+ case 120028: // 'processing-instruction' 'self'
+ case 122451: // 'attribute' 'sliding'
+ case 122490: // 'element' 'sliding'
+ case 122555: // 'namespace' 'sliding'
+ case 122588: // 'processing-instruction' 'sliding'
+ case 122963: // 'attribute' 'some'
+ case 123002: // 'element' 'some'
+ case 123067: // 'namespace' 'some'
+ case 123100: // 'processing-instruction' 'some'
+ case 125523: // 'attribute' 'strict'
+ case 125562: // 'element' 'strict'
+ case 125627: // 'namespace' 'strict'
+ case 125660: // 'processing-instruction' 'strict'
+ case 126547: // 'attribute' 'structured-item'
+ case 126586: // 'element' 'structured-item'
+ case 127059: // 'attribute' 'switch'
+ case 127098: // 'element' 'switch'
+ case 127163: // 'namespace' 'switch'
+ case 127196: // 'processing-instruction' 'switch'
+ case 127571: // 'attribute' 'text'
+ case 127610: // 'element' 'text'
+ case 127675: // 'namespace' 'text'
+ case 127708: // 'processing-instruction' 'text'
+ case 130643: // 'attribute' 'true'
+ case 130682: // 'element' 'true'
+ case 130747: // 'namespace' 'true'
+ case 130780: // 'processing-instruction' 'true'
+ case 131155: // 'attribute' 'try'
+ case 131194: // 'element' 'try'
+ case 131259: // 'namespace' 'try'
+ case 131292: // 'processing-instruction' 'try'
+ case 131667: // 'attribute' 'tumbling'
+ case 131706: // 'element' 'tumbling'
+ case 131771: // 'namespace' 'tumbling'
+ case 131804: // 'processing-instruction' 'tumbling'
+ case 132179: // 'attribute' 'type'
+ case 132218: // 'element' 'type'
+ case 132283: // 'namespace' 'type'
+ case 132316: // 'processing-instruction' 'type'
+ case 132691: // 'attribute' 'typeswitch'
+ case 132730: // 'element' 'typeswitch'
+ case 132795: // 'namespace' 'typeswitch'
+ case 132828: // 'processing-instruction' 'typeswitch'
+ case 134227: // 'attribute' 'unordered'
+ case 134266: // 'element' 'unordered'
+ case 134331: // 'namespace' 'unordered'
+ case 134364: // 'processing-instruction' 'unordered'
+ case 134739: // 'attribute' 'updating'
+ case 134778: // 'element' 'updating'
+ case 134843: // 'namespace' 'updating'
+ case 134876: // 'processing-instruction' 'updating'
+ case 136275: // 'attribute' 'validate'
+ case 136314: // 'element' 'validate'
+ case 136379: // 'namespace' 'validate'
+ case 136412: // 'processing-instruction' 'validate'
+ case 136787: // 'attribute' 'value'
+ case 136826: // 'element' 'value'
+ case 136891: // 'namespace' 'value'
+ case 136924: // 'processing-instruction' 'value'
+ case 137299: // 'attribute' 'variable'
+ case 137338: // 'element' 'variable'
+ case 137403: // 'namespace' 'variable'
+ case 137436: // 'processing-instruction' 'variable'
+ case 137811: // 'attribute' 'version'
+ case 137850: // 'element' 'version'
+ case 137915: // 'namespace' 'version'
+ case 137948: // 'processing-instruction' 'version'
+ case 139859: // 'attribute' 'while'
+ case 139898: // 'element' 'while'
+ case 139963: // 'namespace' 'while'
+ case 139996: // 'processing-instruction' 'while'
+ case 143955: // 'attribute' '{'
+ case 143969: // 'comment' '{'
+ case 143992: // 'document' '{'
+ case 143994: // 'element' '{'
+ case 144059: // 'namespace' '{'
+ case 144078: // 'ordered' '{'
+ case 144092: // 'processing-instruction' '{'
+ case 144121: // 'text' '{'
+ case 144134: // 'unordered' '{'
+ parse_PostfixExpr();
+ break;
+ default:
+ parse_AxisStep();
+ }
+ eventHandler.endNonterminal("StepExpr", e0);
+ }
+
+ function try_StepExpr()
+ {
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ lookahead2W(288); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 122: // 'element'
+ lookahead2W(287); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 187: // 'namespace'
+ case 220: // 'processing-instruction'
+ lookahead2W(285); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(237); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '.' |
+ break;
+ case 97: // 'comment'
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 249: // 'text'
+ case 262: // 'unordered'
+ lookahead2W(239); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 79: // 'array'
+ case 125: // 'empty-sequence'
+ case 154: // 'if'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 247: // 'structured-item'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ lookahead2W(230); // S^WS | EOF | '!' | '!=' | '#' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 94: // 'child'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 234: // 'self'
+ lookahead2W(238); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 6: // EQName^Token
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 76: // 'and'
+ case 78: // 'append'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 87: // 'break'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 103: // 'continue'
+ case 104: // 'copy'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 111: // 'delete'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 121: // 'document-node'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 130: // 'every'
+ case 132: // 'except'
+ case 133: // 'exit'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 139: // 'for'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 147: // 'function'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 161: // 'insert'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 177: // 'let'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 188: // 'namespace-node'
+ case 189: // 'ne'
+ case 194: // 'node'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 222: // 'rename'
+ case 223: // 'replace'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 239: // 'sliding'
+ case 240: // 'some'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 256: // 'try'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 266: // 'validate'
+ case 267: // 'value'
+ case 268: // 'variable'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(234); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 12935 // 'false' EOF
+ || lk == 12997 // 'null' EOF
+ || lk == 13055 // 'true' EOF
+ || lk == 13447 // 'false' '!'
+ || lk == 13509 // 'null' '!'
+ || lk == 13567 // 'true' '!'
+ || lk == 13959 // 'false' '!='
+ || lk == 14021 // 'null' '!='
+ || lk == 14079 // 'true' '!='
+ || lk == 19591 // 'false' ')'
+ || lk == 19653 // 'null' ')'
+ || lk == 19711 // 'true' ')'
+ || lk == 20103 // 'false' '*'
+ || lk == 20165 // 'null' '*'
+ || lk == 20223 // 'true' '*'
+ || lk == 21127 // 'false' '+'
+ || lk == 21189 // 'null' '+'
+ || lk == 21247 // 'true' '+'
+ || lk == 21639 // 'false' ','
+ || lk == 21701 // 'null' ','
+ || lk == 21759 // 'true' ','
+ || lk == 22151 // 'false' '-'
+ || lk == 22213 // 'null' '-'
+ || lk == 22271 // 'true' '-'
+ || lk == 24199 // 'false' '/'
+ || lk == 24261 // 'null' '/'
+ || lk == 24319 // 'true' '/'
+ || lk == 24711 // 'false' '//'
+ || lk == 24773 // 'null' '//'
+ || lk == 24831 // 'true' '//'
+ || lk == 25735 // 'false' ':'
+ || lk == 25797 // 'null' ':'
+ || lk == 25855 // 'true' ':'
+ || lk == 27783 // 'false' ';'
+ || lk == 27845 // 'null' ';'
+ || lk == 27903 // 'true' ';'
+ || lk == 28295 // 'false' '<'
+ || lk == 28357 // 'null' '<'
+ || lk == 28415 // 'true' '<'
+ || lk == 29831 // 'false' '<<'
+ || lk == 29893 // 'null' '<<'
+ || lk == 29951 // 'true' '<<'
+ || lk == 30343 // 'false' '<='
+ || lk == 30405 // 'null' '<='
+ || lk == 30463 // 'true' '<='
+ || lk == 31367 // 'false' '='
+ || lk == 31429 // 'null' '='
+ || lk == 31487 // 'true' '='
+ || lk == 31879 // 'false' '>'
+ || lk == 31941 // 'null' '>'
+ || lk == 31999 // 'true' '>'
+ || lk == 32391 // 'false' '>='
+ || lk == 32453 // 'null' '>='
+ || lk == 32511 // 'true' '>='
+ || lk == 32903 // 'false' '>>'
+ || lk == 32965 // 'null' '>>'
+ || lk == 33023 // 'true' '>>'
+ || lk == 35463 // 'false' '['
+ || lk == 35525 // 'null' '['
+ || lk == 35583 // 'true' '['
+ || lk == 35975 // 'false' ']'
+ || lk == 36037 // 'null' ']'
+ || lk == 36095 // 'true' ']'
+ || lk == 36435 // 'attribute' 'after'
+ || lk == 36474 // 'element' 'after'
+ || lk == 36487 // 'false' 'after'
+ || lk == 36539 // 'namespace' 'after'
+ || lk == 36549 // 'null' 'after'
+ || lk == 36572 // 'processing-instruction' 'after'
+ || lk == 36607 // 'true' 'after'
+ || lk == 38995 // 'attribute' 'and'
+ || lk == 39034 // 'element' 'and'
+ || lk == 39047 // 'false' 'and'
+ || lk == 39099 // 'namespace' 'and'
+ || lk == 39109 // 'null' 'and'
+ || lk == 39132 // 'processing-instruction' 'and'
+ || lk == 39167 // 'true' 'and'
+ || lk == 41043 // 'attribute' 'as'
+ || lk == 41082 // 'element' 'as'
+ || lk == 41095 // 'false' 'as'
+ || lk == 41147 // 'namespace' 'as'
+ || lk == 41157 // 'null' 'as'
+ || lk == 41180 // 'processing-instruction' 'as'
+ || lk == 41215 // 'true' 'as'
+ || lk == 41555 // 'attribute' 'ascending'
+ || lk == 41594 // 'element' 'ascending'
+ || lk == 41607 // 'false' 'ascending'
+ || lk == 41659 // 'namespace' 'ascending'
+ || lk == 41669 // 'null' 'ascending'
+ || lk == 41692 // 'processing-instruction' 'ascending'
+ || lk == 41727 // 'true' 'ascending'
+ || lk == 42067 // 'attribute' 'at'
+ || lk == 42106 // 'element' 'at'
+ || lk == 42119 // 'false' 'at'
+ || lk == 42171 // 'namespace' 'at'
+ || lk == 42181 // 'null' 'at'
+ || lk == 42204 // 'processing-instruction' 'at'
+ || lk == 42239 // 'true' 'at'
+ || lk == 43603 // 'attribute' 'before'
+ || lk == 43642 // 'element' 'before'
+ || lk == 43655 // 'false' 'before'
+ || lk == 43707 // 'namespace' 'before'
+ || lk == 43717 // 'null' 'before'
+ || lk == 43740 // 'processing-instruction' 'before'
+ || lk == 43775 // 'true' 'before'
+ || lk == 45191 // 'false' 'by'
+ || lk == 45253 // 'null' 'by'
+ || lk == 45311 // 'true' 'by'
+ || lk == 45651 // 'attribute' 'case'
+ || lk == 45690 // 'element' 'case'
+ || lk == 45703 // 'false' 'case'
+ || lk == 45755 // 'namespace' 'case'
+ || lk == 45765 // 'null' 'case'
+ || lk == 45788 // 'processing-instruction' 'case'
+ || lk == 45823 // 'true' 'case'
+ || lk == 46163 // 'attribute' 'cast'
+ || lk == 46202 // 'element' 'cast'
+ || lk == 46215 // 'false' 'cast'
+ || lk == 46267 // 'namespace' 'cast'
+ || lk == 46277 // 'null' 'cast'
+ || lk == 46300 // 'processing-instruction' 'cast'
+ || lk == 46335 // 'true' 'cast'
+ || lk == 46675 // 'attribute' 'castable'
+ || lk == 46714 // 'element' 'castable'
+ || lk == 46727 // 'false' 'castable'
+ || lk == 46779 // 'namespace' 'castable'
+ || lk == 46789 // 'null' 'castable'
+ || lk == 46812 // 'processing-instruction' 'castable'
+ || lk == 46847 // 'true' 'castable'
+ || lk == 48723 // 'attribute' 'collation'
+ || lk == 48762 // 'element' 'collation'
+ || lk == 48775 // 'false' 'collation'
+ || lk == 48827 // 'namespace' 'collation'
+ || lk == 48837 // 'null' 'collation'
+ || lk == 48860 // 'processing-instruction' 'collation'
+ || lk == 48895 // 'true' 'collation'
+ || lk == 51335 // 'false' 'contains'
+ || lk == 51397 // 'null' 'contains'
+ || lk == 51455 // 'true' 'contains'
+ || lk == 54355 // 'attribute' 'count'
+ || lk == 54394 // 'element' 'count'
+ || lk == 54407 // 'false' 'count'
+ || lk == 54459 // 'namespace' 'count'
+ || lk == 54469 // 'null' 'count'
+ || lk == 54492 // 'processing-instruction' 'count'
+ || lk == 54527 // 'true' 'count'
+ || lk == 56403 // 'attribute' 'default'
+ || lk == 56442 // 'element' 'default'
+ || lk == 56455 // 'false' 'default'
+ || lk == 56507 // 'namespace' 'default'
+ || lk == 56517 // 'null' 'default'
+ || lk == 56540 // 'processing-instruction' 'default'
+ || lk == 56575 // 'true' 'default'
+ || lk == 58451 // 'attribute' 'descending'
+ || lk == 58490 // 'element' 'descending'
+ || lk == 58503 // 'false' 'descending'
+ || lk == 58555 // 'namespace' 'descending'
+ || lk == 58565 // 'null' 'descending'
+ || lk == 58588 // 'processing-instruction' 'descending'
+ || lk == 58623 // 'true' 'descending'
+ || lk == 61011 // 'attribute' 'div'
+ || lk == 61050 // 'element' 'div'
+ || lk == 61063 // 'false' 'div'
+ || lk == 61115 // 'namespace' 'div'
+ || lk == 61125 // 'null' 'div'
+ || lk == 61148 // 'processing-instruction' 'div'
+ || lk == 61183 // 'true' 'div'
+ || lk == 63059 // 'attribute' 'else'
+ || lk == 63098 // 'element' 'else'
+ || lk == 63111 // 'false' 'else'
+ || lk == 63163 // 'namespace' 'else'
+ || lk == 63173 // 'null' 'else'
+ || lk == 63196 // 'processing-instruction' 'else'
+ || lk == 63231 // 'true' 'else'
+ || lk == 63571 // 'attribute' 'empty'
+ || lk == 63610 // 'element' 'empty'
+ || lk == 63623 // 'false' 'empty'
+ || lk == 63675 // 'namespace' 'empty'
+ || lk == 63685 // 'null' 'empty'
+ || lk == 63708 // 'processing-instruction' 'empty'
+ || lk == 63743 // 'true' 'empty'
+ || lk == 65107 // 'attribute' 'end'
+ || lk == 65146 // 'element' 'end'
+ || lk == 65159 // 'false' 'end'
+ || lk == 65211 // 'namespace' 'end'
+ || lk == 65221 // 'null' 'end'
+ || lk == 65244 // 'processing-instruction' 'end'
+ || lk == 65279 // 'true' 'end'
+ || lk == 66131 // 'attribute' 'eq'
+ || lk == 66170 // 'element' 'eq'
+ || lk == 66183 // 'false' 'eq'
+ || lk == 66235 // 'namespace' 'eq'
+ || lk == 66245 // 'null' 'eq'
+ || lk == 66268 // 'processing-instruction' 'eq'
+ || lk == 66303 // 'true' 'eq'
+ || lk == 67667 // 'attribute' 'except'
+ || lk == 67706 // 'element' 'except'
+ || lk == 67719 // 'false' 'except'
+ || lk == 67771 // 'namespace' 'except'
+ || lk == 67781 // 'null' 'except'
+ || lk == 67804 // 'processing-instruction' 'except'
+ || lk == 67839 // 'true' 'except'
+ || lk == 71251 // 'attribute' 'for'
+ || lk == 71290 // 'element' 'for'
+ || lk == 71303 // 'false' 'for'
+ || lk == 71355 // 'namespace' 'for'
+ || lk == 71365 // 'null' 'for'
+ || lk == 71388 // 'processing-instruction' 'for'
+ || lk == 71423 // 'true' 'for'
+ || lk == 75859 // 'attribute' 'ge'
+ || lk == 75898 // 'element' 'ge'
+ || lk == 75911 // 'false' 'ge'
+ || lk == 75963 // 'namespace' 'ge'
+ || lk == 75973 // 'null' 'ge'
+ || lk == 75996 // 'processing-instruction' 'ge'
+ || lk == 76031 // 'true' 'ge'
+ || lk == 76883 // 'attribute' 'group'
+ || lk == 76922 // 'element' 'group'
+ || lk == 76935 // 'false' 'group'
+ || lk == 76987 // 'namespace' 'group'
+ || lk == 76997 // 'null' 'group'
+ || lk == 77020 // 'processing-instruction' 'group'
+ || lk == 77055 // 'true' 'group'
+ || lk == 77907 // 'attribute' 'gt'
+ || lk == 77946 // 'element' 'gt'
+ || lk == 77959 // 'false' 'gt'
+ || lk == 78011 // 'namespace' 'gt'
+ || lk == 78021 // 'null' 'gt'
+ || lk == 78044 // 'processing-instruction' 'gt'
+ || lk == 78079 // 'true' 'gt'
+ || lk == 78419 // 'attribute' 'idiv'
+ || lk == 78458 // 'element' 'idiv'
+ || lk == 78471 // 'false' 'idiv'
+ || lk == 78523 // 'namespace' 'idiv'
+ || lk == 78533 // 'null' 'idiv'
+ || lk == 78556 // 'processing-instruction' 'idiv'
+ || lk == 78591 // 'true' 'idiv'
+ || lk == 83027 // 'attribute' 'instance'
+ || lk == 83066 // 'element' 'instance'
+ || lk == 83079 // 'false' 'instance'
+ || lk == 83131 // 'namespace' 'instance'
+ || lk == 83141 // 'null' 'instance'
+ || lk == 83164 // 'processing-instruction' 'instance'
+ || lk == 83199 // 'true' 'instance'
+ || lk == 84051 // 'attribute' 'intersect'
+ || lk == 84090 // 'element' 'intersect'
+ || lk == 84103 // 'false' 'intersect'
+ || lk == 84155 // 'namespace' 'intersect'
+ || lk == 84165 // 'null' 'intersect'
+ || lk == 84188 // 'processing-instruction' 'intersect'
+ || lk == 84223 // 'true' 'intersect'
+ || lk == 84563 // 'attribute' 'into'
+ || lk == 84602 // 'element' 'into'
+ || lk == 84615 // 'false' 'into'
+ || lk == 84667 // 'namespace' 'into'
+ || lk == 84677 // 'null' 'into'
+ || lk == 84700 // 'processing-instruction' 'into'
+ || lk == 84735 // 'true' 'into'
+ || lk == 85075 // 'attribute' 'is'
+ || lk == 85114 // 'element' 'is'
+ || lk == 85127 // 'false' 'is'
+ || lk == 85179 // 'namespace' 'is'
+ || lk == 85189 // 'null' 'is'
+ || lk == 85212 // 'processing-instruction' 'is'
+ || lk == 85247 // 'true' 'is'
+ || lk == 89683 // 'attribute' 'le'
+ || lk == 89722 // 'element' 'le'
+ || lk == 89735 // 'false' 'le'
+ || lk == 89787 // 'namespace' 'le'
+ || lk == 89797 // 'null' 'le'
+ || lk == 89820 // 'processing-instruction' 'le'
+ || lk == 89855 // 'true' 'le'
+ || lk == 90707 // 'attribute' 'let'
+ || lk == 90746 // 'element' 'let'
+ || lk == 90759 // 'false' 'let'
+ || lk == 90811 // 'namespace' 'let'
+ || lk == 90821 // 'null' 'let'
+ || lk == 90844 // 'processing-instruction' 'let'
+ || lk == 90879 // 'true' 'let'
+ || lk == 92755 // 'attribute' 'lt'
+ || lk == 92794 // 'element' 'lt'
+ || lk == 92807 // 'false' 'lt'
+ || lk == 92859 // 'namespace' 'lt'
+ || lk == 92869 // 'null' 'lt'
+ || lk == 92892 // 'processing-instruction' 'lt'
+ || lk == 92927 // 'true' 'lt'
+ || lk == 93779 // 'attribute' 'mod'
+ || lk == 93818 // 'element' 'mod'
+ || lk == 93831 // 'false' 'mod'
+ || lk == 93883 // 'namespace' 'mod'
+ || lk == 93893 // 'null' 'mod'
+ || lk == 93916 // 'processing-instruction' 'mod'
+ || lk == 93951 // 'true' 'mod'
+ || lk == 94291 // 'attribute' 'modify'
+ || lk == 94330 // 'element' 'modify'
+ || lk == 94343 // 'false' 'modify'
+ || lk == 94395 // 'namespace' 'modify'
+ || lk == 94405 // 'null' 'modify'
+ || lk == 94428 // 'processing-instruction' 'modify'
+ || lk == 94463 // 'true' 'modify'
+ || lk == 96851 // 'attribute' 'ne'
+ || lk == 96890 // 'element' 'ne'
+ || lk == 96903 // 'false' 'ne'
+ || lk == 96955 // 'namespace' 'ne'
+ || lk == 96965 // 'null' 'ne'
+ || lk == 96988 // 'processing-instruction' 'ne'
+ || lk == 97023 // 'true' 'ne'
+ || lk == 103507 // 'attribute' 'only'
+ || lk == 103546 // 'element' 'only'
+ || lk == 103559 // 'false' 'only'
+ || lk == 103611 // 'namespace' 'only'
+ || lk == 103621 // 'null' 'only'
+ || lk == 103644 // 'processing-instruction' 'only'
+ || lk == 103679 // 'true' 'only'
+ || lk == 104531 // 'attribute' 'or'
+ || lk == 104570 // 'element' 'or'
+ || lk == 104583 // 'false' 'or'
+ || lk == 104635 // 'namespace' 'or'
+ || lk == 104645 // 'null' 'or'
+ || lk == 104668 // 'processing-instruction' 'or'
+ || lk == 104703 // 'true' 'or'
+ || lk == 105043 // 'attribute' 'order'
+ || lk == 105082 // 'element' 'order'
+ || lk == 105095 // 'false' 'order'
+ || lk == 105147 // 'namespace' 'order'
+ || lk == 105157 // 'null' 'order'
+ || lk == 105180 // 'processing-instruction' 'order'
+ || lk == 105215 // 'true' 'order'
+ || lk == 107143 // 'false' 'paragraphs'
+ || lk == 107205 // 'null' 'paragraphs'
+ || lk == 107263 // 'true' 'paragraphs'
+ || lk == 114771 // 'attribute' 'return'
+ || lk == 114810 // 'element' 'return'
+ || lk == 114823 // 'false' 'return'
+ || lk == 114875 // 'namespace' 'return'
+ || lk == 114885 // 'null' 'return'
+ || lk == 114908 // 'processing-instruction' 'return'
+ || lk == 114943 // 'true' 'return'
+ || lk == 116819 // 'attribute' 'satisfies'
+ || lk == 116858 // 'element' 'satisfies'
+ || lk == 116871 // 'false' 'satisfies'
+ || lk == 116923 // 'namespace' 'satisfies'
+ || lk == 116933 // 'null' 'satisfies'
+ || lk == 116956 // 'processing-instruction' 'satisfies'
+ || lk == 116991 // 'true' 'satisfies'
+ || lk == 121479 // 'false' 'sentences'
+ || lk == 121541 // 'null' 'sentences'
+ || lk == 121599 // 'true' 'sentences'
+ || lk == 123475 // 'attribute' 'stable'
+ || lk == 123514 // 'element' 'stable'
+ || lk == 123527 // 'false' 'stable'
+ || lk == 123579 // 'namespace' 'stable'
+ || lk == 123589 // 'null' 'stable'
+ || lk == 123612 // 'processing-instruction' 'stable'
+ || lk == 123647 // 'true' 'stable'
+ || lk == 123987 // 'attribute' 'start'
+ || lk == 124026 // 'element' 'start'
+ || lk == 124039 // 'false' 'start'
+ || lk == 124091 // 'namespace' 'start'
+ || lk == 124101 // 'null' 'start'
+ || lk == 124124 // 'processing-instruction' 'start'
+ || lk == 124159 // 'true' 'start'
+ || lk == 129159 // 'false' 'times'
+ || lk == 129221 // 'null' 'times'
+ || lk == 129279 // 'true' 'times'
+ || lk == 129619 // 'attribute' 'to'
+ || lk == 129658 // 'element' 'to'
+ || lk == 129671 // 'false' 'to'
+ || lk == 129723 // 'namespace' 'to'
+ || lk == 129733 // 'null' 'to'
+ || lk == 129756 // 'processing-instruction' 'to'
+ || lk == 129791 // 'true' 'to'
+ || lk == 130131 // 'attribute' 'treat'
+ || lk == 130170 // 'element' 'treat'
+ || lk == 130183 // 'false' 'treat'
+ || lk == 130235 // 'namespace' 'treat'
+ || lk == 130245 // 'null' 'treat'
+ || lk == 130268 // 'processing-instruction' 'treat'
+ || lk == 130303 // 'true' 'treat'
+ || lk == 133203 // 'attribute' 'union'
+ || lk == 133242 // 'element' 'union'
+ || lk == 133255 // 'false' 'union'
+ || lk == 133307 // 'namespace' 'union'
+ || lk == 133317 // 'null' 'union'
+ || lk == 133340 // 'processing-instruction' 'union'
+ || lk == 133375 // 'true' 'union'
+ || lk == 139347 // 'attribute' 'where'
+ || lk == 139386 // 'element' 'where'
+ || lk == 139399 // 'false' 'where'
+ || lk == 139451 // 'namespace' 'where'
+ || lk == 139461 // 'null' 'where'
+ || lk == 139484 // 'processing-instruction' 'where'
+ || lk == 139519 // 'true' 'where'
+ || lk == 141395 // 'attribute' 'with'
+ || lk == 141434 // 'element' 'with'
+ || lk == 141447 // 'false' 'with'
+ || lk == 141499 // 'namespace' 'with'
+ || lk == 141509 // 'null' 'with'
+ || lk == 141532 // 'processing-instruction' 'with'
+ || lk == 141567 // 'true' 'with'
+ || lk == 142983 // 'false' 'words'
+ || lk == 143045 // 'null' 'words'
+ || lk == 143103 // 'true' 'words'
+ || lk == 145543 // 'false' '|'
+ || lk == 145605 // 'null' '|'
+ || lk == 145663 // 'true' '|'
+ || lk == 146055 // 'false' '||'
+ || lk == 146117 // 'null' '||'
+ || lk == 146175 // 'true' '||'
+ || lk == 146567 // 'false' '|}'
+ || lk == 146629 // 'null' '|}'
+ || lk == 146687 // 'true' '|}'
+ || lk == 147079 // 'false' '}'
+ || lk == 147141 // 'null' '}'
+ || lk == 147199) // 'true' '}'
+ {
+ lk = memoized(4, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_PostfixExpr();
+ memoize(4, e0A, -1);
+ lk = -3;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(4, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 31: // '$'
+ case 32: // '$$'
+ case 33: // '%'
+ case 35: // '('
+ case 55: // '<'
+ case 56: // '<!--'
+ case 60: // '<?'
+ case 69: // '['
+ case 281: // '{'
+ case 283: // '{|'
+ case 3155: // 'attribute' EQName^Token
+ case 3194: // 'element' EQName^Token
+ case 9915: // 'namespace' NCName^Token
+ case 9948: // 'processing-instruction' NCName^Token
+ case 14854: // EQName^Token '#'
+ case 14919: // 'after' '#'
+ case 14921: // 'allowing' '#'
+ case 14922: // 'ancestor' '#'
+ case 14923: // 'ancestor-or-self' '#'
+ case 14924: // 'and' '#'
+ case 14926: // 'append' '#'
+ case 14927: // 'array' '#'
+ case 14928: // 'as' '#'
+ case 14929: // 'ascending' '#'
+ case 14930: // 'at' '#'
+ case 14931: // 'attribute' '#'
+ case 14932: // 'base-uri' '#'
+ case 14933: // 'before' '#'
+ case 14934: // 'boundary-space' '#'
+ case 14935: // 'break' '#'
+ case 14937: // 'case' '#'
+ case 14938: // 'cast' '#'
+ case 14939: // 'castable' '#'
+ case 14940: // 'catch' '#'
+ case 14942: // 'child' '#'
+ case 14943: // 'collation' '#'
+ case 14945: // 'comment' '#'
+ case 14946: // 'constraint' '#'
+ case 14947: // 'construction' '#'
+ case 14950: // 'context' '#'
+ case 14951: // 'continue' '#'
+ case 14952: // 'copy' '#'
+ case 14953: // 'copy-namespaces' '#'
+ case 14954: // 'count' '#'
+ case 14955: // 'decimal-format' '#'
+ case 14957: // 'declare' '#'
+ case 14958: // 'default' '#'
+ case 14959: // 'delete' '#'
+ case 14960: // 'descendant' '#'
+ case 14961: // 'descendant-or-self' '#'
+ case 14962: // 'descending' '#'
+ case 14967: // 'div' '#'
+ case 14968: // 'document' '#'
+ case 14969: // 'document-node' '#'
+ case 14970: // 'element' '#'
+ case 14971: // 'else' '#'
+ case 14972: // 'empty' '#'
+ case 14973: // 'empty-sequence' '#'
+ case 14974: // 'encoding' '#'
+ case 14975: // 'end' '#'
+ case 14977: // 'eq' '#'
+ case 14978: // 'every' '#'
+ case 14980: // 'except' '#'
+ case 14981: // 'exit' '#'
+ case 14982: // 'external' '#'
+ case 14983: // 'false' '#'
+ case 14984: // 'first' '#'
+ case 14985: // 'following' '#'
+ case 14986: // 'following-sibling' '#'
+ case 14987: // 'for' '#'
+ case 14990: // 'from' '#'
+ case 14991: // 'ft-option' '#'
+ case 14995: // 'function' '#'
+ case 14996: // 'ge' '#'
+ case 14998: // 'group' '#'
+ case 15000: // 'gt' '#'
+ case 15001: // 'idiv' '#'
+ case 15002: // 'if' '#'
+ case 15003: // 'import' '#'
+ case 15004: // 'in' '#'
+ case 15005: // 'index' '#'
+ case 15009: // 'insert' '#'
+ case 15010: // 'instance' '#'
+ case 15011: // 'integrity' '#'
+ case 15012: // 'intersect' '#'
+ case 15013: // 'into' '#'
+ case 15014: // 'is' '#'
+ case 15015: // 'item' '#'
+ case 15016: // 'json' '#'
+ case 15017: // 'json-item' '#'
+ case 15018: // 'jsoniq' '#'
+ case 15021: // 'last' '#'
+ case 15022: // 'lax' '#'
+ case 15023: // 'le' '#'
+ case 15025: // 'let' '#'
+ case 15027: // 'loop' '#'
+ case 15029: // 'lt' '#'
+ case 15031: // 'mod' '#'
+ case 15032: // 'modify' '#'
+ case 15033: // 'module' '#'
+ case 15035: // 'namespace' '#'
+ case 15036: // 'namespace-node' '#'
+ case 15037: // 'ne' '#'
+ case 15042: // 'node' '#'
+ case 15043: // 'nodes' '#'
+ case 15045: // 'null' '#'
+ case 15046: // 'object' '#'
+ case 15050: // 'only' '#'
+ case 15051: // 'option' '#'
+ case 15052: // 'or' '#'
+ case 15053: // 'order' '#'
+ case 15054: // 'ordered' '#'
+ case 15055: // 'ordering' '#'
+ case 15058: // 'parent' '#'
+ case 15064: // 'preceding' '#'
+ case 15065: // 'preceding-sibling' '#'
+ case 15068: // 'processing-instruction' '#'
+ case 15070: // 'rename' '#'
+ case 15071: // 'replace' '#'
+ case 15072: // 'return' '#'
+ case 15073: // 'returning' '#'
+ case 15074: // 'revalidation' '#'
+ case 15076: // 'satisfies' '#'
+ case 15077: // 'schema' '#'
+ case 15078: // 'schema-attribute' '#'
+ case 15079: // 'schema-element' '#'
+ case 15080: // 'score' '#'
+ case 15081: // 'select' '#'
+ case 15082: // 'self' '#'
+ case 15087: // 'sliding' '#'
+ case 15088: // 'some' '#'
+ case 15089: // 'stable' '#'
+ case 15090: // 'start' '#'
+ case 15093: // 'strict' '#'
+ case 15095: // 'structured-item' '#'
+ case 15096: // 'switch' '#'
+ case 15097: // 'text' '#'
+ case 15101: // 'to' '#'
+ case 15102: // 'treat' '#'
+ case 15103: // 'true' '#'
+ case 15104: // 'try' '#'
+ case 15105: // 'tumbling' '#'
+ case 15106: // 'type' '#'
+ case 15107: // 'typeswitch' '#'
+ case 15108: // 'union' '#'
+ case 15110: // 'unordered' '#'
+ case 15111: // 'updating' '#'
+ case 15114: // 'validate' '#'
+ case 15115: // 'value' '#'
+ case 15116: // 'variable' '#'
+ case 15117: // 'version' '#'
+ case 15120: // 'where' '#'
+ case 15121: // 'while' '#'
+ case 15124: // 'with' '#'
+ case 17926: // EQName^Token '('
+ case 17991: // 'after' '('
+ case 17993: // 'allowing' '('
+ case 17994: // 'ancestor' '('
+ case 17995: // 'ancestor-or-self' '('
+ case 17996: // 'and' '('
+ case 17998: // 'append' '('
+ case 18000: // 'as' '('
+ case 18001: // 'ascending' '('
+ case 18002: // 'at' '('
+ case 18004: // 'base-uri' '('
+ case 18005: // 'before' '('
+ case 18006: // 'boundary-space' '('
+ case 18007: // 'break' '('
+ case 18009: // 'case' '('
+ case 18010: // 'cast' '('
+ case 18011: // 'castable' '('
+ case 18012: // 'catch' '('
+ case 18014: // 'child' '('
+ case 18015: // 'collation' '('
+ case 18018: // 'constraint' '('
+ case 18019: // 'construction' '('
+ case 18022: // 'context' '('
+ case 18023: // 'continue' '('
+ case 18024: // 'copy' '('
+ case 18025: // 'copy-namespaces' '('
+ case 18026: // 'count' '('
+ case 18027: // 'decimal-format' '('
+ case 18029: // 'declare' '('
+ case 18030: // 'default' '('
+ case 18031: // 'delete' '('
+ case 18032: // 'descendant' '('
+ case 18033: // 'descendant-or-self' '('
+ case 18034: // 'descending' '('
+ case 18039: // 'div' '('
+ case 18040: // 'document' '('
+ case 18043: // 'else' '('
+ case 18044: // 'empty' '('
+ case 18046: // 'encoding' '('
+ case 18047: // 'end' '('
+ case 18049: // 'eq' '('
+ case 18050: // 'every' '('
+ case 18052: // 'except' '('
+ case 18053: // 'exit' '('
+ case 18054: // 'external' '('
+ case 18055: // 'false' '('
+ case 18056: // 'first' '('
+ case 18057: // 'following' '('
+ case 18058: // 'following-sibling' '('
+ case 18059: // 'for' '('
+ case 18062: // 'from' '('
+ case 18063: // 'ft-option' '('
+ case 18067: // 'function' '('
+ case 18068: // 'ge' '('
+ case 18070: // 'group' '('
+ case 18072: // 'gt' '('
+ case 18073: // 'idiv' '('
+ case 18075: // 'import' '('
+ case 18076: // 'in' '('
+ case 18077: // 'index' '('
+ case 18081: // 'insert' '('
+ case 18082: // 'instance' '('
+ case 18083: // 'integrity' '('
+ case 18084: // 'intersect' '('
+ case 18085: // 'into' '('
+ case 18086: // 'is' '('
+ case 18088: // 'json' '('
+ case 18090: // 'jsoniq' '('
+ case 18093: // 'last' '('
+ case 18094: // 'lax' '('
+ case 18095: // 'le' '('
+ case 18097: // 'let' '('
+ case 18099: // 'loop' '('
+ case 18101: // 'lt' '('
+ case 18103: // 'mod' '('
+ case 18104: // 'modify' '('
+ case 18105: // 'module' '('
+ case 18107: // 'namespace' '('
+ case 18109: // 'ne' '('
+ case 18115: // 'nodes' '('
+ case 18117: // 'null' '('
+ case 18118: // 'object' '('
+ case 18122: // 'only' '('
+ case 18123: // 'option' '('
+ case 18124: // 'or' '('
+ case 18125: // 'order' '('
+ case 18126: // 'ordered' '('
+ case 18127: // 'ordering' '('
+ case 18130: // 'parent' '('
+ case 18136: // 'preceding' '('
+ case 18137: // 'preceding-sibling' '('
+ case 18142: // 'rename' '('
+ case 18143: // 'replace' '('
+ case 18144: // 'return' '('
+ case 18145: // 'returning' '('
+ case 18146: // 'revalidation' '('
+ case 18148: // 'satisfies' '('
+ case 18149: // 'schema' '('
+ case 18152: // 'score' '('
+ case 18153: // 'select' '('
+ case 18154: // 'self' '('
+ case 18159: // 'sliding' '('
+ case 18160: // 'some' '('
+ case 18161: // 'stable' '('
+ case 18162: // 'start' '('
+ case 18165: // 'strict' '('
+ case 18173: // 'to' '('
+ case 18174: // 'treat' '('
+ case 18175: // 'true' '('
+ case 18176: // 'try' '('
+ case 18177: // 'tumbling' '('
+ case 18178: // 'type' '('
+ case 18180: // 'union' '('
+ case 18182: // 'unordered' '('
+ case 18183: // 'updating' '('
+ case 18186: // 'validate' '('
+ case 18187: // 'value' '('
+ case 18188: // 'variable' '('
+ case 18189: // 'version' '('
+ case 18192: // 'where' '('
+ case 18193: // 'while' '('
+ case 18196: // 'with' '('
+ case 23175: // 'false' '.'
+ case 23237: // 'null' '.'
+ case 23295: // 'true' '.'
+ case 37459: // 'attribute' 'allowing'
+ case 37498: // 'element' 'allowing'
+ case 37563: // 'namespace' 'allowing'
+ case 37596: // 'processing-instruction' 'allowing'
+ case 37971: // 'attribute' 'ancestor'
+ case 38010: // 'element' 'ancestor'
+ case 38075: // 'namespace' 'ancestor'
+ case 38108: // 'processing-instruction' 'ancestor'
+ case 38483: // 'attribute' 'ancestor-or-self'
+ case 38522: // 'element' 'ancestor-or-self'
+ case 38587: // 'namespace' 'ancestor-or-self'
+ case 38620: // 'processing-instruction' 'ancestor-or-self'
+ case 40019: // 'attribute' 'append'
+ case 40058: // 'element' 'append'
+ case 40123: // 'namespace' 'append'
+ case 40156: // 'processing-instruction' 'append'
+ case 40531: // 'attribute' 'array'
+ case 40570: // 'element' 'array'
+ case 42579: // 'attribute' 'attribute'
+ case 42618: // 'element' 'attribute'
+ case 42683: // 'namespace' 'attribute'
+ case 42716: // 'processing-instruction' 'attribute'
+ case 43091: // 'attribute' 'base-uri'
+ case 43130: // 'element' 'base-uri'
+ case 43195: // 'namespace' 'base-uri'
+ case 43228: // 'processing-instruction' 'base-uri'
+ case 44115: // 'attribute' 'boundary-space'
+ case 44154: // 'element' 'boundary-space'
+ case 44219: // 'namespace' 'boundary-space'
+ case 44252: // 'processing-instruction' 'boundary-space'
+ case 44627: // 'attribute' 'break'
+ case 44666: // 'element' 'break'
+ case 44731: // 'namespace' 'break'
+ case 44764: // 'processing-instruction' 'break'
+ case 47187: // 'attribute' 'catch'
+ case 47226: // 'element' 'catch'
+ case 47291: // 'namespace' 'catch'
+ case 47324: // 'processing-instruction' 'catch'
+ case 48211: // 'attribute' 'child'
+ case 48250: // 'element' 'child'
+ case 48315: // 'namespace' 'child'
+ case 48348: // 'processing-instruction' 'child'
+ case 49747: // 'attribute' 'comment'
+ case 49786: // 'element' 'comment'
+ case 49851: // 'namespace' 'comment'
+ case 49884: // 'processing-instruction' 'comment'
+ case 50259: // 'attribute' 'constraint'
+ case 50298: // 'element' 'constraint'
+ case 50363: // 'namespace' 'constraint'
+ case 50396: // 'processing-instruction' 'constraint'
+ case 50771: // 'attribute' 'construction'
+ case 50810: // 'element' 'construction'
+ case 50875: // 'namespace' 'construction'
+ case 50908: // 'processing-instruction' 'construction'
+ case 52307: // 'attribute' 'context'
+ case 52346: // 'element' 'context'
+ case 52411: // 'namespace' 'context'
+ case 52444: // 'processing-instruction' 'context'
+ case 52819: // 'attribute' 'continue'
+ case 52858: // 'element' 'continue'
+ case 52923: // 'namespace' 'continue'
+ case 52956: // 'processing-instruction' 'continue'
+ case 53331: // 'attribute' 'copy'
+ case 53370: // 'element' 'copy'
+ case 53435: // 'namespace' 'copy'
+ case 53468: // 'processing-instruction' 'copy'
+ case 53843: // 'attribute' 'copy-namespaces'
+ case 53882: // 'element' 'copy-namespaces'
+ case 53947: // 'namespace' 'copy-namespaces'
+ case 53980: // 'processing-instruction' 'copy-namespaces'
+ case 54867: // 'attribute' 'decimal-format'
+ case 54906: // 'element' 'decimal-format'
+ case 54971: // 'namespace' 'decimal-format'
+ case 55004: // 'processing-instruction' 'decimal-format'
+ case 55891: // 'attribute' 'declare'
+ case 55930: // 'element' 'declare'
+ case 55995: // 'namespace' 'declare'
+ case 56028: // 'processing-instruction' 'declare'
+ case 56915: // 'attribute' 'delete'
+ case 56954: // 'element' 'delete'
+ case 57019: // 'namespace' 'delete'
+ case 57052: // 'processing-instruction' 'delete'
+ case 57427: // 'attribute' 'descendant'
+ case 57466: // 'element' 'descendant'
+ case 57531: // 'namespace' 'descendant'
+ case 57564: // 'processing-instruction' 'descendant'
+ case 57939: // 'attribute' 'descendant-or-self'
+ case 57978: // 'element' 'descendant-or-self'
+ case 58043: // 'namespace' 'descendant-or-self'
+ case 58076: // 'processing-instruction' 'descendant-or-self'
+ case 61523: // 'attribute' 'document'
+ case 61562: // 'element' 'document'
+ case 61627: // 'namespace' 'document'
+ case 61660: // 'processing-instruction' 'document'
+ case 62035: // 'attribute' 'document-node'
+ case 62074: // 'element' 'document-node'
+ case 62139: // 'namespace' 'document-node'
+ case 62172: // 'processing-instruction' 'document-node'
+ case 62547: // 'attribute' 'element'
+ case 62586: // 'element' 'element'
+ case 62651: // 'namespace' 'element'
+ case 62684: // 'processing-instruction' 'element'
+ case 64083: // 'attribute' 'empty-sequence'
+ case 64122: // 'element' 'empty-sequence'
+ case 64187: // 'namespace' 'empty-sequence'
+ case 64220: // 'processing-instruction' 'empty-sequence'
+ case 64595: // 'attribute' 'encoding'
+ case 64634: // 'element' 'encoding'
+ case 64699: // 'namespace' 'encoding'
+ case 64732: // 'processing-instruction' 'encoding'
+ case 66643: // 'attribute' 'every'
+ case 66682: // 'element' 'every'
+ case 66747: // 'namespace' 'every'
+ case 66780: // 'processing-instruction' 'every'
+ case 68179: // 'attribute' 'exit'
+ case 68218: // 'element' 'exit'
+ case 68283: // 'namespace' 'exit'
+ case 68316: // 'processing-instruction' 'exit'
+ case 68691: // 'attribute' 'external'
+ case 68730: // 'element' 'external'
+ case 68795: // 'namespace' 'external'
+ case 68828: // 'processing-instruction' 'external'
+ case 69203: // 'attribute' 'false'
+ case 69242: // 'element' 'false'
+ case 69307: // 'namespace' 'false'
+ case 69340: // 'processing-instruction' 'false'
+ case 69715: // 'attribute' 'first'
+ case 69754: // 'element' 'first'
+ case 69819: // 'namespace' 'first'
+ case 69852: // 'processing-instruction' 'first'
+ case 70227: // 'attribute' 'following'
+ case 70266: // 'element' 'following'
+ case 70331: // 'namespace' 'following'
+ case 70364: // 'processing-instruction' 'following'
+ case 70739: // 'attribute' 'following-sibling'
+ case 70778: // 'element' 'following-sibling'
+ case 70843: // 'namespace' 'following-sibling'
+ case 70876: // 'processing-instruction' 'following-sibling'
+ case 72787: // 'attribute' 'from'
+ case 72826: // 'element' 'from'
+ case 72891: // 'namespace' 'from'
+ case 72924: // 'processing-instruction' 'from'
+ case 73299: // 'attribute' 'ft-option'
+ case 73338: // 'element' 'ft-option'
+ case 73403: // 'namespace' 'ft-option'
+ case 73436: // 'processing-instruction' 'ft-option'
+ case 75347: // 'attribute' 'function'
+ case 75386: // 'element' 'function'
+ case 75451: // 'namespace' 'function'
+ case 75484: // 'processing-instruction' 'function'
+ case 78931: // 'attribute' 'if'
+ case 78970: // 'element' 'if'
+ case 79035: // 'namespace' 'if'
+ case 79068: // 'processing-instruction' 'if'
+ case 79443: // 'attribute' 'import'
+ case 79482: // 'element' 'import'
+ case 79547: // 'namespace' 'import'
+ case 79580: // 'processing-instruction' 'import'
+ case 79955: // 'attribute' 'in'
+ case 79994: // 'element' 'in'
+ case 80059: // 'namespace' 'in'
+ case 80092: // 'processing-instruction' 'in'
+ case 80467: // 'attribute' 'index'
+ case 80506: // 'element' 'index'
+ case 80571: // 'namespace' 'index'
+ case 80604: // 'processing-instruction' 'index'
+ case 82515: // 'attribute' 'insert'
+ case 82554: // 'element' 'insert'
+ case 82619: // 'namespace' 'insert'
+ case 82652: // 'processing-instruction' 'insert'
+ case 83539: // 'attribute' 'integrity'
+ case 83578: // 'element' 'integrity'
+ case 83643: // 'namespace' 'integrity'
+ case 83676: // 'processing-instruction' 'integrity'
+ case 85587: // 'attribute' 'item'
+ case 85626: // 'element' 'item'
+ case 85691: // 'namespace' 'item'
+ case 85724: // 'processing-instruction' 'item'
+ case 86099: // 'attribute' 'json'
+ case 86138: // 'element' 'json'
+ case 86203: // 'namespace' 'json'
+ case 86236: // 'processing-instruction' 'json'
+ case 86611: // 'attribute' 'json-item'
+ case 86650: // 'element' 'json-item'
+ case 87123: // 'attribute' 'jsoniq'
+ case 87162: // 'element' 'jsoniq'
+ case 87227: // 'namespace' 'jsoniq'
+ case 87260: // 'processing-instruction' 'jsoniq'
+ case 88659: // 'attribute' 'last'
+ case 88698: // 'element' 'last'
+ case 88763: // 'namespace' 'last'
+ case 88796: // 'processing-instruction' 'last'
+ case 89171: // 'attribute' 'lax'
+ case 89210: // 'element' 'lax'
+ case 89275: // 'namespace' 'lax'
+ case 89308: // 'processing-instruction' 'lax'
+ case 91731: // 'attribute' 'loop'
+ case 91770: // 'element' 'loop'
+ case 91835: // 'namespace' 'loop'
+ case 91868: // 'processing-instruction' 'loop'
+ case 94803: // 'attribute' 'module'
+ case 94842: // 'element' 'module'
+ case 94907: // 'namespace' 'module'
+ case 94940: // 'processing-instruction' 'module'
+ case 95827: // 'attribute' 'namespace'
+ case 95866: // 'element' 'namespace'
+ case 95931: // 'namespace' 'namespace'
+ case 95964: // 'processing-instruction' 'namespace'
+ case 96339: // 'attribute' 'namespace-node'
+ case 96378: // 'element' 'namespace-node'
+ case 96443: // 'namespace' 'namespace-node'
+ case 96476: // 'processing-instruction' 'namespace-node'
+ case 99411: // 'attribute' 'node'
+ case 99450: // 'element' 'node'
+ case 99515: // 'namespace' 'node'
+ case 99548: // 'processing-instruction' 'node'
+ case 99923: // 'attribute' 'nodes'
+ case 99962: // 'element' 'nodes'
+ case 100027: // 'namespace' 'nodes'
+ case 100060: // 'processing-instruction' 'nodes'
+ case 100947: // 'attribute' 'null'
+ case 100986: // 'element' 'null'
+ case 101051: // 'namespace' 'null'
+ case 101084: // 'processing-instruction' 'null'
+ case 101459: // 'attribute' 'object'
+ case 101498: // 'element' 'object'
+ case 101563: // 'namespace' 'object'
+ case 101596: // 'processing-instruction' 'object'
+ case 104019: // 'attribute' 'option'
+ case 104058: // 'element' 'option'
+ case 104123: // 'namespace' 'option'
+ case 104156: // 'processing-instruction' 'option'
+ case 105555: // 'attribute' 'ordered'
+ case 105594: // 'element' 'ordered'
+ case 105659: // 'namespace' 'ordered'
+ case 105692: // 'processing-instruction' 'ordered'
+ case 106067: // 'attribute' 'ordering'
+ case 106106: // 'element' 'ordering'
+ case 106171: // 'namespace' 'ordering'
+ case 106204: // 'processing-instruction' 'ordering'
+ case 107603: // 'attribute' 'parent'
+ case 107642: // 'element' 'parent'
+ case 107707: // 'namespace' 'parent'
+ case 107740: // 'processing-instruction' 'parent'
+ case 110675: // 'attribute' 'preceding'
+ case 110714: // 'element' 'preceding'
+ case 110779: // 'namespace' 'preceding'
+ case 110812: // 'processing-instruction' 'preceding'
+ case 111187: // 'attribute' 'preceding-sibling'
+ case 111226: // 'element' 'preceding-sibling'
+ case 111291: // 'namespace' 'preceding-sibling'
+ case 111324: // 'processing-instruction' 'preceding-sibling'
+ case 112723: // 'attribute' 'processing-instruction'
+ case 112762: // 'element' 'processing-instruction'
+ case 112827: // 'namespace' 'processing-instruction'
+ case 112860: // 'processing-instruction' 'processing-instruction'
+ case 113747: // 'attribute' 'rename'
+ case 113786: // 'element' 'rename'
+ case 113851: // 'namespace' 'rename'
+ case 113884: // 'processing-instruction' 'rename'
+ case 114259: // 'attribute' 'replace'
+ case 114298: // 'element' 'replace'
+ case 114363: // 'namespace' 'replace'
+ case 114396: // 'processing-instruction' 'replace'
+ case 115283: // 'attribute' 'returning'
+ case 115322: // 'element' 'returning'
+ case 115387: // 'namespace' 'returning'
+ case 115420: // 'processing-instruction' 'returning'
+ case 115795: // 'attribute' 'revalidation'
+ case 115834: // 'element' 'revalidation'
+ case 115899: // 'namespace' 'revalidation'
+ case 115932: // 'processing-instruction' 'revalidation'
+ case 117331: // 'attribute' 'schema'
+ case 117370: // 'element' 'schema'
+ case 117435: // 'namespace' 'schema'
+ case 117468: // 'processing-instruction' 'schema'
+ case 117843: // 'attribute' 'schema-attribute'
+ case 117882: // 'element' 'schema-attribute'
+ case 117947: // 'namespace' 'schema-attribute'
+ case 117980: // 'processing-instruction' 'schema-attribute'
+ case 118355: // 'attribute' 'schema-element'
+ case 118394: // 'element' 'schema-element'
+ case 118459: // 'namespace' 'schema-element'
+ case 118492: // 'processing-instruction' 'schema-element'
+ case 118867: // 'attribute' 'score'
+ case 118906: // 'element' 'score'
+ case 118971: // 'namespace' 'score'
+ case 119004: // 'processing-instruction' 'score'
+ case 119379: // 'attribute' 'select'
+ case 119418: // 'element' 'select'
+ case 119483: // 'namespace' 'select'
+ case 119516: // 'processing-instruction' 'select'
+ case 119891: // 'attribute' 'self'
+ case 119930: // 'element' 'self'
+ case 119995: // 'namespace' 'self'
+ case 120028: // 'processing-instruction' 'self'
+ case 122451: // 'attribute' 'sliding'
+ case 122490: // 'element' 'sliding'
+ case 122555: // 'namespace' 'sliding'
+ case 122588: // 'processing-instruction' 'sliding'
+ case 122963: // 'attribute' 'some'
+ case 123002: // 'element' 'some'
+ case 123067: // 'namespace' 'some'
+ case 123100: // 'processing-instruction' 'some'
+ case 125523: // 'attribute' 'strict'
+ case 125562: // 'element' 'strict'
+ case 125627: // 'namespace' 'strict'
+ case 125660: // 'processing-instruction' 'strict'
+ case 126547: // 'attribute' 'structured-item'
+ case 126586: // 'element' 'structured-item'
+ case 127059: // 'attribute' 'switch'
+ case 127098: // 'element' 'switch'
+ case 127163: // 'namespace' 'switch'
+ case 127196: // 'processing-instruction' 'switch'
+ case 127571: // 'attribute' 'text'
+ case 127610: // 'element' 'text'
+ case 127675: // 'namespace' 'text'
+ case 127708: // 'processing-instruction' 'text'
+ case 130643: // 'attribute' 'true'
+ case 130682: // 'element' 'true'
+ case 130747: // 'namespace' 'true'
+ case 130780: // 'processing-instruction' 'true'
+ case 131155: // 'attribute' 'try'
+ case 131194: // 'element' 'try'
+ case 131259: // 'namespace' 'try'
+ case 131292: // 'processing-instruction' 'try'
+ case 131667: // 'attribute' 'tumbling'
+ case 131706: // 'element' 'tumbling'
+ case 131771: // 'namespace' 'tumbling'
+ case 131804: // 'processing-instruction' 'tumbling'
+ case 132179: // 'attribute' 'type'
+ case 132218: // 'element' 'type'
+ case 132283: // 'namespace' 'type'
+ case 132316: // 'processing-instruction' 'type'
+ case 132691: // 'attribute' 'typeswitch'
+ case 132730: // 'element' 'typeswitch'
+ case 132795: // 'namespace' 'typeswitch'
+ case 132828: // 'processing-instruction' 'typeswitch'
+ case 134227: // 'attribute' 'unordered'
+ case 134266: // 'element' 'unordered'
+ case 134331: // 'namespace' 'unordered'
+ case 134364: // 'processing-instruction' 'unordered'
+ case 134739: // 'attribute' 'updating'
+ case 134778: // 'element' 'updating'
+ case 134843: // 'namespace' 'updating'
+ case 134876: // 'processing-instruction' 'updating'
+ case 136275: // 'attribute' 'validate'
+ case 136314: // 'element' 'validate'
+ case 136379: // 'namespace' 'validate'
+ case 136412: // 'processing-instruction' 'validate'
+ case 136787: // 'attribute' 'value'
+ case 136826: // 'element' 'value'
+ case 136891: // 'namespace' 'value'
+ case 136924: // 'processing-instruction' 'value'
+ case 137299: // 'attribute' 'variable'
+ case 137338: // 'element' 'variable'
+ case 137403: // 'namespace' 'variable'
+ case 137436: // 'processing-instruction' 'variable'
+ case 137811: // 'attribute' 'version'
+ case 137850: // 'element' 'version'
+ case 137915: // 'namespace' 'version'
+ case 137948: // 'processing-instruction' 'version'
+ case 139859: // 'attribute' 'while'
+ case 139898: // 'element' 'while'
+ case 139963: // 'namespace' 'while'
+ case 139996: // 'processing-instruction' 'while'
+ case 143955: // 'attribute' '{'
+ case 143969: // 'comment' '{'
+ case 143992: // 'document' '{'
+ case 143994: // 'element' '{'
+ case 144059: // 'namespace' '{'
+ case 144078: // 'ordered' '{'
+ case 144092: // 'processing-instruction' '{'
+ case 144121: // 'text' '{'
+ case 144134: // 'unordered' '{'
+ try_PostfixExpr();
+ break;
+ case -3:
+ break;
+ default:
+ try_AxisStep();
+ }
+ }
+
+ function parse_AxisStep()
+ {
+ eventHandler.startNonterminal("AxisStep", e0);
+ switch (l1)
+ {
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ lookahead2W(232); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 46: // '..'
+ case 26698: // 'ancestor' '::'
+ case 26699: // 'ancestor-or-self' '::'
+ case 26834: // 'parent' '::'
+ case 26840: // 'preceding' '::'
+ case 26841: // 'preceding-sibling' '::'
+ parse_ReverseStep();
+ break;
+ default:
+ parse_ForwardStep();
+ }
+ lookahead1W(228); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ whitespace();
+ parse_PredicateList();
+ eventHandler.endNonterminal("AxisStep", e0);
+ }
+
+ function try_AxisStep()
+ {
+ switch (l1)
+ {
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ lookahead2W(232); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 46: // '..'
+ case 26698: // 'ancestor' '::'
+ case 26699: // 'ancestor-or-self' '::'
+ case 26834: // 'parent' '::'
+ case 26840: // 'preceding' '::'
+ case 26841: // 'preceding-sibling' '::'
+ try_ReverseStep();
+ break;
+ default:
+ try_ForwardStep();
+ }
+ lookahead1W(228); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ try_PredicateList();
+ }
+
+ function parse_ForwardStep()
+ {
+ eventHandler.startNonterminal("ForwardStep", e0);
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ lookahead2W(236); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 94: // 'child'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 234: // 'self'
+ lookahead2W(232); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 26707: // 'attribute' '::'
+ case 26718: // 'child' '::'
+ case 26736: // 'descendant' '::'
+ case 26737: // 'descendant-or-self' '::'
+ case 26761: // 'following' '::'
+ case 26762: // 'following-sibling' '::'
+ case 26858: // 'self' '::'
+ parse_ForwardAxis();
+ lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NodeTest();
+ break;
+ default:
+ parse_AbbrevForwardStep();
+ }
+ eventHandler.endNonterminal("ForwardStep", e0);
+ }
+
+ function try_ForwardStep()
+ {
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ lookahead2W(236); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 94: // 'child'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 234: // 'self'
+ lookahead2W(232); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 26707: // 'attribute' '::'
+ case 26718: // 'child' '::'
+ case 26736: // 'descendant' '::'
+ case 26737: // 'descendant-or-self' '::'
+ case 26761: // 'following' '::'
+ case 26762: // 'following-sibling' '::'
+ case 26858: // 'self' '::'
+ try_ForwardAxis();
+ lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NodeTest();
+ break;
+ default:
+ try_AbbrevForwardStep();
+ }
+ }
+
+ function parse_ForwardAxis()
+ {
+ eventHandler.startNonterminal("ForwardAxis", e0);
+ switch (l1)
+ {
+ case 94: // 'child'
+ shift(94); // 'child'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 112: // 'descendant'
+ shift(112); // 'descendant'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 83: // 'attribute'
+ shift(83); // 'attribute'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 234: // 'self'
+ shift(234); // 'self'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 113: // 'descendant-or-self'
+ shift(113); // 'descendant-or-self'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 138: // 'following-sibling'
+ shift(138); // 'following-sibling'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ default:
+ shift(137); // 'following'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ }
+ eventHandler.endNonterminal("ForwardAxis", e0);
+ }
+
+ function try_ForwardAxis()
+ {
+ switch (l1)
+ {
+ case 94: // 'child'
+ shiftT(94); // 'child'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 112: // 'descendant'
+ shiftT(112); // 'descendant'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 83: // 'attribute'
+ shiftT(83); // 'attribute'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 234: // 'self'
+ shiftT(234); // 'self'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 113: // 'descendant-or-self'
+ shiftT(113); // 'descendant-or-self'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 138: // 'following-sibling'
+ shiftT(138); // 'following-sibling'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ default:
+ shiftT(137); // 'following'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ }
+ }
+
+ function parse_AbbrevForwardStep()
+ {
+ eventHandler.startNonterminal("AbbrevForwardStep", e0);
+ if (l1 == 67) // '@'
+ {
+ shift(67); // '@'
+ }
+ lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NodeTest();
+ eventHandler.endNonterminal("AbbrevForwardStep", e0);
+ }
+
+ function try_AbbrevForwardStep()
+ {
+ if (l1 == 67) // '@'
+ {
+ shiftT(67); // '@'
+ }
+ lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NodeTest();
+ }
+
+ function parse_ReverseStep()
+ {
+ eventHandler.startNonterminal("ReverseStep", e0);
+ switch (l1)
+ {
+ case 46: // '..'
+ parse_AbbrevReverseStep();
+ break;
+ default:
+ parse_ReverseAxis();
+ lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NodeTest();
+ }
+ eventHandler.endNonterminal("ReverseStep", e0);
+ }
+
+ function try_ReverseStep()
+ {
+ switch (l1)
+ {
+ case 46: // '..'
+ try_AbbrevReverseStep();
+ break;
+ default:
+ try_ReverseAxis();
+ lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NodeTest();
+ }
+ }
+
+ function parse_ReverseAxis()
+ {
+ eventHandler.startNonterminal("ReverseAxis", e0);
+ switch (l1)
+ {
+ case 210: // 'parent'
+ shift(210); // 'parent'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 74: // 'ancestor'
+ shift(74); // 'ancestor'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 217: // 'preceding-sibling'
+ shift(217); // 'preceding-sibling'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 216: // 'preceding'
+ shift(216); // 'preceding'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ default:
+ shift(75); // 'ancestor-or-self'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ }
+ eventHandler.endNonterminal("ReverseAxis", e0);
+ }
+
+ function try_ReverseAxis()
+ {
+ switch (l1)
+ {
+ case 210: // 'parent'
+ shiftT(210); // 'parent'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 74: // 'ancestor'
+ shiftT(74); // 'ancestor'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 217: // 'preceding-sibling'
+ shiftT(217); // 'preceding-sibling'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 216: // 'preceding'
+ shiftT(216); // 'preceding'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ default:
+ shiftT(75); // 'ancestor-or-self'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ }
+ }
+
+ function parse_AbbrevReverseStep()
+ {
+ eventHandler.startNonterminal("AbbrevReverseStep", e0);
+ shift(46); // '..'
+ eventHandler.endNonterminal("AbbrevReverseStep", e0);
+ }
+
+ function try_AbbrevReverseStep()
+ {
+ shiftT(46); // '..'
+ }
+
+ function parse_NodeTest()
+ {
+ eventHandler.startNonterminal("NodeTest", e0);
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ case 97: // 'comment'
+ case 121: // 'document-node'
+ case 122: // 'element'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 220: // 'processing-instruction'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 249: // 'text'
+ lookahead2W(231); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 18003: // 'attribute' '('
+ case 18017: // 'comment' '('
+ case 18041: // 'document-node' '('
+ case 18042: // 'element' '('
+ case 18108: // 'namespace-node' '('
+ case 18114: // 'node' '('
+ case 18140: // 'processing-instruction' '('
+ case 18150: // 'schema-attribute' '('
+ case 18151: // 'schema-element' '('
+ case 18169: // 'text' '('
+ parse_KindTest();
+ break;
+ default:
+ parse_NameTest();
+ }
+ eventHandler.endNonterminal("NodeTest", e0);
+ }
+
+ function try_NodeTest()
+ {
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ case 97: // 'comment'
+ case 121: // 'document-node'
+ case 122: // 'element'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 220: // 'processing-instruction'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 249: // 'text'
+ lookahead2W(231); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 18003: // 'attribute' '('
+ case 18017: // 'comment' '('
+ case 18041: // 'document-node' '('
+ case 18042: // 'element' '('
+ case 18108: // 'namespace-node' '('
+ case 18114: // 'node' '('
+ case 18140: // 'processing-instruction' '('
+ case 18150: // 'schema-attribute' '('
+ case 18151: // 'schema-element' '('
+ case 18169: // 'text' '('
+ try_KindTest();
+ break;
+ default:
+ try_NameTest();
+ }
+ }
+
+ function parse_NameTest()
+ {
+ eventHandler.startNonterminal("NameTest", e0);
+ switch (l1)
+ {
+ case 5: // Wildcard
+ shift(5); // Wildcard
+ break;
+ default:
+ parse_EQName();
+ }
+ eventHandler.endNonterminal("NameTest", e0);
+ }
+
+ function try_NameTest()
+ {
+ switch (l1)
+ {
+ case 5: // Wildcard
+ shiftT(5); // Wildcard
+ break;
+ default:
+ try_EQName();
+ }
+ }
+
+ function parse_PostfixExpr()
+ {
+ eventHandler.startNonterminal("PostfixExpr", e0);
+ parse_PrimaryExpr();
+ for (;;)
+ {
+ lookahead1W(235); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '.' | '/' |
+ if (l1 != 35 // '('
+ && l1 != 45 // '.'
+ && l1 != 69) // '['
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 69: // '['
+ lookahead2W(273); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 35397) // '[' '['
+ {
+ lk = memoized(5, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_Predicate();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -4;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(5, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case 35: // '('
+ whitespace();
+ parse_ArgumentList();
+ break;
+ case 45: // '.'
+ whitespace();
+ parse_ObjectLookup();
+ break;
+ case -4:
+ whitespace();
+ parse_ArrayLookup();
+ break;
+ case 35909: // '[' ']'
+ whitespace();
+ parse_ArrayUnboxing();
+ break;
+ default:
+ whitespace();
+ parse_Predicate();
+ }
+ }
+ eventHandler.endNonterminal("PostfixExpr", e0);
+ }
+
+ function try_PostfixExpr()
+ {
+ try_PrimaryExpr();
+ for (;;)
+ {
+ lookahead1W(235); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '.' | '/' |
+ if (l1 != 35 // '('
+ && l1 != 45 // '.'
+ && l1 != 69) // '['
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 69: // '['
+ lookahead2W(273); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 35397) // '[' '['
+ {
+ lk = memoized(5, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_Predicate();
+ memoize(5, e0A, -1);
+ lk = -6;
+ }
+ catch (p1A)
+ {
+ lk = -4;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(5, e0A, -4);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case 35: // '('
+ try_ArgumentList();
+ break;
+ case 45: // '.'
+ try_ObjectLookup();
+ break;
+ case -4:
+ try_ArrayLookup();
+ break;
+ case 35909: // '[' ']'
+ try_ArrayUnboxing();
+ break;
+ case -6:
+ break;
+ default:
+ try_Predicate();
+ }
+ }
+ }
+
+ function parse_ObjectLookup()
+ {
+ eventHandler.startNonterminal("ObjectLookup", e0);
+ shift(45); // '.'
+ lookahead1W(251); // StringLiteral | NCName^Token | S^WS | '$' | '$$' | '(' | '(:' | 'after' |
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ case 35: // '('
+ whitespace();
+ parse_ParenthesizedExpr();
+ break;
+ case 31: // '$'
+ whitespace();
+ parse_VarRef();
+ break;
+ case 32: // '$$'
+ whitespace();
+ parse_ContextItemExpr();
+ break;
+ default:
+ whitespace();
+ parse_NCName();
+ }
+ eventHandler.endNonterminal("ObjectLookup", e0);
+ }
+
+ function try_ObjectLookup()
+ {
+ shiftT(45); // '.'
+ lookahead1W(251); // StringLiteral | NCName^Token | S^WS | '$' | '$$' | '(' | '(:' | 'after' |
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ case 35: // '('
+ try_ParenthesizedExpr();
+ break;
+ case 31: // '$'
+ try_VarRef();
+ break;
+ case 32: // '$$'
+ try_ContextItemExpr();
+ break;
+ default:
+ try_NCName();
+ }
+ }
+
+ function parse_ArrayLookup()
+ {
+ eventHandler.startNonterminal("ArrayLookup", e0);
+ shift(69); // '['
+ lookahead1W(31); // S^WS | '(:' | '['
+ shift(69); // '['
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(70); // ']'
+ lookahead1W(32); // S^WS | '(:' | ']'
+ shift(70); // ']'
+ eventHandler.endNonterminal("ArrayLookup", e0);
+ }
+
+ function try_ArrayLookup()
+ {
+ shiftT(69); // '['
+ lookahead1W(31); // S^WS | '(:' | '['
+ shiftT(69); // '['
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(70); // ']'
+ lookahead1W(32); // S^WS | '(:' | ']'
+ shiftT(70); // ']'
+ }
+
+ function parse_ArrayUnboxing()
+ {
+ eventHandler.startNonterminal("ArrayUnboxing", e0);
+ shift(69); // '['
+ lookahead1W(32); // S^WS | '(:' | ']'
+ shift(70); // ']'
+ eventHandler.endNonterminal("ArrayUnboxing", e0);
+ }
+
+ function try_ArrayUnboxing()
+ {
+ shiftT(69); // '['
+ lookahead1W(32); // S^WS | '(:' | ']'
+ shiftT(70); // ']'
+ }
+
+ function parse_ArgumentList()
+ {
+ eventHandler.startNonterminal("ArgumentList", e0);
+ shift(35); // '('
+ lookahead1W(280); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 38) // ')'
+ {
+ whitespace();
+ parse_Argument();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(272); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Argument();
+ }
+ }
+ shift(38); // ')'
+ eventHandler.endNonterminal("ArgumentList", e0);
+ }
+
+ function try_ArgumentList()
+ {
+ shiftT(35); // '('
+ lookahead1W(280); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 38) // ')'
+ {
+ try_Argument();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(272); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Argument();
+ }
+ }
+ shiftT(38); // ')'
+ }
+
+ function parse_PredicateList()
+ {
+ eventHandler.startNonterminal("PredicateList", e0);
+ for (;;)
+ {
+ lookahead1W(228); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ if (l1 != 69) // '['
+ {
+ break;
+ }
+ whitespace();
+ parse_Predicate();
+ }
+ eventHandler.endNonterminal("PredicateList", e0);
+ }
+
+ function try_PredicateList()
+ {
+ for (;;)
+ {
+ lookahead1W(228); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ if (l1 != 69) // '['
+ {
+ break;
+ }
+ try_Predicate();
+ }
+ }
+
+ function parse_Predicate()
+ {
+ eventHandler.startNonterminal("Predicate", e0);
+ shift(69); // '['
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(70); // ']'
+ eventHandler.endNonterminal("Predicate", e0);
+ }
+
+ function try_Predicate()
+ {
+ shiftT(69); // '['
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(70); // ']'
+ }
+
+ function parse_Literal()
+ {
+ eventHandler.startNonterminal("Literal", e0);
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ case 135: // 'false'
+ case 255: // 'true'
+ parse_BooleanLiteral();
+ break;
+ case 197: // 'null'
+ parse_NullLiteral();
+ break;
+ default:
+ parse_NumericLiteral();
+ }
+ eventHandler.endNonterminal("Literal", e0);
+ }
+
+ function try_Literal()
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ case 135: // 'false'
+ case 255: // 'true'
+ try_BooleanLiteral();
+ break;
+ case 197: // 'null'
+ try_NullLiteral();
+ break;
+ default:
+ try_NumericLiteral();
+ }
+ }
+
+ function parse_BooleanLiteral()
+ {
+ eventHandler.startNonterminal("BooleanLiteral", e0);
+ switch (l1)
+ {
+ case 255: // 'true'
+ shift(255); // 'true'
+ break;
+ default:
+ shift(135); // 'false'
+ }
+ eventHandler.endNonterminal("BooleanLiteral", e0);
+ }
+
+ function try_BooleanLiteral()
+ {
+ switch (l1)
+ {
+ case 255: // 'true'
+ shiftT(255); // 'true'
+ break;
+ default:
+ shiftT(135); // 'false'
+ }
+ }
+
+ function parse_NullLiteral()
+ {
+ eventHandler.startNonterminal("NullLiteral", e0);
+ shift(197); // 'null'
+ eventHandler.endNonterminal("NullLiteral", e0);
+ }
+
+ function try_NullLiteral()
+ {
+ shiftT(197); // 'null'
+ }
+
+ function parse_NumericLiteral()
+ {
+ eventHandler.startNonterminal("NumericLiteral", e0);
+ switch (l1)
+ {
+ case 8: // IntegerLiteral
+ shift(8); // IntegerLiteral
+ break;
+ case 9: // DecimalLiteral
+ shift(9); // DecimalLiteral
+ break;
+ default:
+ shift(10); // DoubleLiteral
+ }
+ eventHandler.endNonterminal("NumericLiteral", e0);
+ }
+
+ function try_NumericLiteral()
+ {
+ switch (l1)
+ {
+ case 8: // IntegerLiteral
+ shiftT(8); // IntegerLiteral
+ break;
+ case 9: // DecimalLiteral
+ shiftT(9); // DecimalLiteral
+ break;
+ default:
+ shiftT(10); // DoubleLiteral
+ }
+ }
+
+ function parse_VarRef()
+ {
+ eventHandler.startNonterminal("VarRef", e0);
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("VarRef", e0);
+ }
+
+ function try_VarRef()
+ {
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ function parse_VarName()
+ {
+ eventHandler.startNonterminal("VarName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("VarName", e0);
+ }
+
+ function try_VarName()
+ {
+ try_EQName();
+ }
+
+ function parse_ParenthesizedExpr()
+ {
+ eventHandler.startNonterminal("ParenthesizedExpr", e0);
+ shift(35); // '('
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 38) // ')'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(38); // ')'
+ eventHandler.endNonterminal("ParenthesizedExpr", e0);
+ }
+
+ function try_ParenthesizedExpr()
+ {
+ shiftT(35); // '('
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 38) // ')'
+ {
+ try_Expr();
+ }
+ shiftT(38); // ')'
+ }
+
+ function parse_ContextItemExpr()
+ {
+ eventHandler.startNonterminal("ContextItemExpr", e0);
+ shift(32); // '$$'
+ eventHandler.endNonterminal("ContextItemExpr", e0);
+ }
+
+ function try_ContextItemExpr()
+ {
+ shiftT(32); // '$$'
+ }
+
+ function parse_OrderedExpr()
+ {
+ eventHandler.startNonterminal("OrderedExpr", e0);
+ shift(206); // 'ordered'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("OrderedExpr", e0);
+ }
+
+ function try_OrderedExpr()
+ {
+ shiftT(206); // 'ordered'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+
+ function parse_UnorderedExpr()
+ {
+ eventHandler.startNonterminal("UnorderedExpr", e0);
+ shift(262); // 'unordered'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("UnorderedExpr", e0);
+ }
+
+ function try_UnorderedExpr()
+ {
+ shiftT(262); // 'unordered'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+
+ function parse_FunctionCall()
+ {
+ eventHandler.startNonterminal("FunctionCall", e0);
+ parse_FunctionName();
+ lookahead1W(22); // S^WS | '(' | '(:'
+ whitespace();
+ parse_ArgumentList();
+ eventHandler.endNonterminal("FunctionCall", e0);
+ }
+
+ function try_FunctionCall()
+ {
+ try_FunctionName();
+ lookahead1W(22); // S^WS | '(' | '(:'
+ try_ArgumentList();
+ }
+
+ function parse_Argument()
+ {
+ eventHandler.startNonterminal("Argument", e0);
+ switch (l1)
+ {
+ case 65: // '?'
+ parse_ArgumentPlaceholder();
+ break;
+ default:
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("Argument", e0);
+ }
+
+ function try_Argument()
+ {
+ switch (l1)
+ {
+ case 65: // '?'
+ try_ArgumentPlaceholder();
+ break;
+ default:
+ try_ExprSingle();
+ }
+ }
+
+ function parse_ArgumentPlaceholder()
+ {
+ eventHandler.startNonterminal("ArgumentPlaceholder", e0);
+ shift(65); // '?'
+ eventHandler.endNonterminal("ArgumentPlaceholder", e0);
+ }
+
+ function try_ArgumentPlaceholder()
+ {
+ shiftT(65); // '?'
+ }
+
+ function parse_Constructor()
+ {
+ eventHandler.startNonterminal("Constructor", e0);
+ switch (l1)
+ {
+ case 55: // '<'
+ case 56: // '<!--'
+ case 60: // '<?'
+ parse_DirectConstructor();
+ break;
+ default:
+ parse_ComputedConstructor();
+ }
+ eventHandler.endNonterminal("Constructor", e0);
+ }
+
+ function try_Constructor()
+ {
+ switch (l1)
+ {
+ case 55: // '<'
+ case 56: // '<!--'
+ case 60: // '<?'
+ try_DirectConstructor();
+ break;
+ default:
+ try_ComputedConstructor();
+ }
+ }
+
+ function parse_DirectConstructor()
+ {
+ eventHandler.startNonterminal("DirectConstructor", e0);
+ switch (l1)
+ {
+ case 55: // '<'
+ parse_DirElemConstructor();
+ break;
+ case 56: // '<!--'
+ parse_DirCommentConstructor();
+ break;
+ default:
+ parse_DirPIConstructor();
+ }
+ eventHandler.endNonterminal("DirectConstructor", e0);
+ }
+
+ function try_DirectConstructor()
+ {
+ switch (l1)
+ {
+ case 55: // '<'
+ try_DirElemConstructor();
+ break;
+ case 56: // '<!--'
+ try_DirCommentConstructor();
+ break;
+ default:
+ try_DirPIConstructor();
+ }
+ }
+
+ function parse_DirElemConstructor()
+ {
+ eventHandler.startNonterminal("DirElemConstructor", e0);
+ shift(55); // '<'
+ lookahead1(4); // QName
+ shift(20); // QName
+ parse_DirAttributeList();
+ switch (l1)
+ {
+ case 49: // '/>'
+ shift(49); // '/>'
+ break;
+ default:
+ shift(62); // '>'
+ for (;;)
+ {
+ lookahead1(196); // CDataSection | PredefinedEntityRef | ElementContentChar | CharRef | '<' |
+ if (l1 == 57) // '</'
+ {
+ break;
+ }
+ parse_DirElemContent();
+ }
+ shift(57); // '</'
+ lookahead1(4); // QName
+ shift(20); // QName
+ lookahead1(12); // S | '>'
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ lookahead1(8); // '>'
+ shift(62); // '>'
+ }
+ eventHandler.endNonterminal("DirElemConstructor", e0);
+ }
+
+ function try_DirElemConstructor()
+ {
+ shiftT(55); // '<'
+ lookahead1(4); // QName
+ shiftT(20); // QName
+ try_DirAttributeList();
+ switch (l1)
+ {
+ case 49: // '/>'
+ shiftT(49); // '/>'
+ break;
+ default:
+ shiftT(62); // '>'
+ for (;;)
+ {
+ lookahead1(196); // CDataSection | PredefinedEntityRef | ElementContentChar | CharRef | '<' |
+ if (l1 == 57) // '</'
+ {
+ break;
+ }
+ try_DirElemContent();
+ }
+ shiftT(57); // '</'
+ lookahead1(4); // QName
+ shiftT(20); // QName
+ lookahead1(12); // S | '>'
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ lookahead1(8); // '>'
+ shiftT(62); // '>'
+ }
+ }
+
+ function parse_DirAttributeList()
+ {
+ eventHandler.startNonterminal("DirAttributeList", e0);
+ for (;;)
+ {
+ lookahead1(19); // S | '/>' | '>'
+ if (l1 != 21) // S
+ {
+ break;
+ }
+ shift(21); // S
+ lookahead1(94); // QName | S | '/>' | '>'
+ if (l1 == 20) // QName
+ {
+ shift(20); // QName
+ lookahead1(11); // S | '='
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ lookahead1(7); // '='
+ shift(61); // '='
+ lookahead1(18); // S | '"' | "'"
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ parse_DirAttributeValue();
+ }
+ }
+ eventHandler.endNonterminal("DirAttributeList", e0);
+ }
+
+ function try_DirAttributeList()
+ {
+ for (;;)
+ {
+ lookahead1(19); // S | '/>' | '>'
+ if (l1 != 21) // S
+ {
+ break;
+ }
+ shiftT(21); // S
+ lookahead1(94); // QName | S | '/>' | '>'
+ if (l1 == 20) // QName
+ {
+ shiftT(20); // QName
+ lookahead1(11); // S | '='
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ lookahead1(7); // '='
+ shiftT(61); // '='
+ lookahead1(18); // S | '"' | "'"
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ try_DirAttributeValue();
+ }
+ }
+ }
+
+ function parse_DirAttributeValue()
+ {
+ eventHandler.startNonterminal("DirAttributeValue", e0);
+ lookahead1(14); // '"' | "'"
+ switch (l1)
+ {
+ case 28: // '"'
+ shift(28); // '"'
+ for (;;)
+ {
+ lookahead1(185); // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | '"' | '{' |
+ if (l1 == 28) // '"'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 13: // EscapeQuot
+ shift(13); // EscapeQuot
+ break;
+ default:
+ parse_QuotAttrValueContent();
+ }
+ }
+ shift(28); // '"'
+ break;
+ default:
+ shift(34); // "'"
+ for (;;)
+ {
+ lookahead1(186); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | "'" | '{' |
+ if (l1 == 34) // "'"
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 14: // EscapeApos
+ shift(14); // EscapeApos
+ break;
+ default:
+ parse_AposAttrValueContent();
+ }
+ }
+ shift(34); // "'"
+ }
+ eventHandler.endNonterminal("DirAttributeValue", e0);
+ }
+
+ function try_DirAttributeValue()
+ {
+ lookahead1(14); // '"' | "'"
+ switch (l1)
+ {
+ case 28: // '"'
+ shiftT(28); // '"'
+ for (;;)
+ {
+ lookahead1(185); // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | '"' | '{' |
+ if (l1 == 28) // '"'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 13: // EscapeQuot
+ shiftT(13); // EscapeQuot
+ break;
+ default:
+ try_QuotAttrValueContent();
+ }
+ }
+ shiftT(28); // '"'
+ break;
+ default:
+ shiftT(34); // "'"
+ for (;;)
+ {
+ lookahead1(186); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | "'" | '{' |
+ if (l1 == 34) // "'"
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 14: // EscapeApos
+ shiftT(14); // EscapeApos
+ break;
+ default:
+ try_AposAttrValueContent();
+ }
+ }
+ shiftT(34); // "'"
+ }
+ }
+
+ function parse_QuotAttrValueContent()
+ {
+ eventHandler.startNonterminal("QuotAttrValueContent", e0);
+ switch (l1)
+ {
+ case 16: // QuotAttrContentChar
+ shift(16); // QuotAttrContentChar
+ break;
+ default:
+ parse_CommonContent();
+ }
+ eventHandler.endNonterminal("QuotAttrValueContent", e0);
+ }
+
+ function try_QuotAttrValueContent()
+ {
+ switch (l1)
+ {
+ case 16: // QuotAttrContentChar
+ shiftT(16); // QuotAttrContentChar
+ break;
+ default:
+ try_CommonContent();
+ }
+ }
+
+ function parse_AposAttrValueContent()
+ {
+ eventHandler.startNonterminal("AposAttrValueContent", e0);
+ switch (l1)
+ {
+ case 17: // AposAttrContentChar
+ shift(17); // AposAttrContentChar
+ break;
+ default:
+ parse_CommonContent();
+ }
+ eventHandler.endNonterminal("AposAttrValueContent", e0);
+ }
+
+ function try_AposAttrValueContent()
+ {
+ switch (l1)
+ {
+ case 17: // AposAttrContentChar
+ shiftT(17); // AposAttrContentChar
+ break;
+ default:
+ try_CommonContent();
+ }
+ }
+
+ function parse_DirElemContent()
+ {
+ eventHandler.startNonterminal("DirElemContent", e0);
+ switch (l1)
+ {
+ case 55: // '<'
+ case 56: // '<!--'
+ case 60: // '<?'
+ parse_DirectConstructor();
+ break;
+ case 4: // CDataSection
+ shift(4); // CDataSection
+ break;
+ case 15: // ElementContentChar
+ shift(15); // ElementContentChar
+ break;
+ default:
+ parse_CommonContent();
+ }
+ eventHandler.endNonterminal("DirElemContent", e0);
+ }
+
+ function try_DirElemContent()
+ {
+ switch (l1)
+ {
+ case 55: // '<'
+ case 56: // '<!--'
+ case 60: // '<?'
+ try_DirectConstructor();
+ break;
+ case 4: // CDataSection
+ shiftT(4); // CDataSection
+ break;
+ case 15: // ElementContentChar
+ shiftT(15); // ElementContentChar
+ break;
+ default:
+ try_CommonContent();
+ }
+ }
+
+ function parse_DirCommentConstructor()
+ {
+ eventHandler.startNonterminal("DirCommentConstructor", e0);
+ shift(56); // '<!--'
+ lookahead1(1); // DirCommentContents
+ shift(2); // DirCommentContents
+ lookahead1(6); // '-->'
+ shift(44); // '-->'
+ eventHandler.endNonterminal("DirCommentConstructor", e0);
+ }
+
+ function try_DirCommentConstructor()
+ {
+ shiftT(56); // '<!--'
+ lookahead1(1); // DirCommentContents
+ shiftT(2); // DirCommentContents
+ lookahead1(6); // '-->'
+ shiftT(44); // '-->'
+ }
+
+ function parse_DirPIConstructor()
+ {
+ eventHandler.startNonterminal("DirPIConstructor", e0);
+ shift(60); // '<?'
+ lookahead1(3); // PITarget
+ shift(18); // PITarget
+ lookahead1(13); // S | '?>'
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ lookahead1(2); // DirPIContents
+ shift(3); // DirPIContents
+ }
+ lookahead1(9); // '?>'
+ shift(66); // '?>'
+ eventHandler.endNonterminal("DirPIConstructor", e0);
+ }
+
+ function try_DirPIConstructor()
+ {
+ shiftT(60); // '<?'
+ lookahead1(3); // PITarget
+ shiftT(18); // PITarget
+ lookahead1(13); // S | '?>'
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ lookahead1(2); // DirPIContents
+ shiftT(3); // DirPIContents
+ }
+ lookahead1(9); // '?>'
+ shiftT(66); // '?>'
+ }
+
+ function parse_ComputedConstructor()
+ {
+ eventHandler.startNonterminal("ComputedConstructor", e0);
+ switch (l1)
+ {
+ case 120: // 'document'
+ parse_CompDocConstructor();
+ break;
+ case 122: // 'element'
+ parse_CompElemConstructor();
+ break;
+ case 83: // 'attribute'
+ parse_CompAttrConstructor();
+ break;
+ case 187: // 'namespace'
+ parse_CompNamespaceConstructor();
+ break;
+ case 249: // 'text'
+ parse_CompTextConstructor();
+ break;
+ case 97: // 'comment'
+ parse_CompCommentConstructor();
+ break;
+ default:
+ parse_CompPIConstructor();
+ }
+ eventHandler.endNonterminal("ComputedConstructor", e0);
+ }
+
+ function try_ComputedConstructor()
+ {
+ switch (l1)
+ {
+ case 120: // 'document'
+ try_CompDocConstructor();
+ break;
+ case 122: // 'element'
+ try_CompElemConstructor();
+ break;
+ case 83: // 'attribute'
+ try_CompAttrConstructor();
+ break;
+ case 187: // 'namespace'
+ try_CompNamespaceConstructor();
+ break;
+ case 249: // 'text'
+ try_CompTextConstructor();
+ break;
+ case 97: // 'comment'
+ try_CompCommentConstructor();
+ break;
+ default:
+ try_CompPIConstructor();
+ }
+ }
+
+ function parse_CompElemConstructor()
+ {
+ eventHandler.startNonterminal("CompElemConstructor", e0);
+ shift(122); // 'element'
+ lookahead1W(250); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shift(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ break;
+ default:
+ whitespace();
+ parse_EQName();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 287) // '}'
+ {
+ whitespace();
+ parse_ContentExpr();
+ }
+ shift(287); // '}'
+ eventHandler.endNonterminal("CompElemConstructor", e0);
+ }
+
+ function try_CompElemConstructor()
+ {
+ shiftT(122); // 'element'
+ lookahead1W(250); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shiftT(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ break;
+ default:
+ try_EQName();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 287) // '}'
+ {
+ try_ContentExpr();
+ }
+ shiftT(287); // '}'
+ }
+
+ function parse_CompNamespaceConstructor()
+ {
+ eventHandler.startNonterminal("CompNamespaceConstructor", e0);
+ shift(187); // 'namespace'
+ lookahead1W(242); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shift(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PrefixExpr();
+ shift(287); // '}'
+ break;
+ default:
+ whitespace();
+ parse_Prefix();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_URIExpr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("CompNamespaceConstructor", e0);
+ }
+
+ function try_CompNamespaceConstructor()
+ {
+ shiftT(187); // 'namespace'
+ lookahead1W(242); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shiftT(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PrefixExpr();
+ shiftT(287); // '}'
+ break;
+ default:
+ try_Prefix();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_URIExpr();
+ shiftT(287); // '}'
+ }
+
+ function parse_Prefix()
+ {
+ eventHandler.startNonterminal("Prefix", e0);
+ parse_NCName();
+ eventHandler.endNonterminal("Prefix", e0);
+ }
+
+ function try_Prefix()
+ {
+ try_NCName();
+ }
+
+ function parse_PrefixExpr()
+ {
+ eventHandler.startNonterminal("PrefixExpr", e0);
+ parse_Expr();
+ eventHandler.endNonterminal("PrefixExpr", e0);
+ }
+
+ function try_PrefixExpr()
+ {
+ try_Expr();
+ }
+
+ function parse_URIExpr()
+ {
+ eventHandler.startNonterminal("URIExpr", e0);
+ parse_Expr();
+ eventHandler.endNonterminal("URIExpr", e0);
+ }
+
+ function try_URIExpr()
+ {
+ try_Expr();
+ }
+
+ function parse_FunctionItemExpr()
+ {
+ eventHandler.startNonterminal("FunctionItemExpr", e0);
+ switch (l1)
+ {
+ case 147: // 'function'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 33: // '%'
+ case 18067: // 'function' '('
+ parse_InlineFunctionExpr();
+ break;
+ default:
+ parse_NamedFunctionRef();
+ }
+ eventHandler.endNonterminal("FunctionItemExpr", e0);
+ }
+
+ function try_FunctionItemExpr()
+ {
+ switch (l1)
+ {
+ case 147: // 'function'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 33: // '%'
+ case 18067: // 'function' '('
+ try_InlineFunctionExpr();
+ break;
+ default:
+ try_NamedFunctionRef();
+ }
+ }
+
+ function parse_NamedFunctionRef()
+ {
+ eventHandler.startNonterminal("NamedFunctionRef", e0);
+ parse_EQName();
+ lookahead1W(20); // S^WS | '#' | '(:'
+ shift(29); // '#'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ eventHandler.endNonterminal("NamedFunctionRef", e0);
+ }
+
+ function try_NamedFunctionRef()
+ {
+ try_EQName();
+ lookahead1W(20); // S^WS | '#' | '(:'
+ shiftT(29); // '#'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ }
+
+ function parse_InlineFunctionExpr()
+ {
+ eventHandler.startNonterminal("InlineFunctionExpr", e0);
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 33) // '%'
+ {
+ break;
+ }
+ whitespace();
+ parse_Annotation();
+ }
+ shift(147); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(98); // S^WS | '$' | '(:' | ')'
+ if (l1 == 31) // '$'
+ {
+ whitespace();
+ parse_ParamList();
+ }
+ shift(38); // ')'
+ lookahead1W(115); // S^WS | '(:' | 'as' | '{'
+ if (l1 == 80) // 'as'
+ {
+ shift(80); // 'as'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ whitespace();
+ parse_FunctionBody();
+ eventHandler.endNonterminal("InlineFunctionExpr", e0);
+ }
+
+ function try_InlineFunctionExpr()
+ {
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 33) // '%'
+ {
+ break;
+ }
+ try_Annotation();
+ }
+ shiftT(147); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(98); // S^WS | '$' | '(:' | ')'
+ if (l1 == 31) // '$'
+ {
+ try_ParamList();
+ }
+ shiftT(38); // ')'
+ lookahead1W(115); // S^WS | '(:' | 'as' | '{'
+ if (l1 == 80) // 'as'
+ {
+ shiftT(80); // 'as'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ try_FunctionBody();
+ }
+
+ function parse_SingleType()
+ {
+ eventHandler.startNonterminal("SingleType", e0);
+ parse_SimpleTypeName();
+ lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 65) // '?'
+ {
+ shift(65); // '?'
+ }
+ eventHandler.endNonterminal("SingleType", e0);
+ }
+
+ function try_SingleType()
+ {
+ try_SimpleTypeName();
+ lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 65) // '?'
+ {
+ shiftT(65); // '?'
+ }
+ }
+
+ function parse_TypeDeclaration()
+ {
+ eventHandler.startNonterminal("TypeDeclaration", e0);
+ shift(80); // 'as'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ eventHandler.endNonterminal("TypeDeclaration", e0);
+ }
+
+ function try_TypeDeclaration()
+ {
+ shiftT(80); // 'as'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+
+ function parse_SequenceType()
+ {
+ eventHandler.startNonterminal("SequenceType", e0);
+ switch (l1)
+ {
+ case 35: // '('
+ lookahead2W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ break;
+ case 125: // 'empty-sequence'
+ lookahead2W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 18045: // 'empty-sequence' '('
+ case 19491: // '(' ')'
+ if (l1 == 125) // 'empty-sequence'
+ {
+ shift(125); // 'empty-sequence'
+ }
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ break;
+ default:
+ parse_ItemType();
+ lookahead1W(229); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' |
+ switch (l1)
+ {
+ case 40: // '*'
+ case 41: // '+'
+ case 65: // '?'
+ whitespace();
+ parse_OccurrenceIndicator();
+ break;
+ default:
+ break;
+ }
+ }
+ eventHandler.endNonterminal("SequenceType", e0);
+ }
+
+ function try_SequenceType()
+ {
+ switch (l1)
+ {
+ case 35: // '('
+ lookahead2W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ break;
+ case 125: // 'empty-sequence'
+ lookahead2W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 18045: // 'empty-sequence' '('
+ case 19491: // '(' ')'
+ if (l1 == 125) // 'empty-sequence'
+ {
+ shiftT(125); // 'empty-sequence'
+ }
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ break;
+ default:
+ try_ItemType();
+ lookahead1W(229); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' |
+ switch (l1)
+ {
+ case 40: // '*'
+ case 41: // '+'
+ case 65: // '?'
+ try_OccurrenceIndicator();
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ function parse_OccurrenceIndicator()
+ {
+ eventHandler.startNonterminal("OccurrenceIndicator", e0);
+ switch (l1)
+ {
+ case 65: // '?'
+ shift(65); // '?'
+ break;
+ case 40: // '*'
+ shift(40); // '*'
+ break;
+ default:
+ shift(41); // '+'
+ }
+ eventHandler.endNonterminal("OccurrenceIndicator", e0);
+ }
+
+ function try_OccurrenceIndicator()
+ {
+ switch (l1)
+ {
+ case 65: // '?'
+ shiftT(65); // '?'
+ break;
+ case 40: // '*'
+ shiftT(40); // '*'
+ break;
+ default:
+ shiftT(41); // '+'
+ }
+ }
+
+ function parse_ItemType()
+ {
+ eventHandler.startNonterminal("ItemType", e0);
+ switch (l1)
+ {
+ case 79: // 'array'
+ case 83: // 'attribute'
+ case 97: // 'comment'
+ case 121: // 'document-node'
+ case 122: // 'element'
+ case 147: // 'function'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 198: // 'object'
+ case 220: // 'processing-instruction'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 247: // 'structured-item'
+ case 249: // 'text'
+ lookahead2W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 12879 // 'array' EOF
+ || lk == 12969 // 'json-item' EOF
+ || lk == 12998 // 'object' EOF
+ || lk == 13047 // 'structured-item' EOF
+ || lk == 13903 // 'array' '!='
+ || lk == 13993 // 'json-item' '!='
+ || lk == 14022 // 'object' '!='
+ || lk == 14071 // 'structured-item' '!='
+ || lk == 19535 // 'array' ')'
+ || lk == 19625 // 'json-item' ')'
+ || lk == 19654 // 'object' ')'
+ || lk == 19703 // 'structured-item' ')'
+ || lk == 20047 // 'array' '*'
+ || lk == 20137 // 'json-item' '*'
+ || lk == 20166 // 'object' '*'
+ || lk == 20215 // 'structured-item' '*'
+ || lk == 20559 // 'array' '*'
+ || lk == 20649 // 'json-item' '*'
+ || lk == 20678 // 'object' '*'
+ || lk == 20727 // 'structured-item' '*'
+ || lk == 21071 // 'array' '+'
+ || lk == 21161 // 'json-item' '+'
+ || lk == 21190 // 'object' '+'
+ || lk == 21239 // 'structured-item' '+'
+ || lk == 21583 // 'array' ','
+ || lk == 21673 // 'json-item' ','
+ || lk == 21702 // 'object' ','
+ || lk == 21751 // 'structured-item' ','
+ || lk == 22095 // 'array' '-'
+ || lk == 22185 // 'json-item' '-'
+ || lk == 22214 // 'object' '-'
+ || lk == 22263 // 'structured-item' '-'
+ || lk == 25679 // 'array' ':'
+ || lk == 25769 // 'json-item' ':'
+ || lk == 25798 // 'object' ':'
+ || lk == 25847 // 'structured-item' ':'
+ || lk == 27215 // 'array' ':='
+ || lk == 27305 // 'json-item' ':='
+ || lk == 27334 // 'object' ':='
+ || lk == 27383 // 'structured-item' ':='
+ || lk == 27727 // 'array' ';'
+ || lk == 27817 // 'json-item' ';'
+ || lk == 27846 // 'object' ';'
+ || lk == 27895 // 'structured-item' ';'
+ || lk == 28239 // 'array' '<'
+ || lk == 28329 // 'json-item' '<'
+ || lk == 28358 // 'object' '<'
+ || lk == 28407 // 'structured-item' '<'
+ || lk == 29775 // 'array' '<<'
+ || lk == 29865 // 'json-item' '<<'
+ || lk == 29894 // 'object' '<<'
+ || lk == 29943 // 'structured-item' '<<'
+ || lk == 30287 // 'array' '<='
+ || lk == 30377 // 'json-item' '<='
+ || lk == 30406 // 'object' '<='
+ || lk == 30455 // 'structured-item' '<='
+ || lk == 31311 // 'array' '='
+ || lk == 31401 // 'json-item' '='
+ || lk == 31430 // 'object' '='
+ || lk == 31479 // 'structured-item' '='
+ || lk == 31823 // 'array' '>'
+ || lk == 31913 // 'json-item' '>'
+ || lk == 31942 // 'object' '>'
+ || lk == 31991 // 'structured-item' '>'
+ || lk == 32335 // 'array' '>='
+ || lk == 32425 // 'json-item' '>='
+ || lk == 32454 // 'object' '>='
+ || lk == 32503 // 'structured-item' '>='
+ || lk == 32847 // 'array' '>>'
+ || lk == 32937 // 'json-item' '>>'
+ || lk == 32966 // 'object' '>>'
+ || lk == 33015 // 'structured-item' '>>'
+ || lk == 33359 // 'array' '?'
+ || lk == 33449 // 'json-item' '?'
+ || lk == 33478 // 'object' '?'
+ || lk == 33527 // 'structured-item' '?'
+ || lk == 35919 // 'array' ']'
+ || lk == 36009 // 'json-item' ']'
+ || lk == 36038 // 'object' ']'
+ || lk == 36087 // 'structured-item' ']'
+ || lk == 36431 // 'array' 'after'
+ || lk == 36521 // 'json-item' 'after'
+ || lk == 36550 // 'object' 'after'
+ || lk == 36599 // 'structured-item' 'after'
+ || lk == 37455 // 'array' 'allowing'
+ || lk == 37545 // 'json-item' 'allowing'
+ || lk == 37574 // 'object' 'allowing'
+ || lk == 37623 // 'structured-item' 'allowing'
+ || lk == 38991 // 'array' 'and'
+ || lk == 39081 // 'json-item' 'and'
+ || lk == 39110 // 'object' 'and'
+ || lk == 39159 // 'structured-item' 'and'
+ || lk == 41039 // 'array' 'as'
+ || lk == 41129 // 'json-item' 'as'
+ || lk == 41158 // 'object' 'as'
+ || lk == 41207 // 'structured-item' 'as'
+ || lk == 41551 // 'array' 'ascending'
+ || lk == 41641 // 'json-item' 'ascending'
+ || lk == 41670 // 'object' 'ascending'
+ || lk == 41719 // 'structured-item' 'ascending'
+ || lk == 42063 // 'array' 'at'
+ || lk == 42153 // 'json-item' 'at'
+ || lk == 42182 // 'object' 'at'
+ || lk == 42231 // 'structured-item' 'at'
+ || lk == 43599 // 'array' 'before'
+ || lk == 43689 // 'json-item' 'before'
+ || lk == 43718 // 'object' 'before'
+ || lk == 43767 // 'structured-item' 'before'
+ || lk == 45647 // 'array' 'case'
+ || lk == 45737 // 'json-item' 'case'
+ || lk == 45766 // 'object' 'case'
+ || lk == 45815 // 'structured-item' 'case'
+ || lk == 48719 // 'array' 'collation'
+ || lk == 48809 // 'json-item' 'collation'
+ || lk == 48838 // 'object' 'collation'
+ || lk == 48887 // 'structured-item' 'collation'
+ || lk == 51279 // 'array' 'contains'
+ || lk == 51369 // 'json-item' 'contains'
+ || lk == 51398 // 'object' 'contains'
+ || lk == 51447 // 'structured-item' 'contains'
+ || lk == 54351 // 'array' 'count'
+ || lk == 54441 // 'json-item' 'count'
+ || lk == 54470 // 'object' 'count'
+ || lk == 54519 // 'structured-item' 'count'
+ || lk == 56399 // 'array' 'default'
+ || lk == 56489 // 'json-item' 'default'
+ || lk == 56518 // 'object' 'default'
+ || lk == 56567 // 'structured-item' 'default'
+ || lk == 58447 // 'array' 'descending'
+ || lk == 58537 // 'json-item' 'descending'
+ || lk == 58566 // 'object' 'descending'
+ || lk == 58615 // 'structured-item' 'descending'
+ || lk == 61007 // 'array' 'div'
+ || lk == 61097 // 'json-item' 'div'
+ || lk == 61126 // 'object' 'div'
+ || lk == 61175 // 'structured-item' 'div'
+ || lk == 63055 // 'array' 'else'
+ || lk == 63145 // 'json-item' 'else'
+ || lk == 63174 // 'object' 'else'
+ || lk == 63223 // 'structured-item' 'else'
+ || lk == 63567 // 'array' 'empty'
+ || lk == 63657 // 'json-item' 'empty'
+ || lk == 63686 // 'object' 'empty'
+ || lk == 63735 // 'structured-item' 'empty'
+ || lk == 65103 // 'array' 'end'
+ || lk == 65193 // 'json-item' 'end'
+ || lk == 65222 // 'object' 'end'
+ || lk == 65271 // 'structured-item' 'end'
+ || lk == 66127 // 'array' 'eq'
+ || lk == 66217 // 'json-item' 'eq'
+ || lk == 66246 // 'object' 'eq'
+ || lk == 66295 // 'structured-item' 'eq'
+ || lk == 67663 // 'array' 'except'
+ || lk == 67753 // 'json-item' 'except'
+ || lk == 67782 // 'object' 'except'
+ || lk == 67831 // 'structured-item' 'except'
+ || lk == 68687 // 'array' 'external'
+ || lk == 68777 // 'json-item' 'external'
+ || lk == 68806 // 'object' 'external'
+ || lk == 68855 // 'structured-item' 'external'
+ || lk == 71247 // 'array' 'for'
+ || lk == 71337 // 'json-item' 'for'
+ || lk == 71366 // 'object' 'for'
+ || lk == 71415 // 'structured-item' 'for'
+ || lk == 75855 // 'array' 'ge'
+ || lk == 75945 // 'json-item' 'ge'
+ || lk == 75974 // 'object' 'ge'
+ || lk == 76023 // 'structured-item' 'ge'
+ || lk == 76879 // 'array' 'group'
+ || lk == 76969 // 'json-item' 'group'
+ || lk == 76998 // 'object' 'group'
+ || lk == 77047 // 'structured-item' 'group'
+ || lk == 77903 // 'array' 'gt'
+ || lk == 77993 // 'json-item' 'gt'
+ || lk == 78022 // 'object' 'gt'
+ || lk == 78071 // 'structured-item' 'gt'
+ || lk == 78415 // 'array' 'idiv'
+ || lk == 78505 // 'json-item' 'idiv'
+ || lk == 78534 // 'object' 'idiv'
+ || lk == 78583 // 'structured-item' 'idiv'
+ || lk == 79951 // 'array' 'in'
+ || lk == 80041 // 'json-item' 'in'
+ || lk == 80070 // 'object' 'in'
+ || lk == 80119 // 'structured-item' 'in'
+ || lk == 83023 // 'array' 'instance'
+ || lk == 83113 // 'json-item' 'instance'
+ || lk == 83142 // 'object' 'instance'
+ || lk == 83191 // 'structured-item' 'instance'
+ || lk == 84047 // 'array' 'intersect'
+ || lk == 84137 // 'json-item' 'intersect'
+ || lk == 84166 // 'object' 'intersect'
+ || lk == 84215 // 'structured-item' 'intersect'
+ || lk == 84559 // 'array' 'into'
+ || lk == 84649 // 'json-item' 'into'
+ || lk == 84678 // 'object' 'into'
+ || lk == 84727 // 'structured-item' 'into'
+ || lk == 85071 // 'array' 'is'
+ || lk == 85161 // 'json-item' 'is'
+ || lk == 85190 // 'object' 'is'
+ || lk == 85239 // 'structured-item' 'is'
+ || lk == 89679 // 'array' 'le'
+ || lk == 89769 // 'json-item' 'le'
+ || lk == 89798 // 'object' 'le'
+ || lk == 89847 // 'structured-item' 'le'
+ || lk == 90703 // 'array' 'let'
+ || lk == 90793 // 'json-item' 'let'
+ || lk == 90822 // 'object' 'let'
+ || lk == 90871 // 'structured-item' 'let'
+ || lk == 92751 // 'array' 'lt'
+ || lk == 92841 // 'json-item' 'lt'
+ || lk == 92870 // 'object' 'lt'
+ || lk == 92919 // 'structured-item' 'lt'
+ || lk == 93775 // 'array' 'mod'
+ || lk == 93865 // 'json-item' 'mod'
+ || lk == 93894 // 'object' 'mod'
+ || lk == 93943 // 'structured-item' 'mod'
+ || lk == 94287 // 'array' 'modify'
+ || lk == 94377 // 'json-item' 'modify'
+ || lk == 94406 // 'object' 'modify'
+ || lk == 94455 // 'structured-item' 'modify'
+ || lk == 96847 // 'array' 'ne'
+ || lk == 96937 // 'json-item' 'ne'
+ || lk == 96966 // 'object' 'ne'
+ || lk == 97015 // 'structured-item' 'ne'
+ || lk == 103503 // 'array' 'only'
+ || lk == 103593 // 'json-item' 'only'
+ || lk == 103622 // 'object' 'only'
+ || lk == 103671 // 'structured-item' 'only'
+ || lk == 104527 // 'array' 'or'
+ || lk == 104617 // 'json-item' 'or'
+ || lk == 104646 // 'object' 'or'
+ || lk == 104695 // 'structured-item' 'or'
+ || lk == 105039 // 'array' 'order'
+ || lk == 105129 // 'json-item' 'order'
+ || lk == 105158 // 'object' 'order'
+ || lk == 105207 // 'structured-item' 'order'
+ || lk == 107087 // 'array' 'paragraphs'
+ || lk == 107177 // 'json-item' 'paragraphs'
+ || lk == 107206 // 'object' 'paragraphs'
+ || lk == 107255 // 'structured-item' 'paragraphs'
+ || lk == 114767 // 'array' 'return'
+ || lk == 114857 // 'json-item' 'return'
+ || lk == 114886 // 'object' 'return'
+ || lk == 114935 // 'structured-item' 'return'
+ || lk == 116815 // 'array' 'satisfies'
+ || lk == 116905 // 'json-item' 'satisfies'
+ || lk == 116934 // 'object' 'satisfies'
+ || lk == 116983 // 'structured-item' 'satisfies'
+ || lk == 118863 // 'array' 'score'
+ || lk == 118953 // 'json-item' 'score'
+ || lk == 118982 // 'object' 'score'
+ || lk == 119031 // 'structured-item' 'score'
+ || lk == 121423 // 'array' 'sentences'
+ || lk == 121513 // 'json-item' 'sentences'
+ || lk == 121542 // 'object' 'sentences'
+ || lk == 121591 // 'structured-item' 'sentences'
+ || lk == 123471 // 'array' 'stable'
+ || lk == 123561 // 'json-item' 'stable'
+ || lk == 123590 // 'object' 'stable'
+ || lk == 123639 // 'structured-item' 'stable'
+ || lk == 123983 // 'array' 'start'
+ || lk == 124073 // 'json-item' 'start'
+ || lk == 124102 // 'object' 'start'
+ || lk == 124151 // 'structured-item' 'start'
+ || lk == 129103 // 'array' 'times'
+ || lk == 129193 // 'json-item' 'times'
+ || lk == 129222 // 'object' 'times'
+ || lk == 129271 // 'structured-item' 'times'
+ || lk == 129615 // 'array' 'to'
+ || lk == 129705 // 'json-item' 'to'
+ || lk == 129734 // 'object' 'to'
+ || lk == 129783 // 'structured-item' 'to'
+ || lk == 133199 // 'array' 'union'
+ || lk == 133289 // 'json-item' 'union'
+ || lk == 133318 // 'object' 'union'
+ || lk == 133367 // 'structured-item' 'union'
+ || lk == 139343 // 'array' 'where'
+ || lk == 139433 // 'json-item' 'where'
+ || lk == 139462 // 'object' 'where'
+ || lk == 139511 // 'structured-item' 'where'
+ || lk == 141391 // 'array' 'with'
+ || lk == 141481 // 'json-item' 'with'
+ || lk == 141510 // 'object' 'with'
+ || lk == 141559 // 'structured-item' 'with'
+ || lk == 142927 // 'array' 'words'
+ || lk == 143017 // 'json-item' 'words'
+ || lk == 143046 // 'object' 'words'
+ || lk == 143095 // 'structured-item' 'words'
+ || lk == 143951 // 'array' '{'
+ || lk == 144041 // 'json-item' '{'
+ || lk == 144070 // 'object' '{'
+ || lk == 144119 // 'structured-item' '{'
+ || lk == 145487 // 'array' '|'
+ || lk == 145577 // 'json-item' '|'
+ || lk == 145606 // 'object' '|'
+ || lk == 145655 // 'structured-item' '|'
+ || lk == 145999 // 'array' '||'
+ || lk == 146089 // 'json-item' '||'
+ || lk == 146118 // 'object' '||'
+ || lk == 146167 // 'structured-item' '||'
+ || lk == 146511 // 'array' '|}'
+ || lk == 146601 // 'json-item' '|}'
+ || lk == 146630 // 'object' '|}'
+ || lk == 146679 // 'structured-item' '|}'
+ || lk == 147023 // 'array' '}'
+ || lk == 147113 // 'json-item' '}'
+ || lk == 147142 // 'object' '}'
+ || lk == 147191) // 'structured-item' '}'
+ {
+ lk = memoized(6, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_AtomicOrUnionType();
+ lk = -4;
+ }
+ catch (p4A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_JSONTest();
+ lk = -6;
+ }
+ catch (p6A)
+ {
+ lk = -7;
+ }
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(6, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case 18003: // 'attribute' '('
+ case 18017: // 'comment' '('
+ case 18041: // 'document-node' '('
+ case 18042: // 'element' '('
+ case 18108: // 'namespace-node' '('
+ case 18114: // 'node' '('
+ case 18140: // 'processing-instruction' '('
+ case 18150: // 'schema-attribute' '('
+ case 18151: // 'schema-element' '('
+ case 18169: // 'text' '('
+ parse_KindTest();
+ break;
+ case 18087: // 'item' '('
+ shift(167); // 'item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ break;
+ case 33: // '%'
+ case 18067: // 'function' '('
+ parse_FunctionTest();
+ break;
+ case 35: // '('
+ parse_ParenthesizedItemType();
+ break;
+ case -6:
+ case 17999: // 'array' '('
+ case 18089: // 'json-item' '('
+ case 18118: // 'object' '('
+ parse_JSONTest();
+ break;
+ case -7:
+ case 18167: // 'structured-item' '('
+ parse_StructuredItemTest();
+ break;
+ default:
+ parse_AtomicOrUnionType();
+ }
+ eventHandler.endNonterminal("ItemType", e0);
+ }
+
+ function try_ItemType()
+ {
+ switch (l1)
+ {
+ case 79: // 'array'
+ case 83: // 'attribute'
+ case 97: // 'comment'
+ case 121: // 'document-node'
+ case 122: // 'element'
+ case 147: // 'function'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 198: // 'object'
+ case 220: // 'processing-instruction'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 247: // 'structured-item'
+ case 249: // 'text'
+ lookahead2W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 12879 // 'array' EOF
+ || lk == 12969 // 'json-item' EOF
+ || lk == 12998 // 'object' EOF
+ || lk == 13047 // 'structured-item' EOF
+ || lk == 13903 // 'array' '!='
+ || lk == 13993 // 'json-item' '!='
+ || lk == 14022 // 'object' '!='
+ || lk == 14071 // 'structured-item' '!='
+ || lk == 19535 // 'array' ')'
+ || lk == 19625 // 'json-item' ')'
+ || lk == 19654 // 'object' ')'
+ || lk == 19703 // 'structured-item' ')'
+ || lk == 20047 // 'array' '*'
+ || lk == 20137 // 'json-item' '*'
+ || lk == 20166 // 'object' '*'
+ || lk == 20215 // 'structured-item' '*'
+ || lk == 20559 // 'array' '*'
+ || lk == 20649 // 'json-item' '*'
+ || lk == 20678 // 'object' '*'
+ || lk == 20727 // 'structured-item' '*'
+ || lk == 21071 // 'array' '+'
+ || lk == 21161 // 'json-item' '+'
+ || lk == 21190 // 'object' '+'
+ || lk == 21239 // 'structured-item' '+'
+ || lk == 21583 // 'array' ','
+ || lk == 21673 // 'json-item' ','
+ || lk == 21702 // 'object' ','
+ || lk == 21751 // 'structured-item' ','
+ || lk == 22095 // 'array' '-'
+ || lk == 22185 // 'json-item' '-'
+ || lk == 22214 // 'object' '-'
+ || lk == 22263 // 'structured-item' '-'
+ || lk == 25679 // 'array' ':'
+ || lk == 25769 // 'json-item' ':'
+ || lk == 25798 // 'object' ':'
+ || lk == 25847 // 'structured-item' ':'
+ || lk == 27215 // 'array' ':='
+ || lk == 27305 // 'json-item' ':='
+ || lk == 27334 // 'object' ':='
+ || lk == 27383 // 'structured-item' ':='
+ || lk == 27727 // 'array' ';'
+ || lk == 27817 // 'json-item' ';'
+ || lk == 27846 // 'object' ';'
+ || lk == 27895 // 'structured-item' ';'
+ || lk == 28239 // 'array' '<'
+ || lk == 28329 // 'json-item' '<'
+ || lk == 28358 // 'object' '<'
+ || lk == 28407 // 'structured-item' '<'
+ || lk == 29775 // 'array' '<<'
+ || lk == 29865 // 'json-item' '<<'
+ || lk == 29894 // 'object' '<<'
+ || lk == 29943 // 'structured-item' '<<'
+ || lk == 30287 // 'array' '<='
+ || lk == 30377 // 'json-item' '<='
+ || lk == 30406 // 'object' '<='
+ || lk == 30455 // 'structured-item' '<='
+ || lk == 31311 // 'array' '='
+ || lk == 31401 // 'json-item' '='
+ || lk == 31430 // 'object' '='
+ || lk == 31479 // 'structured-item' '='
+ || lk == 31823 // 'array' '>'
+ || lk == 31913 // 'json-item' '>'
+ || lk == 31942 // 'object' '>'
+ || lk == 31991 // 'structured-item' '>'
+ || lk == 32335 // 'array' '>='
+ || lk == 32425 // 'json-item' '>='
+ || lk == 32454 // 'object' '>='
+ || lk == 32503 // 'structured-item' '>='
+ || lk == 32847 // 'array' '>>'
+ || lk == 32937 // 'json-item' '>>'
+ || lk == 32966 // 'object' '>>'
+ || lk == 33015 // 'structured-item' '>>'
+ || lk == 33359 // 'array' '?'
+ || lk == 33449 // 'json-item' '?'
+ || lk == 33478 // 'object' '?'
+ || lk == 33527 // 'structured-item' '?'
+ || lk == 35919 // 'array' ']'
+ || lk == 36009 // 'json-item' ']'
+ || lk == 36038 // 'object' ']'
+ || lk == 36087 // 'structured-item' ']'
+ || lk == 36431 // 'array' 'after'
+ || lk == 36521 // 'json-item' 'after'
+ || lk == 36550 // 'object' 'after'
+ || lk == 36599 // 'structured-item' 'after'
+ || lk == 37455 // 'array' 'allowing'
+ || lk == 37545 // 'json-item' 'allowing'
+ || lk == 37574 // 'object' 'allowing'
+ || lk == 37623 // 'structured-item' 'allowing'
+ || lk == 38991 // 'array' 'and'
+ || lk == 39081 // 'json-item' 'and'
+ || lk == 39110 // 'object' 'and'
+ || lk == 39159 // 'structured-item' 'and'
+ || lk == 41039 // 'array' 'as'
+ || lk == 41129 // 'json-item' 'as'
+ || lk == 41158 // 'object' 'as'
+ || lk == 41207 // 'structured-item' 'as'
+ || lk == 41551 // 'array' 'ascending'
+ || lk == 41641 // 'json-item' 'ascending'
+ || lk == 41670 // 'object' 'ascending'
+ || lk == 41719 // 'structured-item' 'ascending'
+ || lk == 42063 // 'array' 'at'
+ || lk == 42153 // 'json-item' 'at'
+ || lk == 42182 // 'object' 'at'
+ || lk == 42231 // 'structured-item' 'at'
+ || lk == 43599 // 'array' 'before'
+ || lk == 43689 // 'json-item' 'before'
+ || lk == 43718 // 'object' 'before'
+ || lk == 43767 // 'structured-item' 'before'
+ || lk == 45647 // 'array' 'case'
+ || lk == 45737 // 'json-item' 'case'
+ || lk == 45766 // 'object' 'case'
+ || lk == 45815 // 'structured-item' 'case'
+ || lk == 48719 // 'array' 'collation'
+ || lk == 48809 // 'json-item' 'collation'
+ || lk == 48838 // 'object' 'collation'
+ || lk == 48887 // 'structured-item' 'collation'
+ || lk == 51279 // 'array' 'contains'
+ || lk == 51369 // 'json-item' 'contains'
+ || lk == 51398 // 'object' 'contains'
+ || lk == 51447 // 'structured-item' 'contains'
+ || lk == 54351 // 'array' 'count'
+ || lk == 54441 // 'json-item' 'count'
+ || lk == 54470 // 'object' 'count'
+ || lk == 54519 // 'structured-item' 'count'
+ || lk == 56399 // 'array' 'default'
+ || lk == 56489 // 'json-item' 'default'
+ || lk == 56518 // 'object' 'default'
+ || lk == 56567 // 'structured-item' 'default'
+ || lk == 58447 // 'array' 'descending'
+ || lk == 58537 // 'json-item' 'descending'
+ || lk == 58566 // 'object' 'descending'
+ || lk == 58615 // 'structured-item' 'descending'
+ || lk == 61007 // 'array' 'div'
+ || lk == 61097 // 'json-item' 'div'
+ || lk == 61126 // 'object' 'div'
+ || lk == 61175 // 'structured-item' 'div'
+ || lk == 63055 // 'array' 'else'
+ || lk == 63145 // 'json-item' 'else'
+ || lk == 63174 // 'object' 'else'
+ || lk == 63223 // 'structured-item' 'else'
+ || lk == 63567 // 'array' 'empty'
+ || lk == 63657 // 'json-item' 'empty'
+ || lk == 63686 // 'object' 'empty'
+ || lk == 63735 // 'structured-item' 'empty'
+ || lk == 65103 // 'array' 'end'
+ || lk == 65193 // 'json-item' 'end'
+ || lk == 65222 // 'object' 'end'
+ || lk == 65271 // 'structured-item' 'end'
+ || lk == 66127 // 'array' 'eq'
+ || lk == 66217 // 'json-item' 'eq'
+ || lk == 66246 // 'object' 'eq'
+ || lk == 66295 // 'structured-item' 'eq'
+ || lk == 67663 // 'array' 'except'
+ || lk == 67753 // 'json-item' 'except'
+ || lk == 67782 // 'object' 'except'
+ || lk == 67831 // 'structured-item' 'except'
+ || lk == 68687 // 'array' 'external'
+ || lk == 68777 // 'json-item' 'external'
+ || lk == 68806 // 'object' 'external'
+ || lk == 68855 // 'structured-item' 'external'
+ || lk == 71247 // 'array' 'for'
+ || lk == 71337 // 'json-item' 'for'
+ || lk == 71366 // 'object' 'for'
+ || lk == 71415 // 'structured-item' 'for'
+ || lk == 75855 // 'array' 'ge'
+ || lk == 75945 // 'json-item' 'ge'
+ || lk == 75974 // 'object' 'ge'
+ || lk == 76023 // 'structured-item' 'ge'
+ || lk == 76879 // 'array' 'group'
+ || lk == 76969 // 'json-item' 'group'
+ || lk == 76998 // 'object' 'group'
+ || lk == 77047 // 'structured-item' 'group'
+ || lk == 77903 // 'array' 'gt'
+ || lk == 77993 // 'json-item' 'gt'
+ || lk == 78022 // 'object' 'gt'
+ || lk == 78071 // 'structured-item' 'gt'
+ || lk == 78415 // 'array' 'idiv'
+ || lk == 78505 // 'json-item' 'idiv'
+ || lk == 78534 // 'object' 'idiv'
+ || lk == 78583 // 'structured-item' 'idiv'
+ || lk == 79951 // 'array' 'in'
+ || lk == 80041 // 'json-item' 'in'
+ || lk == 80070 // 'object' 'in'
+ || lk == 80119 // 'structured-item' 'in'
+ || lk == 83023 // 'array' 'instance'
+ || lk == 83113 // 'json-item' 'instance'
+ || lk == 83142 // 'object' 'instance'
+ || lk == 83191 // 'structured-item' 'instance'
+ || lk == 84047 // 'array' 'intersect'
+ || lk == 84137 // 'json-item' 'intersect'
+ || lk == 84166 // 'object' 'intersect'
+ || lk == 84215 // 'structured-item' 'intersect'
+ || lk == 84559 // 'array' 'into'
+ || lk == 84649 // 'json-item' 'into'
+ || lk == 84678 // 'object' 'into'
+ || lk == 84727 // 'structured-item' 'into'
+ || lk == 85071 // 'array' 'is'
+ || lk == 85161 // 'json-item' 'is'
+ || lk == 85190 // 'object' 'is'
+ || lk == 85239 // 'structured-item' 'is'
+ || lk == 89679 // 'array' 'le'
+ || lk == 89769 // 'json-item' 'le'
+ || lk == 89798 // 'object' 'le'
+ || lk == 89847 // 'structured-item' 'le'
+ || lk == 90703 // 'array' 'let'
+ || lk == 90793 // 'json-item' 'let'
+ || lk == 90822 // 'object' 'let'
+ || lk == 90871 // 'structured-item' 'let'
+ || lk == 92751 // 'array' 'lt'
+ || lk == 92841 // 'json-item' 'lt'
+ || lk == 92870 // 'object' 'lt'
+ || lk == 92919 // 'structured-item' 'lt'
+ || lk == 93775 // 'array' 'mod'
+ || lk == 93865 // 'json-item' 'mod'
+ || lk == 93894 // 'object' 'mod'
+ || lk == 93943 // 'structured-item' 'mod'
+ || lk == 94287 // 'array' 'modify'
+ || lk == 94377 // 'json-item' 'modify'
+ || lk == 94406 // 'object' 'modify'
+ || lk == 94455 // 'structured-item' 'modify'
+ || lk == 96847 // 'array' 'ne'
+ || lk == 96937 // 'json-item' 'ne'
+ || lk == 96966 // 'object' 'ne'
+ || lk == 97015 // 'structured-item' 'ne'
+ || lk == 103503 // 'array' 'only'
+ || lk == 103593 // 'json-item' 'only'
+ || lk == 103622 // 'object' 'only'
+ || lk == 103671 // 'structured-item' 'only'
+ || lk == 104527 // 'array' 'or'
+ || lk == 104617 // 'json-item' 'or'
+ || lk == 104646 // 'object' 'or'
+ || lk == 104695 // 'structured-item' 'or'
+ || lk == 105039 // 'array' 'order'
+ || lk == 105129 // 'json-item' 'order'
+ || lk == 105158 // 'object' 'order'
+ || lk == 105207 // 'structured-item' 'order'
+ || lk == 107087 // 'array' 'paragraphs'
+ || lk == 107177 // 'json-item' 'paragraphs'
+ || lk == 107206 // 'object' 'paragraphs'
+ || lk == 107255 // 'structured-item' 'paragraphs'
+ || lk == 114767 // 'array' 'return'
+ || lk == 114857 // 'json-item' 'return'
+ || lk == 114886 // 'object' 'return'
+ || lk == 114935 // 'structured-item' 'return'
+ || lk == 116815 // 'array' 'satisfies'
+ || lk == 116905 // 'json-item' 'satisfies'
+ || lk == 116934 // 'object' 'satisfies'
+ || lk == 116983 // 'structured-item' 'satisfies'
+ || lk == 118863 // 'array' 'score'
+ || lk == 118953 // 'json-item' 'score'
+ || lk == 118982 // 'object' 'score'
+ || lk == 119031 // 'structured-item' 'score'
+ || lk == 121423 // 'array' 'sentences'
+ || lk == 121513 // 'json-item' 'sentences'
+ || lk == 121542 // 'object' 'sentences'
+ || lk == 121591 // 'structured-item' 'sentences'
+ || lk == 123471 // 'array' 'stable'
+ || lk == 123561 // 'json-item' 'stable'
+ || lk == 123590 // 'object' 'stable'
+ || lk == 123639 // 'structured-item' 'stable'
+ || lk == 123983 // 'array' 'start'
+ || lk == 124073 // 'json-item' 'start'
+ || lk == 124102 // 'object' 'start'
+ || lk == 124151 // 'structured-item' 'start'
+ || lk == 129103 // 'array' 'times'
+ || lk == 129193 // 'json-item' 'times'
+ || lk == 129222 // 'object' 'times'
+ || lk == 129271 // 'structured-item' 'times'
+ || lk == 129615 // 'array' 'to'
+ || lk == 129705 // 'json-item' 'to'
+ || lk == 129734 // 'object' 'to'
+ || lk == 129783 // 'structured-item' 'to'
+ || lk == 133199 // 'array' 'union'
+ || lk == 133289 // 'json-item' 'union'
+ || lk == 133318 // 'object' 'union'
+ || lk == 133367 // 'structured-item' 'union'
+ || lk == 139343 // 'array' 'where'
+ || lk == 139433 // 'json-item' 'where'
+ || lk == 139462 // 'object' 'where'
+ || lk == 139511 // 'structured-item' 'where'
+ || lk == 141391 // 'array' 'with'
+ || lk == 141481 // 'json-item' 'with'
+ || lk == 141510 // 'object' 'with'
+ || lk == 141559 // 'structured-item' 'with'
+ || lk == 142927 // 'array' 'words'
+ || lk == 143017 // 'json-item' 'words'
+ || lk == 143046 // 'object' 'words'
+ || lk == 143095 // 'structured-item' 'words'
+ || lk == 143951 // 'array' '{'
+ || lk == 144041 // 'json-item' '{'
+ || lk == 144070 // 'object' '{'
+ || lk == 144119 // 'structured-item' '{'
+ || lk == 145487 // 'array' '|'
+ || lk == 145577 // 'json-item' '|'
+ || lk == 145606 // 'object' '|'
+ || lk == 145655 // 'structured-item' '|'
+ || lk == 145999 // 'array' '||'
+ || lk == 146089 // 'json-item' '||'
+ || lk == 146118 // 'object' '||'
+ || lk == 146167 // 'structured-item' '||'
+ || lk == 146511 // 'array' '|}'
+ || lk == 146601 // 'json-item' '|}'
+ || lk == 146630 // 'object' '|}'
+ || lk == 146679 // 'structured-item' '|}'
+ || lk == 147023 // 'array' '}'
+ || lk == 147113 // 'json-item' '}'
+ || lk == 147142 // 'object' '}'
+ || lk == 147191) // 'structured-item' '}'
+ {
+ lk = memoized(6, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_AtomicOrUnionType();
+ memoize(6, e0A, -4);
+ lk = -8;
+ }
+ catch (p4A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_JSONTest();
+ memoize(6, e0A, -6);
+ lk = -8;
+ }
+ catch (p6A)
+ {
+ lk = -7;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(6, e0A, -7);
+ }
+ }
+ }
+ }
+ switch (lk)
+ {
+ case 18003: // 'attribute' '('
+ case 18017: // 'comment' '('
+ case 18041: // 'document-node' '('
+ case 18042: // 'element' '('
+ case 18108: // 'namespace-node' '('
+ case 18114: // 'node' '('
+ case 18140: // 'processing-instruction' '('
+ case 18150: // 'schema-attribute' '('
+ case 18151: // 'schema-element' '('
+ case 18169: // 'text' '('
+ try_KindTest();
+ break;
+ case 18087: // 'item' '('
+ shiftT(167); // 'item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ break;
+ case 33: // '%'
+ case 18067: // 'function' '('
+ try_FunctionTest();
+ break;
+ case 35: // '('
+ try_ParenthesizedItemType();
+ break;
+ case -6:
+ case 17999: // 'array' '('
+ case 18089: // 'json-item' '('
+ case 18118: // 'object' '('
+ try_JSONTest();
+ break;
+ case -7:
+ case 18167: // 'structured-item' '('
+ try_StructuredItemTest();
+ break;
+ case -8:
+ break;
+ default:
+ try_AtomicOrUnionType();
+ }
+ }
+
+ function parse_JSONTest()
+ {
+ eventHandler.startNonterminal("JSONTest", e0);
+ switch (l1)
+ {
+ case 169: // 'json-item'
+ parse_JSONItemTest();
+ break;
+ case 198: // 'object'
+ parse_JSONObjectTest();
+ break;
+ default:
+ parse_JSONArrayTest();
+ }
+ eventHandler.endNonterminal("JSONTest", e0);
+ }
+
+ function try_JSONTest()
+ {
+ switch (l1)
+ {
+ case 169: // 'json-item'
+ try_JSONItemTest();
+ break;
+ case 198: // 'object'
+ try_JSONObjectTest();
+ break;
+ default:
+ try_JSONArrayTest();
+ }
+ }
+
+ function parse_StructuredItemTest()
+ {
+ eventHandler.startNonterminal("StructuredItemTest", e0);
+ shift(247); // 'structured-item'
+ lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ }
+ eventHandler.endNonterminal("StructuredItemTest", e0);
+ }
+
+ function try_StructuredItemTest()
+ {
+ shiftT(247); // 'structured-item'
+ lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+ }
+
+ function parse_JSONItemTest()
+ {
+ eventHandler.startNonterminal("JSONItemTest", e0);
+ shift(169); // 'json-item'
+ lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ }
+ eventHandler.endNonterminal("JSONItemTest", e0);
+ }
+
+ function try_JSONItemTest()
+ {
+ shiftT(169); // 'json-item'
+ lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+ }
+
+ function parse_JSONObjectTest()
+ {
+ eventHandler.startNonterminal("JSONObjectTest", e0);
+ shift(198); // 'object'
+ lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ }
+ eventHandler.endNonterminal("JSONObjectTest", e0);
+ }
+
+ function try_JSONObjectTest()
+ {
+ shiftT(198); // 'object'
+ lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+ }
+
+ function parse_JSONArrayTest()
+ {
+ eventHandler.startNonterminal("JSONArrayTest", e0);
+ shift(79); // 'array'
+ lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ }
+ eventHandler.endNonterminal("JSONArrayTest", e0);
+ }
+
+ function try_JSONArrayTest()
+ {
+ shiftT(79); // 'array'
+ lookahead1W(233); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+ }
+
+ function parse_AtomicOrUnionType()
+ {
+ eventHandler.startNonterminal("AtomicOrUnionType", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("AtomicOrUnionType", e0);
+ }
+
+ function try_AtomicOrUnionType()
+ {
+ try_EQName();
+ }
+
+ function parse_KindTest()
+ {
+ eventHandler.startNonterminal("KindTest", e0);
+ switch (l1)
+ {
+ case 121: // 'document-node'
+ parse_DocumentTest();
+ break;
+ case 122: // 'element'
+ parse_ElementTest();
+ break;
+ case 83: // 'attribute'
+ parse_AttributeTest();
+ break;
+ case 231: // 'schema-element'
+ parse_SchemaElementTest();
+ break;
+ case 230: // 'schema-attribute'
+ parse_SchemaAttributeTest();
+ break;
+ case 220: // 'processing-instruction'
+ parse_PITest();
+ break;
+ case 97: // 'comment'
+ parse_CommentTest();
+ break;
+ case 249: // 'text'
+ parse_TextTest();
+ break;
+ case 188: // 'namespace-node'
+ parse_NamespaceNodeTest();
+ break;
+ default:
+ parse_AnyKindTest();
+ }
+ eventHandler.endNonterminal("KindTest", e0);
+ }
+
+ function try_KindTest()
+ {
+ switch (l1)
+ {
+ case 121: // 'document-node'
+ try_DocumentTest();
+ break;
+ case 122: // 'element'
+ try_ElementTest();
+ break;
+ case 83: // 'attribute'
+ try_AttributeTest();
+ break;
+ case 231: // 'schema-element'
+ try_SchemaElementTest();
+ break;
+ case 230: // 'schema-attribute'
+ try_SchemaAttributeTest();
+ break;
+ case 220: // 'processing-instruction'
+ try_PITest();
+ break;
+ case 97: // 'comment'
+ try_CommentTest();
+ break;
+ case 249: // 'text'
+ try_TextTest();
+ break;
+ case 188: // 'namespace-node'
+ try_NamespaceNodeTest();
+ break;
+ default:
+ try_AnyKindTest();
+ }
+ }
+
+ function parse_AnyKindTest()
+ {
+ eventHandler.startNonterminal("AnyKindTest", e0);
+ shift(194); // 'node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("AnyKindTest", e0);
+ }
+
+ function try_AnyKindTest()
+ {
+ shiftT(194); // 'node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_DocumentTest()
+ {
+ eventHandler.startNonterminal("DocumentTest", e0);
+ shift(121); // 'document-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(154); // S^WS | '(:' | ')' | 'element' | 'schema-element'
+ if (l1 != 38) // ')'
+ {
+ switch (l1)
+ {
+ case 122: // 'element'
+ whitespace();
+ parse_ElementTest();
+ break;
+ default:
+ whitespace();
+ parse_SchemaElementTest();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("DocumentTest", e0);
+ }
+
+ function try_DocumentTest()
+ {
+ shiftT(121); // 'document-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(154); // S^WS | '(:' | ')' | 'element' | 'schema-element'
+ if (l1 != 38) // ')'
+ {
+ switch (l1)
+ {
+ case 122: // 'element'
+ try_ElementTest();
+ break;
+ default:
+ try_SchemaElementTest();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_TextTest()
+ {
+ eventHandler.startNonterminal("TextTest", e0);
+ shift(249); // 'text'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("TextTest", e0);
+ }
+
+ function try_TextTest()
+ {
+ shiftT(249); // 'text'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_CommentTest()
+ {
+ eventHandler.startNonterminal("CommentTest", e0);
+ shift(97); // 'comment'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("CommentTest", e0);
+ }
+
+ function try_CommentTest()
+ {
+ shiftT(97); // 'comment'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_NamespaceNodeTest()
+ {
+ eventHandler.startNonterminal("NamespaceNodeTest", e0);
+ shift(188); // 'namespace-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("NamespaceNodeTest", e0);
+ }
+
+ function try_NamespaceNodeTest()
+ {
+ shiftT(188); // 'namespace-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_PITest()
+ {
+ eventHandler.startNonterminal("PITest", e0);
+ shift(220); // 'processing-instruction'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(244); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' |
+ if (l1 != 38) // ')'
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ default:
+ whitespace();
+ parse_NCName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("PITest", e0);
+ }
+
+ function try_PITest()
+ {
+ shiftT(220); // 'processing-instruction'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(244); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' |
+ if (l1 != 38) // ')'
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ default:
+ try_NCName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_AttributeTest()
+ {
+ eventHandler.startNonterminal("AttributeTest", e0);
+ shift(83); // 'attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 38) // ')'
+ {
+ whitespace();
+ parse_AttribNameOrWildcard();
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 == 42) // ','
+ {
+ shift(42); // ','
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_TypeName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("AttributeTest", e0);
+ }
+
+ function try_AttributeTest()
+ {
+ shiftT(83); // 'attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 38) // ')'
+ {
+ try_AttribNameOrWildcard();
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 == 42) // ','
+ {
+ shiftT(42); // ','
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_TypeName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_AttribNameOrWildcard()
+ {
+ eventHandler.startNonterminal("AttribNameOrWildcard", e0);
+ switch (l1)
+ {
+ case 39: // '*'
+ shift(39); // '*'
+ break;
+ default:
+ parse_AttributeName();
+ }
+ eventHandler.endNonterminal("AttribNameOrWildcard", e0);
+ }
+
+ function try_AttribNameOrWildcard()
+ {
+ switch (l1)
+ {
+ case 39: // '*'
+ shiftT(39); // '*'
+ break;
+ default:
+ try_AttributeName();
+ }
+ }
+
+ function parse_SchemaAttributeTest()
+ {
+ eventHandler.startNonterminal("SchemaAttributeTest", e0);
+ shift(230); // 'schema-attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_AttributeDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("SchemaAttributeTest", e0);
+ }
+
+ function try_SchemaAttributeTest()
+ {
+ shiftT(230); // 'schema-attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_AttributeDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_AttributeDeclaration()
+ {
+ eventHandler.startNonterminal("AttributeDeclaration", e0);
+ parse_AttributeName();
+ eventHandler.endNonterminal("AttributeDeclaration", e0);
+ }
+
+ function try_AttributeDeclaration()
+ {
+ try_AttributeName();
+ }
+
+ function parse_ElementTest()
+ {
+ eventHandler.startNonterminal("ElementTest", e0);
+ shift(122); // 'element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 38) // ')'
+ {
+ whitespace();
+ parse_ElementNameOrWildcard();
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 == 42) // ','
+ {
+ shift(42); // ','
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_TypeName();
+ lookahead1W(106); // S^WS | '(:' | ')' | '?'
+ if (l1 == 65) // '?'
+ {
+ shift(65); // '?'
+ }
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("ElementTest", e0);
+ }
+
+ function try_ElementTest()
+ {
+ shiftT(122); // 'element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 38) // ')'
+ {
+ try_ElementNameOrWildcard();
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 == 42) // ','
+ {
+ shiftT(42); // ','
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_TypeName();
+ lookahead1W(106); // S^WS | '(:' | ')' | '?'
+ if (l1 == 65) // '?'
+ {
+ shiftT(65); // '?'
+ }
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_ElementNameOrWildcard()
+ {
+ eventHandler.startNonterminal("ElementNameOrWildcard", e0);
+ switch (l1)
+ {
+ case 39: // '*'
+ shift(39); // '*'
+ break;
+ default:
+ parse_ElementName();
+ }
+ eventHandler.endNonterminal("ElementNameOrWildcard", e0);
+ }
+
+ function try_ElementNameOrWildcard()
+ {
+ switch (l1)
+ {
+ case 39: // '*'
+ shiftT(39); // '*'
+ break;
+ default:
+ try_ElementName();
+ }
+ }
+
+ function parse_SchemaElementTest()
+ {
+ eventHandler.startNonterminal("SchemaElementTest", e0);
+ shift(231); // 'schema-element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_ElementDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("SchemaElementTest", e0);
+ }
+
+ function try_SchemaElementTest()
+ {
+ shiftT(231); // 'schema-element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_ElementDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_ElementDeclaration()
+ {
+ eventHandler.startNonterminal("ElementDeclaration", e0);
+ parse_ElementName();
+ eventHandler.endNonterminal("ElementDeclaration", e0);
+ }
+
+ function try_ElementDeclaration()
+ {
+ try_ElementName();
+ }
+
+ function parse_AttributeName()
+ {
+ eventHandler.startNonterminal("AttributeName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("AttributeName", e0);
+ }
+
+ function try_AttributeName()
+ {
+ try_EQName();
+ }
+
+ function parse_ElementName()
+ {
+ eventHandler.startNonterminal("ElementName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("ElementName", e0);
+ }
+
+ function try_ElementName()
+ {
+ try_EQName();
+ }
+
+ function parse_SimpleTypeName()
+ {
+ eventHandler.startNonterminal("SimpleTypeName", e0);
+ parse_TypeName();
+ eventHandler.endNonterminal("SimpleTypeName", e0);
+ }
+
+ function try_SimpleTypeName()
+ {
+ try_TypeName();
+ }
+
+ function parse_TypeName()
+ {
+ eventHandler.startNonterminal("TypeName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("TypeName", e0);
+ }
+
+ function try_TypeName()
+ {
+ try_EQName();
+ }
+
+ function parse_FunctionTest()
+ {
+ eventHandler.startNonterminal("FunctionTest", e0);
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 33) // '%'
+ {
+ break;
+ }
+ whitespace();
+ parse_Annotation();
+ }
+ switch (l1)
+ {
+ case 147: // 'function'
+ lookahead2W(22); // S^WS | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ lk = memoized(7, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_AnyFunctionTest();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(7, e0, lk);
+ }
+ switch (lk)
+ {
+ case -1:
+ whitespace();
+ parse_AnyFunctionTest();
+ break;
+ default:
+ whitespace();
+ parse_TypedFunctionTest();
+ }
+ eventHandler.endNonterminal("FunctionTest", e0);
+ }
+
+ function try_FunctionTest()
+ {
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 33) // '%'
+ {
+ break;
+ }
+ try_Annotation();
+ }
+ switch (l1)
+ {
+ case 147: // 'function'
+ lookahead2W(22); // S^WS | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ lk = memoized(7, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_AnyFunctionTest();
+ memoize(7, e0A, -1);
+ lk = -3;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(7, e0A, -2);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ try_AnyFunctionTest();
+ break;
+ case -3:
+ break;
+ default:
+ try_TypedFunctionTest();
+ }
+ }
+
+ function parse_AnyFunctionTest()
+ {
+ eventHandler.startNonterminal("AnyFunctionTest", e0);
+ shift(147); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(24); // S^WS | '(:' | '*'
+ shift(39); // '*'
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("AnyFunctionTest", e0);
+ }
+
+ function try_AnyFunctionTest()
+ {
+ shiftT(147); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(24); // S^WS | '(:' | '*'
+ shiftT(39); // '*'
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_TypedFunctionTest()
+ {
+ eventHandler.startNonterminal("TypedFunctionTest", e0);
+ shift(147); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ if (l1 != 38) // ')'
+ {
+ whitespace();
+ parse_SequenceType();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ }
+ shift(38); // ')'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shift(80); // 'as'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ eventHandler.endNonterminal("TypedFunctionTest", e0);
+ }
+
+ function try_TypedFunctionTest()
+ {
+ shiftT(147); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ if (l1 != 38) // ')'
+ {
+ try_SequenceType();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ }
+ shiftT(38); // ')'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shiftT(80); // 'as'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+
+ function parse_ParenthesizedItemType()
+ {
+ eventHandler.startNonterminal("ParenthesizedItemType", e0);
+ shift(35); // '('
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_ItemType();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("ParenthesizedItemType", e0);
+ }
+
+ function try_ParenthesizedItemType()
+ {
+ shiftT(35); // '('
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_ItemType();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_RevalidationDecl()
+ {
+ eventHandler.startNonterminal("RevalidationDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(75); // S^WS | '(:' | 'revalidation'
+ shift(226); // 'revalidation'
+ lookahead1W(162); // S^WS | '(:' | 'lax' | 'skip' | 'strict'
+ switch (l1)
+ {
+ case 245: // 'strict'
+ shift(245); // 'strict'
+ break;
+ case 174: // 'lax'
+ shift(174); // 'lax'
+ break;
+ default:
+ shift(238); // 'skip'
+ }
+ eventHandler.endNonterminal("RevalidationDecl", e0);
+ }
+
+ function parse_InsertExprTargetChoice()
+ {
+ eventHandler.startNonterminal("InsertExprTargetChoice", e0);
+ switch (l1)
+ {
+ case 71: // 'after'
+ shift(71); // 'after'
+ break;
+ case 85: // 'before'
+ shift(85); // 'before'
+ break;
+ default:
+ if (l1 == 80) // 'as'
+ {
+ shift(80); // 'as'
+ lookahead1W(123); // S^WS | '(:' | 'first' | 'last'
+ switch (l1)
+ {
+ case 136: // 'first'
+ shift(136); // 'first'
+ break;
+ default:
+ shift(173); // 'last'
+ }
+ }
+ lookahead1W(57); // S^WS | '(:' | 'into'
+ shift(165); // 'into'
+ }
+ eventHandler.endNonterminal("InsertExprTargetChoice", e0);
+ }
+
+ function try_InsertExprTargetChoice()
+ {
+ switch (l1)
+ {
+ case 71: // 'after'
+ shiftT(71); // 'after'
+ break;
+ case 85: // 'before'
+ shiftT(85); // 'before'
+ break;
+ default:
+ if (l1 == 80) // 'as'
+ {
+ shiftT(80); // 'as'
+ lookahead1W(123); // S^WS | '(:' | 'first' | 'last'
+ switch (l1)
+ {
+ case 136: // 'first'
+ shiftT(136); // 'first'
+ break;
+ default:
+ shiftT(173); // 'last'
+ }
+ }
+ lookahead1W(57); // S^WS | '(:' | 'into'
+ shiftT(165); // 'into'
+ }
+ }
+
+ function parse_InsertExpr()
+ {
+ eventHandler.startNonterminal("InsertExpr", e0);
+ shift(161); // 'insert'
+ lookahead1W(133); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 194: // 'node'
+ shift(194); // 'node'
+ break;
+ default:
+ shift(195); // 'nodes'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_SourceExpr();
+ whitespace();
+ parse_InsertExprTargetChoice();
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_TargetExpr();
+ eventHandler.endNonterminal("InsertExpr", e0);
+ }
+
+ function try_InsertExpr()
+ {
+ shiftT(161); // 'insert'
+ lookahead1W(133); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 194: // 'node'
+ shiftT(194); // 'node'
+ break;
+ default:
+ shiftT(195); // 'nodes'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_SourceExpr();
+ try_InsertExprTargetChoice();
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_TargetExpr();
+ }
+
+ function parse_DeleteExpr()
+ {
+ eventHandler.startNonterminal("DeleteExpr", e0);
+ shift(111); // 'delete'
+ lookahead1W(133); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 194: // 'node'
+ shift(194); // 'node'
+ break;
+ default:
+ shift(195); // 'nodes'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_TargetExpr();
+ eventHandler.endNonterminal("DeleteExpr", e0);
+ }
+
+ function try_DeleteExpr()
+ {
+ shiftT(111); // 'delete'
+ lookahead1W(133); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 194: // 'node'
+ shiftT(194); // 'node'
+ break;
+ default:
+ shiftT(195); // 'nodes'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_TargetExpr();
+ }
+
+ function parse_ReplaceExpr()
+ {
+ eventHandler.startNonterminal("ReplaceExpr", e0);
+ shift(223); // 'replace'
+ lookahead1W(134); // S^WS | '(:' | 'node' | 'value'
+ if (l1 == 267) // 'value'
+ {
+ shift(267); // 'value'
+ lookahead1W(67); // S^WS | '(:' | 'of'
+ shift(200); // 'of'
+ }
+ lookahead1W(65); // S^WS | '(:' | 'node'
+ shift(194); // 'node'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_TargetExpr();
+ shift(276); // 'with'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ReplaceExpr", e0);
+ }
+
+ function try_ReplaceExpr()
+ {
+ shiftT(223); // 'replace'
+ lookahead1W(134); // S^WS | '(:' | 'node' | 'value'
+ if (l1 == 267) // 'value'
+ {
+ shiftT(267); // 'value'
+ lookahead1W(67); // S^WS | '(:' | 'of'
+ shiftT(200); // 'of'
+ }
+ lookahead1W(65); // S^WS | '(:' | 'node'
+ shiftT(194); // 'node'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_TargetExpr();
+ shiftT(276); // 'with'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_RenameExpr()
+ {
+ eventHandler.startNonterminal("RenameExpr", e0);
+ shift(222); // 'rename'
+ lookahead1W(65); // S^WS | '(:' | 'node'
+ shift(194); // 'node'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_TargetExpr();
+ shift(80); // 'as'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_NewNameExpr();
+ eventHandler.endNonterminal("RenameExpr", e0);
+ }
+
+ function try_RenameExpr()
+ {
+ shiftT(222); // 'rename'
+ lookahead1W(65); // S^WS | '(:' | 'node'
+ shiftT(194); // 'node'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_TargetExpr();
+ shiftT(80); // 'as'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_NewNameExpr();
+ }
+
+ function parse_SourceExpr()
+ {
+ eventHandler.startNonterminal("SourceExpr", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SourceExpr", e0);
+ }
+
+ function try_SourceExpr()
+ {
+ try_ExprSingle();
+ }
+
+ function parse_TargetExpr()
+ {
+ eventHandler.startNonterminal("TargetExpr", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TargetExpr", e0);
+ }
+
+ function try_TargetExpr()
+ {
+ try_ExprSingle();
+ }
+
+ function parse_NewNameExpr()
+ {
+ eventHandler.startNonterminal("NewNameExpr", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("NewNameExpr", e0);
+ }
+
+ function try_NewNameExpr()
+ {
+ try_ExprSingle();
+ }
+
+ function parse_TransformExpr()
+ {
+ eventHandler.startNonterminal("TransformExpr", e0);
+ shift(104); // 'copy'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_TransformSpec();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_TransformSpec();
+ }
+ shift(184); // 'modify'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(224); // 'return'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TransformExpr", e0);
+ }
+
+ function try_TransformExpr()
+ {
+ shiftT(104); // 'copy'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_TransformSpec();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_TransformSpec();
+ }
+ shiftT(184); // 'modify'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(224); // 'return'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_TransformSpec()
+ {
+ eventHandler.startNonterminal("TransformSpec", e0);
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shift(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TransformSpec", e0);
+ }
+
+ function try_TransformSpec()
+ {
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shiftT(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_FTSelection()
+ {
+ eventHandler.startNonterminal("FTSelection", e0);
+ parse_FTOr();
+ for (;;)
+ {
+ lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(161); // S^WS | '(:' | 'end' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 116 // 'different'
+ && lk != 118 // 'distance'
+ && lk != 128 // 'entire'
+ && lk != 206 // 'ordered'
+ && lk != 227 // 'same'
+ && lk != 275 // 'window'
+ && lk != 65106 // 'at' 'end'
+ && lk != 123986) // 'at' 'start'
+ {
+ break;
+ }
+ whitespace();
+ parse_FTPosFilter();
+ }
+ eventHandler.endNonterminal("FTSelection", e0);
+ }
+
+ function try_FTSelection()
+ {
+ try_FTOr();
+ for (;;)
+ {
+ lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(161); // S^WS | '(:' | 'end' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 116 // 'different'
+ && lk != 118 // 'distance'
+ && lk != 128 // 'entire'
+ && lk != 206 // 'ordered'
+ && lk != 227 // 'same'
+ && lk != 275 // 'window'
+ && lk != 65106 // 'at' 'end'
+ && lk != 123986) // 'at' 'start'
+ {
+ break;
+ }
+ try_FTPosFilter();
+ }
+ }
+
+ function parse_FTWeight()
+ {
+ eventHandler.startNonterminal("FTWeight", e0);
+ shift(270); // 'weight'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("FTWeight", e0);
+ }
+
+ function try_FTWeight()
+ {
+ shiftT(270); // 'weight'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+
+ function parse_FTOr()
+ {
+ eventHandler.startNonterminal("FTOr", e0);
+ parse_FTAnd();
+ for (;;)
+ {
+ if (l1 != 146) // 'ftor'
+ {
+ break;
+ }
+ shift(146); // 'ftor'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTAnd();
+ }
+ eventHandler.endNonterminal("FTOr", e0);
+ }
+
+ function try_FTOr()
+ {
+ try_FTAnd();
+ for (;;)
+ {
+ if (l1 != 146) // 'ftor'
+ {
+ break;
+ }
+ shiftT(146); // 'ftor'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTAnd();
+ }
+ }
+
+ function parse_FTAnd()
+ {
+ eventHandler.startNonterminal("FTAnd", e0);
+ parse_FTMildNot();
+ for (;;)
+ {
+ if (l1 != 144) // 'ftand'
+ {
+ break;
+ }
+ shift(144); // 'ftand'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTMildNot();
+ }
+ eventHandler.endNonterminal("FTAnd", e0);
+ }
+
+ function try_FTAnd()
+ {
+ try_FTMildNot();
+ for (;;)
+ {
+ if (l1 != 144) // 'ftand'
+ {
+ break;
+ }
+ shiftT(144); // 'ftand'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTMildNot();
+ }
+ }
+
+ function parse_FTMildNot()
+ {
+ eventHandler.startNonterminal("FTMildNot", e0);
+ parse_FTUnaryNot();
+ for (;;)
+ {
+ lookahead1W(213); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 196) // 'not'
+ {
+ break;
+ }
+ shift(196); // 'not'
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shift(156); // 'in'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTUnaryNot();
+ }
+ eventHandler.endNonterminal("FTMildNot", e0);
+ }
+
+ function try_FTMildNot()
+ {
+ try_FTUnaryNot();
+ for (;;)
+ {
+ lookahead1W(213); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 196) // 'not'
+ {
+ break;
+ }
+ shiftT(196); // 'not'
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shiftT(156); // 'in'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTUnaryNot();
+ }
+ }
+
+ function parse_FTUnaryNot()
+ {
+ eventHandler.startNonterminal("FTUnaryNot", e0);
+ if (l1 == 145) // 'ftnot'
+ {
+ shift(145); // 'ftnot'
+ }
+ lookahead1W(164); // StringLiteral | S^WS | '(' | '(#' | '(:' | '{'
+ whitespace();
+ parse_FTPrimaryWithOptions();
+ eventHandler.endNonterminal("FTUnaryNot", e0);
+ }
+
+ function try_FTUnaryNot()
+ {
+ if (l1 == 145) // 'ftnot'
+ {
+ shiftT(145); // 'ftnot'
+ }
+ lookahead1W(164); // StringLiteral | S^WS | '(' | '(#' | '(:' | '{'
+ try_FTPrimaryWithOptions();
+ }
+
+ function parse_FTPrimaryWithOptions()
+ {
+ eventHandler.startNonterminal("FTPrimaryWithOptions", e0);
+ parse_FTPrimary();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 265) // 'using'
+ {
+ whitespace();
+ parse_FTMatchOptions();
+ }
+ if (l1 == 270) // 'weight'
+ {
+ whitespace();
+ parse_FTWeight();
+ }
+ eventHandler.endNonterminal("FTPrimaryWithOptions", e0);
+ }
+
+ function try_FTPrimaryWithOptions()
+ {
+ try_FTPrimary();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 265) // 'using'
+ {
+ try_FTMatchOptions();
+ }
+ if (l1 == 270) // 'weight'
+ {
+ try_FTWeight();
+ }
+ }
+
+ function parse_FTPrimary()
+ {
+ eventHandler.startNonterminal("FTPrimary", e0);
+ switch (l1)
+ {
+ case 35: // '('
+ shift(35); // '('
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTSelection();
+ shift(38); // ')'
+ break;
+ case 36: // '(#'
+ parse_FTExtensionSelection();
+ break;
+ default:
+ parse_FTWords();
+ lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 199) // 'occurs'
+ {
+ whitespace();
+ parse_FTTimes();
+ }
+ }
+ eventHandler.endNonterminal("FTPrimary", e0);
+ }
+
+ function try_FTPrimary()
+ {
+ switch (l1)
+ {
+ case 35: // '('
+ shiftT(35); // '('
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTSelection();
+ shiftT(38); // ')'
+ break;
+ case 36: // '(#'
+ try_FTExtensionSelection();
+ break;
+ default:
+ try_FTWords();
+ lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 199) // 'occurs'
+ {
+ try_FTTimes();
+ }
+ }
+ }
+
+ function parse_FTWords()
+ {
+ eventHandler.startNonterminal("FTWords", e0);
+ parse_FTWordsValue();
+ lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 72 // 'all'
+ || l1 == 77 // 'any'
+ || l1 == 214) // 'phrase'
+ {
+ whitespace();
+ parse_FTAnyallOption();
+ }
+ eventHandler.endNonterminal("FTWords", e0);
+ }
+
+ function try_FTWords()
+ {
+ try_FTWordsValue();
+ lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 72 // 'all'
+ || l1 == 77 // 'any'
+ || l1 == 214) // 'phrase'
+ {
+ try_FTAnyallOption();
+ }
+ }
+
+ function parse_FTWordsValue()
+ {
+ eventHandler.startNonterminal("FTWordsValue", e0);
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ default:
+ shift(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ }
+ eventHandler.endNonterminal("FTWordsValue", e0);
+ }
+
+ function try_FTWordsValue()
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ default:
+ shiftT(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+ }
+
+ function parse_FTExtensionSelection()
+ {
+ eventHandler.startNonterminal("FTExtensionSelection", e0);
+ for (;;)
+ {
+ whitespace();
+ parse_Pragma();
+ lookahead1W(104); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 36) // '(#'
+ {
+ break;
+ }
+ }
+ shift(281); // '{'
+ lookahead1W(184); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' | '}'
+ if (l1 != 287) // '}'
+ {
+ whitespace();
+ parse_FTSelection();
+ }
+ shift(287); // '}'
+ eventHandler.endNonterminal("FTExtensionSelection", e0);
+ }
+
+ function try_FTExtensionSelection()
+ {
+ for (;;)
+ {
+ try_Pragma();
+ lookahead1W(104); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 36) // '(#'
+ {
+ break;
+ }
+ }
+ shiftT(281); // '{'
+ lookahead1W(184); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' | '}'
+ if (l1 != 287) // '}'
+ {
+ try_FTSelection();
+ }
+ shiftT(287); // '}'
+ }
+
+ function parse_FTAnyallOption()
+ {
+ eventHandler.startNonterminal("FTAnyallOption", e0);
+ switch (l1)
+ {
+ case 77: // 'any'
+ shift(77); // 'any'
+ lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 278) // 'word'
+ {
+ shift(278); // 'word'
+ }
+ break;
+ case 72: // 'all'
+ shift(72); // 'all'
+ lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 279) // 'words'
+ {
+ shift(279); // 'words'
+ }
+ break;
+ default:
+ shift(214); // 'phrase'
+ }
+ eventHandler.endNonterminal("FTAnyallOption", e0);
+ }
+
+ function try_FTAnyallOption()
+ {
+ switch (l1)
+ {
+ case 77: // 'any'
+ shiftT(77); // 'any'
+ lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 278) // 'word'
+ {
+ shiftT(278); // 'word'
+ }
+ break;
+ case 72: // 'all'
+ shiftT(72); // 'all'
+ lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 279) // 'words'
+ {
+ shiftT(279); // 'words'
+ }
+ break;
+ default:
+ shiftT(214); // 'phrase'
+ }
+ }
+
+ function parse_FTTimes()
+ {
+ eventHandler.startNonterminal("FTTimes", e0);
+ shift(199); // 'occurs'
+ lookahead1W(159); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ whitespace();
+ parse_FTRange();
+ shift(252); // 'times'
+ eventHandler.endNonterminal("FTTimes", e0);
+ }
+
+ function try_FTTimes()
+ {
+ shiftT(199); // 'occurs'
+ lookahead1W(159); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ try_FTRange();
+ shiftT(252); // 'times'
+ }
+
+ function parse_FTRange()
+ {
+ eventHandler.startNonterminal("FTRange", e0);
+ switch (l1)
+ {
+ case 131: // 'exactly'
+ shift(131); // 'exactly'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ break;
+ case 82: // 'at'
+ shift(82); // 'at'
+ lookahead1W(129); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 176: // 'least'
+ shift(176); // 'least'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ break;
+ default:
+ shift(186); // 'most'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ }
+ break;
+ default:
+ shift(142); // 'from'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ shift(253); // 'to'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ }
+ eventHandler.endNonterminal("FTRange", e0);
+ }
+
+ function try_FTRange()
+ {
+ switch (l1)
+ {
+ case 131: // 'exactly'
+ shiftT(131); // 'exactly'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ break;
+ case 82: // 'at'
+ shiftT(82); // 'at'
+ lookahead1W(129); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 176: // 'least'
+ shiftT(176); // 'least'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ break;
+ default:
+ shiftT(186); // 'most'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ }
+ break;
+ default:
+ shiftT(142); // 'from'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ shiftT(253); // 'to'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ }
+ }
+
+ function parse_FTPosFilter()
+ {
+ eventHandler.startNonterminal("FTPosFilter", e0);
+ switch (l1)
+ {
+ case 206: // 'ordered'
+ parse_FTOrder();
+ break;
+ case 275: // 'window'
+ parse_FTWindow();
+ break;
+ case 118: // 'distance'
+ parse_FTDistance();
+ break;
+ case 116: // 'different'
+ case 227: // 'same'
+ parse_FTScope();
+ break;
+ default:
+ parse_FTContent();
+ }
+ eventHandler.endNonterminal("FTPosFilter", e0);
+ }
+
+ function try_FTPosFilter()
+ {
+ switch (l1)
+ {
+ case 206: // 'ordered'
+ try_FTOrder();
+ break;
+ case 275: // 'window'
+ try_FTWindow();
+ break;
+ case 118: // 'distance'
+ try_FTDistance();
+ break;
+ case 116: // 'different'
+ case 227: // 'same'
+ try_FTScope();
+ break;
+ default:
+ try_FTContent();
+ }
+ }
+
+ function parse_FTOrder()
+ {
+ eventHandler.startNonterminal("FTOrder", e0);
+ shift(206); // 'ordered'
+ eventHandler.endNonterminal("FTOrder", e0);
+ }
+
+ function try_FTOrder()
+ {
+ shiftT(206); // 'ordered'
+ }
+
+ function parse_FTWindow()
+ {
+ eventHandler.startNonterminal("FTWindow", e0);
+ shift(275); // 'window'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ whitespace();
+ parse_FTUnit();
+ eventHandler.endNonterminal("FTWindow", e0);
+ }
+
+ function try_FTWindow()
+ {
+ shiftT(275); // 'window'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ try_FTUnit();
+ }
+
+ function parse_FTDistance()
+ {
+ eventHandler.startNonterminal("FTDistance", e0);
+ shift(118); // 'distance'
+ lookahead1W(159); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ whitespace();
+ parse_FTRange();
+ whitespace();
+ parse_FTUnit();
+ eventHandler.endNonterminal("FTDistance", e0);
+ }
+
+ function try_FTDistance()
+ {
+ shiftT(118); // 'distance'
+ lookahead1W(159); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ try_FTRange();
+ try_FTUnit();
+ }
+
+ function parse_FTUnit()
+ {
+ eventHandler.startNonterminal("FTUnit", e0);
+ switch (l1)
+ {
+ case 279: // 'words'
+ shift(279); // 'words'
+ break;
+ case 237: // 'sentences'
+ shift(237); // 'sentences'
+ break;
+ default:
+ shift(209); // 'paragraphs'
+ }
+ eventHandler.endNonterminal("FTUnit", e0);
+ }
+
+ function try_FTUnit()
+ {
+ switch (l1)
+ {
+ case 279: // 'words'
+ shiftT(279); // 'words'
+ break;
+ case 237: // 'sentences'
+ shiftT(237); // 'sentences'
+ break;
+ default:
+ shiftT(209); // 'paragraphs'
+ }
+ }
+
+ function parse_FTScope()
+ {
+ eventHandler.startNonterminal("FTScope", e0);
+ switch (l1)
+ {
+ case 227: // 'same'
+ shift(227); // 'same'
+ break;
+ default:
+ shift(116); // 'different'
+ }
+ lookahead1W(136); // S^WS | '(:' | 'paragraph' | 'sentence'
+ whitespace();
+ parse_FTBigUnit();
+ eventHandler.endNonterminal("FTScope", e0);
+ }
+
+ function try_FTScope()
+ {
+ switch (l1)
+ {
+ case 227: // 'same'
+ shiftT(227); // 'same'
+ break;
+ default:
+ shiftT(116); // 'different'
+ }
+ lookahead1W(136); // S^WS | '(:' | 'paragraph' | 'sentence'
+ try_FTBigUnit();
+ }
+
+ function parse_FTBigUnit()
+ {
+ eventHandler.startNonterminal("FTBigUnit", e0);
+ switch (l1)
+ {
+ case 236: // 'sentence'
+ shift(236); // 'sentence'
+ break;
+ default:
+ shift(208); // 'paragraph'
+ }
+ eventHandler.endNonterminal("FTBigUnit", e0);
+ }
+
+ function try_FTBigUnit()
+ {
+ switch (l1)
+ {
+ case 236: // 'sentence'
+ shiftT(236); // 'sentence'
+ break;
+ default:
+ shiftT(208); // 'paragraph'
+ }
+ }
+
+ function parse_FTContent()
+ {
+ eventHandler.startNonterminal("FTContent", e0);
+ switch (l1)
+ {
+ case 82: // 'at'
+ shift(82); // 'at'
+ lookahead1W(121); // S^WS | '(:' | 'end' | 'start'
+ switch (l1)
+ {
+ case 242: // 'start'
+ shift(242); // 'start'
+ break;
+ default:
+ shift(127); // 'end'
+ }
+ break;
+ default:
+ shift(128); // 'entire'
+ lookahead1W(45); // S^WS | '(:' | 'content'
+ shift(101); // 'content'
+ }
+ eventHandler.endNonterminal("FTContent", e0);
+ }
+
+ function try_FTContent()
+ {
+ switch (l1)
+ {
+ case 82: // 'at'
+ shiftT(82); // 'at'
+ lookahead1W(121); // S^WS | '(:' | 'end' | 'start'
+ switch (l1)
+ {
+ case 242: // 'start'
+ shiftT(242); // 'start'
+ break;
+ default:
+ shiftT(127); // 'end'
+ }
+ break;
+ default:
+ shiftT(128); // 'entire'
+ lookahead1W(45); // S^WS | '(:' | 'content'
+ shiftT(101); // 'content'
+ }
+ }
+
+ function parse_FTMatchOptions()
+ {
+ eventHandler.startNonterminal("FTMatchOptions", e0);
+ for (;;)
+ {
+ shift(265); // 'using'
+ lookahead1W(205); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' |
+ whitespace();
+ parse_FTMatchOption();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 265) // 'using'
+ {
+ break;
+ }
+ }
+ eventHandler.endNonterminal("FTMatchOptions", e0);
+ }
+
+ function try_FTMatchOptions()
+ {
+ for (;;)
+ {
+ shiftT(265); // 'using'
+ lookahead1W(205); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' |
+ try_FTMatchOption();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 265) // 'using'
+ {
+ break;
+ }
+ }
+ }
+
+ function parse_FTMatchOption()
+ {
+ eventHandler.startNonterminal("FTMatchOption", e0);
+ switch (l1)
+ {
+ case 191: // 'no'
+ lookahead2W(176); // S^WS | '(:' | 'stemming' | 'stop' | 'thesaurus' | 'wildcards'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 172: // 'language'
+ parse_FTLanguageOption();
+ break;
+ case 274: // 'wildcards'
+ case 140479: // 'no' 'wildcards'
+ parse_FTWildCardOption();
+ break;
+ case 251: // 'thesaurus'
+ case 128703: // 'no' 'thesaurus'
+ parse_FTThesaurusOption();
+ break;
+ case 243: // 'stemming'
+ case 124607: // 'no' 'stemming'
+ parse_FTStemOption();
+ break;
+ case 115: // 'diacritics'
+ parse_FTDiacriticsOption();
+ break;
+ case 244: // 'stop'
+ case 125119: // 'no' 'stop'
+ parse_FTStopWordOption();
+ break;
+ case 203: // 'option'
+ parse_FTExtensionOption();
+ break;
+ default:
+ parse_FTCaseOption();
+ }
+ eventHandler.endNonterminal("FTMatchOption", e0);
+ }
+
+ function try_FTMatchOption()
+ {
+ switch (l1)
+ {
+ case 191: // 'no'
+ lookahead2W(176); // S^WS | '(:' | 'stemming' | 'stop' | 'thesaurus' | 'wildcards'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 172: // 'language'
+ try_FTLanguageOption();
+ break;
+ case 274: // 'wildcards'
+ case 140479: // 'no' 'wildcards'
+ try_FTWildCardOption();
+ break;
+ case 251: // 'thesaurus'
+ case 128703: // 'no' 'thesaurus'
+ try_FTThesaurusOption();
+ break;
+ case 243: // 'stemming'
+ case 124607: // 'no' 'stemming'
+ try_FTStemOption();
+ break;
+ case 115: // 'diacritics'
+ try_FTDiacriticsOption();
+ break;
+ case 244: // 'stop'
+ case 125119: // 'no' 'stop'
+ try_FTStopWordOption();
+ break;
+ case 203: // 'option'
+ try_FTExtensionOption();
+ break;
+ default:
+ try_FTCaseOption();
+ }
+ }
+
+ function parse_FTCaseOption()
+ {
+ eventHandler.startNonterminal("FTCaseOption", e0);
+ switch (l1)
+ {
+ case 89: // 'case'
+ shift(89); // 'case'
+ lookahead1W(128); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 160: // 'insensitive'
+ shift(160); // 'insensitive'
+ break;
+ default:
+ shift(235); // 'sensitive'
+ }
+ break;
+ case 180: // 'lowercase'
+ shift(180); // 'lowercase'
+ break;
+ default:
+ shift(264); // 'uppercase'
+ }
+ eventHandler.endNonterminal("FTCaseOption", e0);
+ }
+
+ function try_FTCaseOption()
+ {
+ switch (l1)
+ {
+ case 89: // 'case'
+ shiftT(89); // 'case'
+ lookahead1W(128); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 160: // 'insensitive'
+ shiftT(160); // 'insensitive'
+ break;
+ default:
+ shiftT(235); // 'sensitive'
+ }
+ break;
+ case 180: // 'lowercase'
+ shiftT(180); // 'lowercase'
+ break;
+ default:
+ shiftT(264); // 'uppercase'
+ }
+ }
+
+ function parse_FTDiacriticsOption()
+ {
+ eventHandler.startNonterminal("FTDiacriticsOption", e0);
+ shift(115); // 'diacritics'
+ lookahead1W(128); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 160: // 'insensitive'
+ shift(160); // 'insensitive'
+ break;
+ default:
+ shift(235); // 'sensitive'
+ }
+ eventHandler.endNonterminal("FTDiacriticsOption", e0);
+ }
+
+ function try_FTDiacriticsOption()
+ {
+ shiftT(115); // 'diacritics'
+ lookahead1W(128); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 160: // 'insensitive'
+ shiftT(160); // 'insensitive'
+ break;
+ default:
+ shiftT(235); // 'sensitive'
+ }
+ }
+
+ function parse_FTStemOption()
+ {
+ eventHandler.startNonterminal("FTStemOption", e0);
+ switch (l1)
+ {
+ case 243: // 'stemming'
+ shift(243); // 'stemming'
+ break;
+ default:
+ shift(191); // 'no'
+ lookahead1W(77); // S^WS | '(:' | 'stemming'
+ shift(243); // 'stemming'
+ }
+ eventHandler.endNonterminal("FTStemOption", e0);
+ }
+
+ function try_FTStemOption()
+ {
+ switch (l1)
+ {
+ case 243: // 'stemming'
+ shiftT(243); // 'stemming'
+ break;
+ default:
+ shiftT(191); // 'no'
+ lookahead1W(77); // S^WS | '(:' | 'stemming'
+ shiftT(243); // 'stemming'
+ }
+ }
+
+ function parse_FTThesaurusOption()
+ {
+ eventHandler.startNonterminal("FTThesaurusOption", e0);
+ switch (l1)
+ {
+ case 251: // 'thesaurus'
+ shift(251); // 'thesaurus'
+ lookahead1W(152); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 82: // 'at'
+ whitespace();
+ parse_FTThesaurusID();
+ break;
+ case 110: // 'default'
+ shift(110); // 'default'
+ break;
+ default:
+ shift(35); // '('
+ lookahead1W(116); // S^WS | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 82: // 'at'
+ whitespace();
+ parse_FTThesaurusID();
+ break;
+ default:
+ shift(110); // 'default'
+ }
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(34); // S^WS | '(:' | 'at'
+ whitespace();
+ parse_FTThesaurusID();
+ }
+ shift(38); // ')'
+ }
+ break;
+ default:
+ shift(191); // 'no'
+ lookahead1W(81); // S^WS | '(:' | 'thesaurus'
+ shift(251); // 'thesaurus'
+ }
+ eventHandler.endNonterminal("FTThesaurusOption", e0);
+ }
+
+ function try_FTThesaurusOption()
+ {
+ switch (l1)
+ {
+ case 251: // 'thesaurus'
+ shiftT(251); // 'thesaurus'
+ lookahead1W(152); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 82: // 'at'
+ try_FTThesaurusID();
+ break;
+ case 110: // 'default'
+ shiftT(110); // 'default'
+ break;
+ default:
+ shiftT(35); // '('
+ lookahead1W(116); // S^WS | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 82: // 'at'
+ try_FTThesaurusID();
+ break;
+ default:
+ shiftT(110); // 'default'
+ }
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(34); // S^WS | '(:' | 'at'
+ try_FTThesaurusID();
+ }
+ shiftT(38); // ')'
+ }
+ break;
+ default:
+ shiftT(191); // 'no'
+ lookahead1W(81); // S^WS | '(:' | 'thesaurus'
+ shiftT(251); // 'thesaurus'
+ }
+ }
+
+ function parse_FTThesaurusID()
+ {
+ eventHandler.startNonterminal("FTThesaurusID", e0);
+ shift(82); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 221) // 'relationship'
+ {
+ shift(221); // 'relationship'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(183); // S^WS | '(:' | 'end' | 'least' | 'most' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 131 // 'exactly'
+ || lk == 142 // 'from'
+ || lk == 90194 // 'at' 'least'
+ || lk == 95314) // 'at' 'most'
+ {
+ whitespace();
+ parse_FTLiteralRange();
+ lookahead1W(61); // S^WS | '(:' | 'levels'
+ shift(178); // 'levels'
+ }
+ eventHandler.endNonterminal("FTThesaurusID", e0);
+ }
+
+ function try_FTThesaurusID()
+ {
+ shiftT(82); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 221) // 'relationship'
+ {
+ shiftT(221); // 'relationship'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+ lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(183); // S^WS | '(:' | 'end' | 'least' | 'most' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 131 // 'exactly'
+ || lk == 142 // 'from'
+ || lk == 90194 // 'at' 'least'
+ || lk == 95314) // 'at' 'most'
+ {
+ try_FTLiteralRange();
+ lookahead1W(61); // S^WS | '(:' | 'levels'
+ shiftT(178); // 'levels'
+ }
+ }
+
+ function parse_FTLiteralRange()
+ {
+ eventHandler.startNonterminal("FTLiteralRange", e0);
+ switch (l1)
+ {
+ case 131: // 'exactly'
+ shift(131); // 'exactly'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ break;
+ case 82: // 'at'
+ shift(82); // 'at'
+ lookahead1W(129); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 176: // 'least'
+ shift(176); // 'least'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ break;
+ default:
+ shift(186); // 'most'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ }
+ break;
+ default:
+ shift(142); // 'from'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ lookahead1W(82); // S^WS | '(:' | 'to'
+ shift(253); // 'to'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ }
+ eventHandler.endNonterminal("FTLiteralRange", e0);
+ }
+
+ function try_FTLiteralRange()
+ {
+ switch (l1)
+ {
+ case 131: // 'exactly'
+ shiftT(131); // 'exactly'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ break;
+ case 82: // 'at'
+ shiftT(82); // 'at'
+ lookahead1W(129); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 176: // 'least'
+ shiftT(176); // 'least'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ break;
+ default:
+ shiftT(186); // 'most'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ }
+ break;
+ default:
+ shiftT(142); // 'from'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ lookahead1W(82); // S^WS | '(:' | 'to'
+ shiftT(253); // 'to'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ }
+ }
+
+ function parse_FTStopWordOption()
+ {
+ eventHandler.startNonterminal("FTStopWordOption", e0);
+ switch (l1)
+ {
+ case 244: // 'stop'
+ shift(244); // 'stop'
+ lookahead1W(89); // S^WS | '(:' | 'words'
+ shift(279); // 'words'
+ lookahead1W(152); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 110: // 'default'
+ shift(110); // 'default'
+ for (;;)
+ {
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 132 // 'except'
+ && l1 != 260) // 'union'
+ {
+ break;
+ }
+ whitespace();
+ parse_FTStopWordsInclExcl();
+ }
+ break;
+ default:
+ whitespace();
+ parse_FTStopWords();
+ for (;;)
+ {
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 132 // 'except'
+ && l1 != 260) // 'union'
+ {
+ break;
+ }
+ whitespace();
+ parse_FTStopWordsInclExcl();
+ }
+ }
+ break;
+ default:
+ shift(191); // 'no'
+ lookahead1W(78); // S^WS | '(:' | 'stop'
+ shift(244); // 'stop'
+ lookahead1W(89); // S^WS | '(:' | 'words'
+ shift(279); // 'words'
+ }
+ eventHandler.endNonterminal("FTStopWordOption", e0);
+ }
+
+ function try_FTStopWordOption()
+ {
+ switch (l1)
+ {
+ case 244: // 'stop'
+ shiftT(244); // 'stop'
+ lookahead1W(89); // S^WS | '(:' | 'words'
+ shiftT(279); // 'words'
+ lookahead1W(152); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 110: // 'default'
+ shiftT(110); // 'default'
+ for (;;)
+ {
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 132 // 'except'
+ && l1 != 260) // 'union'
+ {
+ break;
+ }
+ try_FTStopWordsInclExcl();
+ }
+ break;
+ default:
+ try_FTStopWords();
+ for (;;)
+ {
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 132 // 'except'
+ && l1 != 260) // 'union'
+ {
+ break;
+ }
+ try_FTStopWordsInclExcl();
+ }
+ }
+ break;
+ default:
+ shiftT(191); // 'no'
+ lookahead1W(78); // S^WS | '(:' | 'stop'
+ shiftT(244); // 'stop'
+ lookahead1W(89); // S^WS | '(:' | 'words'
+ shiftT(279); // 'words'
+ }
+ }
+
+ function parse_FTStopWords()
+ {
+ eventHandler.startNonterminal("FTStopWords", e0);
+ switch (l1)
+ {
+ case 82: // 'at'
+ shift(82); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ break;
+ default:
+ shift(35); // '('
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ shift(38); // ')'
+ }
+ eventHandler.endNonterminal("FTStopWords", e0);
+ }
+
+ function try_FTStopWords()
+ {
+ switch (l1)
+ {
+ case 82: // 'at'
+ shiftT(82); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ break;
+ default:
+ shiftT(35); // '('
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+ shiftT(38); // ')'
+ }
+ }
+
+ function parse_FTStopWordsInclExcl()
+ {
+ eventHandler.startNonterminal("FTStopWordsInclExcl", e0);
+ switch (l1)
+ {
+ case 260: // 'union'
+ shift(260); // 'union'
+ break;
+ default:
+ shift(132); // 'except'
+ }
+ lookahead1W(103); // S^WS | '(' | '(:' | 'at'
+ whitespace();
+ parse_FTStopWords();
+ eventHandler.endNonterminal("FTStopWordsInclExcl", e0);
+ }
+
+ function try_FTStopWordsInclExcl()
+ {
+ switch (l1)
+ {
+ case 260: // 'union'
+ shiftT(260); // 'union'
+ break;
+ default:
+ shiftT(132); // 'except'
+ }
+ lookahead1W(103); // S^WS | '(' | '(:' | 'at'
+ try_FTStopWords();
+ }
+
+ function parse_FTLanguageOption()
+ {
+ eventHandler.startNonterminal("FTLanguageOption", e0);
+ shift(172); // 'language'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ eventHandler.endNonterminal("FTLanguageOption", e0);
+ }
+
+ function try_FTLanguageOption()
+ {
+ shiftT(172); // 'language'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+
+ function parse_FTWildCardOption()
+ {
+ eventHandler.startNonterminal("FTWildCardOption", e0);
+ switch (l1)
+ {
+ case 274: // 'wildcards'
+ shift(274); // 'wildcards'
+ break;
+ default:
+ shift(191); // 'no'
+ lookahead1W(87); // S^WS | '(:' | 'wildcards'
+ shift(274); // 'wildcards'
+ }
+ eventHandler.endNonterminal("FTWildCardOption", e0);
+ }
+
+ function try_FTWildCardOption()
+ {
+ switch (l1)
+ {
+ case 274: // 'wildcards'
+ shiftT(274); // 'wildcards'
+ break;
+ default:
+ shiftT(191); // 'no'
+ lookahead1W(87); // S^WS | '(:' | 'wildcards'
+ shiftT(274); // 'wildcards'
+ }
+ }
+
+ function parse_FTExtensionOption()
+ {
+ eventHandler.startNonterminal("FTExtensionOption", e0);
+ shift(203); // 'option'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ eventHandler.endNonterminal("FTExtensionOption", e0);
+ }
+
+ function try_FTExtensionOption()
+ {
+ shiftT(203); // 'option'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_EQName();
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+
+ function parse_FTIgnoreOption()
+ {
+ eventHandler.startNonterminal("FTIgnoreOption", e0);
+ shift(277); // 'without'
+ lookahead1W(45); // S^WS | '(:' | 'content'
+ shift(101); // 'content'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_UnionExpr();
+ eventHandler.endNonterminal("FTIgnoreOption", e0);
+ }
+
+ function try_FTIgnoreOption()
+ {
+ shiftT(277); // 'without'
+ lookahead1W(45); // S^WS | '(:' | 'content'
+ shiftT(101); // 'content'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_UnionExpr();
+ }
+
+ function parse_CollectionDecl()
+ {
+ eventHandler.startNonterminal("CollectionDecl", e0);
+ shift(96); // 'collection'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(111); // S^WS | '(:' | ';' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_CollectionTypeDecl();
+ }
+ eventHandler.endNonterminal("CollectionDecl", e0);
+ }
+
+ function parse_CollectionTypeDecl()
+ {
+ eventHandler.startNonterminal("CollectionTypeDecl", e0);
+ shift(80); // 'as'
+ lookahead1W(200); // S^WS | '(:' | 'attribute' | 'comment' | 'document-node' | 'element' |
+ whitespace();
+ parse_KindTest();
+ lookahead1W(171); // S^WS | '(:' | '*' | '+' | ';' | '?'
+ if (l1 != 54) // ';'
+ {
+ whitespace();
+ parse_OccurrenceIndicator();
+ }
+ eventHandler.endNonterminal("CollectionTypeDecl", e0);
+ }
+
+ function parse_IndexName()
+ {
+ eventHandler.startNonterminal("IndexName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("IndexName", e0);
+ }
+
+ function parse_IndexDomainExpr()
+ {
+ eventHandler.startNonterminal("IndexDomainExpr", e0);
+ parse_PathExpr();
+ eventHandler.endNonterminal("IndexDomainExpr", e0);
+ }
+
+ function parse_IndexKeySpec()
+ {
+ eventHandler.startNonterminal("IndexKeySpec", e0);
+ parse_IndexKeyExpr();
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_IndexKeyTypeDecl();
+ }
+ lookahead1W(156); // S^WS | '(:' | ',' | ';' | 'collation'
+ if (l1 == 95) // 'collation'
+ {
+ whitespace();
+ parse_IndexKeyCollation();
+ }
+ eventHandler.endNonterminal("IndexKeySpec", e0);
+ }
+
+ function parse_IndexKeyExpr()
+ {
+ eventHandler.startNonterminal("IndexKeyExpr", e0);
+ parse_PathExpr();
+ eventHandler.endNonterminal("IndexKeyExpr", e0);
+ }
+
+ function parse_IndexKeyTypeDecl()
+ {
+ eventHandler.startNonterminal("IndexKeyTypeDecl", e0);
+ shift(80); // 'as'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_AtomicType();
+ lookahead1W(189); // S^WS | '(:' | '*' | '+' | ',' | ';' | '?' | 'collation'
+ if (l1 == 40 // '*'
+ || l1 == 41 // '+'
+ || l1 == 65) // '?'
+ {
+ whitespace();
+ parse_OccurrenceIndicator();
+ }
+ eventHandler.endNonterminal("IndexKeyTypeDecl", e0);
+ }
+
+ function parse_AtomicType()
+ {
+ eventHandler.startNonterminal("AtomicType", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("AtomicType", e0);
+ }
+
+ function parse_IndexKeyCollation()
+ {
+ eventHandler.startNonterminal("IndexKeyCollation", e0);
+ shift(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("IndexKeyCollation", e0);
+ }
+
+ function parse_IndexDecl()
+ {
+ eventHandler.startNonterminal("IndexDecl", e0);
+ shift(157); // 'index'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_IndexName();
+ lookahead1W(68); // S^WS | '(:' | 'on'
+ shift(201); // 'on'
+ lookahead1W(66); // S^WS | '(:' | 'nodes'
+ shift(195); // 'nodes'
+ lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_IndexDomainExpr();
+ shift(88); // 'by'
+ lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_IndexKeySpec();
+ for (;;)
+ {
+ lookahead1W(107); // S^WS | '(:' | ',' | ';'
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_IndexKeySpec();
+ }
+ eventHandler.endNonterminal("IndexDecl", e0);
+ }
+
+ function parse_ICDecl()
+ {
+ eventHandler.startNonterminal("ICDecl", e0);
+ shift(163); // 'integrity'
+ lookahead1W(43); // S^WS | '(:' | 'constraint'
+ shift(98); // 'constraint'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(124); // S^WS | '(:' | 'foreign' | 'on'
+ switch (l1)
+ {
+ case 201: // 'on'
+ whitespace();
+ parse_ICCollection();
+ break;
+ default:
+ whitespace();
+ parse_ICForeignKey();
+ }
+ eventHandler.endNonterminal("ICDecl", e0);
+ }
+
+ function parse_ICCollection()
+ {
+ eventHandler.startNonterminal("ICCollection", e0);
+ shift(201); // 'on'
+ lookahead1W(42); // S^WS | '(:' | 'collection'
+ shift(96); // 'collection'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(150); // S^WS | '$' | '(:' | 'foreach' | 'node'
+ switch (l1)
+ {
+ case 31: // '$'
+ whitespace();
+ parse_ICCollSequence();
+ break;
+ case 194: // 'node'
+ whitespace();
+ parse_ICCollSequenceUnique();
+ break;
+ default:
+ whitespace();
+ parse_ICCollNode();
+ }
+ eventHandler.endNonterminal("ICCollection", e0);
+ }
+
+ function parse_ICCollSequence()
+ {
+ eventHandler.startNonterminal("ICCollSequence", e0);
+ parse_VarRef();
+ lookahead1W(40); // S^WS | '(:' | 'check'
+ shift(93); // 'check'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ICCollSequence", e0);
+ }
+
+ function parse_ICCollSequenceUnique()
+ {
+ eventHandler.startNonterminal("ICCollSequenceUnique", e0);
+ shift(194); // 'node'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_VarRef();
+ lookahead1W(40); // S^WS | '(:' | 'check'
+ shift(93); // 'check'
+ lookahead1W(83); // S^WS | '(:' | 'unique'
+ shift(261); // 'unique'
+ lookahead1W(60); // S^WS | '(:' | 'key'
+ shift(171); // 'key'
+ lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PathExpr();
+ eventHandler.endNonterminal("ICCollSequenceUnique", e0);
+ }
+
+ function parse_ICCollNode()
+ {
+ eventHandler.startNonterminal("ICCollNode", e0);
+ shift(140); // 'foreach'
+ lookahead1W(65); // S^WS | '(:' | 'node'
+ shift(194); // 'node'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_VarRef();
+ lookahead1W(40); // S^WS | '(:' | 'check'
+ shift(93); // 'check'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ICCollNode", e0);
+ }
+
+ function parse_ICForeignKey()
+ {
+ eventHandler.startNonterminal("ICForeignKey", e0);
+ shift(141); // 'foreign'
+ lookahead1W(60); // S^WS | '(:' | 'key'
+ shift(171); // 'key'
+ lookahead1W(54); // S^WS | '(:' | 'from'
+ whitespace();
+ parse_ICForeignKeySource();
+ whitespace();
+ parse_ICForeignKeyTarget();
+ eventHandler.endNonterminal("ICForeignKey", e0);
+ }
+
+ function parse_ICForeignKeySource()
+ {
+ eventHandler.startNonterminal("ICForeignKeySource", e0);
+ shift(142); // 'from'
+ lookahead1W(42); // S^WS | '(:' | 'collection'
+ whitespace();
+ parse_ICForeignKeyValues();
+ eventHandler.endNonterminal("ICForeignKeySource", e0);
+ }
+
+ function parse_ICForeignKeyTarget()
+ {
+ eventHandler.startNonterminal("ICForeignKeyTarget", e0);
+ shift(253); // 'to'
+ lookahead1W(42); // S^WS | '(:' | 'collection'
+ whitespace();
+ parse_ICForeignKeyValues();
+ eventHandler.endNonterminal("ICForeignKeyTarget", e0);
+ }
+
+ function parse_ICForeignKeyValues()
+ {
+ eventHandler.startNonterminal("ICForeignKeyValues", e0);
+ shift(96); // 'collection'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(65); // S^WS | '(:' | 'node'
+ shift(194); // 'node'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_VarRef();
+ lookahead1W(60); // S^WS | '(:' | 'key'
+ shift(171); // 'key'
+ lookahead1W(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PathExpr();
+ eventHandler.endNonterminal("ICForeignKeyValues", e0);
+ }
+
+ function try_Comment()
+ {
+ shiftT(37); // '(:'
+ for (;;)
+ {
+ lookahead1(92); // CommentContents | '(:' | ':)'
+ if (l1 == 51) // ':)'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 24: // CommentContents
+ shiftT(24); // CommentContents
+ break;
+ default:
+ try_Comment();
+ }
+ }
+ shiftT(51); // ':)'
+ }
+
+ function try_Whitespace()
+ {
+ switch (l1)
+ {
+ case 22: // S^WS
+ shiftT(22); // S^WS
+ break;
+ default:
+ try_Comment();
+ }
+ }
+
+ function parse_EQName()
+ {
+ eventHandler.startNonterminal("EQName", e0);
+ lookahead1(241); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ shift(83); // 'attribute'
+ break;
+ case 97: // 'comment'
+ shift(97); // 'comment'
+ break;
+ case 121: // 'document-node'
+ shift(121); // 'document-node'
+ break;
+ case 122: // 'element'
+ shift(122); // 'element'
+ break;
+ case 125: // 'empty-sequence'
+ shift(125); // 'empty-sequence'
+ break;
+ case 147: // 'function'
+ shift(147); // 'function'
+ break;
+ case 154: // 'if'
+ shift(154); // 'if'
+ break;
+ case 167: // 'item'
+ shift(167); // 'item'
+ break;
+ case 188: // 'namespace-node'
+ shift(188); // 'namespace-node'
+ break;
+ case 194: // 'node'
+ shift(194); // 'node'
+ break;
+ case 220: // 'processing-instruction'
+ shift(220); // 'processing-instruction'
+ break;
+ case 230: // 'schema-attribute'
+ shift(230); // 'schema-attribute'
+ break;
+ case 231: // 'schema-element'
+ shift(231); // 'schema-element'
+ break;
+ case 248: // 'switch'
+ shift(248); // 'switch'
+ break;
+ case 249: // 'text'
+ shift(249); // 'text'
+ break;
+ case 259: // 'typeswitch'
+ shift(259); // 'typeswitch'
+ break;
+ case 79: // 'array'
+ shift(79); // 'array'
+ break;
+ case 169: // 'json-item'
+ shift(169); // 'json-item'
+ break;
+ case 247: // 'structured-item'
+ shift(247); // 'structured-item'
+ break;
+ default:
+ parse_FunctionName();
+ }
+ eventHandler.endNonterminal("EQName", e0);
+ }
+
+ function try_EQName()
+ {
+ lookahead1(241); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ shiftT(83); // 'attribute'
+ break;
+ case 97: // 'comment'
+ shiftT(97); // 'comment'
+ break;
+ case 121: // 'document-node'
+ shiftT(121); // 'document-node'
+ break;
+ case 122: // 'element'
+ shiftT(122); // 'element'
+ break;
+ case 125: // 'empty-sequence'
+ shiftT(125); // 'empty-sequence'
+ break;
+ case 147: // 'function'
+ shiftT(147); // 'function'
+ break;
+ case 154: // 'if'
+ shiftT(154); // 'if'
+ break;
+ case 167: // 'item'
+ shiftT(167); // 'item'
+ break;
+ case 188: // 'namespace-node'
+ shiftT(188); // 'namespace-node'
+ break;
+ case 194: // 'node'
+ shiftT(194); // 'node'
+ break;
+ case 220: // 'processing-instruction'
+ shiftT(220); // 'processing-instruction'
+ break;
+ case 230: // 'schema-attribute'
+ shiftT(230); // 'schema-attribute'
+ break;
+ case 231: // 'schema-element'
+ shiftT(231); // 'schema-element'
+ break;
+ case 248: // 'switch'
+ shiftT(248); // 'switch'
+ break;
+ case 249: // 'text'
+ shiftT(249); // 'text'
+ break;
+ case 259: // 'typeswitch'
+ shiftT(259); // 'typeswitch'
+ break;
+ case 79: // 'array'
+ shiftT(79); // 'array'
+ break;
+ case 169: // 'json-item'
+ shiftT(169); // 'json-item'
+ break;
+ case 247: // 'structured-item'
+ shiftT(247); // 'structured-item'
+ break;
+ default:
+ try_FunctionName();
+ }
+ }
+
+ function parse_FunctionName()
+ {
+ eventHandler.startNonterminal("FunctionName", e0);
+ switch (l1)
+ {
+ case 6: // EQName^Token
+ shift(6); // EQName^Token
+ break;
+ case 71: // 'after'
+ shift(71); // 'after'
+ break;
+ case 74: // 'ancestor'
+ shift(74); // 'ancestor'
+ break;
+ case 75: // 'ancestor-or-self'
+ shift(75); // 'ancestor-or-self'
+ break;
+ case 76: // 'and'
+ shift(76); // 'and'
+ break;
+ case 80: // 'as'
+ shift(80); // 'as'
+ break;
+ case 81: // 'ascending'
+ shift(81); // 'ascending'
+ break;
+ case 85: // 'before'
+ shift(85); // 'before'
+ break;
+ case 89: // 'case'
+ shift(89); // 'case'
+ break;
+ case 90: // 'cast'
+ shift(90); // 'cast'
+ break;
+ case 91: // 'castable'
+ shift(91); // 'castable'
+ break;
+ case 94: // 'child'
+ shift(94); // 'child'
+ break;
+ case 95: // 'collation'
+ shift(95); // 'collation'
+ break;
+ case 104: // 'copy'
+ shift(104); // 'copy'
+ break;
+ case 106: // 'count'
+ shift(106); // 'count'
+ break;
+ case 109: // 'declare'
+ shift(109); // 'declare'
+ break;
+ case 110: // 'default'
+ shift(110); // 'default'
+ break;
+ case 111: // 'delete'
+ shift(111); // 'delete'
+ break;
+ case 112: // 'descendant'
+ shift(112); // 'descendant'
+ break;
+ case 113: // 'descendant-or-self'
+ shift(113); // 'descendant-or-self'
+ break;
+ case 114: // 'descending'
+ shift(114); // 'descending'
+ break;
+ case 119: // 'div'
+ shift(119); // 'div'
+ break;
+ case 120: // 'document'
+ shift(120); // 'document'
+ break;
+ case 123: // 'else'
+ shift(123); // 'else'
+ break;
+ case 124: // 'empty'
+ shift(124); // 'empty'
+ break;
+ case 127: // 'end'
+ shift(127); // 'end'
+ break;
+ case 129: // 'eq'
+ shift(129); // 'eq'
+ break;
+ case 130: // 'every'
+ shift(130); // 'every'
+ break;
+ case 132: // 'except'
+ shift(132); // 'except'
+ break;
+ case 136: // 'first'
+ shift(136); // 'first'
+ break;
+ case 137: // 'following'
+ shift(137); // 'following'
+ break;
+ case 138: // 'following-sibling'
+ shift(138); // 'following-sibling'
+ break;
+ case 139: // 'for'
+ shift(139); // 'for'
+ break;
+ case 148: // 'ge'
+ shift(148); // 'ge'
+ break;
+ case 150: // 'group'
+ shift(150); // 'group'
+ break;
+ case 152: // 'gt'
+ shift(152); // 'gt'
+ break;
+ case 153: // 'idiv'
+ shift(153); // 'idiv'
+ break;
+ case 155: // 'import'
+ shift(155); // 'import'
+ break;
+ case 161: // 'insert'
+ shift(161); // 'insert'
+ break;
+ case 162: // 'instance'
+ shift(162); // 'instance'
+ break;
+ case 164: // 'intersect'
+ shift(164); // 'intersect'
+ break;
+ case 165: // 'into'
+ shift(165); // 'into'
+ break;
+ case 166: // 'is'
+ shift(166); // 'is'
+ break;
+ case 173: // 'last'
+ shift(173); // 'last'
+ break;
+ case 175: // 'le'
+ shift(175); // 'le'
+ break;
+ case 177: // 'let'
+ shift(177); // 'let'
+ break;
+ case 181: // 'lt'
+ shift(181); // 'lt'
+ break;
+ case 183: // 'mod'
+ shift(183); // 'mod'
+ break;
+ case 184: // 'modify'
+ shift(184); // 'modify'
+ break;
+ case 185: // 'module'
+ shift(185); // 'module'
+ break;
+ case 187: // 'namespace'
+ shift(187); // 'namespace'
+ break;
+ case 189: // 'ne'
+ shift(189); // 'ne'
+ break;
+ case 202: // 'only'
+ shift(202); // 'only'
+ break;
+ case 204: // 'or'
+ shift(204); // 'or'
+ break;
+ case 205: // 'order'
+ shift(205); // 'order'
+ break;
+ case 206: // 'ordered'
+ shift(206); // 'ordered'
+ break;
+ case 210: // 'parent'
+ shift(210); // 'parent'
+ break;
+ case 216: // 'preceding'
+ shift(216); // 'preceding'
+ break;
+ case 217: // 'preceding-sibling'
+ shift(217); // 'preceding-sibling'
+ break;
+ case 222: // 'rename'
+ shift(222); // 'rename'
+ break;
+ case 223: // 'replace'
+ shift(223); // 'replace'
+ break;
+ case 224: // 'return'
+ shift(224); // 'return'
+ break;
+ case 228: // 'satisfies'
+ shift(228); // 'satisfies'
+ break;
+ case 234: // 'self'
+ shift(234); // 'self'
+ break;
+ case 240: // 'some'
+ shift(240); // 'some'
+ break;
+ case 241: // 'stable'
+ shift(241); // 'stable'
+ break;
+ case 242: // 'start'
+ shift(242); // 'start'
+ break;
+ case 253: // 'to'
+ shift(253); // 'to'
+ break;
+ case 254: // 'treat'
+ shift(254); // 'treat'
+ break;
+ case 256: // 'try'
+ shift(256); // 'try'
+ break;
+ case 260: // 'union'
+ shift(260); // 'union'
+ break;
+ case 262: // 'unordered'
+ shift(262); // 'unordered'
+ break;
+ case 266: // 'validate'
+ shift(266); // 'validate'
+ break;
+ case 272: // 'where'
+ shift(272); // 'where'
+ break;
+ case 276: // 'with'
+ shift(276); // 'with'
+ break;
+ case 170: // 'jsoniq'
+ shift(170); // 'jsoniq'
+ break;
+ case 73: // 'allowing'
+ shift(73); // 'allowing'
+ break;
+ case 82: // 'at'
+ shift(82); // 'at'
+ break;
+ case 84: // 'base-uri'
+ shift(84); // 'base-uri'
+ break;
+ case 86: // 'boundary-space'
+ shift(86); // 'boundary-space'
+ break;
+ case 87: // 'break'
+ shift(87); // 'break'
+ break;
+ case 92: // 'catch'
+ shift(92); // 'catch'
+ break;
+ case 99: // 'construction'
+ shift(99); // 'construction'
+ break;
+ case 102: // 'context'
+ shift(102); // 'context'
+ break;
+ case 103: // 'continue'
+ shift(103); // 'continue'
+ break;
+ case 105: // 'copy-namespaces'
+ shift(105); // 'copy-namespaces'
+ break;
+ case 107: // 'decimal-format'
+ shift(107); // 'decimal-format'
+ break;
+ case 126: // 'encoding'
+ shift(126); // 'encoding'
+ break;
+ case 133: // 'exit'
+ shift(133); // 'exit'
+ break;
+ case 134: // 'external'
+ shift(134); // 'external'
+ break;
+ case 143: // 'ft-option'
+ shift(143); // 'ft-option'
+ break;
+ case 156: // 'in'
+ shift(156); // 'in'
+ break;
+ case 157: // 'index'
+ shift(157); // 'index'
+ break;
+ case 163: // 'integrity'
+ shift(163); // 'integrity'
+ break;
+ case 174: // 'lax'
+ shift(174); // 'lax'
+ break;
+ case 195: // 'nodes'
+ shift(195); // 'nodes'
+ break;
+ case 203: // 'option'
+ shift(203); // 'option'
+ break;
+ case 207: // 'ordering'
+ shift(207); // 'ordering'
+ break;
+ case 226: // 'revalidation'
+ shift(226); // 'revalidation'
+ break;
+ case 229: // 'schema'
+ shift(229); // 'schema'
+ break;
+ case 232: // 'score'
+ shift(232); // 'score'
+ break;
+ case 239: // 'sliding'
+ shift(239); // 'sliding'
+ break;
+ case 245: // 'strict'
+ shift(245); // 'strict'
+ break;
+ case 257: // 'tumbling'
+ shift(257); // 'tumbling'
+ break;
+ case 258: // 'type'
+ shift(258); // 'type'
+ break;
+ case 263: // 'updating'
+ shift(263); // 'updating'
+ break;
+ case 267: // 'value'
+ shift(267); // 'value'
+ break;
+ case 268: // 'variable'
+ shift(268); // 'variable'
+ break;
+ case 269: // 'version'
+ shift(269); // 'version'
+ break;
+ case 273: // 'while'
+ shift(273); // 'while'
+ break;
+ case 98: // 'constraint'
+ shift(98); // 'constraint'
+ break;
+ case 179: // 'loop'
+ shift(179); // 'loop'
+ break;
+ case 225: // 'returning'
+ shift(225); // 'returning'
+ break;
+ case 78: // 'append'
+ shift(78); // 'append'
+ break;
+ case 135: // 'false'
+ shift(135); // 'false'
+ break;
+ case 142: // 'from'
+ shift(142); // 'from'
+ break;
+ case 197: // 'null'
+ shift(197); // 'null'
+ break;
+ case 168: // 'json'
+ shift(168); // 'json'
+ break;
+ case 198: // 'object'
+ shift(198); // 'object'
+ break;
+ case 233: // 'select'
+ shift(233); // 'select'
+ break;
+ default:
+ shift(255); // 'true'
+ }
+ eventHandler.endNonterminal("FunctionName", e0);
+ }
+
+ function try_FunctionName()
+ {
+ switch (l1)
+ {
+ case 6: // EQName^Token
+ shiftT(6); // EQName^Token
+ break;
+ case 71: // 'after'
+ shiftT(71); // 'after'
+ break;
+ case 74: // 'ancestor'
+ shiftT(74); // 'ancestor'
+ break;
+ case 75: // 'ancestor-or-self'
+ shiftT(75); // 'ancestor-or-self'
+ break;
+ case 76: // 'and'
+ shiftT(76); // 'and'
+ break;
+ case 80: // 'as'
+ shiftT(80); // 'as'
+ break;
+ case 81: // 'ascending'
+ shiftT(81); // 'ascending'
+ break;
+ case 85: // 'before'
+ shiftT(85); // 'before'
+ break;
+ case 89: // 'case'
+ shiftT(89); // 'case'
+ break;
+ case 90: // 'cast'
+ shiftT(90); // 'cast'
+ break;
+ case 91: // 'castable'
+ shiftT(91); // 'castable'
+ break;
+ case 94: // 'child'
+ shiftT(94); // 'child'
+ break;
+ case 95: // 'collation'
+ shiftT(95); // 'collation'
+ break;
+ case 104: // 'copy'
+ shiftT(104); // 'copy'
+ break;
+ case 106: // 'count'
+ shiftT(106); // 'count'
+ break;
+ case 109: // 'declare'
+ shiftT(109); // 'declare'
+ break;
+ case 110: // 'default'
+ shiftT(110); // 'default'
+ break;
+ case 111: // 'delete'
+ shiftT(111); // 'delete'
+ break;
+ case 112: // 'descendant'
+ shiftT(112); // 'descendant'
+ break;
+ case 113: // 'descendant-or-self'
+ shiftT(113); // 'descendant-or-self'
+ break;
+ case 114: // 'descending'
+ shiftT(114); // 'descending'
+ break;
+ case 119: // 'div'
+ shiftT(119); // 'div'
+ break;
+ case 120: // 'document'
+ shiftT(120); // 'document'
+ break;
+ case 123: // 'else'
+ shiftT(123); // 'else'
+ break;
+ case 124: // 'empty'
+ shiftT(124); // 'empty'
+ break;
+ case 127: // 'end'
+ shiftT(127); // 'end'
+ break;
+ case 129: // 'eq'
+ shiftT(129); // 'eq'
+ break;
+ case 130: // 'every'
+ shiftT(130); // 'every'
+ break;
+ case 132: // 'except'
+ shiftT(132); // 'except'
+ break;
+ case 136: // 'first'
+ shiftT(136); // 'first'
+ break;
+ case 137: // 'following'
+ shiftT(137); // 'following'
+ break;
+ case 138: // 'following-sibling'
+ shiftT(138); // 'following-sibling'
+ break;
+ case 139: // 'for'
+ shiftT(139); // 'for'
+ break;
+ case 148: // 'ge'
+ shiftT(148); // 'ge'
+ break;
+ case 150: // 'group'
+ shiftT(150); // 'group'
+ break;
+ case 152: // 'gt'
+ shiftT(152); // 'gt'
+ break;
+ case 153: // 'idiv'
+ shiftT(153); // 'idiv'
+ break;
+ case 155: // 'import'
+ shiftT(155); // 'import'
+ break;
+ case 161: // 'insert'
+ shiftT(161); // 'insert'
+ break;
+ case 162: // 'instance'
+ shiftT(162); // 'instance'
+ break;
+ case 164: // 'intersect'
+ shiftT(164); // 'intersect'
+ break;
+ case 165: // 'into'
+ shiftT(165); // 'into'
+ break;
+ case 166: // 'is'
+ shiftT(166); // 'is'
+ break;
+ case 173: // 'last'
+ shiftT(173); // 'last'
+ break;
+ case 175: // 'le'
+ shiftT(175); // 'le'
+ break;
+ case 177: // 'let'
+ shiftT(177); // 'let'
+ break;
+ case 181: // 'lt'
+ shiftT(181); // 'lt'
+ break;
+ case 183: // 'mod'
+ shiftT(183); // 'mod'
+ break;
+ case 184: // 'modify'
+ shiftT(184); // 'modify'
+ break;
+ case 185: // 'module'
+ shiftT(185); // 'module'
+ break;
+ case 187: // 'namespace'
+ shiftT(187); // 'namespace'
+ break;
+ case 189: // 'ne'
+ shiftT(189); // 'ne'
+ break;
+ case 202: // 'only'
+ shiftT(202); // 'only'
+ break;
+ case 204: // 'or'
+ shiftT(204); // 'or'
+ break;
+ case 205: // 'order'
+ shiftT(205); // 'order'
+ break;
+ case 206: // 'ordered'
+ shiftT(206); // 'ordered'
+ break;
+ case 210: // 'parent'
+ shiftT(210); // 'parent'
+ break;
+ case 216: // 'preceding'
+ shiftT(216); // 'preceding'
+ break;
+ case 217: // 'preceding-sibling'
+ shiftT(217); // 'preceding-sibling'
+ break;
+ case 222: // 'rename'
+ shiftT(222); // 'rename'
+ break;
+ case 223: // 'replace'
+ shiftT(223); // 'replace'
+ break;
+ case 224: // 'return'
+ shiftT(224); // 'return'
+ break;
+ case 228: // 'satisfies'
+ shiftT(228); // 'satisfies'
+ break;
+ case 234: // 'self'
+ shiftT(234); // 'self'
+ break;
+ case 240: // 'some'
+ shiftT(240); // 'some'
+ break;
+ case 241: // 'stable'
+ shiftT(241); // 'stable'
+ break;
+ case 242: // 'start'
+ shiftT(242); // 'start'
+ break;
+ case 253: // 'to'
+ shiftT(253); // 'to'
+ break;
+ case 254: // 'treat'
+ shiftT(254); // 'treat'
+ break;
+ case 256: // 'try'
+ shiftT(256); // 'try'
+ break;
+ case 260: // 'union'
+ shiftT(260); // 'union'
+ break;
+ case 262: // 'unordered'
+ shiftT(262); // 'unordered'
+ break;
+ case 266: // 'validate'
+ shiftT(266); // 'validate'
+ break;
+ case 272: // 'where'
+ shiftT(272); // 'where'
+ break;
+ case 276: // 'with'
+ shiftT(276); // 'with'
+ break;
+ case 170: // 'jsoniq'
+ shiftT(170); // 'jsoniq'
+ break;
+ case 73: // 'allowing'
+ shiftT(73); // 'allowing'
+ break;
+ case 82: // 'at'
+ shiftT(82); // 'at'
+ break;
+ case 84: // 'base-uri'
+ shiftT(84); // 'base-uri'
+ break;
+ case 86: // 'boundary-space'
+ shiftT(86); // 'boundary-space'
+ break;
+ case 87: // 'break'
+ shiftT(87); // 'break'
+ break;
+ case 92: // 'catch'
+ shiftT(92); // 'catch'
+ break;
+ case 99: // 'construction'
+ shiftT(99); // 'construction'
+ break;
+ case 102: // 'context'
+ shiftT(102); // 'context'
+ break;
+ case 103: // 'continue'
+ shiftT(103); // 'continue'
+ break;
+ case 105: // 'copy-namespaces'
+ shiftT(105); // 'copy-namespaces'
+ break;
+ case 107: // 'decimal-format'
+ shiftT(107); // 'decimal-format'
+ break;
+ case 126: // 'encoding'
+ shiftT(126); // 'encoding'
+ break;
+ case 133: // 'exit'
+ shiftT(133); // 'exit'
+ break;
+ case 134: // 'external'
+ shiftT(134); // 'external'
+ break;
+ case 143: // 'ft-option'
+ shiftT(143); // 'ft-option'
+ break;
+ case 156: // 'in'
+ shiftT(156); // 'in'
+ break;
+ case 157: // 'index'
+ shiftT(157); // 'index'
+ break;
+ case 163: // 'integrity'
+ shiftT(163); // 'integrity'
+ break;
+ case 174: // 'lax'
+ shiftT(174); // 'lax'
+ break;
+ case 195: // 'nodes'
+ shiftT(195); // 'nodes'
+ break;
+ case 203: // 'option'
+ shiftT(203); // 'option'
+ break;
+ case 207: // 'ordering'
+ shiftT(207); // 'ordering'
+ break;
+ case 226: // 'revalidation'
+ shiftT(226); // 'revalidation'
+ break;
+ case 229: // 'schema'
+ shiftT(229); // 'schema'
+ break;
+ case 232: // 'score'
+ shiftT(232); // 'score'
+ break;
+ case 239: // 'sliding'
+ shiftT(239); // 'sliding'
+ break;
+ case 245: // 'strict'
+ shiftT(245); // 'strict'
+ break;
+ case 257: // 'tumbling'
+ shiftT(257); // 'tumbling'
+ break;
+ case 258: // 'type'
+ shiftT(258); // 'type'
+ break;
+ case 263: // 'updating'
+ shiftT(263); // 'updating'
+ break;
+ case 267: // 'value'
+ shiftT(267); // 'value'
+ break;
+ case 268: // 'variable'
+ shiftT(268); // 'variable'
+ break;
+ case 269: // 'version'
+ shiftT(269); // 'version'
+ break;
+ case 273: // 'while'
+ shiftT(273); // 'while'
+ break;
+ case 98: // 'constraint'
+ shiftT(98); // 'constraint'
+ break;
+ case 179: // 'loop'
+ shiftT(179); // 'loop'
+ break;
+ case 225: // 'returning'
+ shiftT(225); // 'returning'
+ break;
+ case 78: // 'append'
+ shiftT(78); // 'append'
+ break;
+ case 135: // 'false'
+ shiftT(135); // 'false'
+ break;
+ case 142: // 'from'
+ shiftT(142); // 'from'
+ break;
+ case 197: // 'null'
+ shiftT(197); // 'null'
+ break;
+ case 168: // 'json'
+ shiftT(168); // 'json'
+ break;
+ case 198: // 'object'
+ shiftT(198); // 'object'
+ break;
+ case 233: // 'select'
+ shiftT(233); // 'select'
+ break;
+ default:
+ shiftT(255); // 'true'
+ }
+ }
+
+ function parse_NCName()
+ {
+ eventHandler.startNonterminal("NCName", e0);
+ switch (l1)
+ {
+ case 19: // NCName^Token
+ shift(19); // NCName^Token
+ break;
+ case 71: // 'after'
+ shift(71); // 'after'
+ break;
+ case 76: // 'and'
+ shift(76); // 'and'
+ break;
+ case 80: // 'as'
+ shift(80); // 'as'
+ break;
+ case 81: // 'ascending'
+ shift(81); // 'ascending'
+ break;
+ case 85: // 'before'
+ shift(85); // 'before'
+ break;
+ case 89: // 'case'
+ shift(89); // 'case'
+ break;
+ case 90: // 'cast'
+ shift(90); // 'cast'
+ break;
+ case 91: // 'castable'
+ shift(91); // 'castable'
+ break;
+ case 95: // 'collation'
+ shift(95); // 'collation'
+ break;
+ case 106: // 'count'
+ shift(106); // 'count'
+ break;
+ case 110: // 'default'
+ shift(110); // 'default'
+ break;
+ case 114: // 'descending'
+ shift(114); // 'descending'
+ break;
+ case 119: // 'div'
+ shift(119); // 'div'
+ break;
+ case 123: // 'else'
+ shift(123); // 'else'
+ break;
+ case 124: // 'empty'
+ shift(124); // 'empty'
+ break;
+ case 127: // 'end'
+ shift(127); // 'end'
+ break;
+ case 129: // 'eq'
+ shift(129); // 'eq'
+ break;
+ case 132: // 'except'
+ shift(132); // 'except'
+ break;
+ case 139: // 'for'
+ shift(139); // 'for'
+ break;
+ case 148: // 'ge'
+ shift(148); // 'ge'
+ break;
+ case 150: // 'group'
+ shift(150); // 'group'
+ break;
+ case 152: // 'gt'
+ shift(152); // 'gt'
+ break;
+ case 153: // 'idiv'
+ shift(153); // 'idiv'
+ break;
+ case 162: // 'instance'
+ shift(162); // 'instance'
+ break;
+ case 164: // 'intersect'
+ shift(164); // 'intersect'
+ break;
+ case 165: // 'into'
+ shift(165); // 'into'
+ break;
+ case 166: // 'is'
+ shift(166); // 'is'
+ break;
+ case 175: // 'le'
+ shift(175); // 'le'
+ break;
+ case 177: // 'let'
+ shift(177); // 'let'
+ break;
+ case 181: // 'lt'
+ shift(181); // 'lt'
+ break;
+ case 183: // 'mod'
+ shift(183); // 'mod'
+ break;
+ case 184: // 'modify'
+ shift(184); // 'modify'
+ break;
+ case 189: // 'ne'
+ shift(189); // 'ne'
+ break;
+ case 202: // 'only'
+ shift(202); // 'only'
+ break;
+ case 204: // 'or'
+ shift(204); // 'or'
+ break;
+ case 205: // 'order'
+ shift(205); // 'order'
+ break;
+ case 224: // 'return'
+ shift(224); // 'return'
+ break;
+ case 228: // 'satisfies'
+ shift(228); // 'satisfies'
+ break;
+ case 241: // 'stable'
+ shift(241); // 'stable'
+ break;
+ case 242: // 'start'
+ shift(242); // 'start'
+ break;
+ case 253: // 'to'
+ shift(253); // 'to'
+ break;
+ case 254: // 'treat'
+ shift(254); // 'treat'
+ break;
+ case 260: // 'union'
+ shift(260); // 'union'
+ break;
+ case 272: // 'where'
+ shift(272); // 'where'
+ break;
+ case 276: // 'with'
+ shift(276); // 'with'
+ break;
+ case 74: // 'ancestor'
+ shift(74); // 'ancestor'
+ break;
+ case 75: // 'ancestor-or-self'
+ shift(75); // 'ancestor-or-self'
+ break;
+ case 83: // 'attribute'
+ shift(83); // 'attribute'
+ break;
+ case 94: // 'child'
+ shift(94); // 'child'
+ break;
+ case 97: // 'comment'
+ shift(97); // 'comment'
+ break;
+ case 104: // 'copy'
+ shift(104); // 'copy'
+ break;
+ case 109: // 'declare'
+ shift(109); // 'declare'
+ break;
+ case 111: // 'delete'
+ shift(111); // 'delete'
+ break;
+ case 112: // 'descendant'
+ shift(112); // 'descendant'
+ break;
+ case 113: // 'descendant-or-self'
+ shift(113); // 'descendant-or-self'
+ break;
+ case 120: // 'document'
+ shift(120); // 'document'
+ break;
+ case 121: // 'document-node'
+ shift(121); // 'document-node'
+ break;
+ case 122: // 'element'
+ shift(122); // 'element'
+ break;
+ case 125: // 'empty-sequence'
+ shift(125); // 'empty-sequence'
+ break;
+ case 130: // 'every'
+ shift(130); // 'every'
+ break;
+ case 136: // 'first'
+ shift(136); // 'first'
+ break;
+ case 137: // 'following'
+ shift(137); // 'following'
+ break;
+ case 138: // 'following-sibling'
+ shift(138); // 'following-sibling'
+ break;
+ case 147: // 'function'
+ shift(147); // 'function'
+ break;
+ case 154: // 'if'
+ shift(154); // 'if'
+ break;
+ case 155: // 'import'
+ shift(155); // 'import'
+ break;
+ case 161: // 'insert'
+ shift(161); // 'insert'
+ break;
+ case 167: // 'item'
+ shift(167); // 'item'
+ break;
+ case 173: // 'last'
+ shift(173); // 'last'
+ break;
+ case 185: // 'module'
+ shift(185); // 'module'
+ break;
+ case 187: // 'namespace'
+ shift(187); // 'namespace'
+ break;
+ case 188: // 'namespace-node'
+ shift(188); // 'namespace-node'
+ break;
+ case 194: // 'node'
+ shift(194); // 'node'
+ break;
+ case 206: // 'ordered'
+ shift(206); // 'ordered'
+ break;
+ case 210: // 'parent'
+ shift(210); // 'parent'
+ break;
+ case 216: // 'preceding'
+ shift(216); // 'preceding'
+ break;
+ case 217: // 'preceding-sibling'
+ shift(217); // 'preceding-sibling'
+ break;
+ case 220: // 'processing-instruction'
+ shift(220); // 'processing-instruction'
+ break;
+ case 222: // 'rename'
+ shift(222); // 'rename'
+ break;
+ case 223: // 'replace'
+ shift(223); // 'replace'
+ break;
+ case 230: // 'schema-attribute'
+ shift(230); // 'schema-attribute'
+ break;
+ case 231: // 'schema-element'
+ shift(231); // 'schema-element'
+ break;
+ case 234: // 'self'
+ shift(234); // 'self'
+ break;
+ case 240: // 'some'
+ shift(240); // 'some'
+ break;
+ case 248: // 'switch'
+ shift(248); // 'switch'
+ break;
+ case 249: // 'text'
+ shift(249); // 'text'
+ break;
+ case 256: // 'try'
+ shift(256); // 'try'
+ break;
+ case 259: // 'typeswitch'
+ shift(259); // 'typeswitch'
+ break;
+ case 262: // 'unordered'
+ shift(262); // 'unordered'
+ break;
+ case 266: // 'validate'
+ shift(266); // 'validate'
+ break;
+ case 268: // 'variable'
+ shift(268); // 'variable'
+ break;
+ case 170: // 'jsoniq'
+ shift(170); // 'jsoniq'
+ break;
+ case 73: // 'allowing'
+ shift(73); // 'allowing'
+ break;
+ case 82: // 'at'
+ shift(82); // 'at'
+ break;
+ case 84: // 'base-uri'
+ shift(84); // 'base-uri'
+ break;
+ case 86: // 'boundary-space'
+ shift(86); // 'boundary-space'
+ break;
+ case 87: // 'break'
+ shift(87); // 'break'
+ break;
+ case 92: // 'catch'
+ shift(92); // 'catch'
+ break;
+ case 99: // 'construction'
+ shift(99); // 'construction'
+ break;
+ case 102: // 'context'
+ shift(102); // 'context'
+ break;
+ case 103: // 'continue'
+ shift(103); // 'continue'
+ break;
+ case 105: // 'copy-namespaces'
+ shift(105); // 'copy-namespaces'
+ break;
+ case 107: // 'decimal-format'
+ shift(107); // 'decimal-format'
+ break;
+ case 126: // 'encoding'
+ shift(126); // 'encoding'
+ break;
+ case 133: // 'exit'
+ shift(133); // 'exit'
+ break;
+ case 134: // 'external'
+ shift(134); // 'external'
+ break;
+ case 143: // 'ft-option'
+ shift(143); // 'ft-option'
+ break;
+ case 156: // 'in'
+ shift(156); // 'in'
+ break;
+ case 157: // 'index'
+ shift(157); // 'index'
+ break;
+ case 163: // 'integrity'
+ shift(163); // 'integrity'
+ break;
+ case 174: // 'lax'
+ shift(174); // 'lax'
+ break;
+ case 195: // 'nodes'
+ shift(195); // 'nodes'
+ break;
+ case 203: // 'option'
+ shift(203); // 'option'
+ break;
+ case 207: // 'ordering'
+ shift(207); // 'ordering'
+ break;
+ case 226: // 'revalidation'
+ shift(226); // 'revalidation'
+ break;
+ case 229: // 'schema'
+ shift(229); // 'schema'
+ break;
+ case 232: // 'score'
+ shift(232); // 'score'
+ break;
+ case 239: // 'sliding'
+ shift(239); // 'sliding'
+ break;
+ case 245: // 'strict'
+ shift(245); // 'strict'
+ break;
+ case 257: // 'tumbling'
+ shift(257); // 'tumbling'
+ break;
+ case 258: // 'type'
+ shift(258); // 'type'
+ break;
+ case 263: // 'updating'
+ shift(263); // 'updating'
+ break;
+ case 267: // 'value'
+ shift(267); // 'value'
+ break;
+ case 269: // 'version'
+ shift(269); // 'version'
+ break;
+ case 273: // 'while'
+ shift(273); // 'while'
+ break;
+ case 98: // 'constraint'
+ shift(98); // 'constraint'
+ break;
+ case 179: // 'loop'
+ shift(179); // 'loop'
+ break;
+ case 225: // 'returning'
+ shift(225); // 'returning'
+ break;
+ case 78: // 'append'
+ shift(78); // 'append'
+ break;
+ case 135: // 'false'
+ shift(135); // 'false'
+ break;
+ case 142: // 'from'
+ shift(142); // 'from'
+ break;
+ case 197: // 'null'
+ shift(197); // 'null'
+ break;
+ case 168: // 'json'
+ shift(168); // 'json'
+ break;
+ case 198: // 'object'
+ shift(198); // 'object'
+ break;
+ case 233: // 'select'
+ shift(233); // 'select'
+ break;
+ default:
+ shift(255); // 'true'
+ }
+ eventHandler.endNonterminal("NCName", e0);
+ }
+
+ function try_NCName()
+ {
+ switch (l1)
+ {
+ case 19: // NCName^Token
+ shiftT(19); // NCName^Token
+ break;
+ case 71: // 'after'
+ shiftT(71); // 'after'
+ break;
+ case 76: // 'and'
+ shiftT(76); // 'and'
+ break;
+ case 80: // 'as'
+ shiftT(80); // 'as'
+ break;
+ case 81: // 'ascending'
+ shiftT(81); // 'ascending'
+ break;
+ case 85: // 'before'
+ shiftT(85); // 'before'
+ break;
+ case 89: // 'case'
+ shiftT(89); // 'case'
+ break;
+ case 90: // 'cast'
+ shiftT(90); // 'cast'
+ break;
+ case 91: // 'castable'
+ shiftT(91); // 'castable'
+ break;
+ case 95: // 'collation'
+ shiftT(95); // 'collation'
+ break;
+ case 106: // 'count'
+ shiftT(106); // 'count'
+ break;
+ case 110: // 'default'
+ shiftT(110); // 'default'
+ break;
+ case 114: // 'descending'
+ shiftT(114); // 'descending'
+ break;
+ case 119: // 'div'
+ shiftT(119); // 'div'
+ break;
+ case 123: // 'else'
+ shiftT(123); // 'else'
+ break;
+ case 124: // 'empty'
+ shiftT(124); // 'empty'
+ break;
+ case 127: // 'end'
+ shiftT(127); // 'end'
+ break;
+ case 129: // 'eq'
+ shiftT(129); // 'eq'
+ break;
+ case 132: // 'except'
+ shiftT(132); // 'except'
+ break;
+ case 139: // 'for'
+ shiftT(139); // 'for'
+ break;
+ case 148: // 'ge'
+ shiftT(148); // 'ge'
+ break;
+ case 150: // 'group'
+ shiftT(150); // 'group'
+ break;
+ case 152: // 'gt'
+ shiftT(152); // 'gt'
+ break;
+ case 153: // 'idiv'
+ shiftT(153); // 'idiv'
+ break;
+ case 162: // 'instance'
+ shiftT(162); // 'instance'
+ break;
+ case 164: // 'intersect'
+ shiftT(164); // 'intersect'
+ break;
+ case 165: // 'into'
+ shiftT(165); // 'into'
+ break;
+ case 166: // 'is'
+ shiftT(166); // 'is'
+ break;
+ case 175: // 'le'
+ shiftT(175); // 'le'
+ break;
+ case 177: // 'let'
+ shiftT(177); // 'let'
+ break;
+ case 181: // 'lt'
+ shiftT(181); // 'lt'
+ break;
+ case 183: // 'mod'
+ shiftT(183); // 'mod'
+ break;
+ case 184: // 'modify'
+ shiftT(184); // 'modify'
+ break;
+ case 189: // 'ne'
+ shiftT(189); // 'ne'
+ break;
+ case 202: // 'only'
+ shiftT(202); // 'only'
+ break;
+ case 204: // 'or'
+ shiftT(204); // 'or'
+ break;
+ case 205: // 'order'
+ shiftT(205); // 'order'
+ break;
+ case 224: // 'return'
+ shiftT(224); // 'return'
+ break;
+ case 228: // 'satisfies'
+ shiftT(228); // 'satisfies'
+ break;
+ case 241: // 'stable'
+ shiftT(241); // 'stable'
+ break;
+ case 242: // 'start'
+ shiftT(242); // 'start'
+ break;
+ case 253: // 'to'
+ shiftT(253); // 'to'
+ break;
+ case 254: // 'treat'
+ shiftT(254); // 'treat'
+ break;
+ case 260: // 'union'
+ shiftT(260); // 'union'
+ break;
+ case 272: // 'where'
+ shiftT(272); // 'where'
+ break;
+ case 276: // 'with'
+ shiftT(276); // 'with'
+ break;
+ case 74: // 'ancestor'
+ shiftT(74); // 'ancestor'
+ break;
+ case 75: // 'ancestor-or-self'
+ shiftT(75); // 'ancestor-or-self'
+ break;
+ case 83: // 'attribute'
+ shiftT(83); // 'attribute'
+ break;
+ case 94: // 'child'
+ shiftT(94); // 'child'
+ break;
+ case 97: // 'comment'
+ shiftT(97); // 'comment'
+ break;
+ case 104: // 'copy'
+ shiftT(104); // 'copy'
+ break;
+ case 109: // 'declare'
+ shiftT(109); // 'declare'
+ break;
+ case 111: // 'delete'
+ shiftT(111); // 'delete'
+ break;
+ case 112: // 'descendant'
+ shiftT(112); // 'descendant'
+ break;
+ case 113: // 'descendant-or-self'
+ shiftT(113); // 'descendant-or-self'
+ break;
+ case 120: // 'document'
+ shiftT(120); // 'document'
+ break;
+ case 121: // 'document-node'
+ shiftT(121); // 'document-node'
+ break;
+ case 122: // 'element'
+ shiftT(122); // 'element'
+ break;
+ case 125: // 'empty-sequence'
+ shiftT(125); // 'empty-sequence'
+ break;
+ case 130: // 'every'
+ shiftT(130); // 'every'
+ break;
+ case 136: // 'first'
+ shiftT(136); // 'first'
+ break;
+ case 137: // 'following'
+ shiftT(137); // 'following'
+ break;
+ case 138: // 'following-sibling'
+ shiftT(138); // 'following-sibling'
+ break;
+ case 147: // 'function'
+ shiftT(147); // 'function'
+ break;
+ case 154: // 'if'
+ shiftT(154); // 'if'
+ break;
+ case 155: // 'import'
+ shiftT(155); // 'import'
+ break;
+ case 161: // 'insert'
+ shiftT(161); // 'insert'
+ break;
+ case 167: // 'item'
+ shiftT(167); // 'item'
+ break;
+ case 173: // 'last'
+ shiftT(173); // 'last'
+ break;
+ case 185: // 'module'
+ shiftT(185); // 'module'
+ break;
+ case 187: // 'namespace'
+ shiftT(187); // 'namespace'
+ break;
+ case 188: // 'namespace-node'
+ shiftT(188); // 'namespace-node'
+ break;
+ case 194: // 'node'
+ shiftT(194); // 'node'
+ break;
+ case 206: // 'ordered'
+ shiftT(206); // 'ordered'
+ break;
+ case 210: // 'parent'
+ shiftT(210); // 'parent'
+ break;
+ case 216: // 'preceding'
+ shiftT(216); // 'preceding'
+ break;
+ case 217: // 'preceding-sibling'
+ shiftT(217); // 'preceding-sibling'
+ break;
+ case 220: // 'processing-instruction'
+ shiftT(220); // 'processing-instruction'
+ break;
+ case 222: // 'rename'
+ shiftT(222); // 'rename'
+ break;
+ case 223: // 'replace'
+ shiftT(223); // 'replace'
+ break;
+ case 230: // 'schema-attribute'
+ shiftT(230); // 'schema-attribute'
+ break;
+ case 231: // 'schema-element'
+ shiftT(231); // 'schema-element'
+ break;
+ case 234: // 'self'
+ shiftT(234); // 'self'
+ break;
+ case 240: // 'some'
+ shiftT(240); // 'some'
+ break;
+ case 248: // 'switch'
+ shiftT(248); // 'switch'
+ break;
+ case 249: // 'text'
+ shiftT(249); // 'text'
+ break;
+ case 256: // 'try'
+ shiftT(256); // 'try'
+ break;
+ case 259: // 'typeswitch'
+ shiftT(259); // 'typeswitch'
+ break;
+ case 262: // 'unordered'
+ shiftT(262); // 'unordered'
+ break;
+ case 266: // 'validate'
+ shiftT(266); // 'validate'
+ break;
+ case 268: // 'variable'
+ shiftT(268); // 'variable'
+ break;
+ case 170: // 'jsoniq'
+ shiftT(170); // 'jsoniq'
+ break;
+ case 73: // 'allowing'
+ shiftT(73); // 'allowing'
+ break;
+ case 82: // 'at'
+ shiftT(82); // 'at'
+ break;
+ case 84: // 'base-uri'
+ shiftT(84); // 'base-uri'
+ break;
+ case 86: // 'boundary-space'
+ shiftT(86); // 'boundary-space'
+ break;
+ case 87: // 'break'
+ shiftT(87); // 'break'
+ break;
+ case 92: // 'catch'
+ shiftT(92); // 'catch'
+ break;
+ case 99: // 'construction'
+ shiftT(99); // 'construction'
+ break;
+ case 102: // 'context'
+ shiftT(102); // 'context'
+ break;
+ case 103: // 'continue'
+ shiftT(103); // 'continue'
+ break;
+ case 105: // 'copy-namespaces'
+ shiftT(105); // 'copy-namespaces'
+ break;
+ case 107: // 'decimal-format'
+ shiftT(107); // 'decimal-format'
+ break;
+ case 126: // 'encoding'
+ shiftT(126); // 'encoding'
+ break;
+ case 133: // 'exit'
+ shiftT(133); // 'exit'
+ break;
+ case 134: // 'external'
+ shiftT(134); // 'external'
+ break;
+ case 143: // 'ft-option'
+ shiftT(143); // 'ft-option'
+ break;
+ case 156: // 'in'
+ shiftT(156); // 'in'
+ break;
+ case 157: // 'index'
+ shiftT(157); // 'index'
+ break;
+ case 163: // 'integrity'
+ shiftT(163); // 'integrity'
+ break;
+ case 174: // 'lax'
+ shiftT(174); // 'lax'
+ break;
+ case 195: // 'nodes'
+ shiftT(195); // 'nodes'
+ break;
+ case 203: // 'option'
+ shiftT(203); // 'option'
+ break;
+ case 207: // 'ordering'
+ shiftT(207); // 'ordering'
+ break;
+ case 226: // 'revalidation'
+ shiftT(226); // 'revalidation'
+ break;
+ case 229: // 'schema'
+ shiftT(229); // 'schema'
+ break;
+ case 232: // 'score'
+ shiftT(232); // 'score'
+ break;
+ case 239: // 'sliding'
+ shiftT(239); // 'sliding'
+ break;
+ case 245: // 'strict'
+ shiftT(245); // 'strict'
+ break;
+ case 257: // 'tumbling'
+ shiftT(257); // 'tumbling'
+ break;
+ case 258: // 'type'
+ shiftT(258); // 'type'
+ break;
+ case 263: // 'updating'
+ shiftT(263); // 'updating'
+ break;
+ case 267: // 'value'
+ shiftT(267); // 'value'
+ break;
+ case 269: // 'version'
+ shiftT(269); // 'version'
+ break;
+ case 273: // 'while'
+ shiftT(273); // 'while'
+ break;
+ case 98: // 'constraint'
+ shiftT(98); // 'constraint'
+ break;
+ case 179: // 'loop'
+ shiftT(179); // 'loop'
+ break;
+ case 225: // 'returning'
+ shiftT(225); // 'returning'
+ break;
+ case 78: // 'append'
+ shiftT(78); // 'append'
+ break;
+ case 135: // 'false'
+ shiftT(135); // 'false'
+ break;
+ case 142: // 'from'
+ shiftT(142); // 'from'
+ break;
+ case 197: // 'null'
+ shiftT(197); // 'null'
+ break;
+ case 168: // 'json'
+ shiftT(168); // 'json'
+ break;
+ case 198: // 'object'
+ shiftT(198); // 'object'
+ break;
+ case 233: // 'select'
+ shiftT(233); // 'select'
+ break;
+ default:
+ shiftT(255); // 'true'
+ }
+ }
+
+ function parse_MainModule()
+ {
+ eventHandler.startNonterminal("MainModule", e0);
+ parse_Prolog();
+ whitespace();
+ parse_Program();
+ eventHandler.endNonterminal("MainModule", e0);
+ }
+
+ function parse_Program()
+ {
+ eventHandler.startNonterminal("Program", e0);
+ parse_StatementsAndOptionalExpr();
+ eventHandler.endNonterminal("Program", e0);
+ }
+
+ function parse_Statements()
+ {
+ eventHandler.startNonterminal("Statements", e0);
+ for (;;)
+ {
+ lookahead1W(284); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 35: // '('
+ lookahead2W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 36: // '(#'
+ lookahead2(243); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ break;
+ case 47: // '/'
+ lookahead2W(286); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 48: // '//'
+ lookahead2W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 55: // '<'
+ lookahead2(4); // QName
+ break;
+ case 56: // '<!--'
+ lookahead2(1); // DirCommentContents
+ break;
+ case 60: // '<?'
+ lookahead2(3); // PITarget
+ break;
+ case 69: // '['
+ lookahead2W(273); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 78: // 'append'
+ lookahead2W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 133: // 'exit'
+ lookahead2W(147); // S^WS | '#' | '(' | '(:' | 'returning'
+ break;
+ case 139: // 'for'
+ lookahead2W(179); // S^WS | '#' | '$' | '(' | '(:' | 'sliding' | 'tumbling'
+ break;
+ case 161: // 'insert'
+ lookahead2W(276); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 177: // 'let'
+ lookahead2W(166); // S^WS | '#' | '$' | '(' | '(:' | 'score'
+ break;
+ case 187: // 'namespace'
+ lookahead2W(247); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 220: // 'processing-instruction'
+ lookahead2W(245); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 223: // 'replace'
+ lookahead2W(170); // S^WS | '#' | '(' | '(:' | 'node' | 'value'
+ break;
+ case 266: // 'validate'
+ lookahead2W(188); // S^WS | '#' | '(' | '(:' | 'lax' | 'strict' | 'type' | '{'
+ break;
+ case 281: // '{'
+ lookahead2W(283); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 283: // '{|'
+ lookahead2W(274); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 31: // '$'
+ case 33: // '%'
+ lookahead2W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 83: // 'attribute'
+ case 122: // 'element'
+ lookahead2W(253); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 87: // 'break'
+ case 103: // 'continue'
+ lookahead2W(145); // S^WS | '#' | '(' | '(:' | 'loop'
+ break;
+ case 97: // 'comment'
+ case 249: // 'text'
+ lookahead2W(97); // S^WS | '#' | '(:' | '{'
+ break;
+ case 111: // 'delete'
+ case 222: // 'rename'
+ lookahead2W(261); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 41: // '+'
+ case 43: // '-'
+ case 196: // 'not'
+ lookahead2W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(211); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '.' | '/' |
+ break;
+ case 104: // 'copy'
+ case 130: // 'every'
+ case 240: // 'some'
+ case 268: // 'variable'
+ lookahead2W(143); // S^WS | '#' | '$' | '(' | '(:'
+ break;
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 256: // 'try'
+ case 262: // 'unordered'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 32: // '$$'
+ lookahead2W(210); // S^WS | EOF | '!' | '!=' | '(' | '(:' | '*' | '+' | ',' | '-' | '.' | '/' | '//' |
+ break;
+ case 79: // 'array'
+ case 121: // 'document-node'
+ case 125: // 'empty-sequence'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 247: // 'structured-item'
+ lookahead2W(20); // S^WS | '#' | '(:'
+ break;
+ case 6: // EQName^Token
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 76: // 'and'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 94: // 'child'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 132: // 'except'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 147: // 'function'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 154: // 'if'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 189: // 'ne'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 234: // 'self'
+ case 239: // 'sliding'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 248: // 'switch'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 259: // 'typeswitch'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 267: // 'value'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 54 // ';'
+ && lk != 287 // '}'
+ && lk != 12808 // IntegerLiteral EOF
+ && lk != 12809 // DecimalLiteral EOF
+ && lk != 12810 // DoubleLiteral EOF
+ && lk != 12811 // StringLiteral EOF
+ && lk != 12832 // '$$' EOF
+ && lk != 12847 // '/' EOF
+ && lk != 12935 // 'false' EOF
+ && lk != 12997 // 'null' EOF
+ && lk != 13055 // 'true' EOF
+ && lk != 16140 // 'variable' '$'
+ && lk != 21512 // IntegerLiteral ','
+ && lk != 21513 // DecimalLiteral ','
+ && lk != 21514 // DoubleLiteral ','
+ && lk != 21515 // StringLiteral ','
+ && lk != 21536 // '$$' ','
+ && lk != 21551 // '/' ','
+ && lk != 21639 // 'false' ','
+ && lk != 21701 // 'null' ','
+ && lk != 21759 // 'true' ','
+ && lk != 27656 // IntegerLiteral ';'
+ && lk != 27657 // DecimalLiteral ';'
+ && lk != 27658 // DoubleLiteral ';'
+ && lk != 27659 // StringLiteral ';'
+ && lk != 27680 // '$$' ';'
+ && lk != 27695 // '/' ';'
+ && lk != 27783 // 'false' ';'
+ && lk != 27845 // 'null' ';'
+ && lk != 27903 // 'true' ';'
+ && lk != 91735 // 'break' 'loop'
+ && lk != 91751 // 'continue' 'loop'
+ && lk != 115333 // 'exit' 'returning'
+ && lk != 146952 // IntegerLiteral '}'
+ && lk != 146953 // DecimalLiteral '}'
+ && lk != 146954 // DoubleLiteral '}'
+ && lk != 146955 // StringLiteral '}'
+ && lk != 146976 // '$$' '}'
+ && lk != 146991 // '/' '}'
+ && lk != 147079 // 'false' '}'
+ && lk != 147141 // 'null' '}'
+ && lk != 147199) // 'true' '}'
+ {
+ lk = memoized(8, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_Statement();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(8, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 54 // ';'
+ && lk != 16140 // 'variable' '$'
+ && lk != 27656 // IntegerLiteral ';'
+ && lk != 27657 // DecimalLiteral ';'
+ && lk != 27658 // DoubleLiteral ';'
+ && lk != 27659 // StringLiteral ';'
+ && lk != 27680 // '$$' ';'
+ && lk != 27695 // '/' ';'
+ && lk != 27783 // 'false' ';'
+ && lk != 27845 // 'null' ';'
+ && lk != 27903 // 'true' ';'
+ && lk != 91735 // 'break' 'loop'
+ && lk != 91751 // 'continue' 'loop'
+ && lk != 115333) // 'exit' 'returning'
+ {
+ break;
+ }
+ whitespace();
+ parse_Statement();
+ }
+ eventHandler.endNonterminal("Statements", e0);
+ }
+
+ function try_Statements()
+ {
+ for (;;)
+ {
+ lookahead1W(284); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 35: // '('
+ lookahead2W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 36: // '(#'
+ lookahead2(243); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ break;
+ case 47: // '/'
+ lookahead2W(286); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 48: // '//'
+ lookahead2W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 55: // '<'
+ lookahead2(4); // QName
+ break;
+ case 56: // '<!--'
+ lookahead2(1); // DirCommentContents
+ break;
+ case 60: // '<?'
+ lookahead2(3); // PITarget
+ break;
+ case 69: // '['
+ lookahead2W(273); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 78: // 'append'
+ lookahead2W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 133: // 'exit'
+ lookahead2W(147); // S^WS | '#' | '(' | '(:' | 'returning'
+ break;
+ case 139: // 'for'
+ lookahead2W(179); // S^WS | '#' | '$' | '(' | '(:' | 'sliding' | 'tumbling'
+ break;
+ case 161: // 'insert'
+ lookahead2W(276); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 177: // 'let'
+ lookahead2W(166); // S^WS | '#' | '$' | '(' | '(:' | 'score'
+ break;
+ case 187: // 'namespace'
+ lookahead2W(247); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 220: // 'processing-instruction'
+ lookahead2W(245); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 223: // 'replace'
+ lookahead2W(170); // S^WS | '#' | '(' | '(:' | 'node' | 'value'
+ break;
+ case 266: // 'validate'
+ lookahead2W(188); // S^WS | '#' | '(' | '(:' | 'lax' | 'strict' | 'type' | '{'
+ break;
+ case 281: // '{'
+ lookahead2W(283); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 283: // '{|'
+ lookahead2W(274); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 31: // '$'
+ case 33: // '%'
+ lookahead2W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 83: // 'attribute'
+ case 122: // 'element'
+ lookahead2W(253); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 87: // 'break'
+ case 103: // 'continue'
+ lookahead2W(145); // S^WS | '#' | '(' | '(:' | 'loop'
+ break;
+ case 97: // 'comment'
+ case 249: // 'text'
+ lookahead2W(97); // S^WS | '#' | '(:' | '{'
+ break;
+ case 111: // 'delete'
+ case 222: // 'rename'
+ lookahead2W(261); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 41: // '+'
+ case 43: // '-'
+ case 196: // 'not'
+ lookahead2W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(211); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '.' | '/' |
+ break;
+ case 104: // 'copy'
+ case 130: // 'every'
+ case 240: // 'some'
+ case 268: // 'variable'
+ lookahead2W(143); // S^WS | '#' | '$' | '(' | '(:'
+ break;
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 256: // 'try'
+ case 262: // 'unordered'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 32: // '$$'
+ lookahead2W(210); // S^WS | EOF | '!' | '!=' | '(' | '(:' | '*' | '+' | ',' | '-' | '.' | '/' | '//' |
+ break;
+ case 79: // 'array'
+ case 121: // 'document-node'
+ case 125: // 'empty-sequence'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 247: // 'structured-item'
+ lookahead2W(20); // S^WS | '#' | '(:'
+ break;
+ case 6: // EQName^Token
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 76: // 'and'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 94: // 'child'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 132: // 'except'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 147: // 'function'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 154: // 'if'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 189: // 'ne'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 234: // 'self'
+ case 239: // 'sliding'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 248: // 'switch'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 259: // 'typeswitch'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 267: // 'value'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 54 // ';'
+ && lk != 287 // '}'
+ && lk != 12808 // IntegerLiteral EOF
+ && lk != 12809 // DecimalLiteral EOF
+ && lk != 12810 // DoubleLiteral EOF
+ && lk != 12811 // StringLiteral EOF
+ && lk != 12832 // '$$' EOF
+ && lk != 12847 // '/' EOF
+ && lk != 12935 // 'false' EOF
+ && lk != 12997 // 'null' EOF
+ && lk != 13055 // 'true' EOF
+ && lk != 16140 // 'variable' '$'
+ && lk != 21512 // IntegerLiteral ','
+ && lk != 21513 // DecimalLiteral ','
+ && lk != 21514 // DoubleLiteral ','
+ && lk != 21515 // StringLiteral ','
+ && lk != 21536 // '$$' ','
+ && lk != 21551 // '/' ','
+ && lk != 21639 // 'false' ','
+ && lk != 21701 // 'null' ','
+ && lk != 21759 // 'true' ','
+ && lk != 27656 // IntegerLiteral ';'
+ && lk != 27657 // DecimalLiteral ';'
+ && lk != 27658 // DoubleLiteral ';'
+ && lk != 27659 // StringLiteral ';'
+ && lk != 27680 // '$$' ';'
+ && lk != 27695 // '/' ';'
+ && lk != 27783 // 'false' ';'
+ && lk != 27845 // 'null' ';'
+ && lk != 27903 // 'true' ';'
+ && lk != 91735 // 'break' 'loop'
+ && lk != 91751 // 'continue' 'loop'
+ && lk != 115333 // 'exit' 'returning'
+ && lk != 146952 // IntegerLiteral '}'
+ && lk != 146953 // DecimalLiteral '}'
+ && lk != 146954 // DoubleLiteral '}'
+ && lk != 146955 // StringLiteral '}'
+ && lk != 146976 // '$$' '}'
+ && lk != 146991 // '/' '}'
+ && lk != 147079 // 'false' '}'
+ && lk != 147141 // 'null' '}'
+ && lk != 147199) // 'true' '}'
+ {
+ lk = memoized(8, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_Statement();
+ memoize(8, e0A, -1);
+ continue;
+ }
+ catch (p1A)
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(8, e0A, -2);
+ break;
+ }
+ }
+ }
+ if (lk != -1
+ && lk != 54 // ';'
+ && lk != 16140 // 'variable' '$'
+ && lk != 27656 // IntegerLiteral ';'
+ && lk != 27657 // DecimalLiteral ';'
+ && lk != 27658 // DoubleLiteral ';'
+ && lk != 27659 // StringLiteral ';'
+ && lk != 27680 // '$$' ';'
+ && lk != 27695 // '/' ';'
+ && lk != 27783 // 'false' ';'
+ && lk != 27845 // 'null' ';'
+ && lk != 27903 // 'true' ';'
+ && lk != 91735 // 'break' 'loop'
+ && lk != 91751 // 'continue' 'loop'
+ && lk != 115333) // 'exit' 'returning'
+ {
+ break;
+ }
+ try_Statement();
+ }
+ }
+
+ function parse_StatementsAndExpr()
+ {
+ eventHandler.startNonterminal("StatementsAndExpr", e0);
+ parse_Statements();
+ whitespace();
+ parse_Expr();
+ eventHandler.endNonterminal("StatementsAndExpr", e0);
+ }
+
+ function try_StatementsAndExpr()
+ {
+ try_Statements();
+ try_Expr();
+ }
+
+ function parse_StatementsAndOptionalExpr()
+ {
+ eventHandler.startNonterminal("StatementsAndOptionalExpr", e0);
+ parse_Statements();
+ if (l1 != 25 // EOF
+ && l1 != 287) // '}'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ eventHandler.endNonterminal("StatementsAndOptionalExpr", e0);
+ }
+
+ function try_StatementsAndOptionalExpr()
+ {
+ try_Statements();
+ if (l1 != 25 // EOF
+ && l1 != 287) // '}'
+ {
+ try_Expr();
+ }
+ }
+
+ function parse_Statement()
+ {
+ eventHandler.startNonterminal("Statement", e0);
+ switch (l1)
+ {
+ case 133: // 'exit'
+ lookahead2W(147); // S^WS | '#' | '(' | '(:' | 'returning'
+ break;
+ case 139: // 'for'
+ lookahead2W(179); // S^WS | '#' | '$' | '(' | '(:' | 'sliding' | 'tumbling'
+ break;
+ case 177: // 'let'
+ lookahead2W(166); // S^WS | '#' | '$' | '(' | '(:' | 'score'
+ break;
+ case 256: // 'try'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 268: // 'variable'
+ lookahead2W(143); // S^WS | '#' | '$' | '(' | '(:'
+ break;
+ case 281: // '{'
+ lookahead2W(283); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 31: // '$'
+ case 33: // '%'
+ lookahead2W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 87: // 'break'
+ case 103: // 'continue'
+ lookahead2W(145); // S^WS | '#' | '(' | '(:' | 'loop'
+ break;
+ case 154: // 'if'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ case 273: // 'while'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 6 // EQName^Token
+ && lk != 8 // IntegerLiteral
+ && lk != 9 // DecimalLiteral
+ && lk != 10 // DoubleLiteral
+ && lk != 11 // StringLiteral
+ && lk != 32 // '$$'
+ && lk != 35 // '('
+ && lk != 36 // '(#'
+ && lk != 41 // '+'
+ && lk != 43 // '-'
+ && lk != 47 // '/'
+ && lk != 48 // '//'
+ && lk != 54 // ';'
+ && lk != 55 // '<'
+ && lk != 56 // '<!--'
+ && lk != 60 // '<?'
+ && lk != 69 // '['
+ && lk != 71 // 'after'
+ && lk != 73 // 'allowing'
+ && lk != 74 // 'ancestor'
+ && lk != 75 // 'ancestor-or-self'
+ && lk != 76 // 'and'
+ && lk != 78 // 'append'
+ && lk != 79 // 'array'
+ && lk != 80 // 'as'
+ && lk != 81 // 'ascending'
+ && lk != 82 // 'at'
+ && lk != 83 // 'attribute'
+ && lk != 84 // 'base-uri'
+ && lk != 85 // 'before'
+ && lk != 86 // 'boundary-space'
+ && lk != 89 // 'case'
+ && lk != 90 // 'cast'
+ && lk != 91 // 'castable'
+ && lk != 92 // 'catch'
+ && lk != 94 // 'child'
+ && lk != 95 // 'collation'
+ && lk != 97 // 'comment'
+ && lk != 98 // 'constraint'
+ && lk != 99 // 'construction'
+ && lk != 102 // 'context'
+ && lk != 104 // 'copy'
+ && lk != 105 // 'copy-namespaces'
+ && lk != 106 // 'count'
+ && lk != 107 // 'decimal-format'
+ && lk != 109 // 'declare'
+ && lk != 110 // 'default'
+ && lk != 111 // 'delete'
+ && lk != 112 // 'descendant'
+ && lk != 113 // 'descendant-or-self'
+ && lk != 114 // 'descending'
+ && lk != 119 // 'div'
+ && lk != 120 // 'document'
+ && lk != 121 // 'document-node'
+ && lk != 122 // 'element'
+ && lk != 123 // 'else'
+ && lk != 124 // 'empty'
+ && lk != 125 // 'empty-sequence'
+ && lk != 126 // 'encoding'
+ && lk != 127 // 'end'
+ && lk != 129 // 'eq'
+ && lk != 130 // 'every'
+ && lk != 132 // 'except'
+ && lk != 134 // 'external'
+ && lk != 135 // 'false'
+ && lk != 136 // 'first'
+ && lk != 137 // 'following'
+ && lk != 138 // 'following-sibling'
+ && lk != 142 // 'from'
+ && lk != 143 // 'ft-option'
+ && lk != 147 // 'function'
+ && lk != 148 // 'ge'
+ && lk != 150 // 'group'
+ && lk != 152 // 'gt'
+ && lk != 153 // 'idiv'
+ && lk != 155 // 'import'
+ && lk != 156 // 'in'
+ && lk != 157 // 'index'
+ && lk != 161 // 'insert'
+ && lk != 162 // 'instance'
+ && lk != 163 // 'integrity'
+ && lk != 164 // 'intersect'
+ && lk != 165 // 'into'
+ && lk != 166 // 'is'
+ && lk != 167 // 'item'
+ && lk != 168 // 'json'
+ && lk != 169 // 'json-item'
+ && lk != 170 // 'jsoniq'
+ && lk != 173 // 'last'
+ && lk != 174 // 'lax'
+ && lk != 175 // 'le'
+ && lk != 179 // 'loop'
+ && lk != 181 // 'lt'
+ && lk != 183 // 'mod'
+ && lk != 184 // 'modify'
+ && lk != 185 // 'module'
+ && lk != 187 // 'namespace'
+ && lk != 188 // 'namespace-node'
+ && lk != 189 // 'ne'
+ && lk != 194 // 'node'
+ && lk != 195 // 'nodes'
+ && lk != 196 // 'not'
+ && lk != 197 // 'null'
+ && lk != 198 // 'object'
+ && lk != 202 // 'only'
+ && lk != 203 // 'option'
+ && lk != 204 // 'or'
+ && lk != 205 // 'order'
+ && lk != 206 // 'ordered'
+ && lk != 207 // 'ordering'
+ && lk != 210 // 'parent'
+ && lk != 216 // 'preceding'
+ && lk != 217 // 'preceding-sibling'
+ && lk != 220 // 'processing-instruction'
+ && lk != 222 // 'rename'
+ && lk != 223 // 'replace'
+ && lk != 224 // 'return'
+ && lk != 225 // 'returning'
+ && lk != 226 // 'revalidation'
+ && lk != 228 // 'satisfies'
+ && lk != 229 // 'schema'
+ && lk != 230 // 'schema-attribute'
+ && lk != 231 // 'schema-element'
+ && lk != 232 // 'score'
+ && lk != 233 // 'select'
+ && lk != 234 // 'self'
+ && lk != 239 // 'sliding'
+ && lk != 240 // 'some'
+ && lk != 241 // 'stable'
+ && lk != 242 // 'start'
+ && lk != 245 // 'strict'
+ && lk != 247 // 'structured-item'
+ && lk != 249 // 'text'
+ && lk != 253 // 'to'
+ && lk != 254 // 'treat'
+ && lk != 255 // 'true'
+ && lk != 257 // 'tumbling'
+ && lk != 258 // 'type'
+ && lk != 260 // 'union'
+ && lk != 262 // 'unordered'
+ && lk != 263 // 'updating'
+ && lk != 266 // 'validate'
+ && lk != 267 // 'value'
+ && lk != 269 // 'version'
+ && lk != 272 // 'where'
+ && lk != 276 // 'with'
+ && lk != 283 // '{|'
+ && lk != 10009 // '{' NCName^Token
+ && lk != 14935 // 'break' '#'
+ && lk != 14951 // 'continue' '#'
+ && lk != 14981 // 'exit' '#'
+ && lk != 14987 // 'for' '#'
+ && lk != 15002 // 'if' '#'
+ && lk != 15025 // 'let' '#'
+ && lk != 15096 // 'switch' '#'
+ && lk != 15104 // 'try' '#'
+ && lk != 15107 // 'typeswitch' '#'
+ && lk != 15116 // 'variable' '#'
+ && lk != 15121 // 'while' '#'
+ && lk != 16011 // 'for' '$'
+ && lk != 16049 // 'let' '$'
+ && lk != 16140 // 'variable' '$'
+ && lk != 18007 // 'break' '('
+ && lk != 18023 // 'continue' '('
+ && lk != 18053 // 'exit' '('
+ && lk != 18059 // 'for' '('
+ && lk != 18074 // 'if' '('
+ && lk != 18097 // 'let' '('
+ && lk != 18168 // 'switch' '('
+ && lk != 18176 // 'try' '('
+ && lk != 18179 // 'typeswitch' '('
+ && lk != 18188 // 'variable' '('
+ && lk != 91735 // 'break' 'loop'
+ && lk != 91751 // 'continue' 'loop'
+ && lk != 115333 // 'exit' 'returning'
+ && lk != 118961 // 'let' 'score'
+ && lk != 122507 // 'for' 'sliding'
+ && lk != 131723 // 'for' 'tumbling'
+ && lk != 144128 // 'try' '{'
+ && lk != 147225) // '{' '}'
+ {
+ lk = memoized(9, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_ApplyStatement();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_AssignStatement();
+ lk = -2;
+ }
+ catch (p2A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_BlockStatement();
+ lk = -3;
+ }
+ catch (p3A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_VarDeclStatement();
+ lk = -12;
+ }
+ catch (p12A)
+ {
+ lk = -13;
+ }
+ }
+ }
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(9, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -2:
+ parse_AssignStatement();
+ break;
+ case -3:
+ parse_BlockStatement();
+ break;
+ case 91735: // 'break' 'loop'
+ parse_BreakStatement();
+ break;
+ case 91751: // 'continue' 'loop'
+ parse_ContinueStatement();
+ break;
+ case 115333: // 'exit' 'returning'
+ parse_ExitStatement();
+ break;
+ case 16011: // 'for' '$'
+ case 16049: // 'let' '$'
+ case 118961: // 'let' 'score'
+ case 122507: // 'for' 'sliding'
+ case 131723: // 'for' 'tumbling'
+ parse_FLWORStatement();
+ break;
+ case 18074: // 'if' '('
+ parse_IfStatement();
+ break;
+ case 18168: // 'switch' '('
+ parse_SwitchStatement();
+ break;
+ case 144128: // 'try' '{'
+ parse_TryCatchStatement();
+ break;
+ case 18179: // 'typeswitch' '('
+ parse_TypeswitchStatement();
+ break;
+ case -12:
+ case 16140: // 'variable' '$'
+ parse_VarDeclStatement();
+ break;
+ case -13:
+ parse_WhileStatement();
+ break;
+ case 54: // ';'
+ parse_VoidStatement();
+ break;
+ default:
+ parse_ApplyStatement();
+ }
+ eventHandler.endNonterminal("Statement", e0);
+ }
+
+ function try_Statement()
+ {
+ switch (l1)
+ {
+ case 133: // 'exit'
+ lookahead2W(147); // S^WS | '#' | '(' | '(:' | 'returning'
+ break;
+ case 139: // 'for'
+ lookahead2W(179); // S^WS | '#' | '$' | '(' | '(:' | 'sliding' | 'tumbling'
+ break;
+ case 177: // 'let'
+ lookahead2W(166); // S^WS | '#' | '$' | '(' | '(:' | 'score'
+ break;
+ case 256: // 'try'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 268: // 'variable'
+ lookahead2W(143); // S^WS | '#' | '$' | '(' | '(:'
+ break;
+ case 281: // '{'
+ lookahead2W(283); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 31: // '$'
+ case 33: // '%'
+ lookahead2W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 87: // 'break'
+ case 103: // 'continue'
+ lookahead2W(145); // S^WS | '#' | '(' | '(:' | 'loop'
+ break;
+ case 154: // 'if'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ case 273: // 'while'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 6 // EQName^Token
+ && lk != 8 // IntegerLiteral
+ && lk != 9 // DecimalLiteral
+ && lk != 10 // DoubleLiteral
+ && lk != 11 // StringLiteral
+ && lk != 32 // '$$'
+ && lk != 35 // '('
+ && lk != 36 // '(#'
+ && lk != 41 // '+'
+ && lk != 43 // '-'
+ && lk != 47 // '/'
+ && lk != 48 // '//'
+ && lk != 54 // ';'
+ && lk != 55 // '<'
+ && lk != 56 // '<!--'
+ && lk != 60 // '<?'
+ && lk != 69 // '['
+ && lk != 71 // 'after'
+ && lk != 73 // 'allowing'
+ && lk != 74 // 'ancestor'
+ && lk != 75 // 'ancestor-or-self'
+ && lk != 76 // 'and'
+ && lk != 78 // 'append'
+ && lk != 79 // 'array'
+ && lk != 80 // 'as'
+ && lk != 81 // 'ascending'
+ && lk != 82 // 'at'
+ && lk != 83 // 'attribute'
+ && lk != 84 // 'base-uri'
+ && lk != 85 // 'before'
+ && lk != 86 // 'boundary-space'
+ && lk != 89 // 'case'
+ && lk != 90 // 'cast'
+ && lk != 91 // 'castable'
+ && lk != 92 // 'catch'
+ && lk != 94 // 'child'
+ && lk != 95 // 'collation'
+ && lk != 97 // 'comment'
+ && lk != 98 // 'constraint'
+ && lk != 99 // 'construction'
+ && lk != 102 // 'context'
+ && lk != 104 // 'copy'
+ && lk != 105 // 'copy-namespaces'
+ && lk != 106 // 'count'
+ && lk != 107 // 'decimal-format'
+ && lk != 109 // 'declare'
+ && lk != 110 // 'default'
+ && lk != 111 // 'delete'
+ && lk != 112 // 'descendant'
+ && lk != 113 // 'descendant-or-self'
+ && lk != 114 // 'descending'
+ && lk != 119 // 'div'
+ && lk != 120 // 'document'
+ && lk != 121 // 'document-node'
+ && lk != 122 // 'element'
+ && lk != 123 // 'else'
+ && lk != 124 // 'empty'
+ && lk != 125 // 'empty-sequence'
+ && lk != 126 // 'encoding'
+ && lk != 127 // 'end'
+ && lk != 129 // 'eq'
+ && lk != 130 // 'every'
+ && lk != 132 // 'except'
+ && lk != 134 // 'external'
+ && lk != 135 // 'false'
+ && lk != 136 // 'first'
+ && lk != 137 // 'following'
+ && lk != 138 // 'following-sibling'
+ && lk != 142 // 'from'
+ && lk != 143 // 'ft-option'
+ && lk != 147 // 'function'
+ && lk != 148 // 'ge'
+ && lk != 150 // 'group'
+ && lk != 152 // 'gt'
+ && lk != 153 // 'idiv'
+ && lk != 155 // 'import'
+ && lk != 156 // 'in'
+ && lk != 157 // 'index'
+ && lk != 161 // 'insert'
+ && lk != 162 // 'instance'
+ && lk != 163 // 'integrity'
+ && lk != 164 // 'intersect'
+ && lk != 165 // 'into'
+ && lk != 166 // 'is'
+ && lk != 167 // 'item'
+ && lk != 168 // 'json'
+ && lk != 169 // 'json-item'
+ && lk != 170 // 'jsoniq'
+ && lk != 173 // 'last'
+ && lk != 174 // 'lax'
+ && lk != 175 // 'le'
+ && lk != 179 // 'loop'
+ && lk != 181 // 'lt'
+ && lk != 183 // 'mod'
+ && lk != 184 // 'modify'
+ && lk != 185 // 'module'
+ && lk != 187 // 'namespace'
+ && lk != 188 // 'namespace-node'
+ && lk != 189 // 'ne'
+ && lk != 194 // 'node'
+ && lk != 195 // 'nodes'
+ && lk != 196 // 'not'
+ && lk != 197 // 'null'
+ && lk != 198 // 'object'
+ && lk != 202 // 'only'
+ && lk != 203 // 'option'
+ && lk != 204 // 'or'
+ && lk != 205 // 'order'
+ && lk != 206 // 'ordered'
+ && lk != 207 // 'ordering'
+ && lk != 210 // 'parent'
+ && lk != 216 // 'preceding'
+ && lk != 217 // 'preceding-sibling'
+ && lk != 220 // 'processing-instruction'
+ && lk != 222 // 'rename'
+ && lk != 223 // 'replace'
+ && lk != 224 // 'return'
+ && lk != 225 // 'returning'
+ && lk != 226 // 'revalidation'
+ && lk != 228 // 'satisfies'
+ && lk != 229 // 'schema'
+ && lk != 230 // 'schema-attribute'
+ && lk != 231 // 'schema-element'
+ && lk != 232 // 'score'
+ && lk != 233 // 'select'
+ && lk != 234 // 'self'
+ && lk != 239 // 'sliding'
+ && lk != 240 // 'some'
+ && lk != 241 // 'stable'
+ && lk != 242 // 'start'
+ && lk != 245 // 'strict'
+ && lk != 247 // 'structured-item'
+ && lk != 249 // 'text'
+ && lk != 253 // 'to'
+ && lk != 254 // 'treat'
+ && lk != 255 // 'true'
+ && lk != 257 // 'tumbling'
+ && lk != 258 // 'type'
+ && lk != 260 // 'union'
+ && lk != 262 // 'unordered'
+ && lk != 263 // 'updating'
+ && lk != 266 // 'validate'
+ && lk != 267 // 'value'
+ && lk != 269 // 'version'
+ && lk != 272 // 'where'
+ && lk != 276 // 'with'
+ && lk != 283 // '{|'
+ && lk != 10009 // '{' NCName^Token
+ && lk != 14935 // 'break' '#'
+ && lk != 14951 // 'continue' '#'
+ && lk != 14981 // 'exit' '#'
+ && lk != 14987 // 'for' '#'
+ && lk != 15002 // 'if' '#'
+ && lk != 15025 // 'let' '#'
+ && lk != 15096 // 'switch' '#'
+ && lk != 15104 // 'try' '#'
+ && lk != 15107 // 'typeswitch' '#'
+ && lk != 15116 // 'variable' '#'
+ && lk != 15121 // 'while' '#'
+ && lk != 16011 // 'for' '$'
+ && lk != 16049 // 'let' '$'
+ && lk != 16140 // 'variable' '$'
+ && lk != 18007 // 'break' '('
+ && lk != 18023 // 'continue' '('
+ && lk != 18053 // 'exit' '('
+ && lk != 18059 // 'for' '('
+ && lk != 18074 // 'if' '('
+ && lk != 18097 // 'let' '('
+ && lk != 18168 // 'switch' '('
+ && lk != 18176 // 'try' '('
+ && lk != 18179 // 'typeswitch' '('
+ && lk != 18188 // 'variable' '('
+ && lk != 91735 // 'break' 'loop'
+ && lk != 91751 // 'continue' 'loop'
+ && lk != 115333 // 'exit' 'returning'
+ && lk != 118961 // 'let' 'score'
+ && lk != 122507 // 'for' 'sliding'
+ && lk != 131723 // 'for' 'tumbling'
+ && lk != 144128 // 'try' '{'
+ && lk != 147225) // '{' '}'
+ {
+ lk = memoized(9, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_ApplyStatement();
+ memoize(9, e0A, -1);
+ lk = -15;
+ }
+ catch (p1A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_AssignStatement();
+ memoize(9, e0A, -2);
+ lk = -15;
+ }
+ catch (p2A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_BlockStatement();
+ memoize(9, e0A, -3);
+ lk = -15;
+ }
+ catch (p3A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_VarDeclStatement();
+ memoize(9, e0A, -12);
+ lk = -15;
+ }
+ catch (p12A)
+ {
+ lk = -13;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(9, e0A, -13);
+ }
+ }
+ }
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -2:
+ try_AssignStatement();
+ break;
+ case -3:
+ try_BlockStatement();
+ break;
+ case 91735: // 'break' 'loop'
+ try_BreakStatement();
+ break;
+ case 91751: // 'continue' 'loop'
+ try_ContinueStatement();
+ break;
+ case 115333: // 'exit' 'returning'
+ try_ExitStatement();
+ break;
+ case 16011: // 'for' '$'
+ case 16049: // 'let' '$'
+ case 118961: // 'let' 'score'
+ case 122507: // 'for' 'sliding'
+ case 131723: // 'for' 'tumbling'
+ try_FLWORStatement();
+ break;
+ case 18074: // 'if' '('
+ try_IfStatement();
+ break;
+ case 18168: // 'switch' '('
+ try_SwitchStatement();
+ break;
+ case 144128: // 'try' '{'
+ try_TryCatchStatement();
+ break;
+ case 18179: // 'typeswitch' '('
+ try_TypeswitchStatement();
+ break;
+ case -12:
+ case 16140: // 'variable' '$'
+ try_VarDeclStatement();
+ break;
+ case -13:
+ try_WhileStatement();
+ break;
+ case 54: // ';'
+ try_VoidStatement();
+ break;
+ case -15:
+ break;
+ default:
+ try_ApplyStatement();
+ }
+ }
+
+ function parse_ApplyStatement()
+ {
+ eventHandler.startNonterminal("ApplyStatement", e0);
+ parse_ExprSimple();
+ shift(54); // ';'
+ eventHandler.endNonterminal("ApplyStatement", e0);
+ }
+
+ function try_ApplyStatement()
+ {
+ try_ExprSimple();
+ shiftT(54); // ';'
+ }
+
+ function parse_AssignStatement()
+ {
+ eventHandler.startNonterminal("AssignStatement", e0);
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shift(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(54); // ';'
+ eventHandler.endNonterminal("AssignStatement", e0);
+ }
+
+ function try_AssignStatement()
+ {
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shiftT(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(54); // ';'
+ }
+
+ function parse_BlockStatement()
+ {
+ eventHandler.startNonterminal("BlockStatement", e0);
+ shift(281); // '{'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ lookahead1W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statements();
+ shift(287); // '}'
+ eventHandler.endNonterminal("BlockStatement", e0);
+ }
+
+ function try_BlockStatement()
+ {
+ shiftT(281); // '{'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ lookahead1W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statements();
+ shiftT(287); // '}'
+ }
+
+ function parse_BreakStatement()
+ {
+ eventHandler.startNonterminal("BreakStatement", e0);
+ shift(87); // 'break'
+ lookahead1W(62); // S^WS | '(:' | 'loop'
+ shift(179); // 'loop'
+ lookahead1W(29); // S^WS | '(:' | ';'
+ shift(54); // ';'
+ eventHandler.endNonterminal("BreakStatement", e0);
+ }
+
+ function try_BreakStatement()
+ {
+ shiftT(87); // 'break'
+ lookahead1W(62); // S^WS | '(:' | 'loop'
+ shiftT(179); // 'loop'
+ lookahead1W(29); // S^WS | '(:' | ';'
+ shiftT(54); // ';'
+ }
+
+ function parse_ContinueStatement()
+ {
+ eventHandler.startNonterminal("ContinueStatement", e0);
+ shift(103); // 'continue'
+ lookahead1W(62); // S^WS | '(:' | 'loop'
+ shift(179); // 'loop'
+ lookahead1W(29); // S^WS | '(:' | ';'
+ shift(54); // ';'
+ eventHandler.endNonterminal("ContinueStatement", e0);
+ }
+
+ function try_ContinueStatement()
+ {
+ shiftT(103); // 'continue'
+ lookahead1W(62); // S^WS | '(:' | 'loop'
+ shiftT(179); // 'loop'
+ lookahead1W(29); // S^WS | '(:' | ';'
+ shiftT(54); // ';'
+ }
+
+ function parse_ExitStatement()
+ {
+ eventHandler.startNonterminal("ExitStatement", e0);
+ shift(133); // 'exit'
+ lookahead1W(74); // S^WS | '(:' | 'returning'
+ shift(225); // 'returning'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(54); // ';'
+ eventHandler.endNonterminal("ExitStatement", e0);
+ }
+
+ function try_ExitStatement()
+ {
+ shiftT(133); // 'exit'
+ lookahead1W(74); // S^WS | '(:' | 'returning'
+ shiftT(225); // 'returning'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(54); // ';'
+ }
+
+ function parse_FLWORStatement()
+ {
+ eventHandler.startNonterminal("FLWORStatement", e0);
+ parse_InitialClause();
+ for (;;)
+ {
+ lookahead1W(195); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ if (l1 == 224) // 'return'
+ {
+ break;
+ }
+ whitespace();
+ parse_IntermediateClause();
+ }
+ whitespace();
+ parse_ReturnStatement();
+ eventHandler.endNonterminal("FLWORStatement", e0);
+ }
+
+ function try_FLWORStatement()
+ {
+ try_InitialClause();
+ for (;;)
+ {
+ lookahead1W(195); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ if (l1 == 224) // 'return'
+ {
+ break;
+ }
+ try_IntermediateClause();
+ }
+ try_ReturnStatement();
+ }
+
+ function parse_ReturnStatement()
+ {
+ eventHandler.startNonterminal("ReturnStatement", e0);
+ shift(224); // 'return'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("ReturnStatement", e0);
+ }
+
+ function try_ReturnStatement()
+ {
+ shiftT(224); // 'return'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_IfStatement()
+ {
+ eventHandler.startNonterminal("IfStatement", e0);
+ shift(154); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ lookahead1W(80); // S^WS | '(:' | 'then'
+ shift(250); // 'then'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ lookahead1W(51); // S^WS | '(:' | 'else'
+ shift(123); // 'else'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("IfStatement", e0);
+ }
+
+ function try_IfStatement()
+ {
+ shiftT(154); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ lookahead1W(80); // S^WS | '(:' | 'then'
+ shiftT(250); // 'then'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ lookahead1W(51); // S^WS | '(:' | 'else'
+ shiftT(123); // 'else'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_SwitchStatement()
+ {
+ eventHandler.startNonterminal("SwitchStatement", e0);
+ shift(248); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_SwitchCaseStatement();
+ lookahead1W(117); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shift(110); // 'default'
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shift(224); // 'return'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("SwitchStatement", e0);
+ }
+
+ function try_SwitchStatement()
+ {
+ shiftT(248); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ try_SwitchCaseStatement();
+ lookahead1W(117); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(110); // 'default'
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shiftT(224); // 'return'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_SwitchCaseStatement()
+ {
+ eventHandler.startNonterminal("SwitchCaseStatement", e0);
+ for (;;)
+ {
+ shift(89); // 'case'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_SwitchCaseOperand();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shift(224); // 'return'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("SwitchCaseStatement", e0);
+ }
+
+ function try_SwitchCaseStatement()
+ {
+ for (;;)
+ {
+ shiftT(89); // 'case'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_SwitchCaseOperand();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(224); // 'return'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_TryCatchStatement()
+ {
+ eventHandler.startNonterminal("TryCatchStatement", e0);
+ shift(256); // 'try'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockStatement();
+ for (;;)
+ {
+ lookahead1W(39); // S^WS | '(:' | 'catch'
+ shift(92); // 'catch'
+ lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_CatchErrorList();
+ whitespace();
+ parse_BlockStatement();
+ lookahead1W(284); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 92: // 'catch'
+ lookahead2W(256); // Wildcard | EQName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 2652 // 'catch' Wildcard
+ && lk != 3164 // 'catch' EQName^Token
+ && lk != 36444 // 'catch' 'after'
+ && lk != 37468 // 'catch' 'allowing'
+ && lk != 37980 // 'catch' 'ancestor'
+ && lk != 38492 // 'catch' 'ancestor-or-self'
+ && lk != 39004 // 'catch' 'and'
+ && lk != 40028 // 'catch' 'append'
+ && lk != 40540 // 'catch' 'array'
+ && lk != 41052 // 'catch' 'as'
+ && lk != 41564 // 'catch' 'ascending'
+ && lk != 42076 // 'catch' 'at'
+ && lk != 42588 // 'catch' 'attribute'
+ && lk != 43100 // 'catch' 'base-uri'
+ && lk != 43612 // 'catch' 'before'
+ && lk != 44124 // 'catch' 'boundary-space'
+ && lk != 44636 // 'catch' 'break'
+ && lk != 45660 // 'catch' 'case'
+ && lk != 46172 // 'catch' 'cast'
+ && lk != 46684 // 'catch' 'castable'
+ && lk != 47196 // 'catch' 'catch'
+ && lk != 48220 // 'catch' 'child'
+ && lk != 48732 // 'catch' 'collation'
+ && lk != 49756 // 'catch' 'comment'
+ && lk != 50268 // 'catch' 'constraint'
+ && lk != 50780 // 'catch' 'construction'
+ && lk != 52316 // 'catch' 'context'
+ && lk != 52828 // 'catch' 'continue'
+ && lk != 53340 // 'catch' 'copy'
+ && lk != 53852 // 'catch' 'copy-namespaces'
+ && lk != 54364 // 'catch' 'count'
+ && lk != 54876 // 'catch' 'decimal-format'
+ && lk != 55900 // 'catch' 'declare'
+ && lk != 56412 // 'catch' 'default'
+ && lk != 56924 // 'catch' 'delete'
+ && lk != 57436 // 'catch' 'descendant'
+ && lk != 57948 // 'catch' 'descendant-or-self'
+ && lk != 58460 // 'catch' 'descending'
+ && lk != 61020 // 'catch' 'div'
+ && lk != 61532 // 'catch' 'document'
+ && lk != 62044 // 'catch' 'document-node'
+ && lk != 62556 // 'catch' 'element'
+ && lk != 63068 // 'catch' 'else'
+ && lk != 63580 // 'catch' 'empty'
+ && lk != 64092 // 'catch' 'empty-sequence'
+ && lk != 64604 // 'catch' 'encoding'
+ && lk != 65116 // 'catch' 'end'
+ && lk != 66140 // 'catch' 'eq'
+ && lk != 66652 // 'catch' 'every'
+ && lk != 67676 // 'catch' 'except'
+ && lk != 68188 // 'catch' 'exit'
+ && lk != 68700 // 'catch' 'external'
+ && lk != 69212 // 'catch' 'false'
+ && lk != 69724 // 'catch' 'first'
+ && lk != 70236 // 'catch' 'following'
+ && lk != 70748 // 'catch' 'following-sibling'
+ && lk != 71260 // 'catch' 'for'
+ && lk != 72796 // 'catch' 'from'
+ && lk != 73308 // 'catch' 'ft-option'
+ && lk != 75356 // 'catch' 'function'
+ && lk != 75868 // 'catch' 'ge'
+ && lk != 76892 // 'catch' 'group'
+ && lk != 77916 // 'catch' 'gt'
+ && lk != 78428 // 'catch' 'idiv'
+ && lk != 78940 // 'catch' 'if'
+ && lk != 79452 // 'catch' 'import'
+ && lk != 79964 // 'catch' 'in'
+ && lk != 80476 // 'catch' 'index'
+ && lk != 82524 // 'catch' 'insert'
+ && lk != 83036 // 'catch' 'instance'
+ && lk != 83548 // 'catch' 'integrity'
+ && lk != 84060 // 'catch' 'intersect'
+ && lk != 84572 // 'catch' 'into'
+ && lk != 85084 // 'catch' 'is'
+ && lk != 85596 // 'catch' 'item'
+ && lk != 86108 // 'catch' 'json'
+ && lk != 86620 // 'catch' 'json-item'
+ && lk != 87132 // 'catch' 'jsoniq'
+ && lk != 88668 // 'catch' 'last'
+ && lk != 89180 // 'catch' 'lax'
+ && lk != 89692 // 'catch' 'le'
+ && lk != 90716 // 'catch' 'let'
+ && lk != 91740 // 'catch' 'loop'
+ && lk != 92764 // 'catch' 'lt'
+ && lk != 93788 // 'catch' 'mod'
+ && lk != 94300 // 'catch' 'modify'
+ && lk != 94812 // 'catch' 'module'
+ && lk != 95836 // 'catch' 'namespace'
+ && lk != 96348 // 'catch' 'namespace-node'
+ && lk != 96860 // 'catch' 'ne'
+ && lk != 99420 // 'catch' 'node'
+ && lk != 99932 // 'catch' 'nodes'
+ && lk != 100956 // 'catch' 'null'
+ && lk != 101468 // 'catch' 'object'
+ && lk != 103516 // 'catch' 'only'
+ && lk != 104028 // 'catch' 'option'
+ && lk != 104540 // 'catch' 'or'
+ && lk != 105052 // 'catch' 'order'
+ && lk != 105564 // 'catch' 'ordered'
+ && lk != 106076 // 'catch' 'ordering'
+ && lk != 107612 // 'catch' 'parent'
+ && lk != 110684 // 'catch' 'preceding'
+ && lk != 111196 // 'catch' 'preceding-sibling'
+ && lk != 112732 // 'catch' 'processing-instruction'
+ && lk != 113756 // 'catch' 'rename'
+ && lk != 114268 // 'catch' 'replace'
+ && lk != 114780 // 'catch' 'return'
+ && lk != 115292 // 'catch' 'returning'
+ && lk != 115804 // 'catch' 'revalidation'
+ && lk != 116828 // 'catch' 'satisfies'
+ && lk != 117340 // 'catch' 'schema'
+ && lk != 117852 // 'catch' 'schema-attribute'
+ && lk != 118364 // 'catch' 'schema-element'
+ && lk != 118876 // 'catch' 'score'
+ && lk != 119388 // 'catch' 'select'
+ && lk != 119900 // 'catch' 'self'
+ && lk != 122460 // 'catch' 'sliding'
+ && lk != 122972 // 'catch' 'some'
+ && lk != 123484 // 'catch' 'stable'
+ && lk != 123996 // 'catch' 'start'
+ && lk != 125532 // 'catch' 'strict'
+ && lk != 126556 // 'catch' 'structured-item'
+ && lk != 127068 // 'catch' 'switch'
+ && lk != 127580 // 'catch' 'text'
+ && lk != 129628 // 'catch' 'to'
+ && lk != 130140 // 'catch' 'treat'
+ && lk != 130652 // 'catch' 'true'
+ && lk != 131164 // 'catch' 'try'
+ && lk != 131676 // 'catch' 'tumbling'
+ && lk != 132188 // 'catch' 'type'
+ && lk != 132700 // 'catch' 'typeswitch'
+ && lk != 133212 // 'catch' 'union'
+ && lk != 134236 // 'catch' 'unordered'
+ && lk != 134748 // 'catch' 'updating'
+ && lk != 136284 // 'catch' 'validate'
+ && lk != 136796 // 'catch' 'value'
+ && lk != 137308 // 'catch' 'variable'
+ && lk != 137820 // 'catch' 'version'
+ && lk != 139356 // 'catch' 'where'
+ && lk != 139868 // 'catch' 'while'
+ && lk != 141404) // 'catch' 'with'
+ {
+ break;
+ }
+ }
+ eventHandler.endNonterminal("TryCatchStatement", e0);
+ }
+
+ function try_TryCatchStatement()
+ {
+ shiftT(256); // 'try'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ try_BlockStatement();
+ for (;;)
+ {
+ lookahead1W(39); // S^WS | '(:' | 'catch'
+ shiftT(92); // 'catch'
+ lookahead1W(249); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CatchErrorList();
+ try_BlockStatement();
+ lookahead1W(284); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 92: // 'catch'
+ lookahead2W(256); // Wildcard | EQName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 2652 // 'catch' Wildcard
+ && lk != 3164 // 'catch' EQName^Token
+ && lk != 36444 // 'catch' 'after'
+ && lk != 37468 // 'catch' 'allowing'
+ && lk != 37980 // 'catch' 'ancestor'
+ && lk != 38492 // 'catch' 'ancestor-or-self'
+ && lk != 39004 // 'catch' 'and'
+ && lk != 40028 // 'catch' 'append'
+ && lk != 40540 // 'catch' 'array'
+ && lk != 41052 // 'catch' 'as'
+ && lk != 41564 // 'catch' 'ascending'
+ && lk != 42076 // 'catch' 'at'
+ && lk != 42588 // 'catch' 'attribute'
+ && lk != 43100 // 'catch' 'base-uri'
+ && lk != 43612 // 'catch' 'before'
+ && lk != 44124 // 'catch' 'boundary-space'
+ && lk != 44636 // 'catch' 'break'
+ && lk != 45660 // 'catch' 'case'
+ && lk != 46172 // 'catch' 'cast'
+ && lk != 46684 // 'catch' 'castable'
+ && lk != 47196 // 'catch' 'catch'
+ && lk != 48220 // 'catch' 'child'
+ && lk != 48732 // 'catch' 'collation'
+ && lk != 49756 // 'catch' 'comment'
+ && lk != 50268 // 'catch' 'constraint'
+ && lk != 50780 // 'catch' 'construction'
+ && lk != 52316 // 'catch' 'context'
+ && lk != 52828 // 'catch' 'continue'
+ && lk != 53340 // 'catch' 'copy'
+ && lk != 53852 // 'catch' 'copy-namespaces'
+ && lk != 54364 // 'catch' 'count'
+ && lk != 54876 // 'catch' 'decimal-format'
+ && lk != 55900 // 'catch' 'declare'
+ && lk != 56412 // 'catch' 'default'
+ && lk != 56924 // 'catch' 'delete'
+ && lk != 57436 // 'catch' 'descendant'
+ && lk != 57948 // 'catch' 'descendant-or-self'
+ && lk != 58460 // 'catch' 'descending'
+ && lk != 61020 // 'catch' 'div'
+ && lk != 61532 // 'catch' 'document'
+ && lk != 62044 // 'catch' 'document-node'
+ && lk != 62556 // 'catch' 'element'
+ && lk != 63068 // 'catch' 'else'
+ && lk != 63580 // 'catch' 'empty'
+ && lk != 64092 // 'catch' 'empty-sequence'
+ && lk != 64604 // 'catch' 'encoding'
+ && lk != 65116 // 'catch' 'end'
+ && lk != 66140 // 'catch' 'eq'
+ && lk != 66652 // 'catch' 'every'
+ && lk != 67676 // 'catch' 'except'
+ && lk != 68188 // 'catch' 'exit'
+ && lk != 68700 // 'catch' 'external'
+ && lk != 69212 // 'catch' 'false'
+ && lk != 69724 // 'catch' 'first'
+ && lk != 70236 // 'catch' 'following'
+ && lk != 70748 // 'catch' 'following-sibling'
+ && lk != 71260 // 'catch' 'for'
+ && lk != 72796 // 'catch' 'from'
+ && lk != 73308 // 'catch' 'ft-option'
+ && lk != 75356 // 'catch' 'function'
+ && lk != 75868 // 'catch' 'ge'
+ && lk != 76892 // 'catch' 'group'
+ && lk != 77916 // 'catch' 'gt'
+ && lk != 78428 // 'catch' 'idiv'
+ && lk != 78940 // 'catch' 'if'
+ && lk != 79452 // 'catch' 'import'
+ && lk != 79964 // 'catch' 'in'
+ && lk != 80476 // 'catch' 'index'
+ && lk != 82524 // 'catch' 'insert'
+ && lk != 83036 // 'catch' 'instance'
+ && lk != 83548 // 'catch' 'integrity'
+ && lk != 84060 // 'catch' 'intersect'
+ && lk != 84572 // 'catch' 'into'
+ && lk != 85084 // 'catch' 'is'
+ && lk != 85596 // 'catch' 'item'
+ && lk != 86108 // 'catch' 'json'
+ && lk != 86620 // 'catch' 'json-item'
+ && lk != 87132 // 'catch' 'jsoniq'
+ && lk != 88668 // 'catch' 'last'
+ && lk != 89180 // 'catch' 'lax'
+ && lk != 89692 // 'catch' 'le'
+ && lk != 90716 // 'catch' 'let'
+ && lk != 91740 // 'catch' 'loop'
+ && lk != 92764 // 'catch' 'lt'
+ && lk != 93788 // 'catch' 'mod'
+ && lk != 94300 // 'catch' 'modify'
+ && lk != 94812 // 'catch' 'module'
+ && lk != 95836 // 'catch' 'namespace'
+ && lk != 96348 // 'catch' 'namespace-node'
+ && lk != 96860 // 'catch' 'ne'
+ && lk != 99420 // 'catch' 'node'
+ && lk != 99932 // 'catch' 'nodes'
+ && lk != 100956 // 'catch' 'null'
+ && lk != 101468 // 'catch' 'object'
+ && lk != 103516 // 'catch' 'only'
+ && lk != 104028 // 'catch' 'option'
+ && lk != 104540 // 'catch' 'or'
+ && lk != 105052 // 'catch' 'order'
+ && lk != 105564 // 'catch' 'ordered'
+ && lk != 106076 // 'catch' 'ordering'
+ && lk != 107612 // 'catch' 'parent'
+ && lk != 110684 // 'catch' 'preceding'
+ && lk != 111196 // 'catch' 'preceding-sibling'
+ && lk != 112732 // 'catch' 'processing-instruction'
+ && lk != 113756 // 'catch' 'rename'
+ && lk != 114268 // 'catch' 'replace'
+ && lk != 114780 // 'catch' 'return'
+ && lk != 115292 // 'catch' 'returning'
+ && lk != 115804 // 'catch' 'revalidation'
+ && lk != 116828 // 'catch' 'satisfies'
+ && lk != 117340 // 'catch' 'schema'
+ && lk != 117852 // 'catch' 'schema-attribute'
+ && lk != 118364 // 'catch' 'schema-element'
+ && lk != 118876 // 'catch' 'score'
+ && lk != 119388 // 'catch' 'select'
+ && lk != 119900 // 'catch' 'self'
+ && lk != 122460 // 'catch' 'sliding'
+ && lk != 122972 // 'catch' 'some'
+ && lk != 123484 // 'catch' 'stable'
+ && lk != 123996 // 'catch' 'start'
+ && lk != 125532 // 'catch' 'strict'
+ && lk != 126556 // 'catch' 'structured-item'
+ && lk != 127068 // 'catch' 'switch'
+ && lk != 127580 // 'catch' 'text'
+ && lk != 129628 // 'catch' 'to'
+ && lk != 130140 // 'catch' 'treat'
+ && lk != 130652 // 'catch' 'true'
+ && lk != 131164 // 'catch' 'try'
+ && lk != 131676 // 'catch' 'tumbling'
+ && lk != 132188 // 'catch' 'type'
+ && lk != 132700 // 'catch' 'typeswitch'
+ && lk != 133212 // 'catch' 'union'
+ && lk != 134236 // 'catch' 'unordered'
+ && lk != 134748 // 'catch' 'updating'
+ && lk != 136284 // 'catch' 'validate'
+ && lk != 136796 // 'catch' 'value'
+ && lk != 137308 // 'catch' 'variable'
+ && lk != 137820 // 'catch' 'version'
+ && lk != 139356 // 'catch' 'where'
+ && lk != 139868 // 'catch' 'while'
+ && lk != 141404) // 'catch' 'with'
+ {
+ break;
+ }
+ }
+ }
+
+ function parse_TypeswitchStatement()
+ {
+ eventHandler.startNonterminal("TypeswitchStatement", e0);
+ shift(259); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_CaseStatement();
+ lookahead1W(117); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shift(110); // 'default'
+ lookahead1W(99); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ }
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shift(224); // 'return'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("TypeswitchStatement", e0);
+ }
+
+ function try_TypeswitchStatement()
+ {
+ shiftT(259); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ try_CaseStatement();
+ lookahead1W(117); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(110); // 'default'
+ lookahead1W(99); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shiftT(224); // 'return'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_CaseStatement()
+ {
+ eventHandler.startNonterminal("CaseStatement", e0);
+ shift(89); // 'case'
+ lookahead1W(258); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shift(80); // 'as'
+ }
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shift(224); // 'return'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("CaseStatement", e0);
+ }
+
+ function try_CaseStatement()
+ {
+ shiftT(89); // 'case'
+ lookahead1W(258); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shiftT(80); // 'as'
+ }
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shiftT(224); // 'return'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_VarDeclStatement()
+ {
+ eventHandler.startNonterminal("VarDeclStatement", e0);
+ for (;;)
+ {
+ lookahead1W(102); // S^WS | '%' | '(:' | 'variable'
+ if (l1 != 33) // '%'
+ {
+ break;
+ }
+ whitespace();
+ parse_Annotation();
+ }
+ shift(268); // 'variable'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(172); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(155); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 53) // ':='
+ {
+ shift(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(172); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(155); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 53) // ':='
+ {
+ shift(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ }
+ shift(54); // ';'
+ eventHandler.endNonterminal("VarDeclStatement", e0);
+ }
+
+ function try_VarDeclStatement()
+ {
+ for (;;)
+ {
+ lookahead1W(102); // S^WS | '%' | '(:' | 'variable'
+ if (l1 != 33) // '%'
+ {
+ break;
+ }
+ try_Annotation();
+ }
+ shiftT(268); // 'variable'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(172); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(155); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 53) // ':='
+ {
+ shiftT(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(172); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(155); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 53) // ':='
+ {
+ shiftT(53); // ':='
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ }
+ shiftT(54); // ';'
+ }
+
+ function parse_WhileStatement()
+ {
+ eventHandler.startNonterminal("WhileStatement", e0);
+ shift(273); // 'while'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("WhileStatement", e0);
+ }
+
+ function try_WhileStatement()
+ {
+ shiftT(273); // 'while'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_VoidStatement()
+ {
+ eventHandler.startNonterminal("VoidStatement", e0);
+ shift(54); // ';'
+ eventHandler.endNonterminal("VoidStatement", e0);
+ }
+
+ function try_VoidStatement()
+ {
+ shiftT(54); // ';'
+ }
+
+ function parse_ExprSingle()
+ {
+ eventHandler.startNonterminal("ExprSingle", e0);
+ switch (l1)
+ {
+ case 139: // 'for'
+ lookahead2W(179); // S^WS | '#' | '$' | '(' | '(:' | 'sliding' | 'tumbling'
+ break;
+ case 177: // 'let'
+ lookahead2W(166); // S^WS | '#' | '$' | '(' | '(:' | 'score'
+ break;
+ case 256: // 'try'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 154: // 'if'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16011: // 'for' '$'
+ case 16049: // 'let' '$'
+ case 118961: // 'let' 'score'
+ case 122507: // 'for' 'sliding'
+ case 131723: // 'for' 'tumbling'
+ parse_FLWORExpr();
+ break;
+ case 18074: // 'if' '('
+ parse_IfExpr();
+ break;
+ case 18168: // 'switch' '('
+ parse_SwitchExpr();
+ break;
+ case 144128: // 'try' '{'
+ parse_TryCatchExpr();
+ break;
+ case 18179: // 'typeswitch' '('
+ parse_TypeswitchExpr();
+ break;
+ default:
+ parse_ExprSimple();
+ }
+ eventHandler.endNonterminal("ExprSingle", e0);
+ }
+
+ function try_ExprSingle()
+ {
+ switch (l1)
+ {
+ case 139: // 'for'
+ lookahead2W(179); // S^WS | '#' | '$' | '(' | '(:' | 'sliding' | 'tumbling'
+ break;
+ case 177: // 'let'
+ lookahead2W(166); // S^WS | '#' | '$' | '(' | '(:' | 'score'
+ break;
+ case 256: // 'try'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 154: // 'if'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16011: // 'for' '$'
+ case 16049: // 'let' '$'
+ case 118961: // 'let' 'score'
+ case 122507: // 'for' 'sliding'
+ case 131723: // 'for' 'tumbling'
+ try_FLWORExpr();
+ break;
+ case 18074: // 'if' '('
+ try_IfExpr();
+ break;
+ case 18168: // 'switch' '('
+ try_SwitchExpr();
+ break;
+ case 144128: // 'try' '{'
+ try_TryCatchExpr();
+ break;
+ case 18179: // 'typeswitch' '('
+ try_TypeswitchExpr();
+ break;
+ default:
+ try_ExprSimple();
+ }
+ }
+
+ function parse_ExprSimple()
+ {
+ eventHandler.startNonterminal("ExprSimple", e0);
+ switch (l1)
+ {
+ case 78: // 'append'
+ lookahead2W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 161: // 'insert'
+ lookahead2W(276); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 223: // 'replace'
+ lookahead2W(170); // S^WS | '#' | '(' | '(:' | 'node' | 'value'
+ break;
+ case 111: // 'delete'
+ case 222: // 'rename'
+ lookahead2W(261); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 104: // 'copy'
+ case 130: // 'every'
+ case 240: // 'some'
+ lookahead2W(143); // S^WS | '#' | '$' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 17998 // 'append' '('
+ || lk == 18031 // 'delete' '('
+ || lk == 18081 // 'insert' '('
+ || lk == 18142 // 'rename' '('
+ || lk == 99439 // 'delete' 'node'
+ || lk == 99489 // 'insert' 'node'
+ || lk == 99550 // 'rename' 'node'
+ || lk == 99951 // 'delete' 'nodes'
+ || lk == 100001 // 'insert' 'nodes'
+ || lk == 136927) // 'replace' 'value'
+ {
+ lk = memoized(10, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_OrExpr();
+ lk = -2;
+ }
+ catch (p2A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_InsertExpr();
+ lk = -3;
+ }
+ catch (p3A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_DeleteExpr();
+ lk = -4;
+ }
+ catch (p4A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_RenameExpr();
+ lk = -5;
+ }
+ catch (p5A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_ReplaceExpr();
+ lk = -6;
+ }
+ catch (p6A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_JSONDeleteExpr();
+ lk = -8;
+ }
+ catch (p8A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_JSONInsertExpr();
+ lk = -9;
+ }
+ catch (p9A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_JSONRenameExpr();
+ lk = -10;
+ }
+ catch (p10A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_JSONReplaceExpr();
+ lk = -11;
+ }
+ catch (p11A)
+ {
+ lk = -12;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(10, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case 16002: // 'every' '$'
+ case 16112: // 'some' '$'
+ parse_QuantifiedExpr();
+ break;
+ case -3:
+ parse_InsertExpr();
+ break;
+ case -4:
+ parse_DeleteExpr();
+ break;
+ case -5:
+ parse_RenameExpr();
+ break;
+ case -6:
+ case 99551: // 'replace' 'node'
+ parse_ReplaceExpr();
+ break;
+ case 15976: // 'copy' '$'
+ parse_TransformExpr();
+ break;
+ case -8:
+ case 3183: // 'delete' EQName^Token
+ case 4207: // 'delete' IntegerLiteral
+ case 4719: // 'delete' DecimalLiteral
+ case 5231: // 'delete' DoubleLiteral
+ case 5743: // 'delete' StringLiteral
+ case 15983: // 'delete' '$'
+ case 16495: // 'delete' '$$'
+ case 17007: // 'delete' '%'
+ case 28271: // 'delete' '<'
+ case 28783: // 'delete' '<!--'
+ case 30831: // 'delete' '<?'
+ case 35439: // 'delete' '['
+ case 36463: // 'delete' 'after'
+ case 37487: // 'delete' 'allowing'
+ case 37999: // 'delete' 'ancestor'
+ case 38511: // 'delete' 'ancestor-or-self'
+ case 39023: // 'delete' 'and'
+ case 40047: // 'delete' 'append'
+ case 40559: // 'delete' 'array'
+ case 41071: // 'delete' 'as'
+ case 41583: // 'delete' 'ascending'
+ case 42095: // 'delete' 'at'
+ case 42607: // 'delete' 'attribute'
+ case 43119: // 'delete' 'base-uri'
+ case 43631: // 'delete' 'before'
+ case 44143: // 'delete' 'boundary-space'
+ case 44655: // 'delete' 'break'
+ case 45679: // 'delete' 'case'
+ case 46191: // 'delete' 'cast'
+ case 46703: // 'delete' 'castable'
+ case 47215: // 'delete' 'catch'
+ case 48239: // 'delete' 'child'
+ case 48751: // 'delete' 'collation'
+ case 49775: // 'delete' 'comment'
+ case 50287: // 'delete' 'constraint'
+ case 50799: // 'delete' 'construction'
+ case 52335: // 'delete' 'context'
+ case 52847: // 'delete' 'continue'
+ case 53359: // 'delete' 'copy'
+ case 53871: // 'delete' 'copy-namespaces'
+ case 54383: // 'delete' 'count'
+ case 54895: // 'delete' 'decimal-format'
+ case 55919: // 'delete' 'declare'
+ case 56431: // 'delete' 'default'
+ case 56943: // 'delete' 'delete'
+ case 57455: // 'delete' 'descendant'
+ case 57967: // 'delete' 'descendant-or-self'
+ case 58479: // 'delete' 'descending'
+ case 61039: // 'delete' 'div'
+ case 61551: // 'delete' 'document'
+ case 62063: // 'delete' 'document-node'
+ case 62575: // 'delete' 'element'
+ case 63087: // 'delete' 'else'
+ case 63599: // 'delete' 'empty'
+ case 64111: // 'delete' 'empty-sequence'
+ case 64623: // 'delete' 'encoding'
+ case 65135: // 'delete' 'end'
+ case 66159: // 'delete' 'eq'
+ case 66671: // 'delete' 'every'
+ case 67695: // 'delete' 'except'
+ case 68207: // 'delete' 'exit'
+ case 68719: // 'delete' 'external'
+ case 69231: // 'delete' 'false'
+ case 69743: // 'delete' 'first'
+ case 70255: // 'delete' 'following'
+ case 70767: // 'delete' 'following-sibling'
+ case 71279: // 'delete' 'for'
+ case 72815: // 'delete' 'from'
+ case 73327: // 'delete' 'ft-option'
+ case 75375: // 'delete' 'function'
+ case 75887: // 'delete' 'ge'
+ case 76911: // 'delete' 'group'
+ case 77935: // 'delete' 'gt'
+ case 78447: // 'delete' 'idiv'
+ case 78959: // 'delete' 'if'
+ case 79471: // 'delete' 'import'
+ case 79983: // 'delete' 'in'
+ case 80495: // 'delete' 'index'
+ case 82543: // 'delete' 'insert'
+ case 83055: // 'delete' 'instance'
+ case 83567: // 'delete' 'integrity'
+ case 84079: // 'delete' 'intersect'
+ case 84591: // 'delete' 'into'
+ case 85103: // 'delete' 'is'
+ case 85615: // 'delete' 'item'
+ case 86127: // 'delete' 'json'
+ case 86639: // 'delete' 'json-item'
+ case 87151: // 'delete' 'jsoniq'
+ case 88687: // 'delete' 'last'
+ case 89199: // 'delete' 'lax'
+ case 89711: // 'delete' 'le'
+ case 90735: // 'delete' 'let'
+ case 91759: // 'delete' 'loop'
+ case 92783: // 'delete' 'lt'
+ case 93807: // 'delete' 'mod'
+ case 94319: // 'delete' 'modify'
+ case 94831: // 'delete' 'module'
+ case 95855: // 'delete' 'namespace'
+ case 96367: // 'delete' 'namespace-node'
+ case 96879: // 'delete' 'ne'
+ case 100975: // 'delete' 'null'
+ case 101487: // 'delete' 'object'
+ case 103535: // 'delete' 'only'
+ case 104047: // 'delete' 'option'
+ case 104559: // 'delete' 'or'
+ case 105071: // 'delete' 'order'
+ case 105583: // 'delete' 'ordered'
+ case 106095: // 'delete' 'ordering'
+ case 107631: // 'delete' 'parent'
+ case 110703: // 'delete' 'preceding'
+ case 111215: // 'delete' 'preceding-sibling'
+ case 112751: // 'delete' 'processing-instruction'
+ case 113775: // 'delete' 'rename'
+ case 114287: // 'delete' 'replace'
+ case 114799: // 'delete' 'return'
+ case 115311: // 'delete' 'returning'
+ case 115823: // 'delete' 'revalidation'
+ case 116847: // 'delete' 'satisfies'
+ case 117359: // 'delete' 'schema'
+ case 117871: // 'delete' 'schema-attribute'
+ case 118383: // 'delete' 'schema-element'
+ case 118895: // 'delete' 'score'
+ case 119407: // 'delete' 'select'
+ case 119919: // 'delete' 'self'
+ case 122479: // 'delete' 'sliding'
+ case 122991: // 'delete' 'some'
+ case 123503: // 'delete' 'stable'
+ case 124015: // 'delete' 'start'
+ case 125551: // 'delete' 'strict'
+ case 126575: // 'delete' 'structured-item'
+ case 127087: // 'delete' 'switch'
+ case 127599: // 'delete' 'text'
+ case 129647: // 'delete' 'to'
+ case 130159: // 'delete' 'treat'
+ case 130671: // 'delete' 'true'
+ case 131183: // 'delete' 'try'
+ case 131695: // 'delete' 'tumbling'
+ case 132207: // 'delete' 'type'
+ case 132719: // 'delete' 'typeswitch'
+ case 133231: // 'delete' 'union'
+ case 134255: // 'delete' 'unordered'
+ case 134767: // 'delete' 'updating'
+ case 136303: // 'delete' 'validate'
+ case 136815: // 'delete' 'value'
+ case 137327: // 'delete' 'variable'
+ case 137839: // 'delete' 'version'
+ case 139375: // 'delete' 'where'
+ case 139887: // 'delete' 'while'
+ case 141423: // 'delete' 'with'
+ case 143983: // 'delete' '{'
+ case 145007: // 'delete' '{|'
+ parse_JSONDeleteExpr();
+ break;
+ case -9:
+ case 3233: // 'insert' EQName^Token
+ case 4257: // 'insert' IntegerLiteral
+ case 4769: // 'insert' DecimalLiteral
+ case 5281: // 'insert' DoubleLiteral
+ case 5793: // 'insert' StringLiteral
+ case 9889: // 'insert' NCName^Token
+ case 16033: // 'insert' '$'
+ case 16545: // 'insert' '$$'
+ case 17057: // 'insert' '%'
+ case 18593: // 'insert' '(#'
+ case 21153: // 'insert' '+'
+ case 22177: // 'insert' '-'
+ case 24225: // 'insert' '/'
+ case 24737: // 'insert' '//'
+ case 28321: // 'insert' '<'
+ case 28833: // 'insert' '<!--'
+ case 30881: // 'insert' '<?'
+ case 35489: // 'insert' '['
+ case 36513: // 'insert' 'after'
+ case 37537: // 'insert' 'allowing'
+ case 38049: // 'insert' 'ancestor'
+ case 38561: // 'insert' 'ancestor-or-self'
+ case 39073: // 'insert' 'and'
+ case 40097: // 'insert' 'append'
+ case 40609: // 'insert' 'array'
+ case 41121: // 'insert' 'as'
+ case 41633: // 'insert' 'ascending'
+ case 42145: // 'insert' 'at'
+ case 42657: // 'insert' 'attribute'
+ case 43169: // 'insert' 'base-uri'
+ case 43681: // 'insert' 'before'
+ case 44193: // 'insert' 'boundary-space'
+ case 44705: // 'insert' 'break'
+ case 45729: // 'insert' 'case'
+ case 46241: // 'insert' 'cast'
+ case 46753: // 'insert' 'castable'
+ case 47265: // 'insert' 'catch'
+ case 48289: // 'insert' 'child'
+ case 48801: // 'insert' 'collation'
+ case 49825: // 'insert' 'comment'
+ case 50337: // 'insert' 'constraint'
+ case 50849: // 'insert' 'construction'
+ case 52385: // 'insert' 'context'
+ case 52897: // 'insert' 'continue'
+ case 53409: // 'insert' 'copy'
+ case 53921: // 'insert' 'copy-namespaces'
+ case 54433: // 'insert' 'count'
+ case 54945: // 'insert' 'decimal-format'
+ case 55969: // 'insert' 'declare'
+ case 56481: // 'insert' 'default'
+ case 56993: // 'insert' 'delete'
+ case 57505: // 'insert' 'descendant'
+ case 58017: // 'insert' 'descendant-or-self'
+ case 58529: // 'insert' 'descending'
+ case 61089: // 'insert' 'div'
+ case 61601: // 'insert' 'document'
+ case 62113: // 'insert' 'document-node'
+ case 62625: // 'insert' 'element'
+ case 63137: // 'insert' 'else'
+ case 63649: // 'insert' 'empty'
+ case 64161: // 'insert' 'empty-sequence'
+ case 64673: // 'insert' 'encoding'
+ case 65185: // 'insert' 'end'
+ case 66209: // 'insert' 'eq'
+ case 66721: // 'insert' 'every'
+ case 67745: // 'insert' 'except'
+ case 68257: // 'insert' 'exit'
+ case 68769: // 'insert' 'external'
+ case 69281: // 'insert' 'false'
+ case 69793: // 'insert' 'first'
+ case 70305: // 'insert' 'following'
+ case 70817: // 'insert' 'following-sibling'
+ case 71329: // 'insert' 'for'
+ case 72865: // 'insert' 'from'
+ case 73377: // 'insert' 'ft-option'
+ case 75425: // 'insert' 'function'
+ case 75937: // 'insert' 'ge'
+ case 76961: // 'insert' 'group'
+ case 77985: // 'insert' 'gt'
+ case 78497: // 'insert' 'idiv'
+ case 79009: // 'insert' 'if'
+ case 79521: // 'insert' 'import'
+ case 80033: // 'insert' 'in'
+ case 80545: // 'insert' 'index'
+ case 82593: // 'insert' 'insert'
+ case 83105: // 'insert' 'instance'
+ case 83617: // 'insert' 'integrity'
+ case 84129: // 'insert' 'intersect'
+ case 84641: // 'insert' 'into'
+ case 85153: // 'insert' 'is'
+ case 85665: // 'insert' 'item'
+ case 86177: // 'insert' 'json'
+ case 86689: // 'insert' 'json-item'
+ case 87201: // 'insert' 'jsoniq'
+ case 88737: // 'insert' 'last'
+ case 89249: // 'insert' 'lax'
+ case 89761: // 'insert' 'le'
+ case 90785: // 'insert' 'let'
+ case 91809: // 'insert' 'loop'
+ case 92833: // 'insert' 'lt'
+ case 93857: // 'insert' 'mod'
+ case 94369: // 'insert' 'modify'
+ case 94881: // 'insert' 'module'
+ case 95905: // 'insert' 'namespace'
+ case 96417: // 'insert' 'namespace-node'
+ case 96929: // 'insert' 'ne'
+ case 100513: // 'insert' 'not'
+ case 101025: // 'insert' 'null'
+ case 101537: // 'insert' 'object'
+ case 103585: // 'insert' 'only'
+ case 104097: // 'insert' 'option'
+ case 104609: // 'insert' 'or'
+ case 105121: // 'insert' 'order'
+ case 105633: // 'insert' 'ordered'
+ case 106145: // 'insert' 'ordering'
+ case 107681: // 'insert' 'parent'
+ case 110753: // 'insert' 'preceding'
+ case 111265: // 'insert' 'preceding-sibling'
+ case 112801: // 'insert' 'processing-instruction'
+ case 113825: // 'insert' 'rename'
+ case 114337: // 'insert' 'replace'
+ case 114849: // 'insert' 'return'
+ case 115361: // 'insert' 'returning'
+ case 115873: // 'insert' 'revalidation'
+ case 116897: // 'insert' 'satisfies'
+ case 117409: // 'insert' 'schema'
+ case 117921: // 'insert' 'schema-attribute'
+ case 118433: // 'insert' 'schema-element'
+ case 118945: // 'insert' 'score'
+ case 119457: // 'insert' 'select'
+ case 119969: // 'insert' 'self'
+ case 122529: // 'insert' 'sliding'
+ case 123041: // 'insert' 'some'
+ case 123553: // 'insert' 'stable'
+ case 124065: // 'insert' 'start'
+ case 125601: // 'insert' 'strict'
+ case 126625: // 'insert' 'structured-item'
+ case 127137: // 'insert' 'switch'
+ case 127649: // 'insert' 'text'
+ case 129697: // 'insert' 'to'
+ case 130209: // 'insert' 'treat'
+ case 130721: // 'insert' 'true'
+ case 131233: // 'insert' 'try'
+ case 131745: // 'insert' 'tumbling'
+ case 132257: // 'insert' 'type'
+ case 132769: // 'insert' 'typeswitch'
+ case 133281: // 'insert' 'union'
+ case 134305: // 'insert' 'unordered'
+ case 134817: // 'insert' 'updating'
+ case 136353: // 'insert' 'validate'
+ case 136865: // 'insert' 'value'
+ case 137377: // 'insert' 'variable'
+ case 137889: // 'insert' 'version'
+ case 139425: // 'insert' 'where'
+ case 139937: // 'insert' 'while'
+ case 141473: // 'insert' 'with'
+ case 144033: // 'insert' '{'
+ case 145057: // 'insert' '{|'
+ parse_JSONInsertExpr();
+ break;
+ case -10:
+ case 3294: // 'rename' EQName^Token
+ case 4318: // 'rename' IntegerLiteral
+ case 4830: // 'rename' DecimalLiteral
+ case 5342: // 'rename' DoubleLiteral
+ case 5854: // 'rename' StringLiteral
+ case 16094: // 'rename' '$'
+ case 16606: // 'rename' '$$'
+ case 17118: // 'rename' '%'
+ case 28382: // 'rename' '<'
+ case 28894: // 'rename' '<!--'
+ case 30942: // 'rename' '<?'
+ case 35550: // 'rename' '['
+ case 36574: // 'rename' 'after'
+ case 37598: // 'rename' 'allowing'
+ case 38110: // 'rename' 'ancestor'
+ case 38622: // 'rename' 'ancestor-or-self'
+ case 39134: // 'rename' 'and'
+ case 40158: // 'rename' 'append'
+ case 40670: // 'rename' 'array'
+ case 41182: // 'rename' 'as'
+ case 41694: // 'rename' 'ascending'
+ case 42206: // 'rename' 'at'
+ case 42718: // 'rename' 'attribute'
+ case 43230: // 'rename' 'base-uri'
+ case 43742: // 'rename' 'before'
+ case 44254: // 'rename' 'boundary-space'
+ case 44766: // 'rename' 'break'
+ case 45790: // 'rename' 'case'
+ case 46302: // 'rename' 'cast'
+ case 46814: // 'rename' 'castable'
+ case 47326: // 'rename' 'catch'
+ case 48350: // 'rename' 'child'
+ case 48862: // 'rename' 'collation'
+ case 49886: // 'rename' 'comment'
+ case 50398: // 'rename' 'constraint'
+ case 50910: // 'rename' 'construction'
+ case 52446: // 'rename' 'context'
+ case 52958: // 'rename' 'continue'
+ case 53470: // 'rename' 'copy'
+ case 53982: // 'rename' 'copy-namespaces'
+ case 54494: // 'rename' 'count'
+ case 55006: // 'rename' 'decimal-format'
+ case 56030: // 'rename' 'declare'
+ case 56542: // 'rename' 'default'
+ case 57054: // 'rename' 'delete'
+ case 57566: // 'rename' 'descendant'
+ case 58078: // 'rename' 'descendant-or-self'
+ case 58590: // 'rename' 'descending'
+ case 61150: // 'rename' 'div'
+ case 61662: // 'rename' 'document'
+ case 62174: // 'rename' 'document-node'
+ case 62686: // 'rename' 'element'
+ case 63198: // 'rename' 'else'
+ case 63710: // 'rename' 'empty'
+ case 64222: // 'rename' 'empty-sequence'
+ case 64734: // 'rename' 'encoding'
+ case 65246: // 'rename' 'end'
+ case 66270: // 'rename' 'eq'
+ case 66782: // 'rename' 'every'
+ case 67806: // 'rename' 'except'
+ case 68318: // 'rename' 'exit'
+ case 68830: // 'rename' 'external'
+ case 69342: // 'rename' 'false'
+ case 69854: // 'rename' 'first'
+ case 70366: // 'rename' 'following'
+ case 70878: // 'rename' 'following-sibling'
+ case 71390: // 'rename' 'for'
+ case 72926: // 'rename' 'from'
+ case 73438: // 'rename' 'ft-option'
+ case 75486: // 'rename' 'function'
+ case 75998: // 'rename' 'ge'
+ case 77022: // 'rename' 'group'
+ case 78046: // 'rename' 'gt'
+ case 78558: // 'rename' 'idiv'
+ case 79070: // 'rename' 'if'
+ case 79582: // 'rename' 'import'
+ case 80094: // 'rename' 'in'
+ case 80606: // 'rename' 'index'
+ case 82654: // 'rename' 'insert'
+ case 83166: // 'rename' 'instance'
+ case 83678: // 'rename' 'integrity'
+ case 84190: // 'rename' 'intersect'
+ case 84702: // 'rename' 'into'
+ case 85214: // 'rename' 'is'
+ case 85726: // 'rename' 'item'
+ case 86238: // 'rename' 'json'
+ case 86750: // 'rename' 'json-item'
+ case 87262: // 'rename' 'jsoniq'
+ case 88798: // 'rename' 'last'
+ case 89310: // 'rename' 'lax'
+ case 89822: // 'rename' 'le'
+ case 90846: // 'rename' 'let'
+ case 91870: // 'rename' 'loop'
+ case 92894: // 'rename' 'lt'
+ case 93918: // 'rename' 'mod'
+ case 94430: // 'rename' 'modify'
+ case 94942: // 'rename' 'module'
+ case 95966: // 'rename' 'namespace'
+ case 96478: // 'rename' 'namespace-node'
+ case 96990: // 'rename' 'ne'
+ case 100062: // 'rename' 'nodes'
+ case 101086: // 'rename' 'null'
+ case 101598: // 'rename' 'object'
+ case 103646: // 'rename' 'only'
+ case 104158: // 'rename' 'option'
+ case 104670: // 'rename' 'or'
+ case 105182: // 'rename' 'order'
+ case 105694: // 'rename' 'ordered'
+ case 106206: // 'rename' 'ordering'
+ case 107742: // 'rename' 'parent'
+ case 110814: // 'rename' 'preceding'
+ case 111326: // 'rename' 'preceding-sibling'
+ case 112862: // 'rename' 'processing-instruction'
+ case 113886: // 'rename' 'rename'
+ case 114398: // 'rename' 'replace'
+ case 114910: // 'rename' 'return'
+ case 115422: // 'rename' 'returning'
+ case 115934: // 'rename' 'revalidation'
+ case 116958: // 'rename' 'satisfies'
+ case 117470: // 'rename' 'schema'
+ case 117982: // 'rename' 'schema-attribute'
+ case 118494: // 'rename' 'schema-element'
+ case 119006: // 'rename' 'score'
+ case 119518: // 'rename' 'select'
+ case 120030: // 'rename' 'self'
+ case 122590: // 'rename' 'sliding'
+ case 123102: // 'rename' 'some'
+ case 123614: // 'rename' 'stable'
+ case 124126: // 'rename' 'start'
+ case 125662: // 'rename' 'strict'
+ case 126686: // 'rename' 'structured-item'
+ case 127198: // 'rename' 'switch'
+ case 127710: // 'rename' 'text'
+ case 129758: // 'rename' 'to'
+ case 130270: // 'rename' 'treat'
+ case 130782: // 'rename' 'true'
+ case 131294: // 'rename' 'try'
+ case 131806: // 'rename' 'tumbling'
+ case 132318: // 'rename' 'type'
+ case 132830: // 'rename' 'typeswitch'
+ case 133342: // 'rename' 'union'
+ case 134366: // 'rename' 'unordered'
+ case 134878: // 'rename' 'updating'
+ case 136414: // 'rename' 'validate'
+ case 136926: // 'rename' 'value'
+ case 137438: // 'rename' 'variable'
+ case 137950: // 'rename' 'version'
+ case 139486: // 'rename' 'where'
+ case 139998: // 'rename' 'while'
+ case 141534: // 'rename' 'with'
+ case 144094: // 'rename' '{'
+ case 145118: // 'rename' '{|'
+ parse_JSONRenameExpr();
+ break;
+ case -11:
+ parse_JSONReplaceExpr();
+ break;
+ case -12:
+ case 3150: // 'append' EQName^Token
+ case 4174: // 'append' IntegerLiteral
+ case 4686: // 'append' DecimalLiteral
+ case 5198: // 'append' DoubleLiteral
+ case 5710: // 'append' StringLiteral
+ case 15950: // 'append' '$'
+ case 16462: // 'append' '$$'
+ case 16974: // 'append' '%'
+ case 18510: // 'append' '(#'
+ case 21070: // 'append' '+'
+ case 22094: // 'append' '-'
+ case 24142: // 'append' '/'
+ case 24654: // 'append' '//'
+ case 28238: // 'append' '<'
+ case 28750: // 'append' '<!--'
+ case 30798: // 'append' '<?'
+ case 35406: // 'append' '['
+ case 36430: // 'append' 'after'
+ case 37454: // 'append' 'allowing'
+ case 37966: // 'append' 'ancestor'
+ case 38478: // 'append' 'ancestor-or-self'
+ case 38990: // 'append' 'and'
+ case 40014: // 'append' 'append'
+ case 40526: // 'append' 'array'
+ case 41038: // 'append' 'as'
+ case 41550: // 'append' 'ascending'
+ case 42062: // 'append' 'at'
+ case 42574: // 'append' 'attribute'
+ case 43086: // 'append' 'base-uri'
+ case 43598: // 'append' 'before'
+ case 44110: // 'append' 'boundary-space'
+ case 44622: // 'append' 'break'
+ case 45646: // 'append' 'case'
+ case 46158: // 'append' 'cast'
+ case 46670: // 'append' 'castable'
+ case 47182: // 'append' 'catch'
+ case 48206: // 'append' 'child'
+ case 48718: // 'append' 'collation'
+ case 49742: // 'append' 'comment'
+ case 50254: // 'append' 'constraint'
+ case 50766: // 'append' 'construction'
+ case 52302: // 'append' 'context'
+ case 52814: // 'append' 'continue'
+ case 53326: // 'append' 'copy'
+ case 53838: // 'append' 'copy-namespaces'
+ case 54350: // 'append' 'count'
+ case 54862: // 'append' 'decimal-format'
+ case 55886: // 'append' 'declare'
+ case 56398: // 'append' 'default'
+ case 56910: // 'append' 'delete'
+ case 57422: // 'append' 'descendant'
+ case 57934: // 'append' 'descendant-or-self'
+ case 58446: // 'append' 'descending'
+ case 61006: // 'append' 'div'
+ case 61518: // 'append' 'document'
+ case 62030: // 'append' 'document-node'
+ case 62542: // 'append' 'element'
+ case 63054: // 'append' 'else'
+ case 63566: // 'append' 'empty'
+ case 64078: // 'append' 'empty-sequence'
+ case 64590: // 'append' 'encoding'
+ case 65102: // 'append' 'end'
+ case 66126: // 'append' 'eq'
+ case 66638: // 'append' 'every'
+ case 67662: // 'append' 'except'
+ case 68174: // 'append' 'exit'
+ case 68686: // 'append' 'external'
+ case 69198: // 'append' 'false'
+ case 69710: // 'append' 'first'
+ case 70222: // 'append' 'following'
+ case 70734: // 'append' 'following-sibling'
+ case 71246: // 'append' 'for'
+ case 72782: // 'append' 'from'
+ case 73294: // 'append' 'ft-option'
+ case 75342: // 'append' 'function'
+ case 75854: // 'append' 'ge'
+ case 76878: // 'append' 'group'
+ case 77902: // 'append' 'gt'
+ case 78414: // 'append' 'idiv'
+ case 78926: // 'append' 'if'
+ case 79438: // 'append' 'import'
+ case 79950: // 'append' 'in'
+ case 80462: // 'append' 'index'
+ case 82510: // 'append' 'insert'
+ case 83022: // 'append' 'instance'
+ case 83534: // 'append' 'integrity'
+ case 84046: // 'append' 'intersect'
+ case 84558: // 'append' 'into'
+ case 85070: // 'append' 'is'
+ case 85582: // 'append' 'item'
+ case 86094: // 'append' 'json'
+ case 86606: // 'append' 'json-item'
+ case 87118: // 'append' 'jsoniq'
+ case 88654: // 'append' 'last'
+ case 89166: // 'append' 'lax'
+ case 89678: // 'append' 'le'
+ case 90702: // 'append' 'let'
+ case 91726: // 'append' 'loop'
+ case 92750: // 'append' 'lt'
+ case 93774: // 'append' 'mod'
+ case 94286: // 'append' 'modify'
+ case 94798: // 'append' 'module'
+ case 95822: // 'append' 'namespace'
+ case 96334: // 'append' 'namespace-node'
+ case 96846: // 'append' 'ne'
+ case 99406: // 'append' 'node'
+ case 99918: // 'append' 'nodes'
+ case 100430: // 'append' 'not'
+ case 100942: // 'append' 'null'
+ case 101454: // 'append' 'object'
+ case 103502: // 'append' 'only'
+ case 104014: // 'append' 'option'
+ case 104526: // 'append' 'or'
+ case 105038: // 'append' 'order'
+ case 105550: // 'append' 'ordered'
+ case 106062: // 'append' 'ordering'
+ case 107598: // 'append' 'parent'
+ case 110670: // 'append' 'preceding'
+ case 111182: // 'append' 'preceding-sibling'
+ case 112718: // 'append' 'processing-instruction'
+ case 113742: // 'append' 'rename'
+ case 114254: // 'append' 'replace'
+ case 114766: // 'append' 'return'
+ case 115278: // 'append' 'returning'
+ case 115790: // 'append' 'revalidation'
+ case 116814: // 'append' 'satisfies'
+ case 117326: // 'append' 'schema'
+ case 117838: // 'append' 'schema-attribute'
+ case 118350: // 'append' 'schema-element'
+ case 118862: // 'append' 'score'
+ case 119374: // 'append' 'select'
+ case 119886: // 'append' 'self'
+ case 122446: // 'append' 'sliding'
+ case 122958: // 'append' 'some'
+ case 123470: // 'append' 'stable'
+ case 123982: // 'append' 'start'
+ case 125518: // 'append' 'strict'
+ case 126542: // 'append' 'structured-item'
+ case 127054: // 'append' 'switch'
+ case 127566: // 'append' 'text'
+ case 129614: // 'append' 'to'
+ case 130126: // 'append' 'treat'
+ case 130638: // 'append' 'true'
+ case 131150: // 'append' 'try'
+ case 131662: // 'append' 'tumbling'
+ case 132174: // 'append' 'type'
+ case 132686: // 'append' 'typeswitch'
+ case 133198: // 'append' 'union'
+ case 134222: // 'append' 'unordered'
+ case 134734: // 'append' 'updating'
+ case 136270: // 'append' 'validate'
+ case 136782: // 'append' 'value'
+ case 137294: // 'append' 'variable'
+ case 137806: // 'append' 'version'
+ case 139342: // 'append' 'where'
+ case 139854: // 'append' 'while'
+ case 141390: // 'append' 'with'
+ case 143950: // 'append' '{'
+ case 144974: // 'append' '{|'
+ parse_JSONAppendExpr();
+ break;
+ default:
+ parse_OrExpr();
+ }
+ eventHandler.endNonterminal("ExprSimple", e0);
+ }
+
+ function try_ExprSimple()
+ {
+ switch (l1)
+ {
+ case 78: // 'append'
+ lookahead2W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 161: // 'insert'
+ lookahead2W(276); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 223: // 'replace'
+ lookahead2W(170); // S^WS | '#' | '(' | '(:' | 'node' | 'value'
+ break;
+ case 111: // 'delete'
+ case 222: // 'rename'
+ lookahead2W(261); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 104: // 'copy'
+ case 130: // 'every'
+ case 240: // 'some'
+ lookahead2W(143); // S^WS | '#' | '$' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 17998 // 'append' '('
+ || lk == 18031 // 'delete' '('
+ || lk == 18081 // 'insert' '('
+ || lk == 18142 // 'rename' '('
+ || lk == 99439 // 'delete' 'node'
+ || lk == 99489 // 'insert' 'node'
+ || lk == 99550 // 'rename' 'node'
+ || lk == 99951 // 'delete' 'nodes'
+ || lk == 100001 // 'insert' 'nodes'
+ || lk == 136927) // 'replace' 'value'
+ {
+ lk = memoized(10, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_OrExpr();
+ memoize(10, e0A, -2);
+ lk = -13;
+ }
+ catch (p2A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_InsertExpr();
+ memoize(10, e0A, -3);
+ lk = -13;
+ }
+ catch (p3A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_DeleteExpr();
+ memoize(10, e0A, -4);
+ lk = -13;
+ }
+ catch (p4A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_RenameExpr();
+ memoize(10, e0A, -5);
+ lk = -13;
+ }
+ catch (p5A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_ReplaceExpr();
+ memoize(10, e0A, -6);
+ lk = -13;
+ }
+ catch (p6A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_JSONDeleteExpr();
+ memoize(10, e0A, -8);
+ lk = -13;
+ }
+ catch (p8A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_JSONInsertExpr();
+ memoize(10, e0A, -9);
+ lk = -13;
+ }
+ catch (p9A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_JSONRenameExpr();
+ memoize(10, e0A, -10);
+ lk = -13;
+ }
+ catch (p10A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_JSONReplaceExpr();
+ memoize(10, e0A, -11);
+ lk = -13;
+ }
+ catch (p11A)
+ {
+ lk = -12;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(10, e0A, -12);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ switch (lk)
+ {
+ case 16002: // 'every' '$'
+ case 16112: // 'some' '$'
+ try_QuantifiedExpr();
+ break;
+ case -3:
+ try_InsertExpr();
+ break;
+ case -4:
+ try_DeleteExpr();
+ break;
+ case -5:
+ try_RenameExpr();
+ break;
+ case -6:
+ case 99551: // 'replace' 'node'
+ try_ReplaceExpr();
+ break;
+ case 15976: // 'copy' '$'
+ try_TransformExpr();
+ break;
+ case -8:
+ case 3183: // 'delete' EQName^Token
+ case 4207: // 'delete' IntegerLiteral
+ case 4719: // 'delete' DecimalLiteral
+ case 5231: // 'delete' DoubleLiteral
+ case 5743: // 'delete' StringLiteral
+ case 15983: // 'delete' '$'
+ case 16495: // 'delete' '$$'
+ case 17007: // 'delete' '%'
+ case 28271: // 'delete' '<'
+ case 28783: // 'delete' '<!--'
+ case 30831: // 'delete' '<?'
+ case 35439: // 'delete' '['
+ case 36463: // 'delete' 'after'
+ case 37487: // 'delete' 'allowing'
+ case 37999: // 'delete' 'ancestor'
+ case 38511: // 'delete' 'ancestor-or-self'
+ case 39023: // 'delete' 'and'
+ case 40047: // 'delete' 'append'
+ case 40559: // 'delete' 'array'
+ case 41071: // 'delete' 'as'
+ case 41583: // 'delete' 'ascending'
+ case 42095: // 'delete' 'at'
+ case 42607: // 'delete' 'attribute'
+ case 43119: // 'delete' 'base-uri'
+ case 43631: // 'delete' 'before'
+ case 44143: // 'delete' 'boundary-space'
+ case 44655: // 'delete' 'break'
+ case 45679: // 'delete' 'case'
+ case 46191: // 'delete' 'cast'
+ case 46703: // 'delete' 'castable'
+ case 47215: // 'delete' 'catch'
+ case 48239: // 'delete' 'child'
+ case 48751: // 'delete' 'collation'
+ case 49775: // 'delete' 'comment'
+ case 50287: // 'delete' 'constraint'
+ case 50799: // 'delete' 'construction'
+ case 52335: // 'delete' 'context'
+ case 52847: // 'delete' 'continue'
+ case 53359: // 'delete' 'copy'
+ case 53871: // 'delete' 'copy-namespaces'
+ case 54383: // 'delete' 'count'
+ case 54895: // 'delete' 'decimal-format'
+ case 55919: // 'delete' 'declare'
+ case 56431: // 'delete' 'default'
+ case 56943: // 'delete' 'delete'
+ case 57455: // 'delete' 'descendant'
+ case 57967: // 'delete' 'descendant-or-self'
+ case 58479: // 'delete' 'descending'
+ case 61039: // 'delete' 'div'
+ case 61551: // 'delete' 'document'
+ case 62063: // 'delete' 'document-node'
+ case 62575: // 'delete' 'element'
+ case 63087: // 'delete' 'else'
+ case 63599: // 'delete' 'empty'
+ case 64111: // 'delete' 'empty-sequence'
+ case 64623: // 'delete' 'encoding'
+ case 65135: // 'delete' 'end'
+ case 66159: // 'delete' 'eq'
+ case 66671: // 'delete' 'every'
+ case 67695: // 'delete' 'except'
+ case 68207: // 'delete' 'exit'
+ case 68719: // 'delete' 'external'
+ case 69231: // 'delete' 'false'
+ case 69743: // 'delete' 'first'
+ case 70255: // 'delete' 'following'
+ case 70767: // 'delete' 'following-sibling'
+ case 71279: // 'delete' 'for'
+ case 72815: // 'delete' 'from'
+ case 73327: // 'delete' 'ft-option'
+ case 75375: // 'delete' 'function'
+ case 75887: // 'delete' 'ge'
+ case 76911: // 'delete' 'group'
+ case 77935: // 'delete' 'gt'
+ case 78447: // 'delete' 'idiv'
+ case 78959: // 'delete' 'if'
+ case 79471: // 'delete' 'import'
+ case 79983: // 'delete' 'in'
+ case 80495: // 'delete' 'index'
+ case 82543: // 'delete' 'insert'
+ case 83055: // 'delete' 'instance'
+ case 83567: // 'delete' 'integrity'
+ case 84079: // 'delete' 'intersect'
+ case 84591: // 'delete' 'into'
+ case 85103: // 'delete' 'is'
+ case 85615: // 'delete' 'item'
+ case 86127: // 'delete' 'json'
+ case 86639: // 'delete' 'json-item'
+ case 87151: // 'delete' 'jsoniq'
+ case 88687: // 'delete' 'last'
+ case 89199: // 'delete' 'lax'
+ case 89711: // 'delete' 'le'
+ case 90735: // 'delete' 'let'
+ case 91759: // 'delete' 'loop'
+ case 92783: // 'delete' 'lt'
+ case 93807: // 'delete' 'mod'
+ case 94319: // 'delete' 'modify'
+ case 94831: // 'delete' 'module'
+ case 95855: // 'delete' 'namespace'
+ case 96367: // 'delete' 'namespace-node'
+ case 96879: // 'delete' 'ne'
+ case 100975: // 'delete' 'null'
+ case 101487: // 'delete' 'object'
+ case 103535: // 'delete' 'only'
+ case 104047: // 'delete' 'option'
+ case 104559: // 'delete' 'or'
+ case 105071: // 'delete' 'order'
+ case 105583: // 'delete' 'ordered'
+ case 106095: // 'delete' 'ordering'
+ case 107631: // 'delete' 'parent'
+ case 110703: // 'delete' 'preceding'
+ case 111215: // 'delete' 'preceding-sibling'
+ case 112751: // 'delete' 'processing-instruction'
+ case 113775: // 'delete' 'rename'
+ case 114287: // 'delete' 'replace'
+ case 114799: // 'delete' 'return'
+ case 115311: // 'delete' 'returning'
+ case 115823: // 'delete' 'revalidation'
+ case 116847: // 'delete' 'satisfies'
+ case 117359: // 'delete' 'schema'
+ case 117871: // 'delete' 'schema-attribute'
+ case 118383: // 'delete' 'schema-element'
+ case 118895: // 'delete' 'score'
+ case 119407: // 'delete' 'select'
+ case 119919: // 'delete' 'self'
+ case 122479: // 'delete' 'sliding'
+ case 122991: // 'delete' 'some'
+ case 123503: // 'delete' 'stable'
+ case 124015: // 'delete' 'start'
+ case 125551: // 'delete' 'strict'
+ case 126575: // 'delete' 'structured-item'
+ case 127087: // 'delete' 'switch'
+ case 127599: // 'delete' 'text'
+ case 129647: // 'delete' 'to'
+ case 130159: // 'delete' 'treat'
+ case 130671: // 'delete' 'true'
+ case 131183: // 'delete' 'try'
+ case 131695: // 'delete' 'tumbling'
+ case 132207: // 'delete' 'type'
+ case 132719: // 'delete' 'typeswitch'
+ case 133231: // 'delete' 'union'
+ case 134255: // 'delete' 'unordered'
+ case 134767: // 'delete' 'updating'
+ case 136303: // 'delete' 'validate'
+ case 136815: // 'delete' 'value'
+ case 137327: // 'delete' 'variable'
+ case 137839: // 'delete' 'version'
+ case 139375: // 'delete' 'where'
+ case 139887: // 'delete' 'while'
+ case 141423: // 'delete' 'with'
+ case 143983: // 'delete' '{'
+ case 145007: // 'delete' '{|'
+ try_JSONDeleteExpr();
+ break;
+ case -9:
+ case 3233: // 'insert' EQName^Token
+ case 4257: // 'insert' IntegerLiteral
+ case 4769: // 'insert' DecimalLiteral
+ case 5281: // 'insert' DoubleLiteral
+ case 5793: // 'insert' StringLiteral
+ case 9889: // 'insert' NCName^Token
+ case 16033: // 'insert' '$'
+ case 16545: // 'insert' '$$'
+ case 17057: // 'insert' '%'
+ case 18593: // 'insert' '(#'
+ case 21153: // 'insert' '+'
+ case 22177: // 'insert' '-'
+ case 24225: // 'insert' '/'
+ case 24737: // 'insert' '//'
+ case 28321: // 'insert' '<'
+ case 28833: // 'insert' '<!--'
+ case 30881: // 'insert' '<?'
+ case 35489: // 'insert' '['
+ case 36513: // 'insert' 'after'
+ case 37537: // 'insert' 'allowing'
+ case 38049: // 'insert' 'ancestor'
+ case 38561: // 'insert' 'ancestor-or-self'
+ case 39073: // 'insert' 'and'
+ case 40097: // 'insert' 'append'
+ case 40609: // 'insert' 'array'
+ case 41121: // 'insert' 'as'
+ case 41633: // 'insert' 'ascending'
+ case 42145: // 'insert' 'at'
+ case 42657: // 'insert' 'attribute'
+ case 43169: // 'insert' 'base-uri'
+ case 43681: // 'insert' 'before'
+ case 44193: // 'insert' 'boundary-space'
+ case 44705: // 'insert' 'break'
+ case 45729: // 'insert' 'case'
+ case 46241: // 'insert' 'cast'
+ case 46753: // 'insert' 'castable'
+ case 47265: // 'insert' 'catch'
+ case 48289: // 'insert' 'child'
+ case 48801: // 'insert' 'collation'
+ case 49825: // 'insert' 'comment'
+ case 50337: // 'insert' 'constraint'
+ case 50849: // 'insert' 'construction'
+ case 52385: // 'insert' 'context'
+ case 52897: // 'insert' 'continue'
+ case 53409: // 'insert' 'copy'
+ case 53921: // 'insert' 'copy-namespaces'
+ case 54433: // 'insert' 'count'
+ case 54945: // 'insert' 'decimal-format'
+ case 55969: // 'insert' 'declare'
+ case 56481: // 'insert' 'default'
+ case 56993: // 'insert' 'delete'
+ case 57505: // 'insert' 'descendant'
+ case 58017: // 'insert' 'descendant-or-self'
+ case 58529: // 'insert' 'descending'
+ case 61089: // 'insert' 'div'
+ case 61601: // 'insert' 'document'
+ case 62113: // 'insert' 'document-node'
+ case 62625: // 'insert' 'element'
+ case 63137: // 'insert' 'else'
+ case 63649: // 'insert' 'empty'
+ case 64161: // 'insert' 'empty-sequence'
+ case 64673: // 'insert' 'encoding'
+ case 65185: // 'insert' 'end'
+ case 66209: // 'insert' 'eq'
+ case 66721: // 'insert' 'every'
+ case 67745: // 'insert' 'except'
+ case 68257: // 'insert' 'exit'
+ case 68769: // 'insert' 'external'
+ case 69281: // 'insert' 'false'
+ case 69793: // 'insert' 'first'
+ case 70305: // 'insert' 'following'
+ case 70817: // 'insert' 'following-sibling'
+ case 71329: // 'insert' 'for'
+ case 72865: // 'insert' 'from'
+ case 73377: // 'insert' 'ft-option'
+ case 75425: // 'insert' 'function'
+ case 75937: // 'insert' 'ge'
+ case 76961: // 'insert' 'group'
+ case 77985: // 'insert' 'gt'
+ case 78497: // 'insert' 'idiv'
+ case 79009: // 'insert' 'if'
+ case 79521: // 'insert' 'import'
+ case 80033: // 'insert' 'in'
+ case 80545: // 'insert' 'index'
+ case 82593: // 'insert' 'insert'
+ case 83105: // 'insert' 'instance'
+ case 83617: // 'insert' 'integrity'
+ case 84129: // 'insert' 'intersect'
+ case 84641: // 'insert' 'into'
+ case 85153: // 'insert' 'is'
+ case 85665: // 'insert' 'item'
+ case 86177: // 'insert' 'json'
+ case 86689: // 'insert' 'json-item'
+ case 87201: // 'insert' 'jsoniq'
+ case 88737: // 'insert' 'last'
+ case 89249: // 'insert' 'lax'
+ case 89761: // 'insert' 'le'
+ case 90785: // 'insert' 'let'
+ case 91809: // 'insert' 'loop'
+ case 92833: // 'insert' 'lt'
+ case 93857: // 'insert' 'mod'
+ case 94369: // 'insert' 'modify'
+ case 94881: // 'insert' 'module'
+ case 95905: // 'insert' 'namespace'
+ case 96417: // 'insert' 'namespace-node'
+ case 96929: // 'insert' 'ne'
+ case 100513: // 'insert' 'not'
+ case 101025: // 'insert' 'null'
+ case 101537: // 'insert' 'object'
+ case 103585: // 'insert' 'only'
+ case 104097: // 'insert' 'option'
+ case 104609: // 'insert' 'or'
+ case 105121: // 'insert' 'order'
+ case 105633: // 'insert' 'ordered'
+ case 106145: // 'insert' 'ordering'
+ case 107681: // 'insert' 'parent'
+ case 110753: // 'insert' 'preceding'
+ case 111265: // 'insert' 'preceding-sibling'
+ case 112801: // 'insert' 'processing-instruction'
+ case 113825: // 'insert' 'rename'
+ case 114337: // 'insert' 'replace'
+ case 114849: // 'insert' 'return'
+ case 115361: // 'insert' 'returning'
+ case 115873: // 'insert' 'revalidation'
+ case 116897: // 'insert' 'satisfies'
+ case 117409: // 'insert' 'schema'
+ case 117921: // 'insert' 'schema-attribute'
+ case 118433: // 'insert' 'schema-element'
+ case 118945: // 'insert' 'score'
+ case 119457: // 'insert' 'select'
+ case 119969: // 'insert' 'self'
+ case 122529: // 'insert' 'sliding'
+ case 123041: // 'insert' 'some'
+ case 123553: // 'insert' 'stable'
+ case 124065: // 'insert' 'start'
+ case 125601: // 'insert' 'strict'
+ case 126625: // 'insert' 'structured-item'
+ case 127137: // 'insert' 'switch'
+ case 127649: // 'insert' 'text'
+ case 129697: // 'insert' 'to'
+ case 130209: // 'insert' 'treat'
+ case 130721: // 'insert' 'true'
+ case 131233: // 'insert' 'try'
+ case 131745: // 'insert' 'tumbling'
+ case 132257: // 'insert' 'type'
+ case 132769: // 'insert' 'typeswitch'
+ case 133281: // 'insert' 'union'
+ case 134305: // 'insert' 'unordered'
+ case 134817: // 'insert' 'updating'
+ case 136353: // 'insert' 'validate'
+ case 136865: // 'insert' 'value'
+ case 137377: // 'insert' 'variable'
+ case 137889: // 'insert' 'version'
+ case 139425: // 'insert' 'where'
+ case 139937: // 'insert' 'while'
+ case 141473: // 'insert' 'with'
+ case 144033: // 'insert' '{'
+ case 145057: // 'insert' '{|'
+ try_JSONInsertExpr();
+ break;
+ case -10:
+ case 3294: // 'rename' EQName^Token
+ case 4318: // 'rename' IntegerLiteral
+ case 4830: // 'rename' DecimalLiteral
+ case 5342: // 'rename' DoubleLiteral
+ case 5854: // 'rename' StringLiteral
+ case 16094: // 'rename' '$'
+ case 16606: // 'rename' '$$'
+ case 17118: // 'rename' '%'
+ case 28382: // 'rename' '<'
+ case 28894: // 'rename' '<!--'
+ case 30942: // 'rename' '<?'
+ case 35550: // 'rename' '['
+ case 36574: // 'rename' 'after'
+ case 37598: // 'rename' 'allowing'
+ case 38110: // 'rename' 'ancestor'
+ case 38622: // 'rename' 'ancestor-or-self'
+ case 39134: // 'rename' 'and'
+ case 40158: // 'rename' 'append'
+ case 40670: // 'rename' 'array'
+ case 41182: // 'rename' 'as'
+ case 41694: // 'rename' 'ascending'
+ case 42206: // 'rename' 'at'
+ case 42718: // 'rename' 'attribute'
+ case 43230: // 'rename' 'base-uri'
+ case 43742: // 'rename' 'before'
+ case 44254: // 'rename' 'boundary-space'
+ case 44766: // 'rename' 'break'
+ case 45790: // 'rename' 'case'
+ case 46302: // 'rename' 'cast'
+ case 46814: // 'rename' 'castable'
+ case 47326: // 'rename' 'catch'
+ case 48350: // 'rename' 'child'
+ case 48862: // 'rename' 'collation'
+ case 49886: // 'rename' 'comment'
+ case 50398: // 'rename' 'constraint'
+ case 50910: // 'rename' 'construction'
+ case 52446: // 'rename' 'context'
+ case 52958: // 'rename' 'continue'
+ case 53470: // 'rename' 'copy'
+ case 53982: // 'rename' 'copy-namespaces'
+ case 54494: // 'rename' 'count'
+ case 55006: // 'rename' 'decimal-format'
+ case 56030: // 'rename' 'declare'
+ case 56542: // 'rename' 'default'
+ case 57054: // 'rename' 'delete'
+ case 57566: // 'rename' 'descendant'
+ case 58078: // 'rename' 'descendant-or-self'
+ case 58590: // 'rename' 'descending'
+ case 61150: // 'rename' 'div'
+ case 61662: // 'rename' 'document'
+ case 62174: // 'rename' 'document-node'
+ case 62686: // 'rename' 'element'
+ case 63198: // 'rename' 'else'
+ case 63710: // 'rename' 'empty'
+ case 64222: // 'rename' 'empty-sequence'
+ case 64734: // 'rename' 'encoding'
+ case 65246: // 'rename' 'end'
+ case 66270: // 'rename' 'eq'
+ case 66782: // 'rename' 'every'
+ case 67806: // 'rename' 'except'
+ case 68318: // 'rename' 'exit'
+ case 68830: // 'rename' 'external'
+ case 69342: // 'rename' 'false'
+ case 69854: // 'rename' 'first'
+ case 70366: // 'rename' 'following'
+ case 70878: // 'rename' 'following-sibling'
+ case 71390: // 'rename' 'for'
+ case 72926: // 'rename' 'from'
+ case 73438: // 'rename' 'ft-option'
+ case 75486: // 'rename' 'function'
+ case 75998: // 'rename' 'ge'
+ case 77022: // 'rename' 'group'
+ case 78046: // 'rename' 'gt'
+ case 78558: // 'rename' 'idiv'
+ case 79070: // 'rename' 'if'
+ case 79582: // 'rename' 'import'
+ case 80094: // 'rename' 'in'
+ case 80606: // 'rename' 'index'
+ case 82654: // 'rename' 'insert'
+ case 83166: // 'rename' 'instance'
+ case 83678: // 'rename' 'integrity'
+ case 84190: // 'rename' 'intersect'
+ case 84702: // 'rename' 'into'
+ case 85214: // 'rename' 'is'
+ case 85726: // 'rename' 'item'
+ case 86238: // 'rename' 'json'
+ case 86750: // 'rename' 'json-item'
+ case 87262: // 'rename' 'jsoniq'
+ case 88798: // 'rename' 'last'
+ case 89310: // 'rename' 'lax'
+ case 89822: // 'rename' 'le'
+ case 90846: // 'rename' 'let'
+ case 91870: // 'rename' 'loop'
+ case 92894: // 'rename' 'lt'
+ case 93918: // 'rename' 'mod'
+ case 94430: // 'rename' 'modify'
+ case 94942: // 'rename' 'module'
+ case 95966: // 'rename' 'namespace'
+ case 96478: // 'rename' 'namespace-node'
+ case 96990: // 'rename' 'ne'
+ case 100062: // 'rename' 'nodes'
+ case 101086: // 'rename' 'null'
+ case 101598: // 'rename' 'object'
+ case 103646: // 'rename' 'only'
+ case 104158: // 'rename' 'option'
+ case 104670: // 'rename' 'or'
+ case 105182: // 'rename' 'order'
+ case 105694: // 'rename' 'ordered'
+ case 106206: // 'rename' 'ordering'
+ case 107742: // 'rename' 'parent'
+ case 110814: // 'rename' 'preceding'
+ case 111326: // 'rename' 'preceding-sibling'
+ case 112862: // 'rename' 'processing-instruction'
+ case 113886: // 'rename' 'rename'
+ case 114398: // 'rename' 'replace'
+ case 114910: // 'rename' 'return'
+ case 115422: // 'rename' 'returning'
+ case 115934: // 'rename' 'revalidation'
+ case 116958: // 'rename' 'satisfies'
+ case 117470: // 'rename' 'schema'
+ case 117982: // 'rename' 'schema-attribute'
+ case 118494: // 'rename' 'schema-element'
+ case 119006: // 'rename' 'score'
+ case 119518: // 'rename' 'select'
+ case 120030: // 'rename' 'self'
+ case 122590: // 'rename' 'sliding'
+ case 123102: // 'rename' 'some'
+ case 123614: // 'rename' 'stable'
+ case 124126: // 'rename' 'start'
+ case 125662: // 'rename' 'strict'
+ case 126686: // 'rename' 'structured-item'
+ case 127198: // 'rename' 'switch'
+ case 127710: // 'rename' 'text'
+ case 129758: // 'rename' 'to'
+ case 130270: // 'rename' 'treat'
+ case 130782: // 'rename' 'true'
+ case 131294: // 'rename' 'try'
+ case 131806: // 'rename' 'tumbling'
+ case 132318: // 'rename' 'type'
+ case 132830: // 'rename' 'typeswitch'
+ case 133342: // 'rename' 'union'
+ case 134366: // 'rename' 'unordered'
+ case 134878: // 'rename' 'updating'
+ case 136414: // 'rename' 'validate'
+ case 136926: // 'rename' 'value'
+ case 137438: // 'rename' 'variable'
+ case 137950: // 'rename' 'version'
+ case 139486: // 'rename' 'where'
+ case 139998: // 'rename' 'while'
+ case 141534: // 'rename' 'with'
+ case 144094: // 'rename' '{'
+ case 145118: // 'rename' '{|'
+ try_JSONRenameExpr();
+ break;
+ case -11:
+ try_JSONReplaceExpr();
+ break;
+ case -12:
+ case 3150: // 'append' EQName^Token
+ case 4174: // 'append' IntegerLiteral
+ case 4686: // 'append' DecimalLiteral
+ case 5198: // 'append' DoubleLiteral
+ case 5710: // 'append' StringLiteral
+ case 15950: // 'append' '$'
+ case 16462: // 'append' '$$'
+ case 16974: // 'append' '%'
+ case 18510: // 'append' '(#'
+ case 21070: // 'append' '+'
+ case 22094: // 'append' '-'
+ case 24142: // 'append' '/'
+ case 24654: // 'append' '//'
+ case 28238: // 'append' '<'
+ case 28750: // 'append' '<!--'
+ case 30798: // 'append' '<?'
+ case 35406: // 'append' '['
+ case 36430: // 'append' 'after'
+ case 37454: // 'append' 'allowing'
+ case 37966: // 'append' 'ancestor'
+ case 38478: // 'append' 'ancestor-or-self'
+ case 38990: // 'append' 'and'
+ case 40014: // 'append' 'append'
+ case 40526: // 'append' 'array'
+ case 41038: // 'append' 'as'
+ case 41550: // 'append' 'ascending'
+ case 42062: // 'append' 'at'
+ case 42574: // 'append' 'attribute'
+ case 43086: // 'append' 'base-uri'
+ case 43598: // 'append' 'before'
+ case 44110: // 'append' 'boundary-space'
+ case 44622: // 'append' 'break'
+ case 45646: // 'append' 'case'
+ case 46158: // 'append' 'cast'
+ case 46670: // 'append' 'castable'
+ case 47182: // 'append' 'catch'
+ case 48206: // 'append' 'child'
+ case 48718: // 'append' 'collation'
+ case 49742: // 'append' 'comment'
+ case 50254: // 'append' 'constraint'
+ case 50766: // 'append' 'construction'
+ case 52302: // 'append' 'context'
+ case 52814: // 'append' 'continue'
+ case 53326: // 'append' 'copy'
+ case 53838: // 'append' 'copy-namespaces'
+ case 54350: // 'append' 'count'
+ case 54862: // 'append' 'decimal-format'
+ case 55886: // 'append' 'declare'
+ case 56398: // 'append' 'default'
+ case 56910: // 'append' 'delete'
+ case 57422: // 'append' 'descendant'
+ case 57934: // 'append' 'descendant-or-self'
+ case 58446: // 'append' 'descending'
+ case 61006: // 'append' 'div'
+ case 61518: // 'append' 'document'
+ case 62030: // 'append' 'document-node'
+ case 62542: // 'append' 'element'
+ case 63054: // 'append' 'else'
+ case 63566: // 'append' 'empty'
+ case 64078: // 'append' 'empty-sequence'
+ case 64590: // 'append' 'encoding'
+ case 65102: // 'append' 'end'
+ case 66126: // 'append' 'eq'
+ case 66638: // 'append' 'every'
+ case 67662: // 'append' 'except'
+ case 68174: // 'append' 'exit'
+ case 68686: // 'append' 'external'
+ case 69198: // 'append' 'false'
+ case 69710: // 'append' 'first'
+ case 70222: // 'append' 'following'
+ case 70734: // 'append' 'following-sibling'
+ case 71246: // 'append' 'for'
+ case 72782: // 'append' 'from'
+ case 73294: // 'append' 'ft-option'
+ case 75342: // 'append' 'function'
+ case 75854: // 'append' 'ge'
+ case 76878: // 'append' 'group'
+ case 77902: // 'append' 'gt'
+ case 78414: // 'append' 'idiv'
+ case 78926: // 'append' 'if'
+ case 79438: // 'append' 'import'
+ case 79950: // 'append' 'in'
+ case 80462: // 'append' 'index'
+ case 82510: // 'append' 'insert'
+ case 83022: // 'append' 'instance'
+ case 83534: // 'append' 'integrity'
+ case 84046: // 'append' 'intersect'
+ case 84558: // 'append' 'into'
+ case 85070: // 'append' 'is'
+ case 85582: // 'append' 'item'
+ case 86094: // 'append' 'json'
+ case 86606: // 'append' 'json-item'
+ case 87118: // 'append' 'jsoniq'
+ case 88654: // 'append' 'last'
+ case 89166: // 'append' 'lax'
+ case 89678: // 'append' 'le'
+ case 90702: // 'append' 'let'
+ case 91726: // 'append' 'loop'
+ case 92750: // 'append' 'lt'
+ case 93774: // 'append' 'mod'
+ case 94286: // 'append' 'modify'
+ case 94798: // 'append' 'module'
+ case 95822: // 'append' 'namespace'
+ case 96334: // 'append' 'namespace-node'
+ case 96846: // 'append' 'ne'
+ case 99406: // 'append' 'node'
+ case 99918: // 'append' 'nodes'
+ case 100430: // 'append' 'not'
+ case 100942: // 'append' 'null'
+ case 101454: // 'append' 'object'
+ case 103502: // 'append' 'only'
+ case 104014: // 'append' 'option'
+ case 104526: // 'append' 'or'
+ case 105038: // 'append' 'order'
+ case 105550: // 'append' 'ordered'
+ case 106062: // 'append' 'ordering'
+ case 107598: // 'append' 'parent'
+ case 110670: // 'append' 'preceding'
+ case 111182: // 'append' 'preceding-sibling'
+ case 112718: // 'append' 'processing-instruction'
+ case 113742: // 'append' 'rename'
+ case 114254: // 'append' 'replace'
+ case 114766: // 'append' 'return'
+ case 115278: // 'append' 'returning'
+ case 115790: // 'append' 'revalidation'
+ case 116814: // 'append' 'satisfies'
+ case 117326: // 'append' 'schema'
+ case 117838: // 'append' 'schema-attribute'
+ case 118350: // 'append' 'schema-element'
+ case 118862: // 'append' 'score'
+ case 119374: // 'append' 'select'
+ case 119886: // 'append' 'self'
+ case 122446: // 'append' 'sliding'
+ case 122958: // 'append' 'some'
+ case 123470: // 'append' 'stable'
+ case 123982: // 'append' 'start'
+ case 125518: // 'append' 'strict'
+ case 126542: // 'append' 'structured-item'
+ case 127054: // 'append' 'switch'
+ case 127566: // 'append' 'text'
+ case 129614: // 'append' 'to'
+ case 130126: // 'append' 'treat'
+ case 130638: // 'append' 'true'
+ case 131150: // 'append' 'try'
+ case 131662: // 'append' 'tumbling'
+ case 132174: // 'append' 'type'
+ case 132686: // 'append' 'typeswitch'
+ case 133198: // 'append' 'union'
+ case 134222: // 'append' 'unordered'
+ case 134734: // 'append' 'updating'
+ case 136270: // 'append' 'validate'
+ case 136782: // 'append' 'value'
+ case 137294: // 'append' 'variable'
+ case 137806: // 'append' 'version'
+ case 139342: // 'append' 'where'
+ case 139854: // 'append' 'while'
+ case 141390: // 'append' 'with'
+ case 143950: // 'append' '{'
+ case 144974: // 'append' '{|'
+ try_JSONAppendExpr();
+ break;
+ case -13:
+ break;
+ default:
+ try_OrExpr();
+ }
+ }
+
+ function parse_JSONDeleteExpr()
+ {
+ eventHandler.startNonterminal("JSONDeleteExpr", e0);
+ shift(111); // 'delete'
+ lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(261); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(11, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(11, e0, lk);
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shift(168); // 'json'
+ }
+ lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PostfixExpr();
+ eventHandler.endNonterminal("JSONDeleteExpr", e0);
+ }
+
+ function try_JSONDeleteExpr()
+ {
+ shiftT(111); // 'delete'
+ lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(261); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(11, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ memoize(11, e0A, -1);
+ }
+ catch (p1A)
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(11, e0A, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PostfixExpr();
+ }
+
+ function parse_JSONInsertExpr()
+ {
+ eventHandler.startNonterminal("JSONInsertExpr", e0);
+ switch (l1)
+ {
+ case 161: // 'insert'
+ lookahead2W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 9889) // 'insert' NCName^Token
+ {
+ lk = memoized(12, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(161); // 'insert'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(13, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ memoize(13, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(13, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(165); // 'into'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(72); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 110162) // 'at' 'position'
+ {
+ lk = memoized(14, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ memoize(14, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(14, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1)
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(12, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shift(161); // 'insert'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(13, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ lk = -1;
+ }
+ catch (p1B)
+ {
+ lk = -2;
+ }
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(13, e0, lk);
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shift(168); // 'json'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(165); // 'into'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(72); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 110162) // 'at' 'position'
+ {
+ lk = memoized(14, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ lk = -1;
+ }
+ catch (p1B)
+ {
+ lk = -2;
+ }
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(14, e0, lk);
+ }
+ }
+ if (lk == -1)
+ {
+ shift(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shift(215); // 'position'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ break;
+ default:
+ shift(161); // 'insert'
+ lookahead1W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(282); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(15, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ lk = -1;
+ }
+ catch (p1B)
+ {
+ lk = -2;
+ }
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(15, e0, lk);
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 9896 // 'json' NCName^Token
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shift(168); // 'json'
+ }
+ lookahead1W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PairConstructorList();
+ shift(165); // 'into'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("JSONInsertExpr", e0);
+ }
+
+ function try_JSONInsertExpr()
+ {
+ switch (l1)
+ {
+ case 161: // 'insert'
+ lookahead2W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 9889) // 'insert' NCName^Token
+ {
+ lk = memoized(12, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(161); // 'insert'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(13, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ memoize(13, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(13, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(165); // 'into'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(72); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 110162) // 'at' 'position'
+ {
+ lk = memoized(14, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ memoize(14, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(14, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1)
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ memoize(12, e0A, -1);
+ lk = -3;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(12, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shiftT(161); // 'insert'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(13, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ memoize(13, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(13, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(165); // 'into'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(72); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 110162) // 'at' 'position'
+ {
+ lk = memoized(14, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ memoize(14, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(14, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1)
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ break;
+ case -3:
+ break;
+ default:
+ shiftT(161); // 'insert'
+ lookahead1W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(282); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(15, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ memoize(15, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(15, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 9896 // 'json' NCName^Token
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PairConstructorList();
+ shiftT(165); // 'into'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ }
+
+ function parse_JSONRenameExpr()
+ {
+ eventHandler.startNonterminal("JSONRenameExpr", e0);
+ shift(222); // 'rename'
+ lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(261); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(16, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(16, e0, lk);
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shift(168); // 'json'
+ }
+ lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PostfixExpr();
+ shift(80); // 'as'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("JSONRenameExpr", e0);
+ }
+
+ function try_JSONRenameExpr()
+ {
+ shiftT(222); // 'rename'
+ lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(261); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(16, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ memoize(16, e0A, -1);
+ }
+ catch (p1A)
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(16, e0A, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PostfixExpr();
+ shiftT(80); // 'as'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_JSONReplaceExpr()
+ {
+ eventHandler.startNonterminal("JSONReplaceExpr", e0);
+ shift(223); // 'replace'
+ lookahead1W(85); // S^WS | '(:' | 'value'
+ shift(267); // 'value'
+ lookahead1W(67); // S^WS | '(:' | 'of'
+ shift(200); // 'of'
+ lookahead1W(59); // S^WS | '(:' | 'json'
+ shift(168); // 'json'
+ lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PostfixExpr();
+ shift(276); // 'with'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("JSONReplaceExpr", e0);
+ }
+
+ function try_JSONReplaceExpr()
+ {
+ shiftT(223); // 'replace'
+ lookahead1W(85); // S^WS | '(:' | 'value'
+ shiftT(267); // 'value'
+ lookahead1W(67); // S^WS | '(:' | 'of'
+ shiftT(200); // 'of'
+ lookahead1W(59); // S^WS | '(:' | 'json'
+ shiftT(168); // 'json'
+ lookahead1W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PostfixExpr();
+ shiftT(276); // 'with'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_JSONAppendExpr()
+ {
+ eventHandler.startNonterminal("JSONAppendExpr", e0);
+ shift(78); // 'append'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(17, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(17, e0, lk);
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shift(168); // 'json'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(165); // 'into'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("JSONAppendExpr", e0);
+ }
+
+ function try_JSONAppendExpr()
+ {
+ shiftT(78); // 'append'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(17, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ memoize(17, e0A, -1);
+ }
+ catch (p1A)
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(17, e0A, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(165); // 'into'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_CommonContent()
+ {
+ eventHandler.startNonterminal("CommonContent", e0);
+ switch (l1)
+ {
+ case 12: // PredefinedEntityRef
+ shift(12); // PredefinedEntityRef
+ break;
+ case 23: // CharRef
+ shift(23); // CharRef
+ break;
+ case 282: // '{{'
+ shift(282); // '{{'
+ break;
+ case 288: // '}}'
+ shift(288); // '}}'
+ break;
+ default:
+ parse_BlockExpr();
+ }
+ eventHandler.endNonterminal("CommonContent", e0);
+ }
+
+ function try_CommonContent()
+ {
+ switch (l1)
+ {
+ case 12: // PredefinedEntityRef
+ shiftT(12); // PredefinedEntityRef
+ break;
+ case 23: // CharRef
+ shiftT(23); // CharRef
+ break;
+ case 282: // '{{'
+ shiftT(282); // '{{'
+ break;
+ case 288: // '}}'
+ shiftT(288); // '}}'
+ break;
+ default:
+ try_BlockExpr();
+ }
+ }
+
+ function parse_ContentExpr()
+ {
+ eventHandler.startNonterminal("ContentExpr", e0);
+ parse_StatementsAndExpr();
+ eventHandler.endNonterminal("ContentExpr", e0);
+ }
+
+ function try_ContentExpr()
+ {
+ try_StatementsAndExpr();
+ }
+
+ function parse_CompDocConstructor()
+ {
+ eventHandler.startNonterminal("CompDocConstructor", e0);
+ shift(120); // 'document'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockExpr();
+ eventHandler.endNonterminal("CompDocConstructor", e0);
+ }
+
+ function try_CompDocConstructor()
+ {
+ shiftT(120); // 'document'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ try_BlockExpr();
+ }
+
+ function parse_CompAttrConstructor()
+ {
+ eventHandler.startNonterminal("CompAttrConstructor", e0);
+ shift(83); // 'attribute'
+ lookahead1W(250); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shift(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ break;
+ default:
+ whitespace();
+ parse_EQName();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 281: // '{'
+ lookahead2W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 147225) // '{' '}'
+ {
+ lk = memoized(18, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shiftT(287); // '}'
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(18, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shift(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shift(287); // '}'
+ break;
+ default:
+ whitespace();
+ parse_BlockExpr();
+ }
+ eventHandler.endNonterminal("CompAttrConstructor", e0);
+ }
+
+ function try_CompAttrConstructor()
+ {
+ shiftT(83); // 'attribute'
+ lookahead1W(250); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shiftT(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ break;
+ default:
+ try_EQName();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 281: // '{'
+ lookahead2W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 147225) // '{' '}'
+ {
+ lk = memoized(18, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shiftT(287); // '}'
+ memoize(18, e0A, -1);
+ lk = -3;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(18, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shiftT(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shiftT(287); // '}'
+ break;
+ case -3:
+ break;
+ default:
+ try_BlockExpr();
+ }
+ }
+
+ function parse_CompPIConstructor()
+ {
+ eventHandler.startNonterminal("CompPIConstructor", e0);
+ shift(220); // 'processing-instruction'
+ lookahead1W(242); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shift(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ break;
+ default:
+ whitespace();
+ parse_NCName();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 281: // '{'
+ lookahead2W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 147225) // '{' '}'
+ {
+ lk = memoized(19, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shiftT(287); // '}'
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(19, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shift(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shift(287); // '}'
+ break;
+ default:
+ whitespace();
+ parse_BlockExpr();
+ }
+ eventHandler.endNonterminal("CompPIConstructor", e0);
+ }
+
+ function try_CompPIConstructor()
+ {
+ shiftT(220); // 'processing-instruction'
+ lookahead1W(242); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shiftT(281); // '{'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ break;
+ default:
+ try_NCName();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 281: // '{'
+ lookahead2W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 147225) // '{' '}'
+ {
+ lk = memoized(19, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shiftT(287); // '}'
+ memoize(19, e0A, -1);
+ lk = -3;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(19, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shiftT(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shiftT(287); // '}'
+ break;
+ case -3:
+ break;
+ default:
+ try_BlockExpr();
+ }
+ }
+
+ function parse_CompCommentConstructor()
+ {
+ eventHandler.startNonterminal("CompCommentConstructor", e0);
+ shift(97); // 'comment'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockExpr();
+ eventHandler.endNonterminal("CompCommentConstructor", e0);
+ }
+
+ function try_CompCommentConstructor()
+ {
+ shiftT(97); // 'comment'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ try_BlockExpr();
+ }
+
+ function parse_CompTextConstructor()
+ {
+ eventHandler.startNonterminal("CompTextConstructor", e0);
+ shift(249); // 'text'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockExpr();
+ eventHandler.endNonterminal("CompTextConstructor", e0);
+ }
+
+ function try_CompTextConstructor()
+ {
+ shiftT(249); // 'text'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ try_BlockExpr();
+ }
+
+ function parse_PrimaryExpr()
+ {
+ eventHandler.startNonterminal("PrimaryExpr", e0);
+ switch (l1)
+ {
+ case 187: // 'namespace'
+ lookahead2W(247); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 220: // 'processing-instruction'
+ lookahead2W(245); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 281: // '{'
+ lookahead2W(283); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 83: // 'attribute'
+ case 122: // 'element'
+ lookahead2W(253); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 97: // 'comment'
+ case 249: // 'text'
+ lookahead2W(97); // S^WS | '#' | '(:' | '{'
+ break;
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 262: // 'unordered'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(237); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '.' |
+ break;
+ case 6: // EQName^Token
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 76: // 'and'
+ case 78: // 'append'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 87: // 'break'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 94: // 'child'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 103: // 'continue'
+ case 104: // 'copy'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 111: // 'delete'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 130: // 'every'
+ case 132: // 'except'
+ case 133: // 'exit'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 139: // 'for'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 161: // 'insert'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 177: // 'let'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 189: // 'ne'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 222: // 'rename'
+ case 223: // 'replace'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 234: // 'self'
+ case 239: // 'sliding'
+ case 240: // 'some'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 256: // 'try'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 266: // 'validate'
+ case 267: // 'value'
+ case 268: // 'variable'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 3353 // '{' EQName^Token
+ || lk == 4377 // '{' IntegerLiteral
+ || lk == 4889 // '{' DecimalLiteral
+ || lk == 5401 // '{' DoubleLiteral
+ || lk == 5913 // '{' StringLiteral
+ || lk == 16153 // '{' '$'
+ || lk == 16665 // '{' '$$'
+ || lk == 17177 // '{' '%'
+ || lk == 18055 // 'false' '('
+ || lk == 18117 // 'null' '('
+ || lk == 18175 // 'true' '('
+ || lk == 18201 // '{' '('
+ || lk == 18713 // '{' '(#'
+ || lk == 21273 // '{' '+'
+ || lk == 22297 // '{' '-'
+ || lk == 24345 // '{' '/'
+ || lk == 24857 // '{' '//'
+ || lk == 28441 // '{' '<'
+ || lk == 28953 // '{' '<!--'
+ || lk == 31001 // '{' '<?'
+ || lk == 35609 // '{' '['
+ || lk == 36633 // '{' 'after'
+ || lk == 37657 // '{' 'allowing'
+ || lk == 38169 // '{' 'ancestor'
+ || lk == 38681 // '{' 'ancestor-or-self'
+ || lk == 39193 // '{' 'and'
+ || lk == 40217 // '{' 'append'
+ || lk == 40729 // '{' 'array'
+ || lk == 41241 // '{' 'as'
+ || lk == 41753 // '{' 'ascending'
+ || lk == 42265 // '{' 'at'
+ || lk == 42777 // '{' 'attribute'
+ || lk == 43289 // '{' 'base-uri'
+ || lk == 43801 // '{' 'before'
+ || lk == 44313 // '{' 'boundary-space'
+ || lk == 44825 // '{' 'break'
+ || lk == 45849 // '{' 'case'
+ || lk == 46361 // '{' 'cast'
+ || lk == 46873 // '{' 'castable'
+ || lk == 47385 // '{' 'catch'
+ || lk == 48409 // '{' 'child'
+ || lk == 48921 // '{' 'collation'
+ || lk == 49945 // '{' 'comment'
+ || lk == 50457 // '{' 'constraint'
+ || lk == 50969 // '{' 'construction'
+ || lk == 52505 // '{' 'context'
+ || lk == 53017 // '{' 'continue'
+ || lk == 53529 // '{' 'copy'
+ || lk == 54041 // '{' 'copy-namespaces'
+ || lk == 54553 // '{' 'count'
+ || lk == 55065 // '{' 'decimal-format'
+ || lk == 56089 // '{' 'declare'
+ || lk == 56601 // '{' 'default'
+ || lk == 57113 // '{' 'delete'
+ || lk == 57625 // '{' 'descendant'
+ || lk == 58137 // '{' 'descendant-or-self'
+ || lk == 58649 // '{' 'descending'
+ || lk == 61209 // '{' 'div'
+ || lk == 61721 // '{' 'document'
+ || lk == 62233 // '{' 'document-node'
+ || lk == 62745 // '{' 'element'
+ || lk == 63257 // '{' 'else'
+ || lk == 63769 // '{' 'empty'
+ || lk == 64281 // '{' 'empty-sequence'
+ || lk == 64793 // '{' 'encoding'
+ || lk == 65305 // '{' 'end'
+ || lk == 66329 // '{' 'eq'
+ || lk == 66841 // '{' 'every'
+ || lk == 67865 // '{' 'except'
+ || lk == 68377 // '{' 'exit'
+ || lk == 68889 // '{' 'external'
+ || lk == 69401 // '{' 'false'
+ || lk == 69913 // '{' 'first'
+ || lk == 70425 // '{' 'following'
+ || lk == 70937 // '{' 'following-sibling'
+ || lk == 71449 // '{' 'for'
+ || lk == 72985 // '{' 'from'
+ || lk == 73497 // '{' 'ft-option'
+ || lk == 75545 // '{' 'function'
+ || lk == 76057 // '{' 'ge'
+ || lk == 77081 // '{' 'group'
+ || lk == 78105 // '{' 'gt'
+ || lk == 78617 // '{' 'idiv'
+ || lk == 79129 // '{' 'if'
+ || lk == 79641 // '{' 'import'
+ || lk == 80153 // '{' 'in'
+ || lk == 80665 // '{' 'index'
+ || lk == 82713 // '{' 'insert'
+ || lk == 83225 // '{' 'instance'
+ || lk == 83737 // '{' 'integrity'
+ || lk == 84249 // '{' 'intersect'
+ || lk == 84761 // '{' 'into'
+ || lk == 85273 // '{' 'is'
+ || lk == 85785 // '{' 'item'
+ || lk == 86297 // '{' 'json'
+ || lk == 86809 // '{' 'json-item'
+ || lk == 87321 // '{' 'jsoniq'
+ || lk == 88857 // '{' 'last'
+ || lk == 89369 // '{' 'lax'
+ || lk == 89881 // '{' 'le'
+ || lk == 90905 // '{' 'let'
+ || lk == 91929 // '{' 'loop'
+ || lk == 92953 // '{' 'lt'
+ || lk == 93977 // '{' 'mod'
+ || lk == 94489 // '{' 'modify'
+ || lk == 95001 // '{' 'module'
+ || lk == 96025 // '{' 'namespace'
+ || lk == 96537 // '{' 'namespace-node'
+ || lk == 97049 // '{' 'ne'
+ || lk == 99609 // '{' 'node'
+ || lk == 100121 // '{' 'nodes'
+ || lk == 100633 // '{' 'not'
+ || lk == 101145 // '{' 'null'
+ || lk == 101657 // '{' 'object'
+ || lk == 103705 // '{' 'only'
+ || lk == 104217 // '{' 'option'
+ || lk == 104729 // '{' 'or'
+ || lk == 105241 // '{' 'order'
+ || lk == 105753 // '{' 'ordered'
+ || lk == 106265 // '{' 'ordering'
+ || lk == 107801 // '{' 'parent'
+ || lk == 110873 // '{' 'preceding'
+ || lk == 111385 // '{' 'preceding-sibling'
+ || lk == 112921 // '{' 'processing-instruction'
+ || lk == 113945 // '{' 'rename'
+ || lk == 114457 // '{' 'replace'
+ || lk == 114969 // '{' 'return'
+ || lk == 115481 // '{' 'returning'
+ || lk == 115993 // '{' 'revalidation'
+ || lk == 117017 // '{' 'satisfies'
+ || lk == 117529 // '{' 'schema'
+ || lk == 118041 // '{' 'schema-attribute'
+ || lk == 118553 // '{' 'schema-element'
+ || lk == 119065 // '{' 'score'
+ || lk == 119577 // '{' 'select'
+ || lk == 120089 // '{' 'self'
+ || lk == 122649 // '{' 'sliding'
+ || lk == 123161 // '{' 'some'
+ || lk == 123673 // '{' 'stable'
+ || lk == 124185 // '{' 'start'
+ || lk == 125721 // '{' 'strict'
+ || lk == 126745 // '{' 'structured-item'
+ || lk == 127257 // '{' 'switch'
+ || lk == 127769 // '{' 'text'
+ || lk == 129817 // '{' 'to'
+ || lk == 130329 // '{' 'treat'
+ || lk == 130841 // '{' 'true'
+ || lk == 131353 // '{' 'try'
+ || lk == 131865 // '{' 'tumbling'
+ || lk == 132377 // '{' 'type'
+ || lk == 132889 // '{' 'typeswitch'
+ || lk == 133401 // '{' 'union'
+ || lk == 134425 // '{' 'unordered'
+ || lk == 134937 // '{' 'updating'
+ || lk == 136473 // '{' 'validate'
+ || lk == 136985 // '{' 'value'
+ || lk == 137497 // '{' 'variable'
+ || lk == 138009 // '{' 'version'
+ || lk == 139545 // '{' 'where'
+ || lk == 140057 // '{' 'while'
+ || lk == 141593 // '{' 'with'
+ || lk == 144153 // '{' '{'
+ || lk == 145177 // '{' '{|'
+ || lk == 147225) // '{' '}'
+ {
+ lk = memoized(20, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_Literal();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_FunctionCall();
+ lk = -5;
+ }
+ catch (p5A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_BlockExpr();
+ lk = -10;
+ }
+ catch (p10A)
+ {
+ lk = -11;
+ }
+ }
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(20, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 12935: // 'false' EOF
+ case 12997: // 'null' EOF
+ case 13055: // 'true' EOF
+ case 13447: // 'false' '!'
+ case 13509: // 'null' '!'
+ case 13567: // 'true' '!'
+ case 13959: // 'false' '!='
+ case 14021: // 'null' '!='
+ case 14079: // 'true' '!='
+ case 19591: // 'false' ')'
+ case 19653: // 'null' ')'
+ case 19711: // 'true' ')'
+ case 20103: // 'false' '*'
+ case 20165: // 'null' '*'
+ case 20223: // 'true' '*'
+ case 21127: // 'false' '+'
+ case 21189: // 'null' '+'
+ case 21247: // 'true' '+'
+ case 21639: // 'false' ','
+ case 21701: // 'null' ','
+ case 21759: // 'true' ','
+ case 22151: // 'false' '-'
+ case 22213: // 'null' '-'
+ case 22271: // 'true' '-'
+ case 23175: // 'false' '.'
+ case 23237: // 'null' '.'
+ case 23295: // 'true' '.'
+ case 24199: // 'false' '/'
+ case 24261: // 'null' '/'
+ case 24319: // 'true' '/'
+ case 24711: // 'false' '//'
+ case 24773: // 'null' '//'
+ case 24831: // 'true' '//'
+ case 25735: // 'false' ':'
+ case 25797: // 'null' ':'
+ case 25855: // 'true' ':'
+ case 27783: // 'false' ';'
+ case 27845: // 'null' ';'
+ case 27903: // 'true' ';'
+ case 28295: // 'false' '<'
+ case 28357: // 'null' '<'
+ case 28415: // 'true' '<'
+ case 29831: // 'false' '<<'
+ case 29893: // 'null' '<<'
+ case 29951: // 'true' '<<'
+ case 30343: // 'false' '<='
+ case 30405: // 'null' '<='
+ case 30463: // 'true' '<='
+ case 31367: // 'false' '='
+ case 31429: // 'null' '='
+ case 31487: // 'true' '='
+ case 31879: // 'false' '>'
+ case 31941: // 'null' '>'
+ case 31999: // 'true' '>'
+ case 32391: // 'false' '>='
+ case 32453: // 'null' '>='
+ case 32511: // 'true' '>='
+ case 32903: // 'false' '>>'
+ case 32965: // 'null' '>>'
+ case 33023: // 'true' '>>'
+ case 35463: // 'false' '['
+ case 35525: // 'null' '['
+ case 35583: // 'true' '['
+ case 35975: // 'false' ']'
+ case 36037: // 'null' ']'
+ case 36095: // 'true' ']'
+ case 36487: // 'false' 'after'
+ case 36549: // 'null' 'after'
+ case 36607: // 'true' 'after'
+ case 39047: // 'false' 'and'
+ case 39109: // 'null' 'and'
+ case 39167: // 'true' 'and'
+ case 41095: // 'false' 'as'
+ case 41157: // 'null' 'as'
+ case 41215: // 'true' 'as'
+ case 41607: // 'false' 'ascending'
+ case 41669: // 'null' 'ascending'
+ case 41727: // 'true' 'ascending'
+ case 42119: // 'false' 'at'
+ case 42181: // 'null' 'at'
+ case 42239: // 'true' 'at'
+ case 43655: // 'false' 'before'
+ case 43717: // 'null' 'before'
+ case 43775: // 'true' 'before'
+ case 45191: // 'false' 'by'
+ case 45253: // 'null' 'by'
+ case 45311: // 'true' 'by'
+ case 45703: // 'false' 'case'
+ case 45765: // 'null' 'case'
+ case 45823: // 'true' 'case'
+ case 46215: // 'false' 'cast'
+ case 46277: // 'null' 'cast'
+ case 46335: // 'true' 'cast'
+ case 46727: // 'false' 'castable'
+ case 46789: // 'null' 'castable'
+ case 46847: // 'true' 'castable'
+ case 48775: // 'false' 'collation'
+ case 48837: // 'null' 'collation'
+ case 48895: // 'true' 'collation'
+ case 51335: // 'false' 'contains'
+ case 51397: // 'null' 'contains'
+ case 51455: // 'true' 'contains'
+ case 54407: // 'false' 'count'
+ case 54469: // 'null' 'count'
+ case 54527: // 'true' 'count'
+ case 56455: // 'false' 'default'
+ case 56517: // 'null' 'default'
+ case 56575: // 'true' 'default'
+ case 58503: // 'false' 'descending'
+ case 58565: // 'null' 'descending'
+ case 58623: // 'true' 'descending'
+ case 61063: // 'false' 'div'
+ case 61125: // 'null' 'div'
+ case 61183: // 'true' 'div'
+ case 63111: // 'false' 'else'
+ case 63173: // 'null' 'else'
+ case 63231: // 'true' 'else'
+ case 63623: // 'false' 'empty'
+ case 63685: // 'null' 'empty'
+ case 63743: // 'true' 'empty'
+ case 65159: // 'false' 'end'
+ case 65221: // 'null' 'end'
+ case 65279: // 'true' 'end'
+ case 66183: // 'false' 'eq'
+ case 66245: // 'null' 'eq'
+ case 66303: // 'true' 'eq'
+ case 67719: // 'false' 'except'
+ case 67781: // 'null' 'except'
+ case 67839: // 'true' 'except'
+ case 71303: // 'false' 'for'
+ case 71365: // 'null' 'for'
+ case 71423: // 'true' 'for'
+ case 75911: // 'false' 'ge'
+ case 75973: // 'null' 'ge'
+ case 76031: // 'true' 'ge'
+ case 76935: // 'false' 'group'
+ case 76997: // 'null' 'group'
+ case 77055: // 'true' 'group'
+ case 77959: // 'false' 'gt'
+ case 78021: // 'null' 'gt'
+ case 78079: // 'true' 'gt'
+ case 78471: // 'false' 'idiv'
+ case 78533: // 'null' 'idiv'
+ case 78591: // 'true' 'idiv'
+ case 83079: // 'false' 'instance'
+ case 83141: // 'null' 'instance'
+ case 83199: // 'true' 'instance'
+ case 84103: // 'false' 'intersect'
+ case 84165: // 'null' 'intersect'
+ case 84223: // 'true' 'intersect'
+ case 84615: // 'false' 'into'
+ case 84677: // 'null' 'into'
+ case 84735: // 'true' 'into'
+ case 85127: // 'false' 'is'
+ case 85189: // 'null' 'is'
+ case 85247: // 'true' 'is'
+ case 89735: // 'false' 'le'
+ case 89797: // 'null' 'le'
+ case 89855: // 'true' 'le'
+ case 90759: // 'false' 'let'
+ case 90821: // 'null' 'let'
+ case 90879: // 'true' 'let'
+ case 92807: // 'false' 'lt'
+ case 92869: // 'null' 'lt'
+ case 92927: // 'true' 'lt'
+ case 93831: // 'false' 'mod'
+ case 93893: // 'null' 'mod'
+ case 93951: // 'true' 'mod'
+ case 94343: // 'false' 'modify'
+ case 94405: // 'null' 'modify'
+ case 94463: // 'true' 'modify'
+ case 96903: // 'false' 'ne'
+ case 96965: // 'null' 'ne'
+ case 97023: // 'true' 'ne'
+ case 103559: // 'false' 'only'
+ case 103621: // 'null' 'only'
+ case 103679: // 'true' 'only'
+ case 104583: // 'false' 'or'
+ case 104645: // 'null' 'or'
+ case 104703: // 'true' 'or'
+ case 105095: // 'false' 'order'
+ case 105157: // 'null' 'order'
+ case 105215: // 'true' 'order'
+ case 107143: // 'false' 'paragraphs'
+ case 107205: // 'null' 'paragraphs'
+ case 107263: // 'true' 'paragraphs'
+ case 114823: // 'false' 'return'
+ case 114885: // 'null' 'return'
+ case 114943: // 'true' 'return'
+ case 116871: // 'false' 'satisfies'
+ case 116933: // 'null' 'satisfies'
+ case 116991: // 'true' 'satisfies'
+ case 121479: // 'false' 'sentences'
+ case 121541: // 'null' 'sentences'
+ case 121599: // 'true' 'sentences'
+ case 123527: // 'false' 'stable'
+ case 123589: // 'null' 'stable'
+ case 123647: // 'true' 'stable'
+ case 124039: // 'false' 'start'
+ case 124101: // 'null' 'start'
+ case 124159: // 'true' 'start'
+ case 129159: // 'false' 'times'
+ case 129221: // 'null' 'times'
+ case 129279: // 'true' 'times'
+ case 129671: // 'false' 'to'
+ case 129733: // 'null' 'to'
+ case 129791: // 'true' 'to'
+ case 130183: // 'false' 'treat'
+ case 130245: // 'null' 'treat'
+ case 130303: // 'true' 'treat'
+ case 133255: // 'false' 'union'
+ case 133317: // 'null' 'union'
+ case 133375: // 'true' 'union'
+ case 139399: // 'false' 'where'
+ case 139461: // 'null' 'where'
+ case 139519: // 'true' 'where'
+ case 141447: // 'false' 'with'
+ case 141509: // 'null' 'with'
+ case 141567: // 'true' 'with'
+ case 142983: // 'false' 'words'
+ case 143045: // 'null' 'words'
+ case 143103: // 'true' 'words'
+ case 145543: // 'false' '|'
+ case 145605: // 'null' '|'
+ case 145663: // 'true' '|'
+ case 146055: // 'false' '||'
+ case 146117: // 'null' '||'
+ case 146175: // 'true' '||'
+ case 146567: // 'false' '|}'
+ case 146629: // 'null' '|}'
+ case 146687: // 'true' '|}'
+ case 147079: // 'false' '}'
+ case 147141: // 'null' '}'
+ case 147199: // 'true' '}'
+ parse_Literal();
+ break;
+ case 31: // '$'
+ parse_VarRef();
+ break;
+ case 35: // '('
+ parse_ParenthesizedExpr();
+ break;
+ case 32: // '$$'
+ parse_ContextItemExpr();
+ break;
+ case -5:
+ case 17926: // EQName^Token '('
+ case 17991: // 'after' '('
+ case 17993: // 'allowing' '('
+ case 17994: // 'ancestor' '('
+ case 17995: // 'ancestor-or-self' '('
+ case 17996: // 'and' '('
+ case 17998: // 'append' '('
+ case 18000: // 'as' '('
+ case 18001: // 'ascending' '('
+ case 18002: // 'at' '('
+ case 18004: // 'base-uri' '('
+ case 18005: // 'before' '('
+ case 18006: // 'boundary-space' '('
+ case 18007: // 'break' '('
+ case 18009: // 'case' '('
+ case 18010: // 'cast' '('
+ case 18011: // 'castable' '('
+ case 18012: // 'catch' '('
+ case 18014: // 'child' '('
+ case 18015: // 'collation' '('
+ case 18018: // 'constraint' '('
+ case 18019: // 'construction' '('
+ case 18022: // 'context' '('
+ case 18023: // 'continue' '('
+ case 18024: // 'copy' '('
+ case 18025: // 'copy-namespaces' '('
+ case 18026: // 'count' '('
+ case 18027: // 'decimal-format' '('
+ case 18029: // 'declare' '('
+ case 18030: // 'default' '('
+ case 18031: // 'delete' '('
+ case 18032: // 'descendant' '('
+ case 18033: // 'descendant-or-self' '('
+ case 18034: // 'descending' '('
+ case 18039: // 'div' '('
+ case 18040: // 'document' '('
+ case 18043: // 'else' '('
+ case 18044: // 'empty' '('
+ case 18046: // 'encoding' '('
+ case 18047: // 'end' '('
+ case 18049: // 'eq' '('
+ case 18050: // 'every' '('
+ case 18052: // 'except' '('
+ case 18053: // 'exit' '('
+ case 18054: // 'external' '('
+ case 18056: // 'first' '('
+ case 18057: // 'following' '('
+ case 18058: // 'following-sibling' '('
+ case 18059: // 'for' '('
+ case 18062: // 'from' '('
+ case 18063: // 'ft-option' '('
+ case 18068: // 'ge' '('
+ case 18070: // 'group' '('
+ case 18072: // 'gt' '('
+ case 18073: // 'idiv' '('
+ case 18075: // 'import' '('
+ case 18076: // 'in' '('
+ case 18077: // 'index' '('
+ case 18081: // 'insert' '('
+ case 18082: // 'instance' '('
+ case 18083: // 'integrity' '('
+ case 18084: // 'intersect' '('
+ case 18085: // 'into' '('
+ case 18086: // 'is' '('
+ case 18088: // 'json' '('
+ case 18090: // 'jsoniq' '('
+ case 18093: // 'last' '('
+ case 18094: // 'lax' '('
+ case 18095: // 'le' '('
+ case 18097: // 'let' '('
+ case 18099: // 'loop' '('
+ case 18101: // 'lt' '('
+ case 18103: // 'mod' '('
+ case 18104: // 'modify' '('
+ case 18105: // 'module' '('
+ case 18107: // 'namespace' '('
+ case 18109: // 'ne' '('
+ case 18115: // 'nodes' '('
+ case 18118: // 'object' '('
+ case 18122: // 'only' '('
+ case 18123: // 'option' '('
+ case 18124: // 'or' '('
+ case 18125: // 'order' '('
+ case 18126: // 'ordered' '('
+ case 18127: // 'ordering' '('
+ case 18130: // 'parent' '('
+ case 18136: // 'preceding' '('
+ case 18137: // 'preceding-sibling' '('
+ case 18142: // 'rename' '('
+ case 18143: // 'replace' '('
+ case 18144: // 'return' '('
+ case 18145: // 'returning' '('
+ case 18146: // 'revalidation' '('
+ case 18148: // 'satisfies' '('
+ case 18149: // 'schema' '('
+ case 18152: // 'score' '('
+ case 18153: // 'select' '('
+ case 18154: // 'self' '('
+ case 18159: // 'sliding' '('
+ case 18160: // 'some' '('
+ case 18161: // 'stable' '('
+ case 18162: // 'start' '('
+ case 18165: // 'strict' '('
+ case 18173: // 'to' '('
+ case 18174: // 'treat' '('
+ case 18176: // 'try' '('
+ case 18177: // 'tumbling' '('
+ case 18178: // 'type' '('
+ case 18180: // 'union' '('
+ case 18182: // 'unordered' '('
+ case 18183: // 'updating' '('
+ case 18186: // 'validate' '('
+ case 18187: // 'value' '('
+ case 18188: // 'variable' '('
+ case 18189: // 'version' '('
+ case 18192: // 'where' '('
+ case 18193: // 'while' '('
+ case 18196: // 'with' '('
+ parse_FunctionCall();
+ break;
+ case 144078: // 'ordered' '{'
+ parse_OrderedExpr();
+ break;
+ case 144134: // 'unordered' '{'
+ parse_UnorderedExpr();
+ break;
+ case 33: // '%'
+ case 79: // 'array'
+ case 121: // 'document-node'
+ case 125: // 'empty-sequence'
+ case 147: // 'function'
+ case 154: // 'if'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 247: // 'structured-item'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ case 14854: // EQName^Token '#'
+ case 14919: // 'after' '#'
+ case 14921: // 'allowing' '#'
+ case 14922: // 'ancestor' '#'
+ case 14923: // 'ancestor-or-self' '#'
+ case 14924: // 'and' '#'
+ case 14926: // 'append' '#'
+ case 14928: // 'as' '#'
+ case 14929: // 'ascending' '#'
+ case 14930: // 'at' '#'
+ case 14931: // 'attribute' '#'
+ case 14932: // 'base-uri' '#'
+ case 14933: // 'before' '#'
+ case 14934: // 'boundary-space' '#'
+ case 14935: // 'break' '#'
+ case 14937: // 'case' '#'
+ case 14938: // 'cast' '#'
+ case 14939: // 'castable' '#'
+ case 14940: // 'catch' '#'
+ case 14942: // 'child' '#'
+ case 14943: // 'collation' '#'
+ case 14945: // 'comment' '#'
+ case 14946: // 'constraint' '#'
+ case 14947: // 'construction' '#'
+ case 14950: // 'context' '#'
+ case 14951: // 'continue' '#'
+ case 14952: // 'copy' '#'
+ case 14953: // 'copy-namespaces' '#'
+ case 14954: // 'count' '#'
+ case 14955: // 'decimal-format' '#'
+ case 14957: // 'declare' '#'
+ case 14958: // 'default' '#'
+ case 14959: // 'delete' '#'
+ case 14960: // 'descendant' '#'
+ case 14961: // 'descendant-or-self' '#'
+ case 14962: // 'descending' '#'
+ case 14967: // 'div' '#'
+ case 14968: // 'document' '#'
+ case 14970: // 'element' '#'
+ case 14971: // 'else' '#'
+ case 14972: // 'empty' '#'
+ case 14974: // 'encoding' '#'
+ case 14975: // 'end' '#'
+ case 14977: // 'eq' '#'
+ case 14978: // 'every' '#'
+ case 14980: // 'except' '#'
+ case 14981: // 'exit' '#'
+ case 14982: // 'external' '#'
+ case 14983: // 'false' '#'
+ case 14984: // 'first' '#'
+ case 14985: // 'following' '#'
+ case 14986: // 'following-sibling' '#'
+ case 14987: // 'for' '#'
+ case 14990: // 'from' '#'
+ case 14991: // 'ft-option' '#'
+ case 14996: // 'ge' '#'
+ case 14998: // 'group' '#'
+ case 15000: // 'gt' '#'
+ case 15001: // 'idiv' '#'
+ case 15003: // 'import' '#'
+ case 15004: // 'in' '#'
+ case 15005: // 'index' '#'
+ case 15009: // 'insert' '#'
+ case 15010: // 'instance' '#'
+ case 15011: // 'integrity' '#'
+ case 15012: // 'intersect' '#'
+ case 15013: // 'into' '#'
+ case 15014: // 'is' '#'
+ case 15016: // 'json' '#'
+ case 15018: // 'jsoniq' '#'
+ case 15021: // 'last' '#'
+ case 15022: // 'lax' '#'
+ case 15023: // 'le' '#'
+ case 15025: // 'let' '#'
+ case 15027: // 'loop' '#'
+ case 15029: // 'lt' '#'
+ case 15031: // 'mod' '#'
+ case 15032: // 'modify' '#'
+ case 15033: // 'module' '#'
+ case 15035: // 'namespace' '#'
+ case 15037: // 'ne' '#'
+ case 15043: // 'nodes' '#'
+ case 15045: // 'null' '#'
+ case 15046: // 'object' '#'
+ case 15050: // 'only' '#'
+ case 15051: // 'option' '#'
+ case 15052: // 'or' '#'
+ case 15053: // 'order' '#'
+ case 15054: // 'ordered' '#'
+ case 15055: // 'ordering' '#'
+ case 15058: // 'parent' '#'
+ case 15064: // 'preceding' '#'
+ case 15065: // 'preceding-sibling' '#'
+ case 15068: // 'processing-instruction' '#'
+ case 15070: // 'rename' '#'
+ case 15071: // 'replace' '#'
+ case 15072: // 'return' '#'
+ case 15073: // 'returning' '#'
+ case 15074: // 'revalidation' '#'
+ case 15076: // 'satisfies' '#'
+ case 15077: // 'schema' '#'
+ case 15080: // 'score' '#'
+ case 15081: // 'select' '#'
+ case 15082: // 'self' '#'
+ case 15087: // 'sliding' '#'
+ case 15088: // 'some' '#'
+ case 15089: // 'stable' '#'
+ case 15090: // 'start' '#'
+ case 15093: // 'strict' '#'
+ case 15097: // 'text' '#'
+ case 15101: // 'to' '#'
+ case 15102: // 'treat' '#'
+ case 15103: // 'true' '#'
+ case 15104: // 'try' '#'
+ case 15105: // 'tumbling' '#'
+ case 15106: // 'type' '#'
+ case 15108: // 'union' '#'
+ case 15110: // 'unordered' '#'
+ case 15111: // 'updating' '#'
+ case 15114: // 'validate' '#'
+ case 15115: // 'value' '#'
+ case 15116: // 'variable' '#'
+ case 15117: // 'version' '#'
+ case 15120: // 'where' '#'
+ case 15121: // 'while' '#'
+ case 15124: // 'with' '#'
+ parse_FunctionItemExpr();
+ break;
+ case -10:
+ case 27929: // '{' ';'
+ parse_BlockExpr();
+ break;
+ case -11:
+ case 10009: // '{' NCName^Token
+ parse_ObjectConstructor();
+ break;
+ case 69: // '['
+ parse_ArrayConstructor();
+ break;
+ case 283: // '{|'
+ parse_JSONSimpleObjectUnion();
+ break;
+ default:
+ parse_Constructor();
+ }
+ eventHandler.endNonterminal("PrimaryExpr", e0);
+ }
+
+ function try_PrimaryExpr()
+ {
+ switch (l1)
+ {
+ case 187: // 'namespace'
+ lookahead2W(247); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 220: // 'processing-instruction'
+ lookahead2W(245); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 281: // '{'
+ lookahead2W(283); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 83: // 'attribute'
+ case 122: // 'element'
+ lookahead2W(253); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 97: // 'comment'
+ case 249: // 'text'
+ lookahead2W(97); // S^WS | '#' | '(:' | '{'
+ break;
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 262: // 'unordered'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(237); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '.' |
+ break;
+ case 6: // EQName^Token
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 76: // 'and'
+ case 78: // 'append'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 87: // 'break'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 94: // 'child'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 103: // 'continue'
+ case 104: // 'copy'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 111: // 'delete'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 130: // 'every'
+ case 132: // 'except'
+ case 133: // 'exit'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 139: // 'for'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 161: // 'insert'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 177: // 'let'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 189: // 'ne'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 222: // 'rename'
+ case 223: // 'replace'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 234: // 'self'
+ case 239: // 'sliding'
+ case 240: // 'some'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 256: // 'try'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 266: // 'validate'
+ case 267: // 'value'
+ case 268: // 'variable'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 3353 // '{' EQName^Token
+ || lk == 4377 // '{' IntegerLiteral
+ || lk == 4889 // '{' DecimalLiteral
+ || lk == 5401 // '{' DoubleLiteral
+ || lk == 5913 // '{' StringLiteral
+ || lk == 16153 // '{' '$'
+ || lk == 16665 // '{' '$$'
+ || lk == 17177 // '{' '%'
+ || lk == 18055 // 'false' '('
+ || lk == 18117 // 'null' '('
+ || lk == 18175 // 'true' '('
+ || lk == 18201 // '{' '('
+ || lk == 18713 // '{' '(#'
+ || lk == 21273 // '{' '+'
+ || lk == 22297 // '{' '-'
+ || lk == 24345 // '{' '/'
+ || lk == 24857 // '{' '//'
+ || lk == 28441 // '{' '<'
+ || lk == 28953 // '{' '<!--'
+ || lk == 31001 // '{' '<?'
+ || lk == 35609 // '{' '['
+ || lk == 36633 // '{' 'after'
+ || lk == 37657 // '{' 'allowing'
+ || lk == 38169 // '{' 'ancestor'
+ || lk == 38681 // '{' 'ancestor-or-self'
+ || lk == 39193 // '{' 'and'
+ || lk == 40217 // '{' 'append'
+ || lk == 40729 // '{' 'array'
+ || lk == 41241 // '{' 'as'
+ || lk == 41753 // '{' 'ascending'
+ || lk == 42265 // '{' 'at'
+ || lk == 42777 // '{' 'attribute'
+ || lk == 43289 // '{' 'base-uri'
+ || lk == 43801 // '{' 'before'
+ || lk == 44313 // '{' 'boundary-space'
+ || lk == 44825 // '{' 'break'
+ || lk == 45849 // '{' 'case'
+ || lk == 46361 // '{' 'cast'
+ || lk == 46873 // '{' 'castable'
+ || lk == 47385 // '{' 'catch'
+ || lk == 48409 // '{' 'child'
+ || lk == 48921 // '{' 'collation'
+ || lk == 49945 // '{' 'comment'
+ || lk == 50457 // '{' 'constraint'
+ || lk == 50969 // '{' 'construction'
+ || lk == 52505 // '{' 'context'
+ || lk == 53017 // '{' 'continue'
+ || lk == 53529 // '{' 'copy'
+ || lk == 54041 // '{' 'copy-namespaces'
+ || lk == 54553 // '{' 'count'
+ || lk == 55065 // '{' 'decimal-format'
+ || lk == 56089 // '{' 'declare'
+ || lk == 56601 // '{' 'default'
+ || lk == 57113 // '{' 'delete'
+ || lk == 57625 // '{' 'descendant'
+ || lk == 58137 // '{' 'descendant-or-self'
+ || lk == 58649 // '{' 'descending'
+ || lk == 61209 // '{' 'div'
+ || lk == 61721 // '{' 'document'
+ || lk == 62233 // '{' 'document-node'
+ || lk == 62745 // '{' 'element'
+ || lk == 63257 // '{' 'else'
+ || lk == 63769 // '{' 'empty'
+ || lk == 64281 // '{' 'empty-sequence'
+ || lk == 64793 // '{' 'encoding'
+ || lk == 65305 // '{' 'end'
+ || lk == 66329 // '{' 'eq'
+ || lk == 66841 // '{' 'every'
+ || lk == 67865 // '{' 'except'
+ || lk == 68377 // '{' 'exit'
+ || lk == 68889 // '{' 'external'
+ || lk == 69401 // '{' 'false'
+ || lk == 69913 // '{' 'first'
+ || lk == 70425 // '{' 'following'
+ || lk == 70937 // '{' 'following-sibling'
+ || lk == 71449 // '{' 'for'
+ || lk == 72985 // '{' 'from'
+ || lk == 73497 // '{' 'ft-option'
+ || lk == 75545 // '{' 'function'
+ || lk == 76057 // '{' 'ge'
+ || lk == 77081 // '{' 'group'
+ || lk == 78105 // '{' 'gt'
+ || lk == 78617 // '{' 'idiv'
+ || lk == 79129 // '{' 'if'
+ || lk == 79641 // '{' 'import'
+ || lk == 80153 // '{' 'in'
+ || lk == 80665 // '{' 'index'
+ || lk == 82713 // '{' 'insert'
+ || lk == 83225 // '{' 'instance'
+ || lk == 83737 // '{' 'integrity'
+ || lk == 84249 // '{' 'intersect'
+ || lk == 84761 // '{' 'into'
+ || lk == 85273 // '{' 'is'
+ || lk == 85785 // '{' 'item'
+ || lk == 86297 // '{' 'json'
+ || lk == 86809 // '{' 'json-item'
+ || lk == 87321 // '{' 'jsoniq'
+ || lk == 88857 // '{' 'last'
+ || lk == 89369 // '{' 'lax'
+ || lk == 89881 // '{' 'le'
+ || lk == 90905 // '{' 'let'
+ || lk == 91929 // '{' 'loop'
+ || lk == 92953 // '{' 'lt'
+ || lk == 93977 // '{' 'mod'
+ || lk == 94489 // '{' 'modify'
+ || lk == 95001 // '{' 'module'
+ || lk == 96025 // '{' 'namespace'
+ || lk == 96537 // '{' 'namespace-node'
+ || lk == 97049 // '{' 'ne'
+ || lk == 99609 // '{' 'node'
+ || lk == 100121 // '{' 'nodes'
+ || lk == 100633 // '{' 'not'
+ || lk == 101145 // '{' 'null'
+ || lk == 101657 // '{' 'object'
+ || lk == 103705 // '{' 'only'
+ || lk == 104217 // '{' 'option'
+ || lk == 104729 // '{' 'or'
+ || lk == 105241 // '{' 'order'
+ || lk == 105753 // '{' 'ordered'
+ || lk == 106265 // '{' 'ordering'
+ || lk == 107801 // '{' 'parent'
+ || lk == 110873 // '{' 'preceding'
+ || lk == 111385 // '{' 'preceding-sibling'
+ || lk == 112921 // '{' 'processing-instruction'
+ || lk == 113945 // '{' 'rename'
+ || lk == 114457 // '{' 'replace'
+ || lk == 114969 // '{' 'return'
+ || lk == 115481 // '{' 'returning'
+ || lk == 115993 // '{' 'revalidation'
+ || lk == 117017 // '{' 'satisfies'
+ || lk == 117529 // '{' 'schema'
+ || lk == 118041 // '{' 'schema-attribute'
+ || lk == 118553 // '{' 'schema-element'
+ || lk == 119065 // '{' 'score'
+ || lk == 119577 // '{' 'select'
+ || lk == 120089 // '{' 'self'
+ || lk == 122649 // '{' 'sliding'
+ || lk == 123161 // '{' 'some'
+ || lk == 123673 // '{' 'stable'
+ || lk == 124185 // '{' 'start'
+ || lk == 125721 // '{' 'strict'
+ || lk == 126745 // '{' 'structured-item'
+ || lk == 127257 // '{' 'switch'
+ || lk == 127769 // '{' 'text'
+ || lk == 129817 // '{' 'to'
+ || lk == 130329 // '{' 'treat'
+ || lk == 130841 // '{' 'true'
+ || lk == 131353 // '{' 'try'
+ || lk == 131865 // '{' 'tumbling'
+ || lk == 132377 // '{' 'type'
+ || lk == 132889 // '{' 'typeswitch'
+ || lk == 133401 // '{' 'union'
+ || lk == 134425 // '{' 'unordered'
+ || lk == 134937 // '{' 'updating'
+ || lk == 136473 // '{' 'validate'
+ || lk == 136985 // '{' 'value'
+ || lk == 137497 // '{' 'variable'
+ || lk == 138009 // '{' 'version'
+ || lk == 139545 // '{' 'where'
+ || lk == 140057 // '{' 'while'
+ || lk == 141593 // '{' 'with'
+ || lk == 144153 // '{' '{'
+ || lk == 145177 // '{' '{|'
+ || lk == 147225) // '{' '}'
+ {
+ lk = memoized(20, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_Literal();
+ memoize(20, e0A, -1);
+ lk = -14;
+ }
+ catch (p1A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_FunctionCall();
+ memoize(20, e0A, -5);
+ lk = -14;
+ }
+ catch (p5A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_BlockExpr();
+ memoize(20, e0A, -10);
+ lk = -14;
+ }
+ catch (p10A)
+ {
+ lk = -11;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(20, e0A, -11);
+ }
+ }
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 12935: // 'false' EOF
+ case 12997: // 'null' EOF
+ case 13055: // 'true' EOF
+ case 13447: // 'false' '!'
+ case 13509: // 'null' '!'
+ case 13567: // 'true' '!'
+ case 13959: // 'false' '!='
+ case 14021: // 'null' '!='
+ case 14079: // 'true' '!='
+ case 19591: // 'false' ')'
+ case 19653: // 'null' ')'
+ case 19711: // 'true' ')'
+ case 20103: // 'false' '*'
+ case 20165: // 'null' '*'
+ case 20223: // 'true' '*'
+ case 21127: // 'false' '+'
+ case 21189: // 'null' '+'
+ case 21247: // 'true' '+'
+ case 21639: // 'false' ','
+ case 21701: // 'null' ','
+ case 21759: // 'true' ','
+ case 22151: // 'false' '-'
+ case 22213: // 'null' '-'
+ case 22271: // 'true' '-'
+ case 23175: // 'false' '.'
+ case 23237: // 'null' '.'
+ case 23295: // 'true' '.'
+ case 24199: // 'false' '/'
+ case 24261: // 'null' '/'
+ case 24319: // 'true' '/'
+ case 24711: // 'false' '//'
+ case 24773: // 'null' '//'
+ case 24831: // 'true' '//'
+ case 25735: // 'false' ':'
+ case 25797: // 'null' ':'
+ case 25855: // 'true' ':'
+ case 27783: // 'false' ';'
+ case 27845: // 'null' ';'
+ case 27903: // 'true' ';'
+ case 28295: // 'false' '<'
+ case 28357: // 'null' '<'
+ case 28415: // 'true' '<'
+ case 29831: // 'false' '<<'
+ case 29893: // 'null' '<<'
+ case 29951: // 'true' '<<'
+ case 30343: // 'false' '<='
+ case 30405: // 'null' '<='
+ case 30463: // 'true' '<='
+ case 31367: // 'false' '='
+ case 31429: // 'null' '='
+ case 31487: // 'true' '='
+ case 31879: // 'false' '>'
+ case 31941: // 'null' '>'
+ case 31999: // 'true' '>'
+ case 32391: // 'false' '>='
+ case 32453: // 'null' '>='
+ case 32511: // 'true' '>='
+ case 32903: // 'false' '>>'
+ case 32965: // 'null' '>>'
+ case 33023: // 'true' '>>'
+ case 35463: // 'false' '['
+ case 35525: // 'null' '['
+ case 35583: // 'true' '['
+ case 35975: // 'false' ']'
+ case 36037: // 'null' ']'
+ case 36095: // 'true' ']'
+ case 36487: // 'false' 'after'
+ case 36549: // 'null' 'after'
+ case 36607: // 'true' 'after'
+ case 39047: // 'false' 'and'
+ case 39109: // 'null' 'and'
+ case 39167: // 'true' 'and'
+ case 41095: // 'false' 'as'
+ case 41157: // 'null' 'as'
+ case 41215: // 'true' 'as'
+ case 41607: // 'false' 'ascending'
+ case 41669: // 'null' 'ascending'
+ case 41727: // 'true' 'ascending'
+ case 42119: // 'false' 'at'
+ case 42181: // 'null' 'at'
+ case 42239: // 'true' 'at'
+ case 43655: // 'false' 'before'
+ case 43717: // 'null' 'before'
+ case 43775: // 'true' 'before'
+ case 45191: // 'false' 'by'
+ case 45253: // 'null' 'by'
+ case 45311: // 'true' 'by'
+ case 45703: // 'false' 'case'
+ case 45765: // 'null' 'case'
+ case 45823: // 'true' 'case'
+ case 46215: // 'false' 'cast'
+ case 46277: // 'null' 'cast'
+ case 46335: // 'true' 'cast'
+ case 46727: // 'false' 'castable'
+ case 46789: // 'null' 'castable'
+ case 46847: // 'true' 'castable'
+ case 48775: // 'false' 'collation'
+ case 48837: // 'null' 'collation'
+ case 48895: // 'true' 'collation'
+ case 51335: // 'false' 'contains'
+ case 51397: // 'null' 'contains'
+ case 51455: // 'true' 'contains'
+ case 54407: // 'false' 'count'
+ case 54469: // 'null' 'count'
+ case 54527: // 'true' 'count'
+ case 56455: // 'false' 'default'
+ case 56517: // 'null' 'default'
+ case 56575: // 'true' 'default'
+ case 58503: // 'false' 'descending'
+ case 58565: // 'null' 'descending'
+ case 58623: // 'true' 'descending'
+ case 61063: // 'false' 'div'
+ case 61125: // 'null' 'div'
+ case 61183: // 'true' 'div'
+ case 63111: // 'false' 'else'
+ case 63173: // 'null' 'else'
+ case 63231: // 'true' 'else'
+ case 63623: // 'false' 'empty'
+ case 63685: // 'null' 'empty'
+ case 63743: // 'true' 'empty'
+ case 65159: // 'false' 'end'
+ case 65221: // 'null' 'end'
+ case 65279: // 'true' 'end'
+ case 66183: // 'false' 'eq'
+ case 66245: // 'null' 'eq'
+ case 66303: // 'true' 'eq'
+ case 67719: // 'false' 'except'
+ case 67781: // 'null' 'except'
+ case 67839: // 'true' 'except'
+ case 71303: // 'false' 'for'
+ case 71365: // 'null' 'for'
+ case 71423: // 'true' 'for'
+ case 75911: // 'false' 'ge'
+ case 75973: // 'null' 'ge'
+ case 76031: // 'true' 'ge'
+ case 76935: // 'false' 'group'
+ case 76997: // 'null' 'group'
+ case 77055: // 'true' 'group'
+ case 77959: // 'false' 'gt'
+ case 78021: // 'null' 'gt'
+ case 78079: // 'true' 'gt'
+ case 78471: // 'false' 'idiv'
+ case 78533: // 'null' 'idiv'
+ case 78591: // 'true' 'idiv'
+ case 83079: // 'false' 'instance'
+ case 83141: // 'null' 'instance'
+ case 83199: // 'true' 'instance'
+ case 84103: // 'false' 'intersect'
+ case 84165: // 'null' 'intersect'
+ case 84223: // 'true' 'intersect'
+ case 84615: // 'false' 'into'
+ case 84677: // 'null' 'into'
+ case 84735: // 'true' 'into'
+ case 85127: // 'false' 'is'
+ case 85189: // 'null' 'is'
+ case 85247: // 'true' 'is'
+ case 89735: // 'false' 'le'
+ case 89797: // 'null' 'le'
+ case 89855: // 'true' 'le'
+ case 90759: // 'false' 'let'
+ case 90821: // 'null' 'let'
+ case 90879: // 'true' 'let'
+ case 92807: // 'false' 'lt'
+ case 92869: // 'null' 'lt'
+ case 92927: // 'true' 'lt'
+ case 93831: // 'false' 'mod'
+ case 93893: // 'null' 'mod'
+ case 93951: // 'true' 'mod'
+ case 94343: // 'false' 'modify'
+ case 94405: // 'null' 'modify'
+ case 94463: // 'true' 'modify'
+ case 96903: // 'false' 'ne'
+ case 96965: // 'null' 'ne'
+ case 97023: // 'true' 'ne'
+ case 103559: // 'false' 'only'
+ case 103621: // 'null' 'only'
+ case 103679: // 'true' 'only'
+ case 104583: // 'false' 'or'
+ case 104645: // 'null' 'or'
+ case 104703: // 'true' 'or'
+ case 105095: // 'false' 'order'
+ case 105157: // 'null' 'order'
+ case 105215: // 'true' 'order'
+ case 107143: // 'false' 'paragraphs'
+ case 107205: // 'null' 'paragraphs'
+ case 107263: // 'true' 'paragraphs'
+ case 114823: // 'false' 'return'
+ case 114885: // 'null' 'return'
+ case 114943: // 'true' 'return'
+ case 116871: // 'false' 'satisfies'
+ case 116933: // 'null' 'satisfies'
+ case 116991: // 'true' 'satisfies'
+ case 121479: // 'false' 'sentences'
+ case 121541: // 'null' 'sentences'
+ case 121599: // 'true' 'sentences'
+ case 123527: // 'false' 'stable'
+ case 123589: // 'null' 'stable'
+ case 123647: // 'true' 'stable'
+ case 124039: // 'false' 'start'
+ case 124101: // 'null' 'start'
+ case 124159: // 'true' 'start'
+ case 129159: // 'false' 'times'
+ case 129221: // 'null' 'times'
+ case 129279: // 'true' 'times'
+ case 129671: // 'false' 'to'
+ case 129733: // 'null' 'to'
+ case 129791: // 'true' 'to'
+ case 130183: // 'false' 'treat'
+ case 130245: // 'null' 'treat'
+ case 130303: // 'true' 'treat'
+ case 133255: // 'false' 'union'
+ case 133317: // 'null' 'union'
+ case 133375: // 'true' 'union'
+ case 139399: // 'false' 'where'
+ case 139461: // 'null' 'where'
+ case 139519: // 'true' 'where'
+ case 141447: // 'false' 'with'
+ case 141509: // 'null' 'with'
+ case 141567: // 'true' 'with'
+ case 142983: // 'false' 'words'
+ case 143045: // 'null' 'words'
+ case 143103: // 'true' 'words'
+ case 145543: // 'false' '|'
+ case 145605: // 'null' '|'
+ case 145663: // 'true' '|'
+ case 146055: // 'false' '||'
+ case 146117: // 'null' '||'
+ case 146175: // 'true' '||'
+ case 146567: // 'false' '|}'
+ case 146629: // 'null' '|}'
+ case 146687: // 'true' '|}'
+ case 147079: // 'false' '}'
+ case 147141: // 'null' '}'
+ case 147199: // 'true' '}'
+ try_Literal();
+ break;
+ case 31: // '$'
+ try_VarRef();
+ break;
+ case 35: // '('
+ try_ParenthesizedExpr();
+ break;
+ case 32: // '$$'
+ try_ContextItemExpr();
+ break;
+ case -5:
+ case 17926: // EQName^Token '('
+ case 17991: // 'after' '('
+ case 17993: // 'allowing' '('
+ case 17994: // 'ancestor' '('
+ case 17995: // 'ancestor-or-self' '('
+ case 17996: // 'and' '('
+ case 17998: // 'append' '('
+ case 18000: // 'as' '('
+ case 18001: // 'ascending' '('
+ case 18002: // 'at' '('
+ case 18004: // 'base-uri' '('
+ case 18005: // 'before' '('
+ case 18006: // 'boundary-space' '('
+ case 18007: // 'break' '('
+ case 18009: // 'case' '('
+ case 18010: // 'cast' '('
+ case 18011: // 'castable' '('
+ case 18012: // 'catch' '('
+ case 18014: // 'child' '('
+ case 18015: // 'collation' '('
+ case 18018: // 'constraint' '('
+ case 18019: // 'construction' '('
+ case 18022: // 'context' '('
+ case 18023: // 'continue' '('
+ case 18024: // 'copy' '('
+ case 18025: // 'copy-namespaces' '('
+ case 18026: // 'count' '('
+ case 18027: // 'decimal-format' '('
+ case 18029: // 'declare' '('
+ case 18030: // 'default' '('
+ case 18031: // 'delete' '('
+ case 18032: // 'descendant' '('
+ case 18033: // 'descendant-or-self' '('
+ case 18034: // 'descending' '('
+ case 18039: // 'div' '('
+ case 18040: // 'document' '('
+ case 18043: // 'else' '('
+ case 18044: // 'empty' '('
+ case 18046: // 'encoding' '('
+ case 18047: // 'end' '('
+ case 18049: // 'eq' '('
+ case 18050: // 'every' '('
+ case 18052: // 'except' '('
+ case 18053: // 'exit' '('
+ case 18054: // 'external' '('
+ case 18056: // 'first' '('
+ case 18057: // 'following' '('
+ case 18058: // 'following-sibling' '('
+ case 18059: // 'for' '('
+ case 18062: // 'from' '('
+ case 18063: // 'ft-option' '('
+ case 18068: // 'ge' '('
+ case 18070: // 'group' '('
+ case 18072: // 'gt' '('
+ case 18073: // 'idiv' '('
+ case 18075: // 'import' '('
+ case 18076: // 'in' '('
+ case 18077: // 'index' '('
+ case 18081: // 'insert' '('
+ case 18082: // 'instance' '('
+ case 18083: // 'integrity' '('
+ case 18084: // 'intersect' '('
+ case 18085: // 'into' '('
+ case 18086: // 'is' '('
+ case 18088: // 'json' '('
+ case 18090: // 'jsoniq' '('
+ case 18093: // 'last' '('
+ case 18094: // 'lax' '('
+ case 18095: // 'le' '('
+ case 18097: // 'let' '('
+ case 18099: // 'loop' '('
+ case 18101: // 'lt' '('
+ case 18103: // 'mod' '('
+ case 18104: // 'modify' '('
+ case 18105: // 'module' '('
+ case 18107: // 'namespace' '('
+ case 18109: // 'ne' '('
+ case 18115: // 'nodes' '('
+ case 18118: // 'object' '('
+ case 18122: // 'only' '('
+ case 18123: // 'option' '('
+ case 18124: // 'or' '('
+ case 18125: // 'order' '('
+ case 18126: // 'ordered' '('
+ case 18127: // 'ordering' '('
+ case 18130: // 'parent' '('
+ case 18136: // 'preceding' '('
+ case 18137: // 'preceding-sibling' '('
+ case 18142: // 'rename' '('
+ case 18143: // 'replace' '('
+ case 18144: // 'return' '('
+ case 18145: // 'returning' '('
+ case 18146: // 'revalidation' '('
+ case 18148: // 'satisfies' '('
+ case 18149: // 'schema' '('
+ case 18152: // 'score' '('
+ case 18153: // 'select' '('
+ case 18154: // 'self' '('
+ case 18159: // 'sliding' '('
+ case 18160: // 'some' '('
+ case 18161: // 'stable' '('
+ case 18162: // 'start' '('
+ case 18165: // 'strict' '('
+ case 18173: // 'to' '('
+ case 18174: // 'treat' '('
+ case 18176: // 'try' '('
+ case 18177: // 'tumbling' '('
+ case 18178: // 'type' '('
+ case 18180: // 'union' '('
+ case 18182: // 'unordered' '('
+ case 18183: // 'updating' '('
+ case 18186: // 'validate' '('
+ case 18187: // 'value' '('
+ case 18188: // 'variable' '('
+ case 18189: // 'version' '('
+ case 18192: // 'where' '('
+ case 18193: // 'while' '('
+ case 18196: // 'with' '('
+ try_FunctionCall();
+ break;
+ case 144078: // 'ordered' '{'
+ try_OrderedExpr();
+ break;
+ case 144134: // 'unordered' '{'
+ try_UnorderedExpr();
+ break;
+ case 33: // '%'
+ case 79: // 'array'
+ case 121: // 'document-node'
+ case 125: // 'empty-sequence'
+ case 147: // 'function'
+ case 154: // 'if'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 247: // 'structured-item'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ case 14854: // EQName^Token '#'
+ case 14919: // 'after' '#'
+ case 14921: // 'allowing' '#'
+ case 14922: // 'ancestor' '#'
+ case 14923: // 'ancestor-or-self' '#'
+ case 14924: // 'and' '#'
+ case 14926: // 'append' '#'
+ case 14928: // 'as' '#'
+ case 14929: // 'ascending' '#'
+ case 14930: // 'at' '#'
+ case 14931: // 'attribute' '#'
+ case 14932: // 'base-uri' '#'
+ case 14933: // 'before' '#'
+ case 14934: // 'boundary-space' '#'
+ case 14935: // 'break' '#'
+ case 14937: // 'case' '#'
+ case 14938: // 'cast' '#'
+ case 14939: // 'castable' '#'
+ case 14940: // 'catch' '#'
+ case 14942: // 'child' '#'
+ case 14943: // 'collation' '#'
+ case 14945: // 'comment' '#'
+ case 14946: // 'constraint' '#'
+ case 14947: // 'construction' '#'
+ case 14950: // 'context' '#'
+ case 14951: // 'continue' '#'
+ case 14952: // 'copy' '#'
+ case 14953: // 'copy-namespaces' '#'
+ case 14954: // 'count' '#'
+ case 14955: // 'decimal-format' '#'
+ case 14957: // 'declare' '#'
+ case 14958: // 'default' '#'
+ case 14959: // 'delete' '#'
+ case 14960: // 'descendant' '#'
+ case 14961: // 'descendant-or-self' '#'
+ case 14962: // 'descending' '#'
+ case 14967: // 'div' '#'
+ case 14968: // 'document' '#'
+ case 14970: // 'element' '#'
+ case 14971: // 'else' '#'
+ case 14972: // 'empty' '#'
+ case 14974: // 'encoding' '#'
+ case 14975: // 'end' '#'
+ case 14977: // 'eq' '#'
+ case 14978: // 'every' '#'
+ case 14980: // 'except' '#'
+ case 14981: // 'exit' '#'
+ case 14982: // 'external' '#'
+ case 14983: // 'false' '#'
+ case 14984: // 'first' '#'
+ case 14985: // 'following' '#'
+ case 14986: // 'following-sibling' '#'
+ case 14987: // 'for' '#'
+ case 14990: // 'from' '#'
+ case 14991: // 'ft-option' '#'
+ case 14996: // 'ge' '#'
+ case 14998: // 'group' '#'
+ case 15000: // 'gt' '#'
+ case 15001: // 'idiv' '#'
+ case 15003: // 'import' '#'
+ case 15004: // 'in' '#'
+ case 15005: // 'index' '#'
+ case 15009: // 'insert' '#'
+ case 15010: // 'instance' '#'
+ case 15011: // 'integrity' '#'
+ case 15012: // 'intersect' '#'
+ case 15013: // 'into' '#'
+ case 15014: // 'is' '#'
+ case 15016: // 'json' '#'
+ case 15018: // 'jsoniq' '#'
+ case 15021: // 'last' '#'
+ case 15022: // 'lax' '#'
+ case 15023: // 'le' '#'
+ case 15025: // 'let' '#'
+ case 15027: // 'loop' '#'
+ case 15029: // 'lt' '#'
+ case 15031: // 'mod' '#'
+ case 15032: // 'modify' '#'
+ case 15033: // 'module' '#'
+ case 15035: // 'namespace' '#'
+ case 15037: // 'ne' '#'
+ case 15043: // 'nodes' '#'
+ case 15045: // 'null' '#'
+ case 15046: // 'object' '#'
+ case 15050: // 'only' '#'
+ case 15051: // 'option' '#'
+ case 15052: // 'or' '#'
+ case 15053: // 'order' '#'
+ case 15054: // 'ordered' '#'
+ case 15055: // 'ordering' '#'
+ case 15058: // 'parent' '#'
+ case 15064: // 'preceding' '#'
+ case 15065: // 'preceding-sibling' '#'
+ case 15068: // 'processing-instruction' '#'
+ case 15070: // 'rename' '#'
+ case 15071: // 'replace' '#'
+ case 15072: // 'return' '#'
+ case 15073: // 'returning' '#'
+ case 15074: // 'revalidation' '#'
+ case 15076: // 'satisfies' '#'
+ case 15077: // 'schema' '#'
+ case 15080: // 'score' '#'
+ case 15081: // 'select' '#'
+ case 15082: // 'self' '#'
+ case 15087: // 'sliding' '#'
+ case 15088: // 'some' '#'
+ case 15089: // 'stable' '#'
+ case 15090: // 'start' '#'
+ case 15093: // 'strict' '#'
+ case 15097: // 'text' '#'
+ case 15101: // 'to' '#'
+ case 15102: // 'treat' '#'
+ case 15103: // 'true' '#'
+ case 15104: // 'try' '#'
+ case 15105: // 'tumbling' '#'
+ case 15106: // 'type' '#'
+ case 15108: // 'union' '#'
+ case 15110: // 'unordered' '#'
+ case 15111: // 'updating' '#'
+ case 15114: // 'validate' '#'
+ case 15115: // 'value' '#'
+ case 15116: // 'variable' '#'
+ case 15117: // 'version' '#'
+ case 15120: // 'where' '#'
+ case 15121: // 'while' '#'
+ case 15124: // 'with' '#'
+ try_FunctionItemExpr();
+ break;
+ case -10:
+ case 27929: // '{' ';'
+ try_BlockExpr();
+ break;
+ case -11:
+ case 10009: // '{' NCName^Token
+ try_ObjectConstructor();
+ break;
+ case 69: // '['
+ try_ArrayConstructor();
+ break;
+ case 283: // '{|'
+ try_JSONSimpleObjectUnion();
+ break;
+ case -14:
+ break;
+ default:
+ try_Constructor();
+ }
+ }
+
+ function parse_JSONSimpleObjectUnion()
+ {
+ eventHandler.startNonterminal("JSONSimpleObjectUnion", e0);
+ shift(283); // '{|'
+ lookahead1W(274); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 286) // '|}'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(286); // '|}'
+ eventHandler.endNonterminal("JSONSimpleObjectUnion", e0);
+ }
+
+ function try_JSONSimpleObjectUnion()
+ {
+ shiftT(283); // '{|'
+ lookahead1W(274); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 286) // '|}'
+ {
+ try_Expr();
+ }
+ shiftT(286); // '|}'
+ }
+
+ function parse_ObjectConstructor()
+ {
+ eventHandler.startNonterminal("ObjectConstructor", e0);
+ shift(281); // '{'
+ lookahead1W(277); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 287) // '}'
+ {
+ whitespace();
+ parse_PairConstructorList();
+ }
+ shift(287); // '}'
+ eventHandler.endNonterminal("ObjectConstructor", e0);
+ }
+
+ function try_ObjectConstructor()
+ {
+ shiftT(281); // '{'
+ lookahead1W(277); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 287) // '}'
+ {
+ try_PairConstructorList();
+ }
+ shiftT(287); // '}'
+ }
+
+ function parse_PairConstructorList()
+ {
+ eventHandler.startNonterminal("PairConstructorList", e0);
+ parse_PairConstructor();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PairConstructor();
+ }
+ eventHandler.endNonterminal("PairConstructorList", e0);
+ }
+
+ function try_PairConstructorList()
+ {
+ try_PairConstructor();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PairConstructor();
+ }
+ }
+
+ function parse_PairConstructor()
+ {
+ eventHandler.startNonterminal("PairConstructor", e0);
+ switch (l1)
+ {
+ case 78: // 'append'
+ lookahead2W(279); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 139: // 'for'
+ lookahead2W(187); // S^WS | '#' | '$' | '(' | '(:' | ':' | 'sliding' | 'tumbling'
+ break;
+ case 161: // 'insert'
+ lookahead2W(282); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 177: // 'let'
+ lookahead2W(178); // S^WS | '#' | '$' | '(' | '(:' | ':' | 'score'
+ break;
+ case 187: // 'namespace'
+ lookahead2W(252); // NCName^Token | S^WS | '#' | '(' | '(:' | ':' | 'after' | 'allowing' |
+ break;
+ case 220: // 'processing-instruction'
+ lookahead2W(248); // NCName^Token | S^WS | '#' | '(:' | ':' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 223: // 'replace'
+ lookahead2W(180); // S^WS | '#' | '(' | '(:' | ':' | 'node' | 'value'
+ break;
+ case 266: // 'validate'
+ lookahead2W(191); // S^WS | '#' | '(' | '(:' | ':' | 'lax' | 'strict' | 'type' | '{'
+ break;
+ case 83: // 'attribute'
+ case 122: // 'element'
+ lookahead2W(257); // EQName^Token | S^WS | '#' | '(:' | ':' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 97: // 'comment'
+ case 249: // 'text'
+ lookahead2W(149); // S^WS | '#' | '(:' | ':' | '{'
+ break;
+ case 111: // 'delete'
+ case 222: // 'rename'
+ lookahead2W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 104: // 'copy'
+ case 130: // 'every'
+ case 240: // 'some'
+ lookahead2W(165); // S^WS | '#' | '$' | '(' | '(:' | ':'
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(209); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '.' | '/' | '//' | ':' |
+ break;
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 256: // 'try'
+ case 262: // 'unordered'
+ lookahead2W(167); // S^WS | '#' | '(' | '(:' | ':' | '{'
+ break;
+ case 121: // 'document-node'
+ case 125: // 'empty-sequence'
+ case 167: // 'item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ lookahead2W(96); // S^WS | '#' | '(:' | ':'
+ break;
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 76: // 'and'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 87: // 'break'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 94: // 'child'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 103: // 'continue'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 132: // 'except'
+ case 133: // 'exit'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 147: // 'function'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 154: // 'if'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 189: // 'ne'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 234: // 'self'
+ case 239: // 'sliding'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 248: // 'switch'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 259: // 'typeswitch'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 267: // 'value'
+ case 268: // 'variable'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(144); // S^WS | '#' | '(' | '(:' | ':'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 25735 // 'false' ':'
+ || lk == 25797 // 'null' ':'
+ || lk == 25855) // 'true' ':'
+ {
+ lk = memoized(21, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_ExprSingle();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(21, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -2:
+ case 19: // NCName^Token
+ case 25671: // 'after' ':'
+ case 25673: // 'allowing' ':'
+ case 25674: // 'ancestor' ':'
+ case 25675: // 'ancestor-or-self' ':'
+ case 25676: // 'and' ':'
+ case 25678: // 'append' ':'
+ case 25680: // 'as' ':'
+ case 25681: // 'ascending' ':'
+ case 25682: // 'at' ':'
+ case 25683: // 'attribute' ':'
+ case 25684: // 'base-uri' ':'
+ case 25685: // 'before' ':'
+ case 25686: // 'boundary-space' ':'
+ case 25687: // 'break' ':'
+ case 25689: // 'case' ':'
+ case 25690: // 'cast' ':'
+ case 25691: // 'castable' ':'
+ case 25692: // 'catch' ':'
+ case 25694: // 'child' ':'
+ case 25695: // 'collation' ':'
+ case 25697: // 'comment' ':'
+ case 25698: // 'constraint' ':'
+ case 25699: // 'construction' ':'
+ case 25702: // 'context' ':'
+ case 25703: // 'continue' ':'
+ case 25704: // 'copy' ':'
+ case 25705: // 'copy-namespaces' ':'
+ case 25706: // 'count' ':'
+ case 25707: // 'decimal-format' ':'
+ case 25709: // 'declare' ':'
+ case 25710: // 'default' ':'
+ case 25711: // 'delete' ':'
+ case 25712: // 'descendant' ':'
+ case 25713: // 'descendant-or-self' ':'
+ case 25714: // 'descending' ':'
+ case 25719: // 'div' ':'
+ case 25720: // 'document' ':'
+ case 25721: // 'document-node' ':'
+ case 25722: // 'element' ':'
+ case 25723: // 'else' ':'
+ case 25724: // 'empty' ':'
+ case 25725: // 'empty-sequence' ':'
+ case 25726: // 'encoding' ':'
+ case 25727: // 'end' ':'
+ case 25729: // 'eq' ':'
+ case 25730: // 'every' ':'
+ case 25732: // 'except' ':'
+ case 25733: // 'exit' ':'
+ case 25734: // 'external' ':'
+ case 25736: // 'first' ':'
+ case 25737: // 'following' ':'
+ case 25738: // 'following-sibling' ':'
+ case 25739: // 'for' ':'
+ case 25742: // 'from' ':'
+ case 25743: // 'ft-option' ':'
+ case 25747: // 'function' ':'
+ case 25748: // 'ge' ':'
+ case 25750: // 'group' ':'
+ case 25752: // 'gt' ':'
+ case 25753: // 'idiv' ':'
+ case 25754: // 'if' ':'
+ case 25755: // 'import' ':'
+ case 25756: // 'in' ':'
+ case 25757: // 'index' ':'
+ case 25761: // 'insert' ':'
+ case 25762: // 'instance' ':'
+ case 25763: // 'integrity' ':'
+ case 25764: // 'intersect' ':'
+ case 25765: // 'into' ':'
+ case 25766: // 'is' ':'
+ case 25767: // 'item' ':'
+ case 25768: // 'json' ':'
+ case 25770: // 'jsoniq' ':'
+ case 25773: // 'last' ':'
+ case 25774: // 'lax' ':'
+ case 25775: // 'le' ':'
+ case 25777: // 'let' ':'
+ case 25779: // 'loop' ':'
+ case 25781: // 'lt' ':'
+ case 25783: // 'mod' ':'
+ case 25784: // 'modify' ':'
+ case 25785: // 'module' ':'
+ case 25787: // 'namespace' ':'
+ case 25788: // 'namespace-node' ':'
+ case 25789: // 'ne' ':'
+ case 25794: // 'node' ':'
+ case 25795: // 'nodes' ':'
+ case 25798: // 'object' ':'
+ case 25802: // 'only' ':'
+ case 25803: // 'option' ':'
+ case 25804: // 'or' ':'
+ case 25805: // 'order' ':'
+ case 25806: // 'ordered' ':'
+ case 25807: // 'ordering' ':'
+ case 25810: // 'parent' ':'
+ case 25816: // 'preceding' ':'
+ case 25817: // 'preceding-sibling' ':'
+ case 25820: // 'processing-instruction' ':'
+ case 25822: // 'rename' ':'
+ case 25823: // 'replace' ':'
+ case 25824: // 'return' ':'
+ case 25825: // 'returning' ':'
+ case 25826: // 'revalidation' ':'
+ case 25828: // 'satisfies' ':'
+ case 25829: // 'schema' ':'
+ case 25830: // 'schema-attribute' ':'
+ case 25831: // 'schema-element' ':'
+ case 25832: // 'score' ':'
+ case 25833: // 'select' ':'
+ case 25834: // 'self' ':'
+ case 25839: // 'sliding' ':'
+ case 25840: // 'some' ':'
+ case 25841: // 'stable' ':'
+ case 25842: // 'start' ':'
+ case 25845: // 'strict' ':'
+ case 25848: // 'switch' ':'
+ case 25849: // 'text' ':'
+ case 25853: // 'to' ':'
+ case 25854: // 'treat' ':'
+ case 25856: // 'try' ':'
+ case 25857: // 'tumbling' ':'
+ case 25858: // 'type' ':'
+ case 25859: // 'typeswitch' ':'
+ case 25860: // 'union' ':'
+ case 25862: // 'unordered' ':'
+ case 25863: // 'updating' ':'
+ case 25866: // 'validate' ':'
+ case 25867: // 'value' ':'
+ case 25868: // 'variable' ':'
+ case 25869: // 'version' ':'
+ case 25872: // 'where' ':'
+ case 25873: // 'while' ':'
+ case 25876: // 'with' ':'
+ parse_NCName();
+ break;
+ default:
+ parse_ExprSingle();
+ }
+ lookahead1W(26); // S^WS | '(:' | ':'
+ shift(50); // ':'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("PairConstructor", e0);
+ }
+
+ function try_PairConstructor()
+ {
+ switch (l1)
+ {
+ case 78: // 'append'
+ lookahead2W(279); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 139: // 'for'
+ lookahead2W(187); // S^WS | '#' | '$' | '(' | '(:' | ':' | 'sliding' | 'tumbling'
+ break;
+ case 161: // 'insert'
+ lookahead2W(282); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 177: // 'let'
+ lookahead2W(178); // S^WS | '#' | '$' | '(' | '(:' | ':' | 'score'
+ break;
+ case 187: // 'namespace'
+ lookahead2W(252); // NCName^Token | S^WS | '#' | '(' | '(:' | ':' | 'after' | 'allowing' |
+ break;
+ case 220: // 'processing-instruction'
+ lookahead2W(248); // NCName^Token | S^WS | '#' | '(:' | ':' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 223: // 'replace'
+ lookahead2W(180); // S^WS | '#' | '(' | '(:' | ':' | 'node' | 'value'
+ break;
+ case 266: // 'validate'
+ lookahead2W(191); // S^WS | '#' | '(' | '(:' | ':' | 'lax' | 'strict' | 'type' | '{'
+ break;
+ case 83: // 'attribute'
+ case 122: // 'element'
+ lookahead2W(257); // EQName^Token | S^WS | '#' | '(:' | ':' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 97: // 'comment'
+ case 249: // 'text'
+ lookahead2W(149); // S^WS | '#' | '(:' | ':' | '{'
+ break;
+ case 111: // 'delete'
+ case 222: // 'rename'
+ lookahead2W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 104: // 'copy'
+ case 130: // 'every'
+ case 240: // 'some'
+ lookahead2W(165); // S^WS | '#' | '$' | '(' | '(:' | ':'
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(209); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '.' | '/' | '//' | ':' |
+ break;
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 256: // 'try'
+ case 262: // 'unordered'
+ lookahead2W(167); // S^WS | '#' | '(' | '(:' | ':' | '{'
+ break;
+ case 121: // 'document-node'
+ case 125: // 'empty-sequence'
+ case 167: // 'item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ lookahead2W(96); // S^WS | '#' | '(:' | ':'
+ break;
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 76: // 'and'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 87: // 'break'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 94: // 'child'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 103: // 'continue'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 132: // 'except'
+ case 133: // 'exit'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 147: // 'function'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 154: // 'if'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 189: // 'ne'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 234: // 'self'
+ case 239: // 'sliding'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 248: // 'switch'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 259: // 'typeswitch'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 267: // 'value'
+ case 268: // 'variable'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(144); // S^WS | '#' | '(' | '(:' | ':'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 25735 // 'false' ':'
+ || lk == 25797 // 'null' ':'
+ || lk == 25855) // 'true' ':'
+ {
+ lk = memoized(21, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_ExprSingle();
+ memoize(21, e0A, -1);
+ lk = -3;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(21, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -2:
+ case 19: // NCName^Token
+ case 25671: // 'after' ':'
+ case 25673: // 'allowing' ':'
+ case 25674: // 'ancestor' ':'
+ case 25675: // 'ancestor-or-self' ':'
+ case 25676: // 'and' ':'
+ case 25678: // 'append' ':'
+ case 25680: // 'as' ':'
+ case 25681: // 'ascending' ':'
+ case 25682: // 'at' ':'
+ case 25683: // 'attribute' ':'
+ case 25684: // 'base-uri' ':'
+ case 25685: // 'before' ':'
+ case 25686: // 'boundary-space' ':'
+ case 25687: // 'break' ':'
+ case 25689: // 'case' ':'
+ case 25690: // 'cast' ':'
+ case 25691: // 'castable' ':'
+ case 25692: // 'catch' ':'
+ case 25694: // 'child' ':'
+ case 25695: // 'collation' ':'
+ case 25697: // 'comment' ':'
+ case 25698: // 'constraint' ':'
+ case 25699: // 'construction' ':'
+ case 25702: // 'context' ':'
+ case 25703: // 'continue' ':'
+ case 25704: // 'copy' ':'
+ case 25705: // 'copy-namespaces' ':'
+ case 25706: // 'count' ':'
+ case 25707: // 'decimal-format' ':'
+ case 25709: // 'declare' ':'
+ case 25710: // 'default' ':'
+ case 25711: // 'delete' ':'
+ case 25712: // 'descendant' ':'
+ case 25713: // 'descendant-or-self' ':'
+ case 25714: // 'descending' ':'
+ case 25719: // 'div' ':'
+ case 25720: // 'document' ':'
+ case 25721: // 'document-node' ':'
+ case 25722: // 'element' ':'
+ case 25723: // 'else' ':'
+ case 25724: // 'empty' ':'
+ case 25725: // 'empty-sequence' ':'
+ case 25726: // 'encoding' ':'
+ case 25727: // 'end' ':'
+ case 25729: // 'eq' ':'
+ case 25730: // 'every' ':'
+ case 25732: // 'except' ':'
+ case 25733: // 'exit' ':'
+ case 25734: // 'external' ':'
+ case 25736: // 'first' ':'
+ case 25737: // 'following' ':'
+ case 25738: // 'following-sibling' ':'
+ case 25739: // 'for' ':'
+ case 25742: // 'from' ':'
+ case 25743: // 'ft-option' ':'
+ case 25747: // 'function' ':'
+ case 25748: // 'ge' ':'
+ case 25750: // 'group' ':'
+ case 25752: // 'gt' ':'
+ case 25753: // 'idiv' ':'
+ case 25754: // 'if' ':'
+ case 25755: // 'import' ':'
+ case 25756: // 'in' ':'
+ case 25757: // 'index' ':'
+ case 25761: // 'insert' ':'
+ case 25762: // 'instance' ':'
+ case 25763: // 'integrity' ':'
+ case 25764: // 'intersect' ':'
+ case 25765: // 'into' ':'
+ case 25766: // 'is' ':'
+ case 25767: // 'item' ':'
+ case 25768: // 'json' ':'
+ case 25770: // 'jsoniq' ':'
+ case 25773: // 'last' ':'
+ case 25774: // 'lax' ':'
+ case 25775: // 'le' ':'
+ case 25777: // 'let' ':'
+ case 25779: // 'loop' ':'
+ case 25781: // 'lt' ':'
+ case 25783: // 'mod' ':'
+ case 25784: // 'modify' ':'
+ case 25785: // 'module' ':'
+ case 25787: // 'namespace' ':'
+ case 25788: // 'namespace-node' ':'
+ case 25789: // 'ne' ':'
+ case 25794: // 'node' ':'
+ case 25795: // 'nodes' ':'
+ case 25798: // 'object' ':'
+ case 25802: // 'only' ':'
+ case 25803: // 'option' ':'
+ case 25804: // 'or' ':'
+ case 25805: // 'order' ':'
+ case 25806: // 'ordered' ':'
+ case 25807: // 'ordering' ':'
+ case 25810: // 'parent' ':'
+ case 25816: // 'preceding' ':'
+ case 25817: // 'preceding-sibling' ':'
+ case 25820: // 'processing-instruction' ':'
+ case 25822: // 'rename' ':'
+ case 25823: // 'replace' ':'
+ case 25824: // 'return' ':'
+ case 25825: // 'returning' ':'
+ case 25826: // 'revalidation' ':'
+ case 25828: // 'satisfies' ':'
+ case 25829: // 'schema' ':'
+ case 25830: // 'schema-attribute' ':'
+ case 25831: // 'schema-element' ':'
+ case 25832: // 'score' ':'
+ case 25833: // 'select' ':'
+ case 25834: // 'self' ':'
+ case 25839: // 'sliding' ':'
+ case 25840: // 'some' ':'
+ case 25841: // 'stable' ':'
+ case 25842: // 'start' ':'
+ case 25845: // 'strict' ':'
+ case 25848: // 'switch' ':'
+ case 25849: // 'text' ':'
+ case 25853: // 'to' ':'
+ case 25854: // 'treat' ':'
+ case 25856: // 'try' ':'
+ case 25857: // 'tumbling' ':'
+ case 25858: // 'type' ':'
+ case 25859: // 'typeswitch' ':'
+ case 25860: // 'union' ':'
+ case 25862: // 'unordered' ':'
+ case 25863: // 'updating' ':'
+ case 25866: // 'validate' ':'
+ case 25867: // 'value' ':'
+ case 25868: // 'variable' ':'
+ case 25869: // 'version' ':'
+ case 25872: // 'where' ':'
+ case 25873: // 'while' ':'
+ case 25876: // 'with' ':'
+ try_NCName();
+ break;
+ case -3:
+ break;
+ default:
+ try_ExprSingle();
+ }
+ lookahead1W(26); // S^WS | '(:' | ':'
+ shiftT(50); // ':'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_ArrayConstructor()
+ {
+ eventHandler.startNonterminal("ArrayConstructor", e0);
+ shift(69); // '['
+ lookahead1W(273); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 70) // ']'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(70); // ']'
+ eventHandler.endNonterminal("ArrayConstructor", e0);
+ }
+
+ function try_ArrayConstructor()
+ {
+ shiftT(69); // '['
+ lookahead1W(273); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 70) // ']'
+ {
+ try_Expr();
+ }
+ shiftT(70); // ']'
+ }
+
+ function parse_BlockExpr()
+ {
+ eventHandler.startNonterminal("BlockExpr", e0);
+ shift(281); // '{'
+ lookahead1W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_StatementsAndOptionalExpr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("BlockExpr", e0);
+ }
+
+ function try_BlockExpr()
+ {
+ shiftT(281); // '{'
+ lookahead1W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_StatementsAndOptionalExpr();
+ shiftT(287); // '}'
+ }
+
+ function parse_FunctionDecl()
+ {
+ eventHandler.startNonterminal("FunctionDecl", e0);
+ shift(147); // 'function'
+ lookahead1W(246); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(98); // S^WS | '$' | '(:' | ')'
+ if (l1 == 31) // '$'
+ {
+ whitespace();
+ parse_ParamList();
+ }
+ shift(38); // ')'
+ lookahead1W(158); // S^WS | '(:' | 'as' | 'external' | '{'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_ReturnType();
+ }
+ lookahead1W(122); // S^WS | '(:' | 'external' | '{'
+ switch (l1)
+ {
+ case 281: // '{'
+ shift(281); // '{'
+ lookahead1W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_StatementsAndOptionalExpr();
+ shift(287); // '}'
+ break;
+ default:
+ shift(134); // 'external'
+ }
+ eventHandler.endNonterminal("FunctionDecl", e0);
+ }
+
+ function parse_ReturnType()
+ {
+ eventHandler.startNonterminal("ReturnType", e0);
+ shift(80); // 'as'
+ lookahead1W(254); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ eventHandler.endNonterminal("ReturnType", e0);
+ }
+
+ function shift(t)
+ {
+ if (l1 == t)
+ {
+ whitespace();
+ eventHandler.terminal(JSONiqParser.TOKEN[l1], b1, e1 > size ? size : e1);
+ b0 = b1; e0 = e1; l1 = l2; if (l1 != 0) {
+ b1 = b2; e1 = e2; l2 = 0; }
+ }
+ else
+ {
+ error(b1, e1, 0, l1, t);
+ }
+ }
+
+ function shiftT(t)
+ {
+ if (l1 == t)
+ {
+ b0 = b1; e0 = e1; l1 = l2; if (l1 != 0) {
+ b1 = b2; e1 = e2; l2 = 0; }
+ }
+ else
+ {
+ error(b1, e1, 0, l1, t);
+ }
+ }
+
+ function skip(code)
+ {
+ var b0W = b0; var e0W = e0; var l1W = l1;
+ var b1W = b1; var e1W = e1;
+
+ l1 = code; b1 = begin; e1 = end;
+ l2 = 0;
+
+ try_Whitespace();
+
+ b0 = b0W; e0 = e0W; l1 = l1W; if (l1 != 0) {
+ b1 = b1W; e1 = e1W; }
+ }
+
+ function whitespace()
+ {
+ if (e0 != b1)
+ {
+ b0 = e0;
+ e0 = b1;
+ eventHandler.whitespace(b0, e0);
+ }
+ }
+
+ function matchW(set)
+ {
+ var code;
+ for (;;)
+ {
+ code = match(set);
+ if (code != 22) // S^WS
+ {
+ if (code != 37) // '(:'
+ {
+ break;
+ }
+ skip(code);
+ }
+ }
+ return code;
+ }
+
+ function lookahead1W(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = matchW(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function lookahead2W(set)
+ {
+ if (l2 == 0)
+ {
+ l2 = matchW(set);
+ b2 = begin;
+ e2 = end;
+ }
+ lk = (l2 << 9) | l1;
+ }
+
+ function lookahead1(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = match(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function lookahead2(set)
+ {
+ if (l2 == 0)
+ {
+ l2 = match(set);
+ b2 = begin;
+ e2 = end;
+ }
+ lk = (l2 << 9) | l1;
+ }
+
+ function error(b, e, s, l, t)
+ {
+ if (e > ex)
+ {
+ bx = b;
+ ex = e;
+ sx = s;
+ lx = l;
+ tx = t;
+ }
+ throw new self.ParseException(bx, ex, sx, lx, tx);
+ }
+
+ var lk, b0, e0;
+ var l1, b1, e1;
+ var l2, b2, e2;
+ var bx, ex, sx, lx, tx;
+ var eventHandler;
+ var memo;
+
+ function memoize(i, e, v)
+ {
+ memo[(e << 5) + i] = v;
+ }
+
+ function memoized(i, e)
+ {
+ var v = memo[(e << 5) + i];
+ return typeof v != "undefined" ? v : 0;
+ }
+
+ var input;
+ var size;
+ var begin;
+ var end;
+
+ function match(tokenSetId)
+ {
+ var nonbmp = false;
+ begin = end;
+ var current = end;
+ var result = JSONiqParser.INITIAL[tokenSetId];
+ var state = 0;
+
+ for (var code = result & 8191; code != 0; )
+ {
+ var charclass;
+ var c0 = current < size ? input.charCodeAt(current) : 0;
+ ++current;
+ if (c0 < 0x80)
+ {
+ charclass = JSONiqParser.MAP0[c0];
+ }
+ else if (c0 < 0xd800)
+ {
+ var c1 = c0 >> 4;
+ charclass = JSONiqParser.MAP1[(c0 & 15) + JSONiqParser.MAP1[(c1 & 31) + JSONiqParser.MAP1[c1 >> 5]]];
+ }
+ else
+ {
+ if (c0 < 0xdc00)
+ {
+ var c1 = current < size ? input.charCodeAt(current) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000)
+ {
+ ++current;
+ c0 = ((c0 & 0x3ff) << 10) + (c1 & 0x3ff) + 0x10000;
+ nonbmp = true;
+ }
+ }
+ var lo = 0, hi = 5;
+ for (var m = 3; ; m = (hi + lo) >> 1)
+ {
+ if (JSONiqParser.MAP2[m] > c0) hi = m - 1;
+ else if (JSONiqParser.MAP2[6 + m] < c0) lo = m + 1;
+ else {charclass = JSONiqParser.MAP2[12 + m]; break;}
+ if (lo > hi) {charclass = 0; break;}
+ }
+ }
+
+ state = code;
+ var i0 = (charclass << 13) + code - 1;
+ code = JSONiqParser.TRANSITION[(i0 & 15) + JSONiqParser.TRANSITION[i0 >> 4]];
+
+ if (code > 8191)
+ {
+ result = code;
+ code &= 8191;
+ end = current;
+ }
+ }
+
+ result >>= 13;
+ if (result == 0)
+ {
+ end = current - 1;
+ var c1 = end < size ? input.charCodeAt(end) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000) --end;
+ return error(begin, end, state, -1, -1);
+ }
+
+ if (nonbmp)
+ {
+ for (var i = result >> 9; i > 0; --i)
+ {
+ --end;
+ var c1 = end < size ? input.charCodeAt(end) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000) --end;
+ }
+ }
+ else
+ {
+ end -= result >> 9;
+ }
+
+ return (result & 511) - 1;
+ }
+}
+
+JSONiqParser.getTokenSet = function(tokenSetId)
+{
+ var set = [];
+ var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 8191;
+ for (var i = 0; i < 289; i += 32)
+ {
+ var j = i;
+ var i0 = (i >> 5) * 4317 + s - 1;
+ var i1 = i0 >> 2;
+ var i2 = i1 >> 2;
+ var f = JSONiqParser.EXPECTED[(i0 & 3) + JSONiqParser.EXPECTED[(i1 & 3) + JSONiqParser.EXPECTED[(i2 & 15) + JSONiqParser.EXPECTED[i2 >> 4]]]];
+ for ( ; f != 0; f >>>= 1, ++j)
+ {
+ if ((f & 1) != 0)
+ {
+ set.push(JSONiqParser.TOKEN[j]);
+ }
+ }
+ }
+ return set;
+};
+
+JSONiqParser.MAP0 =
+[ 71, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 26, 30, 30, 30, 30, 30, 31, 32, 33, 30, 30, 34, 30, 30, 35, 30, 30, 30, 36, 30, 30, 37, 38, 39, 40, 30, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 40, 40
+];
+
+JSONiqParser.MAP1 =
+[ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181, 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 247, 261, 277, 293, 309, 355, 371, 387, 423, 423, 423, 415, 339, 331, 339, 331, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 440, 440, 440, 440, 440, 440, 440, 324, 339, 339, 339, 339, 339, 339, 339, 339, 401, 423, 423, 424, 422, 423, 423, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 338, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 423, 71, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 26, 30, 30, 30, 30, 30, 31, 32, 33, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 40, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 34, 30, 30, 35, 30, 30, 30, 36, 30, 30, 37, 38, 39, 40, 30, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 30, 30, 40, 40, 40, 40, 40, 40, 40, 70, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70
+];
+
+JSONiqParser.MAP2 =
+[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 40, 30, 40, 30, 30, 40
+];
+
+JSONiqParser.INITIAL =
+[ 1, 24578, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290
+];
+
+JSONiqParser.TRANSITION =
+[ 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 36864, 36899, 36883, 36883, 36883, 36903, 36883, 36883, 36883, 36883, 36883, 36926, 36919, 36883, 36883, 36879, 36883, 36883, 36942, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 39727, 39739, 37318, 37318, 72403, 39755, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 39794, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39813, 40192, 39835, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39854, 39870, 37318, 37318, 37318, 46325, 37318, 37318, 36994, 37318, 61657, 45847, 57964, 37318, 37318, 61650, 62405, 62409, 50496, 39889, 37318, 37318, 41289, 37087, 37318, 44009, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 45833, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39908, 62747, 37318, 37318, 37318, 42026, 65655, 37318, 73568, 65651, 65646, 39935, 62736, 68791, 45102, 45088, 45095, 68779, 39950, 36991, 37318, 37318, 41289, 39994, 37318, 45426, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 39370, 40016, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 40039, 69458, 41098, 41041, 37318, 46044, 44842, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 47580, 37318, 37318, 37318, 48276, 40073, 37318, 37015, 71422, 71423, 40094, 57964, 37318, 37318, 67783, 40130, 40134, 40150, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 40186, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 37318, 37318, 37318, 48276, 71599, 37318, 37318, 37318, 37318, 67919, 40209, 37318, 37318, 66772, 40222, 40225, 40241, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 37318, 71606, 73347, 37318, 37318, 37318, 37318, 37318, 40283, 40324, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 40344, 37116, 37202, 37162, 40378, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 40416, 40432, 37318, 37318, 37318, 48315, 37318, 37318, 37526, 37318, 62612, 40451, 57964, 37318, 37318, 62605, 65082, 65086, 40487, 40535, 37318, 37318, 41289, 37087, 37318, 37318, 40554, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38131, 40575, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 40598, 40656, 40697, 40697, 40697, 40663, 40736, 40697, 40698, 40727, 40642, 40679, 40626, 40693, 40745, 40613, 40752, 40714, 40768, 36991, 37318, 37318, 40817, 40815, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 40804, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 43152, 37318, 37318, 37318, 48276, 40833, 37318, 37318, 73511, 37318, 67919, 57964, 40868, 40872, 43155, 43156, 43784, 40888, 36991, 37318, 37318, 41289, 40924, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 40942, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 43775, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 69945, 73273, 57964, 40977, 41007, 44794, 41023, 73756, 40991, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 41058, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 45645, 38564, 57964, 41115, 41135, 37318, 41119, 41135, 41149, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 37301, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 62620, 37318, 37318, 37318, 48276, 62315, 37318, 37318, 42112, 62617, 51150, 68655, 68669, 68671, 37318, 37318, 74000, 41165, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 41215, 37318, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 41238, 41258, 37318, 41242, 41258, 41272, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 69205, 37318, 62433, 37318, 68839, 45752, 41288, 37301, 44633, 37318, 37318, 37318, 37318, 73164, 72644, 41305, 72644, 72644, 41324, 38775, 41542, 41542, 58552, 65498, 52179, 65498, 65498, 52319, 41461, 41342, 41461, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 57380, 44576, 38329, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 57802, 45001, 37318, 37318, 37318, 37318, 37318, 62575, 37318, 37318, 71516, 41385, 72644, 72644, 72644, 72645, 41405, 67865, 41542, 58857, 41542, 41542, 46917, 69302, 65498, 55881, 65498, 65498, 53308, 58621, 41461, 41722, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 64802, 37318, 37318, 72642, 48855, 72644, 72644, 72644, 38767, 41542, 41439, 41542, 41542, 41444, 65497, 64981, 65498, 65498, 65498, 59803, 41461, 41460, 41461, 41461, 47863, 54854, 37318, 37318, 69109, 41478, 37318, 60498, 72644, 72644, 70521, 58547, 41542, 41542, 60742, 46770, 65498, 65498, 73471, 59798, 41461, 41461, 70944, 47288, 64766, 37318, 37318, 37507, 37318, 71005, 72644, 60920, 59569, 41542, 41542, 72922, 65498, 65498, 48896, 41461, 41461, 46878, 37318, 60844, 41498, 41222, 67506, 72644, 41518, 41541, 58729, 41559, 65498, 46559, 41593, 41462, 56939, 50451, 37318, 66947, 41614, 41423, 73664, 58829, 59801, 41638, 49498, 41664, 52412, 41686, 41702, 41738, 63218, 38594, 66255, 64873, 73961, 46828, 73161, 59759, 73663, 59797, 47605, 39543, 41802, 41825, 41848, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 37318, 45787, 57964, 41925, 72170, 37318, 38278, 38288, 41945, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 41981, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 69382, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 42002, 37318, 37318, 37318, 45026, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 42022, 71555, 37318, 43019, 43028, 71570, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 42042, 37318, 73045, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 45833, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 42061, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 37318, 50713, 57964, 37318, 37318, 37318, 38993, 38997, 42078, 42128, 37318, 37318, 41289, 37087, 37318, 37318, 42147, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 42168, 62003, 69205, 37318, 37318, 37318, 68839, 37318, 37318, 39275, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 41324, 41542, 41542, 41542, 58552, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 64567, 42190, 37318, 37318, 37318, 37318, 37318, 42212, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 67436, 42249, 37318, 37318, 37318, 37318, 37318, 44403, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72187, 38772, 41542, 41542, 41542, 41542, 41542, 72266, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 51497, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 42270, 41542, 41542, 41542, 41542, 49331, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 47501, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 42291, 41542, 41542, 41542, 59595, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 63809, 37318, 37318, 37318, 49242, 42389, 37318, 37318, 42312, 41767, 44524, 59934, 42356, 42367, 45136, 42383, 44513, 42405, 42445, 37318, 37318, 40926, 42420, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 44142, 43528, 42807, 74542, 43714, 44329, 37031, 44584, 37054, 42466, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 42495, 44053, 42520, 44234, 42536, 42631, 42566, 42582, 42617, 43323, 74548, 42732, 42652, 43181, 43457, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 74695, 44148, 43301, 42504, 44146, 43812, 43314, 42636, 43906, 44107, 42807, 42594, 42699, 42706, 42722, 43750, 42901, 42677, 43141, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 42748, 42962, 43618, 43603, 43820, 43354, 42764, 44271, 43892, 42788, 42804, 42826, 43918, 42855, 43210, 42882, 42898, 42920, 44134, 44337, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 42949, 44040, 42992, 42978, 43271, 43008, 43044, 42839, 43084, 44099, 43110, 43126, 43172, 43197, 43740, 43442, 43226, 43242, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 43259, 44205, 43287, 43339, 74705, 42601, 43379, 43395, 43411, 42683, 43427, 43493, 43509, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 43544, 43363, 43588, 43648, 42772, 43664, 43059, 43680, 43709, 43730, 43766, 38739, 38791, 38841, 38876, 38942, 38892, 43800, 43836, 43632, 43878, 43941, 43957, 42665, 43973, 43989, 39013, 39048, 39078, 44025, 44069, 44085, 43094, 44123, 43693, 44164, 39249, 55484, 44195, 43559, 43068, 43925, 39327, 39819, 44240, 42810, 42904, 39356, 44221, 43849, 44282, 42866, 45051, 43520, 43862, 42933, 39494, 44256, 44298, 44314, 39590, 43572, 44353, 42550, 44369, 44420, 44431, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37091, 37318, 37318, 37318, 48276, 39140, 44447, 37318, 67184, 67184, 50155, 62190, 71955, 71957, 37318, 37089, 71946, 44465, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 44502, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38381, 36956, 50180, 37398, 37414, 37436, 50351, 44540, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 44565, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 44600, 38038, 38061, 37792, 39434, 44649, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 44665, 37459, 38432, 38451, 37229, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 37318, 37318, 73156, 44700, 44701, 37318, 74225, 74229, 44717, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 46650, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 44756, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44775, 67647, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 44810, 44811, 37318, 37318, 74488, 44827, 44876, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 44898, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 44921, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44940, 44949, 37318, 37318, 37318, 45580, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 44969, 44970, 37318, 37318, 68795, 44986, 45022, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 72142, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38201, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 45042, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45074, 37318, 37318, 37318, 37318, 48276, 59955, 37318, 37318, 37318, 59954, 73317, 57964, 37318, 45118, 37318, 37318, 45127, 45152, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 45201, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 45220, 40192, 45247, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 37318, 46105, 37318, 45266, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 64567, 41960, 37318, 37318, 37318, 37318, 37318, 44399, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 63696, 45404, 37318, 37318, 37318, 37318, 37318, 44403, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 51497, 37318, 37318, 37318, 37318, 47785, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 61913, 41542, 41542, 41542, 41542, 48876, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 47501, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 42291, 41542, 41542, 41542, 59595, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 45425, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 64567, 41960, 37318, 37318, 37318, 37318, 37318, 44399, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 63696, 45404, 37318, 37318, 37318, 37318, 37318, 44403, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 51497, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 61913, 41542, 41542, 41542, 41542, 48876, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 47501, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 42291, 41542, 41542, 41542, 59595, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 64567, 41960, 37318, 37318, 37318, 37318, 37318, 44399, 68819, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 63696, 45404, 37318, 37318, 37318, 37318, 37318, 44403, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 51497, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 61913, 41542, 41542, 41542, 41542, 48876, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 47501, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 42291, 41542, 41542, 41542, 59595, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 64567, 41960, 37318, 37318, 37318, 37318, 37318, 44399, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 63696, 45404, 37318, 37318, 37318, 37318, 37318, 45442, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 51497, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 61913, 41542, 41542, 41542, 41542, 48876, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 47501, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 42291, 41542, 41542, 41542, 59595, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 50781, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 53518, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 64567, 41960, 37318, 37318, 37318, 37318, 37318, 44399, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 63696, 45404, 37318, 37318, 37318, 37318, 37318, 44403, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 51497, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 61913, 41542, 41542, 41542, 41542, 48876, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 47501, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 42291, 41542, 41542, 41542, 59595, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 65804, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 48653, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 60153, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 45477, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45496, 45525, 45509, 45539, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 64785, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45555, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 38529, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 45576, 74434, 37318, 74579, 74583, 74448, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 68588, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 45596, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 37318, 37318, 37318, 45625, 45661, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 45833, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 45715, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 45680, 45684, 37318, 37318, 45700, 45732, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 45768, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 45803, 55484, 39265, 39291, 55476, 39311, 45819, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 37318, 37318, 37318, 45266, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 45863, 37318, 37318, 44953, 53155, 45882, 37318, 52352, 45886, 39423, 67164, 45902, 45916, 45932, 45961, 45945, 45975, 45991, 37318, 45455, 41670, 46020, 50786, 46004, 46033, 45185, 46061, 46096, 44613, 41965, 46121, 46173, 46189, 46205, 46221, 46237, 46288, 65632, 46304, 37318, 37318, 68839, 40298, 50758, 37318, 41033, 53889, 69149, 37318, 46321, 73164, 72644, 72644, 72644, 46341, 45386, 41542, 41542, 59697, 52709, 65498, 65498, 65498, 64013, 57854, 41461, 41461, 41461, 53427, 64567, 41960, 63943, 65692, 37318, 55390, 46361, 44399, 46380, 37318, 58658, 46936, 46397, 46417, 72644, 72644, 59240, 58293, 46453, 46492, 41542, 41542, 52156, 55833, 61582, 46520, 65498, 65498, 64241, 46547, 52866, 68024, 41461, 41461, 68015, 46594, 47566, 46621, 37318, 37318, 46672, 37318, 46264, 44403, 37318, 40057, 46707, 46725, 63333, 41308, 72644, 46741, 63340, 42275, 46760, 41542, 46793, 66052, 61720, 45363, 46811, 65498, 49417, 68460, 65498, 46845, 46864, 41461, 51002, 52264, 41461, 46904, 52111, 46933, 46952, 37318, 46684, 52530, 67711, 37318, 59166, 64847, 72644, 54549, 51902, 61913, 46986, 41542, 41542, 73854, 71759, 72272, 41570, 65498, 54158, 68314, 46848, 58449, 41461, 41461, 47016, 47035, 51372, 47057, 47076, 37318, 47124, 37318, 47140, 47156, 71524, 72644, 42291, 47208, 67563, 41542, 59595, 47244, 47267, 65498, 59798, 47304, 47328, 41461, 53433, 37318, 47344, 37318, 61381, 37318, 72644, 47362, 47380, 41542, 47407, 47424, 65498, 47447, 64139, 63673, 47467, 64041, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 41347, 39062, 47486, 47520, 47551, 47602, 47622, 61702, 70577, 48688, 47605, 47638, 50030, 47449, 46829, 57656, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 47659, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 47681, 47697, 47709, 47725, 47754, 47738, 47770, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 67827, 50028, 47806, 47251, 47282, 47858, 50482, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 64567, 41960, 37318, 37318, 37318, 37318, 73633, 44399, 56082, 37318, 56083, 37318, 73164, 72644, 72644, 72644, 72644, 47879, 41363, 41542, 41542, 41542, 41542, 47922, 65493, 65498, 65498, 65498, 65498, 47955, 46825, 41461, 41461, 41461, 67629, 66428, 63696, 45404, 37318, 37318, 37318, 37318, 37318, 44403, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 51497, 37318, 58926, 37318, 37318, 64306, 57609, 37318, 65431, 72644, 72644, 72644, 56125, 63073, 47979, 41542, 41542, 41542, 70807, 58352, 65498, 65498, 65498, 65498, 47999, 41461, 41461, 41461, 41461, 48015, 47501, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 42291, 41542, 41542, 41542, 59595, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 65375, 48037, 48062, 48088, 48113, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 49548, 37318, 37318, 44953, 37318, 41780, 37318, 41482, 37318, 54642, 48139, 48155, 48170, 48186, 48215, 48199, 48231, 65689, 37318, 37318, 48273, 48292, 37318, 48311, 37318, 51503, 37318, 37318, 37318, 48331, 46709, 48623, 50028, 58342, 50938, 47282, 52495, 55465, 37318, 48349, 37318, 68839, 48369, 47665, 37318, 51866, 48388, 48408, 48427, 73007, 67026, 70205, 72644, 72644, 72644, 48444, 48468, 41542, 41542, 52709, 48501, 48532, 65498, 65498, 51441, 56912, 41461, 41461, 41461, 64567, 71585, 37318, 37318, 65402, 37318, 56580, 44399, 46364, 37873, 48553, 37318, 73164, 48570, 72644, 48622, 56986, 72644, 41363, 48639, 50032, 41542, 55261, 41542, 65493, 48669, 57135, 65498, 73731, 65498, 46825, 48704, 41598, 41461, 48739, 41461, 63696, 45404, 37318, 37318, 39025, 37318, 62106, 44403, 37318, 37318, 37318, 72643, 72644, 72644, 60958, 57260, 72645, 38772, 41542, 41542, 54046, 68350, 48760, 45363, 65498, 65498, 65498, 48780, 52828, 59800, 41461, 41461, 41461, 48796, 66903, 47863, 51534, 37318, 37318, 37318, 64199, 37318, 64441, 37318, 72642, 72644, 72644, 64854, 72644, 61913, 41542, 41542, 41542, 48812, 48876, 65497, 65498, 65498, 71839, 65498, 59803, 41461, 41461, 47470, 41461, 47863, 47501, 37318, 65142, 37318, 37318, 38723, 48831, 72644, 48851, 72644, 42291, 41542, 48871, 41542, 59595, 65498, 70398, 65498, 59798, 41461, 61249, 41461, 42174, 72114, 37318, 37318, 53513, 66795, 54283, 70249, 60920, 63484, 67969, 41542, 58586, 58373, 65498, 49897, 57220, 41461, 56936, 37318, 37318, 67331, 73163, 72644, 72800, 50031, 41542, 52475, 65498, 65498, 48892, 41461, 58211, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 47019, 45307, 48912, 48959, 48989, 49019, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 70340, 49053, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 49089, 37318, 44953, 37318, 48599, 37585, 39665, 37318, 67919, 49107, 49123, 49137, 49153, 49182, 49166, 49196, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 48353, 37318, 48351, 60095, 51266, 41622, 41369, 62908, 47535, 62003, 72217, 37318, 62994, 49212, 68839, 37318, 49238, 37318, 49258, 37318, 51050, 39778, 49276, 57933, 60709, 68980, 49292, 71214, 49326, 70571, 70834, 49347, 57459, 49369, 49386, 49404, 49439, 49457, 61552, 61800, 49485, 58425, 64567, 41960, 37318, 37318, 68084, 37318, 56022, 44399, 37318, 37318, 37318, 70710, 73164, 72644, 72644, 72644, 72644, 49520, 41363, 41542, 41542, 41542, 52429, 41542, 65493, 65498, 65498, 65498, 59621, 65498, 46825, 41461, 41461, 41461, 65942, 41461, 71902, 49537, 37318, 37318, 48372, 63307, 37318, 44403, 37318, 37318, 38213, 70690, 72446, 72644, 72644, 72644, 64634, 56631, 49564, 49582, 41542, 41542, 56653, 45363, 49600, 48682, 65498, 65498, 64927, 49622, 49640, 70938, 41461, 41461, 62085, 49662, 51497, 37318, 37318, 37318, 37318, 37318, 49684, 37318, 68617, 72644, 72644, 69970, 72644, 65479, 41542, 41542, 41326, 41542, 48876, 49710, 65498, 65498, 47842, 65498, 59286, 41461, 41461, 58267, 41461, 47863, 47501, 37918, 62752, 37318, 37318, 49733, 60498, 55203, 65029, 49752, 42291, 67741, 65203, 74026, 59595, 66024, 65498, 49773, 59798, 49646, 41461, 49825, 47288, 37318, 51997, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 49852, 37318, 73163, 72644, 60539, 50031, 41542, 72428, 65498, 65498, 49872, 41461, 70461, 56939, 61615, 37318, 72643, 60923, 41542, 57845, 65498, 49892, 41461, 49913, 72946, 72644, 50030, 54383, 59799, 54339, 40392, 49935, 49960, 49980, 50002, 57326, 50022, 50048, 50069, 50089, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 50115, 37318, 44953, 44449, 50137, 37318, 37060, 50171, 54108, 64429, 50196, 50210, 50226, 50255, 50239, 50269, 65689, 44626, 50285, 50301, 50316, 50332, 50367, 39233, 53108, 50384, 61398, 55344, 50419, 50467, 50512, 50528, 50544, 50594, 50610, 50651, 50667, 73014, 50694, 49260, 50729, 62653, 50756, 50774, 72085, 37318, 37318, 49073, 37318, 73164, 50802, 70730, 47643, 67373, 50837, 50866, 47931, 48477, 50890, 64147, 50934, 50954, 50974, 61240, 51024, 54206, 54678, 60300, 51066, 42093, 59527, 51082, 54503, 44179, 51132, 51166, 69514, 50121, 44486, 44480, 51182, 51198, 51247, 51290, 51306, 51322, 51357, 51407, 51457, 51482, 51519, 51581, 60231, 51607, 51635, 51659, 51675, 51432, 54188, 73942, 51691, 51713, 51750, 51800, 41753, 51824, 51840, 37318, 45167, 74354, 51864, 51882, 51918, 51962, 51982, 72643, 52018, 52052, 68101, 52072, 70228, 38772, 52096, 72897, 41542, 52136, 57279, 52172, 66566, 52195, 65498, 64541, 65498, 52222, 56902, 52245, 41461, 67612, 41461, 52280, 51497, 37891, 64079, 46636, 37318, 52344, 55168, 73701, 70986, 47906, 72644, 52368, 52401, 61913, 52428, 52445, 53191, 52464, 52511, 46777, 66351, 65498, 52546, 52580, 55946, 51008, 41461, 52615, 49469, 47863, 47501, 37318, 39657, 52645, 37318, 58484, 60498, 52664, 60195, 52685, 42291, 67536, 73887, 52704, 59595, 49809, 69760, 70602, 59798, 46578, 54457, 71795, 47288, 37318, 68581, 52725, 60872, 52759, 71031, 52775, 65989, 69245, 52802, 72675, 52206, 52852, 55908, 48097, 54237, 46605, 52882, 52918, 52936, 39919, 39478, 52952, 52973, 52992, 65449, 53038, 56792, 66087, 71786, 53088, 56765, 56939, 40362, 53104, 72643, 69978, 41542, 52310, 65498, 53124, 53817, 55637, 53146, 55211, 53171, 53289, 59799, 53207, 55668, 73239, 68122, 73294, 50578, 53242, 53264, 53284, 53305, 53324, 42326, 53340, 53356, 53372, 60496, 73658, 47451, 66435, 53400, 53449, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 51938, 37318, 44953, 62203, 56053, 37318, 51929, 37318, 53498, 53534, 53550, 53564, 53580, 53609, 53593, 53623, 65689, 37318, 68909, 41289, 37087, 37318, 37318, 37318, 37318, 61388, 37318, 61393, 61388, 52002, 53639, 47391, 58863, 63536, 59869, 62003, 50482, 37318, 53663, 37318, 68839, 53663, 37318, 37318, 37318, 69142, 53682, 45250, 37318, 55674, 71208, 72644, 72644, 72644, 53704, 53738, 41542, 41542, 52709, 48072, 65498, 65498, 65498, 57854, 53755, 41461, 41461, 41461, 64567, 41960, 37318, 37318, 37318, 37318, 37318, 44399, 37318, 37318, 37318, 53779, 73164, 72644, 72644, 72644, 63735, 72644, 41363, 41542, 41542, 41542, 60760, 41542, 65493, 65498, 65498, 65498, 61277, 65498, 46825, 41461, 41461, 41461, 48744, 41461, 63696, 45404, 37318, 37318, 37318, 37318, 37318, 44403, 37318, 45747, 37318, 72643, 72644, 72644, 50815, 72644, 72645, 38772, 41542, 41542, 71247, 41542, 41542, 45363, 65498, 65498, 48537, 65498, 65498, 59800, 41461, 41461, 67762, 41461, 41461, 47863, 51497, 37318, 37318, 37318, 37318, 37318, 67308, 37318, 72642, 72644, 72644, 56359, 72644, 61913, 41542, 41542, 41542, 70112, 48876, 65497, 65498, 65498, 66735, 65498, 59803, 41461, 41461, 41461, 53797, 47863, 47501, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 42291, 41542, 41542, 41542, 59595, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 54260, 37318, 37318, 37318, 73163, 67467, 72644, 48046, 41542, 73662, 48935, 65498, 59802, 53815, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 41851, 61054, 66378, 62339, 68189, 53833, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 39797, 37318, 37318, 37318, 67919, 53869, 53905, 53909, 53925, 53954, 53938, 53968, 65689, 37318, 37318, 41289, 37087, 37318, 45716, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 46136, 46156, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 40903, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 36975, 37318, 64085, 73164, 72644, 72644, 72644, 72644, 72644, 53984, 41542, 41542, 41542, 41542, 41542, 62136, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 54006, 37318, 54026, 36968, 37318, 37318, 53666, 72643, 72644, 65774, 72644, 72644, 72645, 38772, 41542, 41542, 54043, 41542, 41542, 45363, 65498, 65498, 53015, 65498, 65498, 59800, 41461, 41461, 66593, 41461, 41461, 71140, 54854, 37318, 37318, 54062, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 54082, 64821, 37318, 60498, 72644, 72644, 62830, 58547, 41542, 41542, 58315, 46770, 65498, 65498, 71297, 59798, 41461, 41461, 54740, 47288, 59033, 54099, 69440, 44860, 37318, 54124, 64478, 44740, 41542, 54141, 70297, 54157, 61206, 54174, 54204, 58614, 54222, 56936, 53884, 37318, 41072, 40582, 71978, 54276, 54299, 54319, 56380, 73391, 73919, 41714, 55599, 54335, 56939, 50403, 59838, 42233, 54355, 53715, 54379, 54399, 59801, 54439, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 57408, 54473, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 59399, 37318, 37318, 60166, 37087, 37318, 37318, 37318, 54501, 37318, 54501, 42045, 54519, 39472, 54546, 54565, 67872, 65498, 54590, 62375, 54624, 37318, 37318, 47504, 68839, 67717, 44759, 37318, 37318, 54658, 37318, 37318, 37318, 73164, 72644, 72644, 58045, 72644, 45386, 41542, 41542, 67542, 52709, 65498, 65498, 65498, 56180, 57854, 41461, 41461, 41461, 54676, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 68532, 57795, 73164, 72644, 72644, 72644, 72644, 72644, 54694, 41542, 41542, 41542, 41542, 41542, 54716, 65498, 65498, 65498, 65498, 65498, 54737, 41461, 41461, 41461, 41461, 41461, 54756, 71731, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 74625, 57661, 72644, 72644, 72644, 72644, 72645, 38772, 54791, 41542, 41542, 41542, 41542, 45363, 54808, 65498, 65498, 65498, 65498, 59800, 54829, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 66657, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 58513, 38767, 41542, 41542, 41542, 63753, 41444, 65497, 65498, 65498, 65498, 70365, 59803, 41461, 41461, 41461, 60263, 47863, 54854, 37318, 37318, 49068, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 54946, 37318, 40844, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 54850, 61615, 65734, 72643, 61015, 41542, 72843, 65498, 54871, 41461, 54893, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 51946, 37318, 44953, 37318, 54915, 54931, 37318, 54967, 54974, 54990, 55006, 55021, 55037, 55066, 55050, 55080, 65689, 37318, 37318, 51966, 38825, 37318, 37318, 37318, 54010, 55096, 55115, 48257, 55149, 55184, 55227, 55249, 41525, 55284, 55303, 63265, 55333, 37318, 37318, 37318, 40256, 37318, 55133, 55360, 37318, 37318, 37318, 55377, 52524, 73164, 55412, 59232, 72644, 55450, 55508, 48452, 55571, 48764, 46504, 61212, 71358, 65498, 52836, 55590, 72384, 66401, 41461, 55624, 55653, 37318, 55162, 48123, 45480, 68146, 44384, 37318, 37318, 55690, 55710, 55730, 55750, 50821, 72644, 73775, 55770, 55805, 41363, 53990, 41542, 54303, 55821, 55849, 65493, 53022, 65498, 61780, 55897, 55924, 46825, 56459, 41461, 71394, 55962, 55996, 47041, 37318, 37318, 37318, 54660, 56044, 56069, 49736, 37318, 37318, 37318, 56099, 56122, 72644, 56141, 70528, 58519, 56160, 58143, 41542, 63117, 55574, 66717, 50850, 52564, 65498, 63146, 65498, 56203, 56221, 51808, 41461, 56467, 41461, 56251, 56269, 54854, 55099, 56307, 46073, 56323, 59679, 56339, 62046, 56355, 52688, 61008, 58074, 70003, 51212, 41542, 66283, 70084, 56375, 56396, 56430, 65125, 61593, 46531, 69280, 62369, 41461, 56449, 56483, 56517, 56546, 63230, 66178, 37927, 69494, 47228, 56575, 66873, 56144, 56596, 56612, 70031, 45388, 56647, 56669, 56693, 56729, 56747, 56781, 56815, 56873, 56892, 51765, 56928, 56955, 37318, 37318, 61883, 53848, 56976, 57010, 57028, 57047, 57072, 57089, 57107, 57133, 57151, 57170, 57197, 57216, 56936, 60597, 37318, 40353, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 57236, 61615, 37318, 57252, 51333, 57276, 57295, 62141, 50073, 54877, 49498, 57311, 72644, 50030, 54383, 59799, 54339, 39384, 52786, 55523, 72337, 68506, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 57331, 57347, 55938, 57396, 53268, 62159, 62339, 66862, 41867, 57424, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 42152, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 57475, 57504, 57488, 57518, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 66211, 72644, 45386, 41542, 41542, 57534, 52709, 65498, 65498, 49388, 65498, 57854, 41461, 41461, 51784, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 41502, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 37087, 37318, 52736, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 47060, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 57438, 72644, 72644, 72644, 72644, 72645, 61918, 41542, 41542, 41542, 41542, 41542, 45363, 57553, 65498, 65498, 65498, 65498, 59800, 57571, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 39711, 37318, 44953, 37318, 42450, 57589, 57607, 57625, 51565, 57641, 57677, 57681, 57697, 57726, 57710, 57740, 65689, 51556, 37318, 41289, 37087, 47346, 60068, 37318, 37318, 39892, 37318, 40511, 57756, 45560, 57818, 57834, 63977, 57879, 60331, 41648, 58000, 57914, 37318, 37318, 38814, 37318, 37318, 57949, 44882, 37318, 57925, 37318, 67807, 49037, 57985, 58044, 51257, 58061, 58115, 58131, 41542, 58165, 54574, 59660, 56705, 57154, 47834, 58193, 52256, 58227, 57863, 58246, 50918, 53781, 37318, 37318, 37318, 37318, 49029, 67667, 37318, 37318, 37318, 37318, 73164, 60986, 49757, 72644, 58283, 72644, 58309, 58331, 63863, 47408, 61105, 41542, 58368, 58389, 67585, 57555, 49801, 65498, 58422, 58441, 68033, 65185, 60256, 69351, 47041, 37318, 61839, 58465, 37318, 37318, 45281, 53688, 37318, 37318, 37318, 72643, 72644, 72644, 63835, 58500, 58535, 38772, 41542, 41542, 55268, 69704, 69729, 45363, 65498, 65498, 61489, 63774, 58568, 59800, 41461, 41461, 66754, 51734, 58602, 47863, 54854, 58637, 37318, 37318, 68901, 37318, 37318, 37318, 72642, 66219, 72644, 72644, 72644, 38767, 67986, 41542, 41542, 41542, 41444, 65497, 56713, 65498, 65498, 65498, 59803, 71875, 41461, 41461, 41461, 47863, 54899, 37318, 58657, 37318, 51097, 69488, 55754, 58674, 72644, 72644, 58694, 58724, 41542, 41542, 58745, 58769, 65498, 65498, 61143, 58793, 41461, 41461, 71804, 37318, 68935, 37318, 73352, 37318, 72644, 49303, 60920, 41542, 72302, 41542, 65498, 52557, 65498, 63673, 46570, 41461, 56936, 37318, 38852, 37318, 73163, 72644, 56106, 50031, 41542, 58818, 65498, 73828, 59802, 41461, 48715, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 53248, 58845, 64251, 68569, 67094, 58879, 59108, 47606, 53268, 62159, 58907, 58895, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37319, 37318, 44953, 37318, 37318, 58923, 37318, 37038, 61423, 60807, 58942, 58956, 58972, 59001, 58985, 59015, 65689, 38336, 37318, 41289, 37087, 37318, 59031, 37318, 37318, 40327, 37318, 38338, 59049, 40328, 59079, 54363, 41369, 59103, 48516, 62003, 72217, 37318, 37318, 59124, 68839, 37318, 63001, 62951, 44924, 37318, 37318, 37318, 59142, 59160, 59182, 72644, 59203, 59223, 59256, 41542, 57091, 48815, 59272, 59718, 65498, 52599, 56799, 57854, 54450, 41461, 63259, 59312, 52629, 59347, 40308, 54027, 37318, 37318, 37318, 37318, 56028, 37318, 37318, 37318, 73164, 56849, 59370, 68264, 72644, 72644, 41363, 63477, 59429, 70290, 41542, 41542, 65493, 64678, 69828, 70882, 65498, 65498, 46825, 59459, 66600, 59489, 41461, 41461, 47041, 37318, 60820, 72604, 37318, 37318, 56414, 63654, 59509, 37318, 37318, 72643, 61043, 72644, 72644, 59543, 72645, 59566, 72479, 41542, 41542, 59585, 41542, 65528, 73531, 59619, 65498, 70373, 65498, 59800, 54834, 59637, 41461, 64050, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 44851, 37318, 37318, 37318, 37318, 59207, 72644, 60920, 61740, 41542, 41542, 73606, 65498, 65498, 49876, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 61445, 73662, 65498, 59655, 59802, 56876, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 59676, 72644, 59695, 59713, 71108, 58802, 59734, 59756, 59775, 59794, 59819, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 59854, 73737, 67066, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 67305, 48392, 37318, 54855, 59885, 59896, 59919, 66152, 67290, 59971, 59985, 60001, 60031, 60044, 60015, 65689, 47586, 44905, 38860, 60060, 60084, 37318, 60579, 48333, 40435, 72237, 60111, 60138, 60122, 60182, 60217, 60279, 60316, 65566, 60366, 50482, 58641, 37318, 37318, 48606, 72949, 68216, 73429, 60392, 69215, 60419, 37318, 60465, 60494, 60514, 60535, 72871, 72644, 60555, 49584, 41542, 47939, 52709, 70645, 70888, 65498, 70640, 57854, 54601, 60344, 63674, 41461, 59473, 64205, 46157, 37318, 60571, 37318, 37318, 37318, 60595, 37318, 37318, 45177, 73164, 60613, 72644, 53647, 72644, 72644, 41363, 60640, 41542, 61097, 41542, 41542, 58708, 70406, 65498, 55874, 65498, 65498, 50904, 58204, 41461, 60666, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 40106, 37318, 37318, 44677, 60687, 37318, 60703, 72644, 72644, 46744, 72644, 58087, 60725, 41542, 41542, 41542, 60758, 74033, 52815, 65498, 65498, 65498, 52593, 61759, 41832, 41461, 41461, 41461, 53066, 69906, 47863, 49504, 60776, 60792, 64608, 60842, 51384, 60860, 60895, 60918, 60939, 60974, 61031, 61070, 38767, 70056, 61088, 61121, 61167, 41444, 65497, 61193, 61228, 55536, 61274, 59803, 61293, 61309, 61258, 72531, 61332, 54854, 48246, 61348, 61369, 61414, 58477, 51897, 68272, 58678, 65107, 61439, 53722, 46795, 49566, 61461, 54813, 65498, 61486, 61505, 72623, 61531, 61548, 61568, 67348, 61609, 37318, 37318, 61636, 61678, 47889, 61697, 61718, 52147, 61736, 61756, 56291, 61775, 61796, 55608, 61816, 46251, 61838, 37318, 61855, 73163, 61899, 68974, 61934, 52295, 73662, 61950, 58777, 71058, 61966, 62000, 62019, 63023, 62043, 40852, 60923, 72471, 73664, 62062, 59801, 62083, 49498, 62101, 55233, 62122, 54383, 62157, 62175, 62225, 62247, 62263, 62279, 62295, 62331, 57449, 55864, 54413, 66647, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 62355, 62391, 62339, 66862, 41867, 41898, 57361, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 62425, 44953, 37318, 41929, 62645, 37318, 37318, 67919, 62449, 62465, 62479, 62495, 62524, 62508, 62538, 62554, 62570, 62591, 51116, 40267, 62636, 62669, 37763, 62688, 62721, 40114, 62768, 62784, 62800, 62846, 62862, 62878, 62894, 62929, 62967, 62983, 37318, 74513, 46381, 42254, 37318, 40466, 50397, 50445, 63017, 37318, 37318, 63039, 73164, 72644, 63059, 63089, 55789, 45386, 47983, 63105, 51466, 69257, 65498, 47963, 66977, 63139, 63162, 41461, 63187, 63203, 63246, 60376, 37318, 65243, 37318, 54083, 37318, 65923, 63281, 37318, 49694, 37318, 63306, 63323, 63356, 63373, 63389, 72644, 67473, 63412, 41542, 63428, 63500, 41542, 54700, 59443, 65498, 63522, 63557, 65498, 56187, 53414, 41461, 63578, 63594, 41461, 68051, 48021, 46148, 37318, 59832, 55125, 37318, 37318, 37318, 37318, 37318, 63803, 72643, 72644, 70758, 59187, 72644, 72645, 38772, 41542, 55434, 57073, 41542, 41542, 45363, 65498, 74070, 65498, 63613, 65498, 59800, 41461, 60671, 41461, 63633, 41461, 47863, 54854, 37318, 37318, 63653, 44684, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 57012, 55426, 41542, 41542, 41542, 41542, 66835, 62140, 65498, 65498, 65498, 65498, 63670, 41461, 41461, 41461, 41461, 63690, 54854, 67948, 37318, 37318, 37318, 37318, 63712, 72644, 63734, 72644, 46430, 41542, 63751, 41542, 56170, 65498, 63769, 65498, 41577, 41461, 51728, 41461, 47288, 63790, 37318, 37318, 37318, 37318, 62822, 66520, 60920, 41416, 71239, 41542, 47825, 58753, 65498, 61151, 71116, 41461, 72584, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 45334, 61615, 37318, 63825, 73373, 63858, 64501, 63879, 65885, 41461, 56530, 63897, 63917, 63966, 63993, 64029, 64066, 39534, 64101, 64126, 64163, 64186, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 50006, 53268, 62159, 64221, 66862, 41867, 64277, 64293, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 66665, 44953, 37318, 37318, 68891, 37318, 64328, 64337, 67698, 39838, 64353, 64369, 64398, 64382, 64414, 65689, 37318, 69115, 41289, 37087, 37318, 37318, 63950, 37318, 51547, 37318, 37318, 37318, 44404, 64465, 64494, 64517, 49717, 67057, 64557, 72217, 37318, 64583, 37318, 68839, 37318, 40908, 40502, 64605, 50368, 64607, 37318, 37318, 62231, 64624, 67101, 73183, 63396, 64650, 67404, 68345, 48485, 71344, 64666, 64694, 64712, 71834, 64730, 57181, 60350, 61532, 53072, 55317, 64759, 37318, 64782, 64801, 45664, 45866, 38224, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 52669, 72644, 72644, 41363, 41542, 41542, 67409, 41542, 41542, 65493, 65498, 65498, 55555, 65498, 65498, 46825, 41461, 41461, 68042, 41461, 41461, 49668, 53220, 61353, 37318, 37318, 37318, 64818, 59354, 57374, 68538, 37318, 72643, 72644, 64837, 72644, 72644, 72645, 64870, 41542, 64889, 41542, 41542, 41542, 68453, 65498, 51231, 64925, 65498, 65498, 59800, 41461, 61515, 64943, 41461, 41461, 47863, 54854, 59903, 37318, 37318, 37318, 37909, 37318, 37318, 72642, 72644, 72644, 64960, 72644, 56626, 41542, 41542, 73894, 41542, 42296, 65497, 65498, 65498, 64978, 65498, 59803, 41461, 41461, 71869, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 52897, 37318, 59144, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 62943, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 56828, 64997, 65024, 65045, 64231, 59603, 54339, 38753, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 37087, 37318, 46305, 37318, 37318, 37318, 42426, 42429, 65068, 54066, 65102, 51341, 41369, 65123, 50559, 62003, 48585, 65141, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 60376, 37318, 37318, 37318, 43472, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 65158, 41542, 41542, 41542, 41542, 41542, 66019, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 52976, 72644, 72644, 38767, 41542, 41542, 73801, 41542, 41444, 65497, 65498, 49370, 65498, 65498, 59803, 41461, 41461, 65182, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 51274, 72644, 50031, 65201, 73662, 71079, 65498, 59802, 58261, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37806, 44953, 65219, 37318, 37420, 65239, 37318, 67919, 65259, 65275, 65288, 65304, 65333, 65317, 65347, 65689, 45409, 47790, 41289, 50740, 71165, 72077, 54775, 46691, 68943, 37318, 65363, 65398, 65418, 65465, 65515, 65551, 65582, 68491, 65617, 65675, 37318, 37318, 37318, 55396, 65708, 50432, 65732, 40783, 60879, 37318, 37318, 46888, 65750, 54125, 65773, 60201, 65790, 65831, 49353, 41542, 61177, 57056, 65855, 49783, 65498, 65874, 65901, 41461, 65939, 58230, 64743, 49003, 37318, 37318, 37318, 54951, 44007, 65958, 37318, 73691, 37318, 44004, 69414, 59740, 72644, 52378, 72644, 64962, 65976, 66005, 41542, 53183, 41542, 52448, 66040, 66074, 65498, 73466, 65498, 70854, 66103, 60245, 41461, 66119, 41461, 72537, 66911, 47041, 37318, 37318, 38803, 72980, 60478, 40954, 37318, 37480, 66138, 66168, 66202, 72644, 66235, 46345, 66251, 72645, 66271, 41542, 58177, 66299, 66320, 41542, 56559, 65498, 65535, 66344, 66367, 65498, 69808, 41461, 53763, 66394, 66417, 41461, 47863, 49919, 37318, 37318, 52902, 66451, 37318, 66495, 39978, 72642, 66512, 60519, 72644, 72644, 38767, 65839, 41542, 66536, 41542, 41444, 65497, 66557, 54721, 65498, 65498, 59803, 66582, 73488, 41461, 41461, 52328, 47223, 43477, 62672, 37318, 37318, 37318, 65382, 72644, 72644, 61681, 58099, 41542, 41542, 41542, 66616, 65498, 65498, 65498, 66632, 66681, 41461, 41461, 54252, 37318, 70963, 37318, 37318, 37318, 66698, 72644, 60920, 66716, 41542, 67896, 66733, 65498, 69783, 66751, 41461, 54608, 56936, 37318, 66770, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 56009, 66788, 66811, 66827, 66851, 66889, 49836, 61620, 60922, 73660, 47450, 46828, 42223, 66927, 59778, 49606, 47605, 66943, 50030, 47449, 46829, 60496, 73658, 47451, 52229, 66963, 67001, 67042, 47192, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 42006, 44953, 41194, 40023, 67082, 63290, 67117, 67133, 67149, 67200, 67214, 67230, 67259, 67243, 67275, 67324, 37318, 67347, 72149, 37087, 37318, 39873, 37318, 37318, 73640, 55694, 39647, 45609, 60403, 67364, 67389, 66058, 64007, 71278, 67425, 72217, 39770, 40165, 39032, 68839, 68408, 37318, 37318, 37318, 37318, 39965, 41180, 37318, 67452, 67489, 70764, 72644, 72644, 67522, 67558, 63467, 41542, 52709, 51619, 65498, 67579, 65498, 57854, 67601, 63637, 67628, 41461, 60376, 37318, 67645, 37318, 67663, 67683, 37318, 56960, 37318, 65223, 37318, 37318, 73164, 52080, 69630, 72644, 72644, 72644, 67733, 60734, 73861, 41542, 41542, 53739, 65493, 58399, 51643, 65498, 65498, 63881, 46825, 67757, 59323, 41461, 41461, 66122, 50625, 37318, 37318, 67778, 47108, 48295, 37318, 38228, 67799, 44787, 57969, 67823, 72644, 72644, 69591, 55783, 67843, 67888, 41542, 41542, 63123, 65166, 73809, 53005, 65498, 65498, 64714, 62913, 63541, 72852, 41461, 41461, 59639, 69865, 70909, 48723, 67912, 59519, 37318, 37900, 37318, 51391, 37318, 67935, 72642, 72644, 52056, 59087, 72644, 38767, 41542, 41542, 67964, 67985, 41444, 65497, 65498, 65858, 58406, 65498, 59803, 41461, 41461, 68002, 41461, 47863, 54854, 37318, 68397, 37318, 68076, 37318, 60498, 68624, 72644, 68100, 65444, 66541, 41542, 68117, 51222, 72818, 65498, 55549, 59798, 53799, 41461, 51777, 47288, 37318, 37318, 40078, 37318, 68138, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 65915, 37954, 37318, 68162, 56840, 72644, 69566, 50031, 41542, 68178, 65498, 72029, 59802, 41461, 61324, 68205, 61615, 68239, 68255, 57031, 68288, 49964, 68312, 64170, 41461, 72350, 72946, 63842, 68330, 50053, 68366, 68384, 61620, 60922, 73660, 47450, 46828, 40170, 49310, 63506, 57898, 47605, 68424, 68440, 45370, 63171, 40400, 68476, 68554, 68604, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 38247, 68640, 37318, 37318, 44545, 44549, 42062, 66479, 66466, 68687, 68703, 68719, 68748, 68732, 68764, 68811, 49856, 37318, 68835, 73418, 40538, 54530, 37318, 68855, 37963, 68877, 39120, 68925, 68959, 68996, 69012, 46476, 69028, 71470, 69063, 59385, 62027, 45461, 65008, 68839, 69079, 37318, 38220, 69096, 65716, 69131, 41882, 69165, 69175, 69191, 63718, 59550, 63357, 69231, 50874, 46465, 70280, 70118, 64531, 65596, 69273, 69296, 57117, 69318, 73551, 69334, 69350, 69367, 69406, 69430, 37318, 69456, 69475, 69510, 37318, 37318, 68519, 50099, 69530, 44732, 69549, 69582, 60998, 72644, 69624, 41363, 69646, 69670, 69695, 41542, 69720, 65493, 69753, 69776, 69799, 65498, 69824, 48973, 69844, 69860, 69881, 41461, 69903, 51039, 37318, 69922, 62705, 62209, 69940, 52743, 51107, 45640, 57591, 40471, 72643, 69961, 69994, 72644, 48835, 70019, 70047, 70072, 69679, 41542, 41542, 70100, 64902, 48943, 63562, 65498, 65498, 70134, 59800, 68060, 61822, 41461, 41461, 70150, 47863, 72356, 45780, 37318, 73436, 47091, 37318, 37318, 70166, 72704, 72644, 70194, 70221, 70244, 47170, 73209, 73218, 70265, 66328, 41444, 70313, 65498, 70329, 70356, 70389, 60293, 70422, 70441, 54423, 70477, 47863, 50635, 37318, 50706, 66496, 53384, 69533, 46401, 70511, 72644, 72644, 70544, 70560, 70789, 41542, 70593, 70626, 69047, 65498, 52486, 70661, 69887, 41461, 70487, 37318, 41199, 59126, 70706, 37318, 70726, 70746, 56994, 70780, 70823, 72308, 70850, 70870, 65601, 70904, 70925, 51697, 70495, 37450, 37318, 70960, 70979, 71002, 71021, 63456, 46437, 71047, 71074, 71095, 49624, 59493, 71132, 71156, 71181, 41086, 71197, 69608, 71230, 71263, 71294, 71313, 57200, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 65052, 64909, 59331, 55194, 71329, 71374, 71410, 71439, 71455, 66985, 70676, 53268, 62159, 62339, 66862, 71486, 71502, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 71540, 37318, 37318, 62697, 37318, 37318, 67919, 71622, 71638, 71652, 71668, 71697, 71681, 71711, 65689, 37318, 37318, 41289, 71727, 43243, 37318, 54635, 37318, 47100, 37318, 37318, 37318, 44404, 60624, 71747, 71775, 71820, 71855, 71891, 71918, 50345, 37318, 37318, 68839, 37318, 37318, 64312, 71934, 37318, 37318, 37318, 63901, 73164, 71973, 72644, 72644, 67498, 71994, 41542, 41542, 41542, 72010, 61470, 65498, 65498, 49441, 57854, 72045, 41461, 41461, 72052, 56235, 72068, 37318, 72101, 73266, 37318, 37318, 37318, 72130, 72165, 37318, 45286, 73164, 72644, 72186, 72203, 52036, 66700, 41363, 41543, 41542, 72253, 47431, 72288, 65493, 56731, 65499, 62067, 70610, 72324, 46825, 73981, 63597, 47312, 56493, 72372, 47041, 37318, 38557, 37318, 72400, 37318, 37318, 37318, 52648, 37318, 37318, 72643, 69558, 72644, 72644, 72644, 72645, 72419, 58149, 41542, 41542, 41542, 41542, 61134, 64696, 65498, 65498, 65498, 65498, 59800, 57573, 41461, 41461, 41461, 41461, 47863, 56406, 37318, 67179, 37318, 37318, 37318, 37318, 60902, 62813, 72644, 72644, 72644, 72644, 42340, 41542, 41542, 41542, 41542, 41444, 47816, 65498, 65498, 65498, 65498, 64261, 41461, 41461, 41461, 41461, 47863, 54766, 37318, 37318, 46970, 37318, 37318, 39394, 72444, 72644, 72644, 67855, 72462, 41542, 57537, 51591, 72495, 65498, 65498, 72517, 72553, 41461, 41461, 72576, 37318, 72600, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 65757, 60923, 69654, 73664, 69041, 59801, 72620, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 72639, 72661, 49423, 56501, 60496, 73658, 47451, 47606, 53268, 68368, 54485, 72691, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 42479, 51143, 66186, 50148, 37318, 40519, 67015, 72720, 37318, 37318, 72736, 72765, 72749, 72779, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72795, 49944, 41369, 72816, 50989, 62003, 72217, 37318, 49091, 63043, 68839, 37318, 37318, 37318, 37318, 37318, 52920, 37318, 37318, 73164, 47899, 72644, 73587, 72644, 45386, 72834, 41542, 56677, 52709, 56433, 65498, 65498, 72024, 57854, 55980, 41461, 64944, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 55361, 37318, 37318, 37318, 53853, 37318, 73164, 72644, 72644, 72868, 72644, 72644, 41363, 41542, 41542, 72887, 41542, 41542, 65493, 65498, 65498, 72920, 65498, 65498, 46825, 41461, 56253, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 40788, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 69080, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 72938, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 50678, 37318, 37318, 72976, 37318, 72965, 72996, 73030, 73066, 73080, 73096, 73125, 73109, 73141, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 49521, 50028, 47181, 50958, 47282, 59296, 63932, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 45204, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 48411, 37318, 37318, 37318, 37318, 73180, 72644, 72644, 72644, 72644, 72645, 73199, 41542, 41542, 41542, 41542, 41542, 56282, 65498, 65498, 65498, 65498, 65498, 56756, 41461, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 68223, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 73234, 72644, 56857, 38767, 41542, 66304, 41542, 41542, 73255, 65497, 65498, 73289, 65498, 72501, 59803, 41461, 61976, 41461, 70425, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45555, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 73310, 37318, 39135, 37318, 37318, 37318, 46656, 37318, 73333, 55714, 73368, 64110, 41369, 73389, 53053, 62003, 72217, 37318, 37318, 37318, 73407, 48428, 48554, 40049, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 61072, 72644, 52030, 45386, 41542, 41809, 41542, 73452, 65498, 65498, 58580, 63617, 57854, 41461, 41461, 73487, 55972, 60376, 73504, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 37318, 62308, 37318, 37318, 37318, 72643, 72644, 52957, 72644, 72644, 74050, 38772, 41542, 54792, 41542, 41542, 41542, 48926, 65498, 65498, 73527, 65498, 65498, 59800, 41461, 41461, 73547, 41461, 41461, 47863, 54854, 73567, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 73584, 72644, 72644, 72644, 38767, 72904, 41542, 41542, 41542, 41444, 65497, 73603, 65498, 65498, 65498, 59803, 70455, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 45323, 45350, 63443, 47000, 73622, 37318, 37318, 41289, 37087, 37318, 42196, 37318, 37318, 37318, 37318, 37318, 37318, 40000, 72644, 73656, 60650, 55287, 47282, 61984, 73680, 37318, 42131, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 41786, 73164, 72644, 72644, 72644, 69600, 45386, 41542, 41542, 41542, 73717, 65498, 65498, 65498, 56205, 57854, 41461, 41461, 41461, 72560, 60376, 37318, 59949, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73753, 37318, 73164, 52385, 72644, 72644, 73772, 72644, 41363, 69737, 41542, 41542, 73791, 41542, 65493, 49792, 65498, 65498, 73825, 65498, 46825, 50572, 41461, 66682, 41461, 41461, 47041, 37318, 46080, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72643, 41389, 72644, 72644, 72644, 72645, 73844, 41542, 73877, 41542, 41542, 41542, 51420, 65498, 73910, 65498, 65498, 65498, 49986, 41461, 73935, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 61662, 37318, 72642, 72644, 47364, 72644, 72644, 38767, 41542, 41542, 70798, 41542, 41444, 65497, 65498, 65498, 73958, 65498, 59803, 41461, 41461, 73977, 41461, 47863, 54854, 37318, 37318, 42105, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 73997, 37318, 37318, 40961, 37318, 60952, 72644, 60920, 74016, 41542, 41542, 57892, 65498, 65498, 71387, 41461, 41461, 56936, 37318, 60826, 37318, 73163, 72644, 74049, 50031, 68296, 73662, 65498, 74066, 59802, 53130, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 45302, 37318, 37318, 37318, 37318, 44953, 37318, 37318, 37318, 37318, 37318, 67919, 61870, 37318, 37318, 45323, 45350, 63443, 47000, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 72217, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 45386, 41542, 41542, 41542, 52709, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 37318, 37318, 37318, 64589, 74088, 74086, 40559, 74115, 74104, 74140, 74169, 37318, 74124, 74153, 74190, 74194, 74210, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 74245, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 74266, 55734, 37318, 53472, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 72228, 37116, 37202, 37162, 74643, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 37318, 37318, 37318, 48276, 37318, 37318, 53226, 37318, 37318, 67919, 57964, 74289, 74334, 37318, 37318, 74319, 74303, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 37010, 37318, 37318, 37318, 74350, 37318, 53463, 40192, 38525, 37318, 37318, 74370, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 37182, 37116, 37202, 37162, 37222, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 37318, 37318, 37318, 74174, 37318, 37318, 37318, 37318, 37318, 52120, 37296, 74401, 74403, 37318, 37318, 74392, 74419, 36991, 37318, 37318, 41289, 37087, 37318, 37318, 74464, 37318, 37318, 74485, 37318, 37318, 59413, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 37076, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 74504, 37116, 37202, 37162, 74529, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 39013, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 39249, 55484, 39265, 39291, 55476, 39311, 39327, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 39708, 37318, 37318, 37318, 37318, 48276, 37318, 37318, 37318, 37318, 37318, 67919, 57964, 37318, 37318, 37318, 37318, 37318, 74564, 65689, 37318, 37318, 41289, 37087, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 44404, 72644, 50028, 41369, 65498, 47282, 62003, 69205, 37318, 37318, 37318, 68839, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 41324, 41542, 41542, 41542, 58552, 65498, 65498, 65498, 65498, 57854, 41461, 41461, 41461, 41461, 60376, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 73164, 72644, 72644, 72644, 72644, 72644, 41363, 41542, 41542, 41542, 41542, 41542, 65493, 65498, 65498, 65498, 65498, 65498, 46825, 41461, 41461, 41461, 41461, 41461, 47041, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72643, 72644, 72644, 72644, 72644, 72645, 38772, 41542, 41542, 41542, 41542, 41542, 45363, 65498, 65498, 65498, 65498, 65498, 59800, 41461, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 72642, 72644, 72644, 72644, 72644, 38767, 41542, 41542, 41542, 41542, 41444, 65497, 65498, 65498, 65498, 65498, 59803, 41461, 41461, 41461, 41461, 47863, 54854, 37318, 37318, 37318, 37318, 37318, 60498, 72644, 72644, 72644, 58547, 41542, 41542, 41542, 46770, 65498, 65498, 65498, 59798, 41461, 41461, 41461, 47288, 37318, 37318, 37318, 37318, 37318, 72644, 72644, 60920, 41542, 41542, 41542, 65498, 65498, 65498, 63673, 41461, 41461, 56936, 37318, 37318, 37318, 73163, 72644, 72644, 50031, 41542, 73662, 65498, 65498, 59802, 41461, 41462, 56939, 61615, 37318, 72643, 60923, 41542, 73664, 65498, 59801, 41461, 49498, 72946, 72644, 50030, 54383, 59799, 54339, 61620, 60922, 73660, 47450, 46828, 73161, 59759, 73663, 59797, 47605, 60497, 50030, 47449, 46829, 60496, 73658, 47451, 47606, 53268, 62159, 62339, 66862, 41867, 41898, 41909, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 65960, 37318, 37318, 37318, 37318, 74599, 74601, 37318, 37318, 70178, 74617, 37014, 37318, 37318, 37318, 37318, 37318, 37318, 37010, 37318, 37318, 37318, 37318, 37318, 65657, 40192, 38525, 37318, 37318, 39335, 40192, 38527, 37031, 44584, 37054, 74641, 37318, 37318, 74250, 37318, 69924, 37107, 37136, 37152, 65815, 69390, 37247, 37265, 53482, 72228, 37116, 37202, 37162, 74643, 37186, 37120, 37206, 37166, 74726, 69388, 37245, 37263, 53480, 37281, 37318, 41092, 37317, 37318, 37318, 45006, 57380, 37335, 37318, 74671, 64449, 74683, 40193, 37351, 37378, 40192, 39199, 37741, 69458, 41098, 41041, 37318, 46044, 37882, 69459, 41099, 41042, 37318, 46045, 37371, 74376, 37355, 37382, 40192, 39202, 38523, 74469, 50180, 37398, 37414, 37436, 50351, 37475, 37318, 58014, 37496, 39340, 37628, 37651, 37674, 55492, 37717, 38230, 37546, 37566, 58028, 41986, 37605, 37523, 37542, 37562, 58024, 37582, 37601, 39304, 37621, 37644, 37667, 37690, 37709, 37733, 74273, 57770, 38317, 37757, 37779, 37822, 46961, 37943, 37979, 37995, 38150, 38170, 38011, 38093, 38038, 38061, 37792, 39434, 38084, 38100, 38045, 38068, 37799, 39441, 38116, 37992, 38147, 38166, 38186, 38022, 38246, 38263, 37318, 38304, 37318, 38354, 38370, 45231, 38397, 38413, 37861, 37459, 38432, 38451, 68861, 37456, 38429, 38448, 38467, 45226, 38483, 38407, 38516, 57783, 51848, 38545, 38580, 73050, 38677, 38610, 38626, 49222, 38643, 38660, 49221, 38642, 38659, 38676, 38693, 38624, 38714, 38739, 38791, 38841, 38876, 38942, 38892, 60443, 38908, 60433, 60449, 38914, 38930, 38946, 38962, 38978, 74659, 39048, 39078, 39105, 39169, 39156, 39172, 39188, 39089, 39218, 46272, 55484, 39265, 39291, 55476, 39311, 74721, 37693, 37318, 65659, 38698, 39356, 39410, 37835, 37848, 39457, 45051, 38498, 38500, 45058, 39494, 39520, 39559, 39504, 39575, 59063, 39606, 39616, 39632, 39681, 39692, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 37318, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 180524, 180524, 180524, 180524, 0, 188717, 0, 188717, 180524, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 180524, 180524, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 368, 188717, 180524, 188717, 188717, 188717, 188717, 188717, 131072, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 139264, 147456, 188717, 188717, 188717, 188717, 188717, 188717, 188717, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 180524, 188717, 302, 303, 0, 0, 307, 0, 0, 0, 307, 0, 0, 0, 4931584, 0, 0, 0, 0, 0, 0, 2367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1854, 0, 0, 0, 0, 0, 0, 4268032, 306, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 302, 0, 0, 0, 0, 0, 0, 4268032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 262144, 0, 0, 4857856, 4874240, 0, 0, 4923392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5840896, 5849088, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 328, 0, 0, 375, 375, 405, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 368, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 450560, 0, 0, 0, 0, 4857856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5259264, 0, 0, 0, 0, 0, 0, 0, 0, 5414912, 0, 5447680, 0, 5464064, 0, 5414912, 5447680, 0, 0, 5562368, 5636096, 5685248, 0, 5750784, 5873664, 0, 0, 0, 0, 5636096, 5873664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5873664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 914, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5447680, 0, 5464064, 0, 5480448, 5562368, 0, 0, 0, 5636096, 0, 5685248, 0, 0, 5750784, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 990, 0, 0, 0, 4841472, 0, 0, 0, 4898816, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5414912, 4358144, 5447680, 4358144, 5464064, 4358144, 5480448, 5562368, 4358144, 4358144, 4358144, 5636096, 4358144, 5636096, 4358144, 5685248, 4358144, 4358144, 5750784, 4358144, 4358144, 4358144, 4358144, 4358144, 5873664, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4923392, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 4923392, 0, 0, 0, 0, 4366336, 0, 0, 0, 0, 418, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4276224, 1258, 0, 0, 0, 5603328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, 0, 0, 5341184, 0, 5652480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4759552, 4358144, 4358144, 4358144, 4358144, 4358144, 5242880, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5341184, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 5808128, 4358144, 4358144, 4358144, 4825088, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5627904, 5652480, 4358144, 5701632, 4358144, 4358144, 5808128, 4358144, 4358144, 4358144, 5668864, 0, 0, 5791744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6201344, 6242304, 6250496, 0, 0, 0, 0, 6422528, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 351, 0, 0, 0, 0, 0, 0, 5619712, 0, 0, 0, 0, 0, 0, 0, 5726208, 5758976, 0, 0, 5791744, 0, 0, 0, 0, 0, 3664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5111808, 0, 0, 0, 0, 0, 5283840, 0, 0, 0, 0, 0, 5816320, 6291456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2389, 0, 2391, 2392, 0, 0, 0, 0, 6062080, 6463488, 0, 5398528, 0, 0, 6479872, 0, 0, 0, 0, 0, 0, 0, 3459, 0, 0, 0, 3463, 0, 0, 0, 0, 0, 0, 6463488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, 0, 0, 0, 0, 4931584, 4939776, 0, 0, 0, 0, 0, 0, 5054464, 0, 0, 0, 0, 0, 0, 0, 0, 5210112, 0, 0, 0, 5210112, 0, 0, 0, 0, 5292032, 0, 0, 0, 0, 5365760, 0, 0, 0, 5455872, 0, 0, 5816320, 0, 5857280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, 401, 0, 6119424, 0, 6168576, 0, 0, 0, 0, 0, 6242304, 0, 6291456, 0, 6316032, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4931584, 4939776, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5054464, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5210112, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5210112, 4358144, 4358144, 4358144, 4358144, 5292032, 4358144, 4358144, 4358144, 4358144, 5365760, 4358144, 4358144, 4358144, 5455872, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5455872, 4358144, 4358144, 4358144, 4358144, 4358144, 5554176, 5570560, 5578752, 5619712, 5668864, 4358144, 4358144, 4358144, 5791744, 5816320, 4358144, 5857280, 4358144, 4358144, 4358144, 4358144, 5816320, 4358144, 5857280, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 6119424, 4358144, 6168576, 4358144, 4358144, 4358144, 4358144, 4358144, 6242304, 4358144, 6291456, 4358144, 6316032, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6463488, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6463488, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 4825088, 0, 0, 0, 0, 0, 0, 0, 6184960, 5316608, 0, 0, 5644288, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 646, 755, 756, 757, 0, 0, 6217728, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5390336, 5308416, 5488640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5799936, 0, 0, 5881856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 351, 352, 353, 0, 0, 0, 0, 5070848, 5431296, 0, 6430720, 0, 0, 0, 0, 0, 0, 0, 0, 5160960, 0, 0, 0, 0, 0, 0, 6053888, 0, 0, 0, 0, 0, 5013504, 0, 0, 0, 0, 0, 0, 6053888, 0, 0, 0, 4358144, 4358144, 5013504, 4358144, 4358144, 4358144, 0, 0, 0, 0, 4841472, 0, 0, 0, 4898816, 0, 0, 0, 0, 0, 0, 1851, 0, 1853, 0, 0, 0, 0, 0, 0, 0, 0, 4825088, 0, 0, 0, 0, 0, 0, 0, 0, 2786, 0, 0, 0, 0, 0, 0, 0, 0, 2809, 0, 0, 0, 0, 0, 0, 0, 0, 2834, 0, 0, 0, 0, 0, 0, 0, 0, 3154, 0, 0, 0, 0, 0, 0, 0, 0, 3167, 3168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6283264, 6332416, 0, 0, 0, 5881856, 0, 5382144, 0, 0, 0, 0, 0, 0, 0, 3665, 3666, 0, 0, 0, 0, 0, 0, 0, 665, 0, 644, 0, 0, 0, 0, 0, 0, 0, 6266880, 4784128, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4915200, 4358144, 4956160, 4972544, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5070848, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5218304, 4358144, 5267456, 4358144, 4358144, 4358144, 6184960, 4358144, 4358144, 6283264, 4358144, 4358144, 6332416, 4358144, 4358144, 4358144, 6389760, 4358144, 4358144, 6430720, 6438912, 4358144, 4358144, 4358144, 6266880, 6488064, 0, 0, 0, 6266880, 0, 0, 4915200, 0, 4956160, 4972544, 0, 0, 0, 0, 0, 0, 5070848, 0, 0, 0, 0, 0, 0, 0, 5218304, 0, 5267456, 0, 0, 0, 0, 5218304, 0, 5267456, 0, 0, 5308416, 5316608, 0, 0, 0, 5431296, 0, 5488640, 0, 0, 0, 0, 0, 0, 0, 0, 6332416, 0, 0, 0, 6389760, 0, 0, 6430720, 6438912, 0, 0, 0, 0, 0, 0, 4784128, 0, 0, 0, 4849664, 0, 0, 0, 0, 0, 4915200, 0, 4956160, 4972544, 0, 0, 0, 6430720, 6438912, 4784128, 4358144, 4358144, 4358144, 4849664, 4358144, 4358144, 4358144, 4358144, 4358144, 4915200, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 302, 0, 303, 306, 5218304, 4358144, 5267456, 4358144, 4358144, 5308416, 5316608, 4358144, 4358144, 4358144, 5431296, 4358144, 5488640, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5799936, 4358144, 4358144, 5881856, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6103040, 4358144, 4358144, 4358144, 6103040, 4358144, 4358144, 4358144, 6184960, 4358144, 4358144, 4358144, 6283264, 4358144, 4358144, 6332416, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368640, 0, 0, 0, 0, 0, 0, 2411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4931584, 4939776, 6488064, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 357, 5660672, 5718016, 0, 5865472, 0, 0, 6037504, 0, 0, 6078464, 0, 0, 6340608, 0, 6455296, 0, 0, 0, 0, 420, 420, 420, 420, 597, 597, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 0, 420, 0, 0, 0, 0, 5472256, 0, 0, 0, 6209536, 0, 0, 0, 0, 6176768, 0, 0, 0, 0, 0, 0, 6373376, 6389760, 0, 0, 6488064, 6103040, 0, 0, 0, 0, 0, 0, 1850, 0, 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4898816, 0, 5709824, 0, 0, 0, 5283840, 0, 0, 0, 0, 5251072, 0, 6414336, 5832704, 0, 5955584, 0, 0, 4358144, 4358144, 4841472, 4358144, 4358144, 4358144, 4898816, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 303, 0, 0, 0, 4358144, 5472256, 5521408, 4358144, 4358144, 4358144, 5595136, 5709824, 5718016, 4358144, 5824512, 5865472, 4358144, 4358144, 5922816, 4358144, 4358144, 6021120, 4358144, 6037504, 4358144, 4358144, 6078464, 6111232, 4358144, 6176768, 6209536, 6234112, 4358144, 4358144, 4358144, 4358144, 5283840, 0, 0, 0, 0, 5472256, 5521408, 0, 0, 0, 0, 5595136, 5709824, 5718016, 0, 5824512, 5865472, 0, 0, 5865472, 0, 0, 5922816, 0, 0, 6021120, 0, 6037504, 0, 0, 6078464, 6111232, 0, 6176768, 6209536, 0, 6234112, 0, 0, 6234112, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4841472, 4358144, 4358144, 4358144, 4898816, 4358144, 5283840, 4358144, 4358144, 4358144, 4358144, 5472256, 5521408, 4358144, 4358144, 4358144, 4358144, 5595136, 5709824, 5718016, 4358144, 4358144, 0, 0, 0, 0, 0, 5193728, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 6209536, 4358144, 6234112, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 573440, 0, 0, 5890048, 0, 0, 0, 6160384, 0, 5095424, 5349376, 0, 5275648, 0, 0, 0, 0, 0, 0, 2308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 344064, 0, 0, 0, 0, 4997120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5947392, 0, 0, 0, 0, 0, 3675, 0, 0, 0, 0, 0, 0, 0, 0, 4012, 528, 5103616, 4358144, 4358144, 5201920, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5890048, 4358144, 4358144, 4358144, 6029312, 4358144, 4358144, 4358144, 4358144, 6160384, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6406144, 0, 5103616, 0, 0, 5201920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5890048, 0, 0, 0, 0, 6029312, 0, 0, 0, 0, 6160384, 0, 0, 0, 0, 0, 0, 0, 6406144, 6406144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4997120, 4358144, 4358144, 5038080, 4358144, 4358144, 4358144, 5095424, 5095424, 5103616, 4358144, 4358144, 5201920, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 5013504, 0, 4358144, 6406144, 4358144, 4358144, 4358144, 0, 0, 0, 4890624, 0, 0, 0, 0, 0, 0, 0, 0, 3209, 0, 0, 3212, 0, 0, 0, 0, 0, 0, 5898240, 5963776, 0, 0, 6193152, 0, 0, 5406720, 6397952, 5300224, 5234688, 5423104, 0, 0, 0, 0, 0, 3675, 0, 0, 0, 0, 0, 4009, 0, 4011, 528, 528, 0, 0, 0, 0, 0, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58815, 57893, 57893, 0, 0, 5988352, 0, 0, 6135808, 6307840, 0, 5996544, 4800512, 0, 6356992, 0, 0, 0, 0, 0, 0, 2317, 2318, 0, 2320, 2321, 0, 0, 0, 0, 0, 0, 1207, 0, 1209, 0, 0, 368, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 710, 0, 0, 0, 0, 0, 0, 0, 0, 5496832, 0, 0, 0, 0, 0, 5611520, 0, 0, 0, 0, 0, 0, 0, 3673, 0, 0, 0, 0, 0, 0, 0, 0, 693, 0, 0, 0, 0, 0, 0, 368, 4947968, 5021696, 5529600, 0, 0, 5169152, 0, 0, 0, 4800512, 4808704, 4358144, 4358144, 4890624, 4358144, 4947968, 4358144, 4358144, 4358144, 5898240, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6307840, 4358144, 4358144, 6356992, 6381568, 5185536, 0, 5234688, 5300224, 0, 0, 5406720, 5529600, 0, 0, 0, 0, 5898240, 0, 0, 0, 0, 0, 0, 0, 0, 6307840, 0, 0, 6356992, 6381568, 6397952, 4800512, 4808704, 4358144, 4358144, 4890624, 4358144, 4947968, 4358144, 4358144, 4358144, 5046272, 4358144, 4358144, 4358144, 4358144, 5185536, 4358144, 5234688, 5300224, 4358144, 4358144, 5406720, 5529600, 4358144, 4358144, 4358144, 4358144, 5898240, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6307840, 4358144, 4358144, 6356992, 6381568, 6397952, 5021696, 4358144, 4358144, 5021696, 0, 0, 0, 4980736, 0, 0, 0, 0, 0, 5373952, 5734400, 6045696, 0, 0, 0, 0, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 0, 421, 0, 6258688, 6447104, 0, 0, 6127616, 0, 6348800, 5906432, 0, 5537792, 3675, 4882432, 0, 0, 0, 0, 0, 0, 2329, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5939200, 0, 0, 5677056, 6365184, 4866048, 0, 6070272, 5545984, 5152768, 0, 0, 0, 0, 0, 3675, 0, 0, 0, 0, 4008, 0, 4010, 0, 528, 4013, 6144000, 4358144, 4866048, 4882432, 4358144, 4980736, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5324800, 5373952, 5537792, 5545984, 5586944, 5734400, 5971968, 4358144, 6045696, 4358144, 6070272, 4358144, 4358144, 5537792, 5545984, 5734400, 5971968, 4358144, 6045696, 4358144, 6070272, 4358144, 4358144, 4358144, 6348800, 0, 4866048, 4882432, 0, 0, 0, 0, 644, 0, 0, 0, 803, 0, 808, 0, 794, 0, 820, 0, 0, 0, 0, 735, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 450560, 450560, 0, 0, 450560, 0, 6045696, 0, 6070272, 0, 0, 0, 0, 6348800, 0, 4866048, 4882432, 0, 4980736, 0, 0, 0, 0, 0, 0, 0, 0, 5324800, 5373952, 5537792, 5545984, 5586944, 5734400, 5971968, 0, 6045696, 0, 6070272, 0, 0, 0, 0, 6348800, 4358144, 4866048, 4882432, 4358144, 4980736, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6299648, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6348800, 4358144, 6144000, 0, 6144000, 0, 4988928, 5005312, 0, 0, 0, 0, 5775360, 0, 0, 0, 0, 749, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 759, 0, 0, 3675, 0, 0, 0, 0, 0, 0, 5693440, 0, 6496256, 5144576, 5136384, 0, 5914624, 4358144, 6324224, 0, 0, 5005312, 0, 0, 0, 5120000, 5136384, 0, 0, 0, 0, 0, 0, 0, 1252, 0, 0, 0, 748, 1259, 0, 0, 0, 0, 0, 0, 0, 6324224, 0, 0, 5005312, 0, 0, 0, 5120000, 5136384, 0, 0, 0, 0, 0, 0, 6463488, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6324224, 5914624, 5914624, 0, 0, 0, 0, 0, 5513216, 5783552, 0, 3675, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4931584, 4939776, 4358144, 4358144, 4358144, 0, 6053888, 0, 0, 0, 0, 0, 0, 0, 0, 6012928, 4358144, 4358144, 5013504, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1153, 0, 0, 0, 0, 0, 3675, 0, 0, 4006, 4007, 0, 0, 0, 0, 528, 528, 528, 528, 3220, 528, 528, 528, 528, 528, 528, 3227, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6053888, 4358144, 4358144, 0, 0, 5013504, 0, 0, 0, 0, 0, 312, 414, 0, 0, 139264, 147456, 0, 0, 0, 0, 0, 0, 0, 6103040, 0, 0, 0, 6184960, 0, 0, 0, 6283264, 0, 0, 6332416, 0, 0, 0, 6389760, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6053888, 4358144, 4358144, 4358144, 0, 0, 0, 0, 5193728, 0, 0, 0, 0, 761, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 528, 528, 3700, 528, 528, 528, 5742592, 0, 0, 0, 0, 0, 4358144, 4907008, 4358144, 5079040, 4358144, 5226496, 4358144, 5742592, 4358144, 4358144, 4358144, 6094848, 4358144, 5062656, 0, 0, 0, 0, 0, 4358144, 4358144, 6094848, 0, 4907008, 0, 5079040, 0, 5226496, 0, 5742592, 0, 0, 0, 6094848, 0, 0, 0, 0, 0, 3675, 0, 4005, 0, 0, 0, 0, 0, 0, 528, 528, 528, 528, 4155, 528, 528, 528, 528, 528, 528, 4907008, 0, 5079040, 0, 5226496, 0, 5742592, 0, 0, 0, 6094848, 0, 4358144, 4907008, 4358144, 5079040, 5062656, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 5062656, 0, 0, 0, 0, 0, 6225920, 0, 5062656, 4358144, 4358144, 4358144, 4358144, 4358144, 913, 5063569, 913, 913, 913, 913, 913, 6226833, 989, 5063645, 0, 0, 0, 4816896, 4358144, 4358144, 4358144, 4358144, 6086656, 4816896, 0, 0, 0, 0, 6086656, 4816896, 4358144, 4358144, 4358144, 4358144, 6086656, 0, 5087232, 0, 5931008, 4358144, 5332992, 5980160, 4358144, 0, 5332992, 5980160, 0, 0, 5332992, 5980160, 0, 4358144, 5332992, 5980160, 4358144, 0, 0, 0, 0, 787, 0, 0, 0, 0, 806, 0, 0, 0, 0, 0, 0, 0, 3166, 0, 0, 0, 0, 0, 0, 0, 0, 327, 0, 0, 0, 0, 0, 0, 0, 5439488, 5128192, 4358144, 5128192, 0, 5128192, 0, 5128192, 4358144, 0, 4358144, 0, 0, 4358144, 0, 4358144, 0, 0, 4358144, 6004736, 6004736, 6004736, 6004736, 6004736, 0, 0, 0, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 339, 340, 0, 0, 221652, 221652, 221652, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 221652, 468, 221652, 221652, 221652, 468, 221652, 221652, 221652, 221652, 221652, 221652, 221652, 221652, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 1162, 0, 0, 1164, 0, 0, 0, 0, 0, 0, 0, 0, 1311, 0, 0, 0, 0, 0, 1179, 0, 0, 0, 762, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 383, 0, 0, 0, 0, 1064, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 913, 913, 913, 4358144, 4358144, 1064, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 507, 514, 514, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 237568, 302, 0, 306, 237568, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 4268032, 98304, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 661, 0, 0, 4210979, 24578, 3, 0, 0, 297, 0, 0, 0, 0, 297, 0, 0, 0, 0, 0, 0, 0, 3685, 0, 0, 0, 3688, 3689, 0, 0, 0, 0, 0, 245760, 245760, 245760, 0, 0, 0, 0, 139264, 147456, 245760, 245760, 0, 0, 245760, 0, 4210979, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 1164, 1297, 0, 0, 0, 0, 0, 0, 1304, 0, 0, 0, 0, 0, 2859, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2867, 368, 368, 0, 0, 0, 303104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 647, 0, 0, 0, 0, 528, 1158, 0, 4857856, 4874240, 0, 0, 4923392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 379, 0, 0, 0, 0, 371, 0, 4358144, 4358144, 4358144, 4358144, 0, 1984, 0, 0, 0, 4825088, 0, 0, 0, 0, 0, 0, 0, 1253, 0, 0, 0, 0, 0, 0, 0, 0, 2399, 2400, 0, 0, 2402, 0, 0, 0, 0, 0, 262144, 262144, 262144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3449, 0, 0, 0, 0, 0, 262144, 262144, 0, 262144, 0, 0, 0, 139264, 147456, 262144, 0, 0, 0, 0, 0, 0, 2344, 2345, 0, 0, 0, 0, 0, 0, 0, 0, 798, 0, 0, 0, 0, 0, 809, 0, 0, 0, 262144, 0, 262738, 262738, 262738, 262738, 262738, 262738, 262738, 262738, 262738, 262738, 262738, 262738, 262738, 0, 262738, 0, 0, 262738, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 1177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4086, 528, 528, 528, 528, 0, 270336, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5177344, 278528, 278528, 0, 0, 131072, 278528, 0, 0, 0, 0, 278528, 0, 0, 0, 0, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 0, 278528, 0, 0, 278528, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 1205, 1206, 0, 0, 0, 0, 0, 368, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 712, 0, 0, 0, 0, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 638, 0, 0, 0, 0, 1218, 0, 0, 0, 0, 1223, 0, 0, 0, 0, 0, 0, 0, 1752, 0, 0, 0, 1755, 0, 0, 1758, 0, 4268032, 306, 641, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, 0, 528, 0, 1430, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 0, 0, 0, 0, 0, 0, 3686, 0, 0, 0, 0, 0, 0, 0, 0, 3826, 0, 3675, 0, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1525, 0, 0, 0, 0, 0, 3675, 4004, 0, 0, 0, 0, 0, 0, 0, 528, 528, 4209, 528, 4210, 528, 528, 528, 528, 528, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 286720, 303, 0, 307, 286720, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 663, 0, 792, 0, 307, 0, 0, 0, 0, 0, 0, 307, 139264, 287139, 0, 0, 0, 307, 0, 0, 0, 0, 1234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2414, 0, 0, 0, 0, 0, 307, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 66175, 0, 0, 0, 0, 1250, 0, 0, 0, 1255, 0, 0, 0, 0, 0, 0, 0, 661, 0, 0, 0, 0, 0, 0, 0, 0, 378, 0, 363, 0, 0, 0, 0, 0, 4268032, 306, 98946, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 728, 0, 0, 0, 0, 122880, 0, 4268032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2310144, 0, 0, 0, 0, 307, 4857856, 4874240, 0, 0, 4923392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 528, 3699, 528, 528, 528, 528, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 304, 0, 304, 0, 304, 304, 304, 295216, 304, 304, 304, 295216, 295216, 304, 295216, 304, 304, 131072, 304, 304, 304, 304, 304, 295216, 304, 304, 304, 304, 295216, 304, 304, 304, 304, 295286, 295216, 295216, 295216, 295216, 295216, 295216, 304, 304, 304, 304, 304, 0, 0, 304, 304, 295216, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 369, 304, 0, 295216, 304, 295286, 295216, 295216, 295216, 304, 304, 304, 295286, 139264, 147456, 295216, 295216, 304, 304, 295216, 295216, 295216, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 295216, 295286, 295286, 295286, 295286, 295286, 295286, 295286, 295286, 295286, 295286, 295286, 295286, 295286, 295216, 295216, 295216, 295216, 295216, 304, 304, 304, 295216, 304, 304, 304, 304, 304, 304, 304, 295216, 374, 304, 304, 304, 304, 304, 304, 304, 295216, 304, 295216, 295216, 295216, 295216, 295216, 295216, 295216, 295216, 295286, 295286, 295286, 295286, 295286, 295286, 295216, 295216, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 1267, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3170, 0, 0, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 4399804, 4399804, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4399804, 0, 0, 319488, 0, 0, 0, 0, 0, 0, 319488, 319488, 0, 0, 0, 0, 0, 0, 0, 3696, 0, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3849, 528, 528, 528, 319488, 0, 0, 0, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 0, 24578, 3, 0, 0, 4366336, 253952, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 1282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1241, 0, 0, 0, 0, 368, 425984, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4399805, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 368, 0, 0, 0, 0, 0, 0, 2357, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3461, 0, 0, 0, 0, 0, 0, 0, 327680, 327680, 327680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327680, 327680, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 327680, 327680, 327680, 327680, 327680, 335872, 327680, 327680, 327680, 335872, 327680, 327680, 327680, 327680, 327680, 327680, 49723, 0, 0, 0, 0, 0, 0, 0, 49723, 49723, 0, 0, 0, 0, 0, 0, 0, 1270, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5627904, 5652480, 0, 5701632, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49152, 990, 0, 0, 0, 0, 0, 3683, 0, 0, 0, 0, 0, 0, 0, 3690, 0, 0, 0, 0, 0, 3836, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5242880, 0, 0, 0, 0, 0, 0, 0, 5341184, 0, 0, 0, 0, 0, 344064, 344064, 344064, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 352256, 352256, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 1309, 0, 0, 0, 0, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 371, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3438, 0, 0, 3440, 0, 1, 292, 3, 0, 0, 0, 298, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 3698, 528, 528, 528, 3701, 528, 0, 360448, 360448, 360448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 1, 0, 3, 155942, 155942, 296, 0, 636, 0, 0, 0, 302, 303, 0, 1230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 528, 528, 1376, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2460, 528, 0, 914, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60322, 57943, 57943, 57943, 57943, 59004, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 57893, 3998, 0, 4000, 528, 528, 528, 528, 58773, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 0, 57916, 57916, 57916, 57916, 57916, 528, 528, 528, 2437, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2446, 528, 2448, 0, 0, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59856, 57893, 57893, 57893, 57893, 57893, 57893, 60873, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61213, 57893, 57893, 57893, 57893, 61214, 61215, 57893, 57893, 57893, 57893, 60300, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 0, 0, 0, 0, 0, 60432, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 0, 0, 0, 3191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319, 0, 0, 0, 0, 0, 0, 3682, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 338, 0, 0, 0, 528, 57893, 61069, 57893, 57893, 57893, 61072, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58331, 0, 57916, 57916, 57916, 57916, 57916, 61080, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59358, 61101, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61109, 57916, 57916, 57916, 57916, 57916, 57916, 60360, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 60707, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61138, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59568, 57943, 57943, 57943, 528, 528, 3852, 3853, 528, 528, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58291, 57893, 57893, 57943, 57943, 57943, 61251, 57943, 57943, 57943, 57943, 61252, 61253, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58468, 57943, 57943, 57943, 57943, 528, 528, 528, 898, 0, 0, 3675, 0, 0, 3929, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 695, 0, 0, 0, 0, 368, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 61299, 57893, 57893, 57893, 57893, 57893, 57893, 61305, 57893, 57893, 57893, 61309, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 61315, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 61128, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60066, 57943, 57943, 57943, 57943, 57943, 57943, 57916, 57916, 61321, 57916, 57916, 57916, 61325, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 61331, 57943, 528, 1951, 528, 2283, 528, 57893, 59394, 57893, 59632, 57893, 2290, 0, 2291, 0, 0, 0, 0, 0, 417792, 0, 417792, 0, 0, 0, 0, 310, 0, 0, 0, 0, 0, 316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1328, 0, 0, 0, 0, 0, 528, 528, 57893, 57893, 57893, 57893, 61511, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58826, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 61524, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 60024, 57943, 60026, 57943, 57943, 57943, 57943, 57943, 61537, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 0, 0, 4244, 528, 528, 528, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 1310, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1316, 1269, 0, 528, 528, 57893, 57893, 57916, 57916, 57943, 57943, 0, 528, 57893, 57916, 57943, 0, 528, 57893, 57916, 57943, 0, 528, 57893, 57916, 57943, 0, 0, 0, 0, 376832, 376832, 376832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 346, 0, 0, 0, 0, 420, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 1731, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 648, 0, 0, 0, 0, 0, 0, 0, 0, 4268780, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6119424, 0, 6168576, 0, 0, 0, 0, 308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 354, 355, 356, 0, 0, 393685, 393685, 393685, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 0, 0, 245760, 0, 0, 475136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 761, 0, 0, 305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 411, 0, 421, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 1731, 0, 0, 0, 0, 1738, 0, 1740, 0, 0, 0, 0, 0, 0, 3180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 352256, 0, 352256, 352256, 0, 0, 0, 305, 306, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1185, 0, 0, 0, 0, 0, 748, 421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 337, 0, 0, 0, 0, 57916, 0, 0, 0, 748, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 528, 3413, 57893, 57893, 60760, 1725, 0, 0, 0, 1731, 1732, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 741, 0, 0, 0, 0, 0, 0, 0, 0, 1252, 1825, 0, 0, 0, 0, 1259, 1259, 0, 0, 0, 0, 0, 0, 0, 4083, 0, 4085, 0, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3848, 528, 528, 528, 528, 0, 0, 2293, 1732, 2294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 368, 1212, 0, 0, 528, 528, 2499, 2932, 0, 0, 0, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59860, 528, 528, 528, 2932, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 0, 0, 2592, 0, 0, 417792, 0, 0, 0, 0, 417792, 0, 0, 0, 0, 0, 310, 0, 310, 0, 0, 0, 0, 0, 4151, 4152, 4153, 528, 528, 528, 4156, 528, 4158, 528, 528, 0, 0, 0, 0, 0, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60283, 417792, 417792, 0, 0, 417792, 417792, 417792, 417792, 417792, 417792, 417792, 417792, 417792, 417792, 417792, 417792, 418102, 417792, 417792, 418101, 418102, 417792, 417792, 418101, 417792, 418101, 417792, 0, 417792, 0, 0, 0, 0, 417792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 310, 310, 310, 0, 418101, 417792, 1, 24578, 3, 0, 0, 4366971, 0, 0, 0, 0, 0, 302, 303, 311296, 4399805, 0, 0, 0, 311296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 800, 0, 0, 0, 0, 0, 0, 0, 0, 4268032, 306, 307, 0, 434176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 381, 0, 384, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 4399805, 0, 0, 0, 0, 0, 363, 0, 0, 0, 0, 0, 0, 368, 0, 296, 0, 0, 914, 913, 913, 913, 913, 913, 4858769, 4875153, 913, 913, 913, 913, 913, 913, 913, 913, 913, 5628817, 5653393, 913, 5702545, 913, 913, 913, 913, 5448593, 913, 5464977, 913, 5481361, 5563281, 913, 913, 913, 5637009, 913, 5686161, 913, 913, 5751697, 913, 6275985, 913, 913, 913, 913, 913, 913, 913, 913, 913, 0, 0, 990, 989, 989, 989, 989, 6087645, 4817809, 4359057, 4359057, 4359057, 4359057, 6087569, 0, 5087232, 0, 5931008, 4358144, 989, 989, 5260253, 989, 989, 989, 989, 989, 989, 989, 989, 5415901, 989, 5448669, 989, 5465053, 989, 5481437, 5563357, 989, 989, 989, 5637085, 989, 5686237, 989, 989, 5751773, 989, 989, 989, 989, 989, 989, 6300637, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 5112797, 989, 989, 989, 989, 989, 989, 5874653, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 6276061, 989, 989, 989, 4858845, 4875229, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 5178333, 989, 989, 4359057, 5637009, 4359057, 5686161, 4359057, 4359057, 5751697, 4359057, 4359057, 4359057, 4359057, 4359057, 5874577, 4359057, 4359057, 4359057, 4359057, 5186449, 4359057, 5235601, 5301137, 4359057, 4359057, 5407633, 5530513, 4359057, 4359057, 4359057, 4359057, 4359057, 6300561, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 5112721, 4359057, 4359057, 4359057, 4359057, 989, 989, 5809041, 4359057, 4359057, 4359057, 4826001, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 5178257, 4359057, 4359057, 4359057, 4359057, 4359057, 5243793, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 5342097, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 5415825, 4359057, 5448593, 4359057, 5464977, 4359057, 5481361, 5563281, 4359057, 4359057, 0, 0, 0, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 4932497, 4940689, 913, 913, 6464401, 0, 0, 0, 0, 989, 989, 989, 989, 989, 989, 989, 989, 989, 4998109, 989, 989, 5039069, 989, 989, 989, 5096413, 989, 5456861, 989, 989, 989, 989, 989, 5555165, 5571549, 5579741, 5620701, 5669853, 989, 989, 989, 5792733, 5817309, 989, 5858269, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 4359057, 4359057, 4359057, 6120413, 989, 6169565, 989, 989, 989, 989, 989, 6243293, 989, 6292445, 989, 6317021, 989, 989, 989, 989, 989, 5071837, 989, 989, 989, 989, 989, 989, 989, 5219293, 989, 5268445, 4359057, 4359057, 4932497, 4940689, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 5055377, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 6054801, 4359057, 4359057, 4359057, 0, 0, 0, 0, 5193728, 0, 4359057, 5456785, 4359057, 4359057, 4359057, 4359057, 4359057, 5555089, 5571473, 5579665, 5620625, 5669777, 4359057, 4359057, 4359057, 5792657, 5817233, 4359057, 5858193, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 0, 5013504, 0, 6120337, 4359057, 6169489, 4359057, 4359057, 4359057, 4359057, 4359057, 6243217, 4359057, 6292369, 4359057, 6316945, 4359057, 4359057, 4359057, 5194641, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4907008, 0, 5079040, 6094848, 6430720, 6438912, 0, 0, 0, 0, 0, 0, 4785041, 913, 913, 913, 4850577, 913, 913, 913, 913, 913, 913, 5055377, 913, 913, 913, 913, 913, 913, 913, 913, 5211025, 5489553, 913, 913, 913, 913, 913, 913, 913, 913, 913, 5800849, 913, 913, 5882769, 913, 913, 913, 913, 5219217, 913, 5268369, 913, 913, 5309329, 5317521, 913, 913, 913, 5432209, 913, 913, 913, 6333329, 913, 913, 913, 6390673, 913, 913, 6431633, 6439825, 0, 0, 0, 0, 0, 0, 0, 393685, 0, 393685, 393685, 393685, 393685, 393685, 393685, 393685, 393685, 393685, 393685, 393685, 393685, 393685, 393685, 0, 393685, 0, 4785117, 989, 989, 989, 4850653, 989, 989, 989, 989, 989, 4916189, 989, 4957149, 4973533, 989, 989, 989, 6030301, 989, 989, 989, 989, 6161373, 989, 989, 989, 989, 989, 989, 989, 6325213, 4359057, 4359057, 5006225, 4359057, 4359057, 4359057, 5120913, 5137297, 989, 989, 5309405, 5317597, 989, 989, 989, 5432285, 989, 5489629, 989, 989, 989, 989, 989, 989, 5325789, 5374941, 5538781, 5546973, 5587933, 5735389, 5972957, 989, 6046685, 989, 6104029, 989, 989, 989, 6185949, 989, 989, 989, 6284253, 989, 989, 6333405, 989, 989, 989, 6390749, 989, 989, 6431709, 6439901, 4785041, 4359057, 4359057, 4359057, 4850577, 4359057, 4359057, 4359057, 4359057, 4359057, 4916113, 4359057, 4358144, 4358144, 4358144, 4358144, 4358144, 913, 913, 913, 913, 913, 0, 0, 0, 0, 0, 0, 0, 319488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319488, 0, 4957073, 4973457, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 5071761, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 6275985, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 5219217, 4359057, 5268369, 4359057, 4359057, 5309329, 5317521, 4359057, 4359057, 4359057, 5432209, 4359057, 5489553, 4359057, 4359057, 4359057, 5211025, 4359057, 4359057, 4359057, 4359057, 5292945, 4359057, 4359057, 4359057, 4359057, 5366673, 4359057, 4359057, 4359057, 4359057, 6390673, 4359057, 4359057, 6431633, 6439825, 4358144, 4358144, 4358144, 6266880, 6488064, 913, 913, 913, 6267793, 6488977, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 730, 4358144, 4358144, 4358144, 0, 0, 913, 913, 4842385, 913, 913, 913, 4899729, 913, 913, 913, 913, 913, 913, 913, 6103953, 913, 913, 913, 6185873, 913, 913, 913, 6284177, 913, 913, 5473169, 5522321, 913, 913, 913, 913, 5596049, 5710737, 5718929, 913, 5825425, 5866385, 913, 913, 913, 913, 5243793, 913, 913, 913, 913, 913, 913, 913, 5342097, 913, 913, 913, 0, 0, 989, 989, 989, 4826077, 989, 989, 989, 989, 989, 989, 989, 0, 913, 4359057, 4359057, 4359057, 4359057, 4359057, 4858769, 4875153, 5923729, 913, 913, 6022033, 913, 6038417, 913, 913, 6079377, 6112145, 913, 6177681, 6210449, 913, 6235025, 913, 913, 913, 913, 6243217, 913, 6292369, 913, 6316945, 913, 913, 913, 913, 913, 913, 913, 4998033, 913, 913, 5038993, 913, 913, 913, 5096337, 5104529, 5284829, 989, 989, 989, 989, 5473245, 5522397, 989, 989, 989, 989, 5596125, 5710813, 5719005, 989, 5825501, 5866461, 989, 989, 5923805, 989, 989, 6022109, 989, 6038493, 989, 989, 6079453, 6112221, 989, 6177757, 6210525, 989, 6235101, 989, 989, 989, 989, 989, 989, 989, 4359057, 4359057, 4842385, 4359057, 4359057, 4359057, 4899729, 4359057, 5284753, 4359057, 4359057, 4359057, 4359057, 5473169, 5522321, 4359057, 4359057, 4359057, 4359057, 5596049, 5710737, 5718929, 4359057, 4359057, 4359057, 6103953, 4359057, 4359057, 4359057, 6185873, 4359057, 4359057, 4359057, 6284177, 4359057, 4359057, 6333329, 4359057, 4359057, 4923392, 4358144, 4358144, 4358144, 4358144, 4358144, 913, 4924305, 913, 913, 913, 913, 4366336, 0, 0, 0, 0, 1779, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3156, 0, 3157, 0, 0, 5825425, 5866385, 4359057, 4359057, 5923729, 4359057, 4359057, 6022033, 4359057, 6038417, 4359057, 4359057, 6079377, 6112145, 4359057, 6177681, 6210449, 4359057, 6235025, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4358144, 4358144, 4358144, 913, 913, 913, 913, 913, 5194641, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 988, 989, 989, 989, 989, 989, 4358144, 4358144, 6029312, 4358144, 4358144, 4358144, 4358144, 6160384, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6406144, 913, 913, 913, 913, 6325137, 989, 989, 5006301, 989, 989, 989, 5120989, 5137373, 989, 989, 989, 989, 989, 6226909, 4359057, 5063569, 4359057, 4359057, 4359057, 4359057, 4359057, 6226833, 0, 6086656, 913, 913, 5202833, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 5890961, 913, 913, 913, 5555089, 5571473, 5579665, 5620625, 5669777, 913, 913, 913, 5792657, 5817233, 913, 5858193, 913, 913, 913, 913, 5292945, 913, 913, 913, 913, 5366673, 913, 913, 913, 5456785, 913, 913, 913, 913, 913, 6308753, 913, 913, 6357905, 6382481, 6398865, 4801501, 4809693, 989, 989, 4891613, 913, 913, 6030225, 913, 913, 913, 913, 6161297, 913, 913, 913, 913, 913, 913, 913, 6407057, 5104605, 989, 989, 5202909, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 989, 5891037, 6407133, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4998033, 4359057, 4359057, 5038993, 4359057, 4359057, 4359057, 5325713, 5374865, 5538705, 5546897, 5587857, 5735313, 5972881, 4359057, 6046609, 4359057, 6071185, 4359057, 4359057, 5096337, 5104529, 4359057, 4359057, 5202833, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4358144, 4358144, 4358144, 4358144, 5890961, 4359057, 4359057, 4359057, 6030225, 4359057, 4359057, 4359057, 4359057, 6161297, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 5800849, 4359057, 4359057, 5882769, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 5628817, 5653393, 4359057, 5702545, 4359057, 4359057, 5809041, 4359057, 4359057, 4359057, 4359057, 6407057, 4358144, 4358144, 4358144, 913, 913, 913, 4890624, 0, 0, 0, 0, 0, 0, 0, 0, 327680, 0, 0, 0, 0, 0, 0, 0, 0, 319488, 0, 0, 0, 0, 319488, 0, 319488, 6397952, 4801425, 4809617, 913, 913, 4891537, 913, 4948881, 913, 913, 913, 5047185, 913, 913, 913, 913, 913, 913, 913, 6300561, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 6120337, 913, 6169489, 913, 5186449, 913, 5235601, 5301137, 913, 913, 5407633, 5530513, 913, 913, 913, 913, 5899153, 913, 913, 913, 913, 913, 913, 6054801, 913, 913, 913, 989, 989, 5014493, 989, 989, 989, 989, 989, 5194717, 989, 989, 989, 989, 989, 989, 989, 989, 4359057, 4359057, 989, 4948957, 989, 989, 989, 5047261, 989, 989, 989, 989, 5186525, 989, 5235677, 5301213, 989, 989, 989, 5211101, 989, 989, 989, 989, 5293021, 989, 989, 989, 989, 5366749, 989, 989, 989, 5243869, 989, 989, 989, 989, 989, 989, 989, 5342173, 989, 989, 989, 989, 989, 989, 6464477, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 6325137, 5914624, 5915537, 0, 0, 0, 5407709, 5530589, 989, 989, 989, 989, 5899229, 989, 989, 989, 989, 989, 989, 989, 989, 6308829, 989, 989, 6357981, 6382557, 6398941, 4801425, 4809617, 4359057, 4359057, 4891537, 4359057, 4948881, 4359057, 4359057, 4359057, 5047185, 5899153, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 6308753, 4359057, 4359057, 6357905, 6382481, 6398865, 5021696, 4358144, 4358144, 5022609, 913, 913, 0, 4980736, 0, 0, 0, 0, 0, 5373952, 5734400, 6045696, 0, 0, 0, 0, 1792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114688, 0, 5537792, 5545984, 5734400, 5971968, 4358144, 6045696, 4358144, 6070272, 4358144, 4358144, 4358144, 6348800, 913, 4866961, 4883345, 913, 913, 4916113, 913, 4957073, 4973457, 913, 913, 913, 913, 913, 913, 5071761, 913, 913, 913, 913, 913, 913, 5260177, 913, 913, 913, 913, 913, 913, 913, 913, 5415825, 4981649, 913, 913, 913, 913, 913, 913, 913, 913, 5325713, 5374865, 5538705, 5546897, 5587857, 5735313, 5972881, 913, 6046609, 913, 6071185, 913, 913, 913, 913, 6349713, 989, 4867037, 4883421, 989, 4981725, 989, 989, 989, 5800925, 989, 989, 5882845, 989, 989, 989, 989, 989, 989, 989, 989, 989, 5628893, 5653469, 989, 5702621, 989, 989, 989, 989, 6071261, 989, 989, 989, 989, 6349789, 4359057, 4866961, 4883345, 4359057, 4981649, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 6464401, 4358144, 4358144, 4358144, 4358144, 4358144, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 5178257, 913, 4359057, 4359057, 6349713, 4358144, 6144000, 913, 6144913, 0, 4988928, 5005312, 0, 0, 0, 0, 5775360, 0, 0, 0, 0, 1795, 0, 0, 1798, 0, 1800, 0, 0, 0, 0, 0, 1806, 4358144, 6324224, 913, 913, 5006225, 913, 913, 913, 5120913, 5137297, 913, 913, 913, 913, 913, 913, 913, 5112721, 913, 913, 913, 913, 913, 5284753, 913, 913, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6053888, 4358144, 4358144, 913, 913, 5014417, 913, 913, 913, 913, 913, 5874577, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, 989, 989, 989, 4358144, 6094848, 913, 4907921, 913, 5079953, 913, 5227409, 913, 5743505, 913, 913, 913, 6095761, 913, 989, 989, 4932573, 4940765, 989, 989, 989, 989, 989, 989, 5055453, 989, 989, 989, 989, 989, 989, 6054877, 989, 989, 989, 4359057, 4359057, 5014417, 4359057, 4359057, 4359057, 4907997, 989, 5080029, 989, 5227485, 989, 5743581, 989, 989, 989, 6095837, 989, 4359057, 4907921, 4359057, 5079953, 4359057, 5227409, 4359057, 5743505, 4359057, 4359057, 4359057, 6095761, 4359057, 5062656, 0, 0, 0, 0, 0, 4358144, 4358144, 0, 913, 913, 913, 913, 913, 913, 0, 0, 0, 0, 0, 0, 0, 0, 4956160, 4964352, 0, 0, 0, 0, 0, 0, 0, 0, 4816896, 4358144, 4358144, 4358144, 4358144, 6086656, 4817809, 913, 913, 913, 913, 6087569, 4817885, 5332992, 5980160, 4358144, 913, 5333905, 5981073, 913, 989, 5333981, 5981149, 989, 4359057, 5333905, 5981073, 4359057, 0, 0, 0, 0, 1811, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1820, 0, 0, 0, 0, 1825, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 5439488, 5128192, 4358144, 5129105, 913, 5129181, 989, 5129105, 4359057, 0, 4358144, 913, 989, 4359057, 0, 4358144, 913, 989, 4359057, 6004736, 6004736, 6005649, 6005725, 6005649, 0, 0, 0, 450560, 450560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 375, 0, 450560, 450560, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 1876, 1877, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1867, 0, 0, 1870, 0, 0, 0, 0, 0, 196608, 0, 0, 0, 106496, 0, 0, 4284416, 0, 0, 0, 0, 0, 0, 0, 417792, 0, 0, 417792, 0, 0, 417792, 0, 417792, 0, 0, 0, 0, 139264, 147456, 417792, 0, 0, 0, 417792, 196608, 0, 0, 5816320, 6291456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, 0, 0, 307, 0, 0, 0, 4956160, 4964352, 0, 0, 0, 0, 0, 0, 0, 466944, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5480448, 0, 0, 0, 0, 0, 0, 6430720, 6438912, 914, 0, 0, 0, 914, 0, 4784128, 0, 0, 0, 4849664, 0, 0, 0, 0, 0, 648, 0, 0, 0, 0, 0, 0, 818, 0, 0, 0, 0, 0, 658, 659, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1272, 0, 0, 0, 0, 0, 0, 0, 0, 6332416, 0, 0, 0, 6389760, 0, 0, 6430720, 6438912, 990, 0, 0, 0, 990, 4358144, 4358144, 4358144, 914, 0, 0, 0, 4841472, 0, 0, 0, 4898816, 0, 0, 0, 0, 0, 0, 2383, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2825, 0, 0, 0, 0, 0, 0, 0, 459222, 459222, 459222, 459222, 459222, 459222, 459222, 459222, 459222, 459222, 459222, 459222, 459222, 459222, 459222, 459222, 459222, 459379, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 1887, 0, 1889, 1865, 528, 528, 528, 528, 528, 528, 528, 528, 3516, 528, 528, 3519, 528, 528, 528, 60866, 4358144, 4358144, 483328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1243, 0, 0, 1, 24578, 3, 0, 0, 0, 0, 507904, 0, 0, 0, 507904, 0, 0, 0, 0, 0, 0, 2398, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49723, 0, 0, 0, 0, 0, 327680, 0, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 2084, 0, 0, 0, 4825088, 0, 0, 0, 0, 0, 0, 0, 0, 3423, 0, 0, 0, 0, 0, 0, 0, 0, 3460, 0, 0, 0, 0, 0, 3465, 0, 4268032, 306, 307, 0, 0, 442368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1168, 1167, 0, 0, 0, 0, 0, 0, 0, 229376, 0, 491520, 524288, 0, 0, 0, 0, 0, 0, 0, 0, 0, 678, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 491520, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1275, 0, 1277, 1, 24578, 3, 0, 0, 0, 0, 0, 516096, 0, 0, 0, 516096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 0, 296, 0, 0, 516567, 516567, 516567, 516567, 516567, 516567, 516567, 516567, 516567, 516567, 516567, 516567, 516567, 516567, 516567, 516567, 516567, 516567, 1, 24578, 0, 0, 0, 4366336, 0, 0, 548864, 0, 0, 302, 303, 0, 0, 0, 0, 2306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5627904, 0, 0, 0, 4268032, 306, 307, 409600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 0, 308, 0, 0, 0, 5513216, 5783552, 0, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 5193728, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4907008, 0, 5079040, 6094848, 1, 24578, 4227365, 0, 0, 0, 0, 0, 0, 299, 0, 0, 0, 299, 0, 0, 0, 0, 0, 245760, 0, 245760, 245760, 0, 0, 0, 245760, 245760, 0, 0, 0, 0, 0, 0, 245760, 0, 0, 0, 245760, 0, 0, 245760, 245760, 245760, 0, 0, 540672, 0, 0, 540672, 0, 0, 0, 540672, 0, 0, 0, 0, 0, 0, 0, 540672, 0, 0, 0, 0, 0, 0, 0, 0, 417792, 0, 0, 0, 417792, 0, 0, 0, 0, 0, 1, 24578, 4227365, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 2328, 0, 0, 0, 0, 2332, 0, 0, 0, 0, 0, 0, 0, 1879, 0, 0, 0, 0, 0, 0, 0, 0, 768, 0, 0, 771, 0, 0, 0, 0, 0, 0, 499712, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1291, 0, 0, 0, 0, 499712, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5111808, 4358144, 4358144, 4358144, 4358144, 4358144, 5283840, 4358144, 4358144, 4358144, 4358144, 4358144, 499712, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1314, 0, 0, 0, 0, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 2355, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1882, 0, 0, 0, 0, 1, 24578, 3, 155942, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 4087, 528, 4088, 528, 528, 57893, 528, 57893, 528, 528, 57893, 528, 528, 57916, 57893, 528, 528, 57893, 57893, 57893, 0, 0, 0, 0, 0, 0, 3821, 0, 0, 0, 0, 57916, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57893, 57893, 57943, 57893, 57893, 57893, 0, 0, 0, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61529, 57916, 57916, 57916, 57943, 57943, 58773, 914, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60631, 0, 0, 2293, 0, 2294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 664, 0, 0, 0, 0, 3453, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 744, 1825, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2373, 0, 0, 0, 0, 0, 674, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1182, 0, 0, 0, 0, 0, 0, 0, 1280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1788, 0, 0, 528, 57894, 528, 57894, 528, 528, 57894, 528, 528, 57917, 57894, 528, 528, 57894, 57894, 57894, 57894, 57944, 57944, 57894, 57894, 57894, 57894, 57944, 57944, 57894, 528, 57894, 57894, 57917, 57894, 57894, 57894, 57894, 57894, 57894, 57894, 57917, 57917, 57894, 57894, 57944, 57894, 57894, 57894, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 1, 24578, 3, 155943, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 740, 661, 0, 0, 528, 0, 573440, 573440, 573440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 0, 516096, 0, 0, 0, 5988352, 0, 0, 6135808, 6307840, 0, 5996544, 4800512, 0, 6356992, 3675, 0, 0, 0, 0, 0, 694, 0, 0, 0, 787, 0, 0, 0, 0, 806, 0, 0, 0, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 637, 303, 0, 0, 0, 0, 2381, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 344064, 0, 0, 0, 0, 4268032, 640, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1804, 0, 0, 581632, 0, 0, 0, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 0, 581632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 581632, 0, 581632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 746, 581632, 581632, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 2397, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1225, 0, 0, 0, 0, 6258688, 6447104, 0, 0, 6127616, 0, 6348800, 5906432, 0, 5537792, 3827, 4882432, 0, 0, 0, 0, 0, 0, 2784, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 0, 420, 0, 0, 0, 3926, 0, 0, 0, 0, 0, 0, 5693440, 0, 6496256, 5144576, 5136384, 0, 5914624, 0, 0, 5513216, 5783552, 0, 3926, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 302, 0, 0, 306, 0, 0, 0, 0, 0, 0, 306, 237983, 147456, 0, 0, 0, 306, 0, 0, 311, 312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1819, 0, 0, 312, 0, 311, 311, 312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 311, 409, 312, 0, 458, 472, 472, 472, 485, 485, 485, 485, 485, 485, 485, 485, 485, 506, 485, 485, 485, 485, 485, 524, 485, 485, 485, 524, 485, 485, 485, 485, 485, 485, 529, 57895, 529, 57895, 529, 529, 57895, 529, 529, 57918, 57895, 529, 529, 57895, 57895, 57895, 57895, 57945, 57945, 57895, 57895, 57895, 57895, 57945, 57945, 57895, 529, 57895, 57895, 57918, 57895, 57895, 57895, 57895, 57895, 57895, 57895, 57918, 57918, 57895, 57895, 57945, 57895, 57895, 57895, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 306, 307, 0, 0, 0, 0, 0, 645, 0, 0, 648, 649, 0, 0, 0, 0, 0, 736, 0, 0, 0, 0, 0, 0, 0, 0, 0, 745, 368, 368, 0, 0, 704, 0, 0, 0, 0, 0, 0, 0, 711, 0, 0, 0, 0, 0, 750, 0, 0, 0, 0, 645, 0, 0, 0, 0, 0, 0, 0, 6299648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 777, 0, 0, 781, 0, 0, 0, 0, 0, 0, 0, 789, 0, 0, 0, 0, 0, 0, 2807, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2310, 0, 0, 0, 0, 0, 0, 793, 0, 0, 0, 0, 0, 0, 0, 797, 0, 0, 0, 0, 0, 0, 0, 0, 557056, 557056, 0, 0, 0, 0, 0, 0, 0, 833, 793, 0, 0, 0, 0, 0, 837, 838, 0, 0, 0, 0, 793, 528, 528, 0, 57893, 57893, 57893, 57893, 57893, 57893, 155942, 1151, 0, 0, 1155, 0, 0, 0, 0, 2295, 0, 1160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1759, 528, 847, 851, 528, 528, 863, 528, 528, 528, 879, 528, 884, 528, 892, 528, 895, 528, 528, 909, 528, 57893, 57893, 57893, 58266, 58270, 57893, 57893, 58282, 57893, 57893, 57893, 58298, 57893, 58303, 57893, 58311, 57893, 58314, 57893, 57893, 58328, 57893, 0, 57916, 57916, 57916, 58342, 58346, 57916, 57916, 58358, 57916, 57916, 57916, 58374, 57916, 58379, 57916, 58387, 57916, 58390, 57916, 57916, 58404, 57916, 0, 0, 0, 0, 58303, 57943, 57943, 57943, 58417, 58421, 57943, 57943, 58433, 57943, 57943, 528, 528, 528, 57893, 57893, 57893, 0, 0, 3655, 0, 3657, 0, 0, 0, 0, 0, 2356, 0, 2358, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5693440, 0, 6496256, 5144576, 5136384, 0, 5914624, 57943, 58449, 57943, 58454, 57943, 58462, 57943, 58465, 57943, 57943, 58479, 57943, 847, 851, 1141, 895, 1159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 747, 0, 0, 0, 1320, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 302, 0, 0, 528, 528, 528, 1411, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2470, 528, 528, 0, 0, 1809, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1842, 0, 0, 1832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1201, 1885, 0, 0, 1886, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3225, 528, 528, 528, 1899, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1912, 528, 528, 528, 0, 0, 57893, 60609, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61085, 57893, 57893, 57893, 57893, 57893, 57893, 528, 528, 528, 528, 58773, 1985, 57893, 57893, 57893, 57893, 57893, 59336, 57893, 57893, 57893, 57893, 57893, 58822, 57893, 57893, 57893, 57893, 58827, 57893, 57893, 57893, 57893, 57893, 58319, 57893, 57893, 57893, 57893, 0, 57916, 57916, 58341, 57916, 57916, 57893, 59342, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59355, 57893, 57893, 57893, 57893, 57893, 58859, 57893, 57893, 57893, 58866, 57893, 50676, 58773, 990, 57916, 57916, 59442, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59455, 57916, 57916, 57916, 57916, 57916, 57916, 60387, 57916, 57916, 57916, 57916, 57916, 57916, 60394, 57916, 57916, 57916, 57916, 57916, 57916, 59514, 57916, 57916, 57916, 57916, 57916, 57916, 59520, 57916, 57916, 57916, 57916, 57916, 57943, 61127, 57943, 57943, 57943, 61130, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60968, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60721, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59610, 57943, 57943, 57943, 57943, 57943, 57943, 59616, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60982, 60984, 57943, 57943, 57943, 57943, 60988, 57943, 60990, 0, 0, 2293, 0, 2294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2300, 0, 0, 0, 0, 2806, 0, 0, 0, 0, 0, 2811, 0, 2813, 2814, 0, 0, 0, 0, 0, 483328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 801, 0, 0, 0, 0, 0, 0, 2325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2334, 0, 0, 0, 0, 0, 0, 2822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 769, 0, 0, 0, 774, 0, 0, 0, 2407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 702, 528, 2399, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2429, 528, 528, 2432, 528, 528, 2475, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2471, 528, 57893, 57893, 59863, 57893, 57893, 57893, 57893, 57893, 57893, 59871, 57893, 57893, 57893, 57893, 57893, 57893, 0, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60351, 57916, 57916, 57916, 57916, 57916, 57916, 57893, 59891, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60640, 57916, 57916, 57916, 59949, 57916, 57916, 59952, 57916, 57916, 57916, 57916, 57916, 57916, 59960, 57916, 57916, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 57916, 57916, 60017, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60417, 57943, 57943, 57943, 57943, 57943, 60032, 57943, 57943, 60035, 57943, 57943, 57943, 57943, 57943, 57943, 60043, 57943, 57943, 528, 528, 528, 57893, 57893, 57893, 0, 3654, 0, 0, 0, 0, 0, 0, 0, 1325, 0, 0, 0, 1329, 0, 0, 0, 0, 57943, 57943, 60100, 57943, 57943, 57943, 57943, 2760, 528, 528, 528, 528, 60109, 57893, 57893, 57893, 0, 0, 0, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59945, 57916, 0, 0, 2781, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1884, 0, 0, 0, 0, 2794, 0, 0, 0, 0, 0, 2798, 0, 0, 0, 0, 0, 0, 0, 0, 4784128, 0, 0, 0, 0, 0, 0, 0, 0, 3181, 0, 0, 0, 0, 0, 3186, 0, 57893, 60285, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60293, 57893, 57893, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 57943, 57943, 60461, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 4075, 0, 4076, 57943, 60472, 57943, 57943, 57943, 57943, 57943, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 0, 0, 0, 0, 0, 0, 0, 3150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2299, 0, 0, 0, 3160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3173, 0, 0, 0, 0, 2820, 0, 0, 0, 2824, 0, 0, 0, 0, 0, 0, 0, 703, 0, 0, 0, 0, 0, 0, 0, 0, 2331, 0, 0, 0, 0, 0, 0, 0, 0, 3189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3202, 3203, 0, 0, 3215, 0, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3226, 528, 528, 3230, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3239, 528, 528, 0, 0, 0, 0, 0, 0, 57893, 57893, 60279, 57893, 57893, 57893, 57893, 57893, 58320, 57893, 57893, 57893, 57893, 0, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 4289, 0, 528, 60617, 57893, 57893, 60621, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60630, 57893, 0, 0, 3137, 3138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3199, 0, 0, 0, 0, 57916, 57916, 57916, 60666, 57916, 57916, 60670, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58383, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60679, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60687, 57916, 0, 0, 0, 0, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 528, 528, 57893, 57893, 57893, 57943, 57943, 57943, 57943, 60715, 57943, 57943, 60719, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59582, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60728, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60736, 0, 3430, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 729, 0, 528, 3495, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2904, 528, 528, 528, 528, 3512, 528, 3514, 528, 528, 528, 528, 528, 528, 528, 528, 57893, 57893, 58259, 57893, 57893, 57893, 57893, 57893, 57893, 58292, 57893, 57893, 60879, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59389, 57893, 57893, 57893, 57893, 60897, 57893, 60899, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59399, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 60921, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 60963, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60457, 57943, 528, 4015, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 57893, 61372, 57893, 302, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1199, 0, 0, 61374, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 61388, 57916, 0, 0, 0, 0, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58442, 61390, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 61404, 57943, 528, 2281, 528, 528, 528, 57893, 59630, 57893, 57893, 57893, 2290, 0, 2291, 0, 0, 0, 0, 0, 262144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 663, 0, 0, 666, 667, 0, 61406, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 0, 0, 528, 4077, 0, 0, 0, 0, 0, 0, 0, 4084, 0, 0, 528, 528, 528, 528, 4089, 0, 0, 4148, 0, 4150, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1399, 528, 528, 528, 0, 0, 0, 313, 314, 315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1240, 0, 0, 0, 0, 0, 0, 0, 427, 0, 131072, 0, 0, 0, 0, 427, 0, 0, 0, 0, 0, 427, 459, 0, 0, 0, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 523, 459, 523, 523, 523, 459, 523, 523, 523, 523, 523, 523, 530, 57896, 530, 57896, 530, 530, 57896, 530, 530, 57919, 57896, 530, 530, 57896, 57896, 57896, 57896, 57946, 57946, 57896, 57896, 57896, 57896, 57946, 57946, 57896, 621, 57896, 57973, 57919, 57896, 57896, 57896, 57896, 57896, 57896, 57896, 57919, 57919, 57896, 57896, 57946, 57896, 57896, 57896, 57973, 57973, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 2830, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 680, 681, 0, 0, 0, 57893, 57893, 58307, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60350, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60915, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58942, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60389, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 58458, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 528, 528, 1965, 528, 528, 528, 528, 528, 528, 1972, 528, 528, 528, 528, 528, 528, 528, 3501, 528, 3503, 528, 528, 528, 528, 528, 528, 1360, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2887, 528, 2889, 528, 528, 528, 528, 57893, 59408, 57893, 57893, 57893, 57893, 57893, 57893, 59416, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58823, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58840, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59508, 57916, 57916, 57916, 57916, 57916, 57916, 59516, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58909, 57916, 57916, 57916, 58912, 57916, 57916, 57916, 57893, 57893, 57893, 60286, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58814, 57893, 57893, 57893, 60408, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 60414, 57943, 57943, 57943, 57943, 60418, 57943, 57943, 57943, 60473, 57943, 57943, 57943, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 0, 0, 0, 0, 2292, 528, 528, 528, 4093, 528, 4095, 528, 528, 4097, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61077, 57893, 57893, 57893, 57893, 61450, 57893, 61452, 57893, 57893, 61454, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 58879, 57916, 57916, 57916, 57916, 57916, 58891, 57916, 57916, 57916, 57916, 57916, 61464, 57916, 61466, 57916, 57916, 61468, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 60956, 57943, 57943, 57943, 57943, 57943, 60960, 57943, 57943, 57943, 57943, 61478, 57943, 61480, 57943, 57943, 61482, 57943, 57943, 0, 0, 0, 0, 0, 0, 0, 1766, 0, 0, 1769, 0, 0, 0, 0, 0, 320, 320, 428, 429, 131072, 436, 429, 437, 439, 428, 436, 437, 0, 316, 437, 455, 460, 473, 473, 473, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 508, 508, 521, 521, 522, 522, 508, 522, 522, 522, 508, 522, 522, 522, 522, 522, 522, 531, 57897, 531, 57897, 531, 531, 57897, 531, 531, 57920, 57897, 531, 531, 57897, 57897, 57897, 57897, 57947, 57947, 57897, 57897, 57897, 57897, 57947, 57947, 57897, 622, 57972, 57972, 57920, 57897, 57897, 57897, 57897, 57897, 57897, 57897, 57920, 57920, 57897, 57897, 57947, 57897, 57897, 57897, 57972, 57972, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 3151, 0, 0, 0, 0, 0, 3155, 0, 0, 0, 0, 0, 0, 814, 0, 0, 0, 0, 0, 0, 819, 0, 0, 0, 686, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 0, 0, 0, 368, 368, 702, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2315, 0, 0, 0, 0, 0, 734, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 303, 0, 0, 0, 823, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 775, 0, 0, 1174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 804, 0, 0, 0, 0, 1216, 1174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2336, 0, 0, 0, 0, 0, 1281, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 342, 296, 0, 0, 0, 1295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2363, 0, 0, 1307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1229, 58773, 914, 57893, 57893, 58777, 57893, 57893, 58781, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58808, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58795, 57893, 58800, 57893, 57893, 58804, 57893, 57893, 58807, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58838, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58841, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58872, 57916, 57916, 58876, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58890, 57916, 58895, 57916, 0, 0, 0, 0, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 58428, 57943, 57943, 58444, 57916, 58899, 57916, 57916, 58902, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59985, 57916, 57916, 57916, 1860, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1245, 528, 528, 528, 528, 1902, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1914, 528, 528, 0, 57893, 57893, 57893, 57893, 57893, 57893, 155942, 1151, 0, 0, 1156, 0, 0, 0, 0, 327, 327, 377, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1210, 0, 368, 368, 0, 1213, 0, 1929, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 896, 57893, 57893, 57893, 59345, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59357, 57893, 57893, 1, 24578, 3, 155942, 156282, 296, 0, 0, 0, 0, 0, 302, 303, 0, 57916, 57916, 59445, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59457, 57916, 57916, 57916, 57916, 57916, 59967, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 61474, 57943, 59541, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59553, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61152, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 528, 528, 2763, 2764, 57893, 57893, 57893, 60112, 57943, 57943, 57943, 59591, 59592, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59601, 57943, 57943, 57943, 57893, 59917, 59918, 59919, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58848, 57893, 57893, 58852, 57916, 59989, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60002, 57943, 60072, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60085, 57893, 57893, 60325, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58849, 57893, 57893, 0, 0, 0, 3216, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2484, 528, 528, 528, 528, 528, 3243, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2891, 528, 528, 57893, 57893, 57893, 57893, 60634, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 0, 2999, 0, 0, 0, 61125, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60962, 528, 528, 4092, 528, 528, 528, 528, 528, 528, 528, 57893, 61444, 57893, 61445, 57893, 57893, 57893, 2589, 0, 0, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61106, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59954, 57916, 57916, 59958, 57916, 57916, 57916, 59962, 57893, 61449, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 61458, 57916, 61459, 57916, 57916, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59540, 57916, 61463, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 61472, 57943, 61473, 57943, 57943, 528, 528, 1715, 528, 528, 1718, 57893, 57893, 59064, 57893, 57893, 59067, 1151, 0, 57943, 61477, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 0, 0, 0, 1814, 0, 0, 0, 0, 0, 0, 0, 0, 528, 1338, 528, 528, 528, 528, 528, 528, 528, 528, 4291, 57893, 57893, 57893, 61637, 57916, 57916, 57916, 61639, 57943, 57943, 57943, 61641, 0, 0, 0, 0, 3178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1312, 0, 0, 0, 0, 326, 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1186, 0, 0, 0, 377, 0, 131072, 0, 0, 0, 440, 377, 0, 0, 445, 451, 0, 377, 461, 474, 474, 474, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 532, 57898, 532, 57898, 532, 532, 57898, 532, 532, 57921, 57898, 532, 532, 57898, 57898, 57898, 57898, 57948, 57948, 57898, 57898, 57898, 57898, 57948, 57948, 57898, 532, 57898, 57898, 57921, 57898, 57898, 57898, 57898, 57898, 57898, 57898, 57921, 57921, 57898, 57898, 57948, 57898, 57898, 57898, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 1188, 0, 1190, 1191, 0, 0, 0, 1193, 1194, 0, 0, 0, 0, 0, 0, 0, 0, 4997120, 0, 0, 5038080, 0, 0, 0, 5095424, 5103616, 0, 0, 1232, 1233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 370, 0, 0, 0, 1263, 1265, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1200, 0, 1317, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1303, 0, 0, 0, 1331, 1193, 528, 528, 1390, 528, 528, 1392, 528, 528, 528, 528, 1397, 528, 528, 528, 528, 528, 528, 3500, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 61443, 57893, 57893, 57893, 57893, 57893, 58773, 914, 57893, 57893, 58778, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 2588, 2999, 0, 0, 0, 58831, 57893, 57893, 57893, 57893, 58836, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58811, 58813, 57893, 57893, 57893, 57893, 58873, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60380, 57916, 58900, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58928, 57916, 57916, 58915, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58924, 57916, 57916, 58926, 57916, 57916, 57916, 57916, 57916, 59980, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61530, 57916, 57916, 57943, 57943, 57916, 58931, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58950, 57916, 57916, 57916, 58956, 57916, 57916, 57916, 57916, 0, 58831, 57943, 57943, 58967, 57943, 57943, 57943, 57943, 57943, 57943, 60464, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60470, 57943, 57943, 57943, 57943, 59018, 57943, 57943, 59020, 57943, 57943, 57943, 57943, 59026, 57943, 57943, 57943, 528, 528, 57893, 57893, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2778, 1963, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 901, 0, 0, 2293, 0, 2294, 0, 0, 0, 0, 0, 2297, 0, 0, 0, 0, 0, 0, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 57893, 59862, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60650, 57893, 59878, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58816, 57893, 59947, 57916, 57916, 57916, 57916, 59951, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 61475, 60015, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61133, 57943, 60030, 57943, 57943, 57943, 57943, 60034, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60723, 57943, 57943, 57943, 60098, 57943, 57943, 57943, 57943, 57943, 57943, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 0, 0, 0, 1729, 0, 0, 0, 0, 2844, 0, 0, 0, 0, 0, 2849, 0, 0, 0, 0, 0, 0, 0, 1852, 0, 0, 0, 0, 0, 0, 0, 1859, 0, 57916, 57916, 57916, 60347, 57916, 60348, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58385, 57916, 57916, 57916, 57916, 58403, 57916, 0, 0, 3205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2374, 0, 0, 528, 528, 528, 528, 3253, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1926, 528, 528, 528, 57916, 60688, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60694, 57916, 57916, 57916, 57916, 57916, 57916, 58906, 58908, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59451, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59498, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60672, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 60737, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60743, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61339, 57943, 57943, 57943, 528, 57893, 0, 0, 0, 0, 0, 0, 3671, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 665, 0, 0, 668, 57916, 61126, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60961, 57943, 57916, 57916, 57916, 61239, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60959, 57943, 57943, 57943, 57943, 61258, 57943, 57943, 528, 528, 57893, 57893, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2776, 2777, 0, 528, 528, 528, 528, 4018, 528, 528, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 58280, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61377, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 61223, 57916, 57916, 57916, 57916, 57916, 57916, 61393, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 60025, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61409, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 0, 4241, 0, 4243, 528, 528, 528, 528, 528, 4094, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59372, 57893, 57893, 57893, 61451, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61318, 57916, 57916, 57916, 61465, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 61244, 57943, 57943, 57943, 57943, 57943, 57943, 61479, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 0, 0, 0, 1865, 1866, 0, 0, 0, 1869, 0, 0, 0, 0, 0, 328, 329, 330, 331, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1855, 1856, 0, 1857, 1858, 0, 0, 376, 0, 0, 0, 0, 0, 328, 376, 331, 375, 0, 0, 0, 0, 0, 0, 363, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 450560, 0, 0, 0, 331, 0, 0, 0, 0, 0, 0, 376, 0, 0, 0, 0, 0, 0, 0, 0, 5210112, 0, 5365760, 0, 5554176, 5570560, 5578752, 0, 462, 475, 475, 475, 488, 488, 488, 488, 499, 501, 488, 488, 499, 488, 510, 510, 510, 510, 510, 525, 510, 510, 510, 525, 510, 510, 510, 510, 510, 510, 533, 57899, 533, 57899, 533, 533, 57899, 533, 533, 57922, 57899, 533, 533, 57899, 57899, 57899, 57899, 57949, 57949, 57899, 57899, 57899, 57899, 57949, 57949, 57899, 533, 57899, 57899, 57922, 57899, 57899, 57899, 57899, 57899, 57899, 57899, 57922, 57922, 57899, 57899, 57949, 57899, 57899, 57899, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 670, 671, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 683, 684, 685, 0, 0, 0, 689, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 368, 0, 0, 0, 0, 0, 0, 707, 708, 0, 0, 0, 0, 0, 714, 0, 0, 0, 718, 0, 720, 0, 0, 0, 0, 0, 0, 727, 0, 0, 0, 0, 0, 1163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6152192, 0, 0, 0, 6316032, 0, 731, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1292, 778, 779, 0, 0, 0, 0, 0, 0, 0, 0, 788, 0, 790, 0, 0, 0, 0, 0, 1201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3675, 0, 0, 0, 3830, 0, 822, 0, 0, 0, 0, 0, 822, 822, 825, 0, 0, 0, 790, 0, 0, 0, 0, 0, 1235, 0, 1237, 0, 0, 0, 0, 1242, 0, 0, 0, 0, 0, 1268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3675, 0, 0, 3829, 0, 0, 0, 0, 834, 0, 0, 0, 0, 0, 0, 0, 788, 0, 0, 0, 834, 528, 528, 0, 57893, 57893, 57893, 57893, 57893, 57893, 155942, 1151, 0, 302, 0, 0, 306, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 65536, 303, 0, 528, 848, 528, 854, 528, 528, 869, 528, 528, 880, 528, 885, 528, 528, 894, 897, 902, 528, 910, 528, 57893, 57893, 57893, 58267, 57893, 58273, 57893, 57893, 58288, 57893, 57893, 58299, 57893, 58304, 57893, 57893, 58313, 58316, 58321, 57893, 58329, 57893, 0, 57916, 57916, 57916, 58343, 57916, 0, 0, 0, 0, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 58430, 57943, 57943, 57943, 57943, 57943, 59547, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61417, 57943, 0, 0, 0, 58349, 57916, 57916, 58364, 57916, 57916, 58375, 57916, 58380, 57916, 57916, 58389, 58392, 58397, 57916, 58405, 57916, 0, 0, 0, 0, 58304, 57943, 57943, 57943, 58418, 57943, 58424, 57943, 57943, 58439, 57943, 1906, 528, 528, 528, 528, 59349, 57893, 57893, 57893, 57893, 0, 0, 0, 0, 0, 3140, 0, 0, 3143, 3144, 0, 0, 3147, 3148, 0, 57943, 58450, 57943, 58455, 57943, 57943, 58464, 58467, 58472, 57943, 58480, 57943, 848, 528, 528, 1142, 902, 528, 0, 57893, 58267, 57893, 58492, 58321, 57893, 155942, 1151, 0, 0, 0, 0, 0, 0, 364, 365, 366, 367, 0, 0, 368, 0, 296, 0, 0, 0, 0, 1176, 0, 0, 0, 0, 0, 0, 0, 1183, 0, 0, 0, 0, 0, 0, 3165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 0, 421, 0, 0, 1203, 1204, 0, 0, 0, 0, 1208, 0, 0, 0, 368, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 713, 0, 0, 1231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1244, 0, 0, 0, 1248, 0, 0, 1200, 0, 0, 0, 0, 0, 749, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 726, 0, 0, 0, 0, 528, 1347, 528, 528, 528, 528, 528, 528, 1362, 528, 528, 528, 1367, 528, 528, 528, 528, 528, 2464, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1910, 528, 528, 528, 528, 58773, 914, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58786, 57893, 57893, 57893, 0, 0, 0, 0, 57916, 57916, 57916, 57916, 57916, 57916, 59944, 57916, 57916, 57893, 57893, 57893, 58801, 57893, 57893, 57893, 58806, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58809, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58854, 57893, 57893, 57893, 57893, 57893, 57893, 58865, 57893, 50676, 58773, 990, 57916, 57916, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59537, 57943, 57943, 528, 1351, 528, 1408, 528, 528, 58790, 57893, 57893, 58847, 57893, 57893, 1151, 0, 57916, 57916, 57916, 58901, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58391, 57916, 57916, 57916, 57916, 57916, 57916, 58918, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58396, 57916, 57916, 57916, 57916, 57916, 57916, 58933, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58949, 57916, 0, 0, 0, 0, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 58431, 57943, 57943, 57943, 57943, 57943, 60063, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60428, 57943, 60430, 57943, 57943, 57943, 57943, 58975, 57943, 57943, 57943, 57943, 57943, 57943, 58990, 57943, 57943, 57943, 58995, 57943, 2280, 528, 2282, 528, 528, 59629, 57893, 59631, 57893, 57893, 0, 0, 0, 0, 0, 0, 1298, 0, 0, 0, 0, 1303, 0, 0, 0, 0, 59055, 57943, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 1151, 1724, 0, 1760, 0, 0, 1763, 1764, 1765, 0, 1767, 1768, 0, 0, 0, 0, 1773, 0, 0, 0, 0, 3192, 0, 0, 0, 0, 3197, 0, 0, 0, 0, 0, 0, 0, 2368, 2369, 0, 0, 0, 0, 0, 0, 0, 692, 0, 0, 0, 0, 0, 0, 699, 368, 1807, 0, 0, 0, 0, 0, 0, 0, 0, 1816, 1817, 0, 0, 0, 0, 0, 0, 373, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 352256, 0, 0, 0, 1823, 0, 0, 1825, 0, 0, 0, 0, 0, 0, 0, 0, 1829, 1830, 1831, 0, 1870, 0, 0, 0, 1888, 1740, 1740, 1890, 528, 1892, 528, 1893, 1894, 528, 1896, 528, 528, 528, 1900, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1913, 528, 528, 0, 0, 0, 0, 0, 0, 57893, 60278, 57893, 57893, 57893, 57893, 57893, 57893, 0, 2592, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59969, 57916, 57916, 57916, 57916, 57916, 57916, 59974, 57916, 528, 528, 1917, 528, 528, 528, 528, 1921, 528, 1923, 528, 528, 528, 528, 528, 528, 1393, 528, 1395, 528, 528, 528, 528, 528, 528, 528, 872, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3710, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1933, 1934, 1936, 528, 528, 528, 528, 528, 528, 528, 1944, 1945, 528, 1947, 528, 528, 1950, 1951, 528, 528, 528, 528, 528, 528, 528, 1959, 528, 1961, 528, 1964, 528, 528, 528, 528, 528, 1971, 528, 528, 1973, 528, 528, 528, 528, 528, 528, 3855, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 58279, 57893, 57893, 57893, 57893, 57893, 528, 528, 528, 528, 58773, 0, 59332, 57893, 59334, 57893, 59335, 57893, 59337, 57893, 59339, 57893, 302, 306, 0, 0, 0, 0, 3141, 0, 0, 0, 3145, 0, 0, 0, 0, 0, 0, 2832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2835, 0, 0, 0, 0, 0, 0, 57893, 57893, 59343, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59356, 57893, 57893, 57893, 0, 0, 0, 0, 57916, 57916, 57916, 57916, 59942, 57916, 57916, 57916, 57916, 57916, 59515, 57916, 57916, 59517, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 0, 57893, 57943, 57943, 58966, 57943, 57943, 58970, 57943, 57893, 59360, 57893, 57893, 57893, 57893, 59364, 57893, 59366, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58839, 57893, 57893, 58846, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59376, 59377, 59379, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59387, 59388, 57893, 2770, 2291, 0, 2771, 2294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 770, 0, 0, 0, 0, 0, 59390, 57893, 57893, 59393, 59394, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59402, 57893, 59404, 57893, 2770, 2291, 0, 2771, 2294, 0, 0, 0, 0, 0, 0, 2775, 0, 0, 0, 0, 0, 784, 0, 0, 679, 0, 0, 0, 0, 0, 0, 0, 660, 661, 0, 0, 0, 0, 0, 0, 0, 384, 0, 139264, 147456, 0, 406, 0, 0, 406, 59407, 57893, 57893, 57893, 57893, 57893, 59415, 57893, 57893, 59417, 57893, 57893, 57893, 57893, 57893, 57893, 0, 0, 57916, 57916, 57916, 57916, 60660, 57916, 57916, 57916, 57916, 59443, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59456, 57916, 57916, 57916, 57916, 57916, 58878, 57916, 57916, 57916, 58882, 57916, 57916, 58893, 57916, 57916, 58897, 59460, 57916, 57916, 57916, 57916, 59464, 57916, 59466, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59467, 59468, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59476, 59477, 59479, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59487, 59488, 57916, 59490, 57916, 57916, 59493, 59494, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59502, 57916, 59504, 57916, 59507, 57943, 57943, 57943, 59560, 57943, 59562, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60987, 57943, 57943, 57943, 59572, 59573, 59575, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59583, 59584, 57943, 57943, 59586, 57943, 57943, 57943, 57943, 57943, 60731, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60081, 57943, 57943, 57943, 57943, 57943, 59589, 59590, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59598, 57943, 59600, 57943, 59603, 57943, 57943, 57943, 57943, 57943, 60739, 57943, 57943, 57943, 60742, 57943, 60744, 57943, 57943, 57943, 57943, 57943, 57943, 60740, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59023, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59611, 57943, 57943, 59613, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60039, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 2293, 0, 2294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2301, 0, 0, 2304, 2305, 0, 0, 0, 2309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6406144, 5357568, 0, 5505024, 0, 0, 0, 0, 2352, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1276, 0, 1825, 0, 2365, 0, 0, 0, 0, 0, 0, 0, 0, 2372, 0, 0, 2375, 0, 0, 0, 0, 3217, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2929, 528, 528, 528, 0, 2378, 0, 0, 0, 0, 0, 0, 2385, 0, 2387, 0, 0, 0, 0, 0, 0, 403, 0, 0, 0, 0, 0, 0, 0, 0, 332, 333, 0, 0, 0, 0, 0, 0, 0, 0, 334, 335, 336, 0, 0, 0, 0, 0, 0, 0, 0, 2396, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 697, 698, 0, 368, 2406, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2417, 0, 0, 0, 0, 3433, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 786, 0, 0, 0, 528, 2433, 528, 2435, 528, 528, 528, 528, 528, 528, 2443, 528, 2445, 528, 528, 528, 528, 528, 1414, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1956, 528, 528, 528, 528, 528, 528, 528, 528, 2451, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2902, 528, 528, 2473, 528, 528, 528, 528, 528, 528, 2480, 528, 528, 528, 528, 528, 528, 528, 528, 1906, 528, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 59864, 57893, 59866, 57893, 57893, 57893, 57893, 57893, 57893, 59874, 57893, 59876, 57893, 2770, 2291, 0, 2771, 2294, 0, 0, 2773, 0, 0, 0, 0, 0, 0, 0, 0, 2359296, 418, 418, 0, 0, 0, 0, 0, 57893, 57893, 59904, 59905, 57893, 57893, 57893, 57893, 57893, 57893, 59912, 57893, 57893, 57893, 57893, 57893, 57893, 60885, 57893, 60887, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59397, 57893, 57893, 59400, 57893, 57893, 57893, 57893, 57893, 59930, 59931, 57893, 0, 0, 0, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58910, 57916, 57916, 57916, 57916, 57916, 57916, 59963, 57916, 59965, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59971, 57916, 57916, 57916, 57916, 57916, 57916, 60914, 57916, 57916, 57916, 57916, 57916, 60918, 57916, 57916, 57916, 57916, 60016, 57916, 57916, 60019, 60020, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 0, 4239, 0, 0, 0, 0, 528, 60046, 57943, 60048, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60054, 57943, 57943, 57943, 57943, 57943, 57943, 58979, 58986, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60079, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60099, 57943, 57943, 60102, 60103, 57943, 2435, 528, 2762, 528, 528, 59866, 57893, 60111, 57893, 57893, 57893, 57893, 57893, 61083, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61089, 57893, 57893, 57893, 57893, 57893, 61219, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 1272, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 3132, 528, 528, 528, 57893, 60479, 57893, 57893, 0, 0, 2829, 0, 0, 0, 0, 2833, 0, 0, 0, 0, 0, 0, 0, 0, 312, 311, 0, 0, 0, 311, 311, 312, 2905, 528, 528, 528, 528, 2909, 528, 528, 528, 2914, 528, 528, 528, 528, 528, 528, 1920, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1908, 528, 528, 528, 528, 528, 528, 528, 528, 2922, 528, 528, 528, 528, 528, 528, 528, 2927, 528, 528, 528, 528, 528, 528, 3940, 528, 528, 528, 528, 528, 528, 3946, 528, 528, 60284, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59406, 60296, 57893, 60298, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59403, 57893, 57893, 57893, 60324, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60332, 57893, 57893, 57893, 57893, 57893, 57893, 61096, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 60703, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58466, 57943, 57943, 57943, 57943, 528, 528, 528, 896, 57893, 57893, 57893, 60338, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 0, 2999, 0, 0, 0, 0, 0, 1323, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2836, 2837, 0, 0, 0, 0, 57916, 60382, 57916, 57916, 57916, 57916, 60386, 57916, 57916, 57916, 60391, 57916, 57916, 57916, 57916, 57916, 57916, 60926, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59956, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60399, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60405, 57916, 57916, 57916, 57916, 57916, 59992, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58925, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 60447, 57943, 57943, 57943, 57943, 60451, 57943, 57943, 57943, 60456, 57943, 57943, 528, 1352, 528, 528, 1717, 528, 58791, 57893, 57893, 57893, 59066, 57893, 1151, 0, 0, 0, 3177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2390, 0, 0, 528, 528, 528, 528, 3232, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1941, 528, 528, 528, 528, 528, 3251, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2892, 528, 57893, 57893, 57893, 57893, 60643, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 50676, 58773, 990, 57916, 57916, 3442, 3443, 0, 3444, 0, 3446, 0, 0, 0, 0, 3448, 0, 0, 0, 0, 0, 0, 737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2360, 0, 0, 0, 0, 0, 2364, 3467, 0, 0, 0, 0, 3472, 3473, 0, 3475, 0, 0, 3478, 0, 0, 0, 3481, 528, 528, 528, 528, 3498, 528, 528, 528, 528, 528, 3504, 528, 528, 528, 528, 528, 528, 4020, 528, 4022, 4023, 528, 4025, 528, 57893, 57893, 57893, 57893, 57893, 57893, 60882, 57893, 57893, 57893, 57893, 57893, 60888, 57893, 57893, 60891, 57893, 57893, 57893, 0, 0, 0, 0, 57916, 57916, 57916, 59941, 57916, 59943, 57916, 57916, 57916, 57916, 57916, 60006, 60007, 60008, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58943, 57916, 57916, 58947, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60924, 57916, 57916, 57916, 57916, 57916, 60930, 57916, 57916, 60933, 57916, 57916, 57893, 57943, 57943, 57943, 57943, 57943, 59532, 57943, 57943, 57943, 57943, 57943, 59538, 57943, 60991, 57943, 528, 528, 3650, 57893, 57893, 60997, 0, 0, 0, 0, 0, 0, 3659, 0, 0, 0, 0, 3445, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2812, 0, 0, 2815, 0, 0, 3662, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1306, 0, 3669, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3676, 0, 3678, 528, 528, 528, 528, 3705, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2458, 528, 528, 528, 528, 528, 3715, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2903, 528, 528, 57893, 57893, 57893, 61071, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61076, 57893, 57893, 57893, 0, 0, 0, 0, 57916, 57916, 59940, 57916, 57916, 57916, 57916, 57916, 57916, 59981, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59453, 57916, 57916, 57916, 57916, 57916, 57916, 57893, 57893, 57893, 57893, 61095, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 61100, 57916, 0, 0, 0, 0, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 58432, 57943, 57943, 57943, 57943, 57943, 60075, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59048, 57943, 57943, 57943, 57943, 61134, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61145, 3832, 0, 0, 3835, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 772, 0, 0, 0, 57916, 57916, 61238, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61142, 57943, 57943, 57943, 3924, 0, 3675, 0, 0, 0, 0, 0, 3932, 0, 0, 0, 0, 0, 0, 0, 312, 0, 0, 0, 0, 0, 311, 0, 311, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61301, 57893, 57893, 57893, 57893, 57893, 59363, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60315, 57893, 57893, 57893, 57893, 60319, 57893, 57893, 57943, 61333, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 57893, 0, 0, 0, 0, 0, 1736, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2334720, 0, 2334720, 0, 0, 0, 0, 0, 0, 4079, 0, 0, 0, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 528, 4157, 528, 4159, 528, 528, 4091, 528, 528, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 61448, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61317, 57916, 61462, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60028, 57943, 61476, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 4141, 4142, 0, 0, 0, 4145, 528, 528, 61507, 61508, 61509, 57893, 57893, 57893, 61512, 57893, 61514, 57893, 57893, 57893, 57893, 61519, 61520, 61521, 61522, 57916, 57916, 57916, 61525, 57916, 61527, 57916, 57916, 57916, 57916, 61532, 61533, 61534, 61535, 57943, 57943, 57943, 61538, 57943, 61540, 57943, 57943, 57943, 57943, 61545, 0, 0, 0, 0, 0, 0, 3194, 0, 0, 0, 3198, 0, 3200, 0, 0, 0, 528, 4245, 528, 528, 528, 4249, 57893, 57893, 61595, 57893, 57893, 57893, 61599, 57893, 57916, 57916, 57893, 57943, 59529, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59536, 57943, 57943, 57943, 57943, 57943, 59040, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 3412, 528, 57893, 60759, 57893, 61601, 57916, 57916, 57916, 61605, 57916, 57943, 57943, 61607, 57943, 57943, 57943, 61611, 57943, 0, 0, 0, 0, 0, 2342912, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 4359058, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6275072, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 413, 0, 0, 0, 0, 0, 0, 413, 139264, 147456, 0, 0, 0, 422, 0, 0, 0, 0, 3456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 749, 0, 0, 0, 0, 372, 372, 0, 430, 131072, 372, 430, 430, 0, 333, 372, 430, 0, 0, 430, 456, 430, 0, 0, 0, 430, 495, 495, 495, 500, 495, 495, 495, 500, 495, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 534, 57900, 534, 57900, 534, 534, 57900, 534, 534, 57923, 57900, 534, 534, 57900, 57900, 57900, 57900, 57950, 57950, 57900, 57900, 57900, 57900, 57950, 57950, 57900, 534, 57900, 57900, 57923, 57900, 57900, 57900, 57900, 57900, 57900, 57900, 57923, 57923, 57900, 57900, 57950, 57900, 57900, 57900, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 841, 528, 528, 528, 528, 528, 528, 873, 528, 528, 528, 528, 528, 528, 528, 528, 1939, 528, 528, 528, 528, 528, 528, 528, 0, 0, 1175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2416, 0, 0, 0, 0, 0, 1296, 0, 1175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2371, 0, 0, 0, 0, 0, 58773, 914, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58784, 57893, 57893, 57893, 57893, 57893, 57893, 61210, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60626, 57893, 57893, 60629, 57893, 57893, 57893, 58796, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59424, 57943, 58973, 57943, 57943, 57943, 57943, 57943, 58985, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60053, 57943, 57943, 57943, 57943, 57943, 57943, 0, 1873, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1743, 1744, 57943, 60460, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60726, 57943, 61135, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61257, 528, 528, 528, 61636, 57893, 57893, 57893, 61638, 57916, 57916, 57916, 61640, 57943, 57943, 57943, 0, 0, 0, 0, 3471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1868, 0, 0, 0, 0, 0, 0, 0, 431, 131072, 0, 431, 431, 0, 0, 0, 431, 446, 0, 431, 0, 0, 0, 0, 3663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1289, 0, 0, 0, 0, 431, 476, 476, 476, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 535, 57901, 535, 57901, 535, 535, 57901, 535, 535, 57924, 57901, 535, 535, 57901, 57901, 57901, 57901, 57951, 57951, 57901, 57901, 57901, 57901, 57951, 57951, 57901, 535, 57901, 57901, 57924, 57901, 57901, 57901, 57901, 57901, 57901, 57901, 57924, 57924, 57901, 57901, 57951, 57901, 57901, 57901, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 528, 528, 528, 528, 58773, 1986, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59353, 57893, 57893, 57893, 57893, 57893, 0, 0, 0, 2327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 773, 0, 0, 776, 2351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1774, 57893, 57893, 59892, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59900, 57893, 57893, 0, 0, 0, 2805, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 800, 0, 0, 528, 3175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1790, 0, 0, 3431, 0, 0, 0, 0, 0, 3437, 0, 0, 0, 0, 0, 0, 0, 331, 0, 139264, 147456, 0, 0, 0, 0, 0, 3482, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1372, 57893, 57893, 57893, 57893, 60883, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60893, 60908, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60396, 60935, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60944, 57916, 57916, 60947, 57916, 57916, 57893, 59528, 57943, 59530, 57943, 59531, 57943, 59533, 57943, 59535, 57943, 57943, 57943, 59539, 57916, 60950, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59012, 57943, 57943, 60977, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60986, 57943, 57943, 60989, 57943, 57943, 57943, 57943, 57943, 60966, 57943, 57943, 57943, 57943, 57943, 60972, 57943, 57943, 60975, 57943, 57943, 57943, 57943, 57943, 60750, 57943, 57943, 57943, 57943, 528, 528, 528, 57893, 57893, 57893, 0, 0, 0, 0, 0, 0, 0, 3660, 528, 528, 528, 528, 3716, 528, 3718, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3491, 528, 528, 528, 528, 528, 528, 57893, 57893, 61070, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59385, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61082, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61088, 57893, 61090, 57943, 61146, 57943, 61148, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 57893, 0, 0, 0, 528, 528, 528, 528, 3854, 528, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 58277, 57893, 57893, 58293, 57893, 57893, 61216, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61229, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61235, 57916, 57916, 57916, 57916, 57916, 61467, 57916, 57916, 61469, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60449, 57943, 57943, 60453, 57943, 57943, 57943, 57943, 57943, 61248, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61254, 57943, 57943, 57943, 57943, 57943, 57943, 58980, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60734, 57943, 57943, 57943, 57943, 57943, 57916, 61625, 61626, 57916, 57916, 57943, 57943, 61629, 61630, 57943, 57943, 0, 0, 0, 0, 528, 528, 528, 528, 4275, 528, 57893, 57893, 57893, 57893, 61623, 57893, 57916, 0, 761, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1789, 0, 761, 0, 0, 0, 0, 0, 761, 761, 0, 0, 828, 0, 0, 0, 0, 0, 0, 738, 0, 644, 738, 0, 742, 743, 644, 0, 0, 528, 528, 852, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2919, 528, 528, 528, 528, 911, 57893, 57893, 57893, 57893, 58271, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58862, 57893, 57893, 57893, 50676, 58773, 990, 57916, 58871, 58406, 0, 0, 0, 0, 57893, 57943, 57943, 57943, 57943, 58422, 57943, 57943, 57943, 57943, 57943, 57943, 58981, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60985, 57943, 57943, 57943, 57943, 57943, 528, 911, 0, 58271, 57893, 57893, 57893, 57893, 58330, 155942, 1151, 0, 0, 0, 0, 0, 0, 751, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 319, 0, 0, 0, 1279, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2337, 0, 57943, 59035, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59028, 57943, 528, 528, 528, 1983, 58773, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59418, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59427, 50676, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60377, 57916, 57916, 57916, 57916, 59527, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60746, 57943, 59623, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 0, 0, 0, 0, 0, 0, 0, 3142, 0, 0, 0, 0, 0, 0, 0, 752, 0, 0, 0, 0, 0, 0, 758, 0, 59861, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59889, 57916, 57916, 57916, 57916, 59950, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60675, 57916, 57916, 60678, 57943, 57943, 57943, 57943, 60033, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60042, 57943, 57943, 57943, 3812, 528, 57893, 61158, 57893, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 386, 57916, 57916, 57916, 57916, 61240, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61255, 57943, 57943, 57943, 57943, 61259, 57943, 528, 528, 57893, 57893, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3146, 0, 0, 0, 0, 0, 334, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 334, 385, 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, 0, 0, 0, 0, 3672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1786, 0, 0, 0, 0, 334, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 334, 0, 0, 139264, 147456, 0, 0, 0, 0, 0, 425, 425, 0, 0, 131072, 425, 0, 0, 0, 0, 425, 0, 447, 0, 0, 425, 335, 477, 477, 477, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 511, 519, 519, 519, 519, 519, 526, 519, 519, 519, 526, 519, 519, 519, 519, 519, 519, 536, 57902, 536, 57902, 536, 536, 57902, 536, 536, 57925, 57902, 536, 536, 57902, 57902, 57902, 57902, 57952, 57952, 57902, 57902, 57902, 57902, 57952, 57952, 57902, 536, 57902, 57902, 57925, 57902, 57902, 57902, 57902, 57902, 57902, 57902, 57925, 57925, 57902, 57902, 57952, 57902, 57902, 57902, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 780, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2789, 2790, 0, 0, 795, 0, 0, 0, 0, 0, 0, 0, 799, 0, 0, 0, 0, 0, 0, 0, 2330, 0, 0, 0, 0, 0, 0, 0, 0, 1238, 0, 0, 0, 0, 0, 0, 0, 819, 0, 0, 0, 0, 0, 819, 819, 0, 0, 0, 0, 799, 0, 0, 0, 0, 0, 1750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2850, 0, 0, 0, 0, 0, 0, 0, 0, 835, 795, 0, 0, 835, 0, 0, 0, 0, 0, 0, 0, 528, 528, 528, 4154, 528, 528, 528, 528, 528, 528, 528, 3234, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3942, 528, 528, 528, 528, 528, 528, 528, 528, 528, 855, 528, 864, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3944, 528, 528, 528, 528, 528, 528, 528, 912, 57893, 57893, 57893, 57893, 57893, 58274, 57893, 58283, 57893, 57893, 57893, 57893, 57893, 59395, 59396, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59897, 57893, 57893, 57893, 57893, 57893, 57893, 58350, 57916, 58359, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58401, 57916, 57916, 58407, 0, 0, 0, 0, 57893, 57943, 57943, 57943, 57943, 57943, 58425, 57943, 58434, 57943, 57943, 528, 1354, 528, 528, 528, 528, 58793, 57893, 57893, 57893, 57893, 57893, 1151, 0, 1143, 912, 0, 57893, 57893, 57893, 57893, 58493, 58331, 155942, 1151, 0, 0, 0, 0, 0, 0, 790, 0, 802, 0, 816, 0, 0, 0, 0, 810, 1246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1821, 0, 0, 0, 1308, 0, 0, 0, 0, 0, 0, 0, 0, 1313, 0, 0, 0, 0, 0, 1796, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1211, 368, 368, 0, 0, 1214, 528, 528, 528, 1350, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1369, 528, 528, 0, 0, 0, 2933, 0, 1986, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59884, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 528, 1409, 528, 528, 1413, 528, 528, 528, 528, 528, 1420, 528, 528, 528, 1427, 528, 528, 0, 57893, 57893, 57893, 58315, 57893, 57893, 155942, 1151, 0, 0, 0, 0, 0, 0, 0, 6324224, 4358144, 4358144, 5005312, 4358144, 4358144, 4358144, 5120000, 5136384, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6119424, 4358144, 6168576, 4358144, 4358144, 4358144, 4358144, 58773, 914, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58789, 57893, 57893, 57893, 57893, 57893, 61379, 57893, 61381, 61382, 57893, 61384, 57893, 61386, 57916, 57916, 57916, 57916, 57916, 60385, 57916, 57916, 57916, 57916, 57916, 57916, 60393, 57916, 57916, 57916, 57916, 57916, 60691, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59484, 57916, 57916, 57916, 57916, 57916, 57893, 57893, 58818, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59914, 57893, 57893, 57916, 58954, 57916, 57916, 57916, 58961, 57916, 0, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61140, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60969, 57943, 60971, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59038, 57943, 57943, 59042, 57943, 57943, 57943, 57943, 57943, 59049, 57943, 57943, 57943, 528, 528, 57893, 57893, 0, 0, 0, 0, 0, 0, 0, 0, 3923, 59056, 57943, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 1151, 0, 0, 0, 0, 4003, 3675, 0, 0, 0, 0, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 528, 1345, 1844, 1845, 0, 1847, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 806, 0, 0, 0, 0, 1861, 0, 1863, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 839, 0, 0, 528, 0, 0, 0, 1875, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 990, 0, 0, 0, 0, 0, 1861, 0, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 528, 528, 3223, 528, 528, 528, 528, 528, 528, 1949, 528, 528, 528, 528, 528, 528, 528, 528, 1958, 528, 528, 528, 528, 528, 2478, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1421, 528, 528, 528, 528, 528, 528, 528, 528, 1967, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1977, 1979, 57893, 57893, 59392, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59401, 57893, 57893, 57893, 57893, 57893, 59414, 57893, 57893, 57893, 57893, 57893, 57893, 59420, 57893, 57893, 57893, 57893, 57893, 59410, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59421, 59423, 57893, 57893, 57893, 57893, 57893, 61453, 57893, 57893, 61455, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 59482, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59983, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59492, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59501, 57916, 57916, 57916, 57916, 57916, 57916, 60940, 60942, 57916, 57916, 57916, 57916, 60946, 57916, 60948, 60949, 57916, 59510, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59521, 59523, 57916, 57916, 57916, 57916, 57916, 61570, 57916, 61571, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60416, 57943, 57943, 57943, 59588, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59597, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59043, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58988, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59606, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59617, 59619, 57943, 57943, 57943, 528, 528, 57893, 57893, 0, 0, 0, 0, 0, 3921, 0, 0, 0, 0, 0, 1812, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1839, 0, 0, 0, 0, 0, 0, 0, 2340, 0, 0, 0, 0, 0, 2346, 0, 0, 0, 0, 0, 0, 0, 372, 0, 0, 0, 380, 382, 0, 0, 0, 0, 0, 0, 2354, 0, 0, 0, 0, 0, 0, 0, 0, 2362, 0, 0, 0, 0, 0, 1835, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 528, 528, 528, 528, 2424, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3722, 528, 528, 528, 528, 528, 528, 528, 2436, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2930, 528, 528, 528, 2463, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3240, 3241, 0, 0, 0, 57893, 57893, 57893, 57893, 57893, 57893, 59855, 57893, 57893, 57893, 57893, 57893, 57893, 0, 0, 57916, 60658, 57916, 57916, 57916, 57916, 57916, 57916, 58940, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59518, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60003, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58951, 57916, 57916, 57916, 57916, 60018, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 60027, 57943, 57943, 528, 1355, 528, 528, 528, 528, 58794, 57893, 57893, 57893, 57893, 57893, 1151, 0, 57943, 60086, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59570, 57943, 57943, 57943, 57943, 60101, 57943, 57943, 57943, 2436, 528, 528, 528, 528, 59867, 57893, 57893, 57893, 0, 0, 0, 0, 57916, 59939, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60927, 57916, 60929, 57916, 57916, 57916, 57916, 57916, 57916, 0, 2793, 0, 2795, 0, 0, 0, 0, 0, 0, 0, 0, 2800, 0, 0, 2803, 0, 0, 2818, 0, 0, 0, 0, 0, 0, 0, 2826, 0, 0, 0, 0, 2828, 0, 2842, 0, 0, 2845, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2855, 0, 0, 528, 2869, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2918, 528, 528, 57893, 57893, 57893, 57893, 60327, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 61099, 57916, 57916, 60336, 57893, 57893, 57893, 60339, 57893, 57893, 57893, 57893, 57893, 57893, 0, 0, 0, 0, 0, 0, 2772, 0, 0, 0, 0, 0, 0, 0, 0, 2359, 0, 0, 0, 0, 0, 0, 0, 0, 57916, 60345, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58894, 57916, 57916, 57943, 60433, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60438, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59549, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60067, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60444, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60452, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59595, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61543, 57943, 57943, 0, 0, 0, 0, 60459, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60468, 57943, 57943, 57943, 528, 528, 57893, 57893, 0, 0, 0, 3919, 0, 0, 3922, 0, 0, 60471, 57943, 57943, 57943, 57943, 57943, 57943, 3131, 528, 528, 528, 528, 60478, 57893, 57893, 57893, 0, 0, 0, 0, 59938, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59946, 3204, 0, 0, 0, 3206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1818, 0, 0, 0, 0, 528, 528, 528, 528, 3244, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3249, 528, 528, 528, 3252, 528, 3254, 528, 528, 528, 528, 528, 528, 528, 3258, 528, 528, 0, 0, 2503, 0, 0, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59858, 57893, 57893, 57893, 60632, 57893, 57893, 57893, 57893, 60635, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59924, 57893, 59926, 57893, 57893, 57893, 57893, 60641, 57893, 57893, 57893, 60644, 57893, 60646, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58843, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60651, 57893, 57893, 57893, 57893, 57893, 0, 0, 57916, 57916, 57916, 60659, 57916, 57916, 57916, 57916, 57916, 58905, 57916, 58907, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60362, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60664, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59458, 57916, 57916, 57916, 60680, 60681, 57916, 57916, 57916, 57916, 60684, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 60022, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61153, 57943, 57943, 57943, 57943, 57943, 57943, 528, 57916, 57916, 57916, 57916, 60690, 57916, 57916, 57916, 60693, 57916, 60695, 57916, 57916, 57916, 57916, 57916, 57916, 61105, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58944, 57916, 57916, 57916, 57916, 57916, 58952, 57916, 57916, 57916, 60700, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 60708, 57943, 57943, 57943, 528, 528, 57893, 57893, 3918, 0, 0, 0, 3920, 0, 0, 0, 0, 0, 0, 3695, 0, 3697, 528, 528, 528, 528, 528, 528, 528, 1905, 528, 528, 528, 528, 528, 528, 528, 528, 2926, 528, 528, 528, 528, 528, 528, 528, 57943, 57943, 60713, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61144, 57943, 57943, 57943, 57943, 60729, 60730, 57943, 57943, 57943, 57943, 60733, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60036, 57943, 60038, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58984, 57943, 58989, 57943, 57943, 58993, 57943, 57943, 58996, 57943, 57943, 57943, 57943, 60749, 57943, 57943, 57943, 57943, 57943, 528, 528, 528, 57893, 57893, 57893, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3417, 0, 0, 3420, 3421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1827, 0, 0, 0, 0, 528, 528, 528, 528, 3486, 528, 528, 528, 528, 3490, 528, 528, 528, 528, 528, 528, 1952, 1953, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3517, 528, 528, 528, 528, 528, 57893, 528, 3496, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2931, 528, 3510, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 61204, 57893, 57893, 57893, 60870, 57893, 57893, 57893, 57893, 60874, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58863, 58864, 57893, 57893, 50676, 58773, 990, 57916, 57916, 60880, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59901, 57893, 60895, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58830, 57893, 57916, 57916, 57916, 57916, 60912, 57916, 57916, 57916, 57916, 60916, 57916, 57916, 57916, 57916, 57916, 57916, 58962, 0, 58963, 58964, 57943, 57943, 57943, 57943, 57943, 58971, 57916, 60922, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59472, 57916, 57916, 57916, 60937, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58927, 57916, 58929, 57916, 57943, 57943, 57943, 57943, 60954, 57943, 57943, 57943, 57943, 60958, 57943, 57943, 57943, 57943, 57943, 57943, 58982, 57943, 57943, 57943, 57943, 58992, 57943, 57943, 57943, 57943, 57943, 57943, 60964, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61256, 57943, 57943, 57943, 57943, 60979, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60974, 57943, 60976, 528, 528, 57893, 57893, 57893, 0, 0, 0, 0, 3819, 0, 0, 0, 0, 0, 3822, 0, 528, 528, 528, 528, 528, 528, 3844, 528, 528, 528, 528, 528, 528, 528, 528, 2481, 528, 528, 528, 528, 528, 2485, 2486, 57893, 57893, 61206, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59927, 57893, 57893, 57893, 57893, 61217, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 61225, 0, 0, 3675, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3934, 0, 0, 0, 0, 4080, 0, 0, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 4211, 528, 4212, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 61562, 57893, 61563, 57893, 57893, 57893, 57893, 57916, 57943, 4313, 4314, 61659, 61660, 61661, 0, 528, 57893, 57916, 57943, 0, 0, 0, 0, 0, 2382, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4284416, 0, 0, 0, 0, 0, 57943, 57943, 61578, 57943, 61579, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 0, 0, 528, 528, 4273, 4274, 528, 528, 57893, 57893, 61621, 61622, 57893, 57893, 57916, 0, 528, 528, 57893, 57893, 57916, 57916, 57943, 57943, 4303, 4304, 61649, 61650, 61651, 0, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2428, 528, 528, 528, 528, 528, 528, 4096, 528, 528, 4098, 57893, 57893, 57893, 57893, 57893, 57893, 58861, 57893, 57893, 57893, 57893, 50676, 58773, 990, 57916, 57916, 537, 57903, 537, 57903, 537, 537, 57903, 537, 537, 57926, 57903, 537, 537, 57903, 57903, 57903, 57903, 57953, 57953, 57903, 57903, 57903, 57903, 57953, 57953, 57903, 537, 57903, 57903, 57926, 57903, 57903, 57903, 57903, 57903, 57903, 57903, 57926, 57926, 57903, 57903, 57953, 57903, 57903, 57903, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 57893, 57893, 58833, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60649, 57893, 57893, 57916, 59948, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59489, 57916, 57943, 60031, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60044, 57943, 0, 384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2404, 0, 0, 340, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2854, 0, 0, 0, 406, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 406, 0, 0, 0, 432, 131072, 0, 432, 432, 0, 0, 0, 432, 0, 452, 432, 0, 0, 0, 0, 4206, 0, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2430, 528, 528, 432, 478, 478, 478, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 538, 57904, 538, 57904, 538, 538, 57904, 538, 538, 57927, 57904, 538, 538, 57904, 57904, 57904, 57904, 57954, 57954, 57904, 57904, 57904, 57904, 57954, 57954, 57904, 538, 57904, 57904, 57927, 57904, 57904, 57904, 57904, 57904, 57904, 57904, 57927, 57927, 57904, 57904, 57954, 57904, 57904, 57904, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 661, 0, 661, 0, 0, 0, 0, 826, 0, 0, 0, 661, 0, 0, 0, 0, 0, 5218304, 0, 0, 0, 0, 5799936, 0, 5881856, 0, 0, 0, 0, 0, 0, 5029888, 5038080, 0, 0, 5103616, 5201920, 0, 0, 0, 0, 0, 0, 1878, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2296, 0, 0, 0, 0, 0, 0, 842, 528, 528, 528, 857, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 898, 528, 528, 528, 528, 57893, 57893, 58260, 57893, 57893, 57893, 58276, 57893, 57893, 57893, 57893, 57893, 57893, 61220, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 0, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59022, 57943, 59024, 57943, 57943, 57943, 57943, 57943, 57916, 58352, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58393, 57916, 57916, 57916, 57916, 57916, 60913, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61471, 57943, 57943, 57943, 57943, 57943, 1160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1167, 1168, 0, 0, 0, 0, 0, 0, 1299, 0, 0, 0, 0, 0, 0, 0, 0, 528, 528, 1340, 528, 528, 528, 528, 528, 0, 0, 0, 1249, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1260, 1261, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2415, 0, 0, 2418, 528, 528, 528, 528, 1351, 1358, 528, 528, 528, 528, 528, 528, 528, 528, 1371, 528, 528, 0, 57893, 57893, 57893, 58317, 57893, 57893, 294, 1151, 0, 0, 1155, 0, 0, 0, 0, 0, 5857280, 0, 6463488, 4939776, 0, 0, 5455872, 0, 0, 0, 0, 0, 5554176, 5570560, 5578752, 5619712, 5668864, 0, 0, 0, 5791744, 5816320, 0, 5857280, 0, 1373, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1406, 1408, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1423, 528, 528, 528, 528, 528, 2910, 528, 528, 528, 528, 528, 528, 2917, 528, 528, 528, 528, 528, 2490, 528, 528, 528, 528, 528, 528, 528, 528, 528, 0, 0, 57893, 57893, 57893, 57893, 57893, 60612, 57893, 60613, 57893, 57893, 57893, 58773, 914, 57893, 58776, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58790, 58797, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58810, 57893, 58812, 57893, 57893, 57893, 57893, 57893, 59867, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59872, 57893, 57893, 57893, 57893, 57893, 57893, 58832, 57893, 58834, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58847, 57893, 57893, 57893, 57893, 57893, 59881, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59888, 57893, 57916, 57916, 57916, 58957, 57916, 57916, 57916, 0, 57893, 57943, 58965, 57943, 57943, 57943, 57943, 57943, 57943, 59548, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61154, 57943, 57943, 57943, 57943, 528, 58999, 57943, 59001, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59027, 57943, 57943, 57943, 57943, 59037, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59052, 57943, 57943, 57943, 57943, 57943, 61139, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60454, 57943, 57943, 57943, 57943, 1946, 528, 528, 528, 528, 528, 528, 528, 528, 1955, 528, 528, 528, 528, 528, 528, 1970, 528, 528, 528, 528, 528, 528, 1976, 528, 528, 528, 528, 1982, 528, 58773, 1986, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60648, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59346, 59347, 57893, 57893, 57893, 57893, 59354, 57893, 57893, 57893, 57893, 57893, 58315, 57893, 57893, 57893, 57893, 0, 57916, 57916, 57916, 57916, 57916, 57916, 60349, 57916, 57916, 57916, 57916, 60353, 57916, 57916, 57916, 57893, 59426, 57893, 50676, 2086, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60932, 57916, 60934, 57916, 57916, 57916, 57916, 59446, 59447, 57916, 57916, 57916, 57916, 59454, 57916, 57916, 57916, 57916, 57916, 57916, 59449, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60390, 57916, 57916, 57916, 57916, 57916, 57916, 59526, 57916, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59051, 57943, 57943, 57943, 59542, 59543, 57943, 57943, 57943, 57943, 59550, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60425, 57943, 57943, 57943, 57943, 57943, 57943, 0, 2313, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2322, 0, 0, 0, 0, 0, 0, 3208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3210, 3211, 0, 0, 0, 0, 0, 528, 528, 528, 528, 2477, 528, 528, 528, 528, 528, 528, 528, 2483, 528, 528, 528, 528, 528, 2924, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2496, 528, 528, 528, 0, 528, 528, 528, 2488, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 0, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 0, 0, 990, 57916, 57916, 57916, 57916, 57916, 60004, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60010, 57916, 57916, 57916, 57916, 57916, 58921, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60917, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 60087, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60093, 57943, 57943, 57943, 57943, 57943, 57943, 60967, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60040, 57943, 57943, 57943, 57943, 57943, 0, 0, 0, 2782, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1169, 1170, 1171, 1172, 3159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1871, 528, 528, 528, 3231, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3248, 528, 528, 528, 3262, 528, 0, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60614, 57893, 57893, 57893, 50676, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59441, 57893, 57893, 57893, 57893, 60622, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 61098, 57916, 57916, 57916, 57893, 57893, 57893, 57893, 60655, 57893, 0, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60928, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60663, 57916, 57916, 57916, 57916, 57916, 57916, 60671, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61118, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 60712, 57943, 57943, 57943, 57943, 57943, 57943, 60720, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61340, 57943, 57943, 528, 57893, 0, 0, 0, 57893, 57893, 57893, 61094, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 61232, 57916, 57916, 57916, 57916, 61233, 61234, 57916, 57916, 57916, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61513, 57893, 61515, 57893, 57893, 57893, 57893, 57893, 59894, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 0, 57916, 57916, 58335, 57916, 57916, 528, 528, 61559, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61567, 61624, 57916, 57916, 57916, 57916, 57943, 61628, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 528, 4272, 528, 528, 528, 528, 57893, 61620, 57893, 57893, 57893, 57893, 57916, 0, 389, 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2801, 0, 0, 463, 479, 479, 479, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 539, 57905, 539, 57905, 539, 539, 57905, 539, 539, 57928, 57905, 539, 539, 57905, 57905, 57905, 57905, 57955, 57955, 57905, 57905, 57905, 57905, 57955, 57955, 57905, 539, 57905, 57905, 57928, 57905, 57905, 57905, 57905, 57905, 57905, 57905, 57928, 57928, 57905, 57905, 57955, 57905, 57905, 57905, 1, 24578, 3, 155942, 156282, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 732, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3427, 0, 0, 0, 662, 0, 662, 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, 0, 0, 0, 0, 6225920, 4358144, 5062656, 4358144, 4358144, 4358144, 4358144, 4358144, 6225920, 0, 6086656, 528, 528, 528, 528, 858, 528, 528, 874, 528, 528, 528, 528, 528, 528, 528, 528, 2913, 528, 528, 528, 528, 528, 528, 528, 57916, 58353, 57916, 57916, 58369, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61575, 57943, 57943, 57943, 0, 1189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3451, 0, 0, 1318, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3480, 0, 0, 0, 1334, 0, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 528, 528, 2876, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1352, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2469, 528, 528, 528, 528, 528, 528, 1391, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3493, 528, 528, 528, 528, 1410, 528, 528, 528, 528, 528, 1418, 528, 528, 528, 528, 528, 528, 528, 1379, 528, 528, 528, 528, 528, 528, 528, 528, 1954, 528, 528, 1957, 528, 528, 528, 528, 58773, 914, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58791, 57893, 57893, 57893, 58857, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 50676, 58773, 990, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 60412, 57943, 60413, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58471, 57943, 57943, 57943, 57943, 528, 528, 528, 901, 57943, 57943, 57943, 57943, 59039, 57943, 57943, 57943, 57943, 57943, 59047, 57943, 57943, 57943, 57943, 57943, 57943, 59563, 59564, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61484, 0, 0, 4143, 4144, 0, 0, 0, 1727, 0, 0, 0, 0, 1734, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2370, 0, 0, 0, 0, 0, 0, 528, 1916, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1927, 528, 528, 0, 57893, 57893, 57893, 58319, 57893, 57893, 155942, 1151, 0, 302, 0, 0, 306, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 650, 0, 0, 0, 0, 0, 2351104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 59359, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59370, 57893, 57893, 57893, 50676, 0, 57916, 59433, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59440, 57916, 57943, 57943, 57943, 59544, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59555, 57943, 57943, 528, 1714, 528, 1716, 528, 528, 59063, 57893, 57893, 59065, 57893, 57893, 1151, 0, 57943, 57943, 57943, 59577, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61143, 57943, 57943, 0, 0, 2379, 2380, 0, 0, 0, 0, 0, 2386, 0, 0, 0, 0, 0, 0, 0, 2785, 0, 0, 0, 0, 0, 0, 0, 0, 1753, 0, 0, 0, 0, 0, 0, 0, 528, 2474, 528, 528, 528, 528, 2479, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1396, 528, 528, 528, 1403, 1405, 528, 2501, 0, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60878, 57893, 57893, 57893, 57893, 57893, 57893, 59906, 57893, 57893, 57893, 57893, 59911, 57893, 57893, 57893, 57893, 57893, 57893, 2999, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 61327, 57943, 57943, 61329, 57943, 57943, 57943, 57916, 59964, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59506, 57916, 57943, 60047, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60070, 60071, 57916, 57916, 57916, 57916, 61115, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58885, 58892, 57916, 57916, 57916, 0, 3925, 3675, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2838, 2839, 0, 3949, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58850, 57893, 57893, 57893, 61308, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58886, 57916, 57916, 57916, 57916, 4001, 0, 0, 0, 0, 3675, 0, 0, 0, 0, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 1895, 528, 528, 528, 4016, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61375, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 61461, 57916, 61391, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61407, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 0, 2316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3838, 0, 0, 0, 0, 0, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61566, 57916, 0, 0, 0, 0, 57893, 57943, 57943, 58410, 57943, 57943, 57943, 57943, 57943, 57943, 58443, 0, 0, 0, 390, 391, 393, 343, 0, 0, 0, 0, 0, 0, 342, 0, 0, 0, 343, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 390, 0, 0, 0, 0, 0, 0, 343, 0, 0, 0, 390, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 310, 0, 0, 0, 0, 1749, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540672, 0, 0, 0, 0, 0, 0, 480, 480, 480, 480, 496, 496, 496, 496, 496, 496, 496, 496, 496, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 540, 57906, 540, 57906, 540, 540, 57906, 540, 540, 57929, 57906, 540, 540, 57906, 57906, 57906, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 57929, 57906, 57906, 57906, 57906, 57906, 57906, 57906, 57929, 57929, 57906, 57942, 57956, 57942, 57942, 57942, 57942, 57956, 57956, 57942, 57942, 57942, 57942, 57956, 57956, 57942, 540, 57906, 57906, 368, 368, 0, 0, 0, 0, 0, 706, 0, 0, 0, 0, 0, 0, 0, 0, 740, 0, 0, 0, 0, 740, 0, 746, 715, 0, 717, 0, 0, 0, 0, 0, 0, 0, 725, 0, 0, 0, 0, 0, 0, 804, 0, 0, 0, 0, 0, 0, 804, 0, 528, 0, 0, 813, 0, 796, 0, 0, 815, 0, 667, 0, 792, 0, 0, 0, 0, 0, 836, 0, 0, 0, 0, 796, 663, 840, 0, 528, 0, 792, 815, 0, 815, 813, 0, 0, 0, 827, 0, 0, 0, 663, 830, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 444, 0, 0, 0, 0, 0, 690, 691, 0, 0, 0, 0, 696, 0, 0, 0, 368, 843, 528, 528, 528, 859, 528, 528, 875, 528, 528, 528, 528, 889, 528, 528, 528, 528, 528, 3245, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1398, 528, 528, 528, 528, 528, 907, 528, 528, 57893, 57893, 58261, 57893, 57893, 57893, 58278, 57893, 57893, 58294, 57893, 57893, 57893, 50676, 0, 59432, 57916, 59434, 57916, 59435, 57916, 59437, 57916, 59439, 57916, 57916, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59534, 57943, 57943, 57943, 57943, 57943, 57943, 59594, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60467, 57943, 57943, 57943, 57943, 57943, 57893, 57893, 58308, 57893, 57893, 57893, 57893, 58326, 57893, 57893, 0, 57916, 57916, 58337, 57916, 57916, 57916, 57916, 57943, 57943, 60411, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59044, 57943, 57943, 57943, 57943, 57943, 57943, 57916, 58354, 57916, 57916, 58370, 57916, 57916, 57916, 57916, 58384, 57916, 57916, 57916, 57916, 58402, 57916, 0, 0, 0, 0, 57893, 57943, 57943, 58411, 57943, 57943, 57943, 58427, 57943, 57943, 57943, 57943, 57943, 59005, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59008, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58459, 57943, 57943, 57943, 57943, 58477, 57943, 57943, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 1151, 0, 0, 0, 1170, 0, 0, 0, 0, 0, 0, 0, 1172, 0, 0, 0, 0, 0, 0, 806, 0, 0, 0, 0, 787, 0, 806, 0, 528, 1293, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1305, 0, 0, 0, 0, 0, 6307840, 0, 0, 6356992, 6381568, 6397952, 4800512, 4808704, 0, 0, 4890624, 0, 4947968, 0, 0, 0, 5046272, 0, 0, 0, 0, 5185536, 0, 5234688, 5300224, 0, 0, 0, 0, 1210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1305, 0, 0, 0, 0, 0, 2343, 0, 0, 0, 0, 0, 2347, 0, 0, 2349, 0, 0, 1333, 0, 0, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1353, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2901, 528, 528, 528, 528, 528, 528, 1377, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3724, 528, 528, 58773, 914, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58792, 0, 0, 1777, 0, 0, 1780, 0, 1782, 0, 0, 0, 0, 0, 0, 0, 0, 753, 0, 0, 0, 0, 0, 0, 0, 0, 1833, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3667, 3668, 528, 1898, 528, 528, 528, 528, 528, 528, 528, 528, 1909, 528, 528, 528, 528, 528, 868, 528, 528, 528, 528, 528, 887, 528, 528, 528, 528, 59341, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59352, 57893, 57893, 57893, 57893, 57893, 57893, 58325, 57893, 57893, 57893, 0, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 59578, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60056, 57943, 57943, 57943, 0, 2394, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2405, 0, 528, 528, 528, 2422, 2423, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1366, 528, 528, 528, 528, 528, 0, 0, 0, 57893, 57893, 57893, 59852, 57893, 59854, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59349, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60647, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59903, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59405, 57893, 0, 2780, 0, 0, 2783, 0, 0, 0, 0, 0, 0, 2788, 0, 0, 0, 2791, 2792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2802, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 448, 0, 0, 0, 0, 0, 2307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3674, 0, 0, 0, 0, 0, 0, 2817, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3677, 0, 0, 0, 2843, 0, 0, 0, 0, 0, 0, 0, 0, 2851, 0, 0, 0, 0, 0, 0, 3448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1287, 1288, 0, 0, 0, 0, 0, 0, 2857, 0, 0, 0, 0, 2860, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2862, 0, 0, 0, 0, 0, 0, 2868, 0, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 2879, 528, 528, 2882, 2883, 528, 528, 528, 528, 528, 2888, 528, 2890, 528, 528, 528, 528, 528, 3487, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2468, 528, 528, 528, 528, 528, 528, 2894, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2900, 528, 528, 528, 528, 528, 1903, 1904, 528, 528, 528, 528, 1911, 528, 528, 528, 528, 528, 1935, 528, 528, 528, 1940, 528, 528, 528, 528, 528, 528, 2897, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3858, 528, 57893, 57893, 57893, 57893, 528, 528, 528, 528, 2908, 528, 528, 528, 528, 528, 528, 2916, 528, 528, 528, 528, 528, 2439, 528, 528, 528, 528, 2444, 528, 528, 528, 528, 528, 528, 61594, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61600, 57916, 528, 2921, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1387, 528, 57893, 60297, 57893, 60299, 57893, 57893, 57893, 57893, 60303, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59382, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59398, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60309, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60318, 57893, 57893, 57893, 0, 0, 0, 2593, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60704, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60957, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57893, 57893, 57893, 60326, 57893, 57893, 57893, 57893, 57893, 60331, 57893, 57893, 57893, 57893, 57893, 57893, 58837, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58851, 57893, 60355, 57916, 57916, 60358, 60359, 57916, 57916, 57916, 57916, 57916, 60364, 57916, 60366, 57916, 57916, 57916, 57916, 57916, 60925, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58884, 57916, 57916, 57916, 57916, 57916, 57916, 60370, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60376, 57916, 57916, 57916, 57916, 57916, 58960, 57916, 0, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60732, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60450, 57943, 57943, 57943, 57943, 57943, 57943, 60458, 57916, 57916, 60398, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59505, 57916, 57916, 57943, 57943, 57943, 60420, 57943, 57943, 60423, 60424, 57943, 57943, 57943, 57943, 57943, 60429, 57943, 60431, 57943, 57943, 57943, 57943, 60435, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60441, 57943, 57943, 57943, 57943, 57943, 61150, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 528, 3133, 528, 528, 57893, 57893, 60480, 57893, 0, 0, 3161, 3162, 3163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2311, 0, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 3182, 0, 3184, 0, 0, 0, 0, 0, 0, 3458, 0, 0, 0, 0, 0, 0, 0, 0, 0, 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 802, 0, 807, 0, 810, 3188, 0, 0, 0, 0, 3193, 0, 0, 3196, 0, 0, 0, 0, 0, 0, 0, 389, 0, 139264, 147456, 0, 0, 0, 0, 0, 528, 528, 3263, 0, 0, 60608, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61086, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60653, 57893, 57893, 60656, 0, 0, 60657, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58880, 57916, 57916, 57916, 58889, 57916, 57916, 57916, 57916, 57916, 57916, 60689, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59986, 57916, 57916, 57916, 57916, 60699, 57916, 57916, 60702, 57916, 57916, 60705, 60706, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60052, 57943, 57943, 57943, 57943, 57943, 57943, 60057, 57943, 60727, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59031, 57943, 57943, 57943, 60738, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58994, 57943, 57943, 57943, 57943, 57943, 57943, 60748, 57943, 57943, 60751, 57943, 57943, 60754, 3411, 528, 528, 60758, 57893, 57893, 57893, 50676, 2085, 57916, 57916, 57916, 57916, 57916, 59436, 57916, 57916, 57916, 57916, 57916, 57916, 60373, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60379, 57916, 3429, 0, 0, 0, 0, 3434, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3675, 0, 0, 0, 0, 0, 0, 0, 0, 528, 528, 0, 0, 0, 3470, 0, 0, 0, 0, 0, 0, 3477, 0, 0, 3479, 0, 0, 0, 0, 306, 0, 0, 0, 0, 0, 0, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2852, 0, 0, 0, 528, 528, 3484, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3259, 528, 3509, 528, 528, 3511, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 61446, 57893, 57893, 60868, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59928, 57893, 60894, 57893, 57893, 60896, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60877, 57893, 57893, 57893, 57916, 57916, 60910, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60012, 57916, 57916, 57916, 60936, 57916, 57916, 60938, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59485, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 60952, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59009, 57943, 57943, 57943, 57943, 57943, 60978, 57943, 57943, 60980, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60055, 57943, 57943, 57943, 60058, 3661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2312, 3679, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3691, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 450, 0, 0, 0, 0, 0, 3457, 0, 0, 0, 0, 3462, 0, 0, 0, 0, 3466, 3702, 3703, 528, 528, 528, 528, 3707, 3708, 528, 528, 528, 528, 528, 3712, 528, 528, 0, 2932, 0, 0, 0, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59859, 57893, 57893, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61073, 61074, 57893, 57893, 57893, 57893, 61078, 61079, 57916, 57916, 61102, 61103, 57916, 57916, 57916, 57916, 61107, 61108, 57916, 57916, 57916, 57916, 57916, 61112, 57943, 57943, 61136, 61137, 57943, 57943, 57943, 57943, 57943, 61141, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60436, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58476, 57943, 57943, 57943, 1139, 528, 528, 528, 57943, 57943, 61147, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 0, 0, 3817, 0, 0, 0, 0, 0, 0, 0, 0, 1165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3834, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2865, 0, 0, 57916, 57916, 57916, 57916, 61230, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59486, 57916, 57916, 57916, 57916, 57943, 61249, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60096, 57943, 0, 0, 3675, 0, 3928, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2361, 0, 0, 0, 0, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61303, 57893, 57893, 57893, 50676, 2086, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61236, 61319, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 57943, 57943, 57943, 61335, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 57893, 0, 3999, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 450560, 0, 0, 0, 0, 0, 372, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2333, 0, 0, 0, 0, 2338, 0, 4002, 0, 0, 0, 3675, 0, 0, 0, 0, 0, 0, 0, 0, 528, 528, 528, 1341, 528, 528, 528, 528, 4014, 528, 528, 528, 528, 4019, 528, 528, 528, 528, 4024, 528, 528, 57893, 57893, 61373, 57893, 57893, 57893, 57893, 61378, 57893, 57893, 57893, 57893, 61383, 57893, 57893, 57893, 57916, 57916, 61389, 57916, 57916, 57916, 57916, 61394, 57916, 57916, 57916, 57916, 61399, 57916, 57916, 57916, 57943, 57943, 61405, 57943, 57943, 57943, 57943, 61410, 57943, 57943, 57943, 57943, 61415, 57943, 57943, 57943, 0, 0, 0, 0, 0, 2366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 352256, 0, 352256, 0, 0, 0, 0, 0, 0, 4078, 0, 0, 4081, 0, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 528, 528, 4246, 4247, 528, 528, 57893, 57893, 57893, 61596, 61597, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57943, 60410, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58481, 528, 852, 528, 528, 57916, 61602, 61603, 57916, 57916, 57916, 57943, 57943, 57943, 61608, 61609, 57943, 57943, 57943, 0, 0, 0, 0, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 0, 306, 0, 0, 0, 0, 345, 346, 347, 348, 349, 0, 0, 0, 0, 0, 0, 0, 0, 1181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 349, 348, 131072, 347, 348, 348, 0, 349, 347, 348, 0, 347, 348, 457, 464, 481, 481, 481, 492, 492, 492, 498, 492, 492, 498, 498, 492, 498, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 541, 57907, 541, 57907, 541, 541, 57907, 541, 541, 57930, 57907, 541, 541, 57907, 57907, 57907, 57907, 57957, 57957, 57907, 57907, 57907, 57907, 57957, 57957, 57907, 541, 57907, 57907, 57930, 57907, 57907, 57907, 57907, 57907, 57907, 57907, 57930, 57930, 57907, 57907, 57957, 57907, 57907, 57907, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 306, 307, 0, 0, 0, 0, 0, 0, 646, 0, 0, 0, 0, 651, 652, 653, 654, 655, 656, 657, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2388, 0, 0, 0, 0, 0, 0, 0, 672, 673, 0, 675, 676, 0, 0, 0, 0, 0, 682, 0, 0, 0, 0, 307, 0, 0, 0, 0, 0, 0, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 352256, 0, 0, 0, 0, 0, 0, 0, 716, 0, 0, 719, 0, 721, 0, 723, 0, 0, 0, 0, 0, 0, 0, 394, 0, 0, 0, 0, 0, 0, 0, 0, 1222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 733, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3172, 0, 0, 0, 0, 0, 763, 764, 0, 766, 767, 675, 0, 0, 0, 0, 0, 0, 0, 395, 0, 0, 0, 0, 0, 0, 0, 0, 2319, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 782, 783, 0, 785, 0, 0, 0, 0, 764, 0, 0, 791, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 245760, 0, 0, 0, 0, 245760, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3171, 0, 0, 0, 0, 692, 0, 0, 0, 764, 0, 0, 0, 0, 0, 0, 0, 0, 757, 821, 0, 0, 0, 757, 0, 0, 824, 699, 0, 0, 0, 829, 0, 0, 0, 831, 0, 0, 0, 692, 699, 0, 0, 692, 829, 829, 0, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 2874, 528, 528, 528, 528, 528, 528, 528, 3489, 528, 528, 528, 528, 528, 528, 528, 528, 3256, 528, 528, 528, 528, 528, 528, 528, 528, 849, 853, 856, 528, 865, 528, 528, 528, 881, 883, 886, 528, 528, 528, 899, 903, 528, 528, 528, 57893, 57893, 57893, 58268, 58272, 58275, 57893, 58284, 57893, 57893, 57893, 58300, 58302, 58305, 57893, 57893, 57893, 58318, 58322, 57893, 57893, 57893, 0, 57916, 57916, 57916, 58344, 58348, 58351, 57916, 58360, 57916, 57916, 57916, 58376, 58378, 58381, 57916, 57916, 57916, 58394, 58398, 57916, 57916, 57916, 57916, 58367, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59999, 57916, 57916, 57916, 57916, 0, 0, 0, 0, 58409, 57943, 57943, 57943, 58419, 58423, 58426, 57943, 58435, 57943, 57943, 528, 3649, 528, 57893, 60996, 57893, 0, 0, 0, 0, 0, 0, 0, 0, 1254, 0, 0, 0, 0, 0, 0, 0, 57943, 58451, 58453, 58456, 57943, 57943, 57943, 58469, 58473, 57943, 57943, 57943, 849, 1140, 528, 899, 903, 1144, 0, 58489, 58268, 57893, 58318, 58322, 58494, 155942, 1151, 0, 0, 0, 0, 0, 0, 1179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1239, 0, 0, 0, 0, 0, 0, 1278, 0, 0, 0, 0, 1283, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3675, 0, 3828, 0, 0, 0, 0, 0, 0, 1321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1198, 0, 0, 0, 528, 1375, 528, 528, 528, 1378, 528, 528, 528, 528, 528, 528, 528, 1385, 528, 528, 0, 2932, 0, 0, 0, 0, 57893, 57893, 57893, 57893, 57893, 57893, 60282, 57893, 1389, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1400, 528, 528, 1407, 58817, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58824, 57893, 57893, 58828, 57893, 57893, 57893, 57893, 57893, 59895, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59898, 59899, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 58934, 57916, 57916, 58941, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59984, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58955, 57916, 57916, 57916, 57916, 57916, 0, 57893, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61542, 57943, 57943, 57943, 0, 4202, 0, 0, 57943, 57943, 57943, 59003, 57943, 57943, 57943, 59006, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59013, 57943, 57943, 59017, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59029, 57943, 57943, 57943, 57943, 57943, 61337, 57943, 57943, 57943, 61341, 57943, 528, 57893, 0, 0, 0, 0, 3139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3149, 57943, 59036, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59050, 57943, 57943, 57943, 57943, 57943, 59019, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58482, 528, 528, 528, 528, 1822, 0, 1824, 0, 0, 0, 1826, 0, 746, 0, 0, 0, 0, 0, 0, 0, 399, 0, 0, 404, 0, 0, 0, 0, 0, 1872, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2350, 0, 1757, 0, 0, 0, 0, 0, 0, 528, 1891, 528, 528, 528, 528, 528, 528, 2440, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2495, 528, 528, 528, 528, 0, 1897, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1428, 528, 528, 528, 528, 1919, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1928, 528, 528, 528, 1932, 528, 528, 1937, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1419, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 58773, 0, 57893, 59333, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59340, 57893, 57893, 57893, 59362, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59371, 57893, 57893, 57893, 57893, 57943, 57943, 57893, 57893, 57893, 57893, 57943, 57943, 57893, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61075, 57893, 57893, 57893, 57893, 57893, 58821, 57893, 57893, 57893, 58825, 57893, 57893, 57893, 57893, 57893, 57893, 59348, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60875, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59375, 57893, 57893, 59380, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61457, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59462, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59471, 57916, 57916, 57916, 57916, 58368, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60011, 57916, 57916, 57916, 57916, 59475, 57916, 57916, 59480, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59972, 57916, 57916, 57916, 59975, 59558, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59567, 57943, 57943, 57943, 59571, 57943, 57943, 59576, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59569, 57943, 57943, 57916, 57916, 57916, 59990, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58948, 57916, 57916, 57916, 57943, 57943, 57943, 60073, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59010, 57943, 57943, 57943, 2804, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2376, 57916, 60409, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59030, 57943, 57943, 57943, 57943, 60474, 57943, 57943, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 2290, 0, 2291, 0, 0, 3214, 0, 0, 0, 528, 3218, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1383, 528, 528, 528, 528, 1388, 3242, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1962, 57893, 60633, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60335, 57893, 57916, 57916, 57916, 57916, 60682, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59998, 57916, 57916, 57916, 57916, 0, 0, 3419, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3425, 0, 0, 0, 0, 0, 2410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 417792, 309, 310, 0, 0, 0, 0, 3841, 528, 528, 528, 528, 528, 528, 528, 3846, 528, 528, 528, 528, 528, 528, 2465, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3943, 528, 3945, 528, 528, 528, 57893, 57893, 57893, 57893, 61208, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59369, 57893, 57893, 57893, 57893, 57916, 61227, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59524, 57916, 0, 0, 3675, 3927, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1266, 0, 0, 0, 528, 528, 528, 3937, 528, 528, 528, 528, 3941, 528, 528, 528, 528, 528, 3947, 528, 528, 0, 57893, 57893, 57893, 58320, 57893, 57893, 155942, 1151, 0, 0, 0, 0, 0, 0, 1751, 0, 0, 0, 0, 0, 0, 0, 0, 0, 754, 0, 0, 0, 0, 0, 0, 528, 528, 57893, 57893, 57893, 61296, 57893, 57893, 57893, 57893, 61300, 57893, 57893, 57893, 57893, 57893, 58317, 57893, 57893, 57893, 57893, 0, 57916, 57916, 58336, 57916, 57916, 61306, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 61312, 57916, 57916, 57916, 57916, 61316, 57916, 57916, 57916, 57916, 58371, 58373, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58945, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61322, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 61328, 57943, 57943, 57943, 57943, 57943, 57943, 60981, 57943, 60983, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60078, 57943, 57943, 57943, 57943, 60083, 57943, 57943, 61332, 57943, 57943, 57943, 57943, 57943, 61338, 57943, 57943, 57943, 57943, 528, 57893, 0, 0, 0, 0, 0, 2797, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1881, 0, 0, 0, 0, 0, 528, 528, 528, 4017, 528, 528, 528, 4021, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 58281, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61376, 57893, 57893, 57893, 61380, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 60939, 57916, 60941, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58881, 57916, 57916, 57916, 57916, 57916, 57916, 58896, 57916, 57916, 61392, 57916, 57916, 57916, 61396, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 61242, 57943, 57943, 57943, 61245, 57943, 57943, 57943, 57943, 61408, 57943, 57943, 57943, 61412, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 0, 2821, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1739, 0, 0, 0, 0, 0, 0, 4270, 0, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 61311, 57916, 57916, 61313, 57916, 57916, 57916, 57916, 57916, 57916, 59497, 57916, 57916, 59500, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61526, 57916, 61528, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60415, 57943, 57943, 57943, 57943, 0, 528, 528, 57893, 57893, 57916, 57916, 57943, 57943, 0, 528, 57893, 57916, 57943, 4308, 4309, 61654, 61655, 61656, 0, 528, 57893, 57916, 57943, 0, 528, 57893, 57916, 57943, 0, 0, 0, 0, 0, 2831, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1257, 0, 0, 0, 0, 1262, 0, 350, 0, 408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 408, 0, 350, 0, 139264, 147456, 0, 0, 0, 0, 0, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 542, 57908, 542, 57908, 542, 542, 57908, 542, 542, 57931, 57908, 542, 542, 57908, 57908, 57908, 57908, 57958, 57958, 57908, 57908, 57908, 57908, 57958, 57958, 57908, 623, 57908, 57974, 57931, 57908, 57908, 57908, 57908, 57908, 57908, 57908, 57931, 57931, 57908, 57908, 57958, 57908, 57908, 57908, 57974, 57974, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 131072, 0, 0, 0, 328, 0, 0, 330, 0, 0, 0, 0, 0, 0, 2847, 2848, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5808128, 0, 0, 0, 0, 4792320, 4833280, 844, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 890, 528, 528, 528, 528, 528, 3499, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3508, 528, 908, 528, 528, 57893, 57893, 58262, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61222, 57916, 57916, 57916, 57916, 57916, 57916, 57893, 57893, 58309, 57893, 57893, 57893, 57893, 58327, 57893, 57893, 0, 57916, 57916, 58338, 57916, 57916, 57916, 57916, 58877, 57916, 57916, 57916, 57916, 58883, 57916, 57916, 57916, 57916, 57916, 57916, 59993, 59994, 57916, 57916, 57916, 57916, 57916, 57916, 60001, 57916, 57943, 57943, 57943, 57943, 58460, 57943, 57943, 57943, 57943, 58478, 57943, 57943, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 1151, 1724, 1173, 0, 0, 0, 0, 1178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2310144, 0, 368, 0, 0, 0, 0, 0, 1173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2816, 528, 528, 528, 528, 1354, 528, 528, 528, 528, 1364, 528, 528, 528, 528, 528, 528, 2491, 528, 2493, 528, 528, 528, 528, 528, 528, 0, 58773, 914, 57893, 57893, 57893, 58779, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58793, 57916, 58874, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58888, 57916, 57916, 57916, 57916, 57916, 59448, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59459, 58898, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59961, 57916, 58914, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59987, 59988, 58953, 57916, 57916, 57916, 57916, 57916, 57916, 0, 57893, 57943, 57943, 57943, 58968, 57943, 57943, 57943, 57943, 57943, 59041, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59053, 59054, 0, 1728, 0, 0, 0, 0, 1735, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3424, 0, 0, 0, 0, 0, 0, 0, 0, 1761, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3185, 0, 0, 1775, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2840, 0, 0, 2353, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3201, 0, 0, 2449, 528, 528, 528, 528, 528, 528, 2454, 528, 2456, 528, 528, 528, 528, 528, 528, 2884, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2915, 528, 528, 528, 528, 528, 2502, 0, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61387, 57916, 57916, 57893, 57893, 57893, 59880, 57893, 57893, 57893, 57893, 57893, 57893, 59885, 57893, 59887, 57893, 57893, 57893, 0, 0, 2592, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61470, 57943, 57943, 57943, 57943, 57943, 57943, 59976, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60013, 57916, 60059, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59033, 528, 2906, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1960, 528, 57916, 57916, 60383, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60367, 57916, 57916, 0, 0, 3675, 0, 0, 0, 0, 3931, 0, 0, 3933, 0, 0, 0, 0, 0, 0, 1192, 0, 0, 0, 1196, 1197, 0, 0, 0, 0, 528, 3936, 528, 528, 3938, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3247, 528, 528, 528, 528, 528, 57893, 61295, 57893, 57893, 61297, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61456, 57916, 57916, 57916, 57916, 57916, 57916, 0, 0, 800, 0, 800, 0, 0, 0, 0, 0, 0, 0, 0, 800, 0, 0, 0, 0, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 0, 307, 0, 528, 528, 528, 528, 860, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3257, 528, 528, 3260, 57916, 58355, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60368, 57916, 1161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3174, 528, 528, 528, 528, 58773, 1987, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59910, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57943, 57943, 60445, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59585, 57943, 57943, 57893, 61081, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60639, 57893, 0, 0, 0, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1746, 0, 0, 0, 0, 0, 0, 352, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1756, 1757, 0, 0, 0, 0, 353, 351, 131072, 0, 351, 351, 0, 353, 0, 351, 0, 0, 351, 353, 351, 0, 0, 0, 351, 351, 351, 351, 351, 351, 351, 351, 505, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 543, 57909, 543, 57909, 543, 543, 57909, 543, 543, 57932, 57909, 543, 543, 57909, 57909, 57909, 57909, 57959, 57959, 57909, 57909, 57909, 57909, 57959, 57959, 57909, 543, 57909, 57909, 57932, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57932, 57932, 57909, 57909, 57959, 57909, 57909, 57909, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 811, 812, 0, 0, 0, 0, 0, 0, 758, 0, 0, 817, 0, 0, 0, 0, 0, 0, 4082, 0, 0, 0, 0, 528, 528, 528, 528, 528, 3221, 528, 3222, 528, 528, 528, 528, 0, 817, 0, 664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1787, 0, 0, 0, 832, 0, 0, 0, 0, 0, 0, 812, 0, 0, 0, 0, 0, 0, 0, 528, 528, 528, 528, 528, 2873, 528, 528, 528, 528, 2877, 528, 528, 528, 0, 2503, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61087, 57893, 57893, 57893, 57893, 528, 850, 528, 528, 528, 866, 870, 528, 528, 528, 528, 528, 891, 893, 528, 528, 0, 2932, 0, 0, 0, 0, 57893, 57893, 57893, 60280, 57893, 60281, 57893, 57893, 57893, 50676, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59473, 904, 528, 528, 528, 57893, 57893, 58263, 58269, 57893, 57893, 57893, 58285, 58289, 57893, 57893, 57893, 0, 2590, 0, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59970, 57916, 57916, 57916, 57916, 57916, 57916, 57893, 57893, 58310, 58312, 57893, 57893, 58323, 57893, 57893, 57893, 0, 57916, 57916, 58339, 58345, 57916, 0, 0, 0, 0, 57893, 57943, 57943, 58412, 57943, 57943, 57943, 58429, 57943, 57943, 58445, 57916, 57916, 58361, 58365, 57916, 57916, 57916, 57916, 57916, 58386, 58388, 57916, 57916, 58399, 57916, 57916, 57916, 57916, 58904, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60945, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 58461, 58463, 57943, 57943, 58474, 57943, 57943, 57943, 850, 528, 893, 528, 528, 0, 58270, 58266, 58491, 58314, 57893, 57893, 155942, 1151, 0, 0, 1154, 0, 0, 0, 0, 0, 245760, 245760, 245760, 245760, 245760, 245760, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 904, 528, 0, 57893, 58269, 58312, 57893, 58323, 57893, 155942, 1151, 0, 302, 0, 0, 306, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1772, 0, 0, 0, 0, 0, 1217, 0, 1219, 0, 1221, 0, 0, 0, 0, 0, 0, 0, 0, 1286, 0, 0, 0, 0, 0, 0, 0, 0, 1247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3839, 0, 1332, 0, 0, 0, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3850, 528, 528, 1374, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2461, 528, 528, 528, 1412, 528, 528, 528, 528, 528, 528, 528, 528, 1424, 1425, 528, 528, 0, 57893, 57893, 57893, 57893, 57893, 57893, 294, 1151, 0, 0, 0, 0, 0, 0, 0, 5480448, 4358144, 4358144, 4358144, 4358144, 4857856, 4874240, 4358144, 4358144, 58773, 914, 57893, 57893, 57893, 57893, 58780, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60289, 57893, 57893, 57893, 57893, 57893, 60294, 57893, 57916, 57916, 58875, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60378, 57916, 57916, 57916, 57916, 58932, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58946, 57916, 57916, 57916, 57916, 57916, 57916, 61241, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61246, 57943, 57916, 57916, 57916, 58958, 58959, 57916, 57916, 0, 57893, 57943, 57943, 57943, 57943, 58969, 57943, 57943, 3648, 528, 528, 60995, 57893, 57893, 0, 0, 0, 0, 0, 0, 0, 0, 1815, 0, 0, 0, 0, 0, 0, 0, 57943, 59000, 59002, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59602, 57943, 57943, 0, 1808, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212992, 0, 528, 528, 1966, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1975, 528, 528, 528, 528, 528, 3513, 3515, 528, 528, 528, 3518, 528, 3520, 3521, 528, 57893, 528, 1981, 528, 528, 58773, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59338, 57893, 57893, 57893, 50676, 2087, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60674, 57916, 57916, 57916, 57916, 57893, 59409, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59419, 57893, 57893, 57893, 57893, 57893, 59907, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 0, 57916, 57916, 58340, 57916, 57916, 59425, 57893, 57893, 50676, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59438, 57916, 57916, 57916, 57916, 57916, 61116, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61124, 57916, 59509, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59519, 57916, 57916, 57916, 57916, 59525, 57943, 57943, 59559, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59620, 57943, 57943, 2393, 0, 2395, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2403, 0, 0, 0, 0, 343, 390, 0, 0, 0, 139264, 147456, 0, 0, 0, 423, 0, 0, 0, 2408, 2409, 0, 0, 0, 0, 0, 2413, 0, 0, 0, 0, 0, 0, 0, 3153, 0, 0, 0, 0, 0, 0, 0, 0, 378, 0, 0, 0, 0, 0, 0, 0, 0, 2419, 528, 528, 528, 528, 528, 528, 2426, 528, 528, 528, 528, 528, 528, 528, 1394, 528, 528, 528, 528, 528, 528, 528, 528, 2886, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2450, 528, 528, 528, 528, 528, 528, 528, 528, 2457, 528, 2459, 528, 2462, 528, 528, 528, 2476, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 61371, 57893, 57893, 0, 0, 0, 59849, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59857, 57893, 57893, 57893, 57893, 57893, 60301, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60306, 57893, 57893, 59890, 57893, 59893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60304, 57893, 57893, 57893, 57893, 59902, 57893, 57893, 57893, 57893, 57893, 59908, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60330, 57893, 57893, 57893, 60333, 60334, 57893, 57893, 57916, 57916, 59977, 57916, 59979, 57916, 59982, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60363, 57916, 60365, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59991, 57916, 57916, 57916, 57916, 57916, 59997, 57916, 57916, 57916, 57916, 57916, 57916, 61606, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 57943, 57943, 60060, 57943, 60062, 57943, 60065, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59007, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60074, 57943, 57943, 57943, 57943, 57943, 60080, 57943, 57943, 57943, 57943, 57943, 57943, 59612, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 4240, 0, 0, 0, 528, 0, 0, 0, 2819, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2827, 0, 0, 0, 0, 131072, 0, 0, 0, 357, 0, 0, 0, 0, 359, 0, 0, 400, 0, 0, 0, 0, 0, 139264, 147456, 400, 411, 0, 424, 411, 2841, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3187, 528, 2880, 528, 528, 528, 528, 528, 2885, 528, 528, 528, 528, 528, 528, 528, 528, 3502, 528, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 60310, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60628, 57893, 57893, 57893, 57893, 57916, 60356, 57916, 57916, 57916, 57916, 57916, 60361, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59953, 57916, 59955, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 60421, 57943, 57943, 57943, 57943, 57943, 60426, 57943, 57943, 57943, 57943, 57943, 57943, 60064, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59566, 57943, 57943, 57943, 57943, 57943, 57893, 60652, 57893, 57893, 57893, 57893, 0, 0, 57916, 57916, 57916, 57916, 57916, 60661, 57916, 60662, 57916, 57916, 57916, 57916, 60701, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 60710, 57943, 57943, 57943, 57943, 57943, 61481, 57943, 57943, 61483, 57943, 0, 0, 0, 0, 0, 0, 0, 2808, 0, 0, 0, 0, 0, 0, 0, 0, 350, 0, 0, 0, 0, 0, 0, 0, 60711, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59587, 528, 3483, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1978, 528, 60867, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59929, 57916, 60909, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60395, 57916, 57916, 57943, 60951, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60069, 57943, 57943, 0, 3670, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 278528, 0, 0, 0, 3675, 0, 0, 0, 3930, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3476, 0, 0, 0, 0, 0, 0, 3935, 528, 528, 528, 528, 3939, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3948, 528, 528, 61294, 57893, 57893, 57893, 57893, 61298, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60342, 57893, 57893, 0, 0, 0, 3000, 0, 57893, 61307, 57893, 57893, 57893, 61310, 57916, 57916, 57916, 57916, 61314, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 528, 528, 528, 3219, 528, 528, 528, 528, 528, 3224, 528, 528, 57916, 57916, 57916, 57916, 61323, 57916, 57916, 57916, 61326, 57943, 57943, 57943, 57943, 61330, 57943, 57943, 57943, 57943, 57943, 60089, 60090, 60091, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59615, 57943, 57943, 57943, 57943, 59621, 57943, 4090, 528, 528, 528, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 61447, 0, 0, 0, 4149, 0, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3851, 528, 528, 528, 528, 528, 4248, 528, 57893, 57893, 57893, 57893, 57893, 61598, 57893, 57893, 57916, 57916, 57916, 57916, 58919, 57916, 57916, 58923, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61572, 61573, 57916, 57916, 57943, 57943, 57943, 57943, 57916, 57916, 57916, 61604, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 61610, 57943, 57943, 0, 0, 0, 0, 363, 0, 0, 0, 0, 139264, 147456, 0, 0, 0, 0, 0, 0, 1307, 0, 528, 528, 1339, 528, 1342, 528, 528, 528, 4269, 0, 4271, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 0, 0, 0, 0, 57893, 57943, 57943, 58413, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61582, 0, 0, 0, 0, 0, 0, 528, 388, 0, 354, 0, 0, 0, 0, 0, 397, 398, 0, 399, 0, 0, 0, 0, 0, 0, 4208, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1380, 528, 528, 528, 528, 528, 528, 371, 379, 407, 0, 0, 0, 371, 0, 0, 354, 0, 0, 0, 371, 0, 410, 412, 0, 371, 399, 0, 0, 371, 379, 0, 139264, 147456, 399, 410, 0, 0, 410, 0, 0, 0, 433, 131072, 0, 433, 433, 443, 0, 0, 433, 0, 412, 433, 0, 0, 0, 0, 131072, 0, 0, 0, 438, 0, 0, 0, 0, 0, 311, 0, 0, 0, 0, 2796, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 450560, 450560, 0, 0, 0, 465, 0, 0, 0, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 515, 515, 515, 515, 515, 527, 515, 515, 515, 527, 515, 515, 515, 515, 515, 515, 544, 57910, 544, 57910, 544, 544, 57910, 544, 544, 57933, 57910, 544, 544, 57910, 57910, 57910, 57910, 57960, 57960, 57910, 57910, 57910, 57910, 57960, 57960, 57910, 624, 57910, 57975, 57933, 57910, 57910, 57910, 57910, 57910, 57910, 57910, 57933, 57933, 57910, 57910, 57960, 57910, 57910, 57910, 57975, 57975, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 131072, 0, 0, 0, 441, 342, 0, 0, 0, 453, 0, 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2853, 0, 0, 0, 306, 307, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3687, 0, 0, 0, 0, 0, 0, 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3428, 845, 528, 528, 528, 528, 528, 528, 876, 878, 528, 528, 528, 528, 528, 528, 528, 1415, 528, 528, 528, 528, 528, 528, 1426, 528, 528, 528, 528, 528, 57893, 57893, 58264, 57893, 57893, 57893, 57893, 57893, 57893, 58295, 58297, 57893, 57893, 57893, 57893, 58803, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59384, 57893, 57893, 57893, 57893, 58448, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 2290, 1725, 2291, 0, 0, 0, 0, 0, 1309, 1335, 1336, 0, 1309, 528, 528, 528, 528, 528, 528, 1344, 528, 528, 528, 528, 528, 3706, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1974, 528, 528, 528, 528, 528, 528, 1348, 528, 528, 1359, 528, 528, 1363, 528, 528, 528, 528, 528, 528, 528, 1416, 528, 528, 528, 528, 528, 528, 528, 528, 3709, 528, 528, 528, 528, 528, 528, 528, 58773, 914, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58783, 57893, 57893, 57893, 58787, 57893, 57893, 57893, 57893, 57893, 60623, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58845, 57893, 57893, 57893, 57893, 57893, 58798, 57893, 57893, 58802, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60638, 57893, 57893, 57893, 57893, 57916, 58916, 57916, 57916, 57916, 58920, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59469, 57916, 57916, 57916, 57916, 57916, 58972, 57943, 57943, 57943, 58976, 57943, 57943, 58987, 57943, 57943, 58991, 57943, 57943, 57943, 57943, 57943, 57943, 60076, 60077, 57943, 57943, 57943, 57943, 57943, 57943, 60084, 57943, 59014, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59604, 1745, 1746, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 507904, 0, 0, 0, 0, 1778, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1828, 0, 0, 0, 1791, 0, 1793, 0, 0, 0, 1797, 0, 0, 0, 1801, 0, 0, 0, 1805, 0, 0, 0, 0, 131072, 0, 0, 0, 442, 0, 0, 0, 449, 0, 0, 0, 0, 0, 2846, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1224, 0, 0, 0, 0, 0, 1980, 528, 528, 528, 58773, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60625, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57943, 57943, 57943, 57943, 59545, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60068, 57943, 57943, 57943, 0, 0, 2314, 0, 2315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 262738, 0, 0, 0, 0, 2377, 0, 0, 0, 0, 0, 0, 2384, 0, 0, 0, 0, 0, 0, 0, 0, 1326, 1327, 0, 0, 1167, 0, 0, 0, 0, 528, 528, 2421, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 888, 528, 528, 528, 528, 528, 528, 528, 2489, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 0, 0, 57893, 57893, 57893, 57893, 60611, 57893, 57893, 57893, 57893, 57893, 57893, 59868, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58330, 0, 57916, 57916, 57916, 57916, 58347, 0, 0, 0, 57893, 57893, 59851, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60901, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60113, 0, 0, 1729, 0, 0, 1736, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 0, 0, 0, 0, 0, 2858, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2864, 0, 0, 0, 0, 0, 3152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3158, 57893, 57893, 57893, 57893, 60311, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60890, 57893, 60892, 57893, 57893, 60323, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60295, 60443, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60455, 57943, 57943, 57943, 57943, 57943, 59593, 57943, 57943, 59596, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59551, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59565, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59580, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59614, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60037, 57943, 57943, 60041, 57943, 57943, 57943, 60045, 0, 0, 3190, 0, 0, 0, 0, 3195, 0, 0, 0, 0, 0, 0, 0, 0, 1783, 1784, 1785, 0, 0, 0, 0, 0, 3250, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2472, 57893, 57893, 60642, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61385, 57893, 57916, 57916, 57916, 0, 3468, 3469, 0, 0, 0, 0, 3474, 0, 0, 0, 0, 0, 0, 0, 0, 1799, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3681, 0, 0, 0, 3684, 0, 0, 0, 0, 0, 0, 0, 0, 3692, 57893, 61092, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 4290, 528, 3813, 57893, 57893, 61159, 3816, 0, 0, 0, 0, 3820, 0, 0, 0, 0, 0, 0, 1236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2799, 0, 0, 0, 0, 0, 0, 0, 3833, 0, 0, 0, 0, 3837, 0, 0, 0, 0, 0, 0, 0, 0, 3840, 0, 528, 528, 528, 3842, 528, 528, 528, 3845, 528, 528, 528, 528, 528, 528, 528, 1938, 528, 528, 528, 528, 528, 528, 528, 528, 3235, 528, 528, 3238, 528, 528, 528, 528, 57893, 57893, 57893, 61207, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61084, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61226, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60407, 57916, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61302, 57893, 61304, 57893, 57893, 57893, 57893, 58819, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59913, 57893, 57893, 57893, 57893, 57916, 61320, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 4268, 0, 57943, 57943, 61334, 57943, 61336, 57943, 57943, 57943, 57943, 57943, 57943, 528, 57893, 0, 0, 0, 0, 0, 3164, 0, 0, 0, 0, 3169, 0, 0, 0, 0, 0, 0, 1220, 0, 0, 0, 0, 0, 1226, 0, 1228, 0, 4146, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 4160, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61516, 57893, 57893, 57893, 0, 2591, 0, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59996, 57916, 57916, 57916, 57916, 57916, 57916, 528, 528, 57893, 57893, 61560, 57893, 61561, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 0, 0, 0, 0, 57893, 57943, 57943, 58414, 58420, 57943, 57943, 57943, 58436, 58440, 57943, 57943, 57943, 57943, 57943, 61411, 57943, 61413, 61414, 57943, 61416, 57943, 61418, 0, 0, 0, 0, 0, 1849, 0, 0, 0, 0, 0, 0, 1748, 0, 0, 0, 0, 0, 1864, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2401, 0, 0, 0, 0, 0, 57916, 61568, 57916, 61569, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 61576, 57943, 57943, 57943, 57943, 57943, 61539, 57943, 61541, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 0, 0, 3435, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1273, 0, 0, 0, 0, 0, 0, 61577, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 0, 0, 0, 0, 528, 528, 528, 2871, 2872, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3237, 528, 528, 528, 528, 528, 358, 359, 360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 0, 296, 0, 0, 0, 0, 131072, 0, 352256, 352256, 0, 0, 0, 352256, 0, 0, 352256, 0, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 0, 482, 482, 482, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 516, 516, 520, 520, 520, 520, 520, 516, 520, 520, 520, 516, 520, 520, 520, 520, 520, 520, 545, 57911, 545, 57911, 545, 545, 57911, 545, 545, 57934, 57911, 545, 545, 57911, 57911, 57911, 57911, 57961, 57961, 57911, 57911, 57911, 57911, 57961, 57961, 57911, 625, 57911, 57976, 57934, 57911, 57911, 57911, 57911, 57911, 57911, 57911, 57934, 57934, 57911, 57911, 57961, 57911, 57911, 57911, 57976, 57976, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 245760, 0, 0, 245760, 0, 0, 245760, 0, 0, 245760, 0, 245760, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 516567, 516567, 516567, 0, 306, 307, 0, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 0, 0, 1837, 0, 0, 0, 0, 0, 0, 0, 0, 0, 687, 688, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 368, 0, 0, 0, 760, 0, 0, 0, 0, 765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4841472, 0, 0, 0, 4898816, 0, 794, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 803, 0, 808, 0, 0, 0, 0, 392, 0, 0, 0, 396, 392, 0, 0, 0, 0, 0, 0, 0, 2823, 0, 0, 0, 0, 0, 0, 0, 0, 677, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 820, 0, 0, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 0, 3436, 0, 0, 0, 0, 0, 0, 0, 0, 681, 0, 0, 0, 0, 0, 0, 680, 0, 0, 794, 0, 0, 0, 0, 0, 0, 0, 0, 644, 0, 0, 794, 528, 528, 528, 528, 528, 3717, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1381, 528, 528, 528, 528, 528, 846, 528, 528, 528, 528, 867, 871, 877, 528, 882, 528, 528, 528, 528, 528, 900, 528, 528, 528, 528, 57893, 57893, 58265, 57893, 57893, 57893, 57893, 58286, 58290, 58296, 57893, 58301, 57916, 57916, 58362, 58366, 58372, 57916, 58377, 57916, 57916, 57916, 57916, 57916, 58395, 57916, 57916, 57916, 57916, 57916, 61231, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60686, 57916, 57916, 57916, 57916, 57916, 57943, 58452, 57943, 57943, 57943, 57943, 57943, 58470, 57943, 57943, 57943, 57943, 528, 528, 528, 900, 1215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3441, 1264, 0, 0, 0, 0, 0, 1269, 0, 0, 0, 0, 0, 1274, 0, 0, 0, 0, 0, 3179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 679, 0, 0, 0, 0, 0, 0, 1294, 0, 0, 1165, 0, 0, 0, 1300, 0, 1302, 0, 0, 0, 0, 0, 0, 1284, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1301, 0, 0, 0, 0, 0, 0, 0, 1300, 1319, 0, 1322, 0, 0, 0, 1196, 0, 0, 0, 0, 1330, 0, 0, 1215, 1330, 1337, 528, 528, 528, 528, 1343, 528, 528, 528, 528, 1349, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1370, 528, 528, 0, 57893, 57893, 57893, 57893, 57893, 57893, 155942, 0, 0, 0, 0, 0, 0, 0, 1285, 0, 0, 0, 0, 1290, 0, 0, 0, 58773, 914, 58775, 57893, 57893, 57893, 57893, 57893, 58782, 57893, 57893, 57893, 57893, 58788, 57893, 57893, 57893, 57893, 57893, 60872, 57893, 57893, 57893, 57893, 57893, 60876, 57893, 57893, 57893, 57893, 57893, 58860, 57893, 57893, 57893, 57893, 57893, 50676, 58773, 990, 57916, 57916, 57916, 58917, 57916, 57916, 57916, 57916, 58922, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60403, 57916, 57916, 57916, 60406, 57916, 57916, 58930, 57916, 57916, 57916, 58937, 58939, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59957, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 58977, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58998, 57943, 59016, 57943, 57943, 57943, 57943, 57943, 59021, 57943, 57943, 57943, 59025, 57943, 57943, 57943, 59032, 59034, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59622, 57943, 59057, 528, 528, 528, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 1151, 0, 0, 0, 0, 385024, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5259264, 4358144, 4358144, 4358144, 4358144, 0, 0, 1729, 0, 0, 0, 0, 1736, 0, 0, 0, 0, 0, 0, 0, 0, 1880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1747, 1748, 0, 0, 0, 0, 0, 1754, 0, 0, 0, 0, 0, 0, 0, 3447, 0, 0, 0, 0, 0, 3450, 0, 3452, 0, 1776, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5177344, 0, 0, 0, 0, 0, 1794, 0, 0, 0, 0, 0, 0, 0, 1802, 1803, 0, 0, 0, 0, 0, 3207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3183, 0, 0, 0, 0, 0, 0, 0, 0, 1810, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1841, 0, 1843, 0, 0, 0, 1874, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3213, 0, 0, 528, 528, 528, 1901, 528, 528, 528, 528, 1907, 528, 528, 528, 528, 528, 528, 528, 2441, 528, 528, 528, 528, 528, 528, 528, 528, 3720, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1918, 528, 528, 528, 528, 1922, 528, 528, 528, 528, 528, 528, 528, 2466, 2467, 528, 528, 528, 528, 528, 528, 528, 1417, 528, 528, 528, 528, 528, 528, 528, 528, 3856, 528, 528, 528, 57893, 57893, 57893, 57893, 528, 528, 528, 528, 1968, 1969, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1924, 1925, 528, 528, 528, 528, 57893, 57893, 59344, 57893, 57893, 57893, 57893, 59350, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61212, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59361, 57893, 57893, 57893, 57893, 59365, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59883, 57893, 57893, 57893, 59886, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59378, 57893, 57893, 57893, 59383, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59909, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59915, 57893, 57893, 57893, 59412, 59413, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59921, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59351, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 59444, 57916, 57916, 57916, 57916, 59450, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60685, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59461, 57916, 57916, 57916, 57916, 59465, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60943, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59478, 57916, 57916, 57916, 59483, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60021, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60029, 57916, 57916, 59512, 59513, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59470, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 59546, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59557, 57943, 57943, 57943, 57943, 59561, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60082, 57943, 57943, 57943, 57943, 59574, 57943, 57943, 57943, 59579, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60735, 57943, 57943, 57943, 57943, 57943, 59608, 59609, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60095, 57943, 57943, 2302, 2303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5767168, 0, 2339, 0, 0, 2341, 2342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 335872, 0, 0, 0, 0, 528, 2434, 528, 528, 2438, 528, 528, 528, 2442, 528, 528, 528, 528, 528, 528, 528, 2912, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3857, 528, 528, 57893, 57893, 57893, 57893, 528, 528, 528, 528, 2452, 528, 528, 528, 2455, 528, 528, 528, 528, 528, 528, 528, 2925, 528, 528, 528, 2928, 528, 528, 528, 528, 528, 2487, 528, 528, 528, 528, 528, 2492, 528, 528, 528, 528, 528, 528, 528, 0, 0, 57893, 57893, 57893, 60610, 57893, 57893, 57893, 57893, 57893, 60615, 57893, 0, 2503, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60288, 57893, 57893, 60291, 60292, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59865, 57893, 57893, 59869, 57893, 57893, 57893, 59873, 57893, 57893, 57893, 57893, 57893, 60312, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60320, 57893, 57893, 59916, 57893, 57893, 57893, 57893, 59920, 57893, 57893, 57893, 57893, 57893, 59925, 57893, 57893, 57893, 57893, 57893, 60328, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58867, 50676, 58773, 990, 58870, 57916, 57916, 57916, 57916, 57916, 60005, 57916, 57916, 57916, 57916, 60009, 57916, 57916, 57916, 57916, 57916, 60014, 57943, 57943, 57943, 57943, 60088, 57943, 57943, 57943, 57943, 60092, 57943, 57943, 57943, 57943, 57943, 60097, 2856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2863, 0, 0, 0, 0, 0, 0, 212992, 0, 0, 0, 0, 0, 212992, 212992, 212992, 212992, 2893, 528, 528, 528, 528, 2896, 528, 528, 2898, 528, 2899, 528, 528, 528, 528, 528, 1356, 528, 1361, 528, 528, 1365, 528, 528, 1368, 528, 528, 528, 528, 528, 2907, 528, 528, 2911, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2494, 528, 528, 2497, 2498, 528, 0, 2920, 528, 528, 528, 2923, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3506, 3507, 528, 528, 57893, 60308, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60317, 57893, 57893, 60321, 57893, 57893, 57893, 57893, 58835, 57893, 57893, 57893, 58842, 58844, 57893, 57893, 57893, 57893, 57893, 57893, 59381, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60902, 57893, 57893, 60905, 57893, 57893, 57893, 0, 57916, 57916, 60346, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60354, 60369, 57916, 57916, 57916, 57916, 60372, 57916, 57916, 60374, 57916, 60375, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 4288, 0, 0, 0, 528, 57916, 57916, 57916, 57916, 60384, 57916, 57916, 60388, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60402, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59995, 57916, 57916, 57916, 57916, 60000, 57916, 57916, 57916, 60397, 57916, 57916, 57916, 60400, 60401, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60683, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59452, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 60419, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60469, 57943, 57943, 57943, 57943, 57943, 60434, 57943, 57943, 57943, 57943, 60437, 57943, 57943, 60439, 57943, 60440, 57943, 57943, 57943, 57943, 57943, 60422, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61155, 57943, 57943, 57943, 528, 57943, 57943, 57943, 57943, 60462, 57943, 57943, 57943, 60465, 60466, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60752, 57943, 57943, 528, 528, 528, 57893, 57893, 57893, 0, 0, 0, 0, 0, 3658, 0, 0, 3228, 528, 528, 528, 528, 3233, 528, 528, 528, 3236, 528, 528, 528, 528, 528, 528, 3255, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2482, 528, 528, 528, 528, 528, 3261, 528, 528, 0, 0, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60616, 57893, 60619, 57893, 57893, 57893, 57893, 60624, 57893, 57893, 57893, 60627, 57893, 57893, 57893, 57893, 57893, 58805, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 61460, 57916, 57893, 57893, 57893, 60654, 57893, 57893, 0, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60692, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59499, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60665, 57916, 60668, 57916, 57916, 57916, 57916, 60673, 57916, 57916, 57916, 60676, 57916, 57916, 57916, 57916, 58935, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58887, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 60714, 57943, 60717, 57943, 57943, 57943, 57943, 60722, 57943, 57943, 57943, 60725, 57943, 57943, 57943, 57943, 57943, 61580, 61581, 57943, 57943, 0, 0, 0, 0, 4242, 0, 528, 528, 528, 528, 528, 528, 528, 528, 2427, 528, 528, 528, 528, 2431, 528, 0, 3454, 0, 3455, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1883, 0, 0, 0, 528, 528, 528, 3485, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1384, 528, 528, 528, 528, 528, 3497, 528, 528, 528, 528, 528, 528, 528, 528, 3505, 528, 528, 528, 528, 528, 2453, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1382, 528, 528, 528, 1386, 528, 57893, 57893, 60869, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60637, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60314, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60341, 57893, 57893, 57893, 0, 2999, 0, 0, 0, 57893, 60881, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60889, 57893, 57893, 57893, 57893, 57893, 58820, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58829, 57893, 57893, 57916, 57916, 57916, 60911, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59503, 57916, 57916, 57916, 57916, 57916, 60923, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60931, 57916, 57916, 57916, 57916, 57916, 59481, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58911, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 60953, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60094, 57943, 57943, 57943, 57943, 57943, 57943, 60965, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60973, 57943, 57943, 57943, 57943, 57943, 60050, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60745, 57943, 57943, 57943, 0, 3680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3439, 0, 0, 0, 0, 0, 3693, 3694, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 528, 2875, 528, 528, 528, 528, 528, 528, 528, 528, 3704, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3494, 528, 528, 3714, 528, 528, 528, 528, 528, 3719, 528, 3721, 528, 528, 528, 528, 528, 528, 3488, 528, 528, 528, 528, 528, 3492, 528, 528, 528, 61091, 57893, 61093, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61131, 61132, 57943, 57943, 57916, 57916, 57916, 57916, 61104, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61110, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61114, 57916, 57916, 57916, 57916, 57916, 57916, 61120, 57916, 61122, 57916, 57916, 57916, 57916, 57916, 61324, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60970, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61149, 57943, 61151, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 2761, 528, 528, 528, 57893, 60110, 57893, 57893, 528, 528, 57893, 57893, 57893, 0, 0, 0, 3818, 0, 0, 0, 0, 0, 0, 0, 722, 0, 724, 0, 0, 0, 0, 0, 0, 0, 0, 3823, 0, 0, 0, 0, 0, 0, 0, 3675, 0, 0, 0, 0, 3831, 0, 528, 528, 528, 528, 528, 3843, 528, 528, 528, 3847, 528, 528, 528, 528, 528, 1357, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1422, 528, 528, 528, 528, 57893, 61205, 57893, 57893, 57893, 61209, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60886, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59896, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61218, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 61224, 57916, 0, 0, 0, 0, 57893, 57943, 57943, 58415, 57943, 57943, 57943, 57943, 57943, 57943, 58446, 57916, 57916, 61228, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60697, 57916, 57916, 57916, 61237, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 57943, 61243, 57943, 57943, 57943, 61247, 528, 4162, 57893, 57893, 57893, 61510, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61518, 57893, 57893, 57893, 57893, 58858, 57893, 57893, 57893, 57893, 57893, 57893, 50676, 58773, 990, 57916, 57916, 57916, 57916, 58903, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 58913, 57916, 57916, 57916, 57916, 61523, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61531, 57916, 57943, 57943, 57943, 57943, 57943, 60955, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59581, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61536, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 61544, 57943, 0, 0, 0, 0, 0, 0, 262144, 262144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4203, 4204, 4205, 0, 4207, 528, 528, 528, 528, 528, 528, 528, 528, 528, 4213, 4214, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61564, 61565, 57893, 57893, 57916, 0, 0, 0, 0, 57893, 57943, 57943, 58416, 57943, 57943, 57943, 57943, 58437, 58441, 58447, 528, 528, 528, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 4298, 0, 528, 4299, 57893, 61644, 57916, 61645, 57943, 61646, 0, 528, 57893, 57916, 57943, 0, 528, 528, 528, 528, 528, 528, 2425, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3246, 528, 528, 528, 528, 528, 528, 0, 0, 0, 361, 362, 0, 0, 0, 0, 0, 0, 0, 368, 0, 296, 0, 0, 0, 0, 393685, 0, 393685, 393685, 393685, 0, 393685, 393685, 393685, 393685, 393685, 393685, 0, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 1731, 0, 0, 0, 0, 0, 0, 0, 1741, 1742, 0, 0, 0, 0, 0, 278528, 278528, 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, 416, 0, 0, 0, 0, 0, 426, 426, 0, 0, 131072, 426, 0, 0, 0, 0, 426, 0, 0, 454, 0, 426, 0, 483, 483, 483, 0, 0, 362, 362, 362, 502, 362, 362, 362, 362, 483, 483, 483, 483, 483, 483, 483, 483, 483, 483, 483, 483, 483, 483, 483, 483, 546, 57912, 546, 57912, 546, 546, 57912, 546, 546, 57935, 57912, 546, 546, 57912, 57912, 57912, 57912, 57962, 57962, 57912, 57912, 57912, 57912, 57962, 57962, 57912, 546, 57912, 57912, 57935, 57912, 57912, 57912, 57912, 57912, 57912, 57912, 57935, 57935, 57912, 57912, 57962, 57912, 57912, 57912, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 368, 368, 0, 703, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2298, 0, 0, 0, 905, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58287, 57893, 57893, 57893, 57893, 57893, 60340, 57893, 57893, 57893, 57893, 57893, 0, 2999, 0, 0, 0, 57893, 58306, 57893, 57893, 57893, 57893, 58324, 57893, 57893, 57893, 0, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 61129, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60741, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60753, 57943, 528, 528, 528, 57893, 57893, 57893, 57916, 57916, 58363, 57916, 57916, 57916, 57916, 57916, 58382, 57916, 57916, 57916, 57916, 58400, 57916, 57916, 57916, 57916, 58936, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60392, 57916, 57916, 57916, 57916, 57916, 0, 0, 0, 0, 58306, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58438, 57943, 57943, 57943, 57943, 57943, 60448, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60427, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58457, 57943, 57943, 57943, 57943, 58475, 57943, 57943, 57943, 528, 528, 528, 528, 2284, 57893, 57893, 57893, 57893, 59633, 2290, 0, 2291, 0, 0, 905, 528, 0, 57893, 57893, 57893, 57893, 58324, 57893, 155942, 1151, 0, 1152, 0, 0, 1157, 0, 0, 0, 1266, 0, 0, 0, 0, 0, 0, 0, 1266, 0, 0, 0, 0, 0, 0, 450560, 0, 0, 450560, 0, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 1346, 528, 528, 528, 1355, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3711, 528, 528, 528, 58773, 914, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 58785, 57893, 57893, 57893, 58794, 57893, 57893, 58855, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 50676, 58773, 990, 57916, 57916, 57916, 57916, 58938, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61121, 57916, 57916, 57916, 57916, 57943, 57943, 58974, 57943, 57943, 57943, 58983, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59045, 57943, 57943, 57943, 57943, 57943, 57943, 0, 0, 0, 1730, 0, 0, 0, 0, 1737, 0, 0, 0, 0, 0, 0, 0, 739, 0, 0, 0, 0, 0, 0, 0, 0, 1271, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1762, 0, 0, 0, 0, 0, 0, 0, 1770, 1771, 0, 0, 0, 0, 0, 3422, 0, 0, 0, 0, 0, 0, 0, 3426, 0, 0, 0, 0, 0, 1834, 0, 0, 0, 0, 0, 0, 0, 1840, 0, 0, 0, 0, 0, 0, 532480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 694, 0, 0, 0, 0, 0, 368, 0, 0, 1846, 0, 1848, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 376832, 0, 376832, 0, 0, 1915, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2499, 528, 1930, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1943, 528, 528, 0, 57893, 57893, 57893, 57893, 57893, 57893, 155942, 1151, 0, 0, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 0, 0, 0, 0, 0, 796, 0, 0, 0, 0, 805, 0, 0, 0, 59373, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59386, 57893, 57893, 57893, 2588, 0, 0, 0, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60352, 57916, 57916, 57916, 57916, 57916, 57893, 57893, 59411, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59422, 57893, 57893, 57893, 57893, 57893, 60884, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60903, 57893, 57893, 57893, 57893, 57893, 57916, 59511, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59522, 57916, 57916, 57916, 57916, 57916, 61395, 57916, 61397, 61398, 57916, 61400, 57916, 61402, 57943, 57943, 57943, 3916, 528, 61261, 57893, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2774, 0, 0, 0, 0, 59607, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59618, 57943, 57943, 57943, 57943, 57943, 58978, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 58997, 0, 0, 2326, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221652, 221652, 221652, 0, 0, 2504, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61097, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 528, 3229, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2447, 528, 60618, 57893, 60620, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61211, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59870, 57893, 57893, 57893, 57893, 59875, 57893, 57893, 57916, 57916, 57916, 60667, 57916, 60669, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60404, 57916, 57916, 57916, 57916, 57916, 60698, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 60709, 57943, 57943, 57943, 57943, 57943, 60463, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59599, 57943, 57943, 57943, 59605, 57943, 57943, 57943, 57943, 60716, 57943, 60718, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59046, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60747, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 528, 528, 528, 57893, 57893, 57893, 0, 0, 0, 3656, 0, 0, 0, 0, 0, 0, 0, 3432, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2323, 2324, 0, 0, 57943, 57943, 61250, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60724, 57943, 57943, 0, 4147, 0, 0, 0, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 0, 4161, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61517, 57893, 57893, 57893, 57893, 57893, 60898, 60900, 57893, 57893, 57893, 57893, 60904, 57893, 60906, 60907, 57893, 57916, 57916, 57916, 61627, 57916, 57943, 57943, 57943, 57943, 61631, 57943, 0, 0, 0, 0, 528, 528, 2870, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2878, 373, 373, 0, 0, 131072, 373, 0, 0, 0, 0, 373, 0, 0, 0, 0, 373, 547, 57913, 547, 57913, 547, 547, 57913, 547, 547, 57936, 57913, 547, 547, 57913, 57913, 57913, 57913, 57963, 57963, 57913, 57913, 57913, 57913, 57963, 57963, 57913, 547, 57913, 57913, 57936, 57913, 57913, 57913, 57913, 57913, 57913, 57913, 57936, 57936, 57913, 57913, 57963, 57913, 57913, 57913, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 528, 528, 528, 528, 861, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 3723, 528, 528, 528, 57916, 58356, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60677, 57916, 57893, 58799, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 61221, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 60023, 57943, 57943, 57943, 57943, 57943, 57943, 528, 528, 1931, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1401, 528, 528, 57893, 59374, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59882, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60290, 57893, 57893, 57893, 57893, 57893, 57893, 59474, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60920, 57916, 0, 0, 0, 3824, 0, 3825, 0, 0, 0, 0, 3675, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1227, 0, 0, 0, 0, 0, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2335, 0, 0, 0, 365, 0, 0, 0, 0, 364, 0, 0, 0, 139264, 147456, 0, 0, 0, 0, 0, 0, 1324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 434, 131072, 0, 434, 434, 0, 0, 0, 434, 0, 365, 434, 0, 0, 0, 0, 401408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6471680, 0, 0, 0, 466, 0, 0, 0, 494, 494, 497, 497, 497, 497, 503, 504, 497, 497, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 548, 57914, 548, 57914, 548, 548, 57914, 548, 548, 57937, 57914, 548, 548, 57914, 57914, 57914, 57914, 57964, 57964, 57914, 57914, 57914, 57914, 57964, 57964, 57914, 626, 57914, 57977, 57937, 57914, 57914, 57914, 57914, 57914, 57914, 57914, 57937, 57937, 57914, 57914, 57964, 57914, 57914, 57914, 57977, 57977, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 459187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 528, 528, 528, 528, 528, 528, 528, 0, 528, 2420, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1402, 528, 528, 0, 0, 0, 57893, 59850, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60287, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60302, 57893, 57893, 57893, 57893, 60305, 57893, 57893, 60307, 528, 528, 528, 528, 2895, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 4026, 57893, 57893, 57893, 57893, 60337, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 0, 0, 0, 0, 0, 0, 1781, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 335872, 0, 0, 57916, 57916, 57916, 57916, 60371, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61401, 57916, 57943, 57943, 57943, 368, 368, 0, 0, 0, 0, 705, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 540672, 0, 0, 0, 0, 735, 0, 801, 0, 0, 0, 0, 0, 0, 0, 0, 801, 0, 0, 0, 0, 416, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3464, 0, 0, 0, 528, 528, 528, 528, 862, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 61203, 57893, 57893, 57893, 57916, 58357, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61111, 57916, 1202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 368, 0, 0, 0, 0, 0, 0, 0, 0, 709, 0, 0, 0, 0, 0, 0, 1251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2810, 0, 0, 0, 0, 0, 0, 58853, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 50676, 58773, 990, 57916, 57916, 57916, 57916, 59463, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60696, 57916, 57916, 57916, 57916, 59015, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 60442, 1726, 0, 0, 0, 0, 1733, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319488, 319488, 0, 0, 0, 0, 0, 57916, 57916, 57916, 59978, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59959, 57916, 57916, 57916, 57943, 57943, 57943, 60061, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59011, 57943, 57943, 57943, 2779, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245760, 528, 528, 2881, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1404, 528, 528, 57916, 57916, 60357, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 60919, 57916, 57916, 0, 306, 307, 0, 0, 0, 0, 0, 0, 0, 647, 0, 0, 0, 0, 0, 0, 1813, 0, 0, 0, 0, 0, 0, 0, 0, 0, 787, 0, 0, 0, 0, 0, 0, 906, 528, 528, 528, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 906, 528, 0, 57893, 58490, 57893, 57893, 58325, 57893, 155942, 1151, 0, 0, 0, 0, 0, 0, 1836, 0, 0, 1838, 0, 0, 0, 0, 0, 0, 0, 2861, 2813, 0, 0, 0, 0, 0, 2866, 0, 57893, 57893, 58856, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 50676, 58773, 990, 57916, 57916, 57916, 57916, 59495, 59496, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61574, 57943, 57943, 57943, 57943, 0, 0, 1862, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327680, 327680, 327680, 528, 528, 1948, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 1942, 528, 528, 57893, 59391, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60313, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59922, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59491, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61123, 57916, 57916, 0, 0, 0, 57893, 57893, 57893, 57893, 59853, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60329, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59367, 59368, 57893, 57893, 57893, 57893, 57893, 59877, 57893, 59879, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60636, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60316, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57916, 57916, 59966, 57916, 59968, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61117, 57916, 61119, 57916, 57916, 57916, 57916, 57916, 57916, 57943, 57943, 57943, 57943, 60049, 57943, 60051, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59552, 57943, 57943, 57943, 57943, 59556, 57943, 60381, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 61403, 57943, 57943, 57943, 57943, 57943, 60446, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 57943, 59554, 57943, 57943, 57943, 0, 3418, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 352256, 352256, 352256, 57893, 57893, 57893, 57893, 60871, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 60645, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 59923, 57893, 57893, 57893, 57893, 57893, 57893, 3713, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 2500, 57916, 57916, 61113, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 57916, 59973, 57916, 57916, 57916, 0, 0, 0, 2310144, 0, 0, 0, 0, 0, 0, 2310144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2310144, 0, 0, 2310144, 0, 0, 0, 0, 0, 0, 0, 2310144, 2310144, 0, 0, 0, 0, 0, 0, 0, 0, 2310144, 0, 0, 0, 2310144, 0, 0, 0, 0, 0, 2310144, 0, 2310144, 0, 0, 0, 0, 0, 0, 2310144, 2310561, 2310561, 0, 2310144, 0, 0, 2310144, 0, 0, 2310144, 0, 2310144, 2310144, 0, 2310144, 0, 2310144, 2310144, 0, 0, 0, 0, 0, 0, 2310561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2359296, 368, 0, 0, 0, 0, 2310144, 0, 0, 2310740, 2310740, 2310740, 2310740, 2310740, 2310740, 2310740, 2310740, 2310740, 2310740, 2310740, 2310740, 2310740, 2310144, 2310740, 2310144, 2310144, 2310740, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 459347, 459347, 459347, 459347, 459347, 459347, 459347, 459347, 459347, 459347, 459347, 459347, 459347, 459222, 459379, 459222, 2318336, 0, 0, 0, 4268032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4276224, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 0, 914, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4956160, 4964352, 0, 0, 0, 0, 0, 467, 2335204, 2335204, 2335204, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 2335238, 2335238, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 467, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2335238, 2335204, 2335238, 2335238, 2335238, 2335238, 2335238, 2335238, 2335238, 2335238, 2335238, 2335238, 2335238, 2335238, 2335238, 2335238, 2335238, 2335238, 0, 0, 0, 2342912, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2348, 0, 0, 0, 0, 0, 0, 2326528, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5177344, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 2359296, 0, 2359296, 0, 0, 0, 2359296, 0, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 573440, 0, 573440, 573440, 573440, 0, 573440, 573440, 573440, 573440, 573440, 573440, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 302, 303, 0, 0, 2367488, 0, 0, 4268032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4931584, 0, 0, 0, 0, 0, 0, 2351104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 507904, 507904, 507904, 0, 913, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 0, 0, 0, 0, 0, 1180, 0, 0, 0, 0, 1184, 0, 0, 1187, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 989, 0, 0, 0, 0, 913, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 4359057, 5260177, 4359057, 4359057, 0, 0, 1, 24578, 3, 155942, 155942, 296, 0, 0, 0, 0, 0, 302, 303, 0, 0, 0, 0, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 212992, 0, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 0, 0, 0, 0, 0, 4366336, 0, 0, 0, 0, 0, 0, 0, 0, 2412, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6258688, 6447104, 0, 0, 6127616, 0, 6348800, 5906432, 0, 5537792, 0, 4882432, 0, 0, 0, 0, 0, 0, 4825088, 0, 0, 5177344, 0, 0, 0, 0, 5701632, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4825088, 4358144, 4358144, 4358144, 4358144, 0, 0, 913, 913, 913, 4826001, 913, 913, 913, 913, 913, 913, 0, 0, 989, 989, 4842461, 989, 989, 989, 4899805, 989, 0, 0, 5513216, 5783552, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4857856, 4874240
+];
+
+JSONiqParser.EXPECTED =
+[ 169, 185, 215, 1326, 231, 1001, 278, 928, 942, 1085, 320, 247, 263, 307, 336, 352, 368, 384, 400, 914, 2264, 430, 2264, 2264, 2264, 2264, 2264, 2264, 2264, 2264, 2264, 2264, 2264, 2268, 1707, 1603, 1403, 460, 1356, 1591, 491, 507, 517, 533, 1816, 1031, 2119, 564, 475, 580, 596, 625, 684, 700, 1905, 716, 1114, 747, 778, 788, 1693, 1145, 762, 804, 820, 836, 852, 868, 884, 900, 958, 988, 1017, 972, 1997, 1047, 1057, 1073, 1101, 1130, 2028, 1562, 1190, 1205, 1221, 1237, 1253, 1269, 1298, 1314, 1342, 1174, 1446, 1372, 1876, 2073, 1633, 668, 1388, 1419, 1434, 1467, 1483, 1499, 1515, 609, 1531, 1547, 1578, 444, 654, 640, 1619, 1649, 1662, 1678, 1723, 1738, 1754, 1770, 1786, 1802, 1832, 1848, 291, 1864, 2228, 1892, 1921, 1937, 199, 2149, 1953, 1969, 1985, 1282, 2013, 2044, 2060, 2089, 2105, 548, 2135, 2165, 2181, 2197, 2213, 1160, 2244, 731, 2260, 2264, 1457, 412, 2264, 2264, 2264, 2264, 2264, 2264, 2264, 2264, 2264, 2264, 2264, 2264, 2264, 2264, 419, 2284, 2288, 2290, 2290, 2290, 2291, 2295, 2290, 2297, 2301, 2304, 2311, 2307, 2315, 2318, 2322, 2326, 2330, 2334, 2338, 2345, 2345, 3446, 2344, 2345, 3427, 2352, 3605, 2345, 4169, 2345, 2345, 2345, 3950, 4664, 4990, 4059, 4582, 2828, 4588, 2345, 4069, 4598, 2345, 4069, 4603, 2734, 3100, 2397, 2497, 2359, 2366, 2466, 2372, 2376, 2345, 2345, 4266, 2345, 2345, 2383, 3820, 2359, 2359, 2392, 2419, 2419, 2419, 2419, 2405, 2427, 2345, 2345, 2345, 2345, 2345, 2409, 2455, 3819, 2345, 2345, 3099, 3100, 3100, 3100, 2495, 2398, 2398, 2398, 2504, 2359, 2359, 2359, 2482, 2419, 2419, 2419, 2517, 2345, 2345, 2345, 2457, 2345, 3100, 3100, 3101, 2398, 2398, 2398, 2359, 2359, 2359, 2359, 2359, 2418, 2419, 2419, 2419, 2419, 2419, 2424, 2437, 2345, 2345, 2345, 2345, 4505, 2729, 2345, 2345, 2345, 2345, 4509, 5101, 4513, 2345, 2345, 3904, 2359, 2359, 2484, 2419, 2419, 2519, 2345, 3864, 2345, 4865, 3100, 3100, 2501, 2398, 2538, 2359, 2359, 2359, 2359, 2359, 2548, 2419, 2419, 2419, 2419, 2395, 2490, 2345, 2345, 2359, 2483, 2419, 2549, 2508, 3755, 2345, 4867, 4911, 2398, 2400, 2359, 2515, 2419, 2525, 3605, 3100, 2476, 2401, 2547, 2550, 2816, 4868, 2399, 2481, 2485, 2735, 2532, 2503, 2361, 2368, 4866, 2476, 2360, 2420, 4909, 2537, 2546, 2486, 2533, 2362, 2542, 2554, 2567, 2571, 2575, 2579, 2583, 2586, 2586, 2586, 2598, 2591, 2586, 2587, 2595, 2602, 2606, 2610, 2614, 2618, 2622, 2626, 2630, 4594, 2634, 2345, 2345, 2903, 2640, 2345, 2345, 2999, 2345, 2345, 2645, 2345, 2345, 2345, 2345, 2345, 2345, 4208, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 4460, 2655, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2655, 2345, 2345, 2636, 4128, 2345, 2345, 2345, 2345, 2635, 4127, 2345, 2345, 2345, 2345, 2635, 4127, 2794, 2345, 2345, 2345, 3016, 2798, 2345, 2345, 2345, 3017, 2799, 2345, 2345, 2345, 2806, 2729, 2876, 3308, 2345, 2915, 2345, 3310, 2345, 2922, 2345, 3536, 2683, 4475, 3831, 4927, 2685, 4422, 2850, 2345, 2345, 2345, 2345, 2345, 2345, 5004, 2345, 2345, 2345, 2345, 4417, 3024, 3547, 2854, 5007, 2861, 2345, 2345, 2345, 2345, 4422, 2869, 2345, 2345, 2345, 2345, 2345, 2868, 2729, 2345, 2345, 2345, 2345, 2345, 2873, 2345, 2345, 2345, 4443, 2345, 3549, 3338, 2880, 2345, 2345, 2345, 2345, 2887, 2729, 2345, 2345, 2345, 2883, 2880, 2345, 2345, 4951, 4956, 2345, 2345, 2345, 2345, 4604, 4971, 4982, 2345, 2345, 4805, 4988, 3762, 2345, 3965, 2345, 4436, 4591, 2907, 2345, 3192, 2909, 2345, 4490, 2345, 3191, 2908, 2345, 3491, 4849, 4476, 4920, 4920, 4920, 4849, 2720, 4477, 4477, 4477, 4918, 4922, 2683, 4476, 4863, 4478, 2719, 2684, 2432, 2429, 2431, 2563, 2345, 2345, 2345, 2345, 2345, 2345, 2984, 2345, 2345, 2345, 2511, 4068, 4075, 2345, 2345, 4081, 2345, 4085, 2345, 2345, 4099, 2345, 3067, 3768, 2729, 4088, 2928, 3046, 2947, 2932, 2935, 2938, 2940, 2940, 2944, 2345, 2951, 2956, 2345, 2345, 5022, 2729, 2345, 2345, 2345, 2345, 4180, 2345, 2345, 2345, 2345, 5023, 2345, 4654, 2345, 4496, 2345, 3077, 4168, 3570, 5100, 4176, 2345, 2345, 2345, 5024, 2345, 2345, 4147, 2345, 2345, 4258, 2345, 2345, 2339, 3845, 2345, 3726, 3911, 3122, 3918, 2345, 4757, 2345, 4949, 2345, 2961, 2974, 2978, 3641, 3718, 2988, 2996, 2722, 3003, 3008, 2345, 2998, 4205, 2345, 2952, 2345, 2345, 3697, 2345, 3015, 4630, 3021, 3029, 3033, 2412, 2991, 2723, 3040, 3497, 2345, 2951, 2956, 2345, 5067, 4831, 2345, 3623, 2964, 3050, 4101, 2345, 3156, 3059, 2345, 2345, 5115, 3712, 2387, 4578, 2345, 5120, 2458, 2509, 4221, 2345, 5107, 2345, 3202, 2763, 3060, 2345, 2345, 2345, 3733, 2345, 2951, 2733, 2345, 4755, 4856, 3111, 4236, 2557, 3086, 2345, 2348, 3162, 2345, 2345, 2527, 3154, 2345, 2345, 2347, 3161, 2345, 2345, 4684, 3167, 3432, 4676, 3096, 2345, 2345, 2345, 2345, 2472, 3106, 2345, 2345, 2345, 2345, 2346, 3105, 2345, 2345, 2345, 4878, 3110, 3119, 2345, 5067, 4832, 4234, 3023, 3126, 4109, 3602, 3171, 3176, 2345, 4069, 3180, 2345, 4170, 3176, 2345, 2345, 3187, 2345, 4682, 3217, 4094, 3257, 3196, 3972, 3190, 2345, 3974, 2345, 3251, 3209, 2345, 3973, 2345, 3214, 3218, 3223, 3227, 3231, 4192, 2345, 3229, 2345, 3237, 3606, 3242, 3246, 4319, 3250, 3238, 3230, 3255, 3261, 3266, 3266, 3266, 3274, 3278, 3262, 3262, 3262, 3285, 3289, 4198, 3290, 4959, 3294, 4246, 5038, 3298, 3302, 3306, 3316, 3322, 3329, 2345, 2345, 2345, 2345, 3926, 2345, 2345, 2875, 3333, 3337, 4593, 3342, 3347, 4397, 3357, 3361, 3365, 3366, 3366, 3370, 2345, 4118, 3376, 2345, 4445, 3382, 4945, 3392, 2721, 3398, 2829, 3406, 3410, 3417, 3424, 3004, 3431, 3947, 2345, 3426, 2345, 2345, 3115, 3658, 4038, 4560, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2650, 2345, 2345, 2454, 2345, 2345, 2345, 4867, 3100, 3100, 3100, 3100, 3101, 2398, 2398, 2398, 2398, 2545, 2359, 2359, 2359, 2359, 2359, 2464, 2419, 2419, 2419, 2419, 2419, 2395, 2470, 4119, 2345, 2345, 3437, 3706, 3578, 3394, 4115, 2345, 5085, 3441, 3522, 4170, 3451, 2345, 2345, 3132, 3489, 2345, 2345, 2345, 2345, 3143, 3495, 2345, 2345, 2345, 2345, 4516, 3484, 2345, 4070, 3455, 2345, 2345, 2345, 4071, 3456, 2345, 2345, 2345, 3460, 3464, 2345, 2345, 2345, 3098, 3100, 3100, 3100, 3100, 3100, 2397, 2398, 2398, 2398, 2398, 2398, 2480, 4118, 3830, 2345, 3469, 3584, 3579, 3476, 4935, 4215, 3011, 2345, 2345, 4515, 3483, 2345, 2345, 3191, 2898, 2345, 2345, 2345, 2892, 2345, 2345, 2345, 2897, 2345, 2345, 2345, 3963, 3232, 2345, 2345, 2345, 2345, 3517, 3490, 2345, 2345, 2345, 2345, 4515, 3520, 2345, 2345, 2345, 2345, 3982, 2345, 3526, 3585, 3535, 4117, 2786, 2345, 2345, 3541, 2345, 2345, 2345, 2345, 4530, 3545, 2345, 2345, 2345, 2345, 3541, 2345, 2345, 2345, 2345, 2456, 2345, 2345, 4910, 3100, 3100, 3100, 3100, 2476, 2398, 2398, 2398, 4531, 3232, 2345, 2345, 2345, 3560, 3565, 3576, 4115, 3204, 3583, 2345, 5095, 2345, 2345, 2345, 3163, 3064, 2345, 2345, 2345, 2345, 3219, 3071, 2345, 2345, 2345, 2345, 3157, 5054, 2345, 2345, 2345, 5094, 2345, 2345, 2345, 5053, 2345, 2345, 2345, 3590, 3966, 3561, 2345, 2521, 3137, 2345, 2345, 3754, 2981, 3141, 5078, 4842, 4667, 2967, 3147, 2528, 3155, 2345, 2751, 5076, 2686, 5082, 4996, 5091, 5099, 2345, 2345, 5072, 2345, 2345, 5105, 2345, 2345, 4450, 3818, 2345, 3825, 2345, 2460, 3835, 3839, 2345, 2345, 2345, 4069, 3843, 2345, 4928, 2345, 3443, 2345, 3828, 2345, 4052, 3148, 2345, 2386, 3114, 3150, 4047, 3149, 3635, 3635, 4052, 3113, 3150, 3150, 3150, 3980, 3634, 3112, 3635, 4053, 3622, 3635, 3150, 4974, 4976, 3627, 4978, 3631, 3640, 2345, 2345, 2345, 2345, 4428, 3779, 3723, 2345, 3595, 3645, 3649, 4091, 3655, 3663, 3667, 3671, 3675, 3679, 3680, 3684, 2345, 2801, 3689, 2345, 4841, 3695, 4295, 2763, 3350, 3199, 3691, 5040, 3485, 3701, 4584, 3465, 3705, 4823, 3710, 3716, 2345, 2345, 2802, 3690, 2345, 4616, 4756, 3722, 3731, 3957, 3201, 3737, 3750, 3759, 2345, 3940, 3766, 2345, 2345, 2345, 3312, 4745, 4749, 4761, 4765, 4769, 4773, 4777, 4781, 4785, 4788, 4792, 4795, 3504, 3232, 2345, 2345, 2345, 3505, 2345, 2345, 2345, 2646, 3772, 2345, 2345, 2345, 4427, 3778, 2345, 4164, 4095, 2345, 3785, 4903, 2651, 2345, 3753, 2345, 2345, 3793, 2345, 2345, 2345, 2345, 3098, 3100, 3100, 3100, 3100, 2398, 2398, 2398, 2398, 2478, 2359, 2359, 2345, 3797, 2345, 2345, 2345, 2345, 2345, 3801, 2345, 2345, 2345, 2345, 2345, 3805, 2345, 2345, 3846, 2810, 5004, 2345, 2345, 2345, 2345, 4151, 2345, 2815, 2820, 2833, 4077, 2838, 3850, 2345, 2345, 2345, 2345, 4737, 2345, 3855, 2458, 4716, 3837, 3863, 2345, 2345, 3172, 3871, 3924, 2345, 2340, 2345, 2345, 4149, 2345, 2339, 3845, 3723, 3089, 3789, 2345, 3930, 4129, 2345, 2776, 3914, 4135, 2728, 2345, 2345, 2345, 2345, 3210, 2345, 2784, 3082, 3938, 2345, 2790, 5046, 2345, 3935, 2345, 3944, 2730, 3877, 2345, 3352, 2732, 3955, 2731, 4157, 4157, 4157, 3351, 2732, 2732, 2732, 3531, 4156, 4716, 4157, 4718, 3878, 4157, 2732, 2345, 2345, 2345, 2345, 3851, 2345, 2345, 2345, 2345, 2345, 3850, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 3612, 2663, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 3780, 3961, 2345, 2345, 3920, 3970, 3978, 3986, 3990, 3994, 3998, 4001, 4005, 4007, 4011, 2345, 2345, 2345, 4015, 2345, 3606, 4752, 4107, 3553, 4020, 4024, 4643, 4888, 4028, 2345, 4851, 2811, 4032, 4826, 4037, 4042, 4046, 2345, 2345, 4016, 2345, 3746, 4051, 3551, 3877, 4057, 3636, 4570, 4063, 2345, 2345, 2345, 2780, 2345, 2345, 2345, 2510, 4067, 4105, 2924, 4156, 4113, 2386, 4123, 4538, 2345, 2345, 2635, 4127, 2345, 2345, 2345, 2345, 2641, 4133, 2345, 2345, 2345, 2345, 2778, 4181, 2345, 2457, 2345, 2345, 4984, 5025, 2345, 4139, 2345, 2855, 3611, 2345, 2857, 2345, 2345, 3386, 2345, 2856, 2345, 2345, 3830, 3616, 2345, 3445, 2345, 4145, 2345, 4670, 3724, 4155, 3572, 3114, 4161, 2345, 2345, 2345, 3472, 2729, 2345, 2345, 2345, 2345, 2842, 2345, 2345, 2345, 2345, 3081, 2846, 2345, 2345, 2345, 2345, 2345, 2739, 2692, 3821, 2749, 2757, 2345, 2761, 2767, 2345, 2771, 4802, 2345, 4185, 3077, 3725, 4231, 3041, 4220, 2345, 5087, 2729, 2345, 2345, 2911, 4134, 2345, 2345, 4172, 2345, 2345, 2345, 2354, 3845, 2345, 3723, 3606, 2458, 3787, 3901, 2345, 3781, 3537, 4190, 2345, 2345, 2910, 4196, 3378, 3685, 3607, 4673, 4202, 2823, 2345, 4033, 2729, 2345, 3931, 2956, 2345, 3925, 4214, 4219, 4225, 4240, 4244, 4264, 2345, 4250, 2345, 4252, 2345, 2345, 4256, 2345, 4251, 3343, 4538, 4228, 4262, 2345, 4270, 3353, 2345, 4610, 2345, 3183, 3130, 2345, 2345, 2345, 2346, 3136, 2345, 2345, 2345, 2345, 3183, 3130, 2345, 2345, 2673, 2345, 2345, 2677, 3814, 2690, 2696, 2700, 2704, 2708, 2712, 2716, 3744, 2727, 4275, 4284, 4288, 4419, 2668, 3659, 2733, 4292, 4308, 4420, 3556, 3556, 3556, 4317, 3530, 4421, 4335, 4323, 3555, 3529, 3568, 3025, 2669, 3556, 4330, 4339, 4341, 4333, 4326, 4345, 4349, 4351, 2345, 2345, 2345, 2345, 3897, 2992, 2345, 4313, 4355, 4359, 4390, 4363, 4367, 4371, 4375, 4379, 4381, 4383, 2345, 2345, 2345, 4937, 4387, 4657, 4394, 4401, 4460, 2827, 4636, 4599, 4278, 4407, 4411, 5122, 3727, 4426, 4432, 2345, 4440, 4449, 2345, 2345, 4938, 3774, 2657, 4454, 4458, 3325, 2345, 3053, 4464, 4468, 2345, 2345, 2345, 5128, 4474, 2345, 2345, 2345, 4482, 2345, 2345, 4271, 2888, 2345, 2345, 2345, 2345, 3233, 2345, 2345, 2345, 4962, 2864, 3650, 2893, 2345, 3727, 4483, 2345, 2345, 2345, 3055, 4487, 4494, 2345, 2345, 3890, 4311, 2433, 2446, 3618, 2826, 4186, 5066, 4947, 2733, 2345, 2345, 2345, 3413, 4500, 2345, 2345, 2345, 2345, 3420, 2800, 4414, 4622, 4520, 3318, 2345, 2970, 5060, 2345, 2345, 2345, 2377, 4524, 2345, 2345, 2345, 2345, 3869, 2345, 2345, 2345, 2345, 4171, 3876, 2345, 2345, 2345, 4069, 3870, 2345, 4952, 4311, 2443, 4535, 2827, 3865, 3433, 2345, 2345, 2345, 2379, 4543, 2345, 2345, 2345, 3858, 2345, 2345, 2345, 2345, 3859, 2345, 2345, 2345, 2957, 3045, 2345, 2345, 2377, 4548, 2345, 2345, 2345, 2345, 3281, 4553, 2345, 2345, 2345, 2378, 4549, 4470, 2345, 4558, 2440, 4564, 3203, 4831, 2345, 2345, 2377, 4568, 2345, 2345, 2345, 3951, 2345, 2345, 2345, 4574, 2345, 4640, 2345, 4069, 4647, 2560, 4651, 4661, 2345, 4680, 4539, 4642, 5031, 2345, 5014, 4688, 4830, 4815, 4403, 3883, 4642, 4692, 4628, 4816, 4696, 4696, 4702, 4830, 4706, 4714, 4714, 4722, 2414, 2449, 3808, 4731, 2414, 4906, 2450, 4735, 4725, 4727, 4741, 4829, 2345, 2345, 2345, 2345, 3925, 2345, 2772, 3501, 4141, 3509, 4115, 4215, 3074, 2345, 2345, 3513, 4799, 2345, 2345, 2345, 2345, 4809, 3015, 4813, 4820, 4967, 2388, 2680, 4210, 4836, 4554, 2345, 3372, 2345, 2345, 3384, 2345, 2345, 3372, 2345, 2345, 2856, 2345, 2345, 3589, 3594, 3599, 4708, 3872, 4840, 4846, 2345, 4710, 4855, 2345, 2345, 4544, 4860, 2834, 3742, 4965, 3080, 4872, 4877, 4882, 2345, 2345, 2345, 2345, 3606, 4886, 2345, 2345, 2345, 3478, 4892, 2345, 2345, 2345, 3882, 2663, 2459, 3092, 3887, 2345, 2345, 3894, 2345, 2345, 2345, 2355, 2345, 3479, 2345, 2345, 2345, 2345, 4897, 3616, 2345, 2345, 4544, 4915, 3035, 4280, 2918, 3446, 4873, 4698, 4926, 2345, 2345, 2345, 2345, 2345, 4932, 2345, 2345, 2345, 2345, 3606, 4942, 2345, 2345, 4435, 3377, 3907, 2902, 2345, 4489, 2729, 2345, 3651, 2902, 2345, 3192, 2909, 2345, 4994, 5020, 5001, 3205, 5011, 2345, 2345, 2345, 2345, 2741, 2745, 2345, 2345, 2345, 2345, 4170, 4608, 2345, 2345, 4614, 4989, 4620, 4626, 3755, 4950, 2345, 4634, 2345, 5013, 2345, 2744, 2345, 2345, 2345, 2345, 2345, 2743, 2345, 2345, 2345, 2345, 2345, 2743, 4900, 2345, 4501, 4915, 3036, 5018, 3447, 3864, 5029, 2345, 2345, 2345, 4170, 5035, 2345, 2345, 2345, 2345, 4303, 5044, 2345, 2345, 2345, 2345, 5050, 2345, 2345, 2345, 2345, 4304, 4900, 2345, 3811, 3740, 4997, 5058, 5064, 2345, 2345, 2345, 5071, 2345, 2345, 2345, 3269, 2345, 2345, 2345, 4297, 4301, 2345, 3402, 2800, 2345, 2345, 2345, 2345, 3401, 4528, 2345, 2345, 2345, 2345, 3401, 4528, 4470, 4299, 2345, 2345, 3270, 2345, 5111, 4997, 4577, 2345, 2345, 2753, 2345, 4893, 5116, 2345, 2752, 2491, 2458, 2345, 5126, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2345, 2661, 3388, 2667, 2345, 7267, 5893, 5132, 5144, 5141, 5151, 5153, 5153, 5153, 5153, 5148, 5176, 5152, 5153, 5153, 5153, 5159, 5163, 5176, 5153, 5153, 5169, 5164, 5153, 5180, 5155, 5154, 5168, 5151, 6159, 5173, 5199, 5205, 5205, 5205, 5209, 5209, 5201, 5213, 5217, 5220, 5224, 5228, 5245, 5232, 5242, 5234, 5238, 5236, 5249, 5252, 7269, 7026, 5260, 5273, 5276, 5276, 5276, 5255, 5821, 5295, 5276, 5276, 5276, 5276, 5268, 5730, 6588, 6270, 5301, 5276, 5276, 5254, 6597, 5821, 6646, 6646, 6646, 6646, 5394, 5396, 5325, 5449, 5322, 5396, 5396, 5325, 5276, 5384, 5428, 5333, 5409, 5274, 5276, 5276, 5276, 5286, 5290, 7174, 5276, 6844, 7218, 6005, 5276, 5276, 5276, 6390, 6115, 6646, 6647, 5323, 5396, 5397, 5400, 5428, 5428, 5428, 5428, 6645, 6646, 6646, 5398, 5400, 5428, 5345, 6844, 7217, 5353, 5276, 5266, 5276, 5276, 5388, 7455, 5457, 5396, 5396, 5396, 5396, 5276, 5399, 5402, 6779, 5408, 6667, 5275, 5276, 5275, 5276, 5276, 6239, 5276, 6839, 5410, 6667, 5275, 5276, 5275, 6561, 5276, 5275, 6839, 6843, 7454, 7155, 5276, 5276, 7229, 5276, 5276, 6466, 5276, 5276, 6526, 5276, 5276, 5276, 5302, 5276, 5276, 6646, 5393, 5396, 5396, 5396, 5400, 5407, 6668, 5276, 5276, 5268, 6066, 5402, 5428, 5428, 5428, 5429, 6646, 6646, 6646, 5395, 5396, 5396, 5396, 5326, 5368, 5419, 5276, 5276, 5276, 5305, 5401, 5428, 5428, 5428, 5430, 6646, 5427, 5428, 5428, 5428, 6644, 6646, 6646, 5402, 5387, 5276, 5276, 5276, 5307, 6771, 6646, 5394, 5396, 5396, 5398, 5427, 5276, 5276, 5268, 6630, 5397, 5403, 5276, 5276, 5269, 5731, 6036, 5400, 5400, 5402, 5428, 6644, 5402, 5428, 5428, 6643, 6646, 5368, 5400, 5427, 6643, 6646, 6646, 6646, 5396, 5396, 5396, 5397, 5387, 6646, 5395, 5324, 5368, 5276, 5999, 5276, 5276, 7234, 6237, 5276, 6239, 6237, 5401, 6643, 5393, 5324, 5415, 5434, 5460, 5464, 5463, 5462, 5461, 5326, 7445, 6108, 6418, 5509, 5541, 5438, 5442, 5508, 5508, 5508, 5508, 5486, 5515, 5454, 5468, 5472, 5491, 5543, 5496, 5508, 5508, 5538, 5446, 5582, 5487, 5506, 5581, 5513, 5475, 5519, 5535, 6805, 6808, 5547, 6811, 6814, 6815, 6816, 5551, 5554, 5558, 5569, 5573, 5579, 5492, 5586, 5590, 5594, 5598, 5605, 5604, 5601, 5609, 5613, 5561, 6981, 5276, 5276, 5276, 5308, 5312, 7372, 5276, 5276, 5276, 5309, 7137, 5276, 5276, 5276, 5329, 5276, 6389, 5276, 5276, 6557, 5276, 6391, 5276, 5276, 5275, 5276, 6392, 6392, 5276, 5276, 5279, 5276, 6282, 5276, 5276, 5276, 5366, 5276, 6000, 6885, 5910, 7281, 5626, 5297, 5629, 5276, 5276, 7348, 5276, 5276, 7354, 5276, 5276, 5276, 5631, 5640, 5899, 5276, 5647, 5276, 6987, 5263, 5186, 5654, 5657, 5659, 5660, 5664, 5668, 5673, 5672, 5677, 5679, 5680, 5680, 5684, 5686, 5693, 5688, 5700, 5688, 5697, 5689, 5704, 5276, 5276, 7355, 5276, 5276, 5276, 5648, 6027, 6933, 6281, 5898, 5276, 5276, 5276, 5367, 5276, 5276, 5276, 5368, 5400, 5708, 6023, 5276, 5276, 5281, 7411, 7471, 7426, 5276, 5276, 6043, 5135, 5276, 5276, 5281, 7468, 6467, 5276, 5716, 5276, 5276, 5721, 6061, 5339, 5276, 5276, 5304, 5276, 5341, 5737, 5745, 5751, 5749, 5276, 5276, 5276, 5369, 6219, 5751, 5276, 5276, 5306, 5310, 6765, 5276, 5276, 6988, 5276, 6526, 5277, 6886, 6113, 5784, 5276, 5793, 7239, 5808, 5855, 5812, 5831, 7055, 5318, 5276, 5276, 5276, 5372, 5348, 7452, 5827, 5832, 7056, 5137, 5276, 5276, 5276, 5376, 5368, 5276, 6525, 5276, 5414, 5276, 7452, 7443, 5276, 5276, 7419, 6200, 5276, 5925, 5276, 5276, 5276, 7249, 5717, 5276, 5276, 5276, 5387, 5795, 7243, 5854, 5845, 7241, 5851, 5855, 5846, 7242, 5852, 5856, 5317, 5850, 5854, 5845, 5898, 5860, 5276, 5276, 5276, 5388, 6362, 5276, 5854, 5876, 5318, 5276, 5276, 7441, 6519, 7240, 5851, 5855, 5877, 5898, 5881, 5839, 5276, 5276, 5370, 5276, 5276, 5853, 5885, 5318, 5276, 5276, 7452, 6134, 7239, 6135, 5854, 5886, 5898, 6404, 5870, 6865, 5276, 5276, 6117, 5869, 6864, 5898, 5276, 6867, 5276, 5276, 5276, 5617, 6117, 5890, 6866, 5276, 5276, 5276, 5620, 6857, 5276, 6719, 6723, 5276, 5276, 7455, 6886, 6721, 5898, 5276, 5276, 5373, 5276, 5914, 5276, 5898, 7023, 5934, 5938, 5942, 5945, 5948, 5949, 5949, 5950, 5954, 5954, 5954, 5954, 5954, 5958, 5961, 5276, 5277, 5921, 5930, 5276, 6659, 6079, 5966, 6872, 6872, 5276, 5276, 5276, 5650, 6487, 5276, 5711, 6194, 7445, 7444, 5368, 5276, 6000, 6525, 5276, 7025, 5302, 6259, 5276, 5370, 5979, 6510, 5997, 5276, 6523, 5276, 5276, 6660, 6080, 5967, 5898, 6890, 5997, 5276, 6889, 5276, 5276, 5276, 5841, 6010, 5276, 6606, 5276, 5276, 5276, 5822, 6016, 5276, 5276, 5276, 5787, 5276, 6605, 6017, 5276, 5277, 5962, 6001, 7450, 5276, 5276, 5276, 5826, 5831, 5712, 6195, 7052, 5276, 5368, 5276, 5276, 5366, 5369, 6121, 5276, 6513, 5276, 6559, 5276, 5276, 5386, 5282, 5276, 6093, 5276, 5276, 5276, 5864, 6029, 5276, 5276, 5276, 5896, 6848, 5998, 5276, 6523, 6792, 5276, 5276, 6397, 7112, 6033, 6047, 6053, 5898, 5276, 6034, 6048, 6054, 5276, 5278, 5281, 6211, 6035, 6049, 6055, 5276, 5278, 5909, 5276, 5279, 6836, 6888, 5276, 5276, 5276, 7452, 5761, 6526, 6233, 6268, 5276, 5280, 5303, 6536, 5276, 6268, 6140, 6038, 6070, 5276, 5276, 5400, 5400, 5400, 5400, 5401, 6066, 6588, 6039, 5894, 5276, 7456, 5276, 5276, 5276, 6002, 5276, 5276, 5276, 5975, 5277, 6078, 6084, 5367, 6266, 7445, 6236, 5999, 6524, 5276, 6100, 6037, 6070, 5276, 5276, 5477, 5481, 6630, 6587, 6090, 5894, 5276, 6080, 6086, 5276, 5276, 5478, 5482, 6099, 5276, 5276, 5276, 6003, 5276, 5276, 6036, 6107, 5276, 5276, 5276, 6072, 6033, 6588, 6106, 5276, 5276, 5276, 6073, 6085, 5276, 5276, 7023, 6099, 5276, 5276, 5281, 6583, 5728, 5732, 6105, 5894, 5729, 5733, 6106, 5276, 5281, 6629, 6586, 5727, 5731, 6104, 6108, 5276, 5276, 5276, 6117, 5890, 5371, 6000, 6125, 6268, 6456, 5276, 6388, 5276, 5276, 5276, 6523, 5276, 7417, 6416, 5276, 5276, 5276, 6119, 5276, 6524, 6525, 6659, 6322, 5276, 5276, 5276, 6074, 5363, 7445, 5276, 5370, 6000, 6236, 5276, 6320, 5799, 5803, 5276, 5276, 5276, 6127, 6319, 5798, 5802, 5276, 5276, 6321, 5276, 7260, 7446, 5368, 6001, 6320, 5799, 5801, 5276, 5276, 6319, 5797, 5276, 7073, 5276, 7258, 7447, 5276, 7447, 5302, 7075, 5803, 5276, 5276, 7072, 7076, 5276, 5281, 7468, 7477, 5276, 5276, 7073, 7260, 7446, 5276, 7074, 5802, 5276, 5285, 5289, 7173, 6339, 7258, 7447, 6339, 7077, 5276, 6117, 7076, 5276, 6342, 5276, 6117, 6342, 6139, 6117, 6200, 6978, 5276, 6978, 5276, 6978, 5276, 7445, 6197, 5276, 6237, 6722, 5276, 5276, 5372, 7365, 6199, 6197, 5276, 6199, 5276, 5925, 7445, 6198, 6198, 6198, 5276, 5276, 5926, 6198, 5276, 6896, 6896, 5389, 6536, 5368, 5525, 6145, 5276, 5276, 5276, 6133, 6358, 5367, 5276, 5276, 6198, 6537, 6199, 6536, 6200, 5276, 6537, 5276, 5276, 5276, 6480, 6167, 6152, 6171, 6175, 6179, 6181, 6185, 6185, 6181, 6189, 6189, 6189, 6189, 6189, 6191, 5276, 5276, 5564, 6363, 6206, 5276, 5276, 5276, 6199, 6200, 6251, 5898, 5276, 5276, 5565, 5371, 5276, 5276, 5575, 6934, 6200, 5276, 7454, 5803, 7356, 5276, 6293, 5276, 5804, 5276, 5287, 5291, 7160, 7066, 6196, 5276, 5285, 6217, 6223, 7106, 6232, 5276, 5287, 7149, 7129, 6243, 5276, 7260, 5276, 5288, 7150, 7141, 6257, 5276, 5789, 5276, 5276, 5276, 6202, 6263, 5276, 5276, 5276, 6201, 5367, 5369, 5387, 6274, 6253, 5278, 6018, 5276, 5276, 5642, 5276, 5276, 5276, 6388, 6113, 5193, 6286, 6935, 6040, 6287, 6936, 6041, 5276, 5276, 5191, 5195, 6288, 6937, 6042, 5276, 5276, 5276, 6226, 5385, 6114, 6252, 5276, 5307, 5311, 5315, 7420, 7354, 5276, 5276, 5739, 7397, 7403, 6298, 6329, 5803, 5276, 5276, 6006, 6299, 6330, 5276, 5276, 5276, 6265, 6300, 6331, 5276, 5276, 5753, 5752, 5387, 6275, 5897, 5276, 5328, 6552, 6547, 5803, 6197, 7453, 7421, 6267, 6392, 5479, 6312, 6329, 5276, 6458, 5480, 6313, 6330, 5276, 5276, 5764, 5276, 5385, 6246, 6253, 5276, 5363, 5367, 5276, 5276, 6536, 6317, 6267, 5276, 5276, 5276, 5621, 6392, 7412, 6327, 6332, 6301, 5803, 5276, 5276, 5815, 7444, 6522, 5276, 5276, 5375, 5276, 5276, 5365, 5276, 5276, 5916, 5276, 5276, 5276, 6294, 5368, 5386, 6336, 5276, 5365, 5276, 6535, 5276, 6820, 7444, 5276, 5276, 6519, 6308, 5276, 6198, 5276, 7452, 5280, 5276, 5276, 5276, 6307, 6197, 5276, 6843, 5276, 6356, 6250, 6678, 5276, 5276, 5276, 6368, 5276, 6844, 5894, 5276, 5369, 5998, 6524, 5276, 5276, 5276, 5277, 6208, 6362, 5276, 5276, 5276, 6371, 5276, 6846, 5276, 5276, 5898, 5276, 6005, 5276, 5276, 6005, 5276, 5276, 6846, 6004, 6002, 6846, 6005, 6005, 6005, 5276, 5276, 6004, 5276, 5276, 6005, 6847, 5276, 5276, 5995, 6375, 5894, 5276, 6520, 6383, 5276, 5276, 5276, 6404, 5871, 6112, 7024, 6387, 6111, 5276, 5276, 5276, 5363, 6401, 6761, 6409, 6972, 6429, 6432, 6433, 6434, 6438, 6438, 6438, 6438, 6441, 6443, 6444, 6444, 6451, 6451, 6451, 6451, 6448, 6452, 5276, 5276, 5276, 6425, 5348, 6566, 5276, 5276, 5276, 6463, 6370, 6494, 5276, 5276, 5973, 5276, 5362, 6468, 5276, 6469, 6475, 5276, 5276, 5276, 6519, 5276, 6484, 5276, 5276, 6000, 5389, 6228, 6477, 5276, 5276, 6012, 5276, 6112, 5276, 5276, 5276, 6520, 5276, 5276, 5276, 6396, 5304, 6197, 5276, 5276, 6060, 6059, 5276, 6499, 6507, 5276, 5386, 5283, 5276, 5276, 6395, 5276, 5276, 5279, 6208, 6518, 5276, 5276, 5359, 5276, 5276, 5276, 6524, 5276, 5276, 6534, 6534, 5276, 5388, 5276, 5284, 6546, 6618, 5276, 5276, 6109, 5903, 6553, 6548, 5276, 5276, 6116, 5998, 5349, 6567, 5276, 5276, 5276, 6392, 6611, 5305, 6199, 5276, 6537, 6265, 5276, 6236, 6525, 5276, 6830, 6573, 5818, 5276, 6831, 5501, 5819, 5276, 6832, 5502, 5820, 6830, 5500, 5818, 5276, 5422, 6847, 5276, 5522, 7448, 5276, 5636, 6001, 5998, 6565, 5276, 5276, 5276, 6525, 5276, 5276, 7449, 6887, 6493, 5276, 5641, 6843, 5276, 5276, 5276, 6237, 6537, 5276, 6268, 6140, 5276, 6390, 5276, 6459, 6571, 6577, 5821, 5276, 5276, 5276, 6657, 5276, 7285, 5499, 6578, 5276, 5276, 6886, 5279, 5276, 5649, 6028, 6094, 5276, 6458, 5276, 5276, 5276, 6526, 7024, 6877, 5256, 6579, 5276, 5276, 5276, 6528, 6598, 5276, 5276, 5276, 6536, 5276, 6592, 5276, 5276, 5276, 6620, 5276, 6391, 6459, 5276, 5739, 7123, 6938, 5281, 6583, 6579, 5276, 5741, 7125, 6332, 6602, 5276, 6459, 5276, 5741, 7125, 6522, 5276, 6404, 5871, 5280, 5276, 5302, 5276, 5757, 5276, 5356, 6392, 6526, 5276, 5276, 6118, 5279, 6610, 5276, 5276, 5276, 6783, 5367, 6615, 5276, 5276, 5276, 6784, 5276, 6919, 6923, 5276, 5777, 5276, 5276, 5327, 6542, 5280, 6537, 6266, 5276, 5788, 6264, 5276, 5288, 7184, 7189, 5276, 5277, 5276, 5367, 5276, 6268, 6141, 6712, 6424, 5276, 5276, 6126, 5898, 5276, 5276, 5632, 6626, 6634, 5276, 5276, 6131, 6414, 6108, 5276, 5276, 6395, 5276, 6844, 5276, 5276, 5917, 5276, 6521, 5276, 6395, 6522, 6729, 6846, 5276, 5375, 6502, 6651, 6664, 6672, 6682, 6685, 6689, 6693, 6693, 6693, 6695, 6697, 6697, 6697, 6697, 6701, 6702, 6702, 6702, 6703, 6707, 5276, 6711, 6423, 5276, 5276, 5276, 6735, 5276, 6716, 5276, 7351, 5276, 6727, 5276, 7420, 6268, 6969, 6745, 5276, 5276, 5276, 6785, 5450, 5276, 5276, 5276, 6793, 6743, 6094, 5276, 6750, 6751, 5276, 5276, 5276, 6844, 6212, 5276, 5276, 5276, 6847, 5276, 5276, 6755, 5276, 5276, 6238, 5276, 6524, 6798, 6267, 6759, 6771, 6766, 5276, 5276, 5276, 6877, 5194, 6287, 5276, 7275, 5276, 5276, 6248, 5276, 5276, 6776, 6772, 6767, 6790, 5276, 6792, 5276, 5907, 5276, 6269, 5894, 7260, 7023, 5276, 5276, 5276, 6111, 6392, 6422, 6847, 5276, 6100, 5276, 6888, 5276, 5276, 6521, 5276, 5276, 6194, 7446, 5368, 7418, 5276, 5276, 6293, 5276, 5276, 5276, 6269, 6206, 7033, 6523, 6797, 6266, 5312, 5316, 5276, 5276, 5276, 6921, 5313, 5317, 5276, 5276, 5276, 6933, 6792, 6791, 5276, 5276, 6305, 5304, 6420, 6424, 5276, 5276, 6319, 6922, 5276, 5276, 6118, 5276, 5374, 5276, 5276, 6535, 5276, 5276, 7034, 7452, 6826, 5276, 5908, 5278, 6495, 5276, 6519, 5276, 5276, 5276, 5281, 5255, 6598, 5276, 7033, 5863, 6828, 6852, 5314, 5318, 5276, 5276, 6913, 5276, 5276, 5276, 6958, 6858, 5318, 5276, 5276, 6321, 5800, 6857, 5317, 5276, 5276, 6340, 5802, 6535, 5276, 6862, 5276, 6022, 5753, 5276, 5278, 5276, 5276, 7210, 5276, 6871, 5276, 5276, 5276, 7191, 6199, 6200, 5276, 5276, 5276, 7042, 6425, 5276, 5276, 6876, 6887, 5276, 5367, 6820, 7444, 5276, 6002, 5276, 6194, 7052, 5276, 6637, 6520, 5276, 6536, 5276, 6822, 5276, 5276, 6341, 5276, 7204, 5276, 5276, 5276, 7203, 5367, 5276, 6786, 5276, 5276, 6392, 6921, 6821, 5276, 5276, 6904, 5276, 5276, 6388, 6391, 6480, 5276, 5276, 5276, 7239, 5276, 6478, 5367, 5276, 6095, 5276, 5276, 6394, 5276, 6897, 5276, 5276, 6883, 6535, 5276, 5371, 6904, 5364, 5276, 6894, 5276, 6110, 5276, 5276, 5981, 7461, 7451, 5276, 5276, 5276, 5983, 7470, 5990, 5283, 6536, 6901, 5276, 6114, 5276, 6001, 6911, 5374, 6535, 5368, 5803, 5276, 6392, 6412, 5369, 5276, 5276, 5366, 5364, 6537, 6364, 5364, 5276, 5367, 5371, 5366, 5364, 5276, 5276, 6536, 5365, 5276, 5366, 5276, 5366, 5367, 6538, 6538, 6538, 5773, 5767, 5769, 5771, 5771, 5772, 5276, 7445, 5183, 5276, 5282, 5917, 7454, 6113, 6917, 6942, 7063, 5336, 6951, 6962, 6966, 5531, 6992, 6995, 6995, 6998, 7003, 7002, 7002, 7004, 7008, 7009, 7015, 7013, 7013, 7013, 7013, 7019, 7022, 7030, 5276, 5276, 6115, 5375, 5528, 6927, 5276, 7445, 6842, 7453, 6149, 6156, 6163, 7038, 6983, 5276, 5276, 6392, 7229, 5277, 5276, 5276, 7046, 7060, 5276, 7070, 5276, 6116, 5999, 5276, 6117, 5276, 5276, 5364, 5276, 5276, 5276, 7240, 7085, 5276, 5276, 5276, 7337, 5349, 5276, 6906, 7086, 5276, 6117, 5368, 5276, 5276, 6907, 5276, 7090, 5276, 6120, 5276, 5368, 5389, 6113, 7094, 5276, 5276, 5276, 7338, 6840, 5276, 6782, 7444, 6985, 5276, 5896, 5276, 6197, 5276, 5276, 7024, 5276, 7104, 5277, 5276, 5276, 6947, 6946, 5276, 6378, 5276, 5276, 5276, 7356, 5276, 5276, 7356, 6396, 7111, 7118, 6379, 5276, 7119, 6094, 5276, 5276, 6405, 5872, 5898, 6956, 6954, 5276, 5276, 6422, 6847, 7144, 5276, 5276, 5276, 7363, 5285, 5289, 7113, 7142, 5286, 7148, 7114, 7143, 6201, 5367, 5276, 5276, 6458, 5480, 6298, 7452, 7154, 5276, 5895, 5290, 7159, 7164, 5318, 7066, 5318, 5276, 5276, 6458, 5481, 6301, 6676, 5276, 5276, 6199, 5276, 5276, 5276, 6879, 7180, 5276, 5276, 5276, 7364, 5290, 7174, 7179, 5276, 5276, 7178, 5276, 5276, 5276, 7380, 5740, 7169, 5276, 5276, 6467, 5276, 6677, 6197, 5276, 5924, 7196, 6975, 5276, 5276, 6467, 7049, 5285, 7195, 7185, 6391, 6116, 5276, 5276, 5276, 7208, 7454, 5276, 5276, 6473, 6477, 6526, 5276, 7449, 5276, 6197, 6520, 5276, 7446, 5276, 5375, 7224, 5276, 5276, 5276, 7381, 7214, 5276, 5276, 5276, 7408, 7223, 6847, 5276, 5276, 6479, 5276, 7222, 6425, 5276, 6201, 6886, 6492, 7200, 5276, 6237, 5276, 5276, 6841, 6675, 5276, 5276, 5387, 5276, 5276, 6488, 5276, 6878, 6781, 5276, 5276, 6514, 5276, 5276, 6879, 7230, 5276, 5276, 5276, 7446, 7228, 5276, 5276, 6249, 7452, 5276, 5389, 5276, 6198, 6197, 5276, 6000, 5276, 6238, 5276, 6524, 6201, 5276, 6201, 7449, 5276, 6193, 7445, 5276, 5280, 6209, 6213, 5276, 6520, 5276, 5281, 6065, 6587, 6879, 7455, 5276, 5276, 6525, 6526, 6659, 6079, 7450, 5276, 6395, 7455, 6621, 6847, 5276, 7238, 5276, 6622, 5276, 5276, 6526, 7416, 5276, 6622, 5276, 7247, 6620, 7455, 5276, 5276, 6530, 5276, 7391, 6527, 6621, 6847, 5276, 5276, 6537, 5276, 5276, 6536, 6621, 6847, 7455, 5387, 5388, 6847, 5388, 7344, 5276, 5276, 7229, 7453, 5386, 5423, 5389, 5276, 5276, 6593, 5276, 5388, 5276, 5386, 5388, 7253, 5276, 7258, 7446, 6196, 5276, 5363, 5276, 6210, 6887, 5276, 5894, 5276, 5276, 5276, 5971, 7257, 5276, 5916, 6640, 7264, 6258, 5276, 5189, 5276, 7260, 5916, 7259, 6503, 7097, 7283, 7273, 5724, 7100, 7135, 7279, 6930, 7132, 7289, 7293, 7302, 7295, 7297, 7306, 7298, 7317, 7310, 7311, 7315, 7318, 7326, 7326, 7328, 7324, 7322, 7332, 7335, 5276, 6218, 5750, 5276, 5276, 7362, 7366, 7364, 7342, 5276, 6467, 5389, 5281, 5276, 5276, 6621, 5276, 5276, 6393, 5276, 5915, 5276, 6227, 6476, 5276, 5377, 6746, 5276, 5386, 5276, 5276, 5276, 7449, 5276, 5276, 7360, 7370, 7376, 7385, 5276, 5276, 5276, 7450, 5276, 5276, 6529, 7386, 5276, 6265, 5276, 5276, 5378, 6094, 7392, 5276, 5276, 5276, 7451, 7342, 7445, 6201, 5276, 6266, 5276, 5276, 5382, 5400, 5400, 5400, 5427, 6389, 6113, 5276, 5276, 6235, 6234, 5276, 5276, 5276, 7457, 5276, 6526, 6716, 7433, 7396, 7402, 5276, 5276, 6733, 6739, 7403, 5276, 5276, 5276, 7466, 7408, 7398, 7404, 6844, 5276, 6847, 5276, 6267, 6140, 5276, 5388, 7230, 5276, 5414, 5400, 5400, 5400, 5428, 7342, 7447, 7451, 5276, 6268, 5276, 6237, 6268, 5276, 5276, 7356, 6110, 6268, 5276, 5276, 5276, 5643, 7409, 5986, 7425, 5276, 6292, 5276, 5276, 5740, 7124, 7030, 7410, 5987, 7426, 5276, 6306, 5305, 5276, 5276, 6201, 5276, 5276, 5276, 5739, 7168, 7411, 5988, 7427, 5276, 6323, 7446, 6117, 5276, 5371, 5276, 5276, 7454, 5276, 6887, 5276, 5985, 5989, 6236, 6846, 6003, 5276, 6004, 5276, 6004, 6002, 5276, 6845, 5276, 5276, 5276, 6802, 5311, 6560, 7449, 5276, 5276, 5281, 7200, 5276, 6393, 5276, 7452, 5276, 5276, 5276, 6388, 6113, 5276, 6233, 5836, 5898, 5276, 5276, 7387, 5868, 7434, 5276, 5276, 5276, 6877, 7228, 6201, 5276, 7452, 5962, 5276, 5276, 5276, 6853, 5315, 5898, 5276, 5276, 7431, 5276, 5276, 5276, 6878, 7229, 5984, 7471, 5991, 5276, 6340, 5803, 5276, 5780, 5276, 5990, 5276, 5276, 5276, 6920, 5821, 5982, 7469, 5989, 5276, 6346, 6351, 5276, 5276, 6388, 6113, 5276, 5276, 6946, 5276, 5276, 7438, 5276, 5276, 7024, 5276, 5276, 5276, 7467, 7476, 5276, 5276, 7477, 5276, 5276, 5276, 7025, 5276, 7450, 5276, 5388, 5281, 6279, 5276, 5276, 5622, 5315, 5276, 6389, 6114, 5276, 6347, 6352, 5276, 5276, 5276, 7444, 5276, 5276, 5276, 6945, 7466, 7475, 5276, 5276, 7041, 5276, 5631, 5276, 5388, 5282, 7466, 7462, 5276, 5276, 5276, 7040, 5276, 5276, 5276, 7081, 5276, 5303, 5276, 5276, 5276, 7110, 6654, 0, 0, 1075838976, 2097152, -1845493760, 0, 0, 0x80000000, 16777216, 4194560, 4196352, 270532608, 2097152, 2097152, 268435456, 4194432, 16777216, 4194432, 3145728, 541065216, -2143289344, 4194304, 4194304, 4194304, 4194304, 541065216, 4194304, 4194304, 4194432, 37748736, -1606418432, 541065216, 541065216, 541065216, 541065216, 4194304, 4194304, 4196352, -1606418432, -1606418432, 541065216, 541065216, 4194304, 4198144, 541065216, 541065216, -2143289344, -2143289344, 8425488, 4194304, 4194304, 4194304, 1, 32768, 0, 0x80000000, 16, 33554432, 33554432, 0, 2, 4, 112, 128, 256, 3584, 16384, 37748736, 742391808, 239075328, 775946240, 775946240, 775946240, 171966464, 171966464, 171966464, 171966464, 239075328, 171966464, 775946240, 239075328, 4718592, 64, 4718592, 2097216, 4720640, 541589504, 4194368, 541589504, 4194400, 4194368, -2142763008, 541589504, 541065280, 4194368, 4194368, 541065312, 541065280, -2143289280, 4194368, -2143285408, -2143285408, -2143285440, -2143285440, -2143285440, -2143285440, -1605890240, -2142761152, -2109731008, -1606414528, -2142761152, -1606414528, -2143285440, -2143285440, -1606414528, -1606414528, -2143285440, -2109731008, 776470528, -1908404416, 775946304, -1908404416, 2, 4, 8, 16, 512, 1024, 4194304, 128, 128, 0, 0x80000000, 524288, 5242880, 0x80000000, 0, 0, 2, 12, 64, 256, 2048, 2048, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 4, 16, 224, 256, 512, 1024, 16777216, 16777216, 0, 0, 0x80000000, 65536, 1792, 0, 0, 0, 8, 0, 0, 0, 12, 32, 64, 1024, 2048, 57344, 262144, 50331648, 268435456, 1073741824, 0x80000000, 0, 0, 1536, 64, 524352, 524352, 524352, 0, 0, 0, 62, 64, 128, 64, 262144, 1048576, 0, 0x80000000, 2097152, 0, -2113929216, 0, 0, -1979711488, -1912602624, 64, 64, 1048576, 128, 256, 2048, 262144, 524288, 4096, 1024, 1024, 0, -570425344, 32505856, 0, 0, 48, 25165824, 0, 0, 0, 33554432, 268435456, 0, 0, 0, 524288, 0, 0, 0, 32, 0, 0, 0, 44, 64576, 319029248, 0, 524288, 524288, 524288, 0, 64, 0, 0, 0, 64, 0, 96, 96, 96, 524352, 524352, 524352, 524352, 524288, 524288, 524288, 524288, 64, 64, 0, 64, 128, 128, 128, 128, 2048, 2048, 0, 0, 524288, 524288, 64, 64, 128, 2048, 0, 0, 64, 128, 8388608, 524288, 64, 64, 64, 64, 32, 96, 64, 96, 96, 524352, 96, 160, 1056, 262176, 1048608, 2097184, 4194336, 536870944, 40, 262176, 32, 96, 0, 0, 0, 60, 40, 48, 1120, 96, 96, 64, 524352, 0, 524288, 64, 96, 524352, 0, 524288, 4195360, 6291488, 2097184, 2097184, 4194336, 4194336, 4194336, 32, 56, 0, 4, 16, 32, 64, 128, 256, 1536, 2048, 40, 262184, 40, 40, 40, 40, 40, 262176, 32, 32, 6292512, 4195360, 2097184, 32, 128, 1792, 8192, 16384, 131072, 524288, 4195104, 6292512, 32, 32, 32, 32, 4, 40, 262184, 32, 32, 34, 34, 262184, 40, 4196128, 32, 262144, 524288, 0, 0, 64, 256, 0, 2097152, 135790592, 131073, 4, 393233, 262184, 34, 42, 32, 524320, 32, 1073872896, 32, 32, 40, 1120, 96, 1056, 4194336, 32, 2098208, -322695456, -322695456, -322695456, -322695456, -322597152, -320598176, -322597152, -322597144, -321548576, -320598168, -322597144, -321548568, -37482773, 0, 0, 64, 1536, 32768, -322588952, -321548568, -322588952, -321548568, -322597144, 32, 0, 32, 64, 65536, 0, 96, 32, 32, 56, 262184, 40, 41, 262184, 32, 42, 224, 40, 262176, 42, 106, 293601323, 293601323, 293863467, 293699627, 293617707, 293716011, 293702203, 293702203, 293702203, 297896507, 293702203, 293702203, 293702203, 293702267, 293964347, 293702267, 297896507, 293964347, 297896507, 297896507, -322597144, -37744981, 0, 32, 524288, 0, 0, 64, 2048, 16384, 32768, 0, 0, 262144, 65536, 262144, 262144, 0, 4096, 0, 8, 0, 2, 65536, 262656, 328192, 0, 0, 0, 1536, 32768, 0, 5242880, 0, 0, 0, 1998, 518144, 8388608, -2147418112, 5242880, -1842937664, 201330721, 201330721, -2111369023, -2111369023, -2111369023, -2111369023, -2111360575, -2111369023, -2111369023, -2111369023, -1977151295, -1977151293, -1910042431, -1893265183, -2111368509, -1893265183, -1893265183, -1893265183, -1893265183, -2111368509, -1893265183, -1893265183, -553689472, -553656704, -553689472, -553689472, -553656704, -553656704, -553656704, -553656704, -553656704, -553656672, -553656672, -553656672, -553656672, -536912159, -553656672, -553656672, -553656664, -553656664, -553656672, -553656672, -553656670, -553656672, -553656672, -553656670, -553656608, -553656671, -536879391, -536879391, -536879391, 0, 0, 262656, 0, 0, 65, 1024, 0, 1, 4096, 201326592, 0, 0, 0, 0, 462976, -2113929216, 100663296, 100663296, 2, 4, 8, 64, 128, 512, 2048, 8192, 16384, 458752, 18874368, 463488, 0, 0, 1, 2, 4, 32, 0, 0, 1007232, 15728640, 1040000, 15728640, -570425344, 0, 0, 0, 2014, 0, 0, 0, 32505856, -570425344, 196608, 2097152, 301989888, 0, 0, 80, 268435456, 0, 268435456, 0, 268435456, 268435456, 268435456, 268435456, 0, 0, 0, 4096, 201326592, 0, 0, 96, 2260992, 12288, 0, 0x80000000, 0, 0, 118, 577408, 22020096, 1040187392, 0, 0, 167772160, 234881024, 128, 512, 2048, 196608, 262144, 33554432, 536870912, 0, 0, 0, 557056, 7168, 16384, 196608, 786432, 503316480, 1073741824, 0x80000000, 0, 0, 128, 131072, 524288, 58720256, 402653184, 0, 0, 0, 318767104, 128, 512, 7168, 16384, 32768, 32768, 196608, 786432, 1048576, 2097152, 4194304, 33554432, 268435456, 536870912, 0x80000000, 0, 0, 1, 256, 8388608, 234881024, 268435456, 1073741824, 0x80000000, 4096, 16384, 32768, 131072, 524288, 1048576, 2097152, 4194304, 8388608, 234881024, 0, 0, 201326592, 0, 0, 128, 536870912, 4194304, 512, 3072, 16384, 131072, 524288, 1048576, 4194304, 134217728, 8388608, 33554432, 201326592, 268435456, 1073741824, 0, 1048576, 4194304, 268435456, 4194304, 8388608, 134217728, 268435456, 1073741824, 3072, 131072, 524288, 1048576, 1073741824, 0, 0, 0, 0x80000000, 0, 0, 0, -2147483646, 16384, 18432, 67108864, 1073741824, 16384, 8192, 0, 0, 65536, 262144, 0, 0, 67108864, 0, 0, 0, 32768, 0, 1, 18952, 1024, 0, 0, 192, 0, 0, 0, 65, 1024, 1024, 100663298, 18952, 65, 268436480, 2101248, 524288, 1024, 19017, -1744550912, 8388624, 8388624, 8388624, -1739308032, -1739308032, -1739308032, -1739308032, -1736162288, -1736162288, -1736162288, -1736162288, -7868466, -7868466, -7868466, -7868466, -7868466, -7868450, -7868450, -7868450, -7868450, 0, 0, 0, 65536, 2048, 16384, 67108864, 134217728, 268435456, 0, 0, 1073741824, 18432, 0, 0, 1, 285212672, 0, 585, 0, 0, 2, 8, 16, 64, 128, 3072, 4096, 8192, 65536, 131072, 0, 0, 1024, 5521408, -1744830464, 0, 0, 0, 262144, 0, 0, 0, 1024, 0, 0, 0, 112, 1040, 0, 0, -1744830464, 0, -1744830464, 59238400, -67108864, 0, 0, 0, 327680, 2014, 0, 0, 0, 328192, 518144, 8388608, 50331648, 201326592, 805306368, -1073741824, 768, 1024, 10240, 16384, 32768, 458752, 50331648, 67108864, 134217728, 805306368, 0, 0, 0, 458880, 32768, 458752, 8388608, 50331648, 67108864, 134217728, 67108864, 134217728, 805306368, 1073741824, 0x80000000, 0, 0, 220, 0, 0, 0, 471424, 12, 192, 768, 1024, 2048, 805306368, 1073741824, 0, 0, 2, 204, 768, 1024, 4, 8, 32, 64, 512, 2048, 512, 2048, 16384, 67108864, 0, 0, 458752, 50331648, 67108864, 805306368, -1073741824, 0, 0, 0, 393240, 0, 1048576, 4194304, 0, 0, 16384, 458752, 50331648, 67108864, 536870912, 1073741824, 0, 0, 16384, 0, 0, 0, 256, 0, 0, 0, 512, 0, 0, 0, 585, 16, 0, 0, 1048576, 4194304, 0x80000000, 4, 8, 128, 512, 3072, 16384, 32768, 131072, 512, 0, 0, 4096, 1048576, 0x80000000, 8192, 2097152, 268435456, 0x80000000, 537395200, 537395200, 0, 4196352, 51380242, 51380242, 51380242, 0, 537395200, 4196352, 4196352, 276901888, 8540160, -1606418432, 0, 32768, 537395200, 4196352, 1082130432, 0, 4196352, 537427968, 22022147, 22349827, 22349827, 22349827, 22366219, 22349843, 22349827, 22349827, 22366219, 22349827, 55576594, 55576594, 55576594, 55576594, 55576594, 324012114, 55576594, 55576594, 1062785014, 1062785014, 1062785014, 1062785014, 0, 0, 2, 33554432, 0, 0, 0, 131072, 0, 0, 0, 8192, 8392704, 32768, 268435456, 0, 0, 2, 67108864, 12, 16384, 0, 65536, 0, 22020096, 0, 0, 0, 1040000, 15728640, 0, 0, 329728, 0, 0, 254, 1792, 2809856, 58720256, 19, 0, 0, 0, 1048576, 0, 0, 0, 2048, 0, 0, 0, 18, 33554432, 0, 0, 256, 8192, 0, 0, 8192, 2097152, 0, 0x80000000, 0, 82, 301989888, 0, 0, 0, 2101248, 22020096, 1040187392, 0, 0, 0, 4194304, 0, 0, 0, 16384, 1536, 0, 256, 0, 8192, 2097152, 16, 1048576, 16777216, 33554432, 268435456, 536870912, 0x80000000, 3584, 16384, 32768, 524288, 1048576, 4194304, 0, 0, 8388608, 1073741824, 0, 0, 1536, 2048, 16384, 32768, 524288, 4194304, 134217728, 0, 0, 134217728, 4096, 0, 8, 0, 256, 1536, 16384, 32768, 524288, 128, 536870912, 0, 0, 4, 8, 512, 2048, 0, 0, 1536, 32768, 524288, 4194304, 33554432, 134217728, 536870912, 0, 0, 8192, 2097152, 0x80000000, 0, 0, 512, 2048, 131072, 536870912, 0, 0, 16, 64, 1536, 32768, 32768, 524288, 134217728, 0, 0, 0, 524288, 0, 64, 64, 16392, 1536, 32768, 524288, 0, 0, 33554432, 8192, 0, 65536, 0, 0, 1, 1, 0, 1, 67174400, 33554432, 536870912, -1073741824, 0, 0, 0, 0, 524288, 134217728, 67174400, 0, 0, 0, 16777216, 0, 0, 0, 4, 0, 0, 0, 7, 16, 16384, 8, 8, 0, 0, 512, 3072, 131072, 131072, 268435456, 134217728, 8, 512, 2048, 196608, 262144, 50331648, 536870912, 1073741824, 0, 4, 8, 2048, 8192, 32768, 8388608, 0, 0, 134217736, 16908320, 547389524, 547389524, 555909216, 555909216, 555909216, 555909216, 564297840, 564297844, 564297844, 564297844, 564297844, 1001055742, 1001056254, 1001055742, 1001055742, 1001056254, 1001056254, 1001056254, 1001056254, 1001055742, 1001056254, 1001056254, 1001056254, 1001056254, 0, 1052672, 0x80000000, 0, 0, 4, 16, 0, 0, 84, 2129920, 8388608, 4096, 0, 0, 0, 116, 0, 254, 1280, 2809856, 58720256, 939524096, 0, 0, 0, 50331648, 268435456, 0, 0, 0, 939524096, 0, 0, 520, 1024, 0, 0, 1, 0, 67108864, 1073741824, 0, 0, 0, 20, 64, 32768, 8192, 0, 2048, 0, 2097152, 8388608, 536870912, 0, 0, 1024, 278528, 0, 0, 0, 393232, 163840, 0, 0, 0, 134217728, 0, 0, 0, 16, 0, 0, 0, 15, 208, 15360, 1245184, 52, 0, 0, 0, 268435456, 0, 0, 33554432, 64, 128, 1280, 24576, 163840, 524288, 2097152, 58720256, 402653184, 536870912, 128, 1792, 24576, 163840, 524288, 0, 4, 16, 8388608, 0, 0, 4096, 32768, 262144, 524288, 33554432, 134217728, 0, 0, 24, 32, 128, 1280, 8192, 16384, 8192, 524288, 16777216, 33554432, 402653184, 0, 4, 8, 16, 1024, 2048, 8192, 16384, 32768, 458752, 0, 262144, 33554432, 134217728, 0, 512, 1024, 16777216, 33554432, 402653184, 0, 4096, 1048576, 0, 0, 1998, 59238400, -67108864, 4, 8, 16, 402653184, 0, 0, 8, 16, 402653184, 536870912, 0, 0, 4, 64, 128, 8388608, 0, 0, 67108866, 12, 64, 128, 512, 1024, 4, 16384, 65536, 67108864, 0, 65536, 0, 0, 2048, 64, 64, 64, 96, 96, 96, 96, 0, 8192, 8192, 268435460, 32768, 65536, 2490368, 16777216, 0x80000000, 0, 0, 1, 4, 8, 2048, 8192, 3670016, 2048, 2048, 2048, 2048, 0, 8192, 34816, 9216, 4096, 0, 128, 0, 2097152, 0, 0, 4096, 4096, 29696, 29712, 29840, 29712, 29712, 29840, 29840, 536900624, 4224144, 144384, 144384, 144384, 144384, -754647956, -754647956, -754647956, -754647956, -754647956, -754647940, -754647940, -754647940, -754647940, -754516884, -754647956, -754516884, -754516884, -754516884, 4, 8, 256, 512, 2048, 0, 0, 3670016, 0, 0, 2048, 131072, 524288, 4194304, 0x80000000, 0, 0, 9216, 0, 0, 4, 134217728, 0, 29696, 0, 0, 4, 268435456, 0, 16, 0, 29824, 0, 60, 64576, 319029248, -1073741824, 0, 0, 319160320, 0, 0, 0, 319160320, 0, 0, 524288, 3145728, 0, 12288, 131072, 0, 8, 131072, 61440, 262144, 318767104, -1073741824, 0, 0, 64, 1024, 2048, 61440, 262144, 0, 28, 32, 64, 64, 64, 128, 0, 0, 16384, 32768, 50331648, 268435456, 0, 0, 0, 393216, 0, 0, 0, 486539264, 0, 128, 0, 536870912, 0, 0, 12, 16, 32, 327155712, 34, 1056, 32, 32, 42, 4457568, -326784344, -322851160, -322698144, -322698144, -322698144, -322698144, -322695456, 0, 0, 524288, 1048576, 0, 0, 0, 536870912, 4194304, 131072, 0, 0, 6, 56, 128, 1792, 2, 67108864, 16384, 0, 0, 4096, 4194304, 32768, 0, 0, 0, 8388608, 0, 0, 0, 72, 0, 8, 64, 2048, 57344, 16384, 32768, 262144, 50331648, 268435456, 0, 524288, 1048576, 2097152, 4194304, 134217728, 0x80000000, 0, 0, 50331648, 268435456, 0x80000000, 0, 0, 1, 0, 0, 2, 4, 16, 64, 1, 0, 2, 0, 0, 65536, 0, 0, 0, 1040, 8667136, 0, 131072, 131072, 0, 131072, 0, 131072, 0, 0, 524288, 536870912, 131072, 0, 0, 7, 27756528, -503316480, 0, 256, 0, 2048, 32768, 8388608, 262144, 2113536, 0, 0, 8, 16, 512, 402653184, 0, 0, 0, 256, 32768, 0, 0, 4224, 65536, 262144, 1048576, 4194304, 16777216, 33554432, 67108864, 134217728, 0, 0, 256, 262144, 0, 0, 8192, 268435456, 0, 0, 0, 4, 131073, 0, 0, 9728, 268435456, 0, 0, 16, 393216, 0, 131073, 131073, 33554624, 4, 0, 131073, 0, 0, 13312, 131072, 4194304, -2146430976, 131072, 2097152, 16777216, 0, 0, 512, 131072, 1048576, 2097152, 0, 1572864, 0, 0, 0, 0x80000000, 524288, 0, 1610612736, 1610612736, 1610612736, 393241, 393241, 393241, 393241, 805707793, 805707793, 1879449617, 805708049, 1879449617, 1879449617, 1879449617, 1879449617, -483948553, -475559945, -483948553, -475559945, -483948553, -483948553, -475559945, -475559945, -475559945, -475559945, -483948553, -483948553, -215504905, -475559945, -207116297, -207116297, 0, 0, 0, 1073741824, 0, 0, 2097152, 67108864, 134217728, 536870912, 0, 0, 24576, 0, 0, 0, 2113536, 0, 0, 8, 64, 0, 0, 0, 401424, 805306368, 0, 0, 28672, 0, 0, 4096, 2097152, 4194304, 8388608, 503316480, 1073741824, 0, 0, 1879048192, 0, 0, 32768, 2097152, 8388608, 16777216, 33554432, 0, 401680, 0, 0, 8, 512, 2048, 131072, 33554432, 536870912, 0, 0, 7, 19367920, -503316480, 27756528, -503316480, 0, 0, 0, 0, 0, 19376112, -234881024, 0, 27764720, -234881024, 0, 0, 32768, 33554436, 0, 0, 33554436, 24, 0, 0, 0, 11, 346112, 7, 16, 480, 1536, 32768, 65536, 393216, 10485760, 65536, 10878976, 16777216, 33554432, 536870912, 4, 32, 524288, 1048576, 33554432, 67108864, 65536, 393216, 2097152, 16777216, 262400, 65536, 4224, 4224, 0, 65536, 201326592, 0x80000000, 393216, 10485760, 16777216, 33554432, 1073741824, 0x80000000, 0, 16, 224, 256, 1536, 32768, 65536, 0, 16384, 2097152, 0, 0, 1024, 32768, 65536, 131072, 262144, 262144, 2097152, 16777216, 33554432, 4, 32, 524288, 134217728, 0, 512, 32768, 131072, 262144, 2097152, 2097152, 8388608, 16777216, 1073741824, 0, 0, 512, 32768, 131072, 2097152, 8388608, 8388608, 16777216, 0, 0, 16, 33554432, 4, 16, 224, 512, 32768, 4, 524288, 134217728, 0, 0, 32768, 50331648, 268435456, 4096, 32768, 0, 0, 16, 536870912, 16, 192, 32768, 8388608, 4096, 4096, 4096, 1536, 2, 4, 16, 192, 32768, 0, 16, 64, 128, 8388608, 0, 0, 0, 2, 4, 134217728, 4, 0, 0, 128, 512, 3072, 4096, 16384, 131072, 4, 128, 0, 0, 18, 17825792, 524288, 8388608, 33554432, 0x80000000, 8192, 0, 33554432, 0, 0, 33554432, 0, 0, 0, 268435456, 2, 4, 8, 262144, 262144, 1048576, 2048, 32768, 0, 0, 28, 0, 100663296, 4224, 65536, 65536, 262144, 33554432, 0, 2, 4, 24, -1072627712, 805306384, -1342177264, -1342177264, -1070006272, -1070006272, -1069989376, -1069989376, -258932720, -258932720, -258932720, -258932720, -225378288, -1069989376, -1069989360, -1065795072, -1061600768, -258932720, -225378288, -258932720, -258932720, 1260767, 34815199, 1260767, 34815199, 1260767, 34815199, 34815199, 1260767, 1260767, 34815199, 1260767, 1260767, 169032927, -1978450721, 169032927, -1978450721, 169032927, 169032927, 169032927, 169032927, 1242774751, -1978450721, -1978450721, -225231649, -1173144353, -225231649, -91013921, 0, 0, 32, 128, 256, 262144, 524288, 8388608, 0, 64, 0, 0, 1114112, 1073741824, 0, 0, 34816, 0, 0, 2048, 4194304, 0, 0, 0, 3735552, 0, 0, 32, 512, 2048, 32768, 262144, 524288, 3751936, 0, 0, 0, 48, 0, 0, 528, 7946240, 12140544, 9502720, 1610612736, 0, 0, 0, 15360, 1245184, 0, 0, 134217728, 128, 15, 9633792, 0, 0, 0, 2, 12, 80, 128, 7168, 8192, 7168, 8192, 196608, 1048576, 0, 0, 0, 1, 2, 12, 16, 64, 128, 256, 0, 0, 3145728, 0, 0, 0, 536870912, 0, 0, 8192, 65536, 131072, 1048576, 0, 0, 0, 2097152, 0, 16384, 0, 4194304, 0, 0, 2097152, 16384, 0, 0, 131072, 2097152, 0, 0, 0, 4096, 0, 0, 8192, 0, 0, 0, 128, 0, 0, 0, 208, 0, 64, 128, 1024, 4096, 0, 0, 2, 8, 64, 128, 1024, 2048, 4096, 8192, 128, 1024, 4096, 8192, 0, 0
+];
+
+JSONiqParser.TOKEN =
+[
+ "(0)",
+ "PragmaContents",
+ "DirCommentContents",
+ "DirPIContents",
+ "CDataSection",
+ "Wildcard",
+ "EQName",
+ "URILiteral",
+ "IntegerLiteral",
+ "DecimalLiteral",
+ "DoubleLiteral",
+ "StringLiteral",
+ "PredefinedEntityRef",
+ "'\"\"'",
+ "EscapeApos",
+ "ElementContentChar",
+ "QuotAttrContentChar",
+ "AposAttrContentChar",
+ "PITarget",
+ "NCName",
+ "QName",
+ "S",
+ "S",
+ "CharRef",
+ "CommentContents",
+ "EOF",
+ "'!'",
+ "'!='",
+ "'\"'",
+ "'#'",
+ "'#)'",
+ "'$'",
+ "'$$'",
+ "'%'",
+ "''''",
+ "'('",
+ "'(#'",
+ "'(:'",
+ "')'",
+ "'*'",
+ "'*'",
+ "'+'",
+ "','",
+ "'-'",
+ "'-->'",
+ "'.'",
+ "'..'",
+ "'/'",
+ "'//'",
+ "'/>'",
+ "':'",
+ "':)'",
+ "'::'",
+ "':='",
+ "';'",
+ "'<'",
+ "'<!--'",
+ "'</'",
+ "'<<'",
+ "'<='",
+ "'<?'",
+ "'='",
+ "'>'",
+ "'>='",
+ "'>>'",
+ "'?'",
+ "'?>'",
+ "'@'",
+ "'NaN'",
+ "'['",
+ "']'",
+ "'after'",
+ "'all'",
+ "'allowing'",
+ "'ancestor'",
+ "'ancestor-or-self'",
+ "'and'",
+ "'any'",
+ "'append'",
+ "'array'",
+ "'as'",
+ "'ascending'",
+ "'at'",
+ "'attribute'",
+ "'base-uri'",
+ "'before'",
+ "'boundary-space'",
+ "'break'",
+ "'by'",
+ "'case'",
+ "'cast'",
+ "'castable'",
+ "'catch'",
+ "'check'",
+ "'child'",
+ "'collation'",
+ "'collection'",
+ "'comment'",
+ "'constraint'",
+ "'construction'",
+ "'contains'",
+ "'content'",
+ "'context'",
+ "'continue'",
+ "'copy'",
+ "'copy-namespaces'",
+ "'count'",
+ "'decimal-format'",
+ "'decimal-separator'",
+ "'declare'",
+ "'default'",
+ "'delete'",
+ "'descendant'",
+ "'descendant-or-self'",
+ "'descending'",
+ "'diacritics'",
+ "'different'",
+ "'digit'",
+ "'distance'",
+ "'div'",
+ "'document'",
+ "'document-node'",
+ "'element'",
+ "'else'",
+ "'empty'",
+ "'empty-sequence'",
+ "'encoding'",
+ "'end'",
+ "'entire'",
+ "'eq'",
+ "'every'",
+ "'exactly'",
+ "'except'",
+ "'exit'",
+ "'external'",
+ "'false'",
+ "'first'",
+ "'following'",
+ "'following-sibling'",
+ "'for'",
+ "'foreach'",
+ "'foreign'",
+ "'from'",
+ "'ft-option'",
+ "'ftand'",
+ "'ftnot'",
+ "'ftor'",
+ "'function'",
+ "'ge'",
+ "'greatest'",
+ "'group'",
+ "'grouping-separator'",
+ "'gt'",
+ "'idiv'",
+ "'if'",
+ "'import'",
+ "'in'",
+ "'index'",
+ "'infinity'",
+ "'inherit'",
+ "'insensitive'",
+ "'insert'",
+ "'instance'",
+ "'integrity'",
+ "'intersect'",
+ "'into'",
+ "'is'",
+ "'item'",
+ "'json'",
+ "'json-item'",
+ "'jsoniq'",
+ "'key'",
+ "'language'",
+ "'last'",
+ "'lax'",
+ "'le'",
+ "'least'",
+ "'let'",
+ "'levels'",
+ "'loop'",
+ "'lowercase'",
+ "'lt'",
+ "'minus-sign'",
+ "'mod'",
+ "'modify'",
+ "'module'",
+ "'most'",
+ "'namespace'",
+ "'namespace-node'",
+ "'ne'",
+ "'next'",
+ "'no'",
+ "'no-inherit'",
+ "'no-preserve'",
+ "'node'",
+ "'nodes'",
+ "'not'",
+ "'null'",
+ "'object'",
+ "'occurs'",
+ "'of'",
+ "'on'",
+ "'only'",
+ "'option'",
+ "'or'",
+ "'order'",
+ "'ordered'",
+ "'ordering'",
+ "'paragraph'",
+ "'paragraphs'",
+ "'parent'",
+ "'pattern-separator'",
+ "'per-mille'",
+ "'percent'",
+ "'phrase'",
+ "'position'",
+ "'preceding'",
+ "'preceding-sibling'",
+ "'preserve'",
+ "'previous'",
+ "'processing-instruction'",
+ "'relationship'",
+ "'rename'",
+ "'replace'",
+ "'return'",
+ "'returning'",
+ "'revalidation'",
+ "'same'",
+ "'satisfies'",
+ "'schema'",
+ "'schema-attribute'",
+ "'schema-element'",
+ "'score'",
+ "'select'",
+ "'self'",
+ "'sensitive'",
+ "'sentence'",
+ "'sentences'",
+ "'skip'",
+ "'sliding'",
+ "'some'",
+ "'stable'",
+ "'start'",
+ "'stemming'",
+ "'stop'",
+ "'strict'",
+ "'strip'",
+ "'structured-item'",
+ "'switch'",
+ "'text'",
+ "'then'",
+ "'thesaurus'",
+ "'times'",
+ "'to'",
+ "'treat'",
+ "'true'",
+ "'try'",
+ "'tumbling'",
+ "'type'",
+ "'typeswitch'",
+ "'union'",
+ "'unique'",
+ "'unordered'",
+ "'updating'",
+ "'uppercase'",
+ "'using'",
+ "'validate'",
+ "'value'",
+ "'variable'",
+ "'version'",
+ "'weight'",
+ "'when'",
+ "'where'",
+ "'while'",
+ "'wildcards'",
+ "'window'",
+ "'with'",
+ "'without'",
+ "'word'",
+ "'words'",
+ "'zero-digit'",
+ "'{'",
+ "'{{'",
+ "'{|'",
+ "'|'",
+ "'||'",
+ "'|}'",
+ "'}'",
+ "'}}'"
+];
+
+},
+{}],
+10:[function(require,module,exports){
var XQueryParser = exports.XQueryParser = function XQueryParser(string, parsingEventHandler)
{
init(string, parsingEventHandler);
@@ -2186,7 +28193,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function reset(l, b, e)
{
- b0 = b; e0 = b;
+ b0 = b; e0 = b;
l1 = l; b1 = b; e1 = e;
l2 = 0;
end = e;
@@ -2238,7 +28245,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
this.parse_XQuery = function()
{
eventHandler.startNonterminal("XQuery", e0);
- lookahead1W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(275); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_Module();
shift(25); // EOF
@@ -2261,7 +28268,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
parse_VersionDecl();
}
- lookahead1W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(275); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
switch (l1)
{
case 182: // 'module'
@@ -2329,7 +28336,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(182); // 'module'
lookahead1W(61); // S^WS | '(:' | 'namespace'
shift(184); // 'namespace'
- lookahead1W(247); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(249); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_NCName();
lookahead1W(29); // S^WS | '(:' | '='
@@ -2347,14 +28354,14 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
eventHandler.startNonterminal("Prolog", e0);
for (;;)
{
- lookahead1W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(275); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
switch (l1)
{
case 108: // 'declare'
- lookahead2W(213); // S^WS | EOF | '!' | '!=' | '#' | '%' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(214); // S^WS | EOF | '!' | '!=' | '#' | '%' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
break;
case 153: // 'import'
- lookahead2W(201); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(202); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
default:
lk = l1;
@@ -2377,7 +28384,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 108: // 'declare'
- lookahead2W(178); // S^WS | '(:' | 'base-uri' | 'boundary-space' | 'construction' |
+ lookahead2W(179); // S^WS | '(:' | 'base-uri' | 'boundary-space' | 'construction' |
break;
default:
lk = l1;
@@ -2433,11 +28440,11 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
for (;;)
{
- lookahead1W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(275); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
switch (l1)
{
case 108: // 'declare'
- lookahead2W(210); // S^WS | EOF | '!' | '!=' | '#' | '%' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(211); // S^WS | EOF | '!' | '!=' | '#' | '%' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
break;
default:
lk = l1;
@@ -2752,7 +28759,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 106: // 'decimal-format'
shift(106); // 'decimal-format'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_EQName();
break;
@@ -2763,7 +28770,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
for (;;)
{
- lookahead1W(180); // S^WS | '(:' | ';' | 'NaN' | 'decimal-separator' | 'digit' |
+ lookahead1W(181); // S^WS | '(:' | ';' | 'NaN' | 'decimal-separator' | 'digit' |
if (l1 == 53) // ';'
{
break;
@@ -2880,7 +28887,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 184: // 'namespace'
shift(184); // 'namespace'
- lookahead1W(247); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(249); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_NCName();
lookahead1W(29); // S^WS | '(:' | '='
@@ -2906,7 +28913,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 184) // 'namespace'
{
shift(184); // 'namespace'
- lookahead1W(247); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(249); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_NCName();
lookahead1W(29); // S^WS | '(:' | '='
@@ -2941,7 +28948,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(108); // 'declare'
lookahead1W(61); // S^WS | '(:' | 'namespace'
shift(184); // 'namespace'
- lookahead1W(247); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(249); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_NCName();
lookahead1W(29); // S^WS | '(:' | '='
@@ -3064,7 +29071,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("Annotation", e0);
shift(32); // '%'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_EQName();
lookahead1W(171); // S^WS | '%' | '(' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
@@ -3094,7 +29101,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_Annotation()
{
shiftT(32); // '%'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_EQName();
lookahead1W(171); // S^WS | '%' | '(' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
if (l1 == 34) // '('
@@ -3123,7 +29130,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(262); // 'variable'
lookahead1W(21); // S^WS | '$' | '(:'
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
lookahead1W(147); // S^WS | '(:' | ':=' | 'as' | 'external'
@@ -3181,7 +29188,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 79) // 'as'
{
shift(79); // 'as'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_ItemType();
}
@@ -3247,7 +29254,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("Param", e0);
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_EQName();
lookahead1W(143); // S^WS | '(:' | ')' | ',' | 'as'
@@ -3262,7 +29269,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_Param()
{
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_EQName();
lookahead1W(143); // S^WS | '(:' | ')' | ',' | 'as'
if (l1 == 79) // 'as'
@@ -3308,7 +29315,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(108); // 'declare'
lookahead1W(66); // S^WS | '(:' | 'option'
shift(199); // 'option'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_EQName();
lookahead1W(17); // StringLiteral | S^WS | '(:'
@@ -3519,7 +29526,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("ForBinding", e0);
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
lookahead1W(164); // S^WS | '(:' | 'allowing' | 'as' | 'at' | 'in' | 'score'
@@ -3557,7 +29564,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_ForBinding()
{
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
lookahead1W(164); // S^WS | '(:' | 'allowing' | 'as' | 'at' | 'in' | 'score'
if (l1 == 79) // 'as'
@@ -3607,7 +29614,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(81); // 'at'
lookahead1W(21); // S^WS | '$' | '(:'
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
eventHandler.endNonterminal("PositionalVar", e0);
@@ -3618,7 +29625,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(81); // 'at'
lookahead1W(21); // S^WS | '$' | '(:'
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
}
@@ -3628,7 +29635,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(228); // 'score'
lookahead1W(21); // S^WS | '$' | '(:'
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
eventHandler.endNonterminal("FTScoreVar", e0);
@@ -3639,7 +29646,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(228); // 'score'
lookahead1W(21); // S^WS | '$' | '(:'
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
}
@@ -3688,7 +29695,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 31: // '$'
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
lookahead1W(105); // S^WS | '(:' | ':=' | 'as'
@@ -3715,7 +29722,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 31: // '$'
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
lookahead1W(105); // S^WS | '(:' | ':=' | 'as'
if (l1 == 79) // 'as'
@@ -3772,7 +29779,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(269); // 'window'
lookahead1W(21); // S^WS | '$' | '(:'
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
@@ -3804,7 +29811,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(269); // 'window'
lookahead1W(21); // S^WS | '$' | '(:'
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
if (l1 == 79) // 'as'
@@ -3831,7 +29838,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(269); // 'window'
lookahead1W(21); // S^WS | '$' | '(:'
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
@@ -3859,7 +29866,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(269); // 'window'
lookahead1W(21); // S^WS | '$' | '(:'
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
if (l1 == 79) // 'as'
@@ -3942,7 +29949,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 31) // '$'
{
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_CurrentItem();
}
@@ -3958,7 +29965,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(215); // 'previous'
lookahead1W(21); // S^WS | '$' | '(:'
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_PreviousItem();
}
@@ -3968,7 +29975,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(187); // 'next'
lookahead1W(21); // S^WS | '$' | '(:'
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_NextItem();
}
@@ -3980,7 +29987,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 31) // '$'
{
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_CurrentItem();
}
lookahead1W(159); // S^WS | '(:' | 'at' | 'next' | 'previous' | 'when'
@@ -3994,7 +30001,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(215); // 'previous'
lookahead1W(21); // S^WS | '$' | '(:'
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_PreviousItem();
}
lookahead1W(127); // S^WS | '(:' | 'next' | 'when'
@@ -4003,7 +30010,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(187); // 'next'
lookahead1W(21); // S^WS | '$' | '(:'
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_NextItem();
}
}
@@ -4050,7 +30057,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(105); // 'count'
lookahead1W(21); // S^WS | '$' | '(:'
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
eventHandler.endNonterminal("CountClause", e0);
@@ -4061,7 +30068,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(105); // 'count'
lookahead1W(21); // S^WS | '$' | '(:'
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
}
@@ -4088,7 +30095,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(148); // 'group'
lookahead1W(34); // S^WS | '(:' | 'by'
shift(87); // 'by'
- lookahead1W(21); // S^WS | '$' | '(:'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_GroupingSpecList();
eventHandler.endNonterminal("GroupByClause", e0);
@@ -4099,7 +30106,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(148); // 'group'
lookahead1W(34); // S^WS | '(:' | 'by'
shiftT(87); // 'by'
- lookahead1W(21); // S^WS | '$' | '(:'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_GroupingSpecList();
}
@@ -4115,7 +30122,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shift(41); // ','
- lookahead1W(21); // S^WS | '$' | '(:'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_GroupingSpec();
}
@@ -4133,7 +30140,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shiftT(41); // ','
- lookahead1W(21); // S^WS | '$' | '(:'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_GroupingSpec();
}
}
@@ -4141,52 +30148,437 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function parse_GroupingSpec()
{
eventHandler.startNonterminal("GroupingSpec", e0);
- parse_GroupingVariable();
- lookahead1W(182); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
- if (l1 == 52 // ':='
- || l1 == 79) // 'as'
+ switch (l1)
{
- if (l1 == 79) // 'as'
+ case 31: // '$'
+ lookahead2W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 3103 // '$' EQName^Token
+ || lk == 35871 // '$' 'after'
+ || lk == 36895 // '$' 'allowing'
+ || lk == 37407 // '$' 'ancestor'
+ || lk == 37919 // '$' 'ancestor-or-self'
+ || lk == 38431 // '$' 'and'
+ || lk == 39455 // '$' 'append'
+ || lk == 39967 // '$' 'array'
+ || lk == 40479 // '$' 'as'
+ || lk == 40991 // '$' 'ascending'
+ || lk == 41503 // '$' 'at'
+ || lk == 42015 // '$' 'attribute'
+ || lk == 42527 // '$' 'base-uri'
+ || lk == 43039 // '$' 'before'
+ || lk == 43551 // '$' 'boundary-space'
+ || lk == 44063 // '$' 'break'
+ || lk == 45087 // '$' 'case'
+ || lk == 45599 // '$' 'cast'
+ || lk == 46111 // '$' 'castable'
+ || lk == 46623 // '$' 'catch'
+ || lk == 47647 // '$' 'child'
+ || lk == 48159 // '$' 'collation'
+ || lk == 49183 // '$' 'comment'
+ || lk == 49695 // '$' 'constraint'
+ || lk == 50207 // '$' 'construction'
+ || lk == 51743 // '$' 'context'
+ || lk == 52255 // '$' 'continue'
+ || lk == 52767 // '$' 'copy'
+ || lk == 53279 // '$' 'copy-namespaces'
+ || lk == 53791 // '$' 'count'
+ || lk == 54303 // '$' 'decimal-format'
+ || lk == 55327 // '$' 'declare'
+ || lk == 55839 // '$' 'default'
+ || lk == 56351 // '$' 'delete'
+ || lk == 56863 // '$' 'descendant'
+ || lk == 57375 // '$' 'descendant-or-self'
+ || lk == 57887 // '$' 'descending'
+ || lk == 60447 // '$' 'div'
+ || lk == 60959 // '$' 'document'
+ || lk == 61471 // '$' 'document-node'
+ || lk == 61983 // '$' 'element'
+ || lk == 62495 // '$' 'else'
+ || lk == 63007 // '$' 'empty'
+ || lk == 63519 // '$' 'empty-sequence'
+ || lk == 64031 // '$' 'encoding'
+ || lk == 64543 // '$' 'end'
+ || lk == 65567 // '$' 'eq'
+ || lk == 66079 // '$' 'every'
+ || lk == 67103 // '$' 'except'
+ || lk == 67615 // '$' 'exit'
+ || lk == 68127 // '$' 'external'
+ || lk == 68639 // '$' 'first'
+ || lk == 69151 // '$' 'following'
+ || lk == 69663 // '$' 'following-sibling'
+ || lk == 70175 // '$' 'for'
+ || lk == 72223 // '$' 'ft-option'
+ || lk == 74271 // '$' 'function'
+ || lk == 74783 // '$' 'ge'
+ || lk == 75807 // '$' 'group'
+ || lk == 76831 // '$' 'gt'
+ || lk == 77343 // '$' 'idiv'
+ || lk == 77855 // '$' 'if'
+ || lk == 78367 // '$' 'import'
+ || lk == 78879 // '$' 'in'
+ || lk == 79391 // '$' 'index'
+ || lk == 81439 // '$' 'insert'
+ || lk == 81951 // '$' 'instance'
+ || lk == 82463 // '$' 'integrity'
+ || lk == 82975 // '$' 'intersect'
+ || lk == 83487 // '$' 'into'
+ || lk == 83999 // '$' 'is'
+ || lk == 84511 // '$' 'item'
+ || lk == 85023 // '$' 'json'
+ || lk == 85535 // '$' 'json-item'
+ || lk == 87071 // '$' 'last'
+ || lk == 87583 // '$' 'lax'
+ || lk == 88095 // '$' 'le'
+ || lk == 89119 // '$' 'let'
+ || lk == 90143 // '$' 'loop'
+ || lk == 91167 // '$' 'lt'
+ || lk == 92191 // '$' 'mod'
+ || lk == 92703 // '$' 'modify'
+ || lk == 93215 // '$' 'module'
+ || lk == 94239 // '$' 'namespace'
+ || lk == 94751 // '$' 'namespace-node'
+ || lk == 95263 // '$' 'ne'
+ || lk == 97823 // '$' 'node'
+ || lk == 98335 // '$' 'nodes'
+ || lk == 99359 // '$' 'object'
+ || lk == 101407 // '$' 'only'
+ || lk == 101919 // '$' 'option'
+ || lk == 102431 // '$' 'or'
+ || lk == 102943 // '$' 'order'
+ || lk == 103455 // '$' 'ordered'
+ || lk == 103967 // '$' 'ordering'
+ || lk == 105503 // '$' 'parent'
+ || lk == 108575 // '$' 'preceding'
+ || lk == 109087 // '$' 'preceding-sibling'
+ || lk == 110623 // '$' 'processing-instruction'
+ || lk == 111647 // '$' 'rename'
+ || lk == 112159 // '$' 'replace'
+ || lk == 112671 // '$' 'return'
+ || lk == 113183 // '$' 'returning'
+ || lk == 113695 // '$' 'revalidation'
+ || lk == 114719 // '$' 'satisfies'
+ || lk == 115231 // '$' 'schema'
+ || lk == 115743 // '$' 'schema-attribute'
+ || lk == 116255 // '$' 'schema-element'
+ || lk == 116767 // '$' 'score'
+ || lk == 117279 // '$' 'self'
+ || lk == 119839 // '$' 'sliding'
+ || lk == 120351 // '$' 'some'
+ || lk == 120863 // '$' 'stable'
+ || lk == 121375 // '$' 'start'
+ || lk == 122911 // '$' 'strict'
+ || lk == 123935 // '$' 'structured-item'
+ || lk == 124447 // '$' 'switch'
+ || lk == 124959 // '$' 'text'
+ || lk == 127007 // '$' 'to'
+ || lk == 127519 // '$' 'treat'
+ || lk == 128031 // '$' 'try'
+ || lk == 128543 // '$' 'tumbling'
+ || lk == 129055 // '$' 'type'
+ || lk == 129567 // '$' 'typeswitch'
+ || lk == 130079 // '$' 'union'
+ || lk == 131103 // '$' 'unordered'
+ || lk == 131615 // '$' 'updating'
+ || lk == 133151 // '$' 'validate'
+ || lk == 133663 // '$' 'value'
+ || lk == 134175 // '$' 'variable'
+ || lk == 134687 // '$' 'version'
+ || lk == 136223 // '$' 'where'
+ || lk == 136735 // '$' 'while'
+ || lk == 138271 // '$' 'with'
+ || lk == 140319) // '$' 'xquery'
+ {
+ lk = memoized(2, e0);
+ if (lk == 0)
{
- whitespace();
- parse_TypeDeclaration();
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_GroupingVariable();
+ lookahead1W(183); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 52 // ':='
+ || l1 == 79) // 'as'
+ {
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+ if (l1 == 94) // 'collation'
+ {
+ shiftT(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(2, e0, lk);
}
- lookahead1W(27); // S^WS | '(:' | ':='
- shift(52); // ':='
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- whitespace();
- parse_ExprSingle();
}
- if (l1 == 94) // 'collation'
+ switch (lk)
{
- shift(94); // 'collation'
- lookahead1W(15); // URILiteral | S^WS | '(:'
- shift(7); // URILiteral
+ case -1:
+ parse_GroupingVariable();
+ lookahead1W(183); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 52 // ':='
+ || l1 == 79) // 'as'
+ {
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shift(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ if (l1 == 94) // 'collation'
+ {
+ shift(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ break;
+ default:
+ parse_ExprSingle();
}
eventHandler.endNonterminal("GroupingSpec", e0);
}
function try_GroupingSpec()
{
- try_GroupingVariable();
- lookahead1W(182); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
- if (l1 == 52 // ':='
- || l1 == 79) // 'as'
+ switch (l1)
{
- if (l1 == 79) // 'as'
+ case 31: // '$'
+ lookahead2W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 3103 // '$' EQName^Token
+ || lk == 35871 // '$' 'after'
+ || lk == 36895 // '$' 'allowing'
+ || lk == 37407 // '$' 'ancestor'
+ || lk == 37919 // '$' 'ancestor-or-self'
+ || lk == 38431 // '$' 'and'
+ || lk == 39455 // '$' 'append'
+ || lk == 39967 // '$' 'array'
+ || lk == 40479 // '$' 'as'
+ || lk == 40991 // '$' 'ascending'
+ || lk == 41503 // '$' 'at'
+ || lk == 42015 // '$' 'attribute'
+ || lk == 42527 // '$' 'base-uri'
+ || lk == 43039 // '$' 'before'
+ || lk == 43551 // '$' 'boundary-space'
+ || lk == 44063 // '$' 'break'
+ || lk == 45087 // '$' 'case'
+ || lk == 45599 // '$' 'cast'
+ || lk == 46111 // '$' 'castable'
+ || lk == 46623 // '$' 'catch'
+ || lk == 47647 // '$' 'child'
+ || lk == 48159 // '$' 'collation'
+ || lk == 49183 // '$' 'comment'
+ || lk == 49695 // '$' 'constraint'
+ || lk == 50207 // '$' 'construction'
+ || lk == 51743 // '$' 'context'
+ || lk == 52255 // '$' 'continue'
+ || lk == 52767 // '$' 'copy'
+ || lk == 53279 // '$' 'copy-namespaces'
+ || lk == 53791 // '$' 'count'
+ || lk == 54303 // '$' 'decimal-format'
+ || lk == 55327 // '$' 'declare'
+ || lk == 55839 // '$' 'default'
+ || lk == 56351 // '$' 'delete'
+ || lk == 56863 // '$' 'descendant'
+ || lk == 57375 // '$' 'descendant-or-self'
+ || lk == 57887 // '$' 'descending'
+ || lk == 60447 // '$' 'div'
+ || lk == 60959 // '$' 'document'
+ || lk == 61471 // '$' 'document-node'
+ || lk == 61983 // '$' 'element'
+ || lk == 62495 // '$' 'else'
+ || lk == 63007 // '$' 'empty'
+ || lk == 63519 // '$' 'empty-sequence'
+ || lk == 64031 // '$' 'encoding'
+ || lk == 64543 // '$' 'end'
+ || lk == 65567 // '$' 'eq'
+ || lk == 66079 // '$' 'every'
+ || lk == 67103 // '$' 'except'
+ || lk == 67615 // '$' 'exit'
+ || lk == 68127 // '$' 'external'
+ || lk == 68639 // '$' 'first'
+ || lk == 69151 // '$' 'following'
+ || lk == 69663 // '$' 'following-sibling'
+ || lk == 70175 // '$' 'for'
+ || lk == 72223 // '$' 'ft-option'
+ || lk == 74271 // '$' 'function'
+ || lk == 74783 // '$' 'ge'
+ || lk == 75807 // '$' 'group'
+ || lk == 76831 // '$' 'gt'
+ || lk == 77343 // '$' 'idiv'
+ || lk == 77855 // '$' 'if'
+ || lk == 78367 // '$' 'import'
+ || lk == 78879 // '$' 'in'
+ || lk == 79391 // '$' 'index'
+ || lk == 81439 // '$' 'insert'
+ || lk == 81951 // '$' 'instance'
+ || lk == 82463 // '$' 'integrity'
+ || lk == 82975 // '$' 'intersect'
+ || lk == 83487 // '$' 'into'
+ || lk == 83999 // '$' 'is'
+ || lk == 84511 // '$' 'item'
+ || lk == 85023 // '$' 'json'
+ || lk == 85535 // '$' 'json-item'
+ || lk == 87071 // '$' 'last'
+ || lk == 87583 // '$' 'lax'
+ || lk == 88095 // '$' 'le'
+ || lk == 89119 // '$' 'let'
+ || lk == 90143 // '$' 'loop'
+ || lk == 91167 // '$' 'lt'
+ || lk == 92191 // '$' 'mod'
+ || lk == 92703 // '$' 'modify'
+ || lk == 93215 // '$' 'module'
+ || lk == 94239 // '$' 'namespace'
+ || lk == 94751 // '$' 'namespace-node'
+ || lk == 95263 // '$' 'ne'
+ || lk == 97823 // '$' 'node'
+ || lk == 98335 // '$' 'nodes'
+ || lk == 99359 // '$' 'object'
+ || lk == 101407 // '$' 'only'
+ || lk == 101919 // '$' 'option'
+ || lk == 102431 // '$' 'or'
+ || lk == 102943 // '$' 'order'
+ || lk == 103455 // '$' 'ordered'
+ || lk == 103967 // '$' 'ordering'
+ || lk == 105503 // '$' 'parent'
+ || lk == 108575 // '$' 'preceding'
+ || lk == 109087 // '$' 'preceding-sibling'
+ || lk == 110623 // '$' 'processing-instruction'
+ || lk == 111647 // '$' 'rename'
+ || lk == 112159 // '$' 'replace'
+ || lk == 112671 // '$' 'return'
+ || lk == 113183 // '$' 'returning'
+ || lk == 113695 // '$' 'revalidation'
+ || lk == 114719 // '$' 'satisfies'
+ || lk == 115231 // '$' 'schema'
+ || lk == 115743 // '$' 'schema-attribute'
+ || lk == 116255 // '$' 'schema-element'
+ || lk == 116767 // '$' 'score'
+ || lk == 117279 // '$' 'self'
+ || lk == 119839 // '$' 'sliding'
+ || lk == 120351 // '$' 'some'
+ || lk == 120863 // '$' 'stable'
+ || lk == 121375 // '$' 'start'
+ || lk == 122911 // '$' 'strict'
+ || lk == 123935 // '$' 'structured-item'
+ || lk == 124447 // '$' 'switch'
+ || lk == 124959 // '$' 'text'
+ || lk == 127007 // '$' 'to'
+ || lk == 127519 // '$' 'treat'
+ || lk == 128031 // '$' 'try'
+ || lk == 128543 // '$' 'tumbling'
+ || lk == 129055 // '$' 'type'
+ || lk == 129567 // '$' 'typeswitch'
+ || lk == 130079 // '$' 'union'
+ || lk == 131103 // '$' 'unordered'
+ || lk == 131615 // '$' 'updating'
+ || lk == 133151 // '$' 'validate'
+ || lk == 133663 // '$' 'value'
+ || lk == 134175 // '$' 'variable'
+ || lk == 134687 // '$' 'version'
+ || lk == 136223 // '$' 'where'
+ || lk == 136735 // '$' 'while'
+ || lk == 138271 // '$' 'with'
+ || lk == 140319) // '$' 'xquery'
+ {
+ lk = memoized(2, e0);
+ if (lk == 0)
{
- try_TypeDeclaration();
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_GroupingVariable();
+ lookahead1W(183); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 52 // ':='
+ || l1 == 79) // 'as'
+ {
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+ if (l1 == 94) // 'collation'
+ {
+ shiftT(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ memoize(2, e0A, -1);
+ lk = -3;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(2, e0A, -2);
+ }
}
- lookahead1W(27); // S^WS | '(:' | ':='
- shiftT(52); // ':='
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- try_ExprSingle();
}
- if (l1 == 94) // 'collation'
+ switch (lk)
{
- shiftT(94); // 'collation'
- lookahead1W(15); // URILiteral | S^WS | '(:'
- shiftT(7); // URILiteral
+ case -1:
+ try_GroupingVariable();
+ lookahead1W(183); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 52 // ':='
+ || l1 == 79) // 'as'
+ {
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+ if (l1 == 94) // 'collation'
+ {
+ shiftT(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ break;
+ case -3:
+ break;
+ default:
+ try_ExprSingle();
}
}
@@ -4194,7 +30586,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("GroupingVariable", e0);
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
eventHandler.endNonterminal("GroupingVariable", e0);
@@ -4203,7 +30595,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_GroupingVariable()
{
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
}
@@ -4315,7 +30707,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(113); // 'descending'
}
}
- lookahead1W(179); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' |
+ lookahead1W(180); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' |
if (l1 == 123) // 'empty'
{
shift(123); // 'empty'
@@ -4353,7 +30745,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(113); // 'descending'
}
}
- lookahead1W(179); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' |
+ lookahead1W(180); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' |
if (l1 == 123) // 'empty'
{
shiftT(123); // 'empty'
@@ -4405,21 +30797,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(129); // 'every'
}
lookahead1W(21); // S^WS | '$' | '(:'
- shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
- whitespace();
- parse_VarName();
- lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
- if (l1 == 79) // 'as'
- {
- whitespace();
- parse_TypeDeclaration();
- }
- lookahead1W(53); // S^WS | '(:' | 'in'
- shift(154); // 'in'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
- parse_ExprSingle();
+ parse_QuantifiedVarDecl();
for (;;)
{
if (l1 != 41) // ','
@@ -4428,21 +30807,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
shift(41); // ','
lookahead1W(21); // S^WS | '$' | '(:'
- shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
- whitespace();
- parse_VarName();
- lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
- if (l1 == 79) // 'as'
- {
- whitespace();
- parse_TypeDeclaration();
- }
- lookahead1W(53); // S^WS | '(:' | 'in'
- shift(154); // 'in'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
- parse_ExprSingle();
+ parse_QuantifiedVarDecl();
}
shift(224); // 'satisfies'
lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
@@ -4462,18 +30828,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(129); // 'every'
}
lookahead1W(21); // S^WS | '$' | '(:'
- shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
- try_VarName();
- lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
- if (l1 == 79) // 'as'
- {
- try_TypeDeclaration();
- }
- lookahead1W(53); // S^WS | '(:' | 'in'
- shiftT(154); // 'in'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- try_ExprSingle();
+ try_QuantifiedVarDecl();
for (;;)
{
if (l1 != 41) // ','
@@ -4482,24 +30837,50 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
shiftT(41); // ','
lookahead1W(21); // S^WS | '$' | '(:'
- shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
- try_VarName();
- lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
- if (l1 == 79) // 'as'
- {
- try_TypeDeclaration();
- }
- lookahead1W(53); // S^WS | '(:' | 'in'
- shiftT(154); // 'in'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- try_ExprSingle();
+ try_QuantifiedVarDecl();
}
shiftT(224); // 'satisfies'
lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_ExprSingle();
}
+ function parse_QuantifiedVarDecl()
+ {
+ eventHandler.startNonterminal("QuantifiedVarDecl", e0);
+ shift(31); // '$'
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shift(154); // 'in'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("QuantifiedVarDecl", e0);
+ }
+
+ function try_QuantifiedVarDecl()
+ {
+ shiftT(31); // '$'
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shiftT(154); // 'in'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
function parse_SwitchExpr()
{
eventHandler.startNonterminal("SwitchExpr", e0);
@@ -4628,7 +31009,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 31) // '$'
{
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
}
@@ -4662,7 +31043,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 31) // '$'
{
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
}
lookahead1W(70); // S^WS | '(:' | 'return'
@@ -4675,17 +31056,17 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("CaseClause", e0);
shift(88); // 'case'
- lookahead1W(260); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ lookahead1W(262); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
if (l1 == 31) // '$'
{
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
lookahead1W(30); // S^WS | '(:' | 'as'
shift(79); // 'as'
}
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_SequenceTypeUnion();
shift(220); // 'return'
@@ -4698,16 +31079,16 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_CaseClause()
{
shiftT(88); // 'case'
- lookahead1W(260); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ lookahead1W(262); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
if (l1 == 31) // '$'
{
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
lookahead1W(30); // S^WS | '(:' | 'as'
shiftT(79); // 'as'
}
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
try_SequenceTypeUnion();
shiftT(220); // 'return'
lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
@@ -4726,7 +31107,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shift(279); // '|'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_SequenceType();
}
@@ -4744,7 +31125,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shiftT(279); // '|'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
try_SequenceType();
}
}
@@ -4860,7 +31241,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("CatchClause", e0);
shift(91); // 'catch'
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_CatchErrorList();
shift(276); // '{'
@@ -4874,7 +31255,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_CatchClause()
{
shiftT(91); // 'catch'
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_CatchErrorList();
shiftT(276); // '{'
lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
@@ -4894,7 +31275,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shift(279); // '|'
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_NameTest();
}
@@ -4912,7 +31293,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shiftT(279); // '|'
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_NameTest();
}
}
@@ -4928,7 +31309,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shift(200); // 'or'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_AndExpr();
}
@@ -4945,7 +31326,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shiftT(200); // 'or'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_AndExpr();
}
}
@@ -4961,7 +31342,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shift(75); // 'and'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_ComparisonExpr();
}
@@ -4978,7 +31359,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shiftT(75); // 'and'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_ComparisonExpr();
}
}
@@ -5024,7 +31405,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
whitespace();
parse_GeneralComp();
}
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_FTContainsExpr();
}
@@ -5068,7 +31449,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
try_GeneralComp();
}
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_FTContainsExpr();
}
}
@@ -5122,7 +31503,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shift(280); // '||'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_RangeExpr();
}
@@ -5139,7 +31520,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shiftT(280); // '||'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_RangeExpr();
}
}
@@ -5151,7 +31532,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 248) // 'to'
{
shift(248); // 'to'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_AdditiveExpr();
}
@@ -5164,7 +31545,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 248) // 'to'
{
shiftT(248); // 'to'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_AdditiveExpr();
}
}
@@ -5188,7 +31569,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
shift(42); // '-'
}
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_MultiplicativeExpr();
}
@@ -5213,7 +31594,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
shiftT(42); // '-'
}
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_MultiplicativeExpr();
}
}
@@ -5245,7 +31626,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
shift(180); // 'mod'
}
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_UnionExpr();
}
@@ -5278,7 +31659,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
shiftT(180); // 'mod'
}
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_UnionExpr();
}
}
@@ -5302,7 +31683,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
shift(279); // '|'
}
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_IntersectExceptExpr();
}
@@ -5327,7 +31708,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
shiftT(279); // '|'
}
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_IntersectExceptExpr();
}
}
@@ -5338,7 +31719,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
parse_InstanceofExpr();
for (;;)
{
- lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
if (l1 != 131 // 'except'
&& l1 != 162) // 'intersect'
{
@@ -5352,7 +31733,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
shift(131); // 'except'
}
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_InstanceofExpr();
}
@@ -5364,7 +31745,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
try_InstanceofExpr();
for (;;)
{
- lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
if (l1 != 131 // 'except'
&& l1 != 162) // 'intersect'
{
@@ -5378,7 +31759,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
shiftT(131); // 'except'
}
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_InstanceofExpr();
}
}
@@ -5387,13 +31768,13 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("InstanceofExpr", e0);
parse_TreatExpr();
- lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
if (l1 == 160) // 'instance'
{
shift(160); // 'instance'
lookahead1W(64); // S^WS | '(:' | 'of'
shift(196); // 'of'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_SequenceType();
}
@@ -5403,13 +31784,13 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_InstanceofExpr()
{
try_TreatExpr();
- lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
if (l1 == 160) // 'instance'
{
shiftT(160); // 'instance'
lookahead1W(64); // S^WS | '(:' | 'of'
shiftT(196); // 'of'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
try_SequenceType();
}
}
@@ -5418,13 +31799,13 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("TreatExpr", e0);
parse_CastableExpr();
- lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
if (l1 == 249) // 'treat'
{
shift(249); // 'treat'
lookahead1W(30); // S^WS | '(:' | 'as'
shift(79); // 'as'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_SequenceType();
}
@@ -5434,13 +31815,13 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_TreatExpr()
{
try_CastableExpr();
- lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
if (l1 == 249) // 'treat'
{
shiftT(249); // 'treat'
lookahead1W(30); // S^WS | '(:' | 'as'
shiftT(79); // 'as'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
try_SequenceType();
}
}
@@ -5449,13 +31830,13 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("CastableExpr", e0);
parse_CastExpr();
- lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
if (l1 == 90) // 'castable'
{
shift(90); // 'castable'
lookahead1W(30); // S^WS | '(:' | 'as'
shift(79); // 'as'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_SingleType();
}
@@ -5465,13 +31846,13 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_CastableExpr()
{
try_CastExpr();
- lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
if (l1 == 90) // 'castable'
{
shiftT(90); // 'castable'
lookahead1W(30); // S^WS | '(:' | 'as'
shiftT(79); // 'as'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_SingleType();
}
}
@@ -5480,13 +31861,13 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("CastExpr", e0);
parse_UnaryExpr();
- lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ lookahead1W(228); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
if (l1 == 89) // 'cast'
{
shift(89); // 'cast'
lookahead1W(30); // S^WS | '(:' | 'as'
shift(79); // 'as'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_SingleType();
}
@@ -5496,13 +31877,13 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_CastExpr()
{
try_UnaryExpr();
- lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ lookahead1W(228); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
if (l1 == 89) // 'cast'
{
shiftT(89); // 'cast'
lookahead1W(30); // S^WS | '(:' | 'as'
shiftT(79); // 'as'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_SingleType();
}
}
@@ -5512,7 +31893,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
eventHandler.startNonterminal("UnaryExpr", e0);
for (;;)
{
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 40 // '+'
&& l1 != 42) // '-'
{
@@ -5536,7 +31917,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
for (;;)
{
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 40 // '+'
&& l1 != 42) // '-'
{
@@ -5560,7 +31941,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 260: // 'validate'
- lookahead2W(246); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(248); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
default:
lk = l1;
@@ -5587,7 +31968,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 260: // 'validate'
- lookahead2W(246); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(248); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
default:
lk = l1;
@@ -5619,7 +32000,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shift(26); // '!'
- lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_PathExpr();
}
@@ -5636,7 +32017,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shiftT(26); // '!'
- lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_PathExpr();
}
}
@@ -5784,7 +32165,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 252: // 'type'
shift(252); // 'type'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_TypeName();
break;
@@ -5812,7 +32193,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 252: // 'type'
shiftT(252); // 'type'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_TypeName();
break;
default:
@@ -5866,7 +32247,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
}
shift(276); // '{'
- lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 282) // '}'
{
whitespace();
@@ -5888,7 +32269,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
}
shiftT(276); // '{'
- lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 282) // '}'
{
try_Expr();
@@ -5900,7 +32281,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("Pragma", e0);
shift(35); // '(#'
- lookahead1(250); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ lookahead1(252); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
if (l1 == 21) // S
{
shift(21); // S
@@ -5921,7 +32302,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_Pragma()
{
shiftT(35); // '(#'
- lookahead1(250); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ lookahead1(252); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
if (l1 == 21) // S
{
shiftT(21); // S
@@ -5945,7 +32326,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 46: // '/'
shift(46); // '/'
- lookahead1W(283); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(286); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
switch (l1)
{
case 25: // EOF
@@ -5983,7 +32364,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
case 47: // '//'
shift(47); // '//'
- lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_RelativePathExpr();
break;
@@ -5999,7 +32380,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 46: // '/'
shiftT(46); // '/'
- lookahead1W(283); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(286); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
switch (l1)
{
case 25: // EOF
@@ -6036,7 +32417,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
case 47: // '//'
shiftT(47); // '//'
- lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_RelativePathExpr();
break;
default:
@@ -6053,7 +32434,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 26: // '!'
- lookahead2W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
default:
lk = l1;
@@ -6136,7 +32517,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 23578 // '!' '/'
&& lk != 24090) // '!' '//'
{
- lk = memoized(2, e0);
+ lk = memoized(3, e0);
if (lk == 0)
{
var b0A = b0; var e0A = e0; var l1A = l1;
@@ -6155,7 +32536,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
shiftT(26); // '!'
}
- lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_StepExpr();
lk = -1;
}
@@ -6166,7 +32547,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(2, e0, lk);
+ memoize(3, e0, lk);
}
}
if (lk != -1
@@ -6186,7 +32567,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
shift(26); // '!'
}
- lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_StepExpr();
}
@@ -6201,7 +32582,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 26: // '!'
- lookahead2W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
default:
lk = l1;
@@ -6284,7 +32665,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 23578 // '!' '/'
&& lk != 24090) // '!' '//'
{
- lk = memoized(2, e0);
+ lk = memoized(3, e0);
if (lk == 0)
{
var b0A = b0; var e0A = e0; var l1A = l1;
@@ -6303,9 +32684,9 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
shiftT(26); // '!'
}
- lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_StepExpr();
- memoize(2, e0A, -1);
+ memoize(3, e0A, -1);
continue;
}
catch (p1A)
@@ -6313,7 +32694,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(2, e0A, -2);
+ memoize(3, e0A, -2);
break;
}
}
@@ -6335,7 +32716,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
shiftT(26); // '!'
}
- lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_StepExpr();
}
}
@@ -6346,28 +32727,31 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 82: // 'attribute'
- lookahead2W(282); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ lookahead2W(285); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
break;
case 121: // 'element'
- lookahead2W(280); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ lookahead2W(283); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
break;
case 184: // 'namespace'
case 216: // 'processing-instruction'
- lookahead2W(279); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ lookahead2W(282); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
break;
case 96: // 'comment'
case 119: // 'document'
case 202: // 'ordered'
case 244: // 'text'
case 256: // 'unordered'
- lookahead2W(245); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(247); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
+ case 78: // 'array'
case 124: // 'empty-sequence'
case 152: // 'if'
case 165: // 'item'
+ case 167: // 'json-item'
+ case 242: // 'structured-item'
case 243: // 'switch'
case 253: // 'typeswitch'
- lookahead2W(238); // S^WS | EOF | '!' | '!=' | '#' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(240); // S^WS | EOF | '!' | '!=' | '#' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 73: // 'ancestor'
case 74: // 'ancestor-or-self'
@@ -6380,13 +32764,13 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 212: // 'preceding'
case 213: // 'preceding-sibling'
case 229: // 'self'
- lookahead2W(244); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(246); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
case 6: // EQName^Token
case 70: // 'after'
case 72: // 'allowing'
case 75: // 'and'
- case 78: // 'array'
+ case 77: // 'append'
case 79: // 'as'
case 80: // 'ascending'
case 81: // 'at'
@@ -6439,7 +32823,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 162: // 'intersect'
case 163: // 'into'
case 164: // 'is'
- case 167: // 'json-item'
+ case 166: // 'json'
case 170: // 'last'
case 171: // 'lax'
case 172: // 'le'
@@ -6489,15 +32873,12 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 267: // 'while'
case 270: // 'with'
case 274: // 'xquery'
- lookahead2W(242); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(244); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
default:
lk = l1;
}
- if (lk == 17486 // 'array' '('
- || lk == 17575 // 'json-item' '('
- || lk == 17602 // 'object' '('
- || lk == 35922 // 'attribute' 'after'
+ if (lk == 35922 // 'attribute' 'after'
|| lk == 35961 // 'element' 'after'
|| lk == 36024 // 'namespace' 'after'
|| lk == 36056 // 'processing-instruction' 'after'
@@ -6682,7 +33063,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 138424 // 'namespace' 'with'
|| lk == 138456) // 'processing-instruction' 'with'
{
- lk = memoized(3, e0);
+ lk = memoized(4, e0);
if (lk == 0)
{
var b0A = b0; var e0A = e0; var l1A = l1;
@@ -6700,7 +33081,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(3, e0, lk);
+ memoize(4, e0, lk);
}
}
switch (lk)
@@ -6730,6 +33111,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 14921: // 'ancestor' '#'
case 14922: // 'ancestor-or-self' '#'
case 14923: // 'and' '#'
+ case 14925: // 'append' '#'
case 14926: // 'array' '#'
case 14927: // 'as' '#'
case 14928: // 'ascending' '#'
@@ -6795,6 +33177,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 15011: // 'into' '#'
case 15012: // 'is' '#'
case 15013: // 'item' '#'
+ case 15014: // 'json' '#'
case 15015: // 'json-item' '#'
case 15018: // 'last' '#'
case 15019: // 'lax' '#'
@@ -6837,6 +33220,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 15084: // 'stable' '#'
case 15085: // 'start' '#'
case 15088: // 'strict' '#'
+ case 15090: // 'structured-item' '#'
case 15091: // 'switch' '#'
case 15092: // 'text' '#'
case 15096: // 'to' '#'
@@ -6862,6 +33246,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 17481: // 'ancestor' '('
case 17482: // 'ancestor-or-self' '('
case 17483: // 'and' '('
+ case 17485: // 'append' '('
case 17487: // 'as' '('
case 17488: // 'ascending' '('
case 17489: // 'at' '('
@@ -6919,6 +33304,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 17570: // 'intersect' '('
case 17571: // 'into' '('
case 17572: // 'is' '('
+ case 17574: // 'json' '('
case 17578: // 'last' '('
case 17579: // 'lax' '('
case 17580: // 'le' '('
@@ -6931,6 +33317,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 17592: // 'namespace' '('
case 17594: // 'ne' '('
case 17600: // 'nodes' '('
+ case 17602: // 'object' '('
case 17606: // 'only' '('
case 17607: // 'option' '('
case 17608: // 'or' '('
@@ -6982,6 +33369,10 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 38009: // 'element' 'ancestor-or-self'
case 38072: // 'namespace' 'ancestor-or-self'
case 38104: // 'processing-instruction' 'ancestor-or-self'
+ case 39506: // 'attribute' 'append'
+ case 39545: // 'element' 'append'
+ case 39608: // 'namespace' 'append'
+ case 39640: // 'processing-instruction' 'append'
case 40018: // 'attribute' 'array'
case 40057: // 'element' 'array'
case 42066: // 'attribute' 'attribute'
@@ -7136,6 +33527,10 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 84601: // 'element' 'item'
case 84664: // 'namespace' 'item'
case 84696: // 'processing-instruction' 'item'
+ case 85074: // 'attribute' 'json'
+ case 85113: // 'element' 'json'
+ case 85176: // 'namespace' 'json'
+ case 85208: // 'processing-instruction' 'json'
case 85586: // 'attribute' 'json-item'
case 85625: // 'element' 'json-item'
case 87122: // 'attribute' 'last'
@@ -7172,6 +33567,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 98520: // 'processing-instruction' 'nodes'
case 99410: // 'attribute' 'object'
case 99449: // 'element' 'object'
+ case 99512: // 'namespace' 'object'
+ case 99544: // 'processing-instruction' 'object'
case 101970: // 'attribute' 'option'
case 102009: // 'element' 'option'
case 102072: // 'namespace' 'option'
@@ -7248,6 +33645,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 123001: // 'element' 'strict'
case 123064: // 'namespace' 'strict'
case 123096: // 'processing-instruction' 'strict'
+ case 123986: // 'attribute' 'structured-item'
+ case 124025: // 'element' 'structured-item'
case 124498: // 'attribute' 'switch'
case 124537: // 'element' 'switch'
case 124600: // 'namespace' 'switch'
@@ -7326,28 +33725,31 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 82: // 'attribute'
- lookahead2W(282); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ lookahead2W(285); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
break;
case 121: // 'element'
- lookahead2W(280); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ lookahead2W(283); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
break;
case 184: // 'namespace'
case 216: // 'processing-instruction'
- lookahead2W(279); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ lookahead2W(282); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
break;
case 96: // 'comment'
case 119: // 'document'
case 202: // 'ordered'
case 244: // 'text'
case 256: // 'unordered'
- lookahead2W(245); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(247); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
+ case 78: // 'array'
case 124: // 'empty-sequence'
case 152: // 'if'
case 165: // 'item'
+ case 167: // 'json-item'
+ case 242: // 'structured-item'
case 243: // 'switch'
case 253: // 'typeswitch'
- lookahead2W(238); // S^WS | EOF | '!' | '!=' | '#' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(240); // S^WS | EOF | '!' | '!=' | '#' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 73: // 'ancestor'
case 74: // 'ancestor-or-self'
@@ -7360,13 +33762,13 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 212: // 'preceding'
case 213: // 'preceding-sibling'
case 229: // 'self'
- lookahead2W(244); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(246); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
case 6: // EQName^Token
case 70: // 'after'
case 72: // 'allowing'
case 75: // 'and'
- case 78: // 'array'
+ case 77: // 'append'
case 79: // 'as'
case 80: // 'ascending'
case 81: // 'at'
@@ -7419,7 +33821,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 162: // 'intersect'
case 163: // 'into'
case 164: // 'is'
- case 167: // 'json-item'
+ case 166: // 'json'
case 170: // 'last'
case 171: // 'lax'
case 172: // 'le'
@@ -7469,15 +33871,12 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 267: // 'while'
case 270: // 'with'
case 274: // 'xquery'
- lookahead2W(242); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(244); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
default:
lk = l1;
}
- if (lk == 17486 // 'array' '('
- || lk == 17575 // 'json-item' '('
- || lk == 17602 // 'object' '('
- || lk == 35922 // 'attribute' 'after'
+ if (lk == 35922 // 'attribute' 'after'
|| lk == 35961 // 'element' 'after'
|| lk == 36024 // 'namespace' 'after'
|| lk == 36056 // 'processing-instruction' 'after'
@@ -7662,7 +34061,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 138424 // 'namespace' 'with'
|| lk == 138456) // 'processing-instruction' 'with'
{
- lk = memoized(3, e0);
+ lk = memoized(4, e0);
if (lk == 0)
{
var b0A = b0; var e0A = e0; var l1A = l1;
@@ -7671,7 +34070,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
try
{
try_PostfixExpr();
- memoize(3, e0A, -1);
+ memoize(4, e0A, -1);
lk = -3;
}
catch (p1A)
@@ -7680,7 +34079,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(3, e0A, -2);
+ memoize(4, e0A, -2);
}
}
}
@@ -7711,6 +34110,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 14921: // 'ancestor' '#'
case 14922: // 'ancestor-or-self' '#'
case 14923: // 'and' '#'
+ case 14925: // 'append' '#'
case 14926: // 'array' '#'
case 14927: // 'as' '#'
case 14928: // 'ascending' '#'
@@ -7776,6 +34176,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 15011: // 'into' '#'
case 15012: // 'is' '#'
case 15013: // 'item' '#'
+ case 15014: // 'json' '#'
case 15015: // 'json-item' '#'
case 15018: // 'last' '#'
case 15019: // 'lax' '#'
@@ -7818,6 +34219,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 15084: // 'stable' '#'
case 15085: // 'start' '#'
case 15088: // 'strict' '#'
+ case 15090: // 'structured-item' '#'
case 15091: // 'switch' '#'
case 15092: // 'text' '#'
case 15096: // 'to' '#'
@@ -7843,6 +34245,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 17481: // 'ancestor' '('
case 17482: // 'ancestor-or-self' '('
case 17483: // 'and' '('
+ case 17485: // 'append' '('
case 17487: // 'as' '('
case 17488: // 'ascending' '('
case 17489: // 'at' '('
@@ -7900,6 +34303,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 17570: // 'intersect' '('
case 17571: // 'into' '('
case 17572: // 'is' '('
+ case 17574: // 'json' '('
case 17578: // 'last' '('
case 17579: // 'lax' '('
case 17580: // 'le' '('
@@ -7912,6 +34316,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 17592: // 'namespace' '('
case 17594: // 'ne' '('
case 17600: // 'nodes' '('
+ case 17602: // 'object' '('
case 17606: // 'only' '('
case 17607: // 'option' '('
case 17608: // 'or' '('
@@ -7963,6 +34368,10 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 38009: // 'element' 'ancestor-or-self'
case 38072: // 'namespace' 'ancestor-or-self'
case 38104: // 'processing-instruction' 'ancestor-or-self'
+ case 39506: // 'attribute' 'append'
+ case 39545: // 'element' 'append'
+ case 39608: // 'namespace' 'append'
+ case 39640: // 'processing-instruction' 'append'
case 40018: // 'attribute' 'array'
case 40057: // 'element' 'array'
case 42066: // 'attribute' 'attribute'
@@ -8117,6 +34526,10 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 84601: // 'element' 'item'
case 84664: // 'namespace' 'item'
case 84696: // 'processing-instruction' 'item'
+ case 85074: // 'attribute' 'json'
+ case 85113: // 'element' 'json'
+ case 85176: // 'namespace' 'json'
+ case 85208: // 'processing-instruction' 'json'
case 85586: // 'attribute' 'json-item'
case 85625: // 'element' 'json-item'
case 87122: // 'attribute' 'last'
@@ -8153,6 +34566,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 98520: // 'processing-instruction' 'nodes'
case 99410: // 'attribute' 'object'
case 99449: // 'element' 'object'
+ case 99512: // 'namespace' 'object'
+ case 99544: // 'processing-instruction' 'object'
case 101970: // 'attribute' 'option'
case 102009: // 'element' 'option'
case 102072: // 'namespace' 'option'
@@ -8229,6 +34644,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 123001: // 'element' 'strict'
case 123064: // 'namespace' 'strict'
case 123096: // 'processing-instruction' 'strict'
+ case 123986: // 'attribute' 'structured-item'
+ case 124025: // 'element' 'structured-item'
case 124498: // 'attribute' 'switch'
case 124537: // 'element' 'switch'
case 124600: // 'namespace' 'switch'
@@ -8313,7 +34730,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 206: // 'parent'
case 212: // 'preceding'
case 213: // 'preceding-sibling'
- lookahead2W(240); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ lookahead2W(242); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
break;
default:
lk = l1;
@@ -8331,7 +34748,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
parse_ForwardStep();
}
- lookahead1W(236); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ lookahead1W(238); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
whitespace();
parse_PredicateList();
eventHandler.endNonterminal("AxisStep", e0);
@@ -8346,7 +34763,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 206: // 'parent'
case 212: // 'preceding'
case 213: // 'preceding-sibling'
- lookahead2W(240); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ lookahead2W(242); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
break;
default:
lk = l1;
@@ -8364,7 +34781,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
default:
try_ForwardStep();
}
- lookahead1W(236); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ lookahead1W(238); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
try_PredicateList();
}
@@ -8374,7 +34791,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 82: // 'attribute'
- lookahead2W(243); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(245); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 93: // 'child'
case 111: // 'descendant'
@@ -8382,7 +34799,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 135: // 'following'
case 136: // 'following-sibling'
case 229: // 'self'
- lookahead2W(240); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ lookahead2W(242); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
break;
default:
lk = l1;
@@ -8397,7 +34814,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 26248: // 'following-sibling' '::'
case 26341: // 'self' '::'
parse_ForwardAxis();
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_NodeTest();
break;
@@ -8412,7 +34829,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 82: // 'attribute'
- lookahead2W(243); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(245); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 93: // 'child'
case 111: // 'descendant'
@@ -8420,7 +34837,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 135: // 'following'
case 136: // 'following-sibling'
case 229: // 'self'
- lookahead2W(240); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ lookahead2W(242); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
break;
default:
lk = l1;
@@ -8435,7 +34852,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 26248: // 'following-sibling' '::'
case 26341: // 'self' '::'
try_ForwardAxis();
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_NodeTest();
break;
default:
@@ -8534,7 +34951,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
shift(66); // '@'
}
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_NodeTest();
eventHandler.endNonterminal("AbbrevForwardStep", e0);
@@ -8546,7 +34963,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
shiftT(66); // '@'
}
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_NodeTest();
}
@@ -8560,7 +34977,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
default:
parse_ReverseAxis();
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_NodeTest();
}
@@ -8576,7 +34993,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
default:
try_ReverseAxis();
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_NodeTest();
}
}
@@ -8662,35 +35079,29 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
eventHandler.startNonterminal("NodeTest", e0);
switch (l1)
{
- case 78: // 'array'
case 82: // 'attribute'
case 96: // 'comment'
case 120: // 'document-node'
case 121: // 'element'
- case 167: // 'json-item'
case 185: // 'namespace-node'
case 191: // 'node'
- case 194: // 'object'
case 216: // 'processing-instruction'
case 226: // 'schema-attribute'
case 227: // 'schema-element'
case 244: // 'text'
- lookahead2W(239); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(241); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
default:
lk = l1;
}
switch (lk)
{
- case 17486: // 'array' '('
case 17490: // 'attribute' '('
case 17504: // 'comment' '('
case 17528: // 'document-node' '('
case 17529: // 'element' '('
- case 17575: // 'json-item' '('
case 17593: // 'namespace-node' '('
case 17599: // 'node' '('
- case 17602: // 'object' '('
case 17624: // 'processing-instruction' '('
case 17634: // 'schema-attribute' '('
case 17635: // 'schema-element' '('
@@ -8707,35 +35118,29 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
switch (l1)
{
- case 78: // 'array'
case 82: // 'attribute'
case 96: // 'comment'
case 120: // 'document-node'
case 121: // 'element'
- case 167: // 'json-item'
case 185: // 'namespace-node'
case 191: // 'node'
- case 194: // 'object'
case 216: // 'processing-instruction'
case 226: // 'schema-attribute'
case 227: // 'schema-element'
case 244: // 'text'
- lookahead2W(239); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(241); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
default:
lk = l1;
}
switch (lk)
{
- case 17486: // 'array' '('
case 17490: // 'attribute' '('
case 17504: // 'comment' '('
case 17528: // 'document-node' '('
case 17529: // 'element' '('
- case 17575: // 'json-item' '('
case 17593: // 'namespace-node' '('
case 17599: // 'node' '('
- case 17602: // 'object' '('
case 17624: // 'processing-instruction' '('
case 17634: // 'schema-attribute' '('
case 17635: // 'schema-element' '('
@@ -8779,7 +35184,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
parse_PrimaryExpr();
for (;;)
{
- lookahead1W(239); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead1W(241); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
if (l1 != 34 // '('
&& l1 != 68) // '['
{
@@ -8804,7 +35209,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
try_PrimaryExpr();
for (;;)
{
- lookahead1W(239); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead1W(241); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
if (l1 != 34 // '('
&& l1 != 68) // '['
{
@@ -8825,7 +35230,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("ArgumentList", e0);
shift(34); // '('
- lookahead1W(275); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 37) // ')'
{
whitespace();
@@ -8838,7 +35243,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shift(41); // ','
- lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_Argument();
}
@@ -8850,7 +35255,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_ArgumentList()
{
shiftT(34); // '('
- lookahead1W(275); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 37) // ')'
{
try_Argument();
@@ -8862,7 +35267,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shiftT(41); // ','
- lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_Argument();
}
}
@@ -8874,7 +35279,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
eventHandler.startNonterminal("PredicateList", e0);
for (;;)
{
- lookahead1W(236); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ lookahead1W(238); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
if (l1 != 68) // '['
{
break;
@@ -8889,7 +35294,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
for (;;)
{
- lookahead1W(236); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ lookahead1W(238); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
if (l1 != 68) // '['
{
break;
@@ -8979,7 +35384,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("VarRef", e0);
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
eventHandler.endNonterminal("VarRef", e0);
@@ -8988,7 +35393,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_VarRef()
{
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
}
@@ -9644,7 +36049,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("CompElemConstructor", e0);
shift(121); // 'element'
- lookahead1W(256); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(258); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
switch (l1)
{
case 276: // '{'
@@ -9660,7 +36065,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
lookahead1W(87); // S^WS | '(:' | '{'
shift(276); // '{'
- lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 282) // '}'
{
whitespace();
@@ -9673,7 +36078,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_CompElemConstructor()
{
shiftT(121); // 'element'
- lookahead1W(256); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(258); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
switch (l1)
{
case 276: // '{'
@@ -9687,7 +36092,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
lookahead1W(87); // S^WS | '(:' | '{'
shiftT(276); // '{'
- lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 282) // '}'
{
try_ContentExpr();
@@ -9699,7 +36104,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("CompNamespaceConstructor", e0);
shift(184); // 'namespace'
- lookahead1W(249); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(251); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
switch (l1)
{
case 276: // '{'
@@ -9725,7 +36130,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_CompNamespaceConstructor()
{
shiftT(184); // 'namespace'
- lookahead1W(249); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(251); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
switch (l1)
{
case 276: // '{'
@@ -9871,7 +36276,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 79) // 'as'
{
shift(79); // 'as'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_SequenceType();
}
@@ -9905,7 +36310,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 79) // 'as'
{
shiftT(79); // 'as'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
try_SequenceType();
}
lookahead1W(87); // S^WS | '(:' | '{'
@@ -9916,7 +36321,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("SingleType", e0);
parse_SimpleTypeName();
- lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
if (l1 == 64) // '?'
{
shift(64); // '?'
@@ -9927,7 +36332,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_SingleType()
{
try_SimpleTypeName();
- lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
if (l1 == 64) // '?'
{
shiftT(64); // '?'
@@ -9938,7 +36343,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("TypeDeclaration", e0);
shift(79); // 'as'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_SequenceType();
eventHandler.endNonterminal("TypeDeclaration", e0);
@@ -9947,7 +36352,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_TypeDeclaration()
{
shiftT(79); // 'as'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
try_SequenceType();
}
@@ -9957,7 +36362,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 124: // 'empty-sequence'
- lookahead2W(241); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ lookahead2W(243); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
break;
default:
lk = l1;
@@ -9973,7 +36378,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
default:
parse_ItemType();
- lookahead1W(237); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' |
+ lookahead1W(239); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' |
switch (l1)
{
case 39: // '*'
@@ -9994,7 +36399,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 124: // 'empty-sequence'
- lookahead2W(241); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ lookahead2W(243); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
break;
default:
lk = l1;
@@ -10010,7 +36415,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
default:
try_ItemType();
- lookahead1W(237); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' |
+ lookahead1W(239); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' |
switch (l1)
{
case 39: // '*'
@@ -10075,40 +36480,15 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 216: // 'processing-instruction'
case 226: // 'schema-attribute'
case 227: // 'schema-element'
+ case 242: // 'structured-item'
case 244: // 'text'
- lookahead2W(241); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ lookahead2W(243); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
break;
default:
lk = l1;
}
- if (lk == 17486 // 'array' '('
- || lk == 17575 // 'json-item' '('
- || lk == 17602) // 'object' '('
- {
- lk = memoized(4, e0);
- if (lk == 0)
- {
- var b0A = b0; var e0A = e0; var l1A = l1;
- var b1A = b1; var e1A = e1; var l2A = l2;
- var b2A = b2; var e2A = e2;
- try
- {
- try_KindTest();
- lk = -1;
- }
- catch (p1A)
- {
- lk = -6;
- }
- b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
- b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
- b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(4, e0, lk);
- }
- }
switch (lk)
{
- case -1:
case 17490: // 'attribute' '('
case 17504: // 'comment' '('
case 17528: // 'document-node' '('
@@ -10135,10 +36515,12 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 34: // '('
parse_ParenthesizedItemType();
break;
- case -6:
+ case 17486: // 'array' '('
+ case 17575: // 'json-item' '('
+ case 17602: // 'object' '('
parse_JSONTest();
break;
- case 242: // 'structured-item'
+ case 17650: // 'structured-item' '('
parse_StructuredItemTest();
break;
default:
@@ -10165,41 +36547,15 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 216: // 'processing-instruction'
case 226: // 'schema-attribute'
case 227: // 'schema-element'
+ case 242: // 'structured-item'
case 244: // 'text'
- lookahead2W(241); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ lookahead2W(243); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
break;
default:
lk = l1;
}
- if (lk == 17486 // 'array' '('
- || lk == 17575 // 'json-item' '('
- || lk == 17602) // 'object' '('
- {
- lk = memoized(4, e0);
- if (lk == 0)
- {
- var b0A = b0; var e0A = e0; var l1A = l1;
- var b1A = b1; var e1A = e1; var l2A = l2;
- var b2A = b2; var e2A = e2;
- try
- {
- try_KindTest();
- memoize(4, e0A, -1);
- lk = -8;
- }
- catch (p1A)
- {
- lk = -6;
- b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
- b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
- b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(4, e0A, -6);
- }
- }
- }
switch (lk)
{
- case -1:
case 17490: // 'attribute' '('
case 17504: // 'comment' '('
case 17528: // 'document-node' '('
@@ -10226,14 +36582,14 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 34: // '('
try_ParenthesizedItemType();
break;
- case -6:
+ case 17486: // 'array' '('
+ case 17575: // 'json-item' '('
+ case 17602: // 'object' '('
try_JSONTest();
break;
- case 242: // 'structured-item'
+ case 17650: // 'structured-item' '('
try_StructuredItemTest();
break;
- case -8:
- break;
default:
try_AtomicOrUnionType();
}
@@ -10395,11 +36751,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 185: // 'namespace-node'
parse_NamespaceNodeTest();
break;
- case 191: // 'node'
- parse_AnyKindTest();
- break;
default:
- parse_JSONTest();
+ parse_AnyKindTest();
}
eventHandler.endNonterminal("KindTest", e0);
}
@@ -10435,11 +36788,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 185: // 'namespace-node'
try_NamespaceNodeTest();
break;
- case 191: // 'node'
- try_AnyKindTest();
- break;
default:
- try_JSONTest();
+ try_AnyKindTest();
}
}
@@ -10575,7 +36925,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(216); // 'processing-instruction'
lookahead1W(22); // S^WS | '(' | '(:'
shift(34); // '('
- lookahead1W(251); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' |
+ lookahead1W(253); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' |
if (l1 != 37) // ')'
{
switch (l1)
@@ -10598,7 +36948,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(216); // 'processing-instruction'
lookahead1W(22); // S^WS | '(' | '(:'
shiftT(34); // '('
- lookahead1W(251); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' |
+ lookahead1W(253); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' |
if (l1 != 37) // ')'
{
switch (l1)
@@ -10620,7 +36970,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(82); // 'attribute'
lookahead1W(22); // S^WS | '(' | '(:'
shift(34); // '('
- lookahead1W(258); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(261); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
if (l1 != 37) // ')'
{
whitespace();
@@ -10629,7 +36979,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 41) // ','
{
shift(41); // ','
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_TypeName();
}
@@ -10644,7 +36994,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(82); // 'attribute'
lookahead1W(22); // S^WS | '(' | '(:'
shiftT(34); // '('
- lookahead1W(258); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(261); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
if (l1 != 37) // ')'
{
try_AttribNameOrWildcard();
@@ -10652,7 +37002,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 41) // ','
{
shiftT(41); // ','
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_TypeName();
}
}
@@ -10692,7 +37042,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(226); // 'schema-attribute'
lookahead1W(22); // S^WS | '(' | '(:'
shift(34); // '('
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_AttributeDeclaration();
lookahead1W(23); // S^WS | '(:' | ')'
@@ -10705,7 +37055,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(226); // 'schema-attribute'
lookahead1W(22); // S^WS | '(' | '(:'
shiftT(34); // '('
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_AttributeDeclaration();
lookahead1W(23); // S^WS | '(:' | ')'
shiftT(37); // ')'
@@ -10729,7 +37079,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(121); // 'element'
lookahead1W(22); // S^WS | '(' | '(:'
shift(34); // '('
- lookahead1W(258); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(261); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
if (l1 != 37) // ')'
{
whitespace();
@@ -10738,7 +37088,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 41) // ','
{
shift(41); // ','
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_TypeName();
lookahead1W(102); // S^WS | '(:' | ')' | '?'
@@ -10758,7 +37108,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(121); // 'element'
lookahead1W(22); // S^WS | '(' | '(:'
shiftT(34); // '('
- lookahead1W(258); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(261); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
if (l1 != 37) // ')'
{
try_ElementNameOrWildcard();
@@ -10766,7 +37116,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 41) // ','
{
shiftT(41); // ','
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_TypeName();
lookahead1W(102); // S^WS | '(:' | ')' | '?'
if (l1 == 64) // '?'
@@ -10811,7 +37161,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(227); // 'schema-element'
lookahead1W(22); // S^WS | '(' | '(:'
shift(34); // '('
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_ElementDeclaration();
lookahead1W(23); // S^WS | '(:' | ')'
@@ -10824,7 +37174,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(227); // 'schema-element'
lookahead1W(22); // S^WS | '(' | '(:'
shiftT(34); // '('
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_ElementDeclaration();
lookahead1W(23); // S^WS | '(:' | ')'
shiftT(37); // ')'
@@ -11026,7 +37376,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(145); // 'function'
lookahead1W(22); // S^WS | '(' | '(:'
shift(34); // '('
- lookahead1W(261); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ lookahead1W(263); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
if (l1 != 37) // ')'
{
whitespace();
@@ -11039,7 +37389,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shift(41); // ','
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_SequenceType();
}
@@ -11047,7 +37397,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(37); // ')'
lookahead1W(30); // S^WS | '(:' | 'as'
shift(79); // 'as'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_SequenceType();
eventHandler.endNonterminal("TypedFunctionTest", e0);
@@ -11058,7 +37408,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(145); // 'function'
lookahead1W(22); // S^WS | '(' | '(:'
shiftT(34); // '('
- lookahead1W(261); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ lookahead1W(263); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
if (l1 != 37) // ')'
{
try_SequenceType();
@@ -11070,14 +37420,14 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shiftT(41); // ','
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
try_SequenceType();
}
}
shiftT(37); // ')'
lookahead1W(30); // S^WS | '(:' | 'as'
shiftT(79); // 'as'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
try_SequenceType();
}
@@ -11085,7 +37435,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("ParenthesizedItemType", e0);
shift(34); // '('
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_ItemType();
lookahead1W(23); // S^WS | '(:' | ')'
@@ -11096,7 +37446,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_ParenthesizedItemType()
{
shiftT(34); // '('
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
try_ItemType();
lookahead1W(23); // S^WS | '(:' | ')'
shiftT(37); // ')'
@@ -11372,15 +37722,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
eventHandler.startNonterminal("TransformExpr", e0);
shift(103); // 'copy'
lookahead1W(21); // S^WS | '$' | '(:'
- shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
- parse_VarName();
- lookahead1W(27); // S^WS | '(:' | ':='
- shift(52); // ':='
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- whitespace();
- parse_ExprSingle();
+ parse_TransformSpec();
for (;;)
{
if (l1 != 41) // ','
@@ -11389,15 +37732,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
shift(41); // ','
lookahead1W(21); // S^WS | '$' | '(:'
- shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
- parse_VarName();
- lookahead1W(27); // S^WS | '(:' | ':='
- shift(52); // ':='
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- whitespace();
- parse_ExprSingle();
+ parse_TransformSpec();
}
shift(181); // 'modify'
lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
@@ -11414,13 +37750,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
shiftT(103); // 'copy'
lookahead1W(21); // S^WS | '$' | '(:'
- shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
- try_VarName();
- lookahead1W(27); // S^WS | '(:' | ':='
- shiftT(52); // ':='
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- try_ExprSingle();
+ try_TransformSpec();
for (;;)
{
if (l1 != 41) // ','
@@ -11429,13 +37759,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
shiftT(41); // ','
lookahead1W(21); // S^WS | '$' | '(:'
- shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
- try_VarName();
- lookahead1W(27); // S^WS | '(:' | ':='
- shiftT(52); // ':='
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- try_ExprSingle();
+ try_TransformSpec();
}
shiftT(181); // 'modify'
lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
@@ -11445,13 +37769,39 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
try_ExprSingle();
}
+ function parse_TransformSpec()
+ {
+ eventHandler.startNonterminal("TransformSpec", e0);
+ shift(31); // '$'
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shift(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TransformSpec", e0);
+ }
+
+ function try_TransformSpec()
+ {
+ shiftT(31); // '$'
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
function parse_FTSelection()
{
eventHandler.startNonterminal("FTSelection", e0);
parse_FTOr();
for (;;)
{
- lookahead1W(211); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
switch (l1)
{
case 81: // 'at'
@@ -11482,7 +37832,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
try_FTOr();
for (;;)
{
- lookahead1W(211); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
switch (l1)
{
case 81: // 'at'
@@ -11601,7 +37951,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
parse_FTUnaryNot();
for (;;)
{
- lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(213); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 != 193) // 'not'
{
break;
@@ -11621,7 +37971,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
try_FTUnaryNot();
for (;;)
{
- lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(213); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 != 193) // 'not'
{
break;
@@ -11661,7 +38011,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("FTPrimaryWithOptions", e0);
parse_FTPrimary();
- lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 == 259) // 'using'
{
whitespace();
@@ -11678,7 +38028,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_FTPrimaryWithOptions()
{
try_FTPrimary();
- lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 == 259) // 'using'
{
try_FTMatchOptions();
@@ -11706,7 +38056,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
default:
parse_FTWords();
- lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 == 195) // 'occurs'
{
whitespace();
@@ -11731,7 +38081,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
default:
try_FTWords();
- lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 == 195) // 'occurs'
{
try_FTTimes();
@@ -11743,7 +38093,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("FTWords", e0);
parse_FTWordsValue();
- lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 == 71 // 'all'
|| l1 == 76 // 'any'
|| l1 == 210) // 'phrase'
@@ -11757,7 +38107,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_FTWords()
{
try_FTWordsValue();
- lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 == 71 // 'all'
|| l1 == 76 // 'any'
|| l1 == 210) // 'phrase'
@@ -11850,7 +38200,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 76: // 'any'
shift(76); // 'any'
- lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 == 272) // 'word'
{
shift(272); // 'word'
@@ -11858,7 +38208,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
case 71: // 'all'
shift(71); // 'all'
- lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 == 273) // 'words'
{
shift(273); // 'words'
@@ -11876,7 +38226,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 76: // 'any'
shiftT(76); // 'any'
- lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 == 272) // 'word'
{
shiftT(272); // 'word'
@@ -11884,7 +38234,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
case 71: // 'all'
shiftT(71); // 'all'
- lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 == 273) // 'words'
{
shiftT(273); // 'words'
@@ -11921,7 +38271,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 130: // 'exactly'
shift(130); // 'exactly'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_AdditiveExpr();
break;
@@ -11932,24 +38282,24 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 173: // 'least'
shift(173); // 'least'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_AdditiveExpr();
break;
default:
shift(183); // 'most'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_AdditiveExpr();
}
break;
default:
shift(140); // 'from'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_AdditiveExpr();
shift(248); // 'to'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_AdditiveExpr();
}
@@ -11962,7 +38312,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 130: // 'exactly'
shiftT(130); // 'exactly'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_AdditiveExpr();
break;
case 81: // 'at'
@@ -11972,21 +38322,21 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
case 173: // 'least'
shiftT(173); // 'least'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_AdditiveExpr();
break;
default:
shiftT(183); // 'most'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_AdditiveExpr();
}
break;
default:
shiftT(140); // 'from'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_AdditiveExpr();
shiftT(248); // 'to'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_AdditiveExpr();
}
}
@@ -12053,7 +38403,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("FTWindow", e0);
shift(269); // 'window'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_AdditiveExpr();
whitespace();
@@ -12064,7 +38414,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_FTWindow()
{
shiftT(269); // 'window'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_AdditiveExpr();
try_FTUnit();
}
@@ -12232,10 +38582,10 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
for (;;)
{
shift(259); // 'using'
- lookahead1W(181); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' |
+ lookahead1W(182); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' |
whitespace();
parse_FTMatchOption();
- lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 != 259) // 'using'
{
break;
@@ -12249,9 +38599,9 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
for (;;)
{
shiftT(259); // 'using'
- lookahead1W(181); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' |
+ lookahead1W(182); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' |
try_FTMatchOption();
- lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 != 259) // 'using'
{
break;
@@ -12560,14 +38910,14 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(81); // 'at'
lookahead1W(15); // URILiteral | S^WS | '(:'
shift(7); // URILiteral
- lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 == 217) // 'relationship'
{
shift(217); // 'relationship'
lookahead1W(17); // StringLiteral | S^WS | '(:'
shift(11); // StringLiteral
}
- lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
switch (l1)
{
case 81: // 'at'
@@ -12594,14 +38944,14 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(81); // 'at'
lookahead1W(15); // URILiteral | S^WS | '(:'
shiftT(7); // URILiteral
- lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 == 217) // 'relationship'
{
shiftT(217); // 'relationship'
lookahead1W(17); // StringLiteral | S^WS | '(:'
shiftT(11); // StringLiteral
}
- lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
switch (l1)
{
case 81: // 'at'
@@ -12711,7 +39061,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(109); // 'default'
for (;;)
{
- lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 != 131 // 'except'
&& l1 != 254) // 'union'
{
@@ -12726,7 +39076,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
parse_FTStopWords();
for (;;)
{
- lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 != 131 // 'except'
&& l1 != 254) // 'union'
{
@@ -12762,7 +39112,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(109); // 'default'
for (;;)
{
- lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 != 131 // 'except'
&& l1 != 254) // 'union'
{
@@ -12775,7 +39125,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
try_FTStopWords();
for (;;)
{
- lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
if (l1 != 131 // 'except'
&& l1 != 254) // 'union'
{
@@ -12933,7 +39283,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("FTExtensionOption", e0);
shift(199); // 'option'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_EQName();
lookahead1W(17); // StringLiteral | S^WS | '(:'
@@ -12944,7 +39294,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_FTExtensionOption()
{
shiftT(199); // 'option'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_EQName();
lookahead1W(17); // StringLiteral | S^WS | '(:'
shiftT(11); // StringLiteral
@@ -12956,7 +39306,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(271); // 'without'
lookahead1W(42); // S^WS | '(:' | 'content'
shift(100); // 'content'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_UnionExpr();
eventHandler.endNonterminal("FTIgnoreOption", e0);
@@ -12967,7 +39317,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(271); // 'without'
lookahead1W(42); // S^WS | '(:' | 'content'
shiftT(100); // 'content'
- lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_UnionExpr();
}
@@ -12975,7 +39325,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("CollectionDecl", e0);
shift(95); // 'collection'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_EQName();
lookahead1W(107); // S^WS | '(:' | ';' | 'as'
@@ -12991,7 +39341,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("CollectionTypeDecl", e0);
shift(79); // 'as'
- lookahead1W(183); // S^WS | '(:' | 'array' | 'attribute' | 'comment' | 'document-node' | 'element' |
+ lookahead1W(178); // S^WS | '(:' | 'attribute' | 'comment' | 'document-node' | 'element' |
whitespace();
parse_KindTest();
lookahead1W(156); // S^WS | '(:' | '*' | '+' | ';' | '?'
@@ -13046,7 +39396,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("IndexKeyTypeDecl", e0);
shift(79); // 'as'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_AtomicType();
lookahead1W(169); // S^WS | '(:' | '*' | '+' | ',' | ';' | '?' | 'collation'
@@ -13080,18 +39430,18 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("IndexDecl", e0);
shift(155); // 'index'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_IndexName();
lookahead1W(65); // S^WS | '(:' | 'on'
shift(197); // 'on'
lookahead1W(63); // S^WS | '(:' | 'nodes'
shift(192); // 'nodes'
- lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_IndexDomainExpr();
shift(87); // 'by'
- lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_IndexKeySpec();
for (;;)
@@ -13102,7 +39452,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
}
shift(41); // ','
- lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_IndexKeySpec();
}
@@ -13115,7 +39465,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(161); // 'integrity'
lookahead1W(40); // S^WS | '(:' | 'constraint'
shift(97); // 'constraint'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_EQName();
lookahead1W(120); // S^WS | '(:' | 'foreign' | 'on'
@@ -13138,7 +39488,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(197); // 'on'
lookahead1W(39); // S^WS | '(:' | 'collection'
shift(95); // 'collection'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_EQName();
lookahead1W(140); // S^WS | '$' | '(:' | 'foreach' | 'node'
@@ -13184,7 +39534,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(255); // 'unique'
lookahead1W(57); // S^WS | '(:' | 'key'
shift(168); // 'key'
- lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_PathExpr();
eventHandler.endNonterminal("ICCollSequenceUnique", e0);
@@ -13245,7 +39595,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("ICForeignKeyValues", e0);
shift(95); // 'collection'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_EQName();
lookahead1W(62); // S^WS | '(:' | 'node'
@@ -13255,7 +39605,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
parse_VarRef();
lookahead1W(57); // S^WS | '(:' | 'key'
shift(168); // 'key'
- lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_PathExpr();
eventHandler.endNonterminal("ICForeignKeyValues", e0);
@@ -13298,7 +39648,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function parse_EQName()
{
eventHandler.startNonterminal("EQName", e0);
- lookahead1(248); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
+ lookahead1(250); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
switch (l1)
{
case 82: // 'attribute'
@@ -13349,6 +39699,15 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 253: // 'typeswitch'
shift(253); // 'typeswitch'
break;
+ case 78: // 'array'
+ shift(78); // 'array'
+ break;
+ case 167: // 'json-item'
+ shift(167); // 'json-item'
+ break;
+ case 242: // 'structured-item'
+ shift(242); // 'structured-item'
+ break;
default:
parse_FunctionName();
}
@@ -13357,7 +39716,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_EQName()
{
- lookahead1(248); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
+ lookahead1(250); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
switch (l1)
{
case 82: // 'attribute'
@@ -13408,6 +39767,15 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 253: // 'typeswitch'
shiftT(253); // 'typeswitch'
break;
+ case 78: // 'array'
+ shiftT(78); // 'array'
+ break;
+ case 167: // 'json-item'
+ shiftT(167); // 'json-item'
+ break;
+ case 242: // 'structured-item'
+ shiftT(242); // 'structured-item'
+ break;
default:
try_FunctionName();
}
@@ -13757,14 +40125,14 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 221: // 'returning'
shift(221); // 'returning'
break;
- case 194: // 'object'
- shift(194); // 'object'
+ case 77: // 'append'
+ shift(77); // 'append'
break;
- case 167: // 'json-item'
- shift(167); // 'json-item'
+ case 166: // 'json'
+ shift(166); // 'json'
break;
default:
- shift(78); // 'array'
+ shift(194); // 'object'
}
eventHandler.endNonterminal("FunctionName", e0);
}
@@ -14112,14 +40480,14 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 221: // 'returning'
shiftT(221); // 'returning'
break;
- case 194: // 'object'
- shiftT(194); // 'object'
+ case 77: // 'append'
+ shiftT(77); // 'append'
break;
- case 167: // 'json-item'
- shiftT(167); // 'json-item'
+ case 166: // 'json'
+ shiftT(166); // 'json'
break;
default:
- shiftT(78); // 'array'
+ shiftT(194); // 'object'
}
}
@@ -14512,8 +40880,17 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 176: // 'loop'
shift(176); // 'loop'
break;
- default:
+ case 221: // 'returning'
shift(221); // 'returning'
+ break;
+ case 77: // 'append'
+ shift(77); // 'append'
+ break;
+ case 166: // 'json'
+ shift(166); // 'json'
+ break;
+ default:
+ shift(194); // 'object'
}
eventHandler.endNonterminal("NCName", e0);
}
@@ -14906,8 +41283,17 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 176: // 'loop'
shiftT(176); // 'loop'
break;
- default:
+ case 221: // 'returning'
shiftT(221); // 'returning'
+ break;
+ case 77: // 'append'
+ shiftT(77); // 'append'
+ break;
+ case 166: // 'json'
+ shiftT(166); // 'json'
+ break;
+ default:
+ shiftT(194); // 'object'
}
}
@@ -14932,20 +41318,20 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
eventHandler.startNonterminal("Statements", e0);
for (;;)
{
- lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(278); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
switch (l1)
{
case 34: // '('
lookahead2W(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 35: // '(#'
- lookahead2(250); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ lookahead2(252); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
break;
case 46: // '/'
- lookahead2W(281); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(284); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 47: // '//'
- lookahead2W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 54: // '<'
lookahead2(4); // QName
@@ -14957,43 +41343,43 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
lookahead2(3); // PITarget
break;
case 66: // '@'
- lookahead2W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead2W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
break;
case 68: // '['
- lookahead2W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 77: // 'append'
- lookahead2W(56); // S^WS | '(:' | 'json'
+ lookahead2W(200); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 82: // 'attribute'
- lookahead2W(278); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ lookahead2W(281); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
break;
case 121: // 'element'
- lookahead2W(277); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ lookahead2W(280); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
break;
case 132: // 'exit'
- lookahead2W(202); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(203); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 137: // 'for'
- lookahead2W(206); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(208); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
break;
case 174: // 'let'
- lookahead2W(204); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(205); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
break;
case 218: // 'rename'
- lookahead2W(205); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(206); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 219: // 'replace'
- lookahead2W(208); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(207); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 260: // 'validate'
- lookahead2W(209); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(210); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 276: // '{'
- lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 278: // '{|'
- lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 5: // Wildcard
case 45: // '..'
@@ -15001,27 +41387,23 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
case 31: // '$'
case 32: // '%'
- lookahead2W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead2W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
break;
case 40: // '+'
case 42: // '-'
- lookahead2W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 86: // 'break'
case 102: // 'continue'
- lookahead2W(200); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(201); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 110: // 'delete'
case 159: // 'insert'
- lookahead2W(207); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
- break;
- case 124: // 'empty-sequence'
- case 165: // 'item'
- lookahead2W(191); // S^WS | EOF | '!' | '!=' | '#' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ lookahead2W(209); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 184: // 'namespace'
case 216: // 'processing-instruction'
- lookahead2W(266); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ lookahead2W(268); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
break;
case 103: // 'copy'
case 129: // 'every'
@@ -15036,13 +41418,20 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 44: // '.'
lookahead2W(192); // S^WS | EOF | '!' | '!=' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
break;
+ case 78: // 'array'
+ case 124: // 'empty-sequence'
+ case 165: // 'item'
+ case 167: // 'json-item'
+ case 242: // 'structured-item'
+ lookahead2W(191); // S^WS | EOF | '!' | '!=' | '#' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ break;
case 96: // 'comment'
case 119: // 'document'
case 202: // 'ordered'
case 244: // 'text'
case 250: // 'try'
case 256: // 'unordered'
- lookahead2W(203); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(204); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 73: // 'ancestor'
case 74: // 'ancestor-or-self'
@@ -15061,7 +41450,6 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 70: // 'after'
case 72: // 'allowing'
case 75: // 'and'
- case 78: // 'array'
case 79: // 'as'
case 80: // 'ascending'
case 81: // 'at'
@@ -15107,7 +41495,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 162: // 'intersect'
case 163: // 'into'
case 164: // 'is'
- case 167: // 'json-item'
+ case 166: // 'json'
case 170: // 'last'
case 171: // 'lax'
case 172: // 'le'
@@ -15158,6 +41546,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
lk = l1;
}
if (lk != 25 // EOF
+ && lk != 53 // ';'
&& lk != 282 // '}'
&& lk != 12805 // Wildcard EOF
&& lk != 12806 // EQName^Token EOF
@@ -15173,6 +41562,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 12873 // 'ancestor' EOF
&& lk != 12874 // 'ancestor-or-self' EOF
&& lk != 12875 // 'and' EOF
+ && lk != 12877 // 'append' EOF
&& lk != 12878 // 'array' EOF
&& lk != 12879 // 'as' EOF
&& lk != 12880 // 'ascending' EOF
@@ -15238,6 +41628,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 12963 // 'into' EOF
&& lk != 12964 // 'is' EOF
&& lk != 12965 // 'item' EOF
+ && lk != 12966 // 'json' EOF
&& lk != 12967 // 'json-item' EOF
&& lk != 12970 // 'last' EOF
&& lk != 12971 // 'lax' EOF
@@ -15280,6 +41671,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 13036 // 'stable' EOF
&& lk != 13037 // 'start' EOF
&& lk != 13040 // 'strict' EOF
+ && lk != 13042 // 'structured-item' EOF
&& lk != 13043 // 'switch' EOF
&& lk != 13044 // 'text' EOF
&& lk != 13048 // 'to' EOF
@@ -15314,6 +41706,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 21065 // 'ancestor' ','
&& lk != 21066 // 'ancestor-or-self' ','
&& lk != 21067 // 'and' ','
+ && lk != 21069 // 'append' ','
&& lk != 21070 // 'array' ','
&& lk != 21071 // 'as' ','
&& lk != 21072 // 'ascending' ','
@@ -15379,6 +41772,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 21155 // 'into' ','
&& lk != 21156 // 'is' ','
&& lk != 21157 // 'item' ','
+ && lk != 21158 // 'json' ','
&& lk != 21159 // 'json-item' ','
&& lk != 21162 // 'last' ','
&& lk != 21163 // 'lax' ','
@@ -15421,6 +41815,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 21228 // 'stable' ','
&& lk != 21229 // 'start' ','
&& lk != 21232 // 'strict' ','
+ && lk != 21234 // 'structured-item' ','
&& lk != 21235 // 'switch' ','
&& lk != 21236 // 'text' ','
&& lk != 21240 // 'to' ','
@@ -15454,6 +41849,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 27209 // 'ancestor' ';'
&& lk != 27210 // 'ancestor-or-self' ';'
&& lk != 27211 // 'and' ';'
+ && lk != 27213 // 'append' ';'
&& lk != 27214 // 'array' ';'
&& lk != 27215 // 'as' ';'
&& lk != 27216 // 'ascending' ';'
@@ -15519,6 +41915,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 27299 // 'into' ';'
&& lk != 27300 // 'is' ';'
&& lk != 27301 // 'item' ';'
+ && lk != 27302 // 'json' ';'
&& lk != 27303 // 'json-item' ';'
&& lk != 27306 // 'last' ';'
&& lk != 27307 // 'lax' ';'
@@ -15561,6 +41958,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 27372 // 'stable' ';'
&& lk != 27373 // 'start' ';'
&& lk != 27376 // 'strict' ';'
+ && lk != 27378 // 'structured-item' ';'
&& lk != 27379 // 'switch' ';'
&& lk != 27380 // 'text' ';'
&& lk != 27384 // 'to' ';'
@@ -15597,6 +41995,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 144457 // 'ancestor' '}'
&& lk != 144458 // 'ancestor-or-self' '}'
&& lk != 144459 // 'and' '}'
+ && lk != 144461 // 'append' '}'
&& lk != 144462 // 'array' '}'
&& lk != 144463 // 'as' '}'
&& lk != 144464 // 'ascending' '}'
@@ -15662,6 +42061,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 144547 // 'into' '}'
&& lk != 144548 // 'is' '}'
&& lk != 144549 // 'item' '}'
+ && lk != 144550 // 'json' '}'
&& lk != 144551 // 'json-item' '}'
&& lk != 144554 // 'last' '}'
&& lk != 144555 // 'lax' '}'
@@ -15704,6 +42104,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 144620 // 'stable' '}'
&& lk != 144621 // 'start' '}'
&& lk != 144624 // 'strict' '}'
+ && lk != 144626 // 'structured-item' '}'
&& lk != 144627 // 'switch' '}'
&& lk != 144628 // 'text' '}'
&& lk != 144632 // 'to' '}'
@@ -15746,6 +42147,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
}
if (lk != -1
+ && lk != 53 // ';'
&& lk != 16134 // 'variable' '$'
&& lk != 27141 // Wildcard ';'
&& lk != 27142 // EQName^Token ';'
@@ -15761,6 +42163,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 27209 // 'ancestor' ';'
&& lk != 27210 // 'ancestor-or-self' ';'
&& lk != 27211 // 'and' ';'
+ && lk != 27213 // 'append' ';'
&& lk != 27214 // 'array' ';'
&& lk != 27215 // 'as' ';'
&& lk != 27216 // 'ascending' ';'
@@ -15826,6 +42229,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 27299 // 'into' ';'
&& lk != 27300 // 'is' ';'
&& lk != 27301 // 'item' ';'
+ && lk != 27302 // 'json' ';'
&& lk != 27303 // 'json-item' ';'
&& lk != 27306 // 'last' ';'
&& lk != 27307 // 'lax' ';'
@@ -15868,6 +42272,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 27372 // 'stable' ';'
&& lk != 27373 // 'start' ';'
&& lk != 27376 // 'strict' ';'
+ && lk != 27378 // 'structured-item' ';'
&& lk != 27379 // 'switch' ';'
&& lk != 27380 // 'text' ';'
&& lk != 27384 // 'to' ';'
@@ -15903,20 +42308,20 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
for (;;)
{
- lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(278); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
switch (l1)
{
case 34: // '('
lookahead2W(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 35: // '(#'
- lookahead2(250); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ lookahead2(252); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
break;
case 46: // '/'
- lookahead2W(281); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(284); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 47: // '//'
- lookahead2W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 54: // '<'
lookahead2(4); // QName
@@ -15928,43 +42333,43 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
lookahead2(3); // PITarget
break;
case 66: // '@'
- lookahead2W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead2W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
break;
case 68: // '['
- lookahead2W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 77: // 'append'
- lookahead2W(56); // S^WS | '(:' | 'json'
+ lookahead2W(200); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 82: // 'attribute'
- lookahead2W(278); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ lookahead2W(281); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
break;
case 121: // 'element'
- lookahead2W(277); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ lookahead2W(280); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
break;
case 132: // 'exit'
- lookahead2W(202); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(203); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 137: // 'for'
- lookahead2W(206); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(208); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
break;
case 174: // 'let'
- lookahead2W(204); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(205); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
break;
case 218: // 'rename'
- lookahead2W(205); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(206); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 219: // 'replace'
- lookahead2W(208); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(207); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 260: // 'validate'
- lookahead2W(209); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(210); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 276: // '{'
- lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 278: // '{|'
- lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 5: // Wildcard
case 45: // '..'
@@ -15972,27 +42377,23 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
break;
case 31: // '$'
case 32: // '%'
- lookahead2W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead2W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
break;
case 40: // '+'
case 42: // '-'
- lookahead2W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 86: // 'break'
case 102: // 'continue'
- lookahead2W(200); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(201); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 110: // 'delete'
case 159: // 'insert'
- lookahead2W(207); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
- break;
- case 124: // 'empty-sequence'
- case 165: // 'item'
- lookahead2W(191); // S^WS | EOF | '!' | '!=' | '#' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ lookahead2W(209); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 184: // 'namespace'
case 216: // 'processing-instruction'
- lookahead2W(266); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ lookahead2W(268); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
break;
case 103: // 'copy'
case 129: // 'every'
@@ -16007,13 +42408,20 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 44: // '.'
lookahead2W(192); // S^WS | EOF | '!' | '!=' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
break;
+ case 78: // 'array'
+ case 124: // 'empty-sequence'
+ case 165: // 'item'
+ case 167: // 'json-item'
+ case 242: // 'structured-item'
+ lookahead2W(191); // S^WS | EOF | '!' | '!=' | '#' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ break;
case 96: // 'comment'
case 119: // 'document'
case 202: // 'ordered'
case 244: // 'text'
case 250: // 'try'
case 256: // 'unordered'
- lookahead2W(203); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ lookahead2W(204); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
break;
case 73: // 'ancestor'
case 74: // 'ancestor-or-self'
@@ -16032,7 +42440,6 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 70: // 'after'
case 72: // 'allowing'
case 75: // 'and'
- case 78: // 'array'
case 79: // 'as'
case 80: // 'ascending'
case 81: // 'at'
@@ -16078,7 +42485,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 162: // 'intersect'
case 163: // 'into'
case 164: // 'is'
- case 167: // 'json-item'
+ case 166: // 'json'
case 170: // 'last'
case 171: // 'lax'
case 172: // 'le'
@@ -16129,6 +42536,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
lk = l1;
}
if (lk != 25 // EOF
+ && lk != 53 // ';'
&& lk != 282 // '}'
&& lk != 12805 // Wildcard EOF
&& lk != 12806 // EQName^Token EOF
@@ -16144,6 +42552,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 12873 // 'ancestor' EOF
&& lk != 12874 // 'ancestor-or-self' EOF
&& lk != 12875 // 'and' EOF
+ && lk != 12877 // 'append' EOF
&& lk != 12878 // 'array' EOF
&& lk != 12879 // 'as' EOF
&& lk != 12880 // 'ascending' EOF
@@ -16209,6 +42618,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 12963 // 'into' EOF
&& lk != 12964 // 'is' EOF
&& lk != 12965 // 'item' EOF
+ && lk != 12966 // 'json' EOF
&& lk != 12967 // 'json-item' EOF
&& lk != 12970 // 'last' EOF
&& lk != 12971 // 'lax' EOF
@@ -16251,6 +42661,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 13036 // 'stable' EOF
&& lk != 13037 // 'start' EOF
&& lk != 13040 // 'strict' EOF
+ && lk != 13042 // 'structured-item' EOF
&& lk != 13043 // 'switch' EOF
&& lk != 13044 // 'text' EOF
&& lk != 13048 // 'to' EOF
@@ -16285,6 +42696,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 21065 // 'ancestor' ','
&& lk != 21066 // 'ancestor-or-self' ','
&& lk != 21067 // 'and' ','
+ && lk != 21069 // 'append' ','
&& lk != 21070 // 'array' ','
&& lk != 21071 // 'as' ','
&& lk != 21072 // 'ascending' ','
@@ -16350,6 +42762,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 21155 // 'into' ','
&& lk != 21156 // 'is' ','
&& lk != 21157 // 'item' ','
+ && lk != 21158 // 'json' ','
&& lk != 21159 // 'json-item' ','
&& lk != 21162 // 'last' ','
&& lk != 21163 // 'lax' ','
@@ -16392,6 +42805,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 21228 // 'stable' ','
&& lk != 21229 // 'start' ','
&& lk != 21232 // 'strict' ','
+ && lk != 21234 // 'structured-item' ','
&& lk != 21235 // 'switch' ','
&& lk != 21236 // 'text' ','
&& lk != 21240 // 'to' ','
@@ -16425,6 +42839,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 27209 // 'ancestor' ';'
&& lk != 27210 // 'ancestor-or-self' ';'
&& lk != 27211 // 'and' ';'
+ && lk != 27213 // 'append' ';'
&& lk != 27214 // 'array' ';'
&& lk != 27215 // 'as' ';'
&& lk != 27216 // 'ascending' ';'
@@ -16490,6 +42905,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 27299 // 'into' ';'
&& lk != 27300 // 'is' ';'
&& lk != 27301 // 'item' ';'
+ && lk != 27302 // 'json' ';'
&& lk != 27303 // 'json-item' ';'
&& lk != 27306 // 'last' ';'
&& lk != 27307 // 'lax' ';'
@@ -16532,6 +42948,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 27372 // 'stable' ';'
&& lk != 27373 // 'start' ';'
&& lk != 27376 // 'strict' ';'
+ && lk != 27378 // 'structured-item' ';'
&& lk != 27379 // 'switch' ';'
&& lk != 27380 // 'text' ';'
&& lk != 27384 // 'to' ';'
@@ -16568,6 +42985,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 144457 // 'ancestor' '}'
&& lk != 144458 // 'ancestor-or-self' '}'
&& lk != 144459 // 'and' '}'
+ && lk != 144461 // 'append' '}'
&& lk != 144462 // 'array' '}'
&& lk != 144463 // 'as' '}'
&& lk != 144464 // 'ascending' '}'
@@ -16633,6 +43051,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 144547 // 'into' '}'
&& lk != 144548 // 'is' '}'
&& lk != 144549 // 'item' '}'
+ && lk != 144550 // 'json' '}'
&& lk != 144551 // 'json-item' '}'
&& lk != 144554 // 'last' '}'
&& lk != 144555 // 'lax' '}'
@@ -16675,6 +43094,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 144620 // 'stable' '}'
&& lk != 144621 // 'start' '}'
&& lk != 144624 // 'strict' '}'
+ && lk != 144626 // 'structured-item' '}'
&& lk != 144627 // 'switch' '}'
&& lk != 144628 // 'text' '}'
&& lk != 144632 // 'to' '}'
@@ -16718,6 +43138,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
}
if (lk != -1
+ && lk != 53 // ';'
&& lk != 16134 // 'variable' '$'
&& lk != 27141 // Wildcard ';'
&& lk != 27142 // EQName^Token ';'
@@ -16733,6 +43154,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 27209 // 'ancestor' ';'
&& lk != 27210 // 'ancestor-or-self' ';'
&& lk != 27211 // 'and' ';'
+ && lk != 27213 // 'append' ';'
&& lk != 27214 // 'array' ';'
&& lk != 27215 // 'as' ';'
&& lk != 27216 // 'ascending' ';'
@@ -16798,6 +43220,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 27299 // 'into' ';'
&& lk != 27300 // 'is' ';'
&& lk != 27301 // 'item' ';'
+ && lk != 27302 // 'json' ';'
&& lk != 27303 // 'json-item' ';'
&& lk != 27306 // 'last' ';'
&& lk != 27307 // 'lax' ';'
@@ -16840,6 +43263,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 27372 // 'stable' ';'
&& lk != 27373 // 'start' ';'
&& lk != 27376 // 'strict' ';'
+ && lk != 27378 // 'structured-item' ';'
&& lk != 27379 // 'switch' ';'
&& lk != 27380 // 'text' ';'
&& lk != 27384 // 'to' ';'
@@ -16928,11 +43352,11 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
lookahead2W(187); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
break;
case 276: // '{'
- lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 31: // '$'
case 32: // '%'
- lookahead2W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead2W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
break;
case 86: // 'break'
case 102: // 'continue'
@@ -16966,6 +43390,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 23316 // '{' '..'
|| lk == 23828 // '{' '/'
|| lk == 24340 // '{' '//'
+ || lk == 27412 // '{' ';'
|| lk == 27924 // '{' '<'
|| lk == 28436 // '{' '<!--'
|| lk == 30484 // '{' '<?'
@@ -16986,6 +43411,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 38431 // '$' 'and'
|| lk == 38432 // '%' 'and'
|| lk == 38676 // '{' 'and'
+ || lk == 39455 // '$' 'append'
+ || lk == 39456 // '%' 'append'
|| lk == 39700 // '{' 'append'
|| lk == 39967 // '$' 'array'
|| lk == 39968 // '%' 'array'
@@ -17182,6 +43609,9 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 84511 // '$' 'item'
|| lk == 84512 // '%' 'item'
|| lk == 84756 // '{' 'item'
+ || lk == 85023 // '$' 'json'
+ || lk == 85024 // '%' 'json'
+ || lk == 85268 // '{' 'json'
|| lk == 85535 // '$' 'json-item'
|| lk == 85536 // '%' 'json-item'
|| lk == 85780 // '{' 'json-item'
@@ -17308,6 +43738,9 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 122911 // '$' 'strict'
|| lk == 122912 // '%' 'strict'
|| lk == 123156 // '{' 'strict'
+ || lk == 123935 // '$' 'structured-item'
+ || lk == 123936 // '%' 'structured-item'
+ || lk == 124180 // '{' 'structured-item'
|| lk == 124447 // '$' 'switch'
|| lk == 124448 // '%' 'switch'
|| lk == 124692 // '{' 'switch'
@@ -17466,6 +43899,9 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case -13:
parse_WhileStatement();
break;
+ case 53: // ';'
+ parse_VoidStatement();
+ break;
default:
parse_ApplyStatement();
}
@@ -17492,11 +43928,11 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
lookahead2W(187); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
break;
case 276: // '{'
- lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 31: // '$'
case 32: // '%'
- lookahead2W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead2W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
break;
case 86: // 'break'
case 102: // 'continue'
@@ -17530,6 +43966,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 23316 // '{' '..'
|| lk == 23828 // '{' '/'
|| lk == 24340 // '{' '//'
+ || lk == 27412 // '{' ';'
|| lk == 27924 // '{' '<'
|| lk == 28436 // '{' '<!--'
|| lk == 30484 // '{' '<?'
@@ -17550,6 +43987,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 38431 // '$' 'and'
|| lk == 38432 // '%' 'and'
|| lk == 38676 // '{' 'and'
+ || lk == 39455 // '$' 'append'
+ || lk == 39456 // '%' 'append'
|| lk == 39700 // '{' 'append'
|| lk == 39967 // '$' 'array'
|| lk == 39968 // '%' 'array'
@@ -17746,6 +44185,9 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 84511 // '$' 'item'
|| lk == 84512 // '%' 'item'
|| lk == 84756 // '{' 'item'
+ || lk == 85023 // '$' 'json'
+ || lk == 85024 // '%' 'json'
+ || lk == 85268 // '{' 'json'
|| lk == 85535 // '$' 'json-item'
|| lk == 85536 // '%' 'json-item'
|| lk == 85780 // '{' 'json-item'
@@ -17872,6 +44314,9 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 122911 // '$' 'strict'
|| lk == 122912 // '%' 'strict'
|| lk == 123156 // '{' 'strict'
+ || lk == 123935 // '$' 'structured-item'
+ || lk == 123936 // '%' 'structured-item'
+ || lk == 124180 // '{' 'structured-item'
|| lk == 124447 // '$' 'switch'
|| lk == 124448 // '%' 'switch'
|| lk == 124692 // '{' 'switch'
@@ -17943,7 +44388,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
try_ApplyStatement();
memoize(7, e0A, -1);
- lk = -14;
+ lk = -15;
}
catch (p1A)
{
@@ -17954,7 +44399,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
b2 = b2A; e2 = e2A; end = e2A; }}
try_AssignStatement();
memoize(7, e0A, -2);
- lk = -14;
+ lk = -15;
}
catch (p2A)
{
@@ -17965,7 +44410,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
b2 = b2A; e2 = e2A; end = e2A; }}
try_BlockStatement();
memoize(7, e0A, -3);
- lk = -14;
+ lk = -15;
}
catch (p3A)
{
@@ -17976,7 +44421,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
b2 = b2A; e2 = e2A; end = e2A; }}
try_VarDeclStatement();
memoize(7, e0A, -12);
- lk = -14;
+ lk = -15;
}
catch (p12A)
{
@@ -18034,7 +44479,10 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case -13:
try_WhileStatement();
break;
- case -14:
+ case 53: // ';'
+ try_VoidStatement();
+ break;
+ case -15:
break;
default:
try_ApplyStatement();
@@ -18059,7 +44507,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("AssignStatement", e0);
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
lookahead1W(27); // S^WS | '(:' | ':='
@@ -18074,7 +44522,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_AssignStatement()
{
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
lookahead1W(27); // S^WS | '(:' | ':='
shiftT(52); // ':='
@@ -18087,7 +44535,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("BlockStatement", e0);
shift(276); // '{'
- lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_Statements();
shift(282); // '}'
@@ -18097,7 +44545,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_BlockStatement()
{
shiftT(276); // '{'
- lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_Statements();
shiftT(282); // '}'
}
@@ -18203,7 +44651,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("ReturnStatement", e0);
shift(220); // 'return'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_Statement();
eventHandler.endNonterminal("ReturnStatement", e0);
@@ -18212,7 +44660,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_ReturnStatement()
{
shiftT(220); // 'return'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_Statement();
}
@@ -18228,12 +44676,12 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(37); // ')'
lookahead1W(77); // S^WS | '(:' | 'then'
shift(245); // 'then'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_Statement();
lookahead1W(48); // S^WS | '(:' | 'else'
shift(122); // 'else'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_Statement();
eventHandler.endNonterminal("IfStatement", e0);
@@ -18249,11 +44697,11 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(37); // ')'
lookahead1W(77); // S^WS | '(:' | 'then'
shiftT(245); // 'then'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_Statement();
lookahead1W(48); // S^WS | '(:' | 'else'
shiftT(122); // 'else'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_Statement();
}
@@ -18281,7 +44729,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(109); // 'default'
lookahead1W(70); // S^WS | '(:' | 'return'
shift(220); // 'return'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_Statement();
eventHandler.endNonterminal("SwitchStatement", e0);
@@ -18308,7 +44756,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(109); // 'default'
lookahead1W(70); // S^WS | '(:' | 'return'
shiftT(220); // 'return'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_Statement();
}
@@ -18327,7 +44775,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
}
shift(220); // 'return'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_Statement();
eventHandler.endNonterminal("SwitchCaseStatement", e0);
@@ -18346,7 +44794,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
}
shiftT(220); // 'return'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_Statement();
}
@@ -18361,16 +44809,16 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
lookahead1W(36); // S^WS | '(:' | 'catch'
shift(91); // 'catch'
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_CatchErrorList();
whitespace();
parse_BlockStatement();
- lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(278); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
switch (l1)
{
case 91: // 'catch'
- lookahead2W(276); // Wildcard | EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' |
+ lookahead2W(279); // Wildcard | EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' |
break;
default:
lk = l1;
@@ -18406,7 +44854,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
lookahead1W(36); // S^WS | '(:' | 'catch'
shiftT(91); // 'catch'
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_CatchErrorList();
try_BlockStatement();
lk = -1;
@@ -18428,6 +44876,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 36955 // 'catch' 'allowing'
&& lk != 37467 // 'catch' 'ancestor'
&& lk != 37979 // 'catch' 'ancestor-or-self'
+ && lk != 39515 // 'catch' 'append'
&& lk != 40027 // 'catch' 'array'
&& lk != 40539 // 'catch' 'as'
&& lk != 41051 // 'catch' 'ascending'
@@ -18482,6 +44931,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 82523 // 'catch' 'integrity'
&& lk != 83547 // 'catch' 'into'
&& lk != 84571 // 'catch' 'item'
+ && lk != 85083 // 'catch' 'json'
&& lk != 85595 // 'catch' 'json-item'
&& lk != 87131 // 'catch' 'last'
&& lk != 87643 // 'catch' 'lax'
@@ -18519,6 +44969,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 120923 // 'catch' 'stable'
&& lk != 121435 // 'catch' 'start'
&& lk != 122971 // 'catch' 'strict'
+ && lk != 123995 // 'catch' 'structured-item'
&& lk != 124507 // 'catch' 'switch'
&& lk != 125019 // 'catch' 'text'
&& lk != 128091 // 'catch' 'try'
@@ -18549,16 +45000,16 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
try_BlockStatement();
lookahead1W(36); // S^WS | '(:' | 'catch'
shiftT(91); // 'catch'
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_CatchErrorList();
try_BlockStatement();
for (;;)
{
- lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(278); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
switch (l1)
{
case 91: // 'catch'
- lookahead2W(276); // Wildcard | EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' |
+ lookahead2W(279); // Wildcard | EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' |
break;
default:
lk = l1;
@@ -18594,7 +45045,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
lookahead1W(36); // S^WS | '(:' | 'catch'
shiftT(91); // 'catch'
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_CatchErrorList();
try_BlockStatement();
memoize(8, e0A, -1);
@@ -18617,6 +45068,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 36955 // 'catch' 'allowing'
&& lk != 37467 // 'catch' 'ancestor'
&& lk != 37979 // 'catch' 'ancestor-or-self'
+ && lk != 39515 // 'catch' 'append'
&& lk != 40027 // 'catch' 'array'
&& lk != 40539 // 'catch' 'as'
&& lk != 41051 // 'catch' 'ascending'
@@ -18671,6 +45123,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 82523 // 'catch' 'integrity'
&& lk != 83547 // 'catch' 'into'
&& lk != 84571 // 'catch' 'item'
+ && lk != 85083 // 'catch' 'json'
&& lk != 85595 // 'catch' 'json-item'
&& lk != 87131 // 'catch' 'last'
&& lk != 87643 // 'catch' 'lax'
@@ -18708,6 +45161,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
&& lk != 120923 // 'catch' 'stable'
&& lk != 121435 // 'catch' 'start'
&& lk != 122971 // 'catch' 'strict'
+ && lk != 123995 // 'catch' 'structured-item'
&& lk != 124507 // 'catch' 'switch'
&& lk != 125019 // 'catch' 'text'
&& lk != 128091 // 'catch' 'try'
@@ -18729,7 +45183,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
}
lookahead1W(36); // S^WS | '(:' | 'catch'
shiftT(91); // 'catch'
- lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(257); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_CatchErrorList();
try_BlockStatement();
}
@@ -18761,13 +45215,13 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 31) // '$'
{
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
}
lookahead1W(70); // S^WS | '(:' | 'return'
shift(220); // 'return'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_Statement();
eventHandler.endNonterminal("TypeswitchStatement", e0);
@@ -18796,12 +45250,12 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
if (l1 == 31) // '$'
{
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
}
lookahead1W(70); // S^WS | '(:' | 'return'
shiftT(220); // 'return'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_Statement();
}
@@ -18809,22 +45263,22 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("CaseStatement", e0);
shift(88); // 'case'
- lookahead1W(260); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ lookahead1W(262); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
if (l1 == 31) // '$'
{
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
lookahead1W(30); // S^WS | '(:' | 'as'
shift(79); // 'as'
}
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_SequenceType();
lookahead1W(70); // S^WS | '(:' | 'return'
shift(220); // 'return'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_Statement();
eventHandler.endNonterminal("CaseStatement", e0);
@@ -18833,20 +45287,20 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_CaseStatement()
{
shiftT(88); // 'case'
- lookahead1W(260); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ lookahead1W(262); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
if (l1 == 31) // '$'
{
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
lookahead1W(30); // S^WS | '(:' | 'as'
shiftT(79); // 'as'
}
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
try_SequenceType();
lookahead1W(70); // S^WS | '(:' | 'return'
shiftT(220); // 'return'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_Statement();
}
@@ -18866,7 +45320,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(262); // 'variable'
lookahead1W(21); // S^WS | '$' | '(:'
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
lookahead1W(157); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
@@ -18892,7 +45346,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(41); // ','
lookahead1W(21); // S^WS | '$' | '(:'
shift(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_VarName();
lookahead1W(157); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
@@ -18928,7 +45382,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(262); // 'variable'
lookahead1W(21); // S^WS | '$' | '(:'
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
lookahead1W(157); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
if (l1 == 79) // 'as'
@@ -18951,7 +45405,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(41); // ','
lookahead1W(21); // S^WS | '$' | '(:'
shiftT(31); // '$'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
try_VarName();
lookahead1W(157); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
if (l1 == 79) // 'as'
@@ -18979,7 +45433,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
whitespace();
parse_Expr();
shift(37); // ')'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_Statement();
eventHandler.endNonterminal("WhileStatement", e0);
@@ -18993,28 +45447,40 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_Expr();
shiftT(37); // ')'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_Statement();
}
+ function parse_VoidStatement()
+ {
+ eventHandler.startNonterminal("VoidStatement", e0);
+ shift(53); // ';'
+ eventHandler.endNonterminal("VoidStatement", e0);
+ }
+
+ function try_VoidStatement()
+ {
+ shiftT(53); // ';'
+ }
+
function parse_ExprSingle()
{
eventHandler.startNonterminal("ExprSingle", e0);
switch (l1)
{
case 137: // 'for'
- lookahead2W(233); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ lookahead2W(236); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
break;
case 174: // 'let'
- lookahead2W(231); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ lookahead2W(233); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
break;
case 250: // 'try'
- lookahead2W(230); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(232); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
case 152: // 'if'
case 243: // 'switch'
case 253: // 'typeswitch'
- lookahead2W(228); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(229); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
default:
lk = l1;
@@ -19051,18 +45517,18 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 137: // 'for'
- lookahead2W(233); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ lookahead2W(236); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
break;
case 174: // 'let'
- lookahead2W(231); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ lookahead2W(233); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
break;
case 250: // 'try'
- lookahead2W(230); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(232); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
case 152: // 'if'
case 243: // 'switch'
case 253: // 'typeswitch'
- lookahead2W(228); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(229); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
default:
lk = l1;
@@ -19098,24 +45564,50 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
eventHandler.startNonterminal("ExprSimple", e0);
switch (l1)
{
+ case 77: // 'append'
+ lookahead2W(231); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
case 218: // 'rename'
- lookahead2W(232); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(234); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
case 219: // 'replace'
lookahead2W(235); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
case 110: // 'delete'
case 159: // 'insert'
- lookahead2W(234); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(237); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
case 103: // 'copy'
case 129: // 'every'
case 235: // 'some'
- lookahead2W(229); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ lookahead2W(230); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
break;
default:
lk = l1;
}
+ if (lk == 133851) // 'replace' 'value'
+ {
+ lk = memoized(9, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_ReplaceExpr();
+ lk = -6;
+ }
+ catch (p6A)
+ {
+ lk = -11;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(9, e0, lk);
+ }
+ }
switch (lk)
{
case 16001: // 'every' '$'
@@ -19133,8 +45625,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 98010: // 'rename' 'node'
parse_RenameExpr();
break;
+ case -6:
case 98011: // 'replace' 'node'
- case 133851: // 'replace' 'value'
parse_ReplaceExpr();
break;
case 15975: // 'copy' '$'
@@ -19149,10 +45641,10 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 85210: // 'rename' 'json'
parse_JSONRenameExpr();
break;
- case 85211: // 'replace' 'json'
+ case -11:
parse_JSONReplaceExpr();
break;
- case 77: // 'append'
+ case 85069: // 'append' 'json'
parse_JSONAppendExpr();
break;
default:
@@ -19165,24 +45657,51 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
switch (l1)
{
+ case 77: // 'append'
+ lookahead2W(231); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
case 218: // 'rename'
- lookahead2W(232); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(234); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
case 219: // 'replace'
lookahead2W(235); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
case 110: // 'delete'
case 159: // 'insert'
- lookahead2W(234); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ lookahead2W(237); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
break;
case 103: // 'copy'
case 129: // 'every'
case 235: // 'some'
- lookahead2W(229); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ lookahead2W(230); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
break;
default:
lk = l1;
}
+ if (lk == 133851) // 'replace' 'value'
+ {
+ lk = memoized(9, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_ReplaceExpr();
+ memoize(9, e0A, -6);
+ lk = -13;
+ }
+ catch (p6A)
+ {
+ lk = -11;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(9, e0A, -11);
+ }
+ }
+ }
switch (lk)
{
case 16001: // 'every' '$'
@@ -19200,8 +45719,8 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 98010: // 'rename' 'node'
try_RenameExpr();
break;
+ case -6:
case 98011: // 'replace' 'node'
- case 133851: // 'replace' 'value'
try_ReplaceExpr();
break;
case 15975: // 'copy' '$'
@@ -19216,12 +45735,14 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 85210: // 'rename' 'json'
try_JSONRenameExpr();
break;
- case 85211: // 'replace' 'json'
+ case -11:
try_JSONReplaceExpr();
break;
- case 77: // 'append'
+ case 85069: // 'append' 'json'
try_JSONAppendExpr();
break;
+ case -13:
+ break;
default:
try_OrExpr();
}
@@ -19233,7 +45754,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(110); // 'delete'
lookahead1W(56); // S^WS | '(:' | 'json'
shift(166); // 'json'
- lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ lookahead1W(264); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
whitespace();
parse_PostfixExpr();
eventHandler.endNonterminal("JSONDeleteExpr", e0);
@@ -19244,63 +45765,157 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(110); // 'delete'
lookahead1W(56); // S^WS | '(:' | 'json'
shiftT(166); // 'json'
- lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ lookahead1W(264); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
try_PostfixExpr();
}
function parse_JSONInsertExpr()
{
eventHandler.startNonterminal("JSONInsertExpr", e0);
- shift(159); // 'insert'
- lookahead1W(56); // S^WS | '(:' | 'json'
- shift(166); // 'json'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- whitespace();
- parse_ExprSingle();
- shift(163); // 'into'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- whitespace();
- parse_ExprSingle();
switch (l1)
{
- case 81: // 'at'
- lookahead2W(69); // S^WS | '(:' | 'position'
+ case 159: // 'insert'
+ lookahead2W(56); // S^WS | '(:' | 'json'
break;
default:
lk = l1;
}
- if (lk == 108113) // 'at' 'position'
+ lk = memoized(10, e0);
+ if (lk == 0)
{
- lk = memoized(9, e0);
- if (lk == 0)
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
{
- var b0A = b0; var e0A = e0; var l1A = l1;
- var b1A = b1; var e1A = e1; var l2A = l2;
- var b2A = b2; var e2A = e2;
- try
+ shiftT(159); // 'insert'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ shiftT(163); // 'into'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(69); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 108113) // 'at' 'position'
+ {
+ lk = memoized(11, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ memoize(11, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(11, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1)
{
shiftT(81); // 'at'
lookahead1W(69); // S^WS | '(:' | 'position'
shiftT(211); // 'position'
lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_ExprSingle();
- lk = -1;
- }
- catch (p1A)
- {
- lk = -2;
}
- b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
- b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
- b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(9, e0, lk);
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
}
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(10, e0, lk);
}
- if (lk == -1)
+ switch (lk)
{
- shift(81); // 'at'
- lookahead1W(69); // S^WS | '(:' | 'position'
- shift(211); // 'position'
+ case -1:
+ shift(159); // 'insert'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(163); // 'into'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(69); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 108113) // 'at' 'position'
+ {
+ lk = memoized(11, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ lk = -1;
+ }
+ catch (p1B)
+ {
+ lk = -2;
+ }
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(11, e0, lk);
+ }
+ }
+ if (lk == -1)
+ {
+ shift(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shift(211); // 'position'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ break;
+ default:
+ shift(159); // 'insert'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_PairConstructorList();
+ shift(163); // 'into'
lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_ExprSingle();
@@ -19310,54 +45925,149 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_JSONInsertExpr()
{
- shiftT(159); // 'insert'
- lookahead1W(56); // S^WS | '(:' | 'json'
- shiftT(166); // 'json'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- try_ExprSingle();
- shiftT(163); // 'into'
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- try_ExprSingle();
switch (l1)
{
- case 81: // 'at'
- lookahead2W(69); // S^WS | '(:' | 'position'
+ case 159: // 'insert'
+ lookahead2W(56); // S^WS | '(:' | 'json'
break;
default:
lk = l1;
}
- if (lk == 108113) // 'at' 'position'
+ lk = memoized(10, e0);
+ if (lk == 0)
{
- lk = memoized(9, e0);
- if (lk == 0)
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
{
- var b0A = b0; var e0A = e0; var l1A = l1;
- var b1A = b1; var e1A = e1; var l2A = l2;
- var b2A = b2; var e2A = e2;
- try
+ shiftT(159); // 'insert'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ shiftT(163); // 'into'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(69); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 108113) // 'at' 'position'
+ {
+ lk = memoized(11, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ memoize(11, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(11, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1)
{
shiftT(81); // 'at'
lookahead1W(69); // S^WS | '(:' | 'position'
shiftT(211); // 'position'
lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_ExprSingle();
- memoize(9, e0A, -1);
- }
- catch (p1A)
- {
- b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
- b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
- b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(9, e0A, -2);
}
+ memoize(10, e0A, -1);
+ lk = -3;
+ }
+ catch (p1A)
+ {
lk = -2;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(10, e0A, -2);
}
}
- if (lk == -1)
+ switch (lk)
{
- shiftT(81); // 'at'
- lookahead1W(69); // S^WS | '(:' | 'position'
- shiftT(211); // 'position'
+ case -1:
+ shiftT(159); // 'insert'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ shiftT(163); // 'into'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(69); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 108113) // 'at' 'position'
+ {
+ lk = memoized(11, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ memoize(11, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(11, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1)
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+ break;
+ case -3:
+ break;
+ default:
+ shiftT(159); // 'insert'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_PairConstructorList();
+ shiftT(163); // 'into'
lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_ExprSingle();
}
@@ -19369,7 +46079,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shift(218); // 'rename'
lookahead1W(56); // S^WS | '(:' | 'json'
shift(166); // 'json'
- lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ lookahead1W(264); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
whitespace();
parse_PostfixExpr();
shift(79); // 'as'
@@ -19384,7 +46094,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(218); // 'rename'
lookahead1W(56); // S^WS | '(:' | 'json'
shiftT(166); // 'json'
- lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ lookahead1W(264); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
try_PostfixExpr();
shiftT(79); // 'as'
lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
@@ -19395,13 +46105,13 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("JSONReplaceExpr", e0);
shift(219); // 'replace'
- lookahead1W(56); // S^WS | '(:' | 'json'
- shift(166); // 'json'
lookahead1W(82); // S^WS | '(:' | 'value'
shift(261); // 'value'
lookahead1W(64); // S^WS | '(:' | 'of'
shift(196); // 'of'
- lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(264); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
whitespace();
parse_PostfixExpr();
shift(270); // 'with'
@@ -19414,13 +46124,13 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_JSONReplaceExpr()
{
shiftT(219); // 'replace'
- lookahead1W(56); // S^WS | '(:' | 'json'
- shiftT(166); // 'json'
lookahead1W(82); // S^WS | '(:' | 'value'
shiftT(261); // 'value'
lookahead1W(64); // S^WS | '(:' | 'of'
shiftT(196); // 'of'
- lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(264); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
try_PostfixExpr();
shiftT(270); // 'with'
lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
@@ -19532,7 +46242,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("CompAttrConstructor", e0);
shift(82); // 'attribute'
- lookahead1W(256); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(258); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
switch (l1)
{
case 276: // '{'
@@ -19550,14 +46260,14 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 276: // '{'
- lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
default:
lk = l1;
}
if (lk == 144660) // '{' '}'
{
- lk = memoized(10, e0);
+ lk = memoized(12, e0);
if (lk == 0)
{
var b0A = b0; var e0A = e0; var l1A = l1;
@@ -19577,7 +46287,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(10, e0, lk);
+ memoize(12, e0, lk);
}
}
switch (lk)
@@ -19597,7 +46307,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_CompAttrConstructor()
{
shiftT(82); // 'attribute'
- lookahead1W(256); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(258); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
switch (l1)
{
case 276: // '{'
@@ -19613,14 +46323,14 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 276: // '{'
- lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
default:
lk = l1;
}
if (lk == 144660) // '{' '}'
{
- lk = memoized(10, e0);
+ lk = memoized(12, e0);
if (lk == 0)
{
var b0A = b0; var e0A = e0; var l1A = l1;
@@ -19631,7 +46341,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(276); // '{'
lookahead1W(88); // S^WS | '(:' | '}'
shiftT(282); // '}'
- memoize(10, e0A, -1);
+ memoize(12, e0A, -1);
lk = -3;
}
catch (p1A)
@@ -19640,7 +46350,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(10, e0A, -2);
+ memoize(12, e0A, -2);
}
}
}
@@ -19662,7 +46372,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("CompPIConstructor", e0);
shift(216); // 'processing-instruction'
- lookahead1W(249); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(251); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
switch (l1)
{
case 276: // '{'
@@ -19680,14 +46390,14 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 276: // '{'
- lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
default:
lk = l1;
}
if (lk == 144660) // '{' '}'
{
- lk = memoized(11, e0);
+ lk = memoized(13, e0);
if (lk == 0)
{
var b0A = b0; var e0A = e0; var l1A = l1;
@@ -19707,7 +46417,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(11, e0, lk);
+ memoize(13, e0, lk);
}
}
switch (lk)
@@ -19727,7 +46437,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_CompPIConstructor()
{
shiftT(216); // 'processing-instruction'
- lookahead1W(249); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(251); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
switch (l1)
{
case 276: // '{'
@@ -19743,14 +46453,14 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 276: // '{'
- lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
default:
lk = l1;
}
if (lk == 144660) // '{' '}'
{
- lk = memoized(11, e0);
+ lk = memoized(13, e0);
if (lk == 0)
{
var b0A = b0; var e0A = e0; var l1A = l1;
@@ -19761,7 +46471,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
shiftT(276); // '{'
lookahead1W(88); // S^WS | '(:' | '}'
shiftT(282); // '}'
- memoize(11, e0A, -1);
+ memoize(13, e0A, -1);
lk = -3;
}
catch (p1A)
@@ -19770,7 +46480,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(11, e0A, -2);
+ memoize(13, e0A, -2);
}
}
}
@@ -19828,17 +46538,17 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 184: // 'namespace'
- lookahead2W(254); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead2W(256); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
break;
case 216: // 'processing-instruction'
- lookahead2W(252); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead2W(254); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
break;
case 276: // '{'
- lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 82: // 'attribute'
case 121: // 'element'
- lookahead2W(257); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead2W(259); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
break;
case 96: // 'comment'
case 244: // 'text'
@@ -19855,7 +46565,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 73: // 'ancestor'
case 74: // 'ancestor-or-self'
case 75: // 'and'
- case 78: // 'array'
+ case 77: // 'append'
case 79: // 'as'
case 80: // 'ascending'
case 81: // 'at'
@@ -19911,7 +46621,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 162: // 'intersect'
case 163: // 'into'
case 164: // 'is'
- case 167: // 'json-item'
+ case 166: // 'json'
case 170: // 'last'
case 171: // 'lax'
case 172: // 'le'
@@ -20058,6 +46768,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 83732 // '{' 'into'
|| lk == 84244 // '{' 'is'
|| lk == 84756 // '{' 'item'
+ || lk == 85268 // '{' 'json'
|| lk == 85780 // '{' 'json-item'
|| lk == 87316 // '{' 'last'
|| lk == 87828 // '{' 'lax'
@@ -20100,6 +46811,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 121108 // '{' 'stable'
|| lk == 121620 // '{' 'start'
|| lk == 123156 // '{' 'strict'
+ || lk == 124180 // '{' 'structured-item'
|| lk == 124692 // '{' 'switch'
|| lk == 125204 // '{' 'text'
|| lk == 127252 // '{' 'to'
@@ -20123,7 +46835,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 142612 // '{' '{|'
|| lk == 144660) // '{' '}'
{
- lk = memoized(12, e0);
+ lk = memoized(14, e0);
if (lk == 0)
{
var b0A = b0; var e0A = e0; var l1A = l1;
@@ -20141,7 +46853,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(12, e0, lk);
+ memoize(14, e0, lk);
}
}
switch (lk)
@@ -20167,7 +46879,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 17481: // 'ancestor' '('
case 17482: // 'ancestor-or-self' '('
case 17483: // 'and' '('
- case 17486: // 'array' '('
+ case 17485: // 'append' '('
case 17487: // 'as' '('
case 17488: // 'ascending' '('
case 17489: // 'at' '('
@@ -20224,7 +46936,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 17570: // 'intersect' '('
case 17571: // 'into' '('
case 17572: // 'is' '('
- case 17575: // 'json-item' '('
+ case 17574: // 'json' '('
case 17578: // 'last' '('
case 17579: // 'lax' '('
case 17580: // 'le' '('
@@ -20286,15 +46998,18 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
parse_UnorderedExpr();
break;
case 32: // '%'
+ case 78: // 'array'
case 120: // 'document-node'
case 124: // 'empty-sequence'
case 145: // 'function'
case 152: // 'if'
case 165: // 'item'
+ case 167: // 'json-item'
case 185: // 'namespace-node'
case 191: // 'node'
case 226: // 'schema-attribute'
case 227: // 'schema-element'
+ case 242: // 'structured-item'
case 243: // 'switch'
case 253: // 'typeswitch'
case 14854: // EQName^Token '#'
@@ -20303,7 +47018,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 14921: // 'ancestor' '#'
case 14922: // 'ancestor-or-self' '#'
case 14923: // 'and' '#'
- case 14926: // 'array' '#'
+ case 14925: // 'append' '#'
case 14927: // 'as' '#'
case 14928: // 'ascending' '#'
case 14929: // 'at' '#'
@@ -20363,7 +47078,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 15010: // 'intersect' '#'
case 15011: // 'into' '#'
case 15012: // 'is' '#'
- case 15015: // 'json-item' '#'
+ case 15014: // 'json' '#'
case 15018: // 'last' '#'
case 15019: // 'lax' '#'
case 15020: // 'le' '#'
@@ -20421,6 +47136,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
parse_FunctionItemExpr();
break;
case -10:
+ case 27412: // '{' ';'
parse_BlockExpr();
break;
case -11:
@@ -20443,17 +47159,17 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
switch (l1)
{
case 184: // 'namespace'
- lookahead2W(254); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead2W(256); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
break;
case 216: // 'processing-instruction'
- lookahead2W(252); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead2W(254); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
break;
case 276: // '{'
- lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead2W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
break;
case 82: // 'attribute'
case 121: // 'element'
- lookahead2W(257); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead2W(259); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
break;
case 96: // 'comment'
case 244: // 'text'
@@ -20470,7 +47186,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 73: // 'ancestor'
case 74: // 'ancestor-or-self'
case 75: // 'and'
- case 78: // 'array'
+ case 77: // 'append'
case 79: // 'as'
case 80: // 'ascending'
case 81: // 'at'
@@ -20526,7 +47242,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 162: // 'intersect'
case 163: // 'into'
case 164: // 'is'
- case 167: // 'json-item'
+ case 166: // 'json'
case 170: // 'last'
case 171: // 'lax'
case 172: // 'le'
@@ -20673,6 +47389,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 83732 // '{' 'into'
|| lk == 84244 // '{' 'is'
|| lk == 84756 // '{' 'item'
+ || lk == 85268 // '{' 'json'
|| lk == 85780 // '{' 'json-item'
|| lk == 87316 // '{' 'last'
|| lk == 87828 // '{' 'lax'
@@ -20715,6 +47432,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 121108 // '{' 'stable'
|| lk == 121620 // '{' 'start'
|| lk == 123156 // '{' 'strict'
+ || lk == 124180 // '{' 'structured-item'
|| lk == 124692 // '{' 'switch'
|| lk == 125204 // '{' 'text'
|| lk == 127252 // '{' 'to'
@@ -20738,7 +47456,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
|| lk == 142612 // '{' '{|'
|| lk == 144660) // '{' '}'
{
- lk = memoized(12, e0);
+ lk = memoized(14, e0);
if (lk == 0)
{
var b0A = b0; var e0A = e0; var l1A = l1;
@@ -20747,7 +47465,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
try
{
try_BlockExpr();
- memoize(12, e0A, -10);
+ memoize(14, e0A, -10);
lk = -14;
}
catch (p10A)
@@ -20756,7 +47474,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
b2 = b2A; e2 = e2A; end = e2A; }}
- memoize(12, e0A, -11);
+ memoize(14, e0A, -11);
}
}
}
@@ -20783,7 +47501,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 17481: // 'ancestor' '('
case 17482: // 'ancestor-or-self' '('
case 17483: // 'and' '('
- case 17486: // 'array' '('
+ case 17485: // 'append' '('
case 17487: // 'as' '('
case 17488: // 'ascending' '('
case 17489: // 'at' '('
@@ -20840,7 +47558,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 17570: // 'intersect' '('
case 17571: // 'into' '('
case 17572: // 'is' '('
- case 17575: // 'json-item' '('
+ case 17574: // 'json' '('
case 17578: // 'last' '('
case 17579: // 'lax' '('
case 17580: // 'le' '('
@@ -20902,15 +47620,18 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
try_UnorderedExpr();
break;
case 32: // '%'
+ case 78: // 'array'
case 120: // 'document-node'
case 124: // 'empty-sequence'
case 145: // 'function'
case 152: // 'if'
case 165: // 'item'
+ case 167: // 'json-item'
case 185: // 'namespace-node'
case 191: // 'node'
case 226: // 'schema-attribute'
case 227: // 'schema-element'
+ case 242: // 'structured-item'
case 243: // 'switch'
case 253: // 'typeswitch'
case 14854: // EQName^Token '#'
@@ -20919,7 +47640,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 14921: // 'ancestor' '#'
case 14922: // 'ancestor-or-self' '#'
case 14923: // 'and' '#'
- case 14926: // 'array' '#'
+ case 14925: // 'append' '#'
case 14927: // 'as' '#'
case 14928: // 'ascending' '#'
case 14929: // 'at' '#'
@@ -20979,7 +47700,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
case 15010: // 'intersect' '#'
case 15011: // 'into' '#'
case 15012: // 'is' '#'
- case 15015: // 'json-item' '#'
+ case 15014: // 'json' '#'
case 15018: // 'last' '#'
case 15019: // 'lax' '#'
case 15020: // 'le' '#'
@@ -21037,6 +47758,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
try_FunctionItemExpr();
break;
case -10:
+ case 27412: // '{' ';'
try_BlockExpr();
break;
case -11:
@@ -21059,7 +47781,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("JSONSimpleObjectUnion", e0);
shift(278); // '{|'
- lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 281) // '|}'
{
whitespace();
@@ -21072,7 +47794,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_JSONSimpleObjectUnion()
{
shiftT(278); // '{|'
- lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 281) // '|}'
{
try_Expr();
@@ -21084,22 +47806,11 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("ObjectConstructor", e0);
shift(276); // '{'
- lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 282) // '}'
{
whitespace();
- parse_PairConstructor();
- for (;;)
- {
- if (l1 != 41) // ','
- {
- break;
- }
- shift(41); // ','
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- whitespace();
- parse_PairConstructor();
- }
+ parse_PairConstructorList();
}
shift(282); // '}'
eventHandler.endNonterminal("ObjectConstructor", e0);
@@ -21108,22 +47819,45 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_ObjectConstructor()
{
shiftT(276); // '{'
- lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 282) // '}'
{
- try_PairConstructor();
- for (;;)
+ try_PairConstructorList();
+ }
+ shiftT(282); // '}'
+ }
+
+ function parse_PairConstructorList()
+ {
+ eventHandler.startNonterminal("PairConstructorList", e0);
+ parse_PairConstructor();
+ for (;;)
+ {
+ if (l1 != 41) // ','
{
- if (l1 != 41) // ','
- {
- break;
- }
- shiftT(41); // ','
- lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
- try_PairConstructor();
+ break;
}
+ shift(41); // ','
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_PairConstructor();
+ }
+ eventHandler.endNonterminal("PairConstructorList", e0);
+ }
+
+ function try_PairConstructorList()
+ {
+ try_PairConstructor();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_PairConstructor();
}
- shiftT(282); // '}'
}
function parse_PairConstructor()
@@ -21149,7 +47883,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("ArrayConstructor", e0);
shift(68); // '['
- lookahead1W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 69) // ']'
{
whitespace();
@@ -21162,7 +47896,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_ArrayConstructor()
{
shiftT(68); // '['
- lookahead1W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
if (l1 != 69) // ']'
{
try_Expr();
@@ -21174,7 +47908,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("BlockExpr", e0);
shift(276); // '{'
- lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_StatementsAndOptionalExpr();
shift(282); // '}'
@@ -21184,7 +47918,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
function try_BlockExpr()
{
shiftT(276); // '{'
- lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
try_StatementsAndOptionalExpr();
shiftT(282); // '}'
}
@@ -21193,7 +47927,7 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
{
eventHandler.startNonterminal("FunctionDecl", e0);
shift(145); // 'function'
- lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ lookahead1W(255); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
parse_EQName();
lookahead1W(22); // S^WS | '(' | '(:'
@@ -21208,17 +47942,15 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
lookahead1W(148); // S^WS | '(:' | 'as' | 'external' | '{'
if (l1 == 79) // 'as'
{
- shift(79); // 'as'
- lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
whitespace();
- parse_SequenceType();
+ parse_ReturnType();
}
lookahead1W(118); // S^WS | '(:' | 'external' | '{'
switch (l1)
{
case 276: // '{'
shift(276); // '{'
- lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ lookahead1W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
whitespace();
parse_StatementsAndOptionalExpr();
shift(282); // '}'
@@ -21229,35 +47961,14 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
eventHandler.endNonterminal("FunctionDecl", e0);
}
- var lk, b0, e0;
- var l1, b1, e1;
- var l2, b2, e2;
- var bx, ex, sx, lx, tx;
- var eventHandler;
- var memo;
-
- function memoize(i, e, v)
- {
- memo[(e << 4) + i] = v;
- }
-
- function memoized(i, e)
- {
- var v = memo[(e << 4) + i];
- return typeof v != "undefined" ? v : 0;
- }
-
- function error(b, e, s, l, t)
+ function parse_ReturnType()
{
- if (e > ex)
- {
- bx = b;
- ex = e;
- sx = s;
- lx = l;
- tx = t;
- }
- throw new self.ParseException(bx, ex, sx, lx, tx);
+ eventHandler.startNonterminal("ReturnType", e0);
+ shift(79); // 'as'
+ lookahead1W(260); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ eventHandler.endNonterminal("ReturnType", e0);
}
function shift(t)
@@ -21372,6 +48083,37 @@ ace.define('ace/mode/xquery/JSONParseTreeHandler', ['require', 'exports', 'modul
lk = (l2 << 9) | l1;
}
+ function error(b, e, s, l, t)
+ {
+ if (e > ex)
+ {
+ bx = b;
+ ex = e;
+ sx = s;
+ lx = l;
+ tx = t;
+ }
+ throw new self.ParseException(bx, ex, sx, lx, tx);
+ }
+
+ var lk, b0, e0;
+ var l1, b1, e1;
+ var l2, b2, e2;
+ var bx, ex, sx, lx, tx;
+ var eventHandler;
+ var memo;
+
+ function memoize(i, e, v)
+ {
+ memo[(e << 4) + i] = v;
+ }
+
+ function memoized(i, e)
+ {
+ var v = memo[(e << 4) + i];
+ return typeof v != "undefined" ? v : 0;
+ }
+
var input;
var size;
var begin;
@@ -21467,10 +48209,10 @@ XQueryParser.getTokenSet = function(tokenSetId)
for (var i = 0; i < 284; i += 32)
{
var j = i;
- var i0 = (i >> 5) * 3684 + s - 1;
- var i1 = i0 >> 2;
+ var i0 = (i >> 5) * 3694 + s - 1;
+ var i1 = i0 >> 1;
var i2 = i1 >> 2;
- var f = XQueryParser.EXPECTED[(i0 & 3) + XQueryParser.EXPECTED[(i1 & 3) + XQueryParser.EXPECTED[(i2 & 7) + XQueryParser.EXPECTED[i2 >> 3]]]];
+ var f = XQueryParser.EXPECTED[(i0 & 1) + XQueryParser.EXPECTED[(i1 & 3) + XQueryParser.EXPECTED[(i2 & 3) + XQueryParser.EXPECTED[i2 >> 2]]]];
for ( ; f != 0; f >>>= 1, ++j)
{
if ((f & 1) != 0)
@@ -21495,15 +48237,15 @@ XQueryParser.MAP2 =
];
XQueryParser.INITIAL =
-[ 1, 12290, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284
+[ 1, 12290, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287
];
XQueryParser.TRANSITION =
-[ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22007, 18176, 18196, 18196, 18196, 18203, 18196, 18196, 18196, 18196, 18230, 18196, 18196, 18196, 18196, 18219, 18196, 18180, 18246, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23546, 21369, 18411, 20907, 20920, 20932, 20944, 22539, 18416, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 37625, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 21008, 21032, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21632, 21055, 23546, 23546, 23546, 21178, 23546, 23546, 23916, 42362, 21241, 23546, 23546, 23546, 23546, 19298, 47203, 21077, 21110, 23546, 23546, 23546, 35799, 23546, 23546, 21194, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 21229, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21358, 21323, 23546, 23546, 23546, 26152, 23546, 23546, 27593, 23546, 21369, 29482, 21257, 21282, 21273, 21304, 21317, 21346, 20967, 23546, 23546, 23546, 28947, 23546, 23546, 21385, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 20711, 21423, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 21446, 26048, 18745, 18766, 18771, 20561, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23540, 23546, 23546, 23546, 25880, 23545, 23546, 31245, 23546, 21468, 23534, 21504, 23546, 21511, 23546, 21527, 21539, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 21567, 23546, 23546, 23546, 31874, 23546, 23546, 21586, 23546, 23546, 21608, 21620, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23546, 35211, 23546, 23546, 23546, 23546, 23546, 23546, 23424, 21648, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 21681, 18544, 18567, 18590, 50977, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21736, 21705, 23546, 23546, 23546, 44539, 23546, 23546, 24265, 25689, 25607, 23546, 23546, 23546, 23546, 26450, 47502, 21724, 21752, 23546, 23546, 23546, 35799, 23546, 23546, 21783, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 20237, 21819, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21551, 21857, 21913, 21913, 21913, 21864, 21908, 21913, 21918, 21967, 21842, 21949, 21880, 21961, 21896, 21934, 21983, 21995, 20967, 23546, 23546, 23546, 26225, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 22023, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 28636, 23546, 23546, 23546, 25912, 50946, 23546, 50080, 50952, 21369, 28635, 23546, 22054, 22060, 22076, 22111, 22121, 22137, 23546, 23546, 23546, 30755, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 22183, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 27655, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 51066, 39748, 22869, 22242, 22228, 22245, 22261, 22277, 22288, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 20285, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 18648, 40763, 24585, 22304, 22324, 22304, 22338, 24585, 22308, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 22361, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 22386, 23546, 23546, 23546, 25841, 18403, 23546, 19576, 22382, 44281, 22402, 22429, 22434, 22434, 22450, 22385, 22413, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22473, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23546, 21369, 25653, 22498, 22518, 22498, 22532, 25653, 22502, 22555, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27132, 23546, 42897, 23546, 44844, 38626, 22584, 22361, 37471, 23546, 23546, 23546, 23546, 22587, 47563, 46856, 47563, 47563, 22603, 35356, 22824, 22824, 34828, 22804, 22621, 22804, 22804, 33187, 36943, 23546, 23546, 23546, 23546, 23546, 26071, 23546, 22641, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 43701, 32739, 23546, 23546, 23546, 23546, 23546, 29474, 22702, 23546, 33124, 44563, 47563, 47563, 47563, 47564, 22719, 35350, 22824, 22764, 22824, 22767, 35689, 22783, 22804, 22803, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 27587, 23546, 23546, 47562, 46826, 47563, 47563, 27195, 22821, 42846, 22824, 22824, 22824, 30376, 22804, 22841, 22804, 22804, 29883, 33199, 23546, 23546, 21430, 23546, 49502, 48973, 47563, 47563, 36153, 45209, 22824, 22824, 39816, 27834, 22804, 22804, 43796, 30403, 39964, 23546, 23546, 22861, 23546, 47560, 22885, 47563, 23113, 22903, 22824, 33078, 22920, 22804, 38116, 23546, 23546, 22937, 29174, 22980, 47563, 34384, 42527, 22825, 23019, 22804, 31964, 47447, 46606, 23083, 36624, 23105, 32340, 30673, 23131, 36549, 23164, 40907, 43074, 23200, 23229, 23275, 36645, 36686, 33550, 48975, 23107, 30672, 23141, 39417, 23313, 23334, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 24855, 21369, 23546, 23546, 23546, 23546, 23546, 20980, 20992, 23383, 23546, 23546, 23546, 35799, 23546, 23546, 23420, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 23440, 27132, 23546, 23546, 23546, 44844, 23546, 23546, 18368, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 22603, 22824, 22824, 22824, 34828, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 26071, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23485, 23546, 23546, 23546, 26606, 23546, 23546, 23546, 23546, 21369, 28080, 23505, 23528, 23563, 23575, 28081, 23512, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 30821, 23546, 37478, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23598, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23184, 21369, 23546, 23546, 23546, 23546, 23546, 22653, 22665, 23615, 23546, 23546, 23546, 35799, 23546, 23546, 23644, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 23664, 27132, 23546, 23546, 23546, 44844, 23546, 23546, 23688, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 22603, 22824, 22824, 22824, 34828, 22804, 22804, 22804, 22804, 39677, 48779, 23733, 23546, 23546, 23546, 23546, 34921, 23753, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 23777, 48792, 23546, 23546, 23546, 23546, 23546, 50620, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 41753, 22821, 22824, 22824, 22824, 22824, 44122, 35849, 22804, 22804, 22804, 22804, 29879, 23672, 23807, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 34866, 22821, 22824, 22824, 22824, 22824, 23826, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 39721, 23546, 23546, 23546, 30797, 25982, 23546, 23546, 23849, 21369, 20313, 44188, 23887, 23893, 23909, 23546, 49114, 23932, 23546, 23546, 23546, 36603, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 24187, 24465, 24820, 25200, 24258, 18282, 18849, 18305, 23964, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 23993, 24116, 24017, 24046, 24001, 24088, 25090, 24132, 24812, 24103, 24159, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 24182, 25436, 24884, 24206, 24190, 24890, 24819, 24363, 24227, 24819, 24414, 24143, 25214, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 24243, 24030, 25425, 24281, 24706, 24308, 24337, 24350, 24389, 24405, 24517, 24423, 25208, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 24439, 19364, 24455, 25063, 24489, 24505, 24533, 25266, 24373, 24545, 24561, 24577, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 19809, 24679, 24601, 25048, 19406, 24473, 24617, 25251, 25017, 24736, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 24633, 24673, 24695, 24722, 24779, 24801, 24836, 23977, 20842, 20016, 18679, 20827, 20042, 24871, 24906, 24935, 24951, 25006, 25411, 25295, 20159, 20175, 20206, 25033, 24292, 25079, 25281, 25106, 20376, 20392, 19394, 24919, 24657, 20462, 19676, 24211, 24785, 32258, 19353, 24647, 24966, 20473, 24060, 25136, 20616, 25172, 25188, 25236, 24072, 25311, 25362, 25396, 25452, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 21328, 23546, 23546, 23546, 25841, 25477, 23546, 23546, 25472, 32915, 25493, 25501, 25501, 25501, 25517, 21330, 25540, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 25581, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20499, 25597, 18792, 18808, 18830, 23628, 18814, 25623, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 21016, 25645, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 25669, 25705, 25721, 19477, 25754, 19498, 25737, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 18708, 21452, 19692, 19708, 20143, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23546, 50535, 23259, 25770, 25770, 25770, 25779, 21123, 21135, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 25220, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 25802, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21147, 20888, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23546, 21369, 22959, 25825, 25825, 25825, 25834, 20891, 22964, 25857, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 27140, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 25873, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25552, 25561, 23546, 23546, 23546, 26852, 23546, 23546, 23546, 23546, 21369, 33245, 25896, 25896, 25896, 25905, 36950, 33250, 25928, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 22366, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 25964, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 25998, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 26099, 23546, 23546, 23546, 23546, 25841, 21661, 23546, 23546, 21094, 43925, 23546, 23546, 23546, 21665, 26069, 21092, 26087, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 31389, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 26115, 26145, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 23546, 43987, 26168, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 50621, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 50620, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 23672, 23807, 23546, 23546, 23546, 23546, 26285, 23546, 23546, 47562, 47563, 47563, 47563, 29369, 22821, 22824, 22824, 22824, 22824, 28821, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 26302, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 50621, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 50620, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 23672, 23807, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 29369, 22821, 22824, 22824, 22824, 22824, 28821, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 50621, 26321, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 50620, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 23672, 23807, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 29369, 22821, 22824, 22824, 22824, 22824, 28821, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 50621, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 19867, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 23672, 23807, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 29369, 22821, 22824, 22824, 22824, 22824, 28821, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 26341, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 26341, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 50621, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 50620, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 23672, 23807, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 29369, 22821, 22824, 22824, 22824, 22824, 28821, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 23049, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26364, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 19293, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 31312, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 37937, 26399, 26410, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 26426, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 26445, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23546, 21369, 41698, 26466, 26486, 26508, 26520, 41701, 26470, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 38227, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 26543, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 23546, 23546, 23424, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23546, 21369, 28554, 23546, 26577, 26583, 26599, 47449, 44239, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 26622, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 26638, 20392, 51127, 20418, 50802, 26654, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 27306, 23546, 23546, 23546, 26527, 26683, 26714, 28322, 26699, 26731, 50814, 50823, 26775, 26789, 26801, 26817, 26829, 26204, 26845, 23599, 23546, 25326, 21171, 35898, 34903, 26868, 26909, 26948, 33311, 26979, 26959, 26995, 27011, 45967, 27047, 27063, 27101, 27117, 34536, 27156, 23546, 23546, 44844, 41240, 34846, 23546, 42415, 27173, 27664, 23546, 42356, 28101, 47563, 47563, 47563, 27192, 27418, 22824, 22824, 42533, 43762, 22804, 22804, 22804, 27211, 27231, 36943, 23546, 44839, 40944, 23546, 27267, 27287, 46640, 23546, 27304, 35519, 43402, 27322, 27344, 47563, 47563, 27380, 27403, 27436, 31453, 22824, 33011, 27464, 27493, 27533, 27556, 22804, 38069, 35418, 30315, 27573, 26241, 27609, 23546, 44532, 27629, 39107, 50620, 23546, 45009, 27646, 31107, 27698, 47563, 27746, 27765, 23297, 27785, 27825, 36368, 22824, 27859, 48139, 23833, 27991, 44504, 49256, 22804, 43572, 23672, 27877, 42988, 25683, 23546, 27893, 27913, 46094, 23546, 21213, 44018, 47563, 30489, 32462, 27941, 34820, 22824, 45399, 49012, 28821, 27978, 22804, 22804, 28014, 28034, 49064, 28072, 35792, 28097, 51046, 28117, 50856, 22994, 28137, 47563, 41728, 28206, 28229, 22824, 41433, 28267, 28290, 22804, 34572, 28320, 28338, 23546, 23546, 39715, 47560, 28358, 45550, 23113, 28379, 35308, 33078, 28399, 36714, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 41649, 28419, 28455, 40472, 38341, 28471, 38828, 40452, 28791, 24756, 33030, 27540, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 28526, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 34078, 28545, 23546, 28652, 28658, 28674, 28690, 28701, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 26963, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22605, 35842, 45303, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 46230, 50621, 28718, 23546, 28717, 23546, 48975, 47563, 47563, 47563, 27769, 28735, 22823, 22824, 22824, 22824, 49361, 49439, 22804, 22804, 22804, 22804, 28781, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 50620, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 23672, 23807, 23546, 18289, 23546, 23546, 44779, 49528, 23546, 36898, 47563, 47563, 47563, 40417, 28807, 22824, 22824, 22824, 50340, 31197, 28844, 22804, 22804, 22804, 28863, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 21205, 28900, 28924, 28940, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 28963, 23546, 23546, 26527, 23546, 28992, 23546, 29010, 36977, 29029, 29038, 29054, 29069, 29081, 29097, 29109, 26204, 23546, 23546, 33645, 49739, 23546, 28529, 23546, 23546, 31365, 23546, 23546, 23546, 35995, 23546, 29125, 31167, 22824, 29149, 40337, 48749, 32108, 23546, 29172, 23546, 44844, 29190, 42384, 23546, 31347, 50774, 29209, 23546, 25948, 29214, 29230, 29291, 47563, 47563, 29309, 29325, 22824, 22824, 45608, 49036, 29349, 22804, 22804, 39677, 36943, 30220, 23546, 23546, 47099, 23546, 22095, 50621, 37205, 27682, 23546, 23546, 48975, 28152, 40051, 47563, 29366, 37135, 45217, 46920, 46953, 36665, 22824, 49439, 49901, 29385, 29404, 34563, 22804, 29885, 40883, 26241, 23546, 23546, 47600, 23546, 23546, 29423, 23546, 29445, 23546, 48976, 47563, 47563, 47563, 44406, 47564, 22821, 22824, 22824, 49328, 42575, 22767, 35849, 22804, 22804, 39288, 28274, 50448, 23672, 29464, 23546, 23546, 23546, 29498, 42828, 23546, 23546, 47562, 47563, 47563, 46820, 29369, 22821, 22824, 22824, 37856, 22824, 28821, 22804, 22804, 30184, 22804, 29883, 33199, 23546, 23546, 29517, 23546, 47519, 29538, 47563, 46768, 47563, 41728, 22824, 49353, 22824, 41433, 22804, 41641, 22804, 27843, 29565, 23546, 23546, 23546, 29581, 33988, 49629, 29610, 50265, 49148, 29627, 30732, 37573, 29644, 31970, 23546, 23546, 28626, 22586, 47563, 47563, 29661, 22824, 47375, 22804, 22804, 29679, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 45087, 23089, 29701, 47077, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 27251, 29717, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 21570, 23546, 23546, 26527, 23546, 29745, 24166, 23546, 32508, 29764, 29773, 29789, 29803, 29812, 29828, 29839, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 34673, 34671, 23546, 38486, 38493, 29855, 28213, 35842, 29875, 43066, 27800, 23546, 40629, 29901, 44844, 23546, 29926, 30774, 23546, 23546, 41541, 20026, 29946, 29989, 29293, 38320, 30005, 40270, 30031, 42116, 30052, 30082, 30100, 49972, 39453, 30135, 41942, 39677, 36943, 23546, 23546, 23546, 42078, 23546, 30162, 50621, 23546, 23546, 23546, 39564, 48975, 47563, 47563, 47563, 48721, 37135, 22823, 22824, 22824, 22824, 42777, 49439, 22804, 22804, 22804, 22804, 30182, 30146, 30200, 30236, 23546, 23546, 23546, 30252, 30271, 50620, 23546, 23546, 45468, 23469, 31420, 34156, 47563, 47563, 45201, 30292, 30331, 30348, 22824, 22824, 30365, 29156, 29407, 22804, 22804, 22804, 30399, 23672, 23807, 23546, 23546, 23546, 23546, 45523, 28572, 23546, 33872, 47563, 47563, 30419, 29369, 30438, 22824, 22824, 48645, 22824, 31904, 22804, 22804, 50360, 22804, 30539, 33199, 49920, 23546, 30462, 23546, 50724, 48973, 36270, 47563, 30480, 41728, 35391, 22824, 30505, 41433, 50493, 22804, 30530, 30403, 47447, 49732, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23251, 23546, 22586, 47563, 47563, 30555, 22824, 36108, 22804, 22804, 30575, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 30597, 46609, 47561, 23111, 30673, 39296, 30622, 30648, 30668, 30689, 19013, 30707, 30727, 30748, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23547, 30771, 23546, 26527, 25156, 30790, 23546, 30813, 24321, 30837, 30846, 30862, 30876, 30888, 30904, 30915, 26204, 22703, 30931, 26561, 35799, 30978, 26921, 26341, 27925, 30994, 31013, 31032, 31061, 31045, 31097, 31131, 31147, 31183, 31227, 31261, 31277, 39237, 39476, 31293, 33748, 31328, 22212, 31363, 31381, 41158, 23546, 23546, 40033, 23546, 22587, 32449, 31405, 47817, 28510, 31441, 31475, 46890, 31498, 30304, 31538, 22625, 36744, 47681, 39677, 36943, 23698, 29973, 31554, 29930, 31590, 23708, 31634, 39997, 31661, 48812, 31689, 31711, 31727, 31763, 31798, 31814, 29245, 31850, 40093, 31890, 34721, 31940, 35662, 31956, 31986, 27076, 32035, 32066, 32093, 32133, 26241, 50755, 23546, 43683, 23546, 32169, 19239, 32192, 32249, 22951, 24750, 43255, 32274, 47563, 32292, 45560, 22821, 32317, 22824, 42593, 48588, 50230, 35849, 32356, 22804, 45665, 32384, 32405, 32421, 23807, 25150, 32478, 32497, 47176, 23546, 32524, 45835, 36145, 40407, 31425, 32550, 44054, 32586, 34739, 22824, 32631, 32657, 30066, 33080, 32683, 47042, 40501, 29883, 33199, 23546, 45717, 33237, 23546, 23546, 32701, 31115, 42955, 32563, 41728, 45894, 41614, 32608, 41433, 33712, 42499, 35727, 30403, 47447, 28590, 32719, 48060, 32755, 32790, 42232, 33671, 32806, 37745, 39609, 32837, 40736, 33730, 32892, 32931, 32953, 19435, 22586, 32974, 48106, 28046, 33009, 33027, 33047, 48381, 35461, 47447, 40617, 22585, 47563, 50257, 22824, 33074, 36473, 36549, 33096, 40786, 36807, 32667, 39296, 33119, 43227, 48451, 49953, 33140, 24763, 23318, 45645, 33156, 33172, 33217, 47559, 33030, 30691, 33266, 33282, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 33306, 23546, 26527, 33327, 33345, 25456, 24849, 33370, 33400, 23546, 33386, 33428, 33437, 33453, 33464, 26204, 23546, 23546, 33480, 35799, 23546, 23546, 23546, 23546, 27288, 23546, 23546, 34477, 23546, 34484, 31605, 33499, 33519, 43660, 33545, 33568, 27800, 23546, 33621, 23546, 44844, 33621, 23546, 23546, 30997, 23546, 33640, 34051, 23546, 22587, 33661, 47563, 47563, 47563, 33687, 22824, 22824, 22824, 43762, 33703, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 50621, 23546, 23546, 23546, 33746, 48975, 47563, 47563, 47563, 43863, 37135, 22823, 22824, 22824, 22824, 34733, 49439, 22804, 22804, 22804, 22804, 33764, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 50620, 23546, 20258, 23546, 48976, 47563, 47563, 46759, 47563, 47564, 22821, 22824, 22824, 37850, 22824, 22767, 35849, 22804, 22804, 33781, 22804, 29879, 23672, 23807, 23546, 23546, 23546, 23546, 23546, 43159, 23546, 47562, 47563, 47563, 31773, 29369, 22821, 22824, 22824, 49239, 22824, 28821, 22804, 22804, 22804, 33801, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 33820, 23546, 23546, 22586, 44762, 47563, 23109, 33840, 22825, 34299, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 23335, 32233, 42307, 22729, 33859, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 32176, 23546, 23546, 41552, 33893, 33902, 33918, 33924, 33940, 33956, 33967, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 37894, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 28765, 41920, 23546, 23546, 44844, 23546, 23546, 23546, 39585, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 43177, 23546, 23546, 45738, 48975, 47563, 47563, 47563, 47563, 37135, 41960, 22824, 22824, 22824, 22824, 47410, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 20340, 23546, 23178, 20358, 23546, 23546, 20360, 33983, 47563, 47563, 34004, 47563, 47564, 22821, 22824, 36824, 22824, 22824, 22767, 35849, 22804, 33785, 22804, 22804, 29879, 34024, 23546, 23546, 23546, 34050, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 32147, 47539, 23546, 48973, 47563, 47563, 39206, 45209, 22824, 22824, 43898, 27834, 22804, 22804, 34943, 30403, 47447, 34067, 47158, 34094, 23546, 34121, 32984, 34141, 34177, 43533, 34196, 34244, 36447, 34263, 31970, 28608, 23546, 34315, 34336, 34355, 34372, 28875, 33605, 34412, 34436, 34454, 31964, 47447, 46606, 43054, 32993, 34501, 34521, 30673, 34552, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 43326, 34588, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 41690, 23546, 26286, 34628, 23546, 23546, 23546, 34692, 23546, 34693, 23546, 23546, 34656, 34689, 40521, 22887, 37164, 34396, 43815, 34709, 34755, 23546, 23546, 29501, 44844, 26383, 30255, 23546, 23546, 41921, 23546, 23546, 23546, 22587, 47563, 47563, 32276, 47563, 27418, 22824, 22824, 35655, 43762, 22804, 22804, 35850, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 34780, 43953, 48975, 47563, 47563, 47563, 47563, 29859, 22823, 22824, 22824, 22824, 22824, 30446, 22804, 22804, 22804, 22804, 22804, 34799, 33201, 23546, 34844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 42714, 48976, 34862, 47563, 47563, 47563, 47564, 34882, 22824, 22824, 22824, 22824, 22767, 30383, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 34898, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 49594, 27195, 22821, 22824, 22824, 22824, 49007, 30376, 22804, 22804, 22804, 28251, 29883, 33199, 23546, 23546, 45156, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 28617, 23546, 48860, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 48020, 34919, 46606, 50168, 47563, 35289, 22824, 34937, 22804, 34959, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 26217, 23546, 26527, 28994, 29429, 32937, 21397, 21407, 19607, 19616, 34984, 34999, 35011, 35027, 35038, 26204, 23546, 23546, 23546, 21159, 35548, 23546, 23546, 29013, 35054, 32876, 23546, 35263, 35074, 35112, 39498, 35166, 47961, 27448, 49402, 46199, 35202, 23546, 23546, 23546, 38910, 23546, 47123, 35227, 23546, 23546, 23546, 35244, 44990, 22587, 44754, 35279, 47563, 35324, 35372, 48187, 22824, 29333, 35407, 49176, 35434, 22804, 35477, 39677, 36943, 23546, 35515, 50019, 41319, 42187, 35535, 23546, 19253, 43384, 35575, 35592, 35612, 35186, 47563, 42920, 37391, 20600, 22823, 35386, 22824, 40181, 35635, 35678, 29350, 22804, 33765, 35713, 35750, 48433, 33201, 23546, 23546, 23546, 23546, 35766, 20349, 35815, 44388, 23546, 23546, 40380, 47253, 47563, 47563, 41209, 36250, 35833, 43893, 22824, 22824, 48653, 43541, 43789, 35866, 22804, 22804, 31917, 36853, 33195, 23546, 19730, 35885, 35914, 32534, 35930, 35957, 45488, 36011, 28363, 36030, 36050, 36074, 36103, 39870, 50408, 42260, 32597, 45635, 22804, 36124, 36169, 36204, 27085, 31863, 36220, 46659, 44955, 21826, 38142, 32958, 36266, 47872, 36286, 36321, 36366, 36384, 36409, 36435, 36471, 36489, 36514, 36540, 36572, 23546, 23546, 18340, 36595, 30632, 36619, 36640, 39370, 36661, 36681, 36702, 36740, 36760, 31970, 23546, 36781, 18841, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 34034, 46606, 22585, 31741, 36801, 36823, 36840, 38424, 36549, 46609, 36869, 23111, 30673, 39296, 36886, 35338, 36933, 36966, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 42313, 47646, 36993, 39426, 42307, 22729, 23448, 37021, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 39988, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 50028, 21708, 39996, 40225, 24990, 37071, 37082, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 31016, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 27420, 22824, 43762, 22804, 22804, 48012, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 25524, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 37098, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 37115, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 37134, 47563, 47563, 47563, 47564, 37151, 22824, 22824, 22824, 22824, 22767, 28828, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 41164, 23546, 26527, 23546, 34764, 23546, 19155, 37185, 37221, 37234, 37250, 37256, 37272, 37288, 37299, 26204, 23546, 37315, 23546, 35799, 23546, 43426, 26746, 23546, 23546, 37335, 23546, 32153, 42194, 37334, 37351, 37380, 37407, 37443, 40833, 37430, 32821, 37459, 23546, 23546, 34612, 23546, 23546, 40581, 34220, 23546, 41122, 29193, 49795, 34228, 47262, 37494, 29549, 41774, 37514, 42784, 22904, 45886, 37530, 38036, 37570, 36188, 37589, 23034, 37618, 28342, 23546, 23546, 23546, 23546, 50126, 23546, 23546, 23546, 23546, 23546, 48975, 28498, 44484, 47563, 28434, 44023, 37641, 37671, 39810, 30349, 22824, 39853, 47704, 29645, 22804, 49383, 22804, 37657, 33201, 23546, 23546, 50909, 37693, 23546, 32019, 38379, 23546, 23546, 23546, 48976, 47563, 47563, 46474, 32220, 37710, 22821, 22824, 22824, 49321, 37734, 37761, 35849, 22804, 22804, 37788, 37809, 29879, 33195, 23546, 37872, 23546, 23546, 37889, 23546, 23546, 23546, 47562, 27357, 47563, 47563, 27195, 22821, 40293, 22824, 22824, 22824, 30376, 34247, 22804, 22804, 22804, 29883, 33199, 37910, 31075, 23546, 37928, 47744, 48973, 37953, 47563, 47563, 37979, 38003, 22824, 22824, 38027, 38061, 22804, 22804, 38085, 47447, 23404, 23546, 28599, 23546, 47560, 31782, 47563, 23113, 38011, 22824, 33078, 33721, 22804, 31970, 23546, 21592, 23546, 22586, 47563, 50097, 23109, 22824, 40810, 22804, 22804, 38110, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 33290, 45056, 38132, 38158, 38179, 33552, 39426, 27505, 38215, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23648, 23546, 26527, 23546, 26305, 23546, 23546, 29594, 20530, 20539, 38250, 38264, 38273, 38289, 38300, 26364, 23546, 23948, 23546, 35799, 23546, 34320, 23546, 23546, 23546, 23948, 23546, 35554, 36579, 23947, 35559, 38316, 33588, 36393, 38336, 43066, 27800, 23546, 23546, 38357, 44844, 23546, 39344, 42555, 23546, 39071, 23546, 23546, 38375, 41192, 48530, 47563, 47812, 38395, 28750, 22824, 42121, 31482, 43762, 38449, 22804, 38419, 38440, 32050, 38473, 38509, 46688, 34783, 23546, 23546, 23546, 23546, 23546, 38530, 23546, 23546, 48975, 47883, 38550, 42949, 47563, 37135, 22823, 38568, 30084, 22824, 22824, 49439, 42031, 34293, 41837, 22804, 22804, 29885, 33201, 23546, 38929, 23546, 38602, 23546, 44369, 37873, 23791, 38621, 23546, 48976, 27031, 38642, 47563, 38659, 47564, 38683, 47916, 22824, 22824, 38702, 33843, 35849, 39277, 22804, 33804, 38724, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 36556, 23546, 23546, 23546, 23546, 47560, 38744, 47563, 30559, 22824, 22824, 46066, 22804, 22804, 31970, 23546, 23546, 49685, 22586, 47563, 47563, 23109, 47427, 22825, 22804, 35452, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 38761, 47561, 38782, 38802, 43621, 23464, 38824, 38844, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 38045, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23810, 23546, 46101, 23546, 29522, 38860, 33103, 38895, 38945, 38984, 38970, 38989, 38954, 39005, 39016, 26204, 23546, 24981, 39032, 39052, 39135, 26183, 26715, 27157, 23546, 39087, 39123, 35972, 23871, 39151, 32436, 39187, 39222, 39262, 39312, 39360, 27800, 27271, 23546, 23546, 40856, 29748, 35256, 26269, 47340, 39386, 28121, 33483, 41086, 39406, 48539, 39200, 45029, 47563, 29260, 30036, 22824, 47369, 43762, 41883, 39448, 22787, 22804, 32852, 39469, 27673, 33624, 23546, 39492, 23546, 23546, 30166, 23546, 19760, 23546, 25974, 48975, 39514, 47563, 47563, 47563, 37135, 37987, 39541, 30332, 22824, 22824, 49439, 34278, 22804, 48403, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 49277, 23546, 23546, 39561, 44662, 39580, 20000, 47563, 47563, 38745, 47563, 41583, 39601, 22824, 22824, 42751, 22824, 39625, 36344, 22804, 22804, 49650, 22804, 39663, 33195, 39390, 39701, 21803, 40964, 23546, 28563, 39737, 39764, 42864, 39780, 30015, 27711, 27195, 22821, 39796, 39832, 37838, 39869, 30376, 37543, 39886, 39910, 39936, 47724, 39958, 49087, 33227, 48840, 39980, 40013, 20680, 50204, 40049, 40067, 40083, 45419, 22824, 40109, 40125, 36765, 22804, 40151, 40167, 47447, 40217, 23546, 23546, 19121, 40241, 48114, 40263, 48445, 44596, 40286, 40309, 42808, 40330, 30581, 40353, 23546, 23546, 40374, 28485, 40396, 27517, 40433, 40468, 40722, 40488, 31964, 30114, 48477, 40517, 36058, 24761, 45115, 30673, 40537, 36549, 40555, 19020, 29663, 30673, 40603, 40652, 40668, 40708, 40752, 40779, 40802, 40826, 40849, 24756, 33030, 33551, 47559, 33030, 33552, 40872, 40899, 22729, 23448, 40923, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 40939, 26527, 23546, 35150, 40960, 23546, 26932, 40980, 40989, 41005, 41019, 41028, 41044, 41055, 26204, 41071, 27176, 35142, 41110, 22748, 41145, 23546, 41180, 29961, 41225, 35127, 41274, 41299, 41335, 41350, 41366, 41401, 41487, 41458, 41474, 41503, 23546, 18442, 27630, 46235, 23546, 41314, 19147, 41528, 40358, 23546, 23546, 45375, 22587, 47563, 36909, 41568, 47891, 27418, 38686, 27953, 41607, 41630, 22804, 23213, 41665, 46983, 39677, 36943, 23546, 45937, 23546, 37118, 23546, 39337, 41681, 33824, 35058, 38605, 23546, 41717, 41752, 28167, 41769, 47563, 43475, 41790, 42050, 41800, 22824, 22824, 41816, 41853, 50302, 41874, 22804, 49204, 29885, 47656, 41907, 23546, 38879, 36785, 23546, 23546, 23546, 23546, 23546, 39036, 48976, 47563, 46791, 34008, 47563, 47564, 22821, 22824, 44589, 46895, 22824, 22767, 35849, 22804, 41937, 38457, 22804, 29879, 33195, 23546, 23546, 49550, 23546, 45766, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 32301, 41958, 22824, 22824, 22824, 46046, 28243, 22804, 22804, 22804, 22804, 41977, 33199, 20951, 42005, 23546, 23546, 23546, 44350, 47563, 31827, 47563, 41591, 22824, 49433, 22824, 28884, 22804, 42026, 22804, 30403, 31211, 23546, 23546, 23546, 23546, 27328, 40247, 47563, 27241, 38708, 22824, 42285, 31924, 22804, 29685, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 22739, 46606, 49667, 46712, 38403, 42047, 44103, 22804, 44463, 42066, 42221, 42103, 42137, 42175, 42210, 42248, 42276, 42301, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 35697, 39426, 36136, 22729, 23448, 42329, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 26377, 26527, 23546, 23546, 42378, 33354, 42400, 20758, 23546, 26429, 42436, 42448, 42464, 42475, 26204, 23546, 23546, 25120, 35799, 23546, 23546, 23546, 31573, 31305, 23546, 23546, 31567, 25118, 23546, 48973, 37963, 23115, 42491, 47011, 42515, 27800, 23546, 42549, 23546, 44844, 23546, 38766, 18352, 23546, 39064, 23546, 23546, 22159, 22587, 48548, 38163, 45793, 48521, 47316, 42571, 42591, 47404, 42609, 44147, 39942, 22845, 35499, 47057, 42343, 42636, 23546, 42657, 23546, 42010, 42641, 26759, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 36917, 47563, 37135, 22823, 22824, 22824, 42693, 22824, 49439, 22804, 22804, 28847, 22804, 22804, 29885, 45066, 44270, 23546, 42713, 23546, 23546, 26553, 42677, 42730, 31574, 23546, 48976, 47563, 48931, 47563, 47563, 47564, 42748, 22824, 42767, 22824, 22824, 34180, 35849, 22804, 42800, 22804, 22804, 29879, 33195, 23546, 44983, 23546, 23546, 23546, 23546, 42824, 23546, 47562, 47563, 36034, 47563, 27749, 22821, 22824, 22824, 42844, 22824, 48373, 22804, 22804, 38192, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 18259, 23546, 23546, 42862, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 39325, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 48281, 42880, 42913, 28181, 33529, 39296, 42936, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 38514, 23546, 23546, 23546, 44073, 44076, 50916, 44069, 36233, 42971, 33598, 40201, 40539, 43066, 29275, 42987, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 43004, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 43023, 22824, 22824, 22824, 22824, 43497, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 30422, 47563, 23109, 38579, 22825, 32685, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 22195, 38234, 23546, 23546, 22088, 23546, 31645, 43040, 31695, 43090, 43103, 43112, 43128, 43139, 26204, 23546, 31341, 32732, 35799, 43366, 43155, 43175, 36087, 40692, 50768, 31673, 43193, 32904, 31522, 31081, 43243, 43271, 43287, 43315, 43342, 40683, 23546, 23546, 23546, 45381, 43358, 40568, 43382, 43400, 43418, 23546, 23546, 30119, 43208, 47563, 43442, 27364, 43462, 43491, 28908, 22824, 43513, 43557, 22804, 43588, 41858, 43607, 43637, 43676, 23546, 23546, 23546, 18266, 35576, 23546, 23546, 43699, 43717, 43736, 20331, 32703, 47563, 41378, 47563, 46720, 41989, 43754, 29628, 22824, 22824, 43651, 43778, 43812, 46171, 22804, 44212, 43831, 43879, 33201, 23546, 23546, 45346, 23546, 43914, 43941, 23546, 27809, 23863, 43976, 44003, 47563, 48620, 44039, 35181, 49990, 44092, 22824, 45449, 39545, 44119, 42697, 44138, 22804, 44163, 27998, 44211, 35734, 33195, 39171, 23546, 23546, 23067, 44228, 32012, 23546, 44255, 36870, 46433, 23003, 47563, 27195, 22821, 44297, 46134, 22824, 22824, 30376, 39647, 22804, 44322, 22804, 41442, 44340, 23546, 44366, 44385, 23546, 23546, 34339, 44404, 47563, 47563, 44422, 22824, 22824, 22824, 44438, 22804, 22804, 22804, 44454, 47447, 48298, 23546, 23546, 23546, 44479, 47563, 47563, 46130, 22824, 22824, 44500, 22804, 22804, 44520, 23546, 40027, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 38094, 49704, 44555, 44579, 44612, 44650, 23464, 24759, 33031, 33550, 44685, 30652, 34420, 36724, 24756, 33030, 33551, 47559, 33030, 45310, 44716, 44744, 32641, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 25786, 26527, 44778, 28976, 18999, 44795, 44824, 44860, 44808, 44885, 44899, 44911, 44927, 44938, 26204, 44954, 40587, 23546, 44971, 23546, 23546, 43960, 23546, 50132, 23546, 45006, 35089, 26325, 35096, 32207, 45025, 45045, 44306, 45082, 45103, 27800, 35987, 37200, 44669, 44844, 34640, 23546, 23546, 23546, 23546, 45137, 45172, 23546, 19324, 45188, 43446, 47563, 47563, 45233, 45249, 45268, 22824, 43762, 45291, 40314, 22804, 22804, 39677, 36943, 37912, 23546, 23546, 45326, 45362, 23546, 23546, 23546, 23546, 23546, 37055, 48975, 48512, 31834, 47563, 47563, 46028, 22823, 45397, 45415, 22824, 22824, 36333, 38728, 44324, 22804, 22804, 22804, 45435, 33201, 23546, 23546, 26251, 43720, 23546, 45465, 26758, 45484, 45504, 23546, 45539, 47563, 47563, 47285, 43856, 45576, 45600, 22824, 22824, 47994, 48169, 45624, 45661, 22804, 22804, 42152, 45681, 29879, 45697, 45713, 45733, 23546, 25942, 23546, 23546, 30214, 45754, 47562, 47563, 27730, 45789, 27195, 22821, 22824, 47619, 47969, 22824, 30376, 22804, 22804, 45809, 22804, 29883, 33199, 23546, 21039, 23546, 49467, 37049, 48973, 47563, 45851, 48716, 45584, 47934, 22824, 45868, 48003, 35869, 22804, 45910, 30403, 47447, 23546, 48332, 18869, 22345, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 32000, 21288, 23546, 45931, 45953, 47563, 37498, 23109, 22824, 40444, 22804, 34438, 36455, 45997, 44634, 19558, 46021, 50382, 46044, 28056, 22804, 34468, 46609, 35619, 30711, 46062, 46082, 23464, 24759, 33031, 33550, 19538, 36296, 49945, 23141, 46117, 38586, 45823, 48503, 46150, 46187, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23737, 26527, 23546, 23546, 34968, 23546, 46215, 26881, 26893, 46251, 46267, 46279, 46295, 46306, 26204, 46322, 23241, 25565, 35799, 25341, 42889, 46340, 22204, 44869, 46352, 46368, 46377, 46393, 46349, 46420, 46455, 46490, 46547, 46518, 46534, 32867, 46005, 19766, 34600, 44844, 46563, 23546, 26188, 46580, 41258, 46596, 46625, 46675, 46736, 46784, 46807, 46842, 38552, 46877, 45877, 46911, 46944, 36419, 46977, 46999, 47027, 27557, 39677, 37035, 47093, 47115, 35228, 23546, 47139, 47174, 23546, 47766, 23546, 49770, 47192, 20591, 47219, 47244, 47278, 38643, 47301, 41736, 47356, 47391, 47426, 31459, 49439, 36524, 39920, 40135, 22804, 35492, 33058, 47443, 23546, 20251, 43007, 37694, 47465, 46324, 47491, 47518, 23546, 47535, 47555, 39525, 47841, 47563, 34125, 47580, 47616, 47635, 39844, 22824, 37169, 48362, 35849, 47672, 47697, 22804, 41891, 47720, 33195, 23058, 47740, 23546, 45516, 47760, 23546, 47782, 18627, 47798, 50186, 47833, 47857, 27195, 47907, 47932, 47950, 47985, 48036, 39636, 46165, 37602, 50472, 50517, 37554, 27477, 48056, 18311, 23546, 35780, 48076, 48095, 44700, 47563, 47563, 48130, 48155, 37677, 22824, 48203, 48236, 49183, 22804, 48272, 47447, 18372, 48297, 48314, 48330, 41202, 45981, 33877, 34811, 48348, 48040, 48397, 48419, 37793, 31970, 48467, 23546, 23546, 48493, 46466, 31618, 34505, 49612, 47069, 35443, 43299, 48564, 28304, 47475, 19993, 48611, 37364, 48636, 48669, 43591, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 44177, 29729, 48685, 36498, 48701, 45275, 48737, 39426, 42307, 22729, 39685, 48765, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 48828, 23546, 23546, 48856, 23546, 35941, 30944, 30953, 48876, 30953, 30962, 48892, 48903, 26204, 23546, 23546, 23546, 40636, 23546, 26348, 23546, 23546, 23546, 23546, 26345, 23546, 38923, 23546, 48973, 48919, 48178, 48947, 38808, 37005, 31513, 38873, 23546, 23546, 44844, 23546, 23546, 27897, 48963, 23546, 23546, 23546, 23546, 48971, 46750, 47563, 47563, 34356, 48992, 22824, 22824, 22824, 36305, 49028, 22804, 22804, 22804, 49052, 44728, 49080, 23546, 49103, 45341, 23546, 23546, 42732, 48802, 47595, 38359, 35596, 48975, 47563, 49130, 41385, 43221, 47228, 22823, 48595, 46928, 41415, 49146, 49164, 22804, 49199, 49220, 45915, 29388, 37824, 33201, 23546, 25346, 23546, 26261, 23546, 23546, 23546, 49474, 23546, 23546, 48976, 33503, 47563, 47563, 47563, 47564, 49236, 37414, 22824, 22824, 22824, 22767, 49255, 36180, 22804, 22804, 22804, 29879, 33195, 49272, 23546, 49293, 23546, 23546, 23546, 23546, 28581, 36243, 47563, 47563, 47563, 27195, 49311, 22824, 22824, 22824, 22824, 37772, 22804, 22804, 22804, 22804, 29883, 46502, 23546, 23546, 50321, 46564, 23546, 30276, 23289, 47563, 47563, 37718, 49344, 22824, 22824, 30514, 49377, 22804, 22804, 42620, 47447, 39101, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 46439, 24761, 43524, 30673, 49399, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 49418, 45121, 44624, 47559, 33030, 33552, 39426, 32368, 49455, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 49490, 49547, 33412, 49525, 23546, 34105, 23546, 33409, 49544, 42420, 41283, 49566, 49577, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 49593, 35299, 27962, 22805, 43066, 27800, 23546, 33329, 27613, 44844, 23546, 23546, 23546, 23546, 23546, 32481, 23546, 23546, 22587, 32570, 47563, 46861, 47563, 27418, 49610, 22824, 32331, 43762, 42159, 22804, 27215, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 37318, 23546, 23546, 23546, 20322, 23546, 48975, 47563, 47563, 49628, 47563, 37135, 22823, 22824, 32615, 22824, 22824, 49439, 22804, 22804, 49645, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 49666, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 49683, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 49701, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 49720, 23546, 50953, 23546, 25809, 49755, 49786, 23546, 49811, 49825, 49837, 49853, 49864, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 27387, 22824, 49893, 38199, 49880, 34211, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 42672, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 49917, 23546, 23546, 23546, 22167, 47563, 47563, 47563, 47563, 47564, 49936, 22824, 22824, 22824, 22824, 22767, 49969, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 45149, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 49988, 47563, 50006, 22821, 22824, 48578, 22824, 41424, 30376, 22804, 39894, 22804, 32389, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 26445, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 41512, 50052, 50063, 26204, 23546, 23546, 23546, 35799, 50079, 30464, 23546, 23546, 23546, 23546, 32774, 23546, 41129, 32770, 46701, 50096, 40191, 28190, 22805, 43066, 27800, 23546, 23546, 23546, 50113, 28719, 34485, 45773, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 29611, 47563, 27026, 27418, 22824, 35645, 28383, 43762, 22804, 22921, 22804, 48250, 39677, 50148, 50164, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 41250, 23546, 23546, 23546, 48976, 47563, 47563, 50184, 47563, 45852, 22821, 22824, 38786, 22824, 22824, 45252, 35849, 22804, 48256, 22804, 22804, 29879, 33195, 48079, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 50202, 47563, 47563, 27195, 22821, 50220, 22824, 22824, 22824, 30376, 48220, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 21798, 23546, 23546, 35799, 23546, 23546, 46652, 23546, 23546, 23546, 23546, 46656, 23546, 23546, 50246, 28439, 22824, 50294, 36350, 50281, 47331, 23546, 29448, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 35817, 22587, 47563, 47563, 47563, 27723, 27418, 22824, 22824, 27861, 43762, 22804, 22804, 22804, 48212, 39677, 36943, 23546, 50318, 23546, 23546, 23546, 23546, 23546, 23546, 37099, 23546, 23546, 48975, 38667, 47563, 36014, 47563, 37135, 22823, 50337, 22824, 46961, 22824, 49439, 28018, 22804, 22804, 50356, 22804, 29885, 33201, 23546, 43738, 23546, 23546, 23546, 23546, 23546, 38534, 23546, 23546, 48976, 47563, 50376, 47563, 47563, 47564, 50398, 41961, 50424, 22824, 22824, 22767, 50443, 28403, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 21488, 23546, 47562, 47563, 31747, 47563, 34161, 22821, 22824, 43024, 22824, 22824, 50464, 22804, 22804, 50488, 22804, 43844, 33199, 23546, 23546, 18921, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 31241, 23546, 23546, 39165, 23546, 29133, 47563, 47563, 33578, 22824, 22824, 50509, 22804, 22804, 31970, 23546, 49295, 23546, 22586, 47563, 31161, 23109, 50427, 22825, 22804, 41830, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 21483, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 46404, 21767, 21765, 32117, 22038, 50563, 21058, 21061, 50533, 22036, 50551, 50579, 50591, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 50607, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50637, 19916, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 50655, 18544, 18567, 18590, 19934, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 22150, 23546, 21369, 20766, 50679, 50692, 50708, 50717, 49509, 50740, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23761, 23546, 23546, 23758, 25629, 19208, 50639, 19926, 50639, 50790, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 42087, 23546, 23546, 23546, 23546, 22568, 29910, 50839, 50872, 50878, 50849, 23148, 50894, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 50932, 23546, 23546, 22686, 23546, 23546, 23546, 22682, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 50969, 18544, 18567, 18590, 21689, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 23546, 23546, 23489, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27132, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 22603, 22824, 22824, 22824, 34828, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22457, 23546, 23546, 22482, 50993, 50998, 50998, 51019, 22480, 51014, 51035, 23546, 23546, 23546, 23546, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 51062, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 50655, 18544, 18567, 18590, 19934, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 51082, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 51098, 20392, 51127, 20418, 50802, 51114, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 94503, 94503, 90406, 90406, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 1, 12290, 3, 0, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 362, 94503, 90406, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 0, 94503, 90406, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 69632, 73728, 94503, 94503, 94503, 94503, 94503, 65536, 94503, 0, 2183168, 0, 0, 0, 90406, 94503, 296, 297, 0, 2134016, 300, 301, 0, 0, 0, 0, 0, 0, 2985, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1631, 0, 0, 0, 0, 0, 1637, 0, 0, 2424832, 2433024, 0, 0, 2457600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2454, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2904064, 2908160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2751, 0, 0, 0, 0, 0, 0, 0, 3117056, 0, 0, 0, 0, 0, 0, 0, 362, 362, 0, 0, 0, 0, 0, 0, 2997, 0, 0, 0, 0, 3001, 0, 0, 0, 0, 0, 0, 1186, 0, 0, 0, 1191, 0, 0, 0, 0, 1107, 0, 0, 0, 2138112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2978, 0, 0, 0, 2424832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2625536, 0, 0, 0, 0, 0, 172032, 0, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 1, 12290, 3, 0, 2699264, 2715648, 0, 0, 2772992, 2805760, 2830336, 0, 2863104, 2920448, 0, 0, 0, 0, 0, 0, 0, 1114, 0, 0, 0, 0, 1118, 0, 0, 1121, 0, 2805760, 2920448, 0, 0, 0, 0, 0, 2920448, 0, 0, 0, 0, 0, 0, 0, 2732032, 0, 2179072, 2179072, 2179072, 2424832, 2433024, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2625536, 2805760, 2179072, 2830336, 2179072, 2179072, 2863104, 2179072, 2179072, 2179072, 2920448, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2801664, 2813952, 2179072, 2838528, 2179072, 2179072, 2179072, 2179072, 2179072, 0, 914, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2625536, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2625536, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2699264, 2125824, 2715648, 2125824, 2723840, 2125824, 2732032, 2772992, 2125824, 2125824, 2125824, 2723840, 2125824, 2732032, 2772992, 2125824, 2125824, 2125824, 2805760, 2125824, 2830336, 2125824, 2125824, 2863104, 2125824, 2125824, 2125824, 2125824, 2920448, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2920448, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3117056, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3207168, 2125824, 2125824, 2179072, 2125824, 2125824, 2125824, 2125824, 2457600, 2125824, 2125824, 2125824, 2125824, 2183168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2518, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2375680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 0, 0, 0, 0, 0, 0, 2408448, 0, 0, 2584576, 0, 0, 0, 0, 2838528, 0, 0, 2838528, 0, 0, 0, 0, 0, 2469888, 2506752, 2756608, 0, 0, 2580480, 0, 0, 0, 2396160, 2400256, 2412544, 0, 0, 2838528, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2408448, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3223552, 914, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2445312, 2125824, 0, 2125824, 2125824, 2125824, 2408448, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 2502656, 0, 0, 3010560, 2125824, 2125824, 2125824, 2125824, 2125824, 2662400, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2801664, 2813952, 2125824, 2838528, 2125824, 2801664, 2813952, 2125824, 2838528, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3125248, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2461696, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2600960, 0, 2674688, 0, 2768896, 2777088, 2781184, 0, 2822144, 0, 0, 2883584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3055616, 0, 0, 0, 3080192, 3100672, 3104768, 0, 0, 0, 0, 3186688, 0, 0, 0, 0, 0, 0, 0, 3182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2732032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3133440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3003, 3004, 0, 2719744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3014656, 3207168, 0, 2691072, 0, 0, 0, 0, 0, 2818048, 2846720, 0, 2916352, 0, 0, 3002368, 0, 0, 3022848, 0, 0, 0, 0, 0, 2871296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2766, 0, 0, 0, 0, 0, 3215360, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2494464, 2179072, 2179072, 2514944, 2179072, 2179072, 2461696, 2465792, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2523136, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2699264, 2179072, 2715648, 2179072, 2723840, 2179072, 2732032, 2772992, 2179072, 2179072, 3100672, 2179072, 2179072, 3133440, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3207168, 2179072, 0, 0, 0, 0, 391, 392, 0, 393, 0, 0, 0, 0, 0, 393, 0, 0, 0, 0, 0, 3504, 0, 0, 0, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3399, 540, 540, 0, 0, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2461696, 2465792, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2523136, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2600960, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2641920, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2719744, 2125824, 2125824, 2125824, 2125824, 2125824, 2768896, 2777088, 2768896, 2777088, 2125824, 2797568, 2822144, 2125824, 2125824, 2125824, 2883584, 2125824, 2912256, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3133440, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3207168, 2125824, 0, 0, 0, 0, 0, 0, 3011, 0, 0, 0, 0, 0, 0, 3018, 0, 0, 0, 0, 2605056, 0, 0, 0, 0, 2887680, 0, 2924544, 0, 0, 0, 0, 0, 0, 0, 1135, 0, 0, 0, 0, 0, 0, 0, 0, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3162112, 3170304, 0, 0, 3219456, 3035136, 0, 0, 0, 0, 0, 3072000, 2650112, 2179072, 2179072, 2179072, 2707456, 2179072, 2736128, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2887680, 2179072, 2179072, 2543616, 2547712, 2179072, 2179072, 2596864, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2584576, 0, 0, 2809856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3088384, 0, 0, 0, 0, 0, 1670, 0, 0, 0, 0, 0, 0, 0, 2112, 0, 0, 0, 0, 0, 1680, 1681, 0, 1683, 0, 0, 0, 0, 0, 0, 0, 540, 561, 540, 561, 540, 540, 561, 540, 585, 0, 0, 2576384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2420736, 0, 0, 0, 0, 429, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 300, 0, 0, 0, 0, 0, 0, 3121152, 3141632, 0, 0, 0, 2924544, 0, 2682880, 0, 0, 0, 0, 0, 0, 0, 1242, 1272, 1273, 0, 1242, 0, 540, 540, 540, 3112960, 2387968, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2453504, 2179072, 2473984, 2482176, 2179072, 2179072, 2179072, 2179072, 2179072, 3010560, 2179072, 2179072, 2126737, 2126737, 2503569, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2532241, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2605969, 2126737, 2924544, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3035136, 2179072, 2179072, 3072000, 2179072, 2179072, 2179072, 3137536, 2126737, 2126737, 2499473, 2126737, 2126737, 2126737, 2556817, 2565009, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3224465, 0, 0, 2126810, 2126810, 2126810, 2126810, 2126810, 2446298, 2126810, 3121152, 2179072, 2179072, 3141632, 2179072, 2179072, 2179072, 3170304, 2179072, 2179072, 3190784, 3194880, 2179072, 0, 0, 0, 0, 0, 0, 3181, 0, 0, 0, 3184, 3185, 3186, 0, 0, 3189, 3194880, 2125824, 0, 0, 0, 0, 0, 0, 2387968, 2125824, 2125824, 2420736, 2125824, 2125824, 2125824, 2125824, 2125824, 2453504, 2125824, 2473984, 2482176, 2125824, 2125824, 2125824, 2605056, 2125824, 2629632, 2125824, 2125824, 2650112, 2125824, 2125824, 2125824, 2707456, 2125824, 2736128, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3035136, 2125824, 2125824, 3072000, 2125824, 2125824, 3121152, 2125824, 2125824, 3141632, 2125824, 2125824, 2125824, 3170304, 2125824, 2125824, 3190784, 2125824, 3170304, 2125824, 2125824, 3190784, 3194880, 2125824, 2125824, 2179072, 2125824, 2125824, 2125824, 2179072, 2179072, 3112960, 3219456, 2125824, 2125824, 3112960, 3219456, 2125824, 2125824, 3112960, 3219456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3507, 540, 540, 540, 540, 540, 540, 0, 3145728, 0, 3203072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3314, 0, 540, 0, 3067904, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172032, 0, 0, 0, 0, 2895872, 0, 0, 0, 2445312, 0, 2842624, 0, 0, 0, 2637824, 0, 0, 0, 0, 432, 0, 0, 0, 329, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 0, 0, 0, 2621440, 0, 3182592, 2899968, 0, 2961408, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2592768, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2445312, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2551808, 2179072, 2179072, 2179072, 2179072, 2179072, 3117056, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2126737, 2126737, 2126737, 2126737, 2637824, 2125824, 2125824, 2125824, 2125824, 2727936, 2752512, 2125824, 2125824, 2125824, 2125824, 2842624, 2846720, 2125824, 2895872, 2916352, 2125824, 2125824, 2945024, 2125824, 2125824, 2994176, 2125824, 3002368, 2125824, 2125824, 3022848, 2125824, 3067904, 3084288, 3096576, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2442, 2443, 0, 0, 2446, 0, 0, 0, 0, 0, 2928640, 0, 0, 0, 3059712, 0, 2543616, 2666496, 0, 2633728, 0, 0, 0, 0, 0, 1697, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1116, 0, 0, 0, 0, 0, 2494464, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3211264, 2179072, 2928640, 2179072, 2179072, 2179072, 2998272, 2179072, 2179072, 2179072, 2179072, 3059712, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3223552, 0, 0, 2126737, 2126737, 2126737, 2126737, 2126737, 2446225, 2126737, 2179072, 3178496, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2494464, 2125824, 2125824, 2514944, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2179072, 2125824, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 2510848, 2514944, 0, 0, 2547712, 2596864, 0, 0, 0, 0, 0, 1670, 0, 0, 0, 0, 0, 0, 0, 0, 2113, 0, 2125824, 2543616, 2547712, 2125824, 2125824, 2596864, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 2125824, 2125824, 2125824, 2408448, 2125824, 2928640, 2125824, 2125824, 2125824, 2998272, 2125824, 2125824, 2125824, 2125824, 3059712, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 2125824, 2126811, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 2125824, 2125824, 2125824, 2125824, 2424832, 2125824, 3178496, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2494464, 2125824, 2125824, 2514944, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3223552, 0, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2445312, 2125824, 2125824, 3178496, 2125824, 2179072, 2125824, 2125824, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2441216, 0, 0, 0, 0, 0, 0, 3311, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 2165, 540, 540, 540, 540, 0, 0, 0, 2740224, 0, 0, 0, 0, 0, 2793472, 0, 0, 0, 0, 0, 0, 0, 1244, 0, 0, 0, 0, 1247, 0, 1194, 0, 2646016, 2179072, 2179072, 2695168, 2756608, 2179072, 2179072, 2179072, 2932736, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3039232, 2179072, 3063808, 2179072, 2179072, 2179072, 2179072, 3129344, 2179072, 2179072, 3153920, 3166208, 3174400, 2396160, 2400256, 2125824, 2125824, 2441216, 2125824, 2469888, 2125824, 2125824, 2125824, 2519040, 2125824, 2125824, 2125824, 2125824, 2588672, 2125824, 2519040, 2125824, 2125824, 2125824, 2125824, 2588672, 2125824, 2613248, 2646016, 2125824, 2125824, 2695168, 2756608, 2125824, 2125824, 2125824, 2125824, 2932736, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2932736, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3129344, 2125824, 2125824, 3153920, 3166208, 3174400, 2396160, 2125824, 2125824, 3129344, 2125824, 2125824, 3153920, 3166208, 3174400, 2125824, 2506752, 2506752, 2506752, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3223552, 987, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2445312, 2125824, 0, 3043328, 0, 3149824, 2936832, 0, 2760704, 3176, 0, 0, 0, 0, 2953216, 0, 0, 2826240, 3158016, 2437120, 0, 2785280, 0, 0, 0, 2428928, 0, 3018752, 2764800, 2572288, 0, 0, 3051520, 2179072, 2179072, 2637824, 2179072, 2179072, 2179072, 2179072, 2727936, 2752512, 2179072, 2179072, 2179072, 2842624, 2846720, 2179072, 2916352, 2428928, 2437120, 2179072, 2486272, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2654208, 2678784, 2760704, 2764800, 2854912, 2969600, 2179072, 3006464, 2179072, 3018752, 2179072, 2179072, 2179072, 3149824, 2125824, 2428928, 2437120, 2125824, 2486272, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 297, 0, 0, 0, 0, 0, 2043, 2044, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2140, 0, 0, 0, 0, 0, 0, 2125824, 3018752, 2125824, 2125824, 2125824, 3149824, 2125824, 2428928, 2437120, 2125824, 2486272, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 24576, 987, 2125824, 2125824, 2125824, 2125824, 2424832, 2125824, 3149824, 2125824, 2179072, 3051520, 2125824, 3051520, 2125824, 3051520, 0, 2490368, 2498560, 0, 0, 0, 0, 0, 0, 304, 0, 204800, 0, 0, 0, 0, 0, 0, 0, 0, 1713, 0, 0, 0, 0, 0, 0, 0, 0, 1727, 0, 0, 0, 0, 0, 0, 0, 0, 2068, 0, 0, 0, 0, 0, 0, 0, 0, 2095, 0, 0, 0, 0, 0, 0, 0, 0, 2107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2875392, 0, 0, 0, 3176, 0, 0, 2834432, 0, 3227648, 2568192, 0, 0, 0, 0, 2564096, 0, 2940928, 2179072, 2179072, 2498560, 2179072, 2179072, 2179072, 2555904, 2564096, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3223552, 0, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2445312, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3137536, 2125824, 2125824, 2498560, 2125824, 2125824, 2125824, 2555904, 2564096, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3223552, 2125824, 2179072, 2416640, 2125824, 2125824, 2179072, 2179072, 2125824, 2125824, 0, 2486272, 0, 0, 0, 0, 0, 2678784, 2854912, 3006464, 0, 3108864, 3198976, 0, 0, 2748416, 2879488, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2592768, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2126737, 2125824, 2125824, 2125824, 2125824, 3010560, 2125824, 2125824, 2125824, 2125824, 2502656, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 296, 0, 0, 0, 296, 0, 297, 0, 0, 0, 2125824, 2125824, 2125824, 3010560, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 2592768, 0, 0, 0, 0, 433, 0, 0, 0, 453, 469, 469, 469, 469, 469, 469, 469, 469, 469, 479, 469, 469, 469, 469, 469, 469, 2125824, 2125824, 2125824, 2125824, 2592768, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 1918, 2125824, 2125824, 2125824, 2408448, 2125824, 2592768, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2449408, 0, 2535424, 3031040, 0, 0, 0, 0, 0, 1734, 0, 1736, 1710, 540, 540, 540, 540, 540, 540, 540, 540, 1816, 1818, 540, 540, 540, 540, 540, 1360, 0, 2859008, 0, 0, 2179072, 2449408, 2179072, 2535424, 2179072, 2609152, 2179072, 2859008, 2179072, 2179072, 2179072, 3031040, 2125824, 2449408, 2125824, 2535424, 2125824, 2609152, 2125824, 2859008, 2125824, 2125824, 2125824, 3031040, 2125824, 2449408, 2125824, 2535424, 2125824, 2609152, 2125824, 2859008, 2125824, 2125824, 2125824, 3031040, 2125824, 2527232, 0, 0, 0, 0, 0, 2179072, 2125824, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2804, 540, 540, 540, 540, 2527232, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2527232, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2527232, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 1080, 1084, 0, 0, 1088, 2125824, 2125824, 2125824, 2125824, 3092480, 0, 0, 0, 0, 3026944, 2404352, 2179072, 2179072, 2179072, 2179072, 3026944, 2404352, 2125824, 2125824, 2125824, 2125824, 3026944, 2404352, 2125824, 2125824, 2125824, 2125824, 3026944, 2539520, 0, 2949120, 0, 0, 0, 0, 434, 0, 0, 446, 0, 0, 0, 0, 0, 0, 0, 0, 457, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 2179072, 2658304, 2973696, 2179072, 2125824, 2658304, 2973696, 2125824, 2125824, 2658304, 2973696, 2125824, 2711552, 0, 2560000, 2179072, 2179072, 2945024, 2179072, 2179072, 2994176, 2179072, 3002368, 2179072, 2179072, 3022848, 2179072, 3067904, 3084288, 3096576, 2179072, 2179072, 2600960, 2179072, 2179072, 2179072, 2179072, 2641920, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2719744, 2179072, 2179072, 2441216, 2179072, 2469888, 2179072, 2179072, 2179072, 2519040, 2179072, 2179072, 2179072, 2179072, 2588672, 2179072, 2613248, 2703360, 0, 0, 0, 0, 2977792, 0, 0, 3047424, 3129344, 0, 2981888, 2396160, 0, 3153920, 2560000, 2125824, 2560000, 2125824, 0, 2179072, 2125824, 2125824, 0, 2179072, 2125824, 2125824, 0, 2179072, 2125824, 2125824, 2125824, 2457600, 2179072, 2179072, 2179072, 2179072, 2457600, 2125824, 2125824, 2125824, 2985984, 2985984, 2985984, 2985984, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249856, 0, 0, 0, 0, 0, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 458, 458, 111050, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 458, 111050, 111050, 111050, 111050, 111050, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2738, 0, 0, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 0, 296, 297, 0, 2134016, 300, 301, 0, 0, 0, 0, 0, 0, 184723, 184931, 184931, 184931, 0, 184931, 184931, 184931, 184931, 184931, 0, 0, 0, 0, 0, 184931, 0, 184931, 1, 12290, 3, 78112, 1059, 0, 0, 2179072, 2125824, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 296, 0, 297, 0, 2125824, 1059, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2750, 0, 0, 0, 0, 2755, 0, 300, 118784, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 300, 300, 300, 300, 0, 0, 0, 0, 0, 300, 0, 300, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 266240, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 0, 33403, 297, 0, 2134016, 49791, 301, 0, 0, 0, 0, 0, 0, 225889, 225889, 225889, 225889, 225740, 225889, 225889, 225889, 225889, 225889, 225740, 225740, 225740, 225740, 225740, 225906, 225740, 225906, 1, 12290, 3, 0, 0, 0, 0, 249856, 0, 0, 0, 249856, 0, 0, 0, 0, 0, 0, 697, 698, 0, 362, 362, 362, 0, 0, 0, 0, 0, 0, 711, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 296, 0, 0, 0, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 57344, 0, 0, 0, 0, 0, 0, 0, 3506, 0, 540, 540, 540, 540, 540, 540, 540, 2530, 540, 540, 540, 540, 540, 540, 540, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 296, 0, 0, 0, 300, 0, 0, 0, 300, 119195, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 0, 0, 0, 0, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3166, 3167, 0, 0, 0, 0, 0, 122880, 0, 122880, 122880, 122880, 0, 0, 0, 0, 0, 122880, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 122880, 122880, 122880, 122880, 0, 122880, 0, 2105629, 12290, 3, 0, 0, 291, 0, 0, 0, 0, 291, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 746, 0, 0, 0, 0, 0, 0, 328, 0, 0, 0, 0, 0, 0, 0, 328, 0, 0, 69632, 73728, 0, 416, 416, 0, 0, 65536, 416, 1092, 0, 2424832, 2433024, 0, 0, 2457600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2765, 0, 0, 0, 0, 0, 1824, 2125824, 2125824, 2125824, 2408448, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2551808, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 131072, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 435, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2507, 0, 0, 0, 0, 0, 131072, 0, 0, 131072, 131072, 0, 0, 0, 0, 0, 0, 131072, 0, 131072, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 131072, 131072, 131072, 131072, 0, 131072, 131072, 131072, 131072, 131072, 0, 0, 0, 0, 0, 131072, 0, 131072, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 298, 0, 135168, 135168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 320, 321, 0, 0, 0, 135168, 0, 0, 135168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3174, 0, 0, 0, 0, 0, 0, 0, 135168, 135168, 135168, 135168, 135168, 135168, 135168, 0, 135168, 135168, 135168, 135168, 135168, 0, 0, 0, 0, 0, 135168, 0, 135168, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118784, 296, 0, 2183168, 0, 0, 0, 0, 0, 636, 637, 0, 2134016, 640, 641, 0, 0, 0, 0, 0, 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 266240, 0, 0, 0, 1361, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 986, 2125824, 2125824, 2125824, 2125824, 2424832, 0, 301, 139264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 331, 0, 331, 301, 301, 301, 301, 0, 0, 0, 0, 0, 301, 0, 301, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 297, 0, 2183168, 0, 0, 0, 0, 0, 296, 33406, 0, 2134016, 300, 49794, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61440, 0, 0, 0, 0, 647, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2455, 0, 0, 0, 0, 0, 301, 2424832, 2433024, 0, 0, 2457600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2779, 0, 0, 0, 0, 0, 298, 298, 143728, 298, 298, 298, 143728, 69632, 73728, 298, 298, 143658, 298, 298, 65536, 298, 298, 0, 0, 298, 298, 143658, 298, 298, 298, 298, 298, 298, 298, 298, 298, 363, 298, 0, 143658, 298, 298, 298, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 298, 298, 298, 298, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 298, 298, 298, 143658, 368, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 143658, 298, 298, 143658, 298, 298, 143658, 143658, 143658, 143658, 143658, 143658, 298, 0, 298, 0, 298, 298, 298, 143658, 298, 298, 298, 298, 298, 298, 298, 298, 298, 143658, 298, 143658, 143658, 143658, 143658, 298, 298, 143658, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 143728, 298, 298, 298, 298, 298, 298, 298, 143658, 143658, 143658, 143658, 143658, 143658, 143728, 143658, 143728, 143728, 143728, 143728, 143728, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 90406, 90406, 90406, 90406, 0, 94503, 0, 0, 0, 3117056, 0, 0, 0, 0, 0, 0, 0, 2200252, 2200252, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 0, 155648, 155648, 0, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 0, 0, 0, 0, 155648, 0, 0, 0, 0, 0, 0, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1663, 0, 0, 0, 0, 0, 0, 0, 0, 155648, 0, 0, 155648, 0, 0, 0, 0, 0, 0, 0, 155648, 0, 0, 0, 155648, 155648, 0, 155648, 155648, 0, 12290, 3, 0, 0, 2183168, 126976, 0, 0, 0, 0, 296, 297, 0, 2134016, 300, 301, 0, 0, 0, 0, 0, 0, 1146880, 0, 1146880, 0, 0, 0, 0, 0, 0, 0, 1107, 0, 0, 0, 0, 0, 0, 0, 0, 540, 2163, 540, 540, 540, 540, 540, 540, 0, 0, 0, 3117056, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 0, 0, 0, 345, 346, 347, 0, 0, 0, 0, 0, 0, 0, 757, 0, 0, 0, 0, 0, 0, 0, 0, 1156, 0, 0, 0, 0, 0, 0, 0, 159744, 159744, 159744, 0, 0, 159744, 0, 0, 0, 0, 0, 0, 0, 0, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 163840, 159744, 159744, 159744, 163840, 159744, 159744, 159744, 159744, 159744, 0, 0, 0, 0, 0, 0, 0, 0, 25160, 0, 0, 159744, 0, 0, 0, 0, 25160, 25160, 25160, 159744, 25160, 25160, 25160, 25160, 25160, 159744, 159744, 159744, 159744, 25160, 159744, 25160, 1, 12290, 3, 0, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 1, 12290, 3, 0, 167936, 167936, 167936, 0, 0, 167936, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3015, 0, 0, 0, 0, 0, 0, 0, 0, 2138112, 1183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 262144, 0, 0, 0, 0, 172032, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172032, 0, 0, 0, 0, 0, 0, 172032, 172032, 0, 172032, 0, 0, 172032, 0, 172032, 0, 172032, 0, 0, 0, 0, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 1, 12290, 3, 0, 172032, 0, 172032, 172032, 0, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106496, 0, 0, 0, 0, 0, 1, 286, 3, 0, 0, 0, 292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106496, 0, 106496, 0, 0, 0, 0, 106496, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 1, 0, 3, 78112, 176128, 176128, 176128, 0, 0, 176128, 0, 0, 0, 0, 0, 0, 0, 0, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111050, 0, 0, 0, 0, 0, 78112, 290, 0, 634, 0, 0, 0, 296, 297, 0, 2134016, 300, 301, 0, 0, 0, 0, 0, 0, 1159168, 414, 414, 0, 0, 0, 0, 0, 414, 0, 1164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 0, 914, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 959, 561, 585, 585, 585, 1490, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1498, 585, 585, 0, 0, 229376, 0, 0, 0, 0, 0, 0, 0, 0, 1686, 0, 0, 0, 0, 0, 0, 404, 404, 404, 404, 0, 404, 404, 404, 404, 404, 0, 0, 0, 0, 0, 404, 0, 404, 1, 12290, 3, 78112, 290, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1155072, 0, 0, 0, 0, 0, 0, 0, 2131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 658, 0, 0, 0, 561, 561, 561, 561, 561, 561, 2250, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 0, 0, 0, 0, 0, 0, 3295, 0, 0, 0, 0, 0, 0, 0, 712, 0, 0, 0, 716, 0, 0, 719, 0, 561, 561, 2287, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, 0, 0, 585, 585, 585, 2347, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1514, 585, 585, 2372, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 2671, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1515, 585, 585, 0, 0, 0, 2994, 0, 0, 0, 2998, 0, 0, 0, 0, 0, 0, 0, 0, 0, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 540, 3035, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 910, 540, 3075, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1417, 3116, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1501, 0, 0, 3178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3187, 0, 0, 0, 0, 0, 2046, 0, 2149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 1, 12290, 3, 0, 540, 540, 540, 3203, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3211, 540, 540, 540, 540, 540, 2813, 540, 540, 2817, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2555, 540, 540, 540, 540, 540, 540, 3255, 585, 585, 585, 3258, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3266, 585, 561, 0, 1287, 585, 1467, 1376, 540, 540, 1339, 540, 540, 561, 561, 1430, 561, 0, 585, 585, 585, 585, 585, 288, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 2427, 0, 0, 0, 0, 0, 0, 0, 0, 2465, 0, 0, 2468, 0, 0, 0, 0, 0, 0, 0, 0, 3309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 3508, 540, 3509, 540, 540, 540, 3326, 3327, 540, 540, 540, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 961, 561, 585, 585, 585, 3361, 585, 585, 585, 585, 3362, 3363, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1159168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 3387, 0, 0, 0, 0, 0, 2092, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 404, 0, 0, 0, 0, 0, 561, 3416, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 3425, 585, 585, 585, 585, 585, 585, 1492, 585, 585, 585, 585, 585, 585, 585, 1499, 585, 585, 585, 585, 3431, 585, 585, 585, 585, 3435, 540, 561, 585, 0, 0, 0, 0, 0, 0, 665, 0, 0, 668, 0, 0, 0, 0, 0, 0, 0, 3172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 3450, 540, 540, 540, 540, 540, 2814, 540, 2816, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2233, 540, 540, 540, 540, 540, 0, 561, 561, 561, 3573, 561, 561, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 3538, 585, 585, 3585, 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 0, 3627, 561, 561, 585, 585, 0, 540, 561, 585, 0, 540, 561, 585, 0, 540, 561, 585, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2662400, 0, 2813952, 78112, 290, 0, 0, 0, 0, 0, 296, 297, 0, 2134016, 300, 301, 0, 0, 0, 0, 0, 0, 2473984, 2478080, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2976, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2134756, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12290, 3, 0, 0, 0, 188416, 540, 585, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 585, 585, 585, 585, 0, 0, 540, 540, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 540, 2169, 0, 0, 0, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12290, 3, 78112, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 0, 192971, 0, 1, 12290, 3, 0, 192971, 192971, 192971, 0, 0, 192971, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 322, 0, 0, 0, 0, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 0, 192971, 192971, 192971, 192971, 192971, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2801664, 0, 0, 0, 0, 2142208, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 674, 78112, 290, 0, 0, 0, 0, 0, 296, 297, 0, 299, 300, 301, 0, 0, 0, 0, 0, 0, 2797568, 0, 0, 0, 0, 0, 0, 0, 2850816, 2867200, 0, 0, 740, 404, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 335, 0, 0, 0, 0, 0, 740, 540, 585, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 585, 585, 585, 585, 2029, 0, 2031, 0, 0, 0, 0, 740, 1184, 0, 0, 0, 0, 1188, 0, 0, 0, 0, 0, 0, 0, 1583, 0, 1585, 0, 0, 0, 0, 0, 0, 0, 1661, 1662, 0, 0, 0, 0, 0, 0, 0, 0, 2727936, 0, 0, 0, 3084288, 0, 0, 0, 0, 0, 0, 1577, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 351, 352, 353, 354, 0, 0, 0, 1188, 1670, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1150976, 0, 0, 0, 0, 0, 0, 561, 561, 585, 585, 585, 585, 1559, 2029, 0, 0, 0, 0, 1565, 2031, 0, 0, 0, 0, 0, 2120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2130, 2033, 0, 2035, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 336, 337, 338, 561, 561, 2323, 2648, 0, 0, 0, 0, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2339, 585, 585, 2342, 0, 304, 0, 304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 304, 0, 0, 0, 0, 0, 2136, 0, 2138, 0, 0, 0, 0, 0, 0, 0, 0, 791, 817, 0, 817, 812, 0, 0, 0, 0, 0, 0, 204800, 204800, 0, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 205104, 204800, 204800, 205103, 205104, 204800, 205103, 205103, 204800, 204800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 296, 0, 0, 0, 0, 0, 0, 0, 2183801, 0, 0, 0, 0, 0, 296, 297, 151552, 2134016, 300, 301, 0, 212992, 0, 0, 0, 0, 662, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3117056, 0, 0, 0, 0, 0, 0, 0, 0, 2200253, 0, 0, 0, 0, 0, 0, 2932736, 2965504, 0, 0, 3076096, 0, 0, 2695168, 3174400, 2646016, 0, 914, 2126737, 2126737, 2126737, 2126737, 2425745, 2433937, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 0, 0, 987, 2126810, 2126810, 2126810, 2126810, 2425818, 2724753, 2126737, 2732945, 2773905, 2126737, 2126737, 2126737, 2806673, 2126737, 2831249, 2126737, 2126737, 2864017, 2126737, 2126737, 2126737, 2126737, 2126737, 2524049, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2601873, 2126737, 2126737, 2921361, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3117969, 2126737, 2126737, 2126737, 2126737, 2593681, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126810, 2126810, 2126810, 2126810, 3093393, 0, 0, 0, 0, 3026944, 2404352, 2179072, 2179072, 2179072, 2179072, 3026944, 2434010, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2626522, 2126810, 2126737, 0, 2179072, 2126810, 2126810, 2126737, 2457600, 2179072, 2179072, 2179072, 2179072, 2458513, 2126737, 2126737, 2126737, 2126737, 2126737, 2626449, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2700177, 2126737, 2716561, 2126737, 2806746, 2126810, 2831322, 2126810, 2126810, 2864090, 2126810, 2126810, 2126810, 2126810, 2921434, 2126810, 2126810, 2126810, 2126810, 2126810, 2126737, 2179072, 2126810, 2126810, 2126737, 2179072, 2179072, 2179072, 2179072, 2126737, 2126737, 2126737, 2458586, 2126810, 2126810, 2126810, 2126810, 2183168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 321, 395, 0, 0, 0, 321, 0, 0, 2126737, 2126737, 2126737, 2409361, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3126161, 2126737, 2126737, 2126737, 2802577, 2814865, 2126737, 2839441, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126810, 2126810, 2126810, 2126810, 2126810, 2663386, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2802650, 2814938, 2126810, 2839514, 0, 0, 0, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2462609, 2466705, 2126737, 0, 2126810, 2126810, 2126810, 2126810, 2126810, 0, 0, 0, 0, 0, 0, 0, 0, 0, 297, 0, 0, 0, 0, 0, 0, 2769809, 2778001, 2126737, 2798481, 2823057, 2126737, 2126737, 2126737, 2884497, 2126737, 2913169, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2655121, 2679697, 2761617, 2765713, 2786193, 2855825, 2970513, 2126737, 3007377, 2126737, 3134353, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3208081, 2126737, 0, 0, 0, 0, 0, 325, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2462682, 2466778, 2126810, 2126810, 2126810, 2524122, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2601946, 2126810, 2126810, 2126810, 2585562, 2126810, 2126810, 2126810, 2126810, 2126810, 2618330, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2888666, 2126810, 2126810, 2925530, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2642906, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2720730, 2126810, 2126810, 2126810, 2126810, 2126810, 2769882, 2778074, 2126810, 2798554, 2823130, 2126810, 2126810, 2126810, 2884570, 2126810, 2913242, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 3126234, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 3208154, 2126810, 2126737, 2179072, 2126810, 2126810, 2126737, 0, 0, 0, 2388881, 2126737, 2126737, 2421649, 2126737, 2126737, 2126737, 2126737, 2126737, 2454417, 2126737, 2474897, 2483089, 2630545, 2126737, 2126737, 2651025, 2126737, 2126737, 2126737, 2708369, 2126737, 2737041, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 985, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2552794, 2126810, 2126810, 2126810, 2126810, 2126810, 2126737, 2126737, 3072913, 2126737, 2126737, 3122065, 2126737, 2126737, 3142545, 2126737, 2126737, 2126737, 3171217, 2126737, 2126737, 3191697, 3195793, 2126737, 0, 0, 0, 0, 0, 0, 2388954, 2126810, 2126810, 2421722, 2126810, 2126810, 2126810, 2126810, 2126810, 3040218, 2126810, 3064794, 2126810, 2126810, 2126810, 2126810, 3101658, 2126810, 2126810, 3134426, 2126810, 2454490, 2126810, 2474970, 2483162, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2532314, 2126810, 2126810, 2126810, 2126810, 3036122, 2126810, 2126810, 3072986, 2126810, 2126810, 3122138, 2126810, 2126810, 3142618, 2126810, 2126810, 2126810, 3171290, 2126810, 2126810, 3191770, 3195866, 2126810, 2126737, 2179072, 2126810, 2126810, 2126737, 2179072, 2179072, 3112960, 3219456, 2126737, 2126737, 3113873, 3220369, 2126810, 2126810, 3113946, 3220442, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 2638737, 2126737, 2126737, 2126737, 2126737, 2728849, 2753425, 2126737, 2126737, 2126737, 2126737, 2843537, 2847633, 2126737, 2896785, 2917265, 2638810, 2126810, 2126810, 2126810, 2126810, 2728922, 2753498, 2126810, 2126810, 2126810, 2126810, 2843610, 2847706, 2126810, 2896858, 2917338, 2179072, 3178496, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2495377, 2126737, 2126737, 2515857, 2126737, 2126737, 2126737, 2126737, 3011473, 2126737, 2126737, 2126810, 2126810, 2503642, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 3138522, 2126737, 2940928, 2941841, 2941914, 0, 0, 0, 0, 2126737, 2544529, 2548625, 2126737, 2126737, 2597777, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2552721, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2929553, 2126737, 2126737, 2126737, 2999185, 2126737, 2126737, 2126737, 2126737, 3060625, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3040145, 2126737, 3064721, 2126737, 2126737, 2126737, 2126737, 3101585, 2126737, 2126737, 3179409, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2495450, 2126810, 2126810, 2515930, 2126810, 2126810, 0, 0, 0, 0, 0, 0, 2510848, 2514944, 0, 0, 2547712, 2596864, 0, 0, 0, 0, 0, 2160, 0, 0, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 3525, 561, 2126810, 2544602, 2548698, 2126810, 2126810, 2597850, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126737, 0, 2502656, 0, 0, 3010560, 2126810, 2929626, 2126810, 2126810, 2126810, 2999258, 2126810, 2126810, 2126810, 2126810, 3060698, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 3118042, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126737, 2126810, 3179482, 2126737, 2179072, 2126810, 2126737, 2179072, 2179072, 2126737, 2126737, 2126810, 2126810, 2441216, 0, 0, 0, 0, 0, 326, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, 0, 0, 0, 3129344, 2179072, 2179072, 3153920, 3166208, 3174400, 2397073, 2401169, 2126737, 2126737, 2442129, 2126737, 2470801, 2126737, 2126737, 2126737, 2126737, 2126737, 2663313, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 0, 0, 2126810, 2126810, 2126810, 2409434, 2519953, 2126737, 2126737, 2126737, 2126737, 2589585, 2126737, 2614161, 2646929, 2126737, 2126737, 2696081, 2757521, 2126737, 2126737, 2126737, 2126737, 2126737, 3138449, 2126810, 2126810, 2499546, 2126810, 2126810, 2126810, 2556890, 2565082, 2126810, 2126810, 2126737, 2933649, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3130257, 2126737, 2126737, 3154833, 3167121, 3175313, 2397146, 2401242, 2126810, 2126810, 2442202, 2126810, 2470874, 2126810, 2126810, 2126810, 2520026, 2126810, 2126810, 2126810, 2126810, 2589658, 2126810, 2126810, 2126810, 3011546, 2126810, 2126810, 2126737, 0, 0, 0, 0, 0, 0, 0, 2592768, 0, 0, 0, 0, 663, 0, 0, 666, 667, 0, 0, 0, 0, 0, 0, 0, 540, 571, 540, 571, 540, 540, 571, 540, 595, 2614234, 2647002, 2126810, 2126810, 2696154, 2757594, 2126810, 2126810, 2126810, 2126810, 2933722, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 3224538, 2126737, 2179072, 2417626, 2126810, 2126737, 2179072, 2179072, 2126737, 2126737, 2854912, 2969600, 2179072, 3006464, 2179072, 3018752, 2179072, 2179072, 2179072, 3149824, 2126737, 2429841, 2438033, 2126737, 2487185, 2126737, 2126737, 2945937, 2126737, 2126737, 2995089, 2126737, 3003281, 2126737, 2126737, 3023761, 2126737, 3068817, 3085201, 3097489, 2126737, 2126737, 2888593, 2126737, 2126737, 2925457, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3036049, 2126737, 3019665, 2126737, 2126737, 2126737, 3150737, 2126810, 2429914, 2438106, 2126810, 2487258, 2126810, 2126810, 2126810, 2126810, 2126810, 2700250, 2126810, 2716634, 2126810, 2724826, 2126810, 2733018, 2773978, 2126810, 2126810, 2126810, 2126810, 3150810, 2126737, 2179072, 3051520, 2126737, 3052433, 2126810, 3052506, 0, 2490368, 2498560, 0, 0, 0, 0, 0, 0, 679, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2126810, 2593754, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126737, 2449408, 0, 2535424, 3031040, 0, 0, 0, 0, 0, 2439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 369, 0, 0, 370, 0, 0, 2126737, 2450321, 2126737, 2536337, 2126737, 2610065, 2126737, 2859921, 2126737, 2126737, 2126737, 3031953, 2126810, 2450394, 2126810, 2536410, 2126810, 2610138, 2126810, 2859994, 2126810, 2126810, 2126810, 3032026, 2126737, 2527232, 0, 0, 0, 0, 0, 2179072, 2126810, 2126810, 2126737, 2179072, 2179072, 2179072, 2179072, 2179072, 2126737, 2126737, 2126737, 2126737, 2126810, 2126810, 2126810, 2126810, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 237568, 0, 0, 0, 0, 2527232, 2179072, 2179072, 2179072, 2179072, 2179072, 2126737, 2528145, 2126737, 2126737, 2126737, 2126737, 2126737, 2126810, 2528218, 2126810, 2126810, 2946010, 2126810, 2126810, 2995162, 2126810, 3003354, 2126810, 2126810, 3023834, 2126810, 3068890, 3085274, 3097562, 2126810, 2126810, 2126810, 2606042, 2126810, 2630618, 2126810, 2126810, 2651098, 2126810, 2126810, 2126810, 2708442, 2126810, 2737114, 2126810, 2126810, 2126810, 2655194, 2679770, 2761690, 2765786, 2786266, 2855898, 2970586, 2126810, 3007450, 2126810, 3019738, 2126810, 2126810, 0, 2486272, 0, 0, 0, 0, 0, 2678784, 2854912, 3006464, 0, 3108864, 3198976, 0, 2405265, 2126737, 2126737, 2126737, 2126737, 3027857, 2405338, 2126810, 2126810, 2126810, 2126810, 3027930, 2539520, 0, 2949120, 0, 0, 0, 0, 695, 0, 0, 0, 0, 362, 362, 362, 0, 0, 704, 0, 0, 0, 0, 709, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2049, 0, 0, 0, 0, 2179072, 2658304, 2973696, 2179072, 2126737, 2659217, 2974609, 2126737, 2126810, 2659290, 2974682, 2126810, 2711552, 0, 2560000, 2179072, 2179072, 3125248, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2560913, 2126737, 2560986, 2126810, 0, 2179072, 2126737, 2126810, 0, 2179072, 2126737, 2126810, 0, 2179072, 2126737, 2126810, 2126810, 3130330, 2126810, 2126810, 3154906, 3167194, 3175386, 2126737, 2506752, 2507738, 2507665, 2179072, 2179072, 2126737, 2126737, 2126737, 2642833, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2720657, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2585489, 2126737, 2126737, 2126737, 2126737, 2126737, 2618257, 2126737, 2985984, 2985984, 2986897, 2986970, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 397, 0, 0, 0, 0, 221184, 221184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221184, 221184, 0, 0, 221184, 221184, 221184, 0, 0, 0, 0, 0, 0, 221184, 0, 0, 0, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 332, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 1, 12290, 3, 0, 0, 0, 0, 0, 253952, 0, 0, 0, 253952, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 687, 688, 0, 0, 0, 0, 0, 98304, 0, 0, 0, 53248, 0, 0, 0, 0, 0, 2662400, 0, 2813952, 297, 0, 300, 0, 0, 0, 300, 0, 301, 0, 0, 0, 301, 0, 0, 0, 301, 69632, 139679, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 3133440, 0, 98304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 300, 0, 301, 0, 0, 0, 2473984, 2478080, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 3121152, 2179072, 2179072, 3141632, 2179072, 2179072, 2179072, 3170304, 2179072, 2179072, 3190784, 3194880, 2179072, 914, 0, 0, 0, 0, 0, 2451, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 301, 0, 0, 0, 0, 0, 914, 0, 2387968, 2125824, 2125824, 2420736, 2125824, 2125824, 2125824, 2125824, 2125824, 2453504, 2125824, 2473984, 2482176, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2531328, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2605056, 2125824, 3194880, 2125824, 987, 0, 0, 0, 987, 0, 2387968, 2125824, 2125824, 2420736, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2887680, 2125824, 2125824, 2924544, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3035136, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 0, 0, 0, 0, 2125824, 237568, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 0, 0, 0, 0, 0, 358, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 0, 296, 297, 0, 2134016, 300, 301, 0, 0, 217088, 2125824, 241664, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 0, 131072, 131072, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 0, 155648, 0, 0, 2183168, 0, 0, 270336, 0, 0, 296, 297, 0, 2134016, 300, 301, 200704, 0, 0, 0, 0, 0, 2462, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1261, 0, 0, 0, 0, 0, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 180224, 0, 0, 0, 0, 0, 0, 0, 1726, 0, 0, 0, 0, 0, 0, 0, 0, 304, 304, 304, 0, 0, 0, 0, 0, 0, 2748416, 2879488, 0, 20480, 0, 0, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2768896, 2777088, 2797568, 2822144, 2179072, 2179072, 2179072, 2883584, 2912256, 2179072, 2179072, 2179072, 2179072, 2179072, 2617344, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2662400, 2179072, 2179072, 2179072, 2179072, 2179072, 3010560, 2179072, 2179072, 2125824, 2125824, 2502656, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2584576, 2125824, 2125824, 2125824, 2125824, 2125824, 2617344, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2142208, 0, 0, 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12290, 2113823, 0, 0, 0, 0, 0, 0, 293, 0, 0, 0, 293, 0, 0, 245760, 0, 0, 2179072, 2125824, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3039232, 2125824, 3063808, 2125824, 2125824, 2125824, 2125824, 3100672, 2125824, 2125824, 3133440, 2125824, 245760, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 122880, 122880, 0, 0, 274432, 274432, 274432, 274432, 0, 0, 0, 0, 0, 274432, 0, 274432, 1, 12290, 3, 0, 0, 0, 0, 725, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1192, 0, 1195, 0, 0, 78112, 290, 0, 0, 0, 0, 0, 296, 297, 0, 0, 300, 301, 0, 0, 0, 0, 0, 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2200252, 2200252, 2200252, 0, 0, 0, 0, 0, 0, 0, 2033, 0, 0, 0, 0, 0, 2035, 0, 0, 0, 0, 0, 0, 0, 2055, 0, 2056, 0, 0, 0, 0, 0, 0, 0, 2067, 0, 0, 0, 0, 0, 0, 0, 0, 1187, 0, 0, 0, 0, 0, 0, 1104, 2483, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 690, 0, 0, 2993, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 383, 335, 0, 0, 0, 0, 1679, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 694, 0, 0, 0, 0, 0, 0, 741, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 730, 0, 0, 0, 0, 0, 0, 78456, 290, 0, 0, 0, 0, 0, 296, 297, 0, 0, 300, 301, 0, 0, 0, 0, 0, 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1158, 0, 0, 0, 0, 0, 562, 562, 562, 562, 562, 562, 562, 586, 586, 586, 540, 586, 586, 586, 586, 586, 562, 562, 540, 562, 586, 562, 586, 1, 12290, 3, 78112, 0, 0, 2771, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 514, 521, 521, 1, 12290, 3, 78113, 290, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 0, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 1, 12290, 3, 0, 282624, 282624, 282624, 0, 0, 282624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3178496, 2670592, 0, 2744320, 0, 0, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 0, 282624, 282624, 282624, 282624, 282624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 290, 0, 0, 0, 0, 3176, 0, 0, 2740224, 0, 0, 0, 0, 0, 2793472, 0, 0, 0, 0, 0, 0, 0, 2094, 0, 0, 0, 0, 0, 0, 0, 0, 683, 684, 685, 0, 0, 0, 689, 0, 0, 0, 0, 286720, 286720, 0, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 302, 0, 0, 0, 0, 0, 3043328, 0, 3149824, 2936832, 0, 2760704, 3301, 0, 0, 0, 0, 2953216, 0, 0, 2826240, 2875392, 0, 0, 0, 3381, 0, 0, 2834432, 0, 3227648, 2568192, 0, 0, 0, 0, 2564096, 0, 2748416, 2879488, 0, 3381, 0, 0, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2531328, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2605056, 2179072, 2629632, 2179072, 2179072, 0, 0, 0, 306, 0, 0, 0, 0, 0, 305, 0, 305, 306, 0, 305, 305, 0, 0, 0, 305, 305, 306, 306, 0, 0, 0, 0, 0, 0, 305, 405, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 750, 0, 0, 0, 306, 410, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 742, 0, 0, 0, 0, 742, 0, 748, 0, 0, 0, 0, 0, 0, 1192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 462, 462, 462, 488, 488, 462, 488, 488, 488, 488, 488, 488, 488, 513, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 533, 488, 488, 488, 488, 488, 541, 563, 541, 563, 541, 541, 563, 541, 587, 563, 563, 563, 563, 563, 563, 563, 587, 587, 587, 541, 613, 613, 613, 613, 613, 587, 563, 563, 541, 563, 587, 563, 587, 1, 12290, 3, 78112, 0, 0, 645, 0, 0, 648, 649, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 253952, 0, 0, 0, 0, 0, 645, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 762, 0, 0, 0, 0, 0, 353, 0, 351, 0, 472, 472, 472, 472, 472, 472, 472, 477, 472, 472, 472, 472, 472, 472, 472, 472, 472, 477, 472, 0, 768, 0, 0, 772, 0, 0, 0, 0, 0, 0, 781, 0, 0, 0, 0, 0, 0, 727, 0, 0, 0, 731, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 343, 342, 65536, 341, 0, 788, 0, 0, 0, 0, 792, 0, 0, 0, 0, 0, 0, 0, 796, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 782, 0, 0, 0, 0, 736, 0, 796, 0, 0, 0, 0, 648, 0, 0, 0, 0, 0, 0, 820, 0, 0, 648, 0, 0, 0, 0, 0, 837, 792, 0, 0, 0, 0, 0, 841, 842, 792, 792, 0, 0, 0, 0, 792, 736, 792, 0, 540, 540, 851, 855, 540, 540, 540, 540, 1345, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2181, 540, 540, 540, 540, 561, 561, 561, 921, 925, 561, 561, 561, 561, 561, 561, 951, 561, 956, 561, 963, 561, 966, 561, 561, 980, 561, 561, 0, 585, 585, 585, 994, 998, 585, 585, 585, 585, 585, 585, 1963, 1964, 1966, 585, 585, 585, 585, 585, 585, 585, 561, 2713, 585, 2715, 2716, 540, 540, 540, 540, 585, 585, 585, 1024, 585, 1029, 585, 1036, 585, 1039, 585, 585, 1053, 585, 585, 966, 0, 0, 0, 855, 585, 998, 925, 851, 1065, 894, 540, 540, 921, 1070, 966, 561, 0, 585, 585, 585, 585, 585, 78112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114688, 0, 241664, 258048, 0, 0, 0, 1093, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 766, 0, 0, 1214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 672, 673, 0, 540, 540, 1342, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 0, 0, 0, 585, 585, 585, 1524, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1517, 585, 585, 585, 1433, 0, 540, 585, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 561, 3070, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 0, 0, 0, 3662, 0, 0, 0, 1641, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1103, 1104, 1105, 1106, 1654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 785, 0, 1693, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 305, 306, 0, 1732, 0, 0, 1733, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 540, 3030, 540, 540, 540, 540, 540, 540, 540, 1745, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1758, 540, 540, 540, 540, 540, 540, 2540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1329, 540, 540, 540, 540, 540, 540, 540, 540, 1795, 540, 540, 1798, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 900, 540, 540, 540, 540, 540, 540, 1810, 540, 540, 540, 540, 540, 1815, 540, 540, 540, 540, 540, 540, 540, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1416, 561, 1825, 561, 561, 561, 561, 1831, 561, 561, 561, 561, 561, 1837, 561, 561, 561, 561, 561, 983, 561, 0, 585, 585, 585, 585, 585, 1002, 585, 1010, 561, 1892, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1904, 561, 561, 561, 561, 585, 585, 585, 585, 0, 0, 0, 2726, 0, 0, 2729, 2730, 561, 561, 1909, 561, 561, 561, 561, 561, 561, 561, 26027, 1919, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 540, 3649, 540, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 561, 3231, 3232, 561, 1925, 585, 585, 585, 585, 585, 1931, 585, 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 3596, 1944, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1540, 561, 561, 2025, 585, 585, 585, 0, 2029, 0, 0, 0, 0, 0, 2031, 0, 0, 0, 0, 0, 2487, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 2041, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1132, 0, 0, 0, 2075, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1135, 0, 2145, 0, 0, 0, 2143, 0, 0, 2150, 0, 0, 0, 0, 0, 0, 0, 0, 159744, 0, 0, 0, 0, 0, 0, 0, 0, 1234, 0, 0, 0, 0, 0, 0, 0, 0, 1584, 0, 0, 0, 0, 0, 0, 0, 0, 1700, 0, 0, 0, 0, 1705, 0, 0, 540, 540, 2171, 540, 540, 2174, 540, 540, 540, 540, 540, 540, 2182, 540, 540, 540, 540, 540, 540, 2568, 540, 540, 540, 540, 2572, 540, 540, 540, 540, 540, 540, 1347, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2556, 540, 540, 540, 540, 540, 540, 540, 2201, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 0, 0, 2242, 540, 540, 540, 2214, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1805, 540, 540, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2254, 561, 0, 585, 585, 585, 585, 585, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 2123, 0, 2125, 2126, 0, 0, 0, 0, 561, 2257, 561, 561, 561, 561, 561, 561, 2265, 561, 561, 561, 561, 561, 561, 561, 0, 0, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 540, 2952, 561, 2954, 561, 2299, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1438, 561, 2033, 0, 2035, 0, 0, 2426, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2434, 0, 0, 0, 2475, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1193, 0, 0, 0, 0, 2484, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2493, 0, 0, 0, 0, 0, 0, 756, 0, 0, 0, 0, 0, 0, 763, 0, 0, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 2592, 561, 561, 561, 561, 561, 1408, 561, 561, 1412, 561, 561, 561, 561, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 1008, 585, 2656, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2664, 585, 585, 585, 585, 585, 585, 2350, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2379, 585, 585, 585, 585, 585, 585, 585, 585, 2699, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1940, 585, 585, 2708, 585, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 540, 540, 540, 540, 561, 561, 561, 3229, 561, 561, 561, 561, 561, 561, 585, 585, 585, 3352, 585, 585, 585, 3355, 585, 585, 2731, 0, 0, 0, 0, 0, 0, 2736, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 0, 0, 0, 2759, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1234, 540, 540, 540, 0, 0, 0, 2788, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1238, 0, 0, 0, 540, 540, 540, 2826, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2833, 540, 540, 540, 540, 1748, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1760, 540, 540, 540, 540, 1765, 540, 540, 540, 540, 540, 540, 540, 540, 1772, 540, 540, 540, 540, 561, 3406, 561, 561, 3408, 561, 561, 561, 561, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 1009, 585, 561, 561, 561, 2860, 561, 561, 2864, 561, 561, 561, 561, 561, 561, 561, 561, 561, 944, 561, 561, 561, 561, 561, 561, 561, 2873, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2881, 561, 561, 0, 0, 0, 2649, 0, 1920, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2703, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2908, 585, 585, 2912, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2393, 2394, 585, 585, 585, 585, 585, 2921, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2929, 585, 585, 0, 0, 0, 3292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3297, 2955, 585, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 305, 0, 0, 0, 2970, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1588, 1589, 0, 0, 540, 540, 540, 540, 3036, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2546, 540, 540, 540, 561, 561, 561, 3076, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1436, 561, 561, 561, 585, 585, 585, 3117, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2356, 585, 2358, 0, 0, 0, 0, 3176, 3442, 0, 3444, 0, 0, 0, 0, 0, 540, 3451, 540, 540, 540, 540, 1796, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 905, 540, 540, 540, 540, 3453, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 561, 3466, 561, 3468, 0, 0, 3501, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 3510, 540, 540, 540, 540, 540, 3204, 3205, 540, 540, 540, 540, 3209, 3210, 540, 540, 540, 540, 540, 1749, 1750, 540, 540, 540, 540, 1757, 540, 540, 540, 540, 540, 540, 1346, 540, 540, 540, 540, 540, 540, 1356, 540, 540, 307, 308, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 734, 0, 0, 0, 0, 418, 0, 0, 0, 0, 0, 449, 0, 0, 0, 0, 0, 0, 0, 0, 286720, 0, 0, 0, 0, 0, 0, 0, 0, 2490, 0, 0, 0, 0, 0, 0, 0, 0, 2504, 0, 0, 0, 0, 0, 0, 0, 0, 2517, 0, 0, 0, 0, 0, 0, 0, 0, 2975, 0, 0, 0, 0, 0, 0, 0, 0, 2999, 0, 0, 0, 0, 0, 0, 0, 0, 3164, 0, 0, 0, 0, 0, 0, 0, 0, 3173, 0, 0, 0, 0, 0, 0, 0, 0, 3183, 0, 0, 0, 0, 0, 0, 0, 0, 155648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 449, 449, 418, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 532, 449, 532, 532, 532, 449, 532, 532, 532, 532, 449, 542, 564, 542, 564, 542, 542, 564, 542, 588, 564, 564, 564, 564, 564, 564, 564, 588, 588, 588, 542, 588, 588, 588, 588, 588, 564, 564, 616, 621, 588, 621, 627, 1, 12290, 3, 78112, 0, 1677, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1163, 540, 540, 540, 1811, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1377, 561, 0, 585, 585, 585, 585, 585, 78112, 1079, 0, 0, 1082, 1086, 0, 0, 1090, 585, 585, 585, 1993, 585, 585, 585, 585, 585, 1999, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 3551, 0, 3553, 0, 0, 0, 0, 0, 561, 561, 561, 561, 561, 2589, 561, 561, 561, 561, 2593, 561, 561, 0, 2648, 0, 0, 0, 0, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2338, 585, 585, 585, 585, 585, 585, 585, 2657, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1971, 585, 585, 585, 2709, 585, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 540, 540, 540, 540, 561, 561, 3228, 561, 561, 561, 561, 561, 561, 561, 0, 0, 585, 2900, 585, 585, 585, 585, 585, 540, 3514, 540, 3516, 540, 540, 3518, 540, 561, 561, 561, 561, 561, 561, 561, 561, 1396, 1398, 561, 561, 561, 561, 561, 561, 3527, 561, 3529, 561, 561, 3531, 561, 585, 585, 585, 585, 585, 585, 585, 585, 3540, 585, 3542, 585, 585, 3544, 585, 561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 362, 0, 0, 0, 147456, 0, 0, 0, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 0, 0, 0, 0, 0, 373, 0, 0, 0, 0, 365, 0, 382, 0, 348, 0, 0, 310, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 328, 0, 0, 0, 313, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 764, 0, 0, 420, 428, 419, 428, 0, 310, 428, 441, 450, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 484, 489, 489, 500, 489, 489, 489, 489, 489, 489, 489, 489, 515, 515, 528, 528, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 515, 529, 529, 529, 529, 529, 543, 565, 543, 565, 543, 543, 565, 543, 589, 565, 565, 565, 565, 565, 565, 565, 589, 589, 589, 612, 589, 589, 589, 589, 589, 614, 615, 615, 612, 615, 614, 615, 614, 1, 12290, 3, 78112, 0, 702, 0, 0, 0, 0, 0, 702, 0, 0, 0, 540, 540, 540, 540, 540, 3028, 540, 540, 540, 540, 540, 540, 540, 561, 967, 561, 561, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 585, 585, 2337, 585, 585, 585, 585, 2341, 585, 0, 1108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 3200, 0, 1150, 1108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1102, 0, 0, 0, 1228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1240, 0, 0, 540, 540, 1276, 1278, 540, 540, 540, 540, 540, 540, 540, 540, 1292, 540, 1297, 540, 540, 1301, 540, 540, 540, 540, 1812, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1823, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1378, 561, 0, 585, 585, 585, 585, 585, 78112, 1079, 0, 0, 1083, 1087, 0, 0, 1091, 540, 1304, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1302, 540, 1360, 914, 561, 561, 1364, 561, 1367, 561, 561, 561, 561, 561, 561, 561, 561, 1381, 561, 1386, 561, 561, 1390, 561, 561, 1393, 561, 561, 561, 561, 561, 561, 561, 561, 1431, 561, 561, 1435, 561, 561, 561, 561, 1484, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1942, 540, 1793, 1794, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 0, 2584, 0, 585, 585, 1946, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2005, 585, 585, 585, 1959, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2357, 585, 2102, 0, 0, 0, 0, 1670, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 328, 379, 381, 0, 0, 0, 0, 0, 2133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1119, 0, 0, 2033, 0, 2035, 0, 0, 0, 0, 0, 0, 2428, 0, 0, 0, 0, 0, 0, 0, 2122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 122880, 122880, 122880, 122880, 122880, 0, 0, 2474, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1133, 0, 0, 0, 0, 0, 0, 2760, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 380, 0, 0, 0, 384, 0, 0, 2799, 0, 0, 0, 0, 0, 0, 0, 2803, 540, 540, 540, 540, 540, 540, 540, 1326, 540, 540, 540, 540, 540, 540, 540, 1339, 585, 2956, 0, 0, 0, 0, 0, 2962, 0, 0, 0, 0, 0, 0, 0, 2966, 0, 0, 0, 3008, 0, 0, 0, 0, 0, 0, 0, 0, 3017, 0, 0, 0, 0, 0, 383, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 3048, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1320, 3089, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1858, 3130, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1957, 540, 3225, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3414, 585, 585, 585, 3281, 585, 585, 585, 585, 561, 540, 585, 561, 540, 540, 561, 561, 585, 585, 0, 0, 0, 3157, 3513, 540, 540, 540, 540, 540, 540, 540, 561, 3521, 561, 3522, 561, 561, 561, 3526, 540, 540, 540, 3664, 561, 561, 561, 3666, 585, 585, 585, 3668, 0, 0, 540, 540, 540, 3560, 540, 540, 540, 540, 540, 540, 540, 540, 3568, 561, 321, 321, 371, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1161, 0, 0, 0, 0, 371, 0, 430, 436, 0, 442, 451, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 490, 490, 501, 490, 490, 490, 490, 490, 490, 490, 490, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 544, 566, 544, 566, 544, 544, 566, 544, 590, 566, 566, 566, 566, 566, 566, 566, 590, 590, 590, 544, 590, 590, 590, 590, 590, 566, 566, 544, 566, 590, 566, 590, 1, 12290, 3, 78112, 540, 540, 540, 874, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1822, 540, 1360, 585, 1017, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 540, 540, 561, 561, 1122, 0, 1124, 1125, 0, 0, 0, 1127, 1128, 0, 0, 0, 0, 0, 0, 0, 0, 1159168, 0, 1159168, 0, 0, 0, 0, 1159168, 0, 0, 1166, 1167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1634, 0, 0, 0, 1113, 0, 1253, 0, 0, 0, 0, 0, 1128, 0, 0, 0, 0, 0, 1236, 0, 0, 0, 0, 773, 774, 0, 0, 778, 779, 0, 675, 0, 0, 0, 0, 0, 0, 1598, 0, 0, 0, 0, 0, 0, 0, 0, 1605, 0, 0, 1268, 1127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 1277, 540, 540, 540, 1323, 540, 540, 1325, 540, 540, 1328, 540, 540, 540, 540, 540, 540, 540, 540, 2554, 540, 540, 540, 540, 540, 540, 2560, 1360, 914, 561, 561, 1365, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1400, 561, 561, 561, 561, 561, 561, 1404, 561, 561, 561, 561, 561, 561, 561, 1413, 561, 561, 1415, 561, 561, 0, 2648, 0, 0, 0, 0, 585, 585, 585, 585, 585, 585, 585, 2655, 561, 1419, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1874, 561, 561, 561, 1443, 561, 561, 561, 561, 561, 26027, 1360, 987, 585, 585, 1456, 585, 585, 0, 0, 3291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1262, 0, 0, 0, 1266, 585, 585, 585, 1504, 585, 585, 1506, 585, 585, 585, 1510, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 540, 2020, 561, 561, 0, 0, 0, 1657, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1675, 0, 0, 0, 585, 1991, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2695, 561, 2024, 585, 585, 585, 2028, 0, 2029, 0, 0, 0, 0, 0, 2031, 0, 0, 0, 0, 0, 2502, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1586, 1587, 0, 0, 0, 0, 0, 0, 0, 2033, 0, 0, 0, 0, 0, 2035, 0, 0, 0, 0, 0, 2038, 0, 0, 2077, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1177, 0, 0, 0, 0, 0, 0, 2091, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 2807, 540, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 2252, 561, 561, 561, 561, 561, 1447, 561, 561, 26027, 1360, 987, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 2017, 540, 540, 540, 2021, 561, 2256, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1875, 2272, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1890, 561, 561, 561, 2314, 561, 2316, 561, 561, 561, 561, 561, 561, 561, 0, 0, 0, 0, 0, 0, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2340, 585, 585, 585, 2399, 585, 2401, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 561, 561, 540, 540, 2564, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3212, 540, 0, 0, 0, 561, 561, 561, 561, 2588, 561, 561, 561, 561, 561, 561, 561, 561, 1916, 561, 26027, 0, 585, 585, 585, 585, 0, 2757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 735, 0, 2834, 540, 540, 540, 540, 540, 540, 540, 2840, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2571, 540, 540, 540, 540, 540, 540, 2882, 561, 561, 561, 561, 561, 561, 561, 2888, 561, 561, 561, 561, 561, 561, 561, 0, 0, 585, 585, 585, 2902, 585, 585, 585, 2930, 585, 585, 585, 585, 585, 585, 585, 2936, 585, 585, 585, 585, 585, 585, 585, 561, 540, 2714, 585, 561, 540, 540, 540, 540, 540, 540, 3226, 540, 540, 540, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3074, 585, 585, 585, 585, 3282, 585, 585, 585, 561, 540, 585, 561, 540, 540, 561, 561, 585, 585, 0, 0, 3156, 0, 585, 585, 3369, 540, 540, 561, 561, 585, 585, 0, 0, 0, 0, 0, 0, 0, 0, 2617344, 0, 0, 0, 0, 0, 2789376, 0, 0, 0, 0, 0, 3176, 0, 0, 0, 3445, 0, 0, 0, 0, 540, 540, 540, 540, 3027, 540, 540, 540, 540, 3031, 540, 540, 540, 540, 540, 540, 3456, 540, 540, 540, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 3524, 561, 561, 561, 561, 3471, 561, 561, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3486, 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 3626, 540, 540, 540, 3515, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3413, 561, 561, 3528, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3113, 585, 585, 585, 3541, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 208896, 0, 0, 0, 0, 323, 324, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1194, 1196, 0, 0, 0, 0, 322, 370, 325, 369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 0, 0, 0, 322, 0, 0, 369, 369, 399, 0, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233472, 0, 0, 0, 0, 0, 0, 0, 0, 0, 324, 0, 0, 0, 322, 452, 465, 465, 465, 465, 465, 465, 465, 478, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 491, 491, 465, 491, 491, 506, 508, 491, 491, 506, 491, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 534, 517, 517, 517, 517, 517, 545, 567, 545, 567, 545, 545, 567, 545, 591, 567, 567, 567, 567, 567, 567, 567, 591, 591, 591, 545, 591, 591, 591, 591, 591, 567, 567, 545, 567, 591, 567, 591, 1, 12290, 3, 78112, 659, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 670, 671, 0, 0, 0, 0, 0, 439, 0, 0, 0, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 557, 580, 557, 580, 557, 557, 580, 557, 604, 0, 0, 707, 708, 0, 0, 0, 0, 0, 714, 0, 0, 0, 718, 0, 720, 0, 769, 770, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1209, 0, 0, 787, 0, 789, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1224, 0, 0, 0, 801, 0, 806, 0, 809, 0, 0, 0, 0, 806, 809, 0, 0, 0, 809, 0, 707, 0, 0, 826, 0, 0, 0, 0, 0, 826, 826, 829, 809, 806, 0, 0, 0, 0, 0, 0, 0, 789, 0, 801, 0, 818, 0, 0, 0, 0, 0, 2745, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 811, 540, 540, 854, 540, 540, 0, 0, 0, 789, 0, 0, 0, 0, 0, 838, 0, 0, 0, 0, 0, 0, 0, 2142, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2819, 540, 540, 540, 540, 540, 0, 0, 0, 787, 0, 0, 0, 838, 818, 838, 0, 540, 540, 852, 540, 858, 540, 540, 871, 540, 881, 540, 886, 540, 540, 893, 896, 901, 540, 909, 540, 540, 540, 540, 540, 3215, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 895, 540, 540, 540, 540, 540, 561, 561, 561, 922, 561, 928, 561, 561, 941, 561, 561, 952, 561, 957, 561, 561, 0, 2648, 0, 0, 0, 0, 585, 585, 585, 585, 585, 2653, 585, 585, 0, 0, 2959, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2965, 0, 965, 968, 973, 561, 981, 561, 561, 0, 585, 585, 585, 995, 585, 1001, 585, 585, 0, 2958, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 131072, 0, 0, 1014, 585, 585, 1025, 585, 1030, 585, 585, 1038, 1041, 1046, 585, 1054, 585, 585, 968, 0, 0, 0, 540, 585, 585, 561, 852, 540, 1066, 901, 540, 922, 561, 1071, 973, 0, 0, 0, 1110, 0, 0, 0, 0, 0, 0, 0, 1117, 0, 0, 0, 0, 0, 0, 775, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1205, 0, 0, 0, 0, 0, 0, 0, 1137, 1138, 0, 0, 0, 0, 1142, 0, 0, 0, 362, 362, 0, 0, 0, 0, 0, 664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1206, 0, 0, 0, 0, 0, 0, 1165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 784, 0, 0, 0, 1182, 741, 0, 0, 0, 1134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245760, 0, 0, 0, 0, 0, 0, 1303, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1318, 540, 540, 540, 540, 2173, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2558, 540, 540, 540, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1372, 561, 561, 561, 561, 561, 1850, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1902, 1903, 561, 561, 561, 561, 561, 561, 1387, 561, 561, 561, 1392, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1432, 561, 561, 561, 561, 561, 1439, 561, 561, 561, 1421, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1437, 561, 0, 585, 585, 585, 1049, 585, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 836, 0, 0, 0, 0, 0, 0, 811, 0, 585, 585, 585, 585, 1463, 585, 585, 585, 585, 585, 585, 1478, 585, 585, 585, 1483, 0, 0, 1608, 1609, 1610, 0, 1612, 1613, 0, 0, 0, 0, 1618, 0, 0, 0, 0, 0, 679, 751, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2144, 0, 0, 1640, 0, 0, 1643, 0, 1645, 0, 0, 0, 0, 0, 1651, 1652, 0, 0, 0, 0, 785, 0, 0, 0, 0, 0, 0, 540, 846, 540, 540, 540, 540, 540, 540, 3216, 540, 540, 540, 540, 540, 3221, 540, 3223, 540, 0, 1668, 0, 0, 1670, 0, 0, 0, 0, 1672, 1673, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 347, 345, 65536, 0, 1692, 0, 0, 0, 0, 0, 1698, 1699, 0, 1701, 1702, 1703, 0, 0, 0, 0, 0, 0, 810, 811, 0, 0, 0, 0, 811, 0, 0, 0, 1719, 0, 0, 0, 1723, 1724, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 346, 0, 0, 0, 0, 0, 0, 0, 1715, 0, 0, 0, 1735, 1585, 1585, 1737, 540, 1739, 540, 1740, 540, 1742, 540, 540, 540, 1746, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1759, 540, 540, 540, 540, 540, 3318, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2557, 540, 540, 540, 540, 540, 540, 1763, 540, 540, 540, 540, 1767, 540, 1769, 540, 540, 540, 540, 540, 540, 540, 540, 2570, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3041, 540, 540, 540, 540, 540, 540, 540, 540, 1777, 1778, 1780, 540, 540, 540, 540, 540, 540, 1787, 1788, 540, 540, 1791, 1792, 540, 540, 540, 540, 540, 540, 540, 1800, 540, 540, 540, 1804, 540, 540, 540, 540, 540, 540, 2829, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1770, 540, 540, 540, 540, 540, 0, 1828, 561, 1830, 561, 561, 1832, 561, 1834, 561, 561, 561, 1838, 561, 561, 561, 561, 585, 585, 585, 585, 0, 0, 2725, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 135168, 135168, 0, 0, 65536, 135168, 1859, 561, 1861, 561, 561, 561, 561, 561, 561, 561, 561, 1869, 1870, 1872, 561, 561, 0, 2648, 0, 0, 0, 0, 585, 585, 585, 585, 2652, 585, 585, 585, 585, 585, 585, 2390, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3124, 585, 585, 585, 585, 585, 561, 561, 561, 1894, 561, 561, 561, 1898, 561, 561, 561, 561, 561, 561, 561, 1906, 585, 1926, 585, 1928, 585, 585, 585, 1932, 585, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585, 561, 540, 540, 561, 561, 585, 585, 0, 0, 0, 0, 585, 1945, 585, 585, 585, 585, 1949, 585, 585, 585, 585, 1953, 585, 1955, 585, 585, 561, 3146, 3147, 3148, 540, 540, 561, 561, 585, 585, 0, 0, 0, 0, 0, 0, 2488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2096, 0, 0, 0, 0, 0, 0, 1974, 1975, 1976, 585, 585, 1979, 1980, 585, 585, 585, 585, 585, 585, 585, 1988, 585, 561, 0, 1288, 585, 1468, 1377, 540, 540, 540, 1549, 540, 561, 561, 561, 1553, 585, 585, 1992, 585, 585, 585, 585, 585, 585, 585, 2000, 585, 585, 585, 585, 585, 561, 561, 540, 561, 585, 561, 585, 1, 12290, 3, 78112, 585, 585, 585, 585, 2011, 561, 540, 2014, 585, 561, 1792, 540, 2019, 540, 1886, 561, 0, 585, 585, 1040, 585, 585, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 1134592, 0, 0, 0, 0, 2023, 561, 1980, 585, 2027, 585, 0, 2029, 0, 0, 0, 0, 0, 2031, 0, 0, 0, 0, 0, 2761, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 661, 0, 0, 0, 0, 0, 0, 2089, 0, 0, 0, 0, 2093, 0, 0, 0, 0, 0, 0, 0, 0, 0, 377, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2119, 0, 2121, 0, 0, 0, 0, 0, 0, 0, 2129, 0, 0, 0, 0, 786, 0, 805, 0, 0, 0, 0, 540, 849, 540, 540, 540, 540, 540, 2216, 540, 540, 540, 540, 540, 540, 2221, 540, 540, 540, 540, 540, 540, 3633, 561, 561, 561, 561, 561, 561, 3639, 585, 585, 0, 0, 0, 2134, 0, 0, 0, 0, 2139, 0, 0, 0, 0, 0, 0, 0, 0, 2990080, 2179072, 2179072, 2502656, 2179072, 2179072, 2179072, 2179072, 540, 2187, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1337, 540, 2211, 2212, 540, 540, 540, 540, 540, 540, 2219, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2582, 540, 540, 540, 0, 0, 0, 561, 561, 2258, 561, 2260, 561, 561, 561, 561, 561, 561, 2268, 561, 2270, 561, 561, 561, 561, 1426, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3343, 561, 561, 561, 561, 3344, 3345, 561, 561, 2343, 585, 2345, 585, 585, 585, 585, 585, 585, 2353, 585, 2355, 585, 585, 585, 585, 561, 0, 0, 0, 3648, 0, 540, 540, 540, 540, 3652, 540, 585, 585, 585, 585, 2389, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2705, 585, 585, 585, 585, 585, 585, 585, 2402, 585, 585, 2405, 2406, 585, 585, 561, 2177, 585, 2345, 2260, 540, 2414, 540, 540, 561, 2418, 561, 561, 585, 2422, 585, 585, 2029, 0, 2031, 0, 0, 0, 0, 795, 663, 844, 0, 0, 0, 0, 540, 848, 540, 540, 540, 540, 540, 1283, 540, 540, 540, 540, 540, 540, 1298, 540, 540, 540, 540, 540, 540, 2580, 540, 540, 540, 540, 540, 540, 0, 2584, 0, 0, 0, 2450, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1239, 0, 0, 0, 2459, 0, 0, 0, 0, 0, 2464, 0, 2466, 2467, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 371, 0, 65536, 0, 0, 2498, 0, 0, 0, 0, 0, 0, 0, 2505, 0, 0, 0, 0, 0, 0, 0, 2479, 0, 0, 0, 2481, 0, 0, 0, 0, 2561, 540, 540, 540, 2566, 540, 540, 540, 540, 540, 540, 540, 2573, 540, 540, 540, 540, 540, 540, 2838, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1296, 540, 540, 540, 540, 540, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 2591, 561, 561, 561, 561, 561, 561, 2640, 561, 561, 561, 2643, 561, 561, 561, 561, 561, 561, 2886, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1867, 561, 561, 561, 561, 561, 561, 2621, 561, 561, 561, 561, 2625, 561, 561, 561, 2630, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 0, 3661, 0, 0, 561, 2637, 561, 561, 561, 561, 561, 561, 561, 2642, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3427, 585, 2669, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3267, 2797, 2798, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 1741, 540, 0, 0, 2982, 2983, 0, 2984, 0, 2986, 0, 0, 0, 0, 2988, 0, 0, 0, 0, 0, 680, 681, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2047, 0, 0, 0, 0, 0, 0, 0, 0, 3007, 0, 0, 2988, 0, 0, 3013, 3014, 0, 3016, 0, 0, 3019, 0, 0, 0, 0, 800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 800, 0, 0, 0, 0, 3022, 540, 540, 540, 540, 540, 540, 3029, 540, 540, 540, 540, 540, 3033, 3062, 540, 561, 561, 561, 561, 561, 561, 3069, 561, 561, 561, 561, 561, 3073, 561, 0, 585, 585, 1042, 585, 585, 288, 1079, 0, 0, 1082, 1086, 0, 0, 1090, 3103, 561, 585, 585, 585, 585, 585, 585, 3110, 585, 585, 585, 585, 585, 3114, 585, 561, 0, 1543, 585, 1545, 1546, 540, 540, 1548, 540, 540, 561, 561, 1552, 561, 0, 585, 585, 1044, 585, 585, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 794, 0, 0, 0, 0, 0, 0, 0, 798, 3144, 585, 561, 540, 585, 561, 540, 3150, 561, 3152, 585, 3154, 0, 0, 0, 0, 0, 0, 825, 0, 819, 0, 664, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 221184, 0, 0, 0, 0, 65536, 0, 0, 0, 3160, 0, 0, 3163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 396, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 2806, 540, 540, 540, 3202, 540, 540, 540, 540, 540, 540, 540, 3207, 540, 540, 540, 540, 540, 540, 540, 540, 3040, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3322, 540, 540, 540, 540, 540, 540, 561, 3234, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1889, 561, 3245, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 585, 3257, 585, 585, 585, 585, 585, 585, 585, 3262, 585, 585, 585, 585, 585, 561, 2013, 585, 2015, 2016, 540, 2018, 540, 540, 561, 2022, 561, 561, 561, 3349, 561, 561, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2667, 0, 3378, 3379, 0, 3176, 0, 3383, 0, 0, 0, 0, 0, 0, 0, 0, 0, 384, 0, 0, 0, 0, 0, 384, 0, 0, 0, 3441, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 2167, 540, 540, 0, 0, 0, 0, 3503, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 3512, 0, 0, 3557, 3558, 3559, 540, 540, 540, 3562, 540, 3564, 540, 540, 540, 540, 3569, 3570, 3571, 561, 561, 561, 3574, 561, 3576, 561, 561, 561, 561, 3581, 3582, 3583, 585, 561, 1203, 540, 585, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 585, 585, 585, 585, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 585, 585, 3586, 585, 3588, 585, 585, 585, 585, 3593, 0, 0, 0, 0, 0, 0, 0, 2747, 2748, 2749, 0, 0, 0, 0, 0, 0, 0, 2763, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 1, 12290, 0, 0, 540, 3628, 540, 540, 540, 3632, 561, 561, 3634, 561, 561, 561, 3638, 585, 585, 3640, 585, 585, 585, 3644, 561, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 540, 3563, 540, 3565, 540, 540, 540, 561, 0, 0, 0, 326, 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 674, 0, 0, 0, 0, 0, 366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1120, 0, 0, 0, 0, 366, 0, 0, 0, 374, 376, 0, 0, 0, 0, 0, 0, 0, 344, 0, 402, 0, 0, 0, 0, 0, 402, 0, 0, 409, 0, 0, 0, 409, 69632, 73728, 0, 366, 366, 0, 421, 65536, 366, 0, 0, 366, 421, 498, 502, 498, 498, 507, 498, 498, 498, 507, 498, 421, 421, 327, 421, 0, 0, 421, 0, 421, 0, 0, 0, 0, 0, 0, 0, 372, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 546, 568, 546, 568, 546, 546, 568, 546, 592, 568, 568, 568, 568, 568, 568, 568, 592, 592, 592, 546, 592, 592, 592, 592, 592, 568, 568, 546, 568, 592, 568, 592, 1, 12290, 3, 78112, 0, 0, 677, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1248, 0, 0, 540, 540, 540, 875, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2183, 540, 540, 561, 561, 915, 561, 561, 561, 561, 561, 561, 945, 561, 561, 561, 561, 561, 561, 585, 3421, 585, 585, 3423, 585, 585, 585, 585, 585, 585, 1018, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 0, 540, 0, 0, 0, 540, 988, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 3068, 561, 561, 561, 561, 561, 561, 561, 561, 932, 561, 561, 946, 561, 561, 561, 561, 561, 561, 934, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3240, 561, 561, 561, 561, 561, 561, 0, 0, 1109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1604, 0, 0, 0, 0, 1229, 0, 1109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 686, 0, 0, 0, 0, 540, 540, 540, 1281, 540, 540, 540, 540, 540, 1293, 540, 540, 540, 540, 540, 540, 540, 540, 3054, 3056, 540, 540, 540, 3059, 540, 3061, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 1370, 561, 561, 561, 561, 561, 1382, 585, 585, 1461, 585, 585, 585, 585, 585, 1473, 585, 585, 585, 585, 585, 585, 585, 585, 2914, 585, 585, 585, 585, 585, 585, 585, 585, 3122, 585, 585, 585, 585, 585, 585, 585, 585, 3136, 3138, 585, 585, 585, 3141, 585, 3143, 0, 1720, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134, 0, 1990, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1972, 585, 585, 585, 2373, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2370, 585, 585, 585, 585, 2698, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2383, 585, 0, 0, 0, 3161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1688, 0, 0, 0, 561, 561, 3235, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, 2325, 0, 3663, 540, 540, 540, 3665, 561, 561, 561, 3667, 585, 585, 585, 0, 0, 540, 540, 540, 2526, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3058, 540, 540, 540, 422, 422, 0, 422, 431, 0, 422, 0, 422, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 492, 492, 466, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 547, 569, 547, 569, 547, 547, 569, 547, 593, 569, 569, 569, 569, 569, 569, 569, 593, 593, 593, 547, 593, 593, 593, 593, 593, 569, 569, 547, 569, 593, 569, 593, 1, 12290, 3, 78112, 0, 0, 0, 0, 2159, 0, 0, 0, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3032, 540, 540, 540, 540, 540, 2202, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2208, 540, 540, 2413, 540, 540, 540, 2417, 561, 561, 561, 2421, 585, 585, 585, 0, 0, 0, 0, 3293, 0, 0, 0, 0, 0, 3296, 0, 0, 0, 2458, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1250, 2967, 0, 0, 0, 2971, 0, 0, 0, 0, 0, 2977, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 418, 0, 65536, 0, 0, 2992, 0, 0, 2995, 0, 0, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 367, 367, 0, 0, 65536, 367, 0, 0, 0, 3023, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2222, 540, 540, 540, 540, 3049, 540, 540, 540, 540, 540, 540, 540, 540, 3057, 540, 540, 3060, 540, 540, 540, 540, 2189, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2583, 0, 0, 0, 540, 540, 3063, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, 2326, 0, 561, 561, 3090, 561, 561, 561, 561, 561, 561, 561, 561, 3098, 561, 561, 3101, 561, 0, 585, 585, 1045, 585, 585, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 1102, 1101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 1275, 540, 561, 561, 3104, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2666, 585, 585, 585, 3131, 585, 585, 585, 585, 585, 585, 585, 585, 3139, 585, 585, 3142, 585, 585, 585, 585, 585, 1930, 585, 585, 585, 585, 585, 585, 585, 585, 1941, 585, 585, 585, 585, 585, 1948, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3263, 585, 585, 585, 585, 0, 0, 0, 0, 3179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 732, 0, 0, 0, 0, 0, 0, 3192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 2808, 3201, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1359, 540, 3213, 540, 540, 540, 540, 540, 540, 540, 3218, 540, 3220, 540, 540, 540, 540, 540, 540, 561, 3227, 561, 561, 561, 3230, 561, 561, 561, 561, 561, 982, 561, 0, 585, 585, 585, 585, 999, 585, 585, 585, 561, 561, 3246, 561, 3248, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 3537, 585, 585, 585, 585, 3256, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3278, 585, 585, 3268, 585, 585, 585, 585, 585, 585, 585, 585, 3274, 585, 3276, 585, 585, 561, 3370, 540, 3371, 561, 3372, 585, 0, 0, 0, 0, 0, 0, 0, 785, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1179, 540, 540, 3328, 540, 540, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3233, 561, 561, 561, 561, 3340, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3346, 561, 0, 994, 1075, 1039, 585, 585, 78112, 1079, 0, 0, 1081, 1085, 0, 0, 1089, 3358, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3364, 585, 585, 585, 585, 585, 585, 585, 1981, 1982, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 2951, 540, 2953, 561, 561, 561, 3654, 3655, 561, 561, 585, 585, 3658, 3659, 585, 585, 0, 0, 0, 0, 0, 0, 1126, 0, 0, 0, 1130, 1131, 0, 0, 0, 0, 0, 0, 1141, 0, 1143, 0, 0, 362, 362, 0, 0, 0, 691, 0, 0, 0, 0, 696, 0, 0, 0, 362, 362, 362, 0, 0, 0, 0, 0, 0, 1154, 0, 0, 0, 0, 0, 1160, 0, 1162, 0, 758, 0, 0, 0, 0, 0, 0, 758, 0, 0, 0, 0, 0, 758, 758, 0, 0, 0, 0, 803, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 758, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 856, 585, 999, 926, 540, 540, 540, 540, 910, 561, 561, 561, 561, 561, 1880, 1881, 1882, 561, 561, 1885, 1886, 561, 561, 561, 561, 561, 1896, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2603, 561, 2605, 561, 561, 561, 982, 0, 585, 585, 585, 585, 1055, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 375, 0, 378, 0, 0, 0, 378, 0, 0, 0, 0, 1709, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1619, 0, 0, 585, 585, 585, 2010, 585, 561, 540, 585, 585, 561, 540, 540, 540, 540, 561, 561, 561, 3066, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2600, 561, 561, 561, 561, 561, 561, 561, 561, 0, 0, 987, 585, 585, 585, 585, 585, 0, 2039, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1178, 0, 540, 540, 540, 2172, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2238, 2584, 0, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2255, 0, 0, 0, 0, 2461, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 747, 0, 0, 0, 0, 3288, 585, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1184, 1184, 561, 561, 561, 561, 3350, 561, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2939, 585, 585, 585, 585, 3368, 585, 561, 540, 540, 561, 561, 585, 585, 0, 0, 0, 0, 0, 0, 0, 394, 0, 0, 0, 0, 0, 394, 0, 0, 467, 467, 485, 493, 493, 485, 493, 493, 493, 493, 493, 493, 493, 493, 518, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 535, 526, 526, 526, 526, 526, 548, 570, 548, 570, 548, 548, 570, 548, 594, 570, 570, 570, 570, 570, 570, 570, 594, 594, 594, 548, 594, 594, 594, 594, 594, 570, 570, 548, 570, 594, 570, 594, 1, 12290, 3, 78112, 767, 0, 0, 771, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1704, 0, 0, 0, 821, 0, 0, 0, 798, 0, 0, 821, 0, 0, 0, 0, 0, 821, 821, 0, 0, 0, 0, 805, 0, 0, 786, 0, 0, 0, 0, 805, 0, 0, 0, 0, 0, 0, 0, 805, 0, 0, 0, 0, 0, 798, 0, 0, 0, 0, 0, 0, 839, 794, 0, 0, 839, 0, 0, 0, 0, 808, 0, 0, 692, 0, 0, 672, 0, 692, 0, 813, 675, 676, 0, 0, 0, 0, 0, 682, 0, 0, 0, 0, 0, 0, 0, 0, 340, 0, 0, 0, 0, 0, 0, 0, 540, 867, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 911, 540, 540, 540, 540, 2215, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1756, 540, 540, 540, 540, 983, 0, 585, 585, 585, 1077, 1056, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 412, 412, 0, 0, 0, 0, 0, 412, 0, 1180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1621, 0, 0, 1241, 0, 0, 0, 0, 0, 0, 0, 0, 1246, 0, 0, 0, 0, 0, 0, 1170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 816, 0, 0, 0, 0, 0, 0, 540, 1305, 540, 540, 540, 540, 540, 540, 540, 1313, 540, 540, 540, 540, 540, 540, 540, 540, 3332, 540, 561, 561, 561, 561, 561, 561, 935, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3094, 561, 3096, 561, 561, 561, 561, 561, 561, 1340, 540, 540, 1344, 540, 540, 540, 540, 540, 1350, 540, 540, 540, 1357, 540, 540, 540, 540, 540, 3458, 540, 3460, 3461, 540, 3463, 540, 561, 561, 561, 561, 561, 2262, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1399, 561, 561, 561, 561, 561, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1375, 561, 561, 561, 561, 1848, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2868, 561, 561, 561, 561, 561, 1441, 561, 561, 561, 1448, 561, 561, 26027, 1360, 987, 585, 585, 585, 585, 585, 585, 585, 1998, 585, 585, 585, 585, 585, 2003, 585, 585, 1485, 585, 585, 585, 585, 585, 585, 585, 1493, 585, 585, 585, 585, 585, 585, 585, 585, 3261, 585, 585, 585, 585, 585, 585, 585, 585, 3272, 585, 585, 585, 585, 585, 585, 585, 585, 3283, 540, 585, 561, 540, 540, 561, 561, 585, 1522, 585, 585, 1526, 585, 585, 585, 585, 585, 1532, 585, 585, 585, 1539, 585, 585, 585, 585, 585, 1996, 1997, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1531, 585, 585, 585, 585, 585, 585, 0, 0, 0, 1595, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1716, 0, 0, 0, 0, 0, 1656, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1665, 0, 0, 0, 0, 0, 710, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 1708, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1653, 0, 0, 0, 1722, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1729, 0, 0, 0, 0, 0, 0, 1706, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3398, 540, 3400, 540, 561, 561, 1893, 561, 561, 561, 561, 561, 561, 1901, 561, 561, 561, 561, 561, 561, 1410, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1428, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1917, 26027, 0, 1922, 585, 1924, 585, 561, 561, 561, 1910, 1912, 561, 561, 561, 561, 561, 26027, 0, 585, 585, 585, 585, 585, 585, 2335, 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 3622, 0, 3624, 0, 0, 540, 585, 585, 585, 585, 1978, 585, 585, 585, 585, 585, 585, 585, 585, 1987, 585, 585, 585, 585, 585, 585, 2934, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2407, 561, 540, 585, 585, 561, 585, 585, 585, 585, 1995, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2004, 2006, 0, 0, 0, 2078, 0, 0, 0, 2081, 0, 0, 0, 0, 0, 2087, 0, 0, 0, 0, 0, 2774, 0, 0, 0, 2778, 0, 2780, 0, 0, 0, 0, 0, 0, 2746, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 362, 0, 0, 0, 0, 0, 2103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1265, 0, 0, 0, 0, 561, 561, 561, 561, 561, 2249, 561, 561, 561, 561, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1519, 585, 585, 2346, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2919, 585, 2448, 0, 0, 0, 0, 0, 0, 0, 0, 2453, 0, 0, 2456, 0, 0, 0, 0, 0, 726, 0, 0, 0, 0, 0, 0, 0, 0, 0, 736, 0, 0, 0, 2460, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2471, 0, 0, 0, 2485, 2486, 0, 0, 2489, 0, 0, 2492, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 417, 417, 0, 0, 65536, 417, 0, 0, 2499, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2510, 0, 0, 0, 0, 815, 0, 812, 795, 0, 0, 817, 0, 667, 0, 791, 0, 0, 0, 0, 1096, 0, 0, 1098, 0, 0, 0, 0, 0, 0, 0, 0, 827, 0, 0, 0, 0, 0, 0, 0, 0, 540, 2524, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1789, 540, 540, 540, 540, 540, 2551, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2559, 540, 540, 2562, 540, 540, 540, 540, 540, 540, 2569, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3323, 540, 540, 540, 540, 540, 540, 2576, 540, 540, 540, 2579, 540, 540, 540, 540, 540, 540, 540, 0, 0, 0, 0, 0, 755, 0, 0, 0, 0, 0, 0, 0, 0, 765, 0, 0, 0, 0, 561, 2586, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3254, 561, 561, 561, 585, 585, 585, 585, 585, 2672, 585, 585, 585, 585, 585, 585, 2677, 585, 585, 585, 585, 561, 0, 3646, 0, 0, 0, 540, 540, 540, 540, 540, 540, 2529, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2842, 540, 540, 540, 540, 540, 585, 585, 585, 2683, 585, 585, 585, 585, 585, 585, 2690, 585, 585, 585, 585, 585, 585, 585, 2351, 585, 585, 585, 585, 585, 585, 585, 585, 1508, 585, 585, 585, 585, 585, 585, 585, 585, 2697, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2704, 585, 585, 585, 2707, 0, 0, 0, 0, 2735, 0, 0, 0, 0, 0, 0, 0, 2739, 0, 0, 0, 0, 0, 799, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 2528, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2234, 540, 540, 540, 540, 0, 540, 540, 540, 2811, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2821, 540, 540, 540, 540, 540, 2836, 540, 540, 540, 2839, 540, 2841, 540, 540, 540, 540, 540, 540, 540, 540, 3520, 561, 561, 561, 561, 561, 561, 561, 1450, 26027, 1360, 987, 585, 585, 585, 585, 585, 2845, 540, 540, 540, 540, 540, 540, 0, 0, 561, 561, 2853, 561, 561, 561, 561, 561, 1913, 561, 561, 561, 561, 26027, 0, 585, 585, 585, 585, 2333, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1050, 585, 585, 585, 585, 561, 561, 2858, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2284, 561, 561, 561, 2874, 2875, 561, 561, 561, 561, 2878, 561, 561, 561, 561, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 1005, 585, 561, 561, 561, 2884, 561, 561, 561, 2887, 561, 2889, 561, 561, 561, 561, 561, 561, 1449, 561, 26027, 1360, 987, 1453, 585, 585, 585, 585, 2893, 561, 561, 561, 561, 561, 561, 0, 0, 585, 585, 2901, 585, 585, 585, 585, 585, 585, 585, 3121, 585, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585, 561, 540, 3285, 561, 3287, 585, 2906, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3367, 585, 585, 2922, 2923, 585, 585, 585, 585, 2926, 585, 585, 585, 585, 585, 585, 585, 585, 3592, 561, 0, 0, 0, 0, 3595, 0, 585, 585, 585, 2932, 585, 585, 585, 2935, 585, 2937, 585, 585, 585, 585, 585, 585, 585, 1933, 585, 585, 585, 585, 1939, 585, 585, 585, 2941, 585, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 561, 561, 585, 585, 0, 0, 0, 0, 0, 0, 0, 0, 2963, 0, 0, 0, 0, 0, 585, 585, 2957, 0, 0, 2960, 2961, 0, 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, 662, 0, 0, 0, 0, 0, 0, 0, 0, 3009, 0, 0, 3012, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2200253, 151552, 2200253, 0, 0, 0, 151552, 540, 540, 540, 540, 3037, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3325, 540, 540, 540, 540, 540, 540, 540, 3051, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3465, 561, 561, 561, 561, 561, 561, 3077, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1887, 1888, 561, 561, 561, 561, 561, 561, 3092, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3480, 585, 585, 585, 585, 561, 561, 585, 585, 585, 585, 3108, 585, 585, 585, 585, 3112, 585, 585, 585, 585, 585, 585, 585, 3135, 585, 3137, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 3552, 0, 0, 0, 585, 585, 585, 3118, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1512, 585, 585, 585, 585, 585, 585, 585, 3133, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2917, 585, 585, 2920, 0, 0, 3168, 3169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2071, 0, 0, 0, 540, 540, 540, 540, 3329, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3412, 561, 561, 3336, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2285, 3347, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 3354, 585, 585, 585, 585, 585, 585, 2404, 585, 585, 585, 585, 561, 2178, 585, 2346, 2261, 3389, 0, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2534, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 3447, 3448, 0, 540, 540, 540, 540, 2527, 540, 540, 540, 540, 2531, 540, 540, 540, 540, 540, 540, 540, 1312, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1784, 540, 540, 540, 540, 540, 540, 561, 561, 561, 561, 3473, 561, 3475, 3476, 561, 3478, 561, 585, 585, 585, 585, 585, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254413, 0, 0, 0, 0, 0, 585, 585, 585, 3488, 585, 3490, 3491, 585, 3493, 585, 3495, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 313, 314, 314, 419, 420, 65536, 427, 585, 585, 3617, 585, 3618, 585, 585, 585, 561, 0, 0, 0, 0, 0, 0, 540, 585, 585, 561, 540, 540, 540, 904, 540, 561, 561, 561, 976, 561, 561, 585, 585, 3673, 3674, 3675, 3676, 0, 540, 561, 585, 0, 540, 561, 585, 585, 585, 585, 585, 1079, 0, 0, 1563, 0, 0, 0, 1569, 0, 0, 0, 0, 0, 2789, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1591, 0, 0, 0, 0, 0, 571, 571, 571, 571, 571, 571, 571, 595, 595, 595, 540, 595, 595, 595, 595, 595, 571, 571, 540, 571, 595, 571, 595, 1, 12290, 3, 78112, 737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1707, 0, 0, 2040, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1635, 0, 0, 2170, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1360, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2253, 561, 561, 561, 561, 926, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2307, 561, 561, 561, 2310, 400, 0, 0, 0, 0, 378, 0, 69632, 73728, 0, 0, 0, 0, 423, 65536, 0, 0, 0, 0, 1111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1687, 0, 1689, 0, 0, 423, 423, 0, 423, 0, 437, 423, 0, 423, 468, 468, 468, 475, 468, 468, 468, 468, 468, 468, 468, 468, 475, 468, 468, 468, 468, 468, 468, 468, 468, 482, 468, 494, 494, 468, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 537, 549, 572, 549, 572, 549, 549, 572, 549, 596, 572, 572, 572, 572, 572, 572, 572, 596, 596, 596, 549, 596, 596, 596, 596, 596, 572, 572, 549, 572, 596, 572, 596, 1, 12290, 3, 78112, 0, 660, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1666, 0, 0, 830, 0, 0, 0, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 729, 0, 742, 661, 0, 0, 0, 0, 0, 540, 847, 540, 540, 540, 540, 540, 540, 3330, 540, 540, 540, 561, 561, 561, 561, 561, 3335, 861, 540, 540, 540, 540, 540, 540, 540, 540, 540, 897, 540, 540, 540, 540, 540, 540, 540, 1799, 540, 540, 540, 540, 540, 540, 1807, 540, 561, 561, 916, 561, 561, 561, 931, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2266, 561, 561, 561, 561, 561, 561, 0, 0, 0, 540, 989, 585, 561, 540, 540, 897, 540, 540, 561, 561, 969, 561, 561, 561, 561, 561, 0, 585, 585, 989, 585, 585, 585, 1004, 585, 1094, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1101, 1102, 0, 0, 0, 0, 0, 0, 1203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196608, 0, 0, 0, 0, 0, 540, 540, 540, 1308, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3222, 540, 540, 1360, 914, 561, 1363, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1376, 1383, 561, 561, 561, 1444, 561, 561, 561, 561, 26027, 1360, 987, 585, 1454, 585, 585, 585, 585, 585, 585, 2659, 585, 585, 2662, 2663, 585, 585, 585, 585, 585, 585, 585, 2712, 540, 585, 585, 561, 540, 540, 540, 540, 585, 585, 1488, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3128, 585, 1521, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1535, 585, 585, 585, 585, 585, 585, 2673, 585, 585, 585, 2676, 585, 585, 2678, 585, 2679, 561, 585, 585, 1521, 585, 585, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 759, 0, 0, 0, 0, 0, 0, 1826, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1841, 1842, 585, 585, 2009, 585, 585, 561, 540, 585, 585, 561, 540, 540, 540, 540, 561, 561, 561, 561, 1849, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2880, 561, 561, 561, 561, 561, 2063, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2074, 540, 540, 2226, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 0, 0, 561, 561, 561, 2854, 561, 561, 561, 561, 561, 561, 2301, 561, 561, 561, 561, 561, 561, 2306, 561, 561, 561, 561, 561, 561, 3079, 561, 561, 561, 561, 561, 3085, 561, 561, 3088, 2311, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, 0, 0, 0, 0, 0, 585, 585, 585, 585, 585, 585, 2654, 585, 585, 585, 585, 585, 2374, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3140, 585, 585, 585, 585, 2386, 585, 585, 585, 585, 585, 585, 2391, 585, 585, 585, 585, 585, 2396, 585, 585, 585, 585, 585, 2012, 540, 585, 585, 561, 540, 540, 540, 540, 561, 561, 561, 561, 2624, 561, 561, 561, 561, 561, 561, 2632, 561, 561, 561, 561, 561, 2288, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2631, 561, 561, 561, 561, 561, 2435, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2114, 0, 0, 0, 0, 2476, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 748, 0, 0, 0, 0, 0, 2732, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1590, 1591, 0, 0, 0, 2772, 0, 0, 0, 0, 2777, 0, 0, 0, 0, 0, 0, 0, 540, 562, 540, 562, 540, 540, 562, 540, 586, 540, 540, 2810, 540, 540, 540, 540, 540, 540, 2818, 540, 540, 540, 540, 540, 540, 540, 889, 540, 540, 540, 540, 907, 540, 540, 540, 540, 540, 540, 540, 2849, 540, 540, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1836, 561, 561, 561, 561, 561, 2857, 561, 561, 561, 561, 561, 561, 2865, 561, 561, 561, 561, 561, 561, 561, 561, 3081, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2897, 561, 561, 0, 0, 585, 585, 585, 585, 585, 585, 585, 1467, 1474, 585, 585, 585, 585, 585, 585, 585, 585, 3621, 0, 0, 0, 0, 0, 0, 540, 2905, 585, 585, 585, 585, 585, 585, 2913, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1983, 585, 585, 1986, 585, 585, 585, 585, 585, 585, 585, 2945, 585, 585, 561, 540, 585, 585, 561, 540, 540, 561, 561, 585, 585, 0, 0, 0, 0, 0, 3376, 0, 585, 3280, 585, 585, 585, 585, 585, 585, 561, 540, 585, 561, 540, 540, 561, 561, 585, 585, 0, 3155, 0, 0, 585, 585, 585, 3587, 585, 3589, 585, 585, 585, 561, 0, 0, 0, 0, 0, 0, 0, 2791, 0, 0, 0, 2793, 0, 0, 0, 0, 0, 0, 0, 0, 3600, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1314, 540, 540, 540, 540, 3607, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3614, 585, 585, 585, 585, 585, 585, 2686, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1045, 585, 585, 585, 585, 585, 972, 561, 3653, 561, 561, 561, 561, 585, 3657, 585, 585, 585, 585, 0, 0, 0, 0, 0, 0, 1204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 290, 0, 0, 0, 345, 469, 469, 469, 453, 453, 469, 453, 453, 453, 453, 453, 453, 453, 453, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 550, 573, 550, 573, 550, 550, 573, 550, 597, 573, 573, 573, 573, 573, 573, 573, 597, 597, 597, 550, 597, 597, 597, 597, 597, 573, 573, 550, 573, 597, 573, 597, 1, 12290, 3, 78112, 862, 540, 540, 876, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1315, 540, 540, 540, 585, 1019, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 3498, 0, 0, 1123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1607, 0, 0, 0, 0, 1254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2111, 0, 0, 0, 540, 1341, 540, 540, 540, 540, 540, 1348, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3333, 561, 561, 561, 561, 561, 585, 585, 585, 585, 1505, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3365, 585, 585, 585, 585, 585, 1523, 585, 585, 585, 585, 585, 1530, 585, 585, 585, 585, 585, 585, 585, 1468, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2378, 585, 585, 585, 585, 585, 585, 561, 585, 585, 585, 1557, 585, 1079, 0, 1561, 0, 0, 0, 1567, 0, 0, 0, 0, 0, 803, 0, 0, 0, 0, 0, 0, 0, 803, 0, 0, 0, 0, 540, 540, 540, 540, 540, 1573, 0, 0, 0, 1579, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 749, 0, 0, 0, 0, 0, 0, 0, 1695, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2127, 0, 0, 0, 540, 1762, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1358, 540, 1843, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1854, 561, 561, 561, 561, 561, 561, 3239, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3578, 561, 561, 585, 585, 585, 585, 0, 2064, 2065, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1717, 0, 0, 0, 0, 0, 0, 2135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1159, 0, 0, 0, 0, 2186, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1808, 540, 540, 2213, 540, 540, 540, 540, 2218, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1754, 540, 540, 540, 540, 540, 540, 2240, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1401, 561, 561, 2298, 561, 561, 561, 561, 2303, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3083, 561, 561, 561, 561, 561, 585, 585, 585, 2388, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1938, 585, 585, 585, 3034, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2210, 0, 0, 0, 3380, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1175, 0, 0, 0, 0, 540, 540, 3404, 540, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2282, 561, 561, 561, 561, 561, 561, 561, 3419, 561, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1049, 585, 585, 585, 585, 561, 540, 3454, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 561, 561, 561, 561, 3523, 561, 561, 561, 3469, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 3484, 385, 387, 337, 0, 0, 0, 0, 0, 0, 336, 0, 0, 337, 0, 0, 0, 0, 0, 1097, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2057, 0, 0, 0, 0, 0, 0, 0, 0, 384, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 1139, 1140, 0, 0, 0, 0, 0, 362, 362, 0, 0, 0, 0, 0, 703, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2048, 0, 0, 0, 0, 0, 0, 0, 336, 0, 0, 438, 0, 444, 0, 470, 470, 470, 470, 470, 470, 470, 551, 574, 551, 574, 551, 551, 574, 551, 598, 480, 470, 470, 470, 499, 476, 499, 499, 499, 499, 499, 499, 499, 499, 470, 470, 476, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 480, 470, 481, 480, 470, 470, 470, 470, 574, 574, 574, 574, 574, 574, 574, 598, 598, 598, 551, 598, 598, 598, 598, 598, 574, 574, 551, 574, 598, 574, 598, 1, 12290, 3, 78112, 0, 0, 0, 678, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2153, 0, 0, 0, 0, 0, 693, 0, 0, 0, 0, 0, 0, 362, 362, 362, 0, 0, 0, 0, 0, 0, 1217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1220, 0, 0, 1223, 0, 0, 0, 0, 0, 0, 663, 0, 791, 0, 0, 0, 0, 0, 0, 0, 795, 0, 0, 0, 0, 0, 2972, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2097, 0, 2099, 0, 0, 0, 0, 0, 804, 0, 0, 0, 0, 0, 812, 0, 0, 0, 0, 706, 0, 0, 0, 0, 0, 0, 0, 0, 715, 0, 717, 0, 0, 0, 831, 0, 0, 0, 663, 834, 0, 791, 0, 0, 0, 0, 0, 840, 0, 0, 0, 0, 0, 2996, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2429, 2430, 0, 0, 0, 0, 863, 540, 540, 877, 540, 540, 540, 888, 540, 540, 540, 540, 906, 540, 540, 540, 540, 540, 1311, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2843, 540, 540, 540, 540, 561, 561, 917, 561, 561, 561, 933, 561, 561, 947, 561, 561, 561, 561, 960, 561, 0, 995, 585, 1076, 1046, 585, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 2686976, 2736128, 0, 0, 2531328, 2707456, 0, 3190784, 561, 561, 561, 978, 561, 561, 561, 0, 585, 585, 990, 585, 585, 585, 1006, 585, 585, 585, 585, 585, 2349, 585, 585, 585, 585, 2354, 585, 585, 585, 585, 585, 585, 585, 2377, 585, 585, 585, 585, 585, 585, 585, 585, 561, 540, 561, 585, 0, 0, 0, 0, 585, 1020, 585, 585, 585, 585, 1033, 585, 585, 585, 585, 1051, 585, 585, 585, 561, 540, 585, 561, 3149, 540, 3151, 561, 3153, 585, 0, 0, 0, 0, 0, 0, 1660, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 990, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 3067, 561, 561, 561, 561, 3071, 561, 561, 561, 561, 0, 0, 0, 1215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2431, 0, 2433, 0, 1238, 0, 0, 0, 0, 1270, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 3561, 540, 540, 540, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 561, 585, 585, 585, 540, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1491, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1495, 585, 585, 585, 585, 561, 585, 585, 1556, 585, 585, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1100, 0, 0, 0, 0, 0, 0, 1622, 0, 0, 1625, 0, 1627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 839, 540, 540, 540, 540, 859, 540, 1744, 540, 540, 540, 540, 540, 540, 540, 540, 1755, 540, 540, 540, 540, 540, 540, 540, 2176, 540, 540, 2180, 540, 540, 540, 2184, 540, 561, 561, 561, 1847, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2294, 561, 561, 561, 0, 0, 2117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1730, 0, 0, 0, 0, 0, 0, 2148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1207, 0, 0, 0, 0, 0, 0, 0, 561, 561, 561, 561, 2248, 561, 561, 561, 561, 561, 561, 561, 561, 3095, 3097, 561, 561, 561, 3100, 561, 3102, 561, 561, 2313, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, 0, 0, 0, 0, 0, 585, 585, 2651, 585, 585, 585, 585, 585, 585, 585, 2660, 585, 585, 585, 585, 585, 2665, 585, 585, 2398, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 561, 540, 2410, 585, 561, 0, 540, 585, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 585, 585, 585, 585, 0, 3669, 540, 3670, 0, 2436, 0, 0, 0, 0, 0, 0, 2441, 0, 0, 0, 2444, 2445, 0, 0, 0, 0, 0, 3010, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, 304, 0, 0, 0, 0, 2497, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2506, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 163840, 0, 0, 0, 0, 65536, 0, 2512, 0, 0, 0, 0, 2515, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2523, 540, 2536, 2537, 540, 540, 540, 540, 540, 2542, 540, 2544, 540, 540, 540, 540, 2548, 561, 2595, 561, 561, 2598, 2599, 561, 561, 561, 561, 561, 2604, 561, 2606, 561, 561, 561, 561, 1863, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2890, 561, 561, 561, 561, 561, 561, 561, 2610, 561, 561, 561, 561, 561, 561, 561, 561, 2616, 561, 561, 561, 561, 561, 2276, 561, 561, 2279, 561, 561, 561, 561, 561, 561, 561, 1915, 561, 561, 26027, 1920, 585, 585, 585, 585, 2636, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2608, 2668, 585, 2670, 585, 585, 585, 585, 2674, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2675, 585, 585, 585, 585, 585, 585, 2680, 585, 585, 585, 585, 585, 585, 585, 585, 2688, 585, 585, 585, 585, 585, 585, 585, 1950, 585, 585, 585, 585, 1954, 585, 585, 585, 2696, 585, 585, 585, 585, 2700, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1494, 585, 585, 585, 585, 585, 561, 2720, 561, 561, 585, 2722, 585, 585, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2964, 0, 0, 0, 0, 2770, 0, 0, 0, 2773, 0, 0, 2776, 0, 0, 0, 0, 0, 0, 0, 0, 331, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1691, 0, 2786, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2795, 0, 0, 0, 0, 0, 3171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1245, 0, 0, 0, 0, 0, 540, 2825, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1773, 540, 540, 2835, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2844, 540, 540, 2847, 540, 540, 2850, 540, 0, 0, 2851, 561, 561, 561, 561, 561, 561, 1851, 561, 561, 561, 561, 1855, 561, 561, 561, 561, 561, 2883, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2892, 561, 561, 2895, 561, 561, 2898, 561, 0, 0, 2899, 585, 585, 585, 585, 585, 585, 585, 1965, 585, 585, 585, 1970, 585, 585, 585, 585, 585, 2931, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2940, 585, 585, 2943, 585, 585, 2946, 585, 561, 2948, 585, 2949, 2950, 540, 540, 561, 561, 561, 561, 1878, 561, 561, 561, 561, 1884, 561, 561, 561, 561, 561, 561, 936, 561, 561, 561, 561, 561, 561, 561, 561, 561, 984, 0, 585, 585, 585, 585, 585, 585, 1007, 585, 0, 2968, 2969, 0, 0, 0, 0, 2974, 0, 0, 0, 0, 0, 0, 0, 0, 331, 0, 331, 331, 0, 0, 0, 0, 3020, 0, 0, 540, 540, 3025, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3043, 540, 540, 540, 540, 540, 540, 540, 3050, 540, 540, 3052, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1352, 540, 540, 540, 540, 540, 561, 561, 561, 3091, 561, 561, 3093, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2602, 561, 561, 561, 561, 561, 561, 561, 561, 585, 585, 3106, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1496, 585, 585, 585, 1500, 585, 585, 585, 3132, 585, 585, 3134, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1040, 585, 585, 585, 585, 585, 967, 3158, 0, 0, 0, 3162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1222, 0, 0, 1225, 0, 3190, 0, 0, 3193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 2166, 540, 540, 540, 540, 540, 3214, 540, 540, 540, 540, 540, 540, 540, 3219, 540, 540, 540, 540, 540, 540, 540, 2541, 540, 2543, 540, 540, 540, 540, 540, 540, 540, 540, 2581, 540, 540, 540, 540, 0, 2584, 0, 561, 561, 561, 3236, 3237, 561, 561, 561, 561, 561, 3241, 561, 561, 561, 561, 561, 561, 3250, 561, 561, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 3536, 585, 585, 585, 585, 561, 561, 561, 3247, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 585, 3481, 585, 3483, 585, 585, 585, 585, 3269, 585, 585, 585, 585, 585, 585, 585, 585, 3275, 585, 585, 585, 585, 585, 585, 2701, 585, 585, 585, 585, 585, 585, 585, 2706, 585, 0, 0, 3308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 856, 540, 585, 3359, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1057, 561, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 3386, 0, 0, 0, 0, 0, 1169, 0, 1171, 0, 0, 0, 0, 1176, 0, 0, 0, 0, 0, 1185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 669, 0, 0, 0, 0, 0, 585, 3429, 585, 585, 585, 585, 585, 585, 561, 540, 561, 585, 0, 3437, 0, 0, 0, 0, 0, 3300, 0, 3176, 3302, 0, 0, 3305, 0, 0, 0, 0, 0, 0, 1113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 362, 0, 703, 0, 0, 3440, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 3452, 540, 540, 540, 540, 3457, 540, 540, 540, 540, 3462, 540, 540, 561, 561, 3467, 561, 0, 997, 1037, 585, 1048, 585, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 776, 0, 0, 0, 0, 0, 783, 0, 0, 561, 561, 561, 3472, 561, 561, 561, 561, 3477, 561, 561, 585, 585, 3482, 585, 585, 585, 585, 585, 585, 3259, 3260, 585, 585, 585, 585, 3264, 3265, 585, 585, 585, 585, 585, 585, 3120, 585, 585, 585, 585, 585, 3126, 585, 585, 3129, 585, 585, 3487, 585, 585, 585, 585, 3492, 585, 585, 561, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 167936, 0, 0, 0, 0, 65536, 0, 3499, 0, 0, 0, 0, 0, 3505, 0, 0, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3397, 540, 540, 540, 540, 540, 540, 540, 540, 3517, 540, 540, 3519, 561, 561, 561, 561, 561, 561, 561, 561, 3252, 561, 561, 561, 561, 561, 561, 585, 561, 561, 561, 3530, 561, 561, 3532, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1042, 585, 585, 585, 585, 585, 969, 585, 585, 3543, 585, 585, 3545, 561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1144, 0, 362, 362, 0, 1147, 0, 540, 540, 3629, 3630, 540, 540, 561, 561, 561, 3635, 3636, 561, 561, 585, 585, 585, 585, 0, 2029, 0, 0, 0, 0, 0, 2031, 0, 0, 3641, 3642, 585, 585, 561, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 3395, 540, 540, 540, 540, 540, 540, 3401, 561, 561, 585, 585, 0, 540, 561, 585, 0, 540, 561, 585, 3681, 3682, 3683, 3684, 339, 340, 341, 342, 343, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1617, 0, 0, 0, 0, 0, 0, 0, 388, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2469, 0, 2470, 0, 342, 342, 343, 342, 0, 341, 342, 445, 454, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 486, 495, 495, 503, 495, 505, 495, 495, 505, 505, 495, 505, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 552, 575, 552, 575, 552, 552, 575, 552, 599, 575, 575, 575, 575, 575, 575, 575, 599, 599, 599, 552, 599, 599, 599, 599, 599, 575, 575, 552, 575, 599, 575, 599, 1, 12290, 3, 78112, 0, 0, 0, 646, 0, 0, 0, 0, 651, 652, 653, 654, 655, 656, 657, 0, 0, 0, 0, 1144, 0, 0, 1259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2957312, 0, 0, 0, 0, 0, 0, 0, 692, 0, 0, 0, 0, 0, 0, 699, 362, 362, 362, 0, 0, 0, 0, 0, 0, 1232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 735, 0, 800, 0, 0, 0, 0, 721, 0, 723, 0, 0, 0, 0, 0, 0, 0, 0, 0, 733, 0, 0, 0, 0, 0, 1202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, 334, 0, 0, 0, 0, 0, 646, 752, 753, 754, 0, 0, 0, 0, 0, 760, 761, 0, 0, 0, 0, 0, 0, 1271, 0, 0, 0, 0, 0, 0, 540, 540, 540, 3026, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2220, 540, 540, 540, 540, 540, 0, 761, 0, 0, 790, 0, 0, 0, 0, 0, 0, 0, 0, 0, 797, 0, 0, 0, 0, 1152, 0, 0, 0, 0, 1157, 0, 0, 0, 0, 0, 0, 0, 2106, 0, 0, 0, 0, 0, 0, 0, 0, 1219, 0, 0, 0, 0, 0, 0, 0, 723, 0, 692, 814, 0, 0, 0, 0, 761, 0, 0, 0, 0, 0, 0, 0, 558, 581, 558, 581, 558, 558, 581, 558, 605, 0, 754, 823, 824, 0, 0, 0, 0, 0, 0, 754, 0, 0, 828, 699, 0, 0, 0, 0, 1168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1633, 0, 0, 0, 0, 0, 0, 833, 0, 0, 0, 835, 0, 0, 0, 692, 699, 0, 0, 692, 833, 0, 0, 0, 0, 0, 0, 0, 0, 0, 692, 540, 540, 853, 857, 860, 540, 868, 540, 540, 882, 884, 887, 540, 540, 540, 898, 902, 540, 540, 540, 540, 540, 540, 1766, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1786, 540, 540, 540, 540, 540, 561, 561, 561, 923, 927, 930, 561, 938, 561, 561, 561, 953, 955, 958, 561, 561, 561, 561, 1879, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2641, 561, 561, 561, 561, 561, 561, 561, 561, 2648, 0, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 2717, 540, 540, 540, 585, 585, 585, 1026, 1028, 1031, 585, 585, 585, 1043, 1047, 585, 585, 585, 585, 970, 0, 0, 0, 1060, 585, 1062, 1063, 853, 540, 898, 902, 1068, 923, 561, 970, 974, 561, 561, 561, 561, 0, 585, 585, 585, 996, 1000, 1003, 585, 1011, 1073, 0, 996, 585, 1043, 1047, 1078, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 560, 583, 560, 583, 560, 560, 583, 560, 607, 0, 0, 1199, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1208, 0, 0, 0, 0, 0, 1231, 0, 0, 0, 0, 1236, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 422, 65536, 0, 540, 1322, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1331, 540, 540, 1338, 540, 540, 540, 540, 2228, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 0, 0, 561, 2852, 561, 561, 561, 561, 561, 561, 561, 561, 1422, 561, 561, 1429, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2879, 561, 561, 561, 561, 561, 561, 561, 1442, 561, 561, 561, 561, 561, 561, 26027, 1360, 987, 585, 585, 585, 585, 585, 585, 585, 2925, 585, 585, 585, 585, 585, 585, 585, 585, 561, 540, 561, 585, 3436, 0, 3438, 0, 585, 1503, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1513, 585, 585, 1520, 1667, 0, 1669, 0, 0, 0, 1671, 0, 748, 0, 0, 0, 0, 0, 0, 0, 650, 0, 0, 0, 0, 0, 0, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 0, 0, 1602, 0, 0, 0, 0, 0, 0, 540, 1738, 540, 540, 540, 540, 540, 540, 540, 2584, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1839, 561, 561, 561, 1743, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2238, 540, 1776, 540, 540, 1781, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1353, 540, 540, 540, 540, 0, 561, 1829, 561, 561, 561, 561, 561, 561, 1835, 561, 561, 561, 561, 561, 561, 1864, 561, 561, 561, 1868, 561, 561, 1873, 561, 561, 1907, 561, 561, 561, 561, 561, 561, 561, 561, 561, 26027, 0, 585, 1923, 585, 585, 585, 585, 585, 585, 3270, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1968, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1929, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1511, 585, 585, 585, 585, 585, 1958, 585, 585, 585, 1962, 585, 585, 1967, 585, 585, 585, 585, 585, 585, 585, 1469, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2392, 585, 585, 585, 2395, 585, 585, 0, 1086, 0, 0, 0, 2034, 0, 1090, 0, 0, 0, 2036, 0, 1094, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1226, 585, 585, 585, 585, 2362, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1534, 585, 585, 585, 585, 2585, 0, 1826, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2271, 585, 585, 585, 2710, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 540, 540, 540, 540, 1814, 540, 540, 540, 540, 1820, 540, 540, 540, 1360, 0, 0, 0, 0, 2744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1649, 0, 0, 0, 0, 585, 585, 585, 585, 2924, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1937, 585, 585, 585, 585, 561, 561, 3338, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1857, 561, 561, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 3385, 0, 0, 0, 0, 0, 0, 1628, 1629, 1630, 0, 0, 0, 0, 0, 0, 0, 0, 1159168, 362, 0, 0, 0, 0, 0, 0, 3402, 540, 540, 540, 561, 561, 561, 3407, 561, 561, 561, 561, 3411, 561, 561, 561, 561, 1391, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1414, 561, 561, 561, 561, 561, 561, 3417, 561, 561, 561, 585, 585, 585, 3422, 585, 585, 585, 585, 3426, 585, 585, 585, 585, 585, 2375, 2376, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1476, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3432, 585, 585, 585, 561, 540, 561, 585, 0, 0, 0, 0, 0, 0, 1644, 0, 0, 0, 0, 0, 0, 0, 0, 0, 661, 0, 661, 0, 0, 0, 0, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 3446, 0, 0, 0, 540, 540, 540, 3392, 540, 540, 540, 540, 3396, 540, 540, 540, 540, 540, 540, 540, 3039, 540, 540, 540, 540, 540, 3045, 540, 540, 540, 540, 3455, 540, 540, 540, 3459, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 2626, 561, 561, 561, 561, 561, 561, 2633, 561, 561, 561, 561, 3470, 561, 561, 561, 3474, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 585, 3111, 585, 585, 585, 585, 585, 585, 3485, 585, 585, 585, 3489, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 3603, 540, 3604, 540, 540, 540, 561, 561, 585, 585, 0, 540, 561, 585, 3677, 3678, 3679, 3680, 0, 540, 561, 585, 585, 585, 585, 585, 1079, 0, 1562, 0, 0, 0, 1568, 0, 0, 0, 0, 0, 1256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 300, 300, 0, 0, 0, 0, 386, 0, 0, 0, 390, 386, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1174, 0, 0, 0, 0, 0, 0, 0, 0, 402, 0, 344, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 1201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 357, 0, 0, 0, 0, 521, 521, 521, 521, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 553, 576, 553, 576, 553, 553, 576, 553, 600, 576, 576, 576, 576, 576, 576, 576, 600, 600, 600, 553, 600, 600, 600, 600, 600, 576, 576, 617, 622, 600, 622, 628, 1, 12290, 3, 78112, 561, 561, 561, 979, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2927, 585, 585, 585, 585, 585, 585, 0, 0, 0, 540, 1061, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 3238, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1433, 561, 561, 561, 561, 561, 1107, 0, 0, 0, 0, 1112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1190, 0, 0, 0, 0, 0, 561, 561, 561, 1389, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2308, 2309, 561, 561, 561, 1403, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2296, 2297, 1440, 561, 561, 561, 561, 561, 561, 561, 26027, 1360, 987, 585, 585, 585, 585, 585, 585, 585, 2947, 540, 585, 585, 561, 540, 540, 561, 561, 1574, 0, 0, 0, 1580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1664, 0, 0, 0, 0, 1606, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1620, 0, 0, 0, 0, 1216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2110, 0, 0, 0, 0, 561, 561, 561, 1877, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2322, 0, 0, 0, 2052, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2155, 0, 2116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1676, 0, 2241, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2295, 561, 561, 561, 561, 2274, 561, 561, 561, 561, 2278, 561, 2280, 561, 561, 561, 561, 561, 561, 1897, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1397, 561, 561, 561, 561, 561, 561, 2359, 585, 585, 585, 585, 2363, 585, 2365, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3123, 585, 3125, 585, 585, 585, 585, 0, 0, 0, 2500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2494, 2495, 0, 0, 561, 2622, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2607, 561, 0, 3021, 0, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2533, 540, 0, 0, 0, 0, 3176, 3382, 0, 0, 3384, 0, 0, 0, 0, 0, 0, 0, 728, 0, 0, 0, 0, 0, 0, 0, 0, 1115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 3391, 540, 540, 3393, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1785, 540, 540, 540, 1790, 540, 0, 0, 0, 0, 3176, 0, 3443, 0, 0, 0, 0, 0, 3449, 540, 540, 540, 540, 540, 1782, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2832, 540, 540, 540, 540, 864, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 912, 1095, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2447, 0, 0, 1624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2060, 0, 0, 1827, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2620, 345, 345, 347, 345, 0, 0, 345, 0, 345, 0, 0, 0, 0, 346, 0, 0, 0, 0, 0, 3310, 0, 0, 3312, 0, 0, 0, 0, 0, 0, 540, 585, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 3410, 561, 561, 561, 561, 561, 0, 0, 0, 345, 345, 347, 345, 345, 345, 345, 345, 345, 512, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 554, 577, 554, 577, 554, 554, 577, 554, 601, 577, 577, 577, 577, 577, 577, 577, 601, 601, 601, 554, 601, 601, 601, 601, 601, 577, 577, 554, 577, 601, 577, 601, 1, 12290, 3, 78112, 0, 722, 0, 724, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2508, 0, 0, 0, 0, 739, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1690, 0, 0, 0, 811, 0, 0, 810, 0, 0, 0, 0, 0, 755, 0, 0, 819, 0, 0, 0, 0, 1269, 0, 0, 0, 0, 0, 0, 0, 1181, 540, 540, 540, 540, 540, 1797, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3464, 561, 561, 561, 561, 540, 540, 872, 540, 540, 540, 540, 890, 892, 540, 540, 903, 540, 540, 540, 540, 540, 540, 2175, 540, 2177, 540, 540, 540, 540, 540, 540, 2185, 561, 561, 918, 924, 561, 561, 561, 561, 942, 561, 561, 561, 561, 561, 962, 964, 561, 561, 975, 561, 561, 561, 561, 0, 585, 585, 991, 997, 585, 585, 585, 585, 585, 585, 585, 3271, 585, 585, 585, 585, 585, 585, 3277, 585, 1015, 585, 585, 585, 585, 585, 1035, 1037, 585, 585, 1048, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 540, 540, 3650, 3651, 540, 540, 0, 0, 0, 540, 991, 585, 561, 854, 892, 540, 903, 540, 924, 964, 561, 975, 0, 0, 0, 1151, 0, 1153, 0, 1155, 0, 0, 0, 0, 0, 0, 0, 0, 713, 0, 0, 0, 0, 0, 0, 0, 0, 1181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1706, 0, 0, 1198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1731, 0, 1212, 1213, 0, 0, 0, 0, 0, 1218, 0, 0, 0, 0, 0, 0, 0, 0, 729, 0, 0, 0, 0, 0, 0, 0, 540, 540, 1307, 1309, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1316, 540, 540, 1319, 540, 540, 1343, 540, 540, 540, 540, 540, 540, 540, 540, 1354, 1355, 540, 540, 540, 540, 540, 1813, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1360, 1360, 914, 561, 561, 561, 1366, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 26027, 1921, 585, 585, 585, 585, 561, 561, 1420, 561, 561, 561, 561, 561, 561, 561, 1434, 561, 561, 561, 561, 561, 561, 3342, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3080, 561, 561, 561, 561, 561, 561, 561, 561, 2319, 561, 561, 561, 561, 0, 0, 0, 561, 561, 561, 1445, 1446, 561, 561, 561, 26027, 1360, 987, 585, 585, 585, 1457, 585, 585, 585, 585, 585, 2403, 585, 585, 585, 585, 585, 561, 2409, 585, 2411, 2412, 585, 1487, 1489, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3366, 585, 585, 585, 585, 1525, 585, 585, 585, 585, 585, 585, 585, 585, 1536, 1537, 585, 585, 585, 585, 585, 585, 3434, 585, 561, 540, 561, 585, 0, 0, 0, 3439, 585, 1542, 0, 540, 585, 585, 561, 540, 1547, 540, 540, 1550, 561, 1551, 561, 561, 561, 561, 1895, 561, 561, 561, 1900, 561, 561, 561, 561, 561, 561, 561, 0, 585, 585, 988, 585, 585, 585, 585, 585, 1554, 585, 1555, 585, 585, 1558, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2069, 0, 0, 0, 0, 2073, 0, 0, 1678, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2037, 0, 0, 0, 1694, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2072, 0, 0, 0, 1637, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2051, 0, 0, 561, 561, 561, 561, 561, 561, 1833, 561, 561, 561, 561, 561, 561, 561, 561, 26027, 1360, 987, 585, 585, 585, 585, 585, 561, 1908, 561, 561, 561, 561, 1914, 561, 561, 561, 26027, 0, 585, 585, 585, 585, 585, 2334, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2938, 585, 585, 585, 585, 585, 585, 585, 1927, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1055, 585, 561, 585, 585, 585, 1994, 585, 585, 585, 585, 585, 585, 585, 585, 2002, 585, 585, 585, 585, 585, 585, 2711, 561, 540, 585, 585, 561, 540, 540, 540, 540, 540, 540, 2217, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1802, 540, 540, 540, 540, 540, 585, 2008, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 540, 540, 561, 561, 561, 561, 2261, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2891, 561, 561, 561, 561, 0, 2076, 0, 0, 0, 0, 0, 0, 0, 0, 2084, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 266240, 0, 0, 0, 0, 65536, 0, 2088, 0, 0, 2090, 0, 0, 0, 0, 0, 0, 0, 2098, 0, 0, 0, 0, 0, 0, 1725, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 2146, 0, 0, 0, 2146, 0, 0, 2151, 2152, 0, 0, 0, 0, 0, 0, 0, 274432, 274432, 274432, 0, 274432, 274432, 274432, 274432, 274432, 2156, 0, 0, 0, 0, 0, 0, 0, 2162, 540, 540, 540, 540, 540, 2168, 540, 540, 540, 540, 2538, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1821, 540, 540, 1360, 540, 2200, 540, 2203, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2209, 540, 540, 540, 540, 2578, 540, 540, 540, 540, 540, 540, 540, 540, 0, 2584, 0, 0, 0, 0, 799, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 799, 0, 0, 0, 0, 0, 0, 0, 0, 2244, 561, 561, 561, 561, 561, 561, 2251, 561, 561, 561, 561, 561, 561, 3351, 585, 585, 585, 585, 585, 585, 585, 3356, 585, 561, 561, 2300, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2323, 0, 0, 0, 2329, 585, 585, 585, 585, 585, 585, 2336, 585, 585, 585, 585, 585, 585, 585, 1470, 585, 585, 585, 585, 1480, 585, 585, 585, 585, 585, 2360, 585, 585, 585, 585, 585, 585, 2366, 585, 2368, 585, 2371, 585, 585, 585, 585, 585, 585, 3546, 0, 0, 3549, 3550, 0, 0, 0, 0, 0, 0, 303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2912256, 0, 3207168, 2465792, 0, 0, 2385, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1989, 2472, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2480, 0, 0, 0, 0, 0, 0, 0, 286720, 286720, 0, 286720, 286720, 1, 12290, 3, 0, 0, 0, 0, 0, 2514, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2522, 0, 0, 0, 0, 1575, 0, 0, 0, 0, 0, 1581, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 172032, 0, 0, 0, 0, 65536, 0, 561, 561, 2596, 561, 561, 561, 561, 561, 2601, 561, 561, 561, 561, 561, 561, 561, 0, 585, 585, 992, 585, 585, 585, 585, 585, 585, 2681, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1956, 585, 2719, 561, 561, 561, 2721, 585, 585, 585, 2723, 2724, 0, 0, 0, 0, 0, 0, 0, 2801, 0, 0, 0, 540, 2805, 540, 540, 540, 2742, 0, 2743, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2100, 0, 0, 0, 0, 2758, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2128, 0, 0, 540, 2809, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2223, 2224, 540, 2846, 540, 540, 540, 540, 540, 0, 0, 561, 561, 561, 561, 2855, 561, 2856, 561, 2894, 561, 561, 561, 561, 561, 0, 0, 585, 585, 585, 585, 2903, 585, 2904, 585, 2942, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 561, 561, 585, 585, 0, 0, 0, 3374, 0, 0, 3377, 0, 0, 0, 540, 3024, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1771, 540, 540, 540, 540, 561, 561, 585, 3105, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2369, 585, 585, 585, 585, 585, 3145, 540, 585, 561, 540, 540, 561, 561, 585, 585, 0, 0, 0, 0, 0, 0, 2066, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 297, 0, 0, 0, 0, 0, 0, 0, 3390, 540, 540, 540, 540, 3394, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2179, 540, 540, 540, 540, 540, 540, 540, 3403, 540, 540, 3405, 561, 561, 561, 561, 3409, 561, 561, 561, 561, 561, 561, 2277, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3082, 561, 3084, 561, 561, 561, 561, 561, 561, 561, 3418, 561, 561, 3420, 585, 585, 585, 585, 3424, 585, 585, 585, 585, 585, 585, 585, 3591, 585, 561, 0, 0, 0, 0, 0, 0, 0, 3176, 0, 3303, 0, 0, 0, 0, 3307, 0, 585, 585, 585, 585, 585, 3433, 585, 585, 561, 540, 561, 585, 0, 0, 0, 0, 0, 0, 2137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1129, 0, 0, 0, 0, 0, 0, 0, 3500, 0, 3502, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 3511, 540, 540, 540, 540, 2812, 540, 2815, 540, 540, 540, 540, 2820, 540, 540, 540, 2823, 540, 540, 540, 540, 3631, 540, 561, 561, 561, 561, 561, 3637, 561, 585, 585, 585, 585, 585, 1079, 0, 0, 0, 1564, 0, 0, 0, 1570, 0, 585, 585, 3643, 585, 561, 3645, 0, 3647, 0, 0, 540, 540, 540, 540, 540, 540, 540, 1286, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3208, 540, 540, 540, 540, 540, 365, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2496, 398, 0, 0, 0, 0, 0, 365, 373, 401, 0, 0, 0, 0, 0, 365, 0, 0, 393, 0, 0, 0, 0, 348, 0, 0, 365, 0, 393, 0, 406, 408, 0, 0, 365, 373, 0, 69632, 73728, 0, 0, 0, 0, 424, 65536, 0, 0, 0, 0, 1596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 0, 0, 0, 424, 424, 0, 424, 0, 408, 424, 447, 455, 0, 0, 0, 0, 0, 0, 0, 777, 0, 0, 0, 0, 0, 0, 0, 644, 0, 406, 0, 496, 496, 0, 496, 496, 496, 496, 496, 496, 496, 496, 522, 522, 522, 522, 455, 455, 455, 530, 455, 531, 455, 455, 522, 536, 522, 522, 522, 522, 538, 555, 578, 555, 578, 555, 555, 578, 555, 602, 578, 578, 578, 608, 608, 608, 578, 602, 602, 602, 555, 602, 602, 602, 602, 602, 578, 578, 618, 623, 602, 623, 629, 1, 12290, 3, 78112, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2769, 0, 0, 0, 694, 0, 0, 0, 0, 0, 362, 362, 362, 0, 0, 0, 0, 0, 0, 2440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1260, 0, 0, 0, 0, 0, 0, 0, 0, 805, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2142, 2143, 0, 540, 540, 540, 878, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1332, 540, 540, 540, 561, 561, 919, 561, 561, 561, 561, 561, 561, 948, 950, 561, 561, 561, 561, 561, 561, 3575, 561, 3577, 561, 561, 561, 585, 585, 585, 585, 0, 0, 1563, 0, 0, 0, 0, 0, 1569, 0, 585, 1021, 1023, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 561, 3496, 0, 3497, 0, 0, 0, 0, 0, 540, 992, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 3341, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3579, 561, 585, 585, 585, 585, 0, 0, 0, 1098, 1230, 0, 0, 0, 0, 0, 0, 1237, 0, 0, 0, 0, 0, 0, 2452, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2764, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1242, 1251, 540, 540, 1280, 540, 540, 540, 1284, 540, 540, 1295, 540, 540, 1299, 540, 540, 540, 540, 540, 2229, 540, 2231, 540, 540, 540, 540, 540, 540, 540, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1840, 561, 561, 1360, 914, 561, 561, 561, 561, 561, 561, 1369, 561, 561, 561, 1373, 561, 561, 1384, 561, 561, 1388, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2324, 0, 0, 561, 561, 1405, 561, 561, 561, 1409, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3612, 3613, 561, 585, 585, 585, 585, 585, 1460, 585, 585, 585, 1464, 585, 585, 1475, 585, 585, 1479, 585, 585, 585, 585, 585, 585, 1032, 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 3625, 0, 540, 0, 1623, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1636, 0, 0, 0, 0, 1626, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2058, 2059, 0, 2061, 2062, 1638, 0, 0, 0, 1642, 0, 0, 0, 1646, 0, 0, 0, 1650, 0, 0, 0, 0, 0, 1257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1145, 362, 362, 0, 0, 1148, 561, 1844, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2635, 561, 561, 561, 561, 1862, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2869, 561, 561, 2872, 2007, 585, 585, 585, 585, 561, 1752, 585, 1938, 1844, 540, 540, 540, 540, 561, 561, 561, 561, 2275, 561, 561, 561, 561, 561, 561, 2281, 561, 2283, 561, 2286, 0, 0, 2056, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2154, 0, 0, 0, 0, 0, 2118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2520, 0, 0, 0, 0, 2132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2141, 0, 0, 0, 0, 0, 0, 2463, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2491, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2158, 0, 0, 2161, 0, 540, 540, 2164, 540, 540, 540, 540, 540, 540, 540, 3053, 540, 3055, 540, 540, 540, 540, 540, 540, 540, 540, 2232, 540, 540, 2235, 2236, 540, 540, 0, 540, 540, 540, 2227, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 0, 2242, 561, 561, 561, 561, 561, 561, 561, 0, 0, 0, 561, 561, 2246, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 26027, 1360, 987, 585, 585, 1455, 585, 1458, 561, 2312, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, 0, 0, 0, 0, 0, 585, 2650, 585, 585, 585, 585, 585, 585, 561, 3547, 3548, 0, 0, 0, 0, 0, 0, 3554, 0, 585, 585, 2331, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2381, 2382, 585, 585, 585, 585, 2387, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2397, 540, 540, 2415, 2416, 561, 561, 2419, 2420, 585, 585, 2423, 2424, 0, 1563, 0, 1569, 0, 1575, 0, 1581, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2752, 0, 0, 0, 0, 0, 0, 0, 2438, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1728, 0, 0, 0, 0, 0, 2513, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2519, 0, 0, 0, 0, 0, 0, 2478, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1189, 0, 0, 0, 0, 0, 0, 540, 540, 540, 2565, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1333, 540, 540, 540, 585, 585, 2682, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2693, 585, 585, 585, 585, 585, 585, 3590, 585, 585, 561, 0, 3594, 0, 0, 0, 0, 0, 0, 2516, 2466, 0, 0, 0, 0, 0, 2521, 0, 0, 2824, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2239, 561, 561, 561, 561, 2885, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1395, 561, 561, 561, 561, 561, 561, 561, 561, 1430, 561, 561, 561, 561, 561, 561, 561, 561, 2866, 561, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 2933, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1985, 585, 585, 585, 585, 0, 3177, 0, 0, 0, 3180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1601, 1602, 0, 0, 0, 0, 0, 0, 0, 0, 3194, 0, 0, 0, 0, 0, 0, 3197, 0, 3199, 540, 540, 540, 540, 880, 540, 885, 540, 891, 540, 894, 540, 540, 908, 540, 540, 540, 540, 540, 3038, 540, 540, 540, 540, 540, 540, 540, 540, 3046, 540, 585, 3289, 3290, 0, 0, 0, 0, 3294, 0, 0, 0, 0, 0, 0, 0, 0, 1099, 0, 0, 0, 0, 0, 0, 0, 540, 540, 3316, 540, 540, 540, 3319, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1819, 540, 540, 540, 540, 1360, 561, 3337, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2646, 561, 3415, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3115, 3428, 585, 3430, 585, 585, 585, 585, 585, 561, 540, 561, 585, 0, 0, 0, 0, 0, 0, 2503, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 336, 290, 0, 0, 0, 0, 3555, 0, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3566, 540, 540, 561, 3064, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2617, 561, 561, 561, 561, 561, 3608, 561, 3609, 561, 561, 561, 561, 561, 561, 561, 585, 585, 3615, 585, 585, 585, 585, 585, 2658, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1952, 585, 585, 585, 585, 585, 3616, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 0, 540, 585, 585, 561, 540, 540, 540, 1067, 911, 561, 561, 561, 1072, 407, 353, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 1658, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 1146, 0, 0, 472, 483, 472, 0, 0, 472, 0, 0, 0, 0, 0, 0, 0, 0, 523, 523, 527, 527, 527, 527, 472, 472, 472, 472, 472, 477, 472, 472, 527, 523, 527, 527, 527, 527, 539, 556, 579, 556, 579, 556, 556, 579, 556, 603, 579, 579, 579, 579, 579, 579, 579, 603, 603, 603, 556, 603, 603, 603, 603, 603, 579, 579, 619, 624, 603, 624, 630, 1, 12290, 3, 78112, 0, 644, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2101, 0, 738, 0, 0, 0, 644, 738, 0, 744, 745, 644, 0, 0, 0, 0, 0, 0, 0, 0, 793, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 802, 0, 807, 0, 0, 0, 0, 0, 0, 807, 0, 0, 0, 0, 0, 644, 0, 0, 0, 802, 0, 807, 0, 793, 0, 822, 0, 0, 0, 665, 0, 0, 0, 0, 822, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 362, 0, 0, 0, 1134592, 0, 0, 0, 793, 793, 0, 644, 0, 0, 793, 807, 845, 0, 540, 850, 540, 540, 540, 540, 540, 2539, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3324, 540, 540, 540, 540, 540, 869, 873, 879, 883, 540, 540, 540, 540, 540, 899, 540, 540, 540, 540, 540, 540, 540, 3206, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2205, 540, 540, 540, 540, 540, 540, 561, 561, 920, 561, 561, 561, 561, 939, 943, 949, 561, 954, 561, 561, 561, 561, 585, 585, 585, 585, 0, 0, 0, 0, 0, 2728, 0, 0, 1016, 1022, 585, 1027, 585, 585, 585, 585, 585, 1044, 585, 585, 585, 585, 585, 1058, 0, 0, 0, 540, 993, 585, 561, 540, 540, 899, 540, 540, 561, 561, 971, 561, 561, 561, 561, 561, 0, 585, 585, 993, 585, 585, 585, 585, 1012, 1149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2784, 0, 0, 0, 1200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1211, 1227, 0, 0, 1099, 0, 0, 0, 1233, 0, 1235, 0, 0, 0, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1249, 0, 0, 0, 0, 1670, 0, 0, 0, 0, 0, 0, 1674, 0, 0, 0, 0, 0, 0, 743, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2753, 2754, 0, 1252, 1200, 0, 1233, 1255, 0, 1258, 0, 0, 0, 0, 0, 1130, 0, 0, 0, 0, 0, 1597, 0, 0, 0, 1600, 0, 0, 1603, 0, 0, 0, 0, 0, 843, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 540, 3320, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1801, 540, 540, 540, 1806, 540, 540, 0, 1267, 0, 0, 0, 0, 0, 1267, 0, 0, 1149, 1267, 0, 1274, 540, 540, 540, 540, 1282, 540, 540, 540, 1291, 540, 540, 540, 540, 540, 540, 540, 540, 2204, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2830, 540, 540, 540, 540, 540, 540, 540, 1279, 540, 540, 540, 540, 1285, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2194, 540, 540, 540, 540, 540, 540, 1306, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1317, 540, 540, 540, 540, 540, 2567, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2545, 540, 540, 540, 540, 1321, 540, 540, 540, 540, 540, 540, 540, 1327, 540, 540, 540, 1334, 1336, 540, 540, 540, 540, 1310, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1335, 540, 540, 540, 1360, 914, 1362, 561, 561, 561, 561, 1368, 561, 561, 561, 561, 1374, 561, 561, 561, 561, 1407, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2293, 561, 561, 561, 561, 561, 561, 1406, 561, 561, 561, 561, 1411, 561, 561, 561, 561, 561, 561, 561, 561, 1852, 561, 561, 561, 561, 561, 561, 561, 561, 1866, 561, 561, 561, 561, 561, 561, 561, 1418, 561, 561, 561, 1425, 1427, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1865, 561, 561, 561, 561, 561, 561, 561, 561, 1883, 561, 561, 561, 561, 561, 561, 561, 1459, 585, 585, 585, 585, 1465, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1533, 585, 585, 585, 585, 585, 1486, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1497, 585, 585, 585, 585, 585, 585, 1034, 585, 585, 585, 585, 1052, 585, 585, 585, 561, 1502, 585, 585, 585, 585, 585, 585, 585, 585, 1509, 585, 585, 585, 1516, 1518, 585, 585, 585, 585, 585, 2685, 585, 585, 585, 585, 2689, 585, 585, 585, 2694, 585, 561, 0, 1290, 1544, 1470, 1379, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 3249, 561, 3251, 561, 561, 561, 561, 561, 561, 561, 585, 3534, 585, 3535, 585, 585, 585, 3539, 585, 0, 1575, 0, 0, 0, 1581, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1632, 0, 0, 0, 0, 0, 1592, 1593, 0, 0, 0, 0, 0, 1599, 0, 0, 0, 0, 0, 0, 0, 0, 1172, 0, 0, 0, 0, 0, 0, 0, 0, 1639, 0, 0, 0, 0, 0, 0, 0, 1647, 1648, 0, 0, 0, 0, 0, 0, 0, 2387968, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2987, 0, 0, 0, 0, 0, 2990, 0, 1655, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2482, 0, 0, 0, 1721, 0, 0, 0, 0, 0, 0, 0, 1718, 0, 0, 0, 0, 0, 0, 300, 300, 300, 300, 0, 300, 300, 300, 300, 300, 540, 540, 540, 1747, 540, 540, 540, 540, 1753, 540, 540, 540, 540, 540, 540, 540, 540, 1817, 540, 540, 540, 540, 540, 540, 1360, 540, 540, 540, 1764, 540, 540, 540, 540, 1768, 540, 540, 540, 540, 540, 540, 540, 540, 2178, 540, 540, 540, 540, 540, 540, 540, 540, 1287, 1294, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1779, 540, 540, 1783, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2206, 2207, 540, 540, 540, 540, 1809, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1379, 561, 0, 1074, 585, 585, 1050, 585, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 1106, 0, 0, 0, 0, 0, 0, 1210, 0, 561, 1845, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1856, 561, 561, 561, 561, 1423, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3253, 561, 561, 561, 561, 585, 561, 1860, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1871, 561, 561, 561, 561, 1424, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 26027, 1920, 585, 585, 585, 585, 1876, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3244, 561, 561, 585, 2026, 585, 585, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 286720, 0, 0, 0, 0, 2079, 2080, 0, 0, 2082, 2083, 0, 0, 0, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 3306, 0, 0, 0, 0, 0, 0, 2105, 0, 0, 0, 0, 2108, 2109, 0, 0, 0, 0, 0, 0, 301, 301, 301, 301, 0, 301, 301, 301, 301, 301, 2115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2796, 0, 0, 0, 2147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2781, 0, 0, 0, 0, 0, 2157, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 0, 540, 2225, 540, 540, 540, 540, 2230, 540, 540, 540, 540, 540, 540, 540, 540, 0, 0, 0, 0, 1696, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2070, 0, 0, 0, 0, 0, 2242, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2618, 561, 561, 561, 561, 561, 2259, 561, 561, 2263, 561, 561, 561, 2267, 561, 561, 561, 561, 561, 561, 3610, 561, 3611, 561, 561, 561, 585, 585, 585, 585, 0, 0, 0, 2030, 0, 1082, 0, 0, 0, 2032, 585, 2344, 585, 585, 2348, 585, 585, 585, 2352, 585, 585, 585, 585, 585, 585, 585, 1528, 585, 585, 585, 585, 585, 585, 1538, 585, 585, 585, 585, 2361, 585, 585, 2364, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1935, 1936, 585, 585, 585, 585, 1943, 585, 585, 2400, 585, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 540, 2718, 540, 540, 0, 0, 0, 2437, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2794, 0, 0, 0, 0, 2473, 0, 0, 0, 2477, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1685, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2511, 0, 540, 540, 2525, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2532, 540, 540, 540, 540, 1324, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1330, 540, 540, 540, 540, 540, 540, 2550, 540, 540, 2552, 540, 2553, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2193, 540, 540, 2196, 540, 540, 540, 540, 2563, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2574, 540, 540, 540, 540, 2827, 2828, 540, 540, 540, 540, 2831, 540, 540, 540, 540, 540, 540, 540, 1751, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1351, 540, 540, 540, 540, 540, 540, 0, 0, 0, 561, 561, 2587, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2264, 561, 561, 561, 561, 2269, 561, 561, 561, 2594, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2871, 561, 561, 2609, 561, 561, 561, 2612, 561, 561, 2614, 561, 2615, 561, 561, 561, 561, 561, 929, 561, 937, 561, 561, 561, 561, 561, 561, 561, 561, 2629, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2623, 561, 561, 2627, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2290, 2291, 561, 561, 561, 561, 561, 561, 561, 0, 2327, 585, 585, 585, 585, 585, 585, 585, 1507, 585, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585, 561, 3284, 540, 3286, 561, 561, 561, 561, 2638, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3099, 561, 561, 561, 0, 0, 2733, 2734, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3002, 0, 0, 0, 2785, 0, 2787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2432, 0, 0, 0, 0, 0, 0, 2800, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 540, 3217, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3042, 540, 3044, 540, 540, 540, 540, 540, 540, 2848, 540, 540, 540, 0, 0, 561, 561, 561, 561, 561, 561, 561, 2318, 561, 561, 561, 561, 561, 0, 0, 0, 561, 561, 2859, 561, 2862, 561, 561, 561, 561, 2867, 561, 561, 561, 2870, 561, 561, 561, 561, 2302, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 940, 561, 561, 561, 561, 561, 561, 561, 561, 1394, 561, 561, 561, 561, 561, 561, 561, 1402, 561, 561, 561, 2896, 561, 561, 561, 0, 0, 585, 585, 585, 585, 585, 585, 585, 1529, 585, 585, 585, 585, 585, 585, 585, 585, 2661, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2907, 585, 2910, 585, 585, 585, 585, 2915, 585, 585, 585, 2918, 585, 585, 585, 585, 585, 1527, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2367, 585, 585, 585, 585, 585, 585, 585, 585, 2944, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 561, 561, 585, 585, 3373, 0, 0, 0, 3375, 0, 0, 2980, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2979, 2991, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3005, 0, 3006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2989, 0, 561, 561, 561, 561, 3078, 561, 561, 561, 561, 561, 561, 561, 561, 3086, 561, 561, 561, 561, 2315, 561, 561, 561, 561, 561, 561, 561, 561, 0, 0, 2327, 0, 0, 0, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3273, 585, 585, 585, 585, 585, 585, 561, 561, 585, 585, 585, 3107, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1969, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3119, 585, 585, 585, 585, 585, 585, 585, 585, 3127, 585, 585, 585, 585, 585, 1901, 540, 585, 585, 561, 540, 540, 540, 540, 561, 561, 3065, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3479, 585, 585, 585, 585, 585, 0, 3159, 0, 0, 0, 0, 0, 0, 0, 3165, 0, 0, 0, 0, 0, 0, 0, 3176, 0, 0, 3304, 0, 0, 0, 0, 0, 0, 3191, 0, 0, 0, 0, 0, 0, 3195, 3196, 0, 0, 0, 0, 540, 540, 3601, 540, 3602, 540, 540, 540, 540, 540, 540, 540, 540, 1752, 540, 540, 540, 540, 540, 540, 540, 540, 1349, 540, 540, 540, 540, 540, 540, 540, 540, 1288, 540, 540, 540, 540, 540, 540, 540, 540, 1289, 540, 540, 540, 540, 540, 540, 540, 540, 1290, 540, 540, 540, 540, 1300, 540, 540, 3279, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585, 561, 540, 540, 561, 561, 561, 561, 2611, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2304, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1853, 561, 561, 561, 561, 561, 561, 540, 540, 540, 540, 3317, 540, 540, 540, 3321, 540, 540, 540, 540, 540, 540, 540, 540, 2192, 540, 540, 540, 540, 540, 540, 2198, 561, 561, 561, 3339, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2628, 561, 561, 561, 561, 561, 561, 561, 561, 2305, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3348, 561, 561, 561, 585, 585, 585, 585, 585, 3353, 585, 585, 585, 3357, 561, 561, 3572, 561, 561, 561, 561, 561, 561, 561, 561, 3580, 585, 585, 585, 3584, 3597, 0, 3598, 3599, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3605, 3606, 540, 540, 540, 540, 2837, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1803, 540, 540, 540, 540, 585, 585, 585, 585, 585, 3619, 3620, 585, 561, 0, 0, 3623, 0, 0, 0, 540, 585, 585, 561, 540, 540, 895, 540, 540, 561, 561, 967, 561, 561, 3671, 585, 3672, 0, 540, 561, 585, 0, 540, 561, 585, 0, 540, 561, 585, 585, 585, 585, 585, 1079, 1559, 0, 0, 0, 1565, 0, 0, 0, 1571, 2033, 0, 0, 0, 0, 1577, 2035, 0, 0, 0, 0, 0, 0, 0, 1682, 0, 1684, 0, 0, 0, 0, 0, 0, 0, 1712, 0, 0, 1715, 0, 0, 0, 0, 0, 355, 356, 0, 0, 0, 0, 0, 0, 0, 362, 0, 290, 0, 0, 0, 0, 0, 0, 2762, 0, 0, 0, 0, 0, 0, 0, 2768, 0, 0, 0, 0, 389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3198, 0, 540, 540, 473, 473, 487, 0, 0, 487, 356, 356, 356, 509, 356, 356, 356, 356, 473, 473, 580, 580, 580, 580, 580, 580, 580, 604, 604, 604, 557, 604, 604, 604, 604, 604, 580, 580, 557, 580, 604, 580, 604, 1, 12290, 3, 78112, 540, 870, 540, 540, 540, 540, 540, 540, 540, 540, 540, 904, 540, 540, 540, 540, 540, 540, 2191, 540, 540, 540, 540, 2195, 540, 2197, 540, 540, 561, 561, 976, 561, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 585, 1013, 1197, 0, 0, 0, 0, 0, 0, 0, 1197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 540, 540, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 561, 1371, 561, 561, 561, 1380, 561, 561, 561, 561, 2639, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2644, 561, 561, 561, 561, 585, 585, 585, 1462, 585, 585, 585, 1471, 585, 585, 585, 585, 585, 585, 585, 585, 1472, 585, 1477, 585, 585, 1481, 585, 585, 1541, 561, 0, 1291, 585, 1471, 1380, 540, 540, 540, 540, 540, 561, 561, 561, 561, 585, 585, 585, 585, 0, 0, 0, 0, 2727, 0, 0, 0, 0, 0, 1576, 0, 0, 0, 1582, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2737, 0, 0, 0, 0, 0, 2741, 0, 1607, 0, 0, 0, 0, 0, 0, 0, 1615, 1616, 0, 0, 0, 0, 0, 0, 303, 204800, 204800, 0, 205103, 204800, 1, 12290, 3, 0, 1761, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1774, 1891, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3087, 561, 561, 561, 561, 1911, 561, 561, 561, 561, 561, 561, 26027, 0, 585, 585, 585, 585, 585, 585, 1466, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2928, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1947, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2001, 585, 585, 585, 585, 585, 585, 585, 1960, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1973, 0, 0, 2243, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2634, 561, 561, 2328, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2384, 0, 0, 0, 0, 2425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2085, 2086, 0, 0, 0, 0, 2449, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3175, 0, 0, 0, 0, 561, 561, 561, 561, 561, 561, 2590, 561, 561, 561, 561, 561, 561, 2289, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2292, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2861, 561, 2863, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2877, 561, 561, 561, 561, 561, 561, 561, 561, 1899, 561, 561, 561, 561, 561, 1905, 561, 585, 585, 585, 2909, 585, 2911, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1984, 585, 585, 585, 585, 585, 585, 585, 3360, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1056, 585, 561, 0, 3556, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3567, 540, 561, 561, 561, 561, 2876, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 26027, 0, 585, 585, 585, 585, 561, 561, 561, 561, 3656, 561, 585, 585, 585, 585, 3660, 585, 0, 0, 0, 0, 0, 0, 2775, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2124, 0, 0, 0, 0, 0, 0, 0, 0, 357, 0, 0, 0, 0, 0, 0, 362, 0, 290, 0, 0, 0, 0, 0, 0, 2790, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1147354, 0, 0, 0, 0, 0, 0, 0, 357, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2509, 0, 0, 357, 0, 367, 0, 0, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2457, 0, 0, 581, 581, 581, 581, 581, 581, 581, 605, 605, 605, 558, 605, 605, 605, 605, 605, 581, 581, 558, 581, 605, 581, 605, 1, 12290, 3, 78112, 865, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2575, 1385, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3243, 561, 1775, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3047, 585, 585, 585, 585, 1961, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2380, 585, 585, 585, 585, 2756, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3315, 0, 2981, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3188, 0, 3298, 0, 3299, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3388, 0, 0, 0, 0, 358, 359, 360, 361, 0, 0, 362, 0, 290, 0, 0, 0, 0, 0, 0, 2973, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 362, 702, 0, 0, 0, 0, 359, 0, 358, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 425, 65536, 0, 0, 0, 0, 1710, 1711, 0, 0, 0, 1714, 0, 0, 0, 0, 0, 1718, 425, 425, 0, 425, 0, 359, 425, 0, 456, 0, 0, 0, 0, 0, 0, 0, 1102, 0, 0, 0, 0, 1263, 1264, 0, 0, 0, 0, 0, 497, 497, 0, 504, 504, 504, 504, 510, 511, 504, 504, 524, 524, 524, 524, 456, 456, 456, 456, 456, 456, 456, 456, 524, 524, 524, 524, 524, 524, 524, 559, 582, 559, 582, 559, 559, 582, 559, 606, 582, 582, 582, 582, 582, 582, 582, 606, 606, 606, 559, 606, 606, 606, 606, 606, 582, 582, 620, 625, 606, 625, 631, 1, 12290, 3, 78112, 0, 0, 0, 540, 585, 585, 561, 540, 540, 900, 540, 540, 561, 561, 972, 561, 561, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 585, 585, 1934, 585, 585, 585, 585, 585, 585, 585, 0, 0, 2104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2740, 0, 0, 0, 0, 0, 561, 2245, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3533, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3494, 561, 0, 0, 0, 0, 0, 0, 585, 2330, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1482, 585, 585, 540, 2549, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2237, 0, 540, 540, 2577, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 0, 0, 0, 0, 0, 1611, 0, 0, 1614, 0, 0, 0, 0, 0, 0, 0, 443, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2891776, 0, 0, 0, 0, 0, 2392064, 583, 583, 583, 583, 583, 583, 583, 607, 607, 607, 560, 607, 607, 607, 607, 607, 583, 583, 560, 583, 607, 583, 607, 1, 12290, 3, 78112, 705, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155648, 866, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3224, 1136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 0, 0, 0, 0, 0, 1659, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 780, 0, 0, 0, 0, 786, 561, 585, 585, 585, 585, 585, 1079, 1560, 0, 0, 0, 1566, 0, 0, 0, 1572, 0, 0, 0, 1578, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3313, 0, 0, 540, 2199, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2547, 540, 2535, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2822, 540, 561, 561, 561, 2597, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2317, 561, 561, 2320, 2321, 561, 561, 0, 0, 0, 0, 0, 0, 647, 0, 0, 0, 0, 0, 0, 743, 540, 540, 540, 540, 540, 540, 540, 3331, 540, 540, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3072, 561, 561, 561, 0, 0, 0, 540, 585, 585, 561, 1064, 540, 540, 905, 540, 1069, 561, 561, 977, 561, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 585, 585, 1951, 585, 585, 585, 585, 585, 585, 585, 0, 0, 1594, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2767, 0, 0, 561, 561, 1846, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2645, 561, 561, 585, 585, 585, 1977, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2692, 585, 585, 585, 540, 540, 540, 2188, 540, 2190, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 561, 561, 561, 3334, 561, 561, 0, 0, 0, 561, 561, 561, 2247, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2613, 561, 561, 561, 561, 561, 561, 561, 2619, 561, 561, 2273, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3242, 561, 561, 0, 585, 585, 585, 2332, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2408, 540, 585, 585, 561, 561, 2647, 0, 0, 0, 0, 0, 0, 585, 585, 585, 585, 585, 585, 585, 585, 2687, 585, 585, 2691, 585, 585, 585, 585, 585, 585, 585, 585, 2684, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2916, 585, 585, 585, 585, 561, 561, 585, 585, 585, 585, 585, 3109, 585, 585, 585, 585, 585, 585, 585, 585, 2702, 585, 585, 585, 585, 585, 585, 585, 0, 1134592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225706, 0, 0, 1134592, 0, 0, 0, 1134592, 1134592, 0, 0, 1134592, 0, 0, 1134592, 0, 1134592, 0, 0, 0, 1134592, 1135005, 1135005, 0, 0, 0, 0, 0, 1135005, 0, 1134592, 1134592, 0, 0, 0, 0, 1135202, 1135202, 1135202, 1135202, 1134592, 1135202, 1135202, 1135202, 1135202, 1135202, 0, 1134592, 1134592, 1134592, 1134592, 1135202, 1134592, 1135202, 1, 12290, 3, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 0, 1138688, 0, 0, 0, 0, 0, 1670, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2125824, 2126738, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 987, 2125824, 2125824, 2125824, 2125824, 2424832, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 457, 457, 1147354, 457, 457, 457, 457, 457, 457, 457, 457, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2792, 0, 0, 0, 0, 0, 0, 457, 0, 0, 0, 1147354, 1147354, 1147354, 1147405, 1147405, 1147354, 1147405, 1147405, 1, 12290, 3, 0, 0, 0, 0, 2042, 0, 0, 2045, 2046, 0, 0, 0, 2050, 0, 0, 0, 0, 0, 680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1221, 0, 0, 0, 0, 0, 0, 1142784, 0, 2179072, 2125824, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3137536, 2125824, 2940928, 2940928, 2940928, 0, 0, 0, 0, 0, 0, 305, 440, 448, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 1159168, 0, 0, 1159168, 0, 1159168, 1159168, 0, 1159168, 0, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2802, 0, 540, 540, 540, 540, 540, 1159168, 1159168, 0, 1159168, 1159168, 0, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 0, 1159168, 1159168, 0, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1, 12290, 3, 0, 0, 0, 0, 2053, 0, 2054, 0, 0, 0, 0, 0, 0, 0, 0, 0, 799, 0, 799, 0, 0, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1163264, 0, 0, 0, 0, 0, 155648, 155648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 0, 913, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 1452, 2125824, 2125824, 2125824, 2125824, 2424832, 106496, 0, 106496, 106496, 0, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 0, 0, 106496, 0, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2782, 2783, 0, 0, 0, 0, 3117056, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163840, 0, 0, 0, 0, 3043328, 0, 3149824, 2936832, 0, 2760704, 0, 0, 0, 0, 0, 2953216, 0, 0, 2826240, 2875392, 0, 0, 0, 0, 0, 0, 2834432, 0, 3227648, 2568192, 0, 0, 0, 0, 2564096, 0, 2748416, 2879488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 3137536, 2125824, 2125824, 2498560, 2125824, 2125824, 2125824, 2555904, 2564096, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2654208, 2678784, 2760704, 2764800, 2785280, 2854912, 2969600, 2125824, 3006464, 2125824, 3018752, 2125824, 2125824
+[ 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 25651, 25666, 25670, 25670, 25670, 18189, 25670, 25670, 25670, 25670, 18201, 25670, 25670, 25670, 25670, 18176, 25670, 25671, 18217, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 42516, 25917, 18730, 20976, 20988, 20999, 21015, 25420, 18732, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 31122, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 21056, 21084, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23286, 21107, 42516, 42516, 42516, 39416, 42516, 42516, 43470, 47286, 25568, 42516, 42516, 42516, 42516, 23672, 41495, 21126, 21160, 42516, 42516, 42516, 27632, 42516, 42516, 35938, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 25556, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21176, 21248, 42516, 42516, 42516, 50595, 42516, 42516, 42445, 42516, 25917, 23619, 21211, 21279, 21269, 21226, 21240, 44419, 21040, 42516, 42516, 42516, 27632, 21302, 42516, 32247, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 19871, 21321, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 21344, 26008, 18612, 18632, 18596, 21349, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42510, 42516, 42516, 42516, 48894, 42515, 42516, 51366, 42516, 21365, 42504, 21403, 42515, 21410, 42516, 27599, 27612, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 48069, 21426, 42516, 42516, 42516, 22170, 42516, 42516, 21445, 42516, 42516, 21468, 21481, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 42516, 24484, 42516, 42516, 42516, 42516, 42516, 42516, 42517, 21497, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 21513, 25598, 18486, 18508, 51408, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 25358, 21538, 42516, 42516, 42516, 29996, 42516, 42516, 26519, 46446, 25383, 42516, 42516, 42516, 42516, 25736, 28473, 18232, 21557, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 21573, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 19060, 21591, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23074, 23089, 21619, 21619, 21619, 21672, 21614, 21619, 21624, 23096, 21640, 21745, 21688, 21665, 21655, 21732, 21703, 21716, 21040, 42516, 42516, 42516, 33326, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 21761, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 45317, 42516, 42516, 42516, 49458, 21798, 42516, 22640, 21804, 25917, 45316, 42516, 21821, 21844, 21828, 21860, 21869, 21885, 42516, 42516, 42516, 29550, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 21901, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 21944, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 26308, 36543, 25445, 25454, 21937, 25455, 21960, 21985, 21998, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 18888, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 26329, 37275, 42655, 22014, 22031, 22014, 22046, 42653, 22015, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 22071, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 26891, 42516, 42516, 42516, 48069, 22092, 42516, 23653, 22130, 40293, 22116, 22186, 22191, 22191, 22207, 26888, 44587, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 18247, 42516, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 42516, 25917, 35843, 22232, 22249, 22232, 22264, 35841, 22233, 22289, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 46363, 42516, 33841, 42516, 34304, 43899, 22305, 22071, 36154, 42516, 42516, 42516, 42516, 28243, 22657, 22322, 22657, 22657, 22341, 33347, 46316, 46316, 39789, 38147, 35514, 38147, 38147, 22359, 22382, 42516, 42516, 42516, 42516, 42516, 28815, 42516, 22405, 22426, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 47355, 26569, 42516, 42516, 42516, 42516, 42516, 45225, 42516, 42516, 32981, 50880, 22657, 22657, 22657, 30360, 22467, 39622, 46316, 22501, 46316, 22343, 36422, 42625, 38147, 22520, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 49148, 42516, 23255, 22657, 44467, 22657, 22657, 30361, 22539, 42077, 46316, 46316, 46316, 30525, 38147, 40186, 38147, 38147, 34440, 41769, 42516, 42516, 20027, 37487, 42516, 28242, 22657, 22657, 36250, 37745, 46316, 46316, 44329, 37798, 38147, 38147, 43834, 27827, 30836, 42516, 42516, 19405, 22558, 38368, 22576, 22657, 40730, 22597, 46316, 36583, 22617, 38147, 40469, 22638, 42516, 25905, 42516, 34153, 22656, 33064, 46073, 46316, 22674, 22710, 27827, 22690, 51145, 42516, 32408, 22729, 37572, 22752, 32120, 22683, 29050, 30609, 22771, 38961, 22813, 36803, 22874, 22893, 22911, 28238, 43147, 27775, 22913, 22451, 22736, 46400, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 50215, 25917, 42516, 42516, 42516, 42516, 42516, 45715, 23059, 23112, 42516, 42516, 42516, 27632, 42516, 42516, 37325, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 23128, 46363, 42516, 42516, 42516, 34304, 42516, 42516, 18360, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 22341, 46316, 46316, 46316, 39789, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 28815, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 23154, 42516, 42516, 42516, 46371, 42516, 42516, 42516, 42516, 25917, 35960, 23175, 23206, 23195, 23229, 35959, 23179, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 27227, 42516, 43023, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 23254, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 19968, 25917, 42516, 42516, 42516, 42516, 42516, 42762, 23271, 23302, 42516, 42516, 42516, 27632, 42516, 42516, 21380, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 23318, 46363, 42516, 42516, 42516, 34304, 42516, 42516, 23344, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 22341, 46316, 46316, 46316, 39789, 38147, 38147, 38147, 38147, 40896, 23370, 23409, 42516, 42516, 42516, 42516, 38331, 23429, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 23450, 23383, 42516, 42516, 42516, 42516, 42516, 23487, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 50700, 22540, 46316, 46316, 46316, 46316, 47852, 30533, 38147, 38147, 38147, 38147, 27826, 35762, 23510, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 29796, 22539, 46316, 46316, 46316, 46316, 23533, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 46191, 46316, 46316, 46316, 32038, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 48371, 42516, 42516, 42516, 31492, 32078, 42516, 42516, 23557, 25917, 18721, 49121, 23587, 23594, 23610, 42516, 43878, 23635, 23651, 42516, 42516, 33439, 23669, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 25038, 24355, 23991, 25028, 23804, 18270, 40105, 18293, 23688, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 23724, 24084, 23749, 23789, 24317, 23827, 23849, 23904, 24015, 23917, 23946, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 23969, 24689, 24310, 25086, 25092, 23974, 23990, 24416, 24845, 24007, 23833, 24977, 24993, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 24031, 23930, 24046, 24073, 24057, 24100, 24137, 24664, 24240, 24198, 24251, 24225, 24986, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 24267, 24283, 24299, 24348, 24333, 24371, 24167, 24428, 24402, 23773, 24444, 24474, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 24500, 24558, 24572, 24588, 24604, 24182, 24745, 24620, 24636, 24767, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19514, 24680, 24514, 19528, 24705, 24152, 24757, 19947, 19984, 20043, 20080, 20119, 20157, 20667, 24542, 24528, 24731, 24830, 24209, 24939, 20235, 20264, 20301, 24783, 24799, 24815, 24715, 24861, 20381, 20397, 19814, 23733, 24877, 24893, 20503, 25039, 24968, 23864, 24927, 24955, 25015, 20652, 18443, 23763, 24386, 25055, 24651, 25071, 25108, 25159, 25175, 25191, 25243, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 27003, 42516, 42516, 42516, 48069, 25296, 42516, 42516, 25291, 40518, 25312, 25320, 25320, 25320, 25327, 27168, 25343, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25399, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 18963, 25373, 18652, 18689, 18711, 18748, 18695, 25415, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 19337, 25436, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 25471, 25509, 25525, 20579, 19301, 19596, 25541, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 25584, 19614, 19632, 19650, 25620, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 42516, 21541, 28730, 28739, 28739, 28739, 28746, 47533, 25636, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 27653, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 25687, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51268, 23158, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 42516, 25917, 22795, 25710, 25710, 25710, 25717, 23159, 22797, 21040, 25733, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 44769, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 25752, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 26066, 26075, 42516, 42516, 42516, 42907, 42516, 42516, 42516, 42516, 25917, 26405, 25775, 25775, 25775, 25782, 28588, 26407, 25798, 25814, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 23413, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 25831, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 25857, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 25891, 42516, 42516, 42516, 42516, 48069, 25942, 42516, 42516, 28970, 33768, 42516, 42516, 42516, 25933, 25960, 26180, 25944, 25980, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 27927, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 25996, 26028, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 42516, 41865, 26051, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 23487, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 26115, 26152, 42516, 42516, 42516, 42516, 42516, 23487, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 35762, 23510, 42516, 42516, 42516, 42516, 26178, 42516, 23255, 22657, 22657, 22657, 22657, 22877, 22539, 46316, 46316, 46316, 46316, 32774, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 46191, 46316, 46316, 46316, 32038, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 23464, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 23487, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 26115, 26152, 42516, 42516, 42516, 42516, 42516, 23487, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 35762, 23510, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 22877, 22539, 46316, 46316, 46316, 46316, 32774, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 46191, 46316, 46316, 46316, 32038, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 23487, 26196, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 26115, 26152, 42516, 42516, 42516, 42516, 42516, 23487, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 35762, 23510, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 22877, 22539, 46316, 46316, 46316, 46316, 32774, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 46191, 46316, 46316, 46316, 32038, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 23487, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 26115, 26152, 42516, 42516, 42516, 42516, 42516, 26216, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 35762, 23510, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 22877, 22539, 46316, 46316, 46316, 46316, 32774, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 46191, 46316, 46316, 46316, 32038, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 31151, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 31154, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 23487, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 26115, 26152, 42516, 42516, 42516, 42516, 42516, 23487, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 35762, 23510, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 22877, 22539, 46316, 46316, 46316, 46316, 32774, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 46191, 46316, 46316, 46316, 32038, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 22786, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26258, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 48694, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 28605, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 47769, 26274, 26287, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 26303, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 26324, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 42516, 25917, 35004, 26345, 26373, 26362, 26396, 35005, 26346, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 37963, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 26423, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 42516, 42516, 42517, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 42516, 25917, 47727, 42516, 26460, 26483, 26467, 42516, 47735, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 26499, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 26535, 20397, 20422, 20606, 20438, 26551, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 29068, 42516, 42516, 42516, 51537, 26585, 26616, 29663, 26601, 26633, 26690, 26699, 26715, 26730, 26742, 26758, 26771, 26099, 19999, 42516, 26787, 26162, 26806, 41856, 26832, 26883, 26907, 26946, 30733, 26962, 26998, 27019, 27054, 46783, 31896, 27070, 46885, 46348, 36728, 27120, 42516, 42516, 34304, 27137, 37896, 42516, 27163, 34995, 39190, 42516, 27184, 43650, 22657, 22657, 22657, 27203, 27401, 46316, 46316, 41985, 48318, 38147, 38147, 38147, 37213, 40896, 22382, 42516, 27222, 48046, 42516, 27243, 27263, 27280, 42516, 42516, 27038, 20763, 27308, 27328, 22657, 22657, 27363, 27386, 27419, 35266, 46316, 30482, 27448, 27495, 27524, 27566, 38147, 35889, 38740, 46095, 27585, 26152, 27628, 42516, 45564, 42516, 47310, 23487, 42516, 46936, 27648, 27669, 27685, 34339, 22657, 27729, 22984, 44673, 27748, 45967, 46316, 27773, 39768, 32782, 27791, 37607, 38147, 27824, 22485, 27843, 27859, 27882, 27899, 42516, 27922, 31758, 27943, 23255, 33056, 27962, 22657, 42185, 33093, 27982, 30091, 46316, 35423, 43042, 32774, 28017, 38147, 38147, 42363, 28033, 23138, 28062, 40096, 28115, 41486, 28137, 21969, 22956, 28160, 22657, 46191, 35558, 28176, 28197, 32038, 49740, 47969, 28214, 27827, 28233, 42899, 42516, 21253, 42516, 38368, 42934, 43766, 40730, 37393, 48025, 36583, 51021, 44713, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 28260, 28298, 33550, 28320, 28341, 28379, 28401, 28421, 26921, 40729, 36585, 44924, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 28445, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 31409, 28464, 42516, 28489, 28496, 28512, 28528, 28541, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 42942, 46314, 28557, 30860, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 28583, 23487, 28604, 45602, 42516, 42516, 38368, 22657, 22657, 22657, 44648, 28621, 22541, 46316, 46316, 46316, 40008, 44805, 38147, 38147, 38147, 38147, 41449, 32923, 26115, 26152, 42516, 42516, 42516, 42516, 42516, 23487, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 35762, 23510, 42516, 32305, 42516, 42516, 28652, 43395, 23255, 28671, 22657, 22657, 22657, 28690, 28706, 46316, 46316, 46316, 37589, 32774, 28762, 38147, 38147, 38147, 44356, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 46191, 46316, 46316, 46316, 32038, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 23013, 26674, 44310, 41661, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 28784, 42516, 42516, 51537, 42516, 28813, 42516, 28831, 36313, 28851, 28860, 28876, 28891, 28903, 28919, 28932, 26099, 42516, 42516, 33807, 29427, 42516, 42516, 28948, 42516, 28965, 42516, 42516, 42516, 25275, 42516, 28986, 44283, 46314, 29021, 22622, 37863, 32069, 42516, 29066, 42516, 34304, 29084, 49128, 42516, 45291, 29103, 36853, 42516, 39408, 30216, 37513, 22657, 22657, 22657, 29138, 29162, 46316, 46316, 48917, 29187, 29203, 38147, 38147, 40896, 22382, 23471, 42516, 42516, 37970, 42516, 41320, 23487, 39926, 29222, 42516, 42516, 38368, 29257, 38293, 22657, 29296, 38374, 29315, 31567, 38618, 38779, 46316, 44805, 42631, 29346, 29367, 48610, 38147, 32923, 26115, 26152, 42516, 42516, 35359, 42516, 36267, 23487, 42516, 42516, 42516, 38370, 22657, 22657, 38875, 29587, 30360, 22540, 46316, 46316, 49716, 48753, 22343, 30533, 38147, 38147, 47896, 47206, 27826, 35762, 29388, 42516, 42516, 42516, 29423, 42516, 29443, 23255, 22657, 22657, 22657, 43545, 22877, 22539, 46316, 46316, 49625, 46316, 32774, 38147, 38147, 38147, 29464, 34440, 41769, 42516, 42516, 19074, 42516, 46902, 29483, 22657, 45738, 22657, 46191, 46316, 28001, 46316, 32038, 38147, 48630, 38147, 27827, 29518, 29546, 42516, 39530, 20864, 38368, 29566, 29583, 46250, 46316, 29603, 36583, 29623, 29640, 40469, 42516, 42516, 42516, 29661, 38373, 22657, 29679, 46316, 51108, 36586, 38147, 50541, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 29702, 29722, 29738, 29754, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 34720, 29778, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 26790, 42516, 42516, 51537, 42516, 29812, 25227, 42516, 31450, 29831, 29840, 29856, 29871, 29878, 29894, 29907, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 31072, 31070, 42516, 32276, 32283, 40826, 29686, 35273, 29923, 34810, 28721, 42516, 35352, 29943, 34304, 42516, 29968, 36872, 42516, 42516, 29988, 30012, 34471, 30028, 22581, 34160, 30064, 24121, 30107, 48780, 30128, 30172, 30191, 29624, 22523, 47650, 28217, 40896, 22382, 42516, 42516, 42516, 42735, 42516, 30232, 23487, 42516, 42516, 42516, 27906, 38368, 22657, 22657, 22657, 26867, 38374, 22541, 46316, 46316, 46316, 37425, 44805, 38147, 38147, 38147, 38147, 30252, 50615, 30272, 30304, 42516, 42516, 42516, 30320, 30338, 23487, 42516, 42516, 27104, 21782, 30358, 30377, 22657, 22657, 30395, 30434, 30481, 30498, 46316, 46316, 30515, 51071, 30551, 30568, 38147, 38147, 30585, 35762, 23510, 42516, 42516, 42516, 42516, 42516, 30625, 23255, 30648, 22657, 22657, 30668, 22877, 30687, 46316, 46316, 34855, 46316, 32837, 38147, 38147, 43217, 38147, 34440, 41769, 45029, 42516, 30729, 42516, 21024, 28242, 29299, 22657, 30749, 46191, 50174, 46316, 30776, 32038, 38147, 30812, 48472, 27827, 22690, 23708, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 37071, 42516, 42516, 38373, 22657, 31523, 46316, 43307, 36586, 38147, 39352, 22690, 34920, 42516, 38372, 43148, 46316, 38137, 38147, 30829, 36804, 38368, 28385, 28404, 30535, 27085, 28354, 31634, 30852, 30600, 30074, 38197, 42103, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 21805, 30876, 42516, 51537, 49762, 30895, 42516, 30918, 43094, 30942, 30951, 30967, 30982, 30994, 31010, 31023, 26099, 42516, 31039, 39573, 31055, 20844, 31088, 31151, 40795, 31438, 31118, 31138, 31170, 31208, 31224, 31259, 31325, 39316, 31341, 31357, 42305, 39859, 31243, 31397, 39944, 31425, 33906, 31466, 31484, 36903, 42516, 42516, 38844, 42516, 28243, 31508, 40831, 43064, 26242, 31546, 31583, 49551, 32501, 35578, 43001, 31607, 35023, 30465, 31623, 22382, 40777, 39000, 31658, 40711, 31716, 41838, 31747, 42230, 41234, 31783, 31813, 31829, 31873, 31912, 31936, 31952, 31988, 32019, 35868, 32054, 38034, 47598, 32094, 32110, 32136, 39813, 32152, 32186, 47170, 32233, 26152, 32263, 42516, 49503, 42516, 32299, 32321, 32337, 32365, 32386, 32406, 32424, 22657, 35078, 32463, 30760, 22540, 32487, 46316, 47681, 50971, 43200, 30533, 32517, 38147, 37625, 38481, 40265, 32560, 23510, 18666, 32576, 32596, 39698, 32624, 37664, 32645, 31965, 32706, 47478, 32693, 32731, 32762, 40433, 46316, 32798, 32825, 32774, 32853, 32872, 49013, 32893, 32919, 41769, 42516, 21429, 46706, 42516, 42516, 32939, 25143, 43551, 27695, 46191, 47568, 50517, 33128, 32038, 44391, 37914, 44027, 27827, 22690, 51501, 22158, 32960, 23571, 32997, 33045, 33080, 33109, 33144, 33160, 33196, 33225, 33259, 33289, 25257, 41794, 33305, 33321, 22943, 47433, 44826, 33342, 33363, 33392, 45913, 37247, 22690, 23238, 33434, 38372, 47456, 46316, 49977, 38147, 33455, 33478, 32944, 28385, 33515, 33536, 30206, 38372, 33571, 38971, 31372, 39304, 33587, 33611, 33627, 33643, 33674, 33720, 28385, 36584, 33273, 33742, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 33784, 42516, 51537, 33805, 33823, 29972, 43389, 33866, 33897, 42516, 33882, 33940, 33947, 33963, 33976, 26099, 42516, 42516, 20279, 27632, 42516, 42516, 42516, 42516, 42516, 41269, 42516, 41261, 42516, 41268, 25123, 41628, 38176, 37400, 33992, 34810, 28721, 42516, 34012, 42516, 34304, 34012, 42516, 42516, 42516, 34029, 34013, 37295, 42516, 28243, 34045, 22657, 22657, 22657, 34069, 34103, 46316, 46316, 48318, 47159, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 23487, 42516, 42516, 45931, 42516, 38368, 22657, 22657, 22657, 44213, 38374, 22541, 46316, 46316, 46316, 42968, 44805, 38147, 38147, 38147, 38147, 34120, 32923, 26115, 26152, 42516, 42516, 42516, 42516, 42516, 23487, 42516, 46602, 42516, 38370, 22657, 22657, 30041, 22657, 30360, 22540, 46316, 46316, 42268, 46316, 22343, 30533, 38147, 38147, 44000, 38147, 27826, 35762, 23510, 42516, 42516, 42516, 42516, 42516, 39273, 23255, 22657, 22657, 22657, 37139, 22877, 22539, 46316, 46316, 49643, 46316, 32774, 38147, 38147, 38147, 48815, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 46191, 46316, 46316, 46316, 32038, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 46733, 42516, 42516, 42516, 36647, 22657, 28384, 27995, 46316, 49984, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 44874, 43254, 31692, 29762, 34139, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 38852, 42516, 42516, 51280, 34176, 34185, 34201, 34208, 34215, 34231, 34244, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 34401, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 37878, 42057, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 34260, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 34278, 42516, 28081, 38368, 22657, 22657, 22657, 22657, 38374, 42076, 46316, 46316, 46316, 46316, 46212, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 47761, 42516, 34299, 19108, 42516, 42516, 19113, 34320, 22657, 22657, 34338, 22657, 30360, 22540, 46316, 34104, 46316, 46316, 22343, 30533, 38147, 42837, 38147, 38147, 27826, 34355, 42516, 42516, 42516, 34399, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 38663, 42516, 34417, 28242, 22657, 22657, 38760, 37745, 46316, 46316, 50996, 37798, 38147, 38147, 38147, 34438, 22690, 34456, 18364, 34487, 34538, 24114, 31309, 31274, 34559, 34565, 27432, 34581, 44559, 30458, 34604, 22076, 42516, 19757, 34657, 29792, 34679, 47804, 33555, 31559, 34736, 35451, 34758, 22690, 41150, 39051, 35676, 32439, 38610, 34776, 34795, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 34833, 34871, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 18277, 42516, 42516, 34899, 42516, 42516, 42516, 36062, 42516, 36065, 42516, 42516, 34947, 34936, 36697, 22657, 34963, 27757, 38148, 48007, 34986, 42516, 42516, 29815, 34304, 21387, 19116, 42516, 38636, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 43325, 22657, 27401, 46316, 46316, 30705, 48318, 38147, 38147, 38147, 35021, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 35376, 42516, 35039, 38368, 22657, 22657, 22657, 22657, 50945, 22541, 46316, 46316, 46316, 46316, 38717, 38147, 38147, 38147, 38147, 38147, 41757, 22444, 42516, 35059, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 39196, 38370, 35077, 22657, 22657, 22657, 30360, 46821, 46316, 46316, 46316, 46316, 22343, 23541, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 50318, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 46040, 30361, 22539, 46316, 46316, 46316, 34080, 30525, 38147, 38147, 38147, 42204, 34440, 41769, 42516, 42516, 46608, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 23434, 42516, 22428, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 35094, 34920, 22560, 38372, 50497, 46316, 40393, 38147, 43581, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 44978, 42516, 51537, 30322, 33499, 42482, 50012, 50022, 18763, 18772, 35115, 35131, 35143, 35159, 35172, 26099, 42516, 42516, 42516, 36498, 41847, 42516, 42516, 42516, 31671, 41803, 35188, 36161, 35205, 35221, 43491, 35237, 35256, 29171, 35289, 37464, 35305, 42516, 42516, 42516, 35339, 42516, 28090, 35375, 42516, 42516, 28949, 35314, 39266, 28243, 48989, 48108, 22657, 35392, 47509, 37433, 35422, 34970, 35439, 27808, 35467, 38147, 35501, 35536, 22382, 42516, 35594, 39908, 48509, 34515, 35614, 42516, 18299, 18417, 42516, 35655, 35672, 48116, 22657, 43129, 29280, 37184, 22541, 48019, 46316, 38117, 35692, 47637, 38147, 35719, 38147, 35737, 27472, 35753, 22444, 42516, 42516, 42516, 42516, 35778, 48535, 35820, 42516, 42516, 42516, 23024, 36244, 22657, 22657, 29502, 38418, 35859, 41980, 46316, 46316, 48733, 41934, 49389, 35884, 38147, 38147, 40673, 49832, 35905, 42516, 36909, 35924, 35976, 35997, 18673, 36033, 34522, 36081, 47410, 36098, 36117, 36141, 36177, 46316, 36198, 32809, 43953, 30446, 38147, 43626, 42012, 36214, 36230, 23328, 20636, 45205, 36266, 36283, 36301, 35981, 36329, 26662, 46771, 36350, 36390, 48253, 35703, 36411, 36456, 40231, 38454, 41461, 37653, 42516, 42516, 37028, 36479, 40577, 43121, 45398, 22366, 37772, 48725, 38205, 36432, 50457, 40469, 42516, 25485, 42516, 36514, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 36626, 36531, 42516, 28996, 31885, 36559, 36579, 36602, 36619, 36804, 36642, 28385, 28404, 30535, 42423, 49897, 44263, 36663, 36694, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 36713, 36744, 34366, 22755, 31692, 28429, 36774, 36790, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 39935, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 29952, 39942, 19158, 38671, 36820, 36833, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 44206, 22657, 27401, 46316, 46317, 46316, 48318, 38147, 38147, 34588, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 19484, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 36849, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 36869, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 46294, 22657, 22657, 22657, 22657, 30360, 49232, 46316, 46316, 46316, 46316, 22343, 30796, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 46996, 42516, 51537, 42516, 23354, 42516, 42753, 36888, 36925, 36938, 36954, 36961, 36977, 36993, 37006, 26099, 42516, 37022, 42516, 27632, 42516, 41516, 26816, 42516, 42516, 37044, 42516, 37049, 18537, 37065, 37087, 37117, 44086, 37200, 37235, 39844, 33658, 37263, 42516, 42516, 35791, 42516, 42516, 34914, 28072, 42516, 37291, 22389, 37311, 18926, 37716, 37348, 43712, 48153, 37366, 37382, 46316, 37416, 40607, 40193, 49587, 35520, 37449, 27508, 37480, 37934, 42516, 42516, 42516, 42516, 41144, 42516, 42516, 42516, 42516, 42516, 38368, 37503, 36125, 22657, 37529, 39594, 37550, 37566, 48265, 46316, 37588, 30713, 29645, 37605, 37623, 38799, 38147, 37641, 22444, 42516, 42516, 37688, 42516, 42516, 49494, 24999, 42516, 42516, 42516, 38370, 22657, 22657, 29494, 37704, 37740, 22540, 46316, 46316, 40001, 37761, 37795, 30533, 38147, 38147, 37825, 37814, 37848, 41766, 42516, 37894, 42516, 42516, 51139, 42516, 42516, 23255, 22657, 41398, 22657, 22657, 30361, 22539, 42274, 46316, 46316, 46316, 30525, 38147, 37912, 38147, 38147, 34440, 41769, 37930, 36490, 42516, 34663, 37950, 28242, 37986, 22657, 22657, 46812, 38013, 46316, 46316, 45485, 49261, 38147, 38147, 48821, 22690, 49311, 42516, 42516, 38050, 38368, 41404, 22657, 40730, 47057, 46316, 36583, 48937, 38147, 40469, 42516, 21575, 42516, 42516, 38373, 22657, 38069, 46316, 45780, 36586, 38147, 40463, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 38089, 46273, 22694, 23034, 40134, 34366, 22755, 38105, 38164, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 26200, 42516, 51537, 42516, 27946, 42516, 42516, 47834, 20951, 20960, 38221, 38236, 38243, 38259, 38272, 26258, 42516, 38551, 42516, 27632, 42516, 34262, 42516, 42516, 42516, 38553, 42516, 38546, 21091, 38552, 21774, 38288, 31700, 35273, 38309, 34810, 28721, 42516, 42516, 38329, 34304, 42516, 29241, 23811, 23953, 42516, 42516, 42516, 38347, 38364, 33022, 22657, 38390, 38410, 28636, 46316, 29607, 39628, 38434, 42370, 38147, 48603, 38470, 47663, 38504, 38541, 39253, 39681, 42516, 42516, 42516, 42516, 41197, 42516, 42516, 42516, 38368, 31857, 22657, 38569, 22657, 38374, 22541, 38589, 28198, 46316, 46316, 44805, 29206, 27800, 32877, 38147, 38147, 32923, 22444, 42516, 28144, 42516, 38634, 42516, 45188, 42516, 38652, 42516, 42516, 38370, 39723, 22657, 22657, 38687, 30379, 22540, 23043, 46316, 46316, 38710, 22895, 30533, 49398, 38147, 38147, 38733, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 33462, 42516, 42516, 42516, 42516, 38368, 38756, 22657, 40730, 38776, 46316, 36583, 38795, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 38815, 36586, 49663, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 49485, 38368, 44256, 40047, 45820, 38834, 38868, 32210, 38891, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 38914, 38935, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 27187, 42516, 30926, 42516, 34543, 38987, 37672, 39016, 39067, 39107, 39092, 39111, 39076, 39127, 39140, 26099, 42516, 25841, 23701, 20829, 39222, 20009, 42516, 39156, 41252, 39175, 39212, 32746, 21195, 39238, 26847, 39289, 45668, 39332, 39368, 34810, 28721, 32390, 42516, 42516, 26444, 30879, 36010, 28099, 40787, 39398, 38525, 26035, 39432, 39483, 44460, 39503, 41633, 22657, 32003, 22601, 46316, 49709, 48318, 47976, 47889, 30552, 38147, 33209, 39523, 39917, 39159, 42516, 39546, 42516, 42516, 40976, 42516, 42516, 42516, 39568, 39487, 37157, 22657, 39589, 22657, 38374, 39610, 45436, 46316, 39644, 46316, 44805, 27542, 39661, 38313, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 30632, 42516, 42516, 21187, 39678, 39697, 39714, 22657, 22657, 50559, 22657, 39739, 39760, 46316, 46316, 38818, 46316, 39784, 39805, 38147, 38147, 32856, 38147, 39829, 41766, 46006, 39893, 48391, 49682, 42516, 39960, 34641, 39976, 38394, 40024, 37997, 33010, 30361, 22539, 40063, 40121, 43817, 40157, 30525, 40868, 40175, 40209, 40247, 34760, 44916, 20285, 40281, 34623, 40309, 51090, 50324, 48429, 40325, 40344, 40364, 39645, 40409, 40428, 40449, 38147, 40485, 49825, 39382, 22690, 40506, 42516, 42516, 22216, 40534, 39507, 48098, 30083, 50926, 38024, 33595, 45640, 28567, 40469, 40559, 42516, 40087, 26129, 45371, 31289, 28384, 40593, 41927, 40637, 40665, 40689, 34614, 41203, 40707, 27312, 43148, 48295, 28405, 40861, 22683, 50287, 38368, 40727, 40746, 40649, 40767, 40811, 22827, 40847, 33407, 49334, 48207, 33243, 28244, 40729, 36585, 22448, 28385, 36584, 41673, 40884, 31692, 28429, 22929, 40922, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 40951, 51537, 42516, 42744, 40972, 42516, 27292, 40992, 41001, 41017, 41032, 41039, 41055, 41068, 26099, 20248, 41084, 41102, 41129, 21286, 41166, 42516, 41182, 41219, 41286, 31731, 41302, 41336, 41352, 41368, 41384, 34883, 41420, 41436, 48349, 41477, 42516, 42240, 27121, 34422, 42516, 41511, 25267, 41532, 41575, 42516, 42516, 41594, 28243, 22657, 31843, 41613, 34053, 27401, 40159, 35568, 34847, 41649, 38147, 27550, 41689, 41744, 40896, 22382, 42516, 26380, 42516, 41578, 42516, 44762, 41785, 42516, 41828, 27866, 41270, 19255, 22657, 41881, 41897, 22657, 35406, 41916, 43971, 44095, 46316, 46316, 41950, 22851, 37219, 42001, 38147, 29467, 32923, 42028, 42044, 42516, 46644, 19385, 42516, 42516, 42516, 42516, 42516, 34632, 38370, 22657, 27339, 43920, 22657, 30360, 22540, 46316, 44514, 36395, 46316, 22343, 30533, 38147, 35478, 49592, 38147, 27826, 41766, 42516, 42516, 21305, 42516, 31235, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 20064, 42074, 46316, 46316, 46316, 46316, 42093, 38147, 38147, 38147, 38147, 50734, 41769, 50664, 35952, 42516, 42516, 42516, 41113, 22657, 42177, 22657, 45759, 46316, 43945, 46316, 45799, 38147, 45843, 38147, 27827, 29041, 42127, 42516, 42516, 42516, 48412, 30671, 22657, 38073, 44692, 46316, 33520, 45533, 38147, 40469, 42146, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 43588, 34920, 42516, 42166, 40348, 33173, 48271, 42201, 22683, 42220, 41559, 42256, 42290, 42321, 33756, 44448, 35547, 42352, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 32531, 22755, 42386, 28429, 22929, 42410, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 39045, 51537, 42516, 42516, 42439, 19363, 42461, 42498, 42516, 31468, 42533, 42547, 42563, 42576, 26099, 42516, 42516, 25867, 27632, 42516, 42516, 42516, 42592, 26617, 42516, 42516, 26436, 25867, 42516, 30236, 31920, 49620, 42612, 36440, 34810, 28721, 42516, 42647, 42516, 34304, 42516, 44608, 36046, 42516, 35598, 42516, 42516, 36057, 51481, 44194, 32471, 36334, 37148, 42671, 32033, 42687, 33121, 42706, 38488, 30256, 30569, 29372, 32199, 42722, 42778, 42516, 42799, 42516, 49524, 50043, 35835, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 37175, 22657, 38374, 22541, 46316, 46316, 47563, 46316, 44805, 38147, 38147, 38147, 42836, 38147, 32923, 42853, 42888, 35656, 42516, 42516, 42516, 50763, 30902, 39460, 48700, 42516, 38370, 22657, 42923, 22657, 22657, 37350, 22540, 46316, 42958, 46316, 46316, 27403, 30533, 38147, 42991, 38147, 38147, 27826, 41766, 42516, 29233, 42516, 42516, 42516, 43017, 42516, 23255, 22657, 22657, 49093, 22657, 22325, 22539, 46316, 46316, 43039, 46316, 30788, 38147, 38147, 35485, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 36017, 42516, 42516, 43058, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 48843, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 46409, 43080, 43110, 32715, 30112, 30535, 40935, 43145, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 35061, 42516, 42516, 42516, 28279, 28282, 18254, 28275, 31684, 43164, 43182, 29146, 43216, 43233, 29330, 43270, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 43287, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 43306, 46316, 46316, 46316, 46316, 50852, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 43323, 28384, 43789, 46316, 36586, 43341, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 50278, 22100, 42516, 42516, 50243, 42516, 29530, 43375, 33789, 43361, 43411, 43418, 43434, 43447, 26099, 42516, 33915, 33924, 27632, 40956, 43463, 43486, 41243, 43507, 26512, 26972, 26982, 27147, 41812, 42783, 43531, 49966, 43567, 43604, 44058, 40078, 42516, 42516, 42516, 23213, 43642, 34502, 43666, 43684, 38517, 42516, 42516, 35323, 43702, 22657, 43728, 30048, 43746, 43782, 42975, 46316, 43805, 34708, 43833, 43850, 27569, 49274, 49874, 43871, 42516, 42516, 42516, 45270, 35189, 42516, 42516, 43894, 43668, 42516, 42814, 33726, 22657, 43915, 22657, 37724, 49041, 43936, 46316, 43969, 46316, 45680, 43987, 44022, 33996, 38147, 38147, 44043, 44074, 22444, 42516, 42516, 19081, 42516, 44111, 44127, 42516, 43290, 44154, 44166, 44182, 22657, 37101, 44229, 44279, 30652, 44299, 46316, 42336, 45461, 44326, 40412, 44345, 38147, 44372, 45987, 44388, 34123, 41766, 28121, 42516, 42516, 24911, 44407, 50085, 42516, 44435, 27732, 44483, 22975, 22657, 30361, 22539, 44504, 42690, 46316, 46316, 30525, 28768, 44537, 44554, 38147, 40691, 44575, 42516, 44603, 44624, 42516, 42516, 28242, 44645, 22657, 22657, 44664, 44689, 46316, 46316, 49378, 44708, 38147, 38147, 49798, 22690, 42516, 44729, 42516, 42516, 20056, 22657, 22657, 34376, 46316, 51047, 22477, 38147, 44538, 40469, 42516, 22273, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 44749, 26230, 34694, 49922, 44785, 36803, 38372, 46315, 38146, 47702, 44821, 44842, 44862, 21913, 40729, 36585, 22448, 28385, 36584, 40621, 44890, 44940, 42111, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 46959, 51537, 45028, 47264, 44964, 45002, 45045, 45083, 45015, 45108, 45123, 45139, 45155, 45168, 26099, 45184, 28448, 42516, 28797, 42516, 42516, 30342, 42516, 42516, 45204, 45221, 31185, 28655, 31192, 26648, 48147, 38948, 50978, 45241, 34810, 28721, 45262, 45286, 25875, 34304, 35804, 42516, 42516, 42516, 42516, 45307, 45333, 42516, 45362, 45387, 27370, 22657, 22657, 45422, 45457, 45477, 46316, 48318, 45501, 22713, 45531, 38147, 40896, 22382, 41086, 42516, 42516, 45549, 45580, 42516, 42516, 42516, 42516, 42516, 41312, 38368, 32670, 37166, 22657, 22657, 33029, 22541, 45618, 47052, 46316, 46316, 45690, 35721, 38147, 45637, 38147, 38147, 45656, 22444, 42516, 42516, 45593, 44733, 42516, 45600, 35835, 45706, 27030, 38348, 45731, 22657, 22657, 40543, 26861, 45754, 45775, 46316, 46316, 43191, 44800, 45796, 45815, 38147, 38147, 40256, 45836, 45859, 28046, 42867, 49429, 42516, 25220, 42516, 19477, 43271, 20461, 22657, 22657, 27347, 45890, 30361, 22539, 46316, 48577, 44521, 46316, 30525, 38147, 38147, 46850, 45910, 34440, 41769, 42516, 50831, 45929, 19737, 42516, 28242, 22657, 45947, 43759, 50887, 46316, 45965, 46065, 28181, 38147, 45983, 46857, 27827, 22690, 42516, 42516, 46003, 44138, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 29031, 51383, 46022, 26136, 47337, 46039, 22657, 46056, 46316, 34383, 36586, 38147, 46089, 46111, 34920, 46149, 46173, 43148, 46207, 44846, 46228, 32903, 36804, 38368, 46247, 46266, 45515, 36803, 38372, 46315, 38146, 35099, 35240, 22504, 22913, 46289, 46310, 46333, 36758, 46387, 47879, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 27247, 51537, 42516, 42516, 23393, 42516, 46425, 46462, 46474, 46490, 46505, 46521, 46537, 46550, 26099, 46566, 25493, 25815, 46587, 26561, 21328, 46624, 21598, 42516, 46636, 46660, 46669, 46685, 46722, 46757, 46799, 32544, 46837, 46873, 41704, 47524, 33832, 37332, 35627, 34304, 46901, 42516, 44629, 46918, 39031, 46952, 46975, 47012, 47022, 48184, 31972, 27713, 43730, 47038, 31642, 47073, 47098, 47607, 47121, 47145, 47186, 47202, 47222, 47250, 47280, 47302, 42058, 42516, 47326, 47353, 42516, 42516, 47371, 47388, 46928, 47404, 47426, 47449, 47472, 29567, 47494, 47549, 47584, 47623, 47679, 36182, 44805, 36463, 37832, 40141, 38147, 32161, 32170, 47697, 42516, 45060, 42596, 50682, 47718, 42130, 47751, 46440, 36515, 21144, 38370, 47785, 29270, 22657, 44488, 47820, 47850, 47868, 40376, 46316, 45441, 47912, 47938, 47958, 43617, 38147, 38919, 47992, 41766, 29407, 48041, 42516, 27096, 48062, 42516, 50062, 40568, 48085, 38573, 48132, 48169, 30361, 48200, 48223, 48241, 48287, 48311, 47922, 47129, 22858, 48334, 43855, 34440, 40906, 48365, 50193, 42516, 22144, 48387, 48407, 44243, 48428, 22657, 49223, 47234, 48445, 46316, 47082, 50795, 48488, 38147, 33704, 22690, 42516, 48504, 48525, 42516, 20103, 22966, 48559, 32447, 40385, 48575, 48593, 50156, 48626, 48646, 48680, 42516, 33850, 39552, 21921, 26930, 48716, 48749, 48769, 48802, 45246, 48837, 48960, 48859, 48887, 32658, 28363, 48910, 33376, 48933, 48953, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 45621, 46231, 48976, 39991, 49005, 49029, 40039, 49057, 44903, 22755, 31692, 28429, 49073, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 49109, 42516, 42516, 49144, 42516, 32608, 18328, 18337, 49164, 18337, 18344, 49180, 49193, 26099, 42516, 42516, 42516, 27632, 20863, 28835, 42516, 42516, 42516, 42516, 28834, 42516, 20857, 42516, 28241, 49209, 31530, 22841, 49248, 36678, 30143, 33493, 42516, 42516, 34304, 42516, 42516, 35043, 49290, 42516, 42516, 42516, 38053, 28243, 49327, 22657, 22657, 22658, 49350, 46316, 46316, 46316, 31591, 33687, 38147, 38147, 38147, 49366, 49414, 49451, 42516, 49474, 49519, 42516, 42516, 43686, 45346, 42516, 46571, 46157, 38368, 45949, 40328, 45406, 25137, 29005, 22541, 48786, 34087, 38601, 49540, 48459, 38147, 33697, 39345, 49573, 33236, 49608, 22444, 42516, 19180, 42516, 50588, 42516, 42516, 42516, 18791, 42516, 42516, 38370, 38694, 22657, 22657, 22657, 30360, 49641, 32217, 46316, 46316, 46316, 22343, 49659, 38898, 38147, 38147, 38147, 27826, 41766, 46990, 42516, 49679, 42516, 42516, 42516, 42516, 20094, 31303, 22657, 22657, 22657, 30361, 49698, 46316, 46316, 46316, 46316, 30525, 49732, 38147, 38147, 38147, 34440, 35908, 42516, 42516, 46023, 49756, 42516, 29706, 37130, 22657, 22657, 39744, 38128, 46316, 46316, 49778, 49814, 38147, 38147, 49848, 22690, 22055, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 34322, 43148, 47105, 28405, 38446, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 49890, 49913, 49938, 22448, 28385, 36584, 34366, 34779, 33418, 49954, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 50000, 50082, 50038, 50059, 42516, 32349, 42516, 20487, 50078, 34283, 44986, 50101, 50114, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 50130, 42394, 35273, 50148, 34810, 28721, 42516, 36285, 32580, 34304, 42516, 42516, 42516, 42516, 42516, 25759, 42516, 42516, 28243, 27704, 22657, 37534, 22657, 27401, 50172, 46316, 38188, 48318, 29351, 38147, 30813, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 41597, 42516, 42516, 42516, 42476, 42516, 38368, 22657, 50132, 22657, 22657, 38374, 22541, 46316, 49557, 46316, 46316, 44805, 38147, 38147, 50449, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 50190, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 50209, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 50231, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 50266, 42516, 22306, 42516, 45067, 50303, 50340, 42516, 50365, 50380, 50394, 50410, 50423, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 45894, 46314, 50439, 28325, 41965, 36365, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 25694, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 50473, 42516, 42516, 42516, 50491, 22657, 22657, 22657, 22657, 30360, 50513, 46316, 46316, 46316, 46316, 22343, 50533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 29399, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 50557, 22657, 50575, 22539, 46316, 43245, 46316, 33180, 30525, 38147, 47942, 38147, 38147, 50611, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 26324, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 48543, 50631, 50644, 26099, 42516, 42516, 42516, 27632, 50660, 42516, 50680, 42516, 42516, 42516, 29122, 42516, 21452, 29118, 32973, 50698, 44948, 35273, 50716, 34810, 28721, 42516, 42516, 42516, 50750, 27264, 27883, 43515, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 43166, 22657, 49088, 27401, 46316, 30696, 30175, 48318, 38147, 38147, 50786, 27533, 40896, 50811, 50827, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 51530, 42516, 42516, 42516, 38370, 22657, 27966, 22657, 22657, 27206, 22540, 46316, 36563, 46316, 46316, 48225, 30533, 38147, 43345, 38147, 38147, 27826, 41766, 21110, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 36082, 22657, 22657, 22657, 30361, 22539, 50847, 46316, 46316, 46316, 30525, 40490, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 24903, 42516, 42516, 27632, 42516, 42516, 20017, 42516, 42516, 42516, 42516, 20023, 42516, 42516, 50868, 36101, 46314, 27462, 29927, 45874, 41719, 42516, 29087, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42872, 28243, 22657, 22657, 22657, 47797, 27401, 46316, 46316, 22542, 48318, 38147, 38147, 38147, 27479, 40896, 22382, 42516, 50903, 42516, 42516, 42516, 42516, 42516, 42516, 42150, 42516, 42516, 38368, 46183, 22657, 41900, 22657, 38374, 22541, 50922, 46316, 37779, 46316, 44805, 36603, 38147, 38147, 40222, 38147, 32923, 22444, 42516, 50475, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 50942, 22657, 22657, 30360, 50961, 30499, 50994, 46316, 46316, 22343, 49789, 39662, 51012, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 48664, 23255, 22657, 22657, 32677, 22657, 28304, 22539, 46316, 46316, 51045, 46316, 51063, 38147, 38147, 50725, 38147, 44006, 41769, 42516, 42516, 50906, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 48656, 42516, 42516, 47372, 42516, 31381, 22657, 22657, 34817, 46316, 46316, 40751, 38147, 38147, 40469, 42516, 42516, 51087, 42516, 38373, 28681, 28384, 46316, 51106, 36586, 34742, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 51361, 42516, 42516, 42516, 42516, 51537, 42516, 42516, 42516, 42516, 25917, 19962, 42516, 42516, 42516, 46741, 49861, 51029, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 28721, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 27401, 46316, 46316, 46316, 48318, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 46123, 30288, 30286, 49299, 30156, 51124, 22408, 22410, 49308, 30152, 46133, 51161, 51174, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 31797, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 20792, 18990, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 51190, 25598, 18486, 18508, 19308, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 48069, 42516, 42516, 30409, 42516, 25917, 39868, 39877, 51215, 51230, 51237, 29448, 51253, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 42516, 42516, 42516, 23517, 42516, 42516, 23514, 32629, 20505, 21066, 18953, 21068, 18866, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 18459, 25598, 18486, 18508, 51199, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 36374, 42516, 42516, 42516, 42516, 31102, 50349, 51296, 51323, 51307, 51330, 32370, 51346, 21040, 42516, 42516, 42516, 27632, 42516, 42516, 51474, 51382, 42516, 26083, 42516, 42516, 42516, 26079, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 18315, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 51399, 25598, 18486, 18508, 21522, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 20235, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 20381, 20397, 20422, 20606, 20438, 20477, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 21141, 42516, 42516, 42516, 42516, 48069, 42516, 42516, 42516, 42516, 25917, 42516, 42516, 42516, 42516, 42516, 42516, 42517, 26099, 42516, 42516, 42516, 27632, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28241, 22657, 46314, 35273, 38147, 34810, 46363, 42516, 42516, 42516, 34304, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 28243, 22657, 22657, 22657, 22657, 22341, 46316, 46316, 46316, 39789, 38147, 38147, 38147, 38147, 40896, 22382, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 22657, 22657, 38374, 22541, 46316, 46316, 46316, 46316, 44805, 38147, 38147, 38147, 38147, 38147, 32923, 22444, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 38370, 22657, 22657, 22657, 22657, 30360, 22540, 46316, 46316, 46316, 46316, 22343, 30533, 38147, 38147, 38147, 38147, 27826, 41766, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23255, 22657, 22657, 22657, 22657, 30361, 22539, 46316, 46316, 46316, 46316, 30525, 38147, 38147, 38147, 38147, 34440, 41769, 42516, 42516, 42516, 42516, 42516, 28242, 22657, 22657, 22657, 37745, 46316, 46316, 46316, 37798, 38147, 38147, 38147, 27827, 22690, 42516, 42516, 42516, 42516, 38368, 22657, 22657, 40730, 46316, 46316, 36583, 38147, 38147, 40469, 42516, 42516, 42516, 42516, 38373, 22657, 28384, 46316, 46316, 36586, 38147, 27827, 22690, 34920, 42516, 38372, 43148, 46316, 28405, 38147, 22683, 36804, 38368, 28385, 28404, 30535, 36803, 38372, 46315, 38146, 28238, 43147, 27775, 22913, 28244, 40729, 36585, 22448, 28385, 36584, 34366, 22755, 31692, 28429, 22929, 23000, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 23494, 42516, 42516, 45092, 51424, 51429, 51429, 51451, 23492, 51445, 51467, 42516, 42516, 42516, 42516, 42516, 42516, 51474, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 32629, 20505, 21066, 18953, 21068, 19019, 18919, 18270, 40105, 18293, 51497, 42516, 42516, 18360, 42516, 49435, 42820, 18380, 18411, 18395, 18574, 19226, 18433, 20169, 51190, 25598, 18486, 18508, 19308, 18465, 25604, 18492, 18514, 20728, 18530, 42516, 30418, 42516, 42516, 42516, 50250, 25964, 50770, 42516, 18553, 39446, 18564, 20175, 20411, 20131, 20505, 23879, 18590, 26008, 18612, 18632, 18596, 18470, 18594, 26012, 18616, 18636, 20798, 20741, 20757, 42516, 18652, 18689, 18711, 18748, 18695, 18788, 42516, 41546, 48871, 18807, 18835, 19802, 18823, 19840, 25206, 18851, 18904, 18942, 18979, 19680, 19006, 18851, 18904, 18942, 18979, 19680, 19045, 20750, 46697, 19097, 19132, 20936, 31767, 19148, 19174, 19196, 20141, 20921, 19788, 19212, 19242, 19278, 25525, 20579, 19301, 19596, 19271, 25518, 20572, 19294, 19589, 19324, 19353, 35639, 19379, 39467, 19401, 41728, 19421, 19500, 24458, 19544, 19575, 19614, 19632, 19650, 19559, 19612, 19630, 19648, 19666, 19029, 19696, 19712, 19728, 19753, 19773, 19830, 19435, 19449, 19888, 19905, 19856, 19887, 19904, 19921, 19947, 19984, 20043, 20080, 20119, 20157, 20536, 20191, 20213, 20542, 20197, 20219, 19931, 51517, 20264, 20301, 20317, 20346, 20333, 20349, 20365, 51553, 20397, 20422, 20606, 20438, 20453, 20503, 21067, 21068, 20521, 20558, 20595, 20622, 20652, 23888, 18878, 20683, 20699, 20715, 20779, 20814, 20880, 20890, 20906, 19463, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 42516, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 0, 94506, 90409, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 365, 94506, 90409, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 69632, 73728, 94506, 94506, 94506, 94506, 94506, 65536, 94506, 12290, 3, 0, 0, 2183168, 0, 0, 0, 90409, 94506, 299, 300, 0, 2134016, 303, 304, 304, 304, 304, 304, 304, 304, 0, 0, 0, 0, 0, 304, 0, 304, 1, 289, 3, 0, 0, 0, 295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 796, 0, 796, 0, 0, 0, 0, 0, 2424832, 2433024, 0, 0, 2457600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 650, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2904064, 2908160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1685, 1686, 0, 1688, 0, 0, 0, 0, 3117056, 0, 0, 0, 0, 0, 0, 0, 365, 365, 0, 0, 0, 0, 0, 0, 448, 0, 0, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 559, 582, 559, 582, 559, 559, 582, 0, 0, 0, 2138112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2991, 0, 0, 0, 2772992, 2805760, 2830336, 0, 2863104, 2920448, 0, 0, 0, 0, 0, 0, 0, 2805760, 2920448, 0, 0, 0, 0, 0, 0, 0, 2732032, 0, 2179072, 2179072, 2179072, 2179072, 2424832, 2433024, 0, 0, 0, 0, 0, 2920448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1702, 0, 1704, 0, 0, 2179072, 2830336, 2179072, 2179072, 2863104, 2179072, 2179072, 2179072, 2179072, 2920448, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2126737, 2126737, 2126737, 2126737, 2126737, 2593681, 2126737, 2126737, 2126737, 2126737, 0, 914, 2125824, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 2125824, 2125824, 2125824, 2125824, 2723840, 2125824, 2732032, 2772992, 2125824, 2125824, 2125824, 2805760, 2125824, 2830336, 2125824, 2125824, 2863104, 2125824, 2125824, 2125824, 2125824, 2920448, 2125824, 2125824, 2125824, 2125824, 2125824, 2920448, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3117056, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2457600, 2125824, 2125824, 2125824, 2125824, 2183168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 661, 0, 661, 0, 0, 0, 2408448, 0, 0, 2584576, 0, 0, 0, 0, 2838528, 0, 0, 2838528, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2408448, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2625536, 2179072, 2179072, 0, 2125824, 2125824, 2125824, 2408448, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3125248, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2662400, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2801664, 2813952, 2125824, 2125824, 2801664, 2813952, 2125824, 2838528, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2461696, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2600960, 0, 0, 0, 0, 0, 0, 2441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2493, 2494, 0, 0, 2497, 0, 2768896, 2777088, 2781184, 0, 2822144, 0, 0, 2883584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3055616, 0, 0, 0, 3080192, 3100672, 3104768, 0, 0, 0, 0, 3186688, 0, 0, 0, 0, 0, 0, 0, 307, 204800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 1, 0, 0, 0, 0, 0, 2797568, 0, 0, 0, 0, 0, 0, 0, 2850816, 2867200, 0, 0, 0, 0, 0, 441, 0, 0, 332, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 0, 0, 3133440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2131, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2461696, 2465792, 2179072, 2768896, 2777088, 2781184, 2797568, 2822144, 2179072, 2179072, 2179072, 2883584, 2179072, 2912256, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2523136, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2600960, 0, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2461696, 2465792, 2125824, 0, 1142784, 0, 2179072, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2592768, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 24576, 988, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2523136, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2600960, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 1272, 541, 541, 541, 541, 2125824, 2125824, 2125824, 2641920, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2719744, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 299, 0, 0, 0, 299, 0, 300, 0, 0, 0, 2768896, 2777088, 2781184, 2797568, 2822144, 2125824, 2125824, 2125824, 2883584, 2125824, 2912256, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 2125824, 2126812, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3133440, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3207168, 2125824, 0, 0, 0, 2179072, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 2510848, 2514944, 0, 0, 2125824, 2125824, 3133440, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3207168, 2125824, 2179072, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 300, 0, 0, 0, 0, 0, 0, 2764, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2059, 2060, 0, 2062, 2063, 0, 0, 0, 0, 2605056, 0, 0, 0, 0, 2887680, 0, 2924544, 0, 0, 0, 0, 0, 0, 0, 2108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1177, 0, 0, 0, 0, 0, 0, 3162112, 3170304, 0, 0, 3219456, 3035136, 0, 0, 0, 0, 0, 3072000, 3190784, 0, 0, 0, 0, 0, 0, 0, 0, 2576384, 0, 0, 0, 0, 0, 0, 0, 334, 0, 0, 334, 0, 0, 334, 0, 0, 0, 0, 0, 0, 0, 2387968, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2050, 0, 0, 0, 0, 3121152, 3141632, 0, 0, 0, 2924544, 0, 2682880, 0, 0, 0, 0, 0, 0, 3112960, 2387968, 2924544, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3035136, 2179072, 2179072, 3072000, 2179072, 2179072, 2179072, 2179072, 2699264, 2179072, 2715648, 2179072, 2723840, 2179072, 2732032, 2772992, 2179072, 2179072, 2179072, 2805760, 3121152, 2179072, 2179072, 3141632, 2179072, 2179072, 2179072, 3170304, 2179072, 2179072, 3190784, 3194880, 2179072, 0, 0, 0, 0, 0, 0, 541, 1734, 541, 541, 541, 541, 541, 541, 1740, 541, 2125824, 3190784, 3194880, 2125824, 0, 0, 0, 0, 0, 0, 2387968, 2125824, 2125824, 2125824, 2420736, 2125824, 2125824, 2125824, 2125824, 2125824, 2453504, 2125824, 2473984, 2125824, 2736128, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2887680, 2125824, 2125824, 2924544, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 3141632, 2125824, 2125824, 2125824, 3170304, 2125824, 2125824, 3190784, 3194880, 2125824, 2179072, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 299, 0, 300, 3112960, 3219456, 2125824, 2125824, 3112960, 3219456, 2125824, 2125824, 3112960, 3219456, 0, 0, 0, 0, 0, 0, 0, 347, 0, 405, 0, 0, 0, 0, 0, 405, 3022848, 0, 0, 3145728, 0, 3203072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2072, 0, 0, 0, 0, 0, 0, 0, 3067904, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3003, 0, 0, 0, 0, 0, 2621440, 0, 3182592, 2899968, 0, 2961408, 0, 0, 2179072, 2179072, 2416640, 2179072, 2179072, 2179072, 2179072, 2928640, 2179072, 2179072, 2179072, 2998272, 2179072, 2179072, 2179072, 2179072, 3059712, 2179072, 2179072, 2179072, 2179072, 3178496, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2494464, 2125824, 2125824, 0, 2179072, 2125824, 2125824, 0, 2179072, 2125824, 2125824, 2985984, 2985984, 2985984, 2985984, 0, 0, 0, 0, 0, 0, 2490, 0, 0, 0, 0, 0, 0, 0, 0, 0, 335, 0, 0, 0, 0, 0, 0, 2179072, 2445312, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2551808, 2179072, 2179072, 2179072, 2179072, 3178496, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2495377, 2126737, 2126737, 2126737, 2126737, 2126737, 3179409, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2495451, 2126811, 2895872, 2916352, 2179072, 2179072, 2945024, 2179072, 2179072, 2994176, 2179072, 3002368, 2179072, 2179072, 3022848, 2179072, 3067904, 3084288, 2125824, 3096576, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3223552, 0, 0, 2125824, 2125824, 2416640, 3096576, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3223552, 0, 0, 2125824, 2125824, 2416640, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3035136, 2125824, 2125824, 3072000, 2125824, 2125824, 2125824, 3121152, 2125824, 2125824, 3141632, 2125824, 2125824, 2125824, 3170304, 2125824, 2125824, 2125824, 2125824, 2445312, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2551808, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2637824, 2125824, 2125824, 2125824, 2125824, 2727936, 2752512, 2125824, 2125824, 2125824, 2125824, 2842624, 2846720, 2842624, 2846720, 2125824, 2895872, 2916352, 2125824, 2125824, 2945024, 2125824, 2125824, 2994176, 2125824, 3002368, 2125824, 2125824, 3022848, 2125824, 3067904, 2125824, 3067904, 3084288, 2125824, 3096576, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3223552, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3039232, 2125824, 3063808, 2125824, 2125824, 2125824, 2125824, 2125824, 3100672, 2547712, 2596864, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3178496, 2670592, 0, 2744320, 0, 0, 0, 0, 0, 2928640, 0, 0, 0, 3059712, 0, 2543616, 2666496, 0, 2633728, 0, 0, 0, 0, 0, 0, 2494464, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2780, 0, 0, 0, 0, 2785, 0, 0, 0, 0, 2957312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3188, 0, 0, 0, 0, 3211264, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2494464, 2179072, 2179072, 2179072, 2707456, 2179072, 2736128, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2887680, 2179072, 2179072, 2179072, 2179072, 2641920, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2719744, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3137536, 2126737, 2126737, 2499473, 2126737, 2126737, 2126737, 2556817, 2565009, 2179072, 2514944, 2179072, 2179072, 2179072, 2543616, 2547712, 2179072, 2179072, 2596864, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3039232, 2179072, 3063808, 2179072, 2179072, 2179072, 2179072, 3100672, 2125824, 2125824, 2125824, 2125824, 2125824, 3178496, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2494464, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 1080, 1084, 0, 0, 1088, 2125824, 2514944, 2125824, 2125824, 2125824, 2543616, 2547712, 2125824, 2125824, 2596864, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2928640, 2125824, 2125824, 2125824, 2998272, 2125824, 2125824, 2125824, 2125824, 3059712, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3178496, 2179072, 2125824, 2125824, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 0, 2486272, 0, 0, 0, 0, 0, 2678784, 2854912, 3006464, 2441216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2932736, 2965504, 0, 0, 3076096, 0, 0, 0, 0, 0, 444, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 407, 0, 0, 0, 0, 0, 0, 2695168, 3174400, 2646016, 2613248, 2703360, 0, 0, 0, 0, 2977792, 0, 0, 3047424, 3129344, 0, 0, 0, 0, 0, 645, 0, 0, 648, 649, 0, 0, 0, 0, 0, 0, 0, 725, 0, 0, 0, 0, 0, 0, 0, 0, 0, 743, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2769, 0, 0, 0, 2981888, 2396160, 0, 3153920, 0, 0, 0, 0, 0, 0, 0, 0, 2740224, 0, 0, 0, 0, 0, 0, 541, 3027, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2584, 541, 541, 541, 0, 0, 0, 0, 0, 2793472, 0, 0, 0, 0, 0, 2469888, 2506752, 2756608, 0, 0, 2580480, 0, 0, 0, 0, 0, 0, 2517, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 3029, 541, 541, 541, 541, 541, 541, 0, 2396160, 2400256, 2179072, 2179072, 2441216, 2179072, 2469888, 2179072, 2179072, 2179072, 2519040, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2801664, 2813952, 2179072, 2838528, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2453504, 2179072, 2473984, 2482176, 2179072, 2179072, 2179072, 2179072, 2588672, 2179072, 2613248, 2646016, 2179072, 2179072, 2695168, 2756608, 2179072, 2179072, 2179072, 2932736, 2179072, 2179072, 2179072, 2179072, 2179072, 3117056, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2584576, 2179072, 2179072, 2125824, 2125824, 2125824, 2519040, 2125824, 2125824, 2125824, 2125824, 2588672, 2125824, 2613248, 2646016, 2125824, 2125824, 2695168, 2756608, 2125824, 2125824, 2125824, 2125824, 2932736, 2125824, 2125824, 2125824, 2125824, 2125824, 2932736, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3129344, 2125824, 2125824, 3153920, 3166208, 3174400, 2506752, 2506752, 2506752, 0, 3108864, 3198976, 0, 0, 3043328, 0, 3149824, 2936832, 0, 2760704, 3180, 2437120, 0, 0, 0, 0, 0, 0, 646, 0, 0, 0, 0, 651, 652, 653, 654, 655, 0, 0, 0, 0, 0, 2953216, 0, 0, 2826240, 3158016, 2428928, 0, 3018752, 2764800, 2572288, 0, 0, 0, 0, 0, 677, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2741, 0, 0, 0, 0, 0, 3051520, 2179072, 2428928, 2437120, 2179072, 2486272, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2654208, 2678784, 2760704, 2764800, 2854912, 2969600, 2179072, 3006464, 2179072, 3018752, 2179072, 2179072, 2179072, 3149824, 2125824, 2428928, 2437120, 2969600, 2125824, 3006464, 2125824, 3018752, 2125824, 2125824, 2125824, 2125824, 3149824, 2125824, 2428928, 2437120, 2125824, 2486272, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2654208, 2678784, 2760704, 2764800, 2785280, 2854912, 2969600, 2125824, 3006464, 2125824, 3018752, 2125824, 2125824, 2125824, 2125824, 3149824, 2179072, 3051520, 2125824, 3051520, 2125824, 3051520, 0, 2490368, 2498560, 0, 0, 0, 0, 2875392, 0, 0, 0, 3180, 0, 0, 0, 0, 0, 0, 2834432, 0, 3227648, 2568192, 2564096, 0, 2940928, 2179072, 2179072, 2498560, 2179072, 2179072, 2179072, 2555904, 2564096, 2179072, 2179072, 2179072, 2617344, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2662400, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3137536, 2125824, 2125824, 2498560, 2125824, 2125824, 2125824, 2555904, 2564096, 2125824, 2555904, 2564096, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3137536, 2940928, 2940928, 0, 0, 0, 0, 0, 2748416, 2879488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2519, 0, 0, 0, 0, 0, 541, 2940928, 0, 0, 0, 0, 0, 2748416, 2879488, 0, 3180, 0, 0, 0, 0, 0, 0, 0, 375, 0, 0, 0, 0, 0, 0, 0, 360, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 0, 2502656, 0, 0, 3010560, 0, 0, 0, 0, 0, 0, 0, 0, 2990080, 2179072, 2179072, 2179072, 3129344, 2179072, 2179072, 3153920, 3166208, 3174400, 2396160, 2400256, 2125824, 2125824, 2441216, 2125824, 2469888, 2125824, 2125824, 2125824, 2519040, 2125824, 2125824, 2179072, 2502656, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3010560, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2605056, 2125824, 2629632, 2125824, 2125824, 2650112, 2125824, 2125824, 2125824, 2707456, 2125824, 2736128, 2125824, 2125824, 2125824, 2125824, 2125824, 2502656, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3010560, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3137536, 2125824, 2125824, 2498560, 2125824, 2125824, 2502656, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3010560, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 2739, 0, 0, 0, 0, 0, 0, 0, 2743, 0, 0, 0, 2592768, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2592768, 2179072, 2179072, 2179072, 3129344, 2179072, 2179072, 3153920, 3166208, 3174400, 2397073, 2401169, 2126737, 2126737, 2442129, 2126737, 2470801, 2125824, 2125824, 2449408, 0, 2535424, 3031040, 2859008, 0, 0, 0, 0, 0, 2179072, 2449408, 2179072, 2535424, 2179072, 2609152, 2179072, 2859008, 2179072, 2179072, 2179072, 3031040, 2125824, 2449408, 2125824, 2535424, 2125824, 2609152, 2125824, 2859008, 2125824, 2125824, 2125824, 3031040, 2125824, 2125824, 2449408, 2125824, 2535424, 2125824, 2609152, 2125824, 2859008, 2125824, 2125824, 2125824, 0, 2179072, 2125824, 2125824, 2457600, 2179072, 2179072, 2179072, 2179072, 2457600, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2179072, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1727, 0, 0, 1728, 0, 3031040, 2125824, 2527232, 0, 0, 0, 0, 0, 2179072, 2527232, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2126738, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3125248, 2125824, 2125824, 2125824, 2125824, 2125824, 2527232, 2125824, 2125824, 2125824, 2125824, 2125824, 3092480, 2125824, 2527232, 2125824, 2125824, 2125824, 2125824, 2125824, 3092480, 0, 0, 0, 0, 0, 693, 0, 0, 0, 0, 0, 0, 365, 365, 365, 0, 0, 0, 0, 0, 707, 708, 0, 0, 0, 0, 0, 714, 0, 0, 0, 0, 0, 0, 703, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3020, 3026944, 0, 0, 0, 2404352, 2179072, 2179072, 2179072, 2179072, 3026944, 2404352, 2125824, 2125824, 2125824, 2125824, 3026944, 0, 2539520, 0, 2949120, 2179072, 2658304, 2973696, 2179072, 2125824, 2658304, 2973696, 2125824, 2125824, 2658304, 2973696, 2125824, 0, 2711552, 2560000, 2179072, 2560000, 2125824, 2560000, 2125824, 0, 2179072, 2179072, 2531328, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2605056, 2179072, 2629632, 2179072, 2179072, 2650112, 0, 0, 2809856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3088384, 0, 0, 0, 0, 0, 442, 0, 0, 454, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 480, 470, 470, 470, 470, 470, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 459, 459, 111051, 459, 459, 459, 459, 459, 459, 459, 459, 459, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 111051, 459, 111051, 111051, 111051, 459, 111051, 111051, 111051, 111051, 111051, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2795, 0, 0, 0, 0, 0, 0, 12290, 3, 0, 0, 2183168, 0, 0, 0, 0, 0, 299, 300, 0, 2134016, 303, 304, 2125824, 1060, 0, 0, 2179072, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 1060, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, 662, 0, 0, 0, 0, 303, 118784, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2434, 0, 303, 303, 303, 303, 303, 303, 303, 0, 0, 0, 0, 0, 303, 0, 303, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2155, 0, 12290, 3, 0, 0, 2183168, 0, 0, 0, 0, 0, 33403, 300, 0, 2134016, 49791, 304, 2105632, 12290, 3, 0, 0, 294, 0, 0, 0, 0, 294, 0, 0, 0, 0, 0, 0, 0, 2124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 788, 814, 0, 814, 809, 0, 0, 0, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 0, 0, 0, 122880, 0, 122880, 122880, 122880, 0, 0, 0, 0, 0, 122880, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3002, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 712, 0, 0, 0, 716, 0, 0, 0, 147456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2459, 0, 1092, 0, 2424832, 2433024, 0, 0, 2457600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 728, 0, 0, 0, 0, 0, 1823, 2125824, 2125824, 2125824, 2408448, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 1919, 2125824, 2125824, 2125824, 0, 0, 0, 131072, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 740, 407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1158, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 131072, 131072, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 131072, 0, 0, 131072, 0, 0, 0, 0, 135168, 135168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2756, 0, 0, 0, 0, 135168, 0, 0, 135168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 735, 0, 797, 0, 0, 0, 0, 0, 0, 0, 135168, 0, 135168, 135168, 135168, 135168, 135168, 135168, 0, 135168, 135168, 135168, 135168, 135168, 135168, 135168, 0, 0, 0, 0, 0, 135168, 0, 135168, 1, 12290, 3, 0, 0, 2183168, 0, 0, 0, 0, 0, 636, 637, 0, 2134016, 640, 641, 0, 1361, 2125824, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 987, 2125824, 2125824, 2125824, 2125824, 0, 304, 139264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225709, 0, 12290, 3, 0, 0, 2183168, 0, 0, 0, 0, 0, 299, 33406, 0, 2134016, 303, 49794, 0, 61440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3178, 0, 304, 2424832, 2433024, 0, 0, 2457600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 757, 0, 0, 0, 0, 762, 301, 301, 301, 143661, 371, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 143661, 301, 301, 143661, 301, 301, 301, 143731, 301, 301, 301, 143731, 69632, 73728, 301, 301, 143661, 301, 301, 65536, 301, 301, 301, 301, 301, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 301, 301, 143661, 301, 301, 301, 301, 301, 301, 301, 301, 301, 366, 301, 0, 143661, 301, 301, 301, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 301, 301, 301, 143661, 301, 143661, 143661, 143661, 143661, 143661, 143731, 143661, 143731, 143731, 143731, 143731, 143731, 143731, 143731, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 143661, 1, 301, 143661, 301, 143661, 143661, 143661, 143661, 143661, 143661, 301, 0, 301, 0, 301, 301, 301, 301, 301, 301, 301, 301, 301, 143661, 301, 143661, 143661, 143661, 143661, 301, 0, 0, 0, 3117056, 0, 0, 0, 0, 0, 0, 0, 2200252, 2200252, 0, 0, 0, 0, 0, 0, 662, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 541, 541, 2168, 541, 541, 541, 0, 0, 0, 0, 0, 155648, 155648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 325, 0, 0, 0, 0, 155648, 155648, 0, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 0, 0, 0, 0, 155648, 0, 0, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 0, 0, 0, 0, 0, 155648, 0, 155648, 0, 0, 0, 0, 0, 155648, 0, 0, 0, 0, 0, 155648, 155648, 0, 155648, 155648, 0, 12290, 3, 0, 0, 2183168, 126976, 0, 0, 0, 0, 299, 300, 0, 2134016, 303, 304, 0, 0, 0, 3117056, 0, 0, 0, 0, 0, 0, 0, 365, 0, 0, 0, 0, 0, 0, 0, 3563, 0, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3209, 541, 541, 541, 541, 541, 159744, 159744, 159744, 159744, 0, 0, 159744, 0, 0, 0, 0, 0, 0, 0, 0, 159744, 0, 0, 0, 0, 0, 0, 0, 159744, 159744, 159744, 163840, 159744, 159744, 159744, 159744, 159744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2805, 0, 541, 541, 541, 541, 541, 0, 25162, 0, 0, 0, 159744, 0, 0, 0, 25162, 25162, 25162, 159744, 25162, 25162, 25162, 25162, 25162, 25162, 25162, 25162, 159744, 159744, 159744, 159744, 25162, 159744, 25162, 1, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 1, 167936, 167936, 167936, 167936, 0, 0, 167936, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2976, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2138112, 1183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3168, 0, 0, 0, 0, 0, 0, 0, 0, 172032, 0, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 0, 293, 0, 0, 0, 348, 172032, 172032, 0, 0, 172032, 0, 0, 172032, 172032, 0, 172032, 0, 0, 0, 0, 172032, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172032, 0, 0, 0, 0, 0, 0, 2777, 0, 0, 0, 0, 0, 0, 2784, 0, 0, 0, 0, 0, 0, 2986, 2987, 0, 2988, 0, 2990, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 135168, 135168, 0, 0, 65536, 135168, 172032, 0, 172032, 172032, 0, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3014, 0, 0, 0, 0, 0, 0, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 1, 176128, 176128, 176128, 176128, 0, 0, 176128, 0, 0, 0, 0, 0, 0, 0, 0, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3175, 0, 0, 0, 0, 0, 0, 0, 3, 78115, 78115, 293, 0, 634, 0, 0, 0, 299, 300, 0, 2134016, 303, 304, 1164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 361, 541, 541, 1308, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 0, 0, 2242, 0, 914, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 0, 0, 587, 587, 587, 1203, 541, 587, 563, 541, 541, 541, 541, 541, 563, 563, 563, 563, 3070, 563, 563, 563, 563, 3074, 563, 563, 587, 587, 587, 587, 587, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1102, 0, 0, 0, 0, 0, 0, 0, 229376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 1691, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3201, 563, 563, 587, 587, 587, 587, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 3569, 541, 541, 0, 0, 563, 563, 563, 563, 563, 563, 563, 2251, 563, 563, 563, 563, 563, 563, 587, 3109, 587, 587, 587, 587, 587, 587, 587, 587, 2407, 587, 587, 587, 587, 587, 2412, 2413, 563, 563, 2288, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3541, 587, 587, 587, 2375, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1497, 587, 587, 0, 0, 0, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1439, 0, 3007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3317, 541, 541, 541, 541, 3038, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1300, 541, 541, 541, 563, 563, 563, 3078, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1401, 563, 563, 563, 587, 587, 587, 587, 3120, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1042, 587, 587, 587, 587, 0, 3159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155648, 3214, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1359, 563, 563, 563, 587, 3259, 587, 587, 587, 3262, 587, 587, 587, 587, 587, 587, 587, 541, 541, 563, 563, 587, 587, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3609, 541, 541, 541, 587, 587, 3270, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1498, 587, 587, 541, 541, 541, 3330, 3331, 541, 541, 541, 541, 541, 541, 541, 541, 563, 563, 563, 563, 3581, 563, 563, 563, 563, 563, 3349, 563, 563, 563, 563, 563, 563, 563, 563, 563, 587, 587, 587, 587, 587, 587, 587, 587, 0, 541, 541, 541, 3406, 541, 541, 541, 541, 563, 563, 563, 563, 563, 563, 3415, 563, 0, 587, 587, 587, 587, 587, 291, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 1, 587, 3431, 587, 587, 587, 587, 587, 587, 3437, 587, 587, 587, 3441, 587, 541, 563, 563, 3473, 563, 563, 563, 563, 3478, 563, 563, 563, 563, 3483, 563, 563, 563, 563, 977, 563, 563, 563, 563, 0, 587, 587, 587, 587, 587, 587, 1931, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2678, 587, 587, 587, 2681, 587, 587, 0, 0, 3456, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 0, 2586, 0, 541, 3471, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 0, 2327, 563, 3487, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 0, 0, 563, 563, 587, 587, 587, 587, 0, 0, 541, 541, 563, 563, 587, 587, 0, 541, 541, 541, 3205, 541, 541, 541, 541, 541, 541, 541, 3210, 541, 541, 541, 541, 541, 541, 2816, 541, 541, 2820, 541, 541, 541, 541, 541, 541, 541, 541, 3041, 541, 541, 541, 541, 541, 541, 541, 541, 2556, 541, 541, 541, 541, 541, 541, 541, 541, 2233, 541, 541, 541, 541, 541, 0, 0, 563, 587, 0, 541, 563, 587, 0, 541, 563, 587, 0, 541, 563, 587, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3510, 0, 0, 0, 0, 541, 541, 541, 541, 541, 2165, 541, 541, 541, 541, 541, 541, 541, 541, 3616, 563, 563, 563, 563, 563, 563, 563, 2265, 563, 563, 563, 563, 2270, 563, 563, 563, 184932, 184932, 184932, 184932, 184932, 184932, 184932, 0, 0, 0, 0, 0, 184932, 0, 184932, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 301, 0, 0, 301, 301, 143661, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 301, 143731, 301, 301, 301, 301, 12290, 3, 78115, 78115, 293, 0, 0, 0, 0, 0, 299, 300, 0, 2134016, 303, 304, 587, 0, 0, 188416, 541, 587, 563, 541, 541, 541, 541, 541, 563, 563, 563, 563, 587, 587, 587, 587, 0, 0, 0, 0, 2731, 0, 0, 0, 0, 305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249856, 0, 0, 0, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 0, 192972, 0, 1, 0, 0, 0, 0, 0, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 0, 0, 192972, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1145, 365, 365, 0, 0, 1148, 192972, 192972, 192972, 0, 192972, 192972, 192972, 192972, 192972, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3304, 0, 3180, 0, 0, 0, 0, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 407, 407, 407, 407, 407, 407, 407, 0, 0, 0, 0, 0, 407, 0, 407, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118784, 299, 12290, 3, 78115, 78115, 293, 0, 0, 0, 0, 0, 299, 300, 0, 302, 303, 304, 587, 0, 0, 740, 541, 587, 563, 541, 541, 541, 541, 541, 563, 563, 563, 563, 587, 587, 587, 587, 0, 0, 2729, 0, 0, 0, 0, 0, 0, 740, 1184, 0, 0, 0, 0, 1188, 0, 0, 0, 0, 0, 0, 0, 378, 0, 381, 0, 0, 0, 381, 0, 0, 563, 587, 587, 587, 587, 587, 1079, 1559, 0, 0, 0, 1565, 0, 0, 0, 1571, 2034, 0, 0, 0, 0, 1577, 2036, 0, 0, 0, 0, 0, 0, 0, 397, 0, 0, 0, 0, 0, 397, 0, 0, 0, 0, 0, 1577, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 262144, 0, 0, 0, 0, 0, 1188, 1669, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3177, 0, 0, 0, 563, 563, 587, 587, 587, 587, 1559, 2030, 0, 0, 0, 0, 1565, 2032, 0, 0, 0, 0, 0, 0, 2997, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1586, 1587, 0, 0, 0, 0, 0, 0, 0, 0, 1669, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106496, 0, 0, 0, 0, 0, 0, 2034, 0, 2036, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1150976, 0, 0, 0, 0, 0, 563, 563, 563, 563, 2325, 2652, 0, 0, 0, 0, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2343, 0, 307, 0, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 307, 0, 0, 0, 0, 0, 0, 3011, 0, 0, 0, 0, 3016, 3017, 0, 3019, 0, 0, 0, 0, 0, 204800, 204800, 0, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 205107, 204800, 204800, 205106, 205107, 204800, 205106, 205106, 204800, 204800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 122880, 122880, 122880, 122880, 122880, 12290, 3, 0, 0, 2183801, 0, 0, 0, 0, 0, 299, 300, 151552, 2134016, 303, 304, 0, 212992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172032, 0, 0, 151552, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, 0, 0, 0, 0, 0, 3117056, 0, 0, 0, 0, 0, 0, 0, 0, 2200253, 0, 0, 0, 0, 0, 0, 678, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2977, 0, 0, 0, 0, 0, 0, 914, 2126737, 2126737, 2126737, 2126737, 2126737, 2425745, 2433937, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3138449, 2126811, 2126811, 2499547, 2126811, 2126811, 2126737, 2724753, 2126737, 2732945, 2773905, 2126737, 2126737, 2126737, 2806673, 2126737, 2831249, 2126737, 2126737, 2864017, 2126737, 2126737, 2126737, 2126737, 2126811, 2126811, 2126811, 2126811, 2126811, 2593755, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 3036123, 2126811, 2126811, 3072987, 2126811, 2126811, 2126811, 3122139, 2126811, 2126737, 2126737, 2921361, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3117969, 2126737, 0, 2126811, 2126811, 2126811, 2126811, 2126811, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1190, 0, 0, 0, 0, 0, 2126811, 2425819, 2434011, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 3126235, 2126811, 2126811, 2126811, 2126811, 2126811, 2626523, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2700251, 2126811, 2716635, 2126811, 2724827, 2126811, 2733019, 2773979, 2126811, 0, 2502656, 0, 0, 3010560, 0, 0, 0, 0, 0, 0, 0, 0, 2990080, 2179072, 2179072, 3125248, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2592768, 2125824, 2125824, 2125824, 2125824, 2126811, 2126811, 2806747, 2126811, 2831323, 2126811, 2126811, 2864091, 2126811, 2126811, 2126811, 2126811, 2921435, 2126811, 2126811, 2126811, 0, 2179072, 2126811, 2126737, 2457600, 2179072, 2179072, 2179072, 2179072, 2458513, 2126737, 2126737, 2126737, 2126737, 2126737, 2524049, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2601873, 2126737, 2126737, 2458587, 2126811, 2126811, 2126811, 2126811, 2183168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1206, 0, 1208, 0, 0, 0, 0, 2126737, 2126737, 2126737, 2409361, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 0, 0, 2126811, 2126811, 2126811, 2409435, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2839515, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 3118043, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 0, 0, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2462609, 2466705, 2126737, 2126737, 2126737, 2642833, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2720657, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3040145, 2126737, 3064721, 2126737, 2126737, 2126737, 2126737, 2126737, 3101585, 2769809, 2778001, 2782097, 2798481, 2823057, 2126737, 2126737, 2126737, 2884497, 2126737, 2913169, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2626449, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2700177, 2126737, 2716561, 2126737, 2126737, 3134353, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3208081, 2126737, 0, 0, 0, 0, 0, 0, 3026, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1352, 541, 541, 541, 541, 541, 0, 0, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2462683, 2466779, 2126811, 2126811, 2126811, 2126811, 2126811, 2929627, 2126811, 2126811, 2126811, 2999259, 2126811, 2126811, 2126811, 2126811, 3060699, 2126811, 2126811, 2126811, 2126811, 2454491, 2126811, 2474971, 2483163, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2532315, 2126811, 2126811, 2126811, 2446299, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2552795, 2769883, 2778075, 2782171, 2798555, 2823131, 2126811, 2126811, 2126811, 2884571, 2126811, 2913243, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 3130331, 2126811, 2126811, 3154907, 3167195, 3175387, 2506752, 2507739, 2507665, 2126811, 2126811, 3134427, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 3208155, 2126811, 2179072, 2126811, 2126811, 2126811, 2642907, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2720731, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 3040219, 2126811, 3064795, 2126811, 2126811, 2126811, 2126811, 2126811, 3101659, 0, 0, 0, 2388881, 2126737, 2126737, 2126737, 2421649, 2126737, 2126737, 2126737, 2126737, 2126737, 2454417, 2126737, 2474897, 2483089, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2532241, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2605969, 2126737, 2630545, 2126737, 2126737, 2651025, 2126737, 2126737, 2126737, 2708369, 2126737, 2737041, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2663313, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 0, 0, 988, 2126811, 2126811, 2126811, 2126811, 3036049, 2126737, 2126737, 3072913, 2126737, 2126737, 2126737, 3122065, 2126737, 2126737, 3142545, 2126737, 2126737, 2126737, 3171217, 2126737, 2126737, 2126737, 2888593, 2126737, 2126737, 2925457, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 986, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126737, 3191697, 3195793, 2126737, 0, 0, 0, 0, 0, 0, 2388955, 2126811, 2126811, 2126811, 2421723, 2126811, 2126811, 2449408, 0, 2535424, 3031040, 2859008, 0, 0, 0, 0, 0, 2179072, 2449408, 2179072, 2535424, 2126811, 2737115, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2888667, 2126811, 2126811, 2925531, 2126811, 2126811, 2126811, 2126811, 2126811, 2585563, 2126811, 2126811, 2126811, 2126811, 2126811, 2618331, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2606043, 2126811, 2630619, 2126811, 2126811, 2651099, 2126811, 2126811, 2126811, 2708443, 2126811, 3142619, 2126811, 2126811, 2126811, 3171291, 2126811, 2126811, 3191771, 3195867, 2126811, 2179072, 2126811, 2126737, 2179072, 2179072, 2179072, 2637824, 2179072, 2179072, 2179072, 2179072, 2727936, 2752512, 2179072, 2179072, 2179072, 2842624, 2846720, 2179072, 3112960, 3219456, 2126737, 2126737, 3113873, 3220369, 2126811, 2126811, 3113947, 3220443, 0, 0, 0, 0, 0, 0, 0, 415, 415, 0, 0, 0, 0, 0, 415, 0, 3096576, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3223552, 0, 0, 2126737, 2126737, 2417553, 2126737, 2126737, 2126737, 2126737, 2929553, 2126737, 2126737, 2126737, 2999185, 2126737, 2126737, 2126737, 2126737, 3060625, 2126737, 2126737, 2126737, 2126737, 2933649, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3130257, 2126737, 2126737, 2126737, 2519953, 2126737, 2126737, 2126737, 2126737, 2589585, 2126737, 2614161, 2646929, 2126737, 2126737, 2696081, 2757521, 2126737, 2446225, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2552721, 2126737, 2126737, 2126737, 2638737, 2126737, 2126737, 2126737, 2126737, 2728849, 2753425, 2126737, 2126737, 2126737, 2126737, 2843537, 2847633, 2126737, 2896785, 2917265, 2126737, 2126737, 2945937, 2126737, 2126737, 2995089, 2126737, 3003281, 2126737, 2126737, 3023761, 2126737, 3068817, 3085201, 2126737, 3097489, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3224465, 0, 0, 2126811, 2126811, 2417627, 2843611, 2847707, 2126811, 2896859, 2917339, 2126811, 2126811, 2946011, 2126811, 2126811, 2995163, 2126811, 3003355, 2126811, 2126811, 3023835, 2126811, 3068891, 3085275, 2126811, 3097563, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 3224539, 2179072, 2126811, 2126737, 2126737, 2126737, 3031953, 2126737, 2126811, 2450395, 2126811, 2536411, 2126811, 2610139, 2126811, 2859995, 2126811, 2126811, 2126811, 2126811, 2126811, 2524123, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2601947, 2126811, 2515857, 2126737, 2126737, 2126737, 2544529, 2548625, 2126737, 2126737, 2597777, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2585489, 2126737, 2126737, 2126737, 2126737, 2126737, 2618257, 2126811, 2515931, 2126811, 2126811, 2126811, 2544603, 2548699, 2126811, 2126811, 2597851, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2655195, 2679771, 2761691, 2765787, 2786267, 2855899, 2970587, 2126811, 3007451, 3154833, 3167121, 3175313, 2397147, 2401243, 2126811, 2126811, 2442203, 2126811, 2470875, 2126811, 2126811, 2126811, 2520027, 2126811, 2126811, 2126811, 2126811, 2126811, 2638811, 2126811, 2126811, 2126811, 2126811, 2728923, 2753499, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 3179483, 2179072, 2126811, 2126737, 2179072, 2179072, 2126737, 2126737, 2126811, 2126811, 0, 0, 0, 0, 0, 0, 2510848, 2514944, 0, 0, 2678784, 2760704, 2764800, 2854912, 2969600, 2179072, 3006464, 2179072, 3018752, 2179072, 2179072, 2179072, 3149824, 2126737, 2429841, 2438033, 2126737, 2487185, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2655121, 2679697, 2761617, 2765713, 2786193, 2855825, 2970513, 2126737, 3007377, 2126737, 3019665, 2126737, 2126737, 2126737, 2126737, 3150737, 2126811, 2429915, 2438107, 2126811, 2487259, 2126811, 2126811, 2589659, 2126811, 2614235, 2647003, 2126811, 2126811, 2696155, 2757595, 2126811, 2126811, 2126811, 2126811, 2933723, 2126811, 2126811, 2663387, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2802651, 2814939, 2126811, 3019739, 2126811, 2126811, 2126811, 2126811, 3150811, 2179072, 3051520, 2126737, 3052433, 2126811, 3052507, 0, 2490368, 2498560, 2126811, 2556891, 2565083, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 3138523, 2940928, 2941841, 2941915, 0, 0, 0, 0, 0, 2748416, 2879488, 0, 3180, 0, 0, 0, 0, 0, 0, 0, 647, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2467, 0, 0, 2470, 0, 0, 0, 2179072, 2502656, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3010560, 2179072, 2179072, 2126737, 2126737, 2126811, 2126811, 0, 2486272, 0, 0, 0, 0, 0, 2678784, 2854912, 3006464, 2503569, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3011473, 2126737, 2126737, 2126737, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2179072, 2126811, 2126737, 2179072, 2179072, 2179072, 2179072, 2126737, 2126737, 2126737, 2126737, 2126811, 2126811, 2126811, 2126811, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2112, 0, 0, 0, 0, 2503643, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 2126811, 3011547, 2126811, 2126811, 2126811, 0, 0, 0, 2179072, 2126811, 2126737, 2179072, 2179072, 2179072, 2179072, 2179072, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2179072, 2609152, 2179072, 2859008, 2179072, 2179072, 2179072, 3031040, 2126737, 2450321, 2126737, 2536337, 2126737, 2610065, 2126737, 2859921, 3032027, 2126811, 2527232, 0, 0, 0, 0, 0, 2179072, 2527232, 2179072, 2179072, 2179072, 2179072, 2179072, 2126737, 2126737, 2802577, 2814865, 2126737, 2839441, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3126161, 2126737, 2528145, 2126737, 2126737, 2126737, 2126737, 2126737, 3093393, 2126811, 2528219, 2126811, 2126811, 2126811, 2126811, 2126811, 3093467, 0, 0, 0, 0, 0, 782, 0, 0, 0, 0, 0, 0, 541, 843, 541, 541, 541, 541, 541, 1796, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2822, 541, 541, 541, 541, 3026944, 0, 0, 0, 2404352, 2179072, 2179072, 2179072, 2179072, 3026944, 2405265, 2126737, 2126737, 2126737, 2126737, 3027857, 2405339, 2126811, 2126811, 2126811, 2126811, 3027931, 0, 2539520, 0, 2949120, 2179072, 2658304, 2973696, 2179072, 2126737, 2659217, 2974609, 2126737, 2126811, 2659291, 2974683, 2126811, 0, 2711552, 2560000, 2179072, 2560913, 2126737, 2560987, 2126811, 0, 2179072, 2179072, 3133440, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3207168, 2179072, 0, 0, 0, 0, 0, 0, 2464, 0, 0, 0, 0, 0, 0, 0, 0, 0, 324, 398, 0, 0, 0, 324, 0, 2126737, 2126811, 0, 2179072, 2126737, 2126811, 0, 2179072, 2126737, 2126811, 2985984, 2985984, 2986897, 2986971, 0, 0, 0, 0, 0, 0, 3164, 0, 0, 3167, 0, 0, 0, 0, 0, 0, 0, 1135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 824, 0, 0, 0, 0, 0, 0, 0, 221184, 221184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221184, 221184, 0, 0, 221184, 221184, 221184, 0, 0, 0, 0, 0, 0, 0, 221184, 0, 0, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221184, 0, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 300, 0, 303, 0, 0, 0, 303, 0, 304, 0, 0, 0, 304, 0, 0, 0, 304, 69632, 139682, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 98304, 0, 0, 0, 53248, 0, 0, 0, 0, 0, 2662400, 0, 2813952, 0, 0, 3133440, 0, 98304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111051, 0, 0, 0, 0, 303, 0, 304, 0, 0, 0, 2473984, 2478080, 0, 0, 0, 0, 0, 0, 0, 0, 0, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 163840, 3121152, 2179072, 2179072, 3141632, 2179072, 2179072, 2179072, 3170304, 2179072, 2179072, 3190784, 3194880, 2179072, 914, 0, 0, 0, 0, 0, 0, 3172, 3173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 665, 0, 0, 668, 0, 0, 0, 0, 914, 0, 2387968, 2125824, 2125824, 2125824, 2420736, 2125824, 2125824, 2125824, 2125824, 2125824, 2453504, 2125824, 2473984, 2482176, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2531328, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2605056, 2125824, 3190784, 3194880, 2125824, 988, 0, 0, 0, 988, 0, 2387968, 2125824, 2125824, 2125824, 2420736, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 299, 0, 0, 0, 303, 0, 0, 0, 303, 119198, 73728, 0, 0, 0, 0, 0, 65536, 0, 3096576, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3223552, 914, 0, 2125824, 2125824, 2416640, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2625536, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2699264, 2125824, 2715648, 2125824, 2723840, 2125824, 2732032, 2772992, 2125824, 3084288, 2125824, 3096576, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3223552, 988, 0, 2125824, 2125824, 2416640, 225890, 225890, 225890, 225890, 225890, 225890, 225890, 225741, 225741, 225741, 225741, 225741, 225906, 225741, 225906, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 90409, 90409, 90409, 90409, 0, 94506, 94506, 90409, 90409, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 94506, 1, 2125824, 237568, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1222, 0, 0, 0, 0, 0, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217088, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 304, 0, 0, 2125824, 241664, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1236, 0, 0, 0, 0, 0, 254414, 254414, 254414, 254414, 254414, 254414, 254414, 254414, 254414, 254414, 254414, 254414, 254414, 254414, 254414, 254414, 0, 0, 0, 0, 0, 0, 0, 12290, 0, 0, 0, 2183168, 0, 0, 270336, 0, 0, 299, 300, 0, 2134016, 303, 304, 200704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 687, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 180224, 0, 0, 0, 0, 0, 0, 0, 663, 0, 0, 666, 667, 0, 0, 0, 0, 2940928, 0, 0, 0, 0, 0, 2748416, 2879488, 0, 20480, 0, 0, 0, 0, 0, 0, 0, 679, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1129, 0, 0, 0, 0, 0, 0, 1, 12290, 2113826, 0, 0, 0, 0, 0, 0, 296, 0, 0, 0, 296, 0, 0, 0, 0, 0, 0, 3182, 0, 0, 0, 0, 3187, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2662400, 0, 2813952, 12290, 2113826, 0, 0, 2183168, 0, 0, 0, 0, 0, 299, 300, 0, 2134016, 303, 304, 2125824, 245760, 0, 0, 2179072, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2584576, 2125824, 2125824, 2125824, 2125824, 2125824, 2617344, 2125824, 2125824, 2125824, 2125824, 2125824, 245760, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1245, 0, 0, 0, 0, 0, 274432, 274432, 274432, 274432, 274432, 274432, 274432, 0, 0, 0, 0, 0, 274432, 0, 274432, 1, 12290, 3, 0, 0, 0, 0, 0, 253952, 0, 0, 0, 253952, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1155072, 0, 0, 0, 0, 0, 0, 12290, 3, 78115, 78115, 293, 0, 0, 0, 0, 0, 299, 300, 0, 0, 303, 304, 563, 563, 587, 587, 587, 587, 0, 2030, 0, 0, 0, 0, 0, 2032, 0, 0, 0, 0, 0, 0, 3196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3186, 0, 0, 0, 3189, 0, 0, 0, 0, 2034, 0, 0, 0, 0, 0, 2036, 0, 0, 0, 0, 0, 0, 0, 695, 0, 0, 0, 0, 365, 365, 365, 0, 0, 2485, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 266240, 0, 0, 0, 1678, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 338, 0, 0, 0, 0, 0, 0, 0, 1669, 0, 0, 0, 0, 0, 0, 0, 0, 2114, 0, 0, 0, 0, 0, 0, 3395, 541, 541, 541, 541, 3399, 541, 541, 541, 541, 541, 541, 1346, 541, 541, 541, 541, 541, 541, 1356, 541, 541, 12290, 3, 78115, 78456, 293, 0, 0, 0, 0, 0, 299, 300, 0, 0, 303, 304, 541, 588, 564, 564, 564, 564, 564, 564, 564, 588, 588, 588, 541, 588, 588, 588, 588, 588, 588, 588, 588, 564, 564, 541, 564, 588, 564, 588, 1, 0, 0, 0, 0, 2775, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163840, 0, 0, 0, 1, 12290, 3, 78116, 293, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 1, 0, 0, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 0, 0, 282624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1600, 1601, 0, 0, 0, 0, 282624, 282624, 282624, 0, 282624, 282624, 282624, 282624, 282624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254414, 254414, 254414, 254414, 254414, 254414, 254414, 254414, 1, 2981888, 2396160, 0, 3153920, 3180, 0, 0, 0, 0, 0, 0, 0, 2740224, 0, 0, 0, 0, 0, 0, 679, 751, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1144, 0, 365, 365, 0, 1147, 0, 0, 0, 0, 0, 286720, 286720, 0, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 0, 0, 0, 0, 0, 0, 0, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 0, 3108864, 3198976, 0, 0, 3043328, 0, 3149824, 2936832, 0, 2760704, 3305, 2437120, 0, 0, 0, 0, 0, 0, 680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2875392, 0, 0, 0, 3386, 0, 0, 0, 0, 0, 0, 2834432, 2940928, 0, 0, 0, 0, 0, 2748416, 2879488, 0, 3386, 0, 0, 0, 0, 0, 0, 0, 709, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2048, 0, 0, 0, 0, 0, 0, 0, 0, 0, 309, 0, 0, 0, 0, 0, 308, 0, 308, 309, 0, 308, 308, 0, 0, 0, 308, 308, 309, 309, 0, 0, 0, 0, 0, 0, 308, 408, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 781, 0, 0, 0, 309, 413, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 783, 0, 802, 0, 0, 0, 0, 541, 847, 541, 541, 541, 541, 541, 2830, 2831, 541, 541, 541, 541, 2834, 541, 541, 541, 541, 541, 541, 541, 3521, 541, 3523, 541, 541, 3525, 541, 563, 563, 0, 0, 432, 0, 0, 0, 0, 308, 449, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 489, 489, 463, 489, 489, 489, 489, 489, 489, 489, 514, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 534, 489, 489, 489, 489, 489, 542, 565, 542, 565, 542, 542, 565, 542, 589, 565, 565, 565, 565, 565, 565, 565, 589, 589, 589, 542, 589, 589, 589, 589, 589, 589, 589, 589, 565, 565, 542, 565, 589, 565, 589, 1, 0, 0, 674, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 323, 324, 0, 0, 704, 0, 0, 0, 0, 0, 0, 0, 711, 0, 0, 0, 0, 0, 0, 0, 742, 0, 0, 0, 0, 742, 0, 748, 0, 0, 0, 736, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 747, 0, 0, 0, 0, 0, 792, 663, 841, 0, 0, 0, 0, 541, 845, 541, 541, 541, 541, 541, 2217, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1802, 541, 541, 541, 541, 0, 0, 0, 0, 645, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 765, 0, 0, 768, 0, 0, 0, 0, 774, 0, 0, 778, 0, 0, 0, 0, 0, 0, 3562, 0, 3564, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3219, 541, 541, 541, 541, 541, 3224, 0, 0, 785, 0, 0, 0, 0, 789, 0, 0, 0, 0, 0, 0, 0, 793, 0, 0, 736, 0, 793, 0, 0, 0, 0, 648, 0, 0, 0, 0, 0, 0, 0, 807, 808, 0, 0, 0, 0, 808, 0, 0, 807, 0, 0, 0, 0, 0, 755, 0, 0, 816, 817, 0, 0, 0, 793, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221184, 0, 0, 0, 0, 0, 0, 648, 0, 0, 0, 0, 0, 834, 789, 0, 0, 0, 0, 0, 0, 0, 2139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1712, 0, 0, 0, 0, 0, 0, 838, 839, 789, 789, 0, 0, 0, 0, 789, 736, 789, 0, 541, 541, 849, 853, 563, 964, 563, 967, 563, 563, 981, 563, 563, 0, 587, 587, 587, 996, 1000, 587, 0, 0, 0, 0, 0, 0, 0, 0, 3180, 3448, 0, 0, 0, 0, 0, 0, 0, 2465, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2152, 0, 0, 0, 0, 0, 0, 1093, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1135, 0, 0, 0, 0, 1152, 0, 0, 0, 0, 1157, 0, 0, 0, 0, 0, 0, 0, 822, 0, 816, 0, 664, 0, 0, 0, 0, 0, 0, 0, 0, 1201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221184, 0, 221184, 0, 0, 0, 1253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 339, 340, 341, 541, 541, 1342, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2239, 0, 0, 0, 0, 0, 1596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233472, 0, 0, 0, 0, 0, 0, 1640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 354, 355, 356, 357, 1653, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1163, 0, 0, 0, 0, 1669, 0, 0, 0, 0, 0, 0, 1673, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 346, 345, 65536, 344, 0, 1729, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3327, 541, 541, 1742, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1755, 541, 541, 541, 541, 541, 541, 541, 2193, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2557, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1794, 541, 541, 1797, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1314, 541, 541, 541, 1318, 541, 541, 1809, 541, 541, 541, 541, 541, 1814, 541, 541, 541, 541, 541, 541, 541, 1360, 914, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 0, 2328, 1824, 563, 563, 563, 563, 563, 1831, 563, 563, 563, 563, 563, 1837, 563, 563, 563, 563, 563, 3093, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3102, 563, 563, 1892, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1905, 563, 563, 563, 563, 978, 563, 563, 563, 563, 0, 587, 587, 587, 587, 587, 587, 1997, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1531, 587, 587, 587, 587, 587, 587, 563, 563, 563, 1910, 563, 563, 563, 563, 563, 563, 563, 26028, 1920, 587, 587, 587, 0, 1285, 1469, 1377, 541, 541, 1339, 541, 541, 563, 563, 1431, 563, 587, 587, 1927, 587, 587, 587, 587, 587, 1933, 587, 587, 587, 587, 587, 587, 587, 1529, 587, 587, 587, 587, 587, 587, 587, 587, 1932, 587, 587, 587, 587, 587, 587, 587, 587, 1494, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1946, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1513, 587, 587, 563, 563, 2026, 587, 587, 587, 0, 2030, 0, 0, 0, 0, 0, 2032, 0, 0, 0, 0, 0, 0, 131072, 0, 131072, 131072, 131072, 131072, 0, 131072, 131072, 131072, 131072, 131072, 131072, 131072, 0, 0, 0, 0, 0, 131072, 0, 131072, 1, 0, 0, 0, 2042, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 365, 365, 0, 0, 2141, 0, 0, 2148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 237568, 0, 0, 0, 0, 0, 0, 2140, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2170, 541, 541, 2173, 541, 541, 541, 541, 541, 541, 2181, 541, 541, 541, 541, 541, 541, 541, 541, 2841, 541, 541, 541, 541, 541, 541, 541, 541, 1294, 541, 541, 541, 541, 541, 541, 541, 541, 1327, 541, 541, 541, 1334, 1336, 541, 541, 541, 541, 2214, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2535, 541, 563, 2258, 563, 563, 563, 563, 563, 563, 2266, 563, 563, 563, 563, 563, 563, 563, 983, 563, 0, 587, 587, 587, 587, 1001, 587, 563, 2300, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 587, 587, 587, 2345, 587, 587, 587, 587, 587, 587, 2353, 587, 587, 587, 587, 587, 587, 587, 1950, 587, 587, 587, 587, 587, 587, 587, 587, 1468, 587, 587, 587, 587, 587, 587, 587, 587, 2387, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 541, 587, 563, 2414, 541, 541, 541, 541, 563, 563, 563, 563, 587, 587, 587, 587, 2030, 0, 2032, 0, 2034, 0, 2036, 0, 0, 2428, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1713, 0, 0, 0, 0, 0, 2436, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1179, 2449, 0, 0, 0, 0, 0, 2453, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1726, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2477, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245760, 0, 0, 0, 0, 0, 2501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 386, 338, 0, 541, 541, 541, 2539, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2198, 541, 541, 0, 0, 0, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2595, 563, 563, 563, 563, 563, 3238, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2880, 563, 563, 563, 563, 563, 587, 587, 587, 2661, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2669, 587, 587, 587, 587, 2714, 587, 587, 587, 587, 587, 587, 541, 587, 563, 541, 541, 2417, 2418, 563, 563, 2421, 2422, 587, 587, 2425, 2426, 0, 1563, 0, 0, 0, 2735, 0, 0, 0, 0, 0, 0, 2740, 0, 0, 0, 0, 0, 0, 0, 1102, 1101, 0, 0, 0, 0, 0, 0, 0, 0, 1724, 0, 0, 0, 0, 0, 0, 0, 0, 1172, 0, 0, 0, 0, 0, 0, 0, 0, 1187, 0, 0, 0, 0, 0, 0, 1104, 0, 0, 0, 0, 0, 2763, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2431, 2432, 0, 0, 0, 0, 0, 0, 0, 0, 2792, 2793, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2049, 0, 0, 0, 0, 0, 541, 541, 541, 541, 2829, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2836, 563, 563, 563, 563, 2876, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 0, 2329, 587, 587, 587, 2884, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1874, 587, 587, 2933, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1536, 587, 587, 2955, 541, 2957, 563, 2959, 587, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 541, 587, 3442, 0, 3444, 0, 0, 0, 0, 0, 3180, 0, 0, 0, 0, 3452, 0, 0, 0, 0, 0, 796, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 796, 0, 0, 0, 0, 3454, 0, 541, 3457, 541, 3459, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2585, 0, 0, 0, 563, 587, 3488, 587, 3490, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1047, 587, 587, 587, 587, 587, 0, 0, 0, 3505, 0, 0, 0, 0, 0, 0, 0, 3512, 0, 0, 541, 541, 541, 541, 541, 541, 3462, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3334, 541, 541, 541, 563, 563, 563, 541, 541, 541, 3517, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3530, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 587, 587, 587, 587, 587, 587, 587, 587, 3544, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 0, 0, 0, 0, 541, 541, 541, 541, 563, 563, 310, 311, 312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 669, 0, 0, 0, 0, 0, 421, 0, 0, 0, 0, 450, 0, 0, 0, 0, 0, 0, 0, 0, 304, 304, 304, 304, 0, 304, 304, 304, 0, 0, 0, 0, 450, 450, 421, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 533, 450, 533, 533, 533, 450, 533, 533, 533, 533, 450, 543, 566, 543, 566, 543, 543, 566, 543, 590, 566, 566, 566, 566, 566, 566, 566, 590, 590, 590, 543, 590, 590, 590, 590, 590, 590, 590, 590, 566, 566, 616, 621, 590, 621, 627, 1, 960, 563, 563, 563, 563, 563, 563, 563, 563, 0, 587, 587, 587, 587, 587, 587, 587, 3136, 587, 587, 3138, 587, 587, 587, 587, 587, 0, 0, 0, 0, 1657, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254414, 0, 0, 0, 1676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1211, 541, 541, 541, 1810, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1360, 914, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1378, 0, 0, 2486, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 694, 0, 0, 541, 541, 541, 541, 2528, 541, 541, 541, 541, 2532, 541, 541, 541, 541, 541, 541, 541, 541, 3218, 541, 541, 541, 541, 541, 541, 541, 541, 2583, 541, 541, 541, 541, 0, 2586, 0, 0, 0, 0, 563, 563, 563, 563, 563, 563, 2592, 563, 563, 563, 563, 2596, 563, 0, 587, 587, 587, 587, 587, 78115, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225741, 225741, 225741, 225741, 225741, 225741, 225741, 225741, 225741, 225741, 225741, 225741, 225741, 225741, 225741, 225741, 0, 0, 0, 0, 0, 0, 0, 2658, 587, 587, 587, 587, 2662, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2665, 587, 587, 587, 587, 587, 0, 0, 0, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 0, 0, 0, 0, 0, 0, 694, 0, 0, 0, 0, 0, 365, 365, 365, 0, 0, 313, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2142208, 0, 0, 316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 730, 0, 0, 0, 423, 431, 433, 422, 431, 0, 313, 431, 451, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 485, 490, 490, 501, 490, 490, 490, 490, 490, 490, 490, 490, 516, 516, 529, 529, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 516, 530, 530, 530, 530, 530, 544, 567, 544, 567, 544, 544, 567, 544, 591, 567, 567, 567, 567, 567, 567, 567, 591, 591, 591, 613, 591, 591, 591, 591, 591, 591, 591, 614, 615, 615, 613, 615, 614, 615, 614, 1, 734, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1238, 0, 0, 0, 0, 767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 266240, 0, 0, 0, 0, 0, 702, 0, 0, 0, 0, 0, 702, 0, 0, 0, 541, 541, 541, 541, 541, 541, 3322, 541, 541, 541, 541, 541, 541, 541, 541, 1816, 541, 541, 541, 541, 541, 541, 1360, 563, 563, 563, 968, 563, 563, 563, 563, 563, 0, 587, 587, 587, 587, 587, 587, 587, 3150, 3151, 3152, 541, 541, 563, 563, 587, 587, 0, 0, 2963, 0, 0, 0, 0, 0, 0, 0, 0, 3180, 0, 0, 3389, 0, 0, 0, 0, 0, 1108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 308, 309, 0, 1150, 1108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1119, 0, 0, 1212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1225, 0, 0, 0, 0, 0, 797, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 797, 0, 1360, 914, 563, 563, 1364, 563, 563, 1368, 563, 563, 563, 563, 563, 563, 563, 563, 985, 0, 587, 587, 587, 587, 587, 587, 1382, 563, 1387, 563, 563, 1391, 563, 563, 1394, 563, 563, 563, 563, 563, 563, 563, 984, 563, 0, 587, 587, 587, 587, 587, 1004, 587, 1460, 587, 587, 587, 587, 587, 587, 587, 587, 1474, 587, 1479, 587, 587, 1483, 587, 587, 1486, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1939, 587, 587, 0, 1692, 0, 1694, 0, 0, 0, 0, 0, 0, 1701, 0, 0, 0, 0, 0, 0, 0, 2442, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1173, 0, 0, 0, 0, 0, 0, 541, 541, 1745, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1757, 541, 541, 541, 541, 541, 541, 2192, 541, 541, 2195, 541, 541, 541, 541, 541, 541, 541, 1798, 541, 541, 541, 541, 541, 541, 1806, 541, 541, 1792, 1793, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2824, 541, 0, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1840, 563, 0, 587, 587, 587, 587, 587, 78115, 1079, 0, 0, 1083, 1087, 0, 0, 1091, 587, 587, 587, 587, 1948, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1478, 587, 587, 587, 587, 587, 587, 587, 587, 1961, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1533, 587, 587, 587, 587, 0, 2034, 0, 2036, 0, 0, 0, 0, 0, 0, 2430, 0, 0, 0, 0, 0, 0, 0, 2454, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2429, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2476, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 365, 365, 702, 0, 0, 0, 2502, 2503, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1147355, 0, 0, 0, 587, 587, 2700, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2004, 587, 587, 0, 0, 2802, 0, 0, 0, 0, 0, 0, 0, 2806, 541, 541, 541, 541, 541, 541, 541, 2204, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2220, 541, 541, 541, 541, 541, 541, 541, 2956, 563, 2958, 587, 2960, 0, 0, 0, 0, 0, 2966, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 350, 348, 65536, 0, 0, 0, 0, 2970, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 365, 208896, 0, 3035, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1807, 541, 541, 3050, 3051, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2223, 2224, 541, 563, 3090, 563, 3092, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1415, 563, 563, 563, 3117, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1484, 587, 587, 3132, 587, 3134, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1937, 1938, 587, 587, 587, 0, 3192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 309, 308, 541, 541, 541, 541, 3228, 541, 541, 541, 541, 563, 563, 563, 563, 563, 563, 563, 563, 563, 945, 563, 563, 563, 563, 587, 3503, 0, 3504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 2810, 3515, 541, 3516, 541, 541, 541, 3520, 541, 541, 541, 541, 541, 541, 541, 563, 3528, 563, 3529, 563, 563, 563, 3533, 563, 563, 563, 563, 563, 563, 563, 563, 587, 3542, 587, 3543, 587, 587, 587, 3547, 587, 587, 587, 587, 587, 587, 587, 587, 0, 0, 0, 0, 3673, 541, 541, 541, 3675, 563, 563, 3676, 587, 587, 587, 3678, 0, 0, 541, 541, 563, 563, 587, 587, 0, 541, 541, 3204, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2238, 2586, 0, 324, 324, 374, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1133, 0, 0, 0, 0, 434, 374, 0, 439, 445, 0, 452, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 491, 491, 502, 491, 491, 491, 491, 491, 491, 491, 491, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 545, 568, 545, 568, 545, 545, 568, 545, 592, 568, 568, 568, 568, 568, 568, 568, 592, 592, 592, 545, 592, 592, 592, 592, 592, 592, 592, 592, 568, 568, 545, 568, 592, 568, 592, 1, 587, 587, 587, 1019, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1052, 587, 587, 587, 1122, 0, 1124, 1125, 0, 0, 0, 1127, 1128, 0, 0, 0, 0, 0, 0, 0, 0, 334, 0, 0, 0, 0, 0, 334, 0, 0, 0, 1166, 1167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 400, 0, 0, 0, 0, 0, 1228, 0, 0, 0, 0, 1233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1241, 0, 0, 0, 0, 1244, 0, 1194, 0, 1113, 0, 1250, 1127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 1274, 541, 541, 541, 541, 541, 541, 2203, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1329, 541, 541, 541, 541, 541, 541, 541, 1322, 541, 541, 1324, 541, 541, 541, 1328, 541, 541, 541, 541, 541, 541, 541, 541, 3522, 541, 541, 541, 541, 541, 563, 563, 3068, 563, 563, 563, 563, 563, 563, 563, 563, 2603, 563, 563, 563, 563, 563, 563, 563, 1360, 914, 563, 563, 1365, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 587, 3427, 587, 587, 3429, 563, 563, 563, 1405, 563, 563, 563, 563, 563, 563, 563, 1414, 563, 563, 1416, 563, 0, 587, 587, 587, 1051, 587, 78115, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 563, 563, 1420, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1437, 563, 563, 563, 563, 563, 1444, 563, 563, 563, 563, 563, 26028, 1360, 988, 587, 587, 1457, 587, 0, 0, 0, 0, 0, 0, 0, 3447, 3180, 0, 0, 0, 0, 0, 0, 0, 1237, 0, 0, 541, 541, 1273, 541, 1276, 541, 0, 0, 0, 1656, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 846, 541, 541, 587, 587, 587, 1993, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1496, 587, 587, 587, 563, 2025, 587, 587, 587, 2029, 0, 2030, 0, 0, 0, 0, 0, 2032, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 2034, 0, 0, 0, 0, 0, 2036, 0, 0, 0, 0, 0, 2039, 0, 2078, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 331, 0, 0, 0, 0, 2092, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 0, 541, 2172, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 0, 0, 0, 541, 2188, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 0, 2240, 541, 541, 541, 541, 2229, 541, 2231, 541, 541, 541, 541, 541, 541, 541, 0, 0, 0, 0, 0, 0, 1146880, 0, 1146880, 0, 0, 0, 0, 0, 0, 0, 0, 2617344, 0, 0, 0, 0, 0, 2789376, 0, 0, 0, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2253, 563, 563, 563, 563, 0, 0, 0, 0, 0, 0, 587, 2654, 587, 587, 587, 587, 587, 587, 3135, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1530, 587, 587, 587, 587, 587, 587, 2257, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1889, 2273, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2272, 563, 563, 563, 563, 2316, 563, 2318, 563, 563, 563, 563, 563, 563, 563, 0, 0, 0, 0, 0, 0, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 541, 563, 2344, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1516, 2360, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1517, 587, 587, 587, 587, 2403, 587, 2405, 587, 587, 587, 587, 587, 587, 587, 541, 587, 0, 0, 0, 0, 0, 0, 0, 3508, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 3400, 541, 541, 541, 2499, 0, 0, 0, 0, 0, 2504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2086, 2087, 0, 0, 0, 0, 541, 541, 2526, 2527, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2237, 0, 0, 541, 541, 2566, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3046, 541, 0, 0, 0, 563, 563, 563, 2590, 563, 2591, 563, 563, 563, 563, 563, 563, 563, 1411, 563, 563, 563, 563, 563, 563, 563, 563, 1429, 563, 563, 563, 563, 563, 563, 563, 563, 1916, 563, 563, 26028, 1921, 587, 587, 587, 0, 0, 0, 2761, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 674, 0, 0, 0, 541, 541, 2837, 541, 541, 541, 541, 541, 541, 541, 2843, 541, 541, 541, 541, 541, 541, 541, 2232, 541, 541, 2235, 2236, 541, 541, 0, 0, 563, 563, 563, 2885, 563, 563, 563, 563, 563, 563, 563, 2891, 563, 563, 563, 563, 0, 0, 2329, 0, 0, 0, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2341, 587, 587, 587, 2920, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1519, 587, 587, 587, 587, 3373, 587, 587, 541, 541, 563, 563, 587, 587, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2968, 563, 587, 587, 587, 587, 587, 587, 3493, 587, 587, 587, 587, 587, 587, 587, 587, 1034, 587, 587, 587, 587, 587, 587, 587, 326, 327, 328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1161, 0, 0, 0, 0, 0, 325, 373, 328, 372, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2111, 0, 0, 0, 0, 0, 325, 0, 0, 372, 372, 402, 0, 328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 339, 293, 0, 0, 0, 0, 0, 0, 325, 0, 327, 0, 0, 0, 453, 466, 466, 466, 466, 466, 466, 466, 479, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 492, 492, 466, 492, 492, 507, 509, 492, 492, 507, 492, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 535, 518, 518, 518, 518, 518, 546, 569, 546, 569, 546, 546, 569, 546, 593, 569, 569, 569, 569, 569, 569, 569, 593, 593, 593, 546, 593, 593, 593, 593, 593, 593, 593, 593, 569, 569, 546, 569, 593, 569, 593, 1, 0, 0, 658, 659, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 670, 671, 0, 689, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 365, 365, 0, 0, 0, 0, 0, 800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 718, 0, 720, 0, 0, 0, 0, 0, 0, 727, 0, 0, 0, 731, 0, 0, 0, 0, 0, 0, 1159168, 417, 417, 0, 0, 0, 0, 0, 417, 0, 0, 784, 0, 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 759, 0, 0, 0, 0, 0, 798, 0, 803, 0, 806, 0, 0, 0, 0, 803, 806, 0, 0, 0, 0, 0, 0, 741, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 806, 806, 803, 0, 0, 0, 0, 0, 0, 0, 786, 0, 798, 0, 815, 0, 0, 0, 0, 0, 802, 0, 0, 783, 0, 0, 0, 0, 802, 0, 0, 0, 0, 0, 0, 0, 802, 0, 0, 0, 0, 806, 0, 707, 0, 0, 823, 0, 0, 0, 0, 0, 823, 823, 826, 0, 0, 0, 786, 0, 0, 0, 0, 0, 835, 0, 0, 0, 0, 0, 0, 0, 2480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 784, 0, 0, 0, 835, 815, 835, 0, 541, 541, 850, 541, 541, 541, 541, 541, 3052, 541, 541, 541, 541, 541, 541, 541, 541, 3060, 541, 541, 541, 541, 541, 3217, 541, 541, 541, 541, 541, 541, 541, 3222, 541, 541, 541, 541, 541, 2529, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3043, 541, 541, 541, 541, 856, 541, 541, 869, 541, 541, 880, 541, 885, 541, 541, 893, 896, 901, 541, 909, 563, 563, 966, 969, 974, 563, 982, 563, 563, 0, 587, 587, 587, 997, 587, 1003, 587, 587, 1016, 587, 587, 1027, 587, 1032, 587, 587, 1040, 1043, 1048, 587, 1056, 587, 0, 0, 0, 0, 0, 0, 3507, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 3031, 541, 541, 541, 541, 0, 0, 0, 1110, 0, 0, 0, 0, 0, 0, 0, 1117, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 421, 0, 65536, 0, 0, 1137, 1138, 0, 0, 0, 0, 1142, 0, 0, 0, 365, 365, 0, 0, 0, 0, 0, 0, 769, 0, 0, 0, 775, 776, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 374, 0, 65536, 0, 0, 1165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 515, 522, 0, 0, 1182, 741, 0, 0, 0, 1134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 0, 0, 0, 0, 0, 541, 541, 541, 1281, 541, 541, 541, 541, 541, 541, 1296, 541, 541, 541, 1301, 541, 541, 541, 541, 541, 3229, 541, 541, 541, 563, 563, 563, 563, 563, 563, 563, 941, 563, 563, 563, 563, 563, 563, 1360, 914, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1373, 563, 563, 563, 563, 563, 3249, 563, 3251, 563, 563, 563, 563, 563, 563, 563, 563, 1852, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1388, 563, 563, 563, 1393, 563, 563, 563, 563, 563, 563, 563, 563, 1451, 26028, 1360, 988, 587, 587, 587, 587, 587, 1485, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1500, 1540, 587, 587, 0, 541, 587, 563, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 563, 3477, 563, 563, 563, 563, 563, 563, 563, 563, 1396, 563, 563, 563, 563, 563, 563, 563, 0, 0, 1607, 1608, 1609, 0, 1611, 1612, 0, 0, 0, 0, 1617, 0, 0, 0, 0, 0, 0, 770, 0, 0, 773, 0, 0, 777, 0, 0, 0, 0, 0, 0, 796, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 563, 933, 563, 563, 947, 563, 563, 563, 563, 0, 0, 1639, 0, 0, 1642, 0, 1644, 0, 0, 0, 0, 0, 1650, 1651, 0, 0, 0, 0, 0, 805, 0, 0, 692, 0, 0, 672, 0, 692, 0, 810, 0, 1667, 0, 0, 1669, 0, 0, 0, 0, 1671, 1672, 0, 0, 0, 0, 0, 0, 0, 2491, 2492, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2686976, 2736128, 0, 0, 2531328, 2707456, 0, 0, 0, 0, 0, 1708, 0, 0, 1711, 0, 0, 0, 0, 0, 1715, 0, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 0, 1138688, 0, 1719, 1720, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1711, 0, 0, 0, 1731, 1585, 1585, 1733, 541, 1735, 541, 1736, 1737, 541, 1739, 541, 541, 541, 541, 541, 1310, 541, 541, 541, 541, 541, 541, 541, 1317, 541, 541, 541, 541, 541, 1748, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1759, 541, 1743, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1756, 541, 541, 541, 541, 541, 541, 541, 3333, 541, 541, 541, 541, 541, 563, 563, 563, 922, 926, 563, 563, 563, 563, 563, 563, 952, 563, 957, 1760, 541, 541, 541, 541, 1764, 541, 1766, 541, 541, 541, 541, 541, 541, 541, 541, 541, 889, 541, 541, 541, 541, 907, 541, 1774, 1775, 1777, 541, 541, 541, 541, 541, 541, 541, 1785, 1786, 1787, 541, 541, 1790, 1791, 541, 541, 541, 541, 541, 541, 541, 1799, 541, 541, 541, 1803, 541, 541, 541, 541, 541, 541, 2530, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1315, 541, 541, 541, 541, 1320, 541, 541, 541, 541, 1811, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1822, 1360, 914, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1379, 0, 1827, 563, 1829, 563, 1830, 563, 1832, 563, 1834, 563, 563, 563, 1838, 563, 563, 563, 563, 1390, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2652, 0, 587, 587, 587, 563, 1859, 563, 1861, 563, 563, 563, 563, 563, 563, 563, 563, 1869, 1870, 1872, 563, 0, 587, 587, 1042, 587, 587, 78115, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 307, 307, 307, 0, 0, 0, 0, 0, 1907, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1918, 26028, 0, 1923, 587, 1925, 587, 1926, 587, 1928, 587, 1930, 587, 587, 587, 1934, 587, 587, 587, 587, 587, 587, 587, 3366, 587, 587, 587, 587, 3367, 3368, 587, 587, 587, 587, 587, 1947, 587, 587, 587, 587, 1951, 587, 587, 587, 587, 1955, 587, 1957, 587, 587, 1976, 1977, 1978, 587, 587, 1981, 1982, 587, 587, 587, 587, 587, 587, 587, 1999, 2000, 587, 587, 587, 587, 587, 587, 587, 2015, 2016, 2017, 541, 2019, 541, 541, 563, 2023, 1990, 587, 587, 587, 1994, 587, 587, 587, 587, 587, 587, 587, 2003, 587, 587, 587, 0, 1288, 1472, 1380, 541, 541, 541, 541, 541, 563, 563, 563, 563, 3475, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2267, 563, 563, 563, 563, 563, 563, 2024, 563, 1982, 587, 2028, 587, 0, 2030, 0, 0, 0, 0, 0, 2032, 0, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 746, 0, 0, 0, 0, 0, 2043, 0, 0, 2046, 2047, 0, 0, 0, 2051, 0, 0, 0, 0, 0, 0, 800, 0, 0, 0, 0, 0, 0, 0, 800, 0, 0, 0, 0, 541, 541, 541, 541, 2090, 0, 0, 0, 0, 2094, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2456, 0, 0, 0, 0, 0, 0, 0, 0, 1669, 0, 0, 0, 0, 0, 0, 0, 2113, 0, 0, 2116, 0, 0, 2119, 0, 0, 0, 0, 0, 0, 2126, 0, 2128, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 370, 370, 0, 0, 65536, 370, 0, 0, 0, 0, 2137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1159168, 0, 0, 0, 0, 2047, 0, 2147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1103, 1104, 1105, 1106, 0, 2158, 0, 0, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3329, 541, 541, 541, 2174, 541, 2176, 541, 541, 541, 541, 541, 541, 2184, 541, 2186, 541, 541, 541, 541, 541, 3332, 541, 541, 541, 541, 541, 541, 541, 563, 563, 563, 3069, 563, 563, 563, 563, 563, 563, 563, 2212, 541, 541, 541, 541, 541, 541, 2219, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1312, 541, 541, 541, 541, 541, 541, 563, 563, 2259, 563, 2261, 563, 563, 563, 563, 563, 563, 2269, 563, 2271, 563, 563, 563, 563, 1422, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1438, 587, 587, 2346, 587, 2348, 587, 587, 587, 587, 587, 587, 2356, 587, 2358, 587, 587, 0, 0, 0, 3634, 0, 3636, 541, 541, 541, 541, 541, 541, 541, 563, 563, 921, 563, 563, 563, 563, 940, 944, 950, 563, 955, 563, 563, 2261, 541, 2416, 541, 541, 563, 2420, 563, 563, 587, 2424, 587, 587, 2030, 0, 2032, 0, 0, 0, 2452, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1132, 0, 0, 0, 0, 0, 2461, 0, 0, 0, 0, 0, 2466, 0, 2468, 2469, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 420, 420, 0, 0, 65536, 420, 0, 0, 0, 0, 2488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 0, 0, 0, 0, 2516, 2468, 0, 0, 0, 0, 0, 2521, 0, 0, 0, 541, 541, 541, 541, 541, 3321, 541, 541, 541, 3325, 541, 541, 541, 541, 541, 541, 1749, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2558, 541, 541, 541, 541, 541, 2563, 541, 541, 541, 2568, 541, 541, 541, 541, 541, 541, 541, 2575, 541, 541, 541, 541, 541, 541, 2542, 541, 2544, 541, 541, 541, 541, 541, 541, 541, 541, 563, 3411, 563, 563, 3413, 563, 563, 563, 541, 541, 541, 541, 2580, 541, 541, 541, 541, 541, 541, 541, 541, 0, 2586, 0, 0, 0, 0, 0, 812, 0, 809, 792, 0, 0, 814, 0, 667, 0, 788, 0, 0, 0, 563, 563, 563, 563, 563, 563, 563, 563, 2594, 563, 563, 563, 563, 0, 2652, 0, 0, 0, 0, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2342, 587, 563, 2624, 563, 563, 563, 563, 2628, 563, 563, 563, 2633, 563, 563, 563, 563, 563, 563, 2629, 563, 563, 563, 563, 563, 563, 2636, 563, 563, 563, 563, 2640, 563, 563, 563, 563, 563, 563, 563, 563, 2646, 563, 563, 563, 563, 0, 2652, 0, 0, 0, 0, 587, 587, 587, 2656, 587, 2657, 587, 587, 2660, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2383, 587, 587, 587, 587, 2672, 587, 2674, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1970, 587, 587, 587, 587, 587, 2699, 587, 587, 587, 587, 587, 587, 587, 2706, 587, 587, 587, 587, 587, 587, 587, 3375, 541, 3376, 563, 3377, 587, 0, 0, 0, 587, 587, 2712, 587, 587, 587, 587, 587, 587, 587, 587, 541, 587, 563, 541, 541, 541, 541, 563, 563, 2800, 2801, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3402, 2992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2992, 0, 0, 0, 0, 0, 0, 840, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 2166, 541, 541, 541, 541, 541, 0, 3022, 0, 0, 0, 3025, 541, 541, 541, 541, 541, 541, 3032, 541, 541, 541, 541, 541, 541, 2570, 541, 541, 541, 541, 2574, 541, 541, 541, 541, 541, 541, 1286, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1818, 541, 541, 541, 541, 1360, 541, 541, 3036, 541, 541, 541, 541, 541, 541, 541, 3042, 541, 541, 541, 541, 541, 541, 541, 2531, 541, 541, 541, 541, 541, 541, 541, 541, 541, 563, 3230, 563, 563, 563, 3233, 563, 3048, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3057, 3059, 541, 541, 541, 541, 541, 541, 2582, 541, 541, 541, 541, 541, 541, 0, 2586, 0, 3062, 541, 3064, 3065, 541, 563, 563, 563, 563, 563, 563, 3072, 563, 563, 563, 563, 563, 1425, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2889, 563, 563, 563, 563, 563, 563, 563, 3076, 563, 563, 563, 563, 563, 563, 563, 3082, 563, 563, 563, 563, 563, 3088, 563, 563, 3091, 563, 563, 563, 563, 563, 563, 563, 563, 3098, 3100, 563, 563, 563, 563, 563, 3342, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2645, 563, 563, 563, 563, 563, 563, 563, 3104, 563, 3106, 3107, 563, 587, 587, 587, 587, 587, 587, 3114, 587, 587, 587, 0, 1544, 1545, 1546, 541, 541, 1548, 541, 541, 563, 563, 1552, 563, 587, 587, 3118, 587, 587, 587, 587, 587, 587, 587, 3124, 587, 587, 587, 587, 587, 587, 1998, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3551, 587, 587, 3553, 587, 0, 0, 3130, 587, 587, 3133, 587, 587, 587, 587, 587, 587, 587, 587, 3140, 3142, 587, 587, 0, 0, 3633, 0, 0, 0, 541, 541, 3638, 541, 541, 541, 3642, 563, 587, 587, 3146, 587, 3148, 3149, 587, 541, 587, 563, 541, 3154, 563, 3156, 587, 3158, 0, 0, 0, 0, 0, 3181, 0, 3183, 0, 0, 0, 0, 0, 0, 0, 3190, 0, 0, 0, 3193, 3194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2200252, 2200252, 2200252, 0, 563, 563, 563, 563, 3237, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1400, 563, 563, 563, 563, 563, 563, 563, 3248, 563, 563, 563, 563, 563, 563, 563, 563, 3256, 563, 563, 563, 563, 563, 3352, 563, 563, 563, 563, 587, 587, 587, 587, 587, 3358, 563, 563, 563, 587, 587, 587, 3261, 587, 587, 587, 587, 587, 587, 587, 3266, 587, 0, 0, 0, 0, 0, 3506, 0, 0, 3509, 0, 0, 0, 0, 0, 541, 541, 541, 541, 3662, 541, 563, 563, 563, 563, 3666, 563, 0, 3310, 0, 0, 3313, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2200253, 151552, 2200253, 0, 587, 587, 587, 3372, 587, 587, 587, 541, 541, 563, 563, 587, 587, 0, 0, 0, 0, 0, 0, 0, 0, 2967, 0, 0, 0, 0, 0, 0, 3383, 3384, 0, 3180, 0, 0, 0, 0, 0, 3392, 0, 0, 0, 0, 0, 1097, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 331, 382, 384, 0, 0, 0, 563, 3417, 563, 563, 563, 563, 563, 563, 563, 563, 563, 587, 587, 587, 587, 587, 587, 587, 3115, 587, 587, 587, 587, 587, 587, 3433, 587, 587, 587, 587, 587, 587, 587, 587, 587, 541, 563, 3472, 563, 3474, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3243, 563, 563, 563, 3470, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3485, 563, 563, 563, 563, 3532, 563, 563, 563, 563, 563, 563, 563, 563, 563, 587, 587, 3110, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3546, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3555, 3556, 0, 0, 0, 3559, 0, 0, 0, 0, 0, 3565, 3566, 3567, 541, 541, 541, 3570, 541, 3572, 541, 541, 541, 541, 3577, 3578, 3579, 563, 563, 563, 3582, 563, 3584, 563, 0, 587, 587, 1044, 587, 587, 291, 1079, 0, 0, 1082, 1086, 0, 0, 1090, 563, 563, 563, 3589, 3590, 3591, 3592, 587, 587, 587, 3595, 587, 3597, 587, 587, 587, 587, 587, 1464, 587, 587, 587, 1473, 587, 587, 587, 587, 587, 587, 1949, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2949, 587, 587, 587, 541, 587, 563, 587, 3602, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 1738, 541, 541, 541, 563, 3644, 563, 563, 563, 3648, 563, 587, 587, 3650, 587, 587, 587, 3654, 587, 0, 0, 0, 0, 0, 0, 0, 0, 3180, 0, 3449, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 266240, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 329, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 349, 0, 0, 0, 0, 0, 369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 686, 0, 0, 0, 0, 369, 0, 0, 0, 377, 379, 0, 0, 0, 0, 0, 0, 0, 0, 1099, 0, 0, 0, 0, 0, 0, 0, 0, 1115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3185, 0, 0, 0, 0, 0, 0, 0, 0, 412, 0, 0, 0, 412, 69632, 73728, 0, 369, 369, 0, 424, 65536, 369, 0, 0, 0, 369, 424, 499, 503, 499, 499, 508, 499, 499, 499, 508, 499, 424, 424, 0, 330, 424, 0, 0, 424, 424, 0, 0, 0, 0, 0, 0, 0, 0, 1156, 0, 0, 0, 0, 0, 0, 0, 0, 664, 0, 0, 0, 0, 0, 0, 0, 0, 680, 681, 0, 0, 0, 0, 0, 0, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 547, 570, 547, 570, 547, 547, 570, 547, 594, 570, 570, 570, 570, 570, 570, 570, 594, 594, 594, 547, 594, 594, 594, 594, 594, 594, 594, 594, 570, 570, 547, 570, 594, 570, 594, 1, 587, 587, 587, 1020, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1954, 587, 587, 587, 0, 0, 1109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1226, 541, 1279, 541, 541, 541, 541, 541, 1291, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1351, 541, 541, 541, 541, 541, 541, 1360, 914, 563, 563, 563, 563, 563, 563, 563, 563, 1371, 563, 563, 563, 563, 563, 563, 2643, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1866, 563, 563, 563, 563, 563, 563, 1383, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2286, 587, 587, 1992, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2411, 541, 587, 563, 563, 3677, 587, 587, 587, 0, 0, 541, 541, 563, 563, 587, 587, 0, 541, 3203, 541, 541, 541, 3206, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1313, 541, 541, 541, 541, 541, 425, 425, 0, 0, 425, 440, 0, 425, 425, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 493, 493, 467, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 548, 571, 548, 571, 548, 548, 571, 548, 595, 571, 571, 571, 571, 571, 571, 571, 595, 595, 595, 548, 595, 595, 595, 595, 595, 595, 595, 595, 571, 571, 548, 571, 595, 571, 595, 1, 0, 1213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 732, 0, 0, 0, 0, 0, 1695, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 0, 0, 0, 0, 0, 0, 0, 0, 2093, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 365, 0, 0, 0, 2157, 0, 0, 0, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3328, 541, 2201, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2200, 563, 2415, 541, 541, 541, 2419, 563, 563, 563, 2423, 587, 587, 587, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 541, 563, 3067, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3253, 563, 563, 563, 563, 563, 563, 0, 2460, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 748, 0, 0, 0, 0, 0, 2791, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 365, 1146, 0, 0, 2943, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 541, 587, 563, 541, 541, 0, 0, 0, 0, 2971, 0, 0, 0, 2975, 0, 0, 0, 0, 0, 2981, 0, 0, 0, 0, 0, 1128, 0, 0, 0, 0, 0, 1233, 0, 0, 0, 1265, 0, 0, 0, 2994, 0, 2996, 0, 0, 0, 0, 0, 0, 0, 0, 3004, 0, 0, 0, 0, 0, 1169, 0, 1171, 0, 0, 0, 0, 1176, 0, 0, 0, 0, 0, 0, 1643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2520, 0, 0, 0, 0, 541, 0, 0, 0, 0, 3009, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 383, 0, 0, 0, 387, 541, 3063, 541, 541, 541, 3066, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3083, 563, 563, 563, 563, 563, 563, 563, 3105, 563, 563, 563, 3108, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1509, 587, 587, 587, 587, 587, 587, 3144, 587, 587, 3147, 587, 587, 587, 541, 587, 563, 541, 541, 563, 563, 587, 587, 0, 0, 3295, 0, 0, 0, 0, 0, 0, 0, 0, 2766, 0, 0, 0, 0, 0, 0, 0, 0, 2151, 0, 0, 0, 0, 0, 0, 0, 0, 2506, 0, 0, 0, 0, 0, 2512, 0, 0, 0, 0, 0, 0, 3195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2782, 0, 0, 0, 0, 541, 541, 541, 541, 3216, 541, 541, 541, 541, 541, 541, 541, 3221, 541, 3223, 541, 541, 541, 541, 541, 3408, 541, 541, 3410, 563, 563, 563, 563, 3414, 563, 563, 563, 563, 1446, 1447, 563, 563, 563, 26028, 1360, 988, 587, 587, 587, 587, 587, 587, 3671, 0, 0, 0, 541, 541, 541, 3674, 563, 563, 563, 563, 563, 587, 587, 3260, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3274, 587, 587, 587, 587, 587, 587, 3280, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 541, 587, 563, 541, 2722, 563, 3350, 563, 563, 563, 563, 563, 563, 563, 563, 587, 587, 587, 587, 587, 587, 587, 587, 3655, 587, 587, 587, 587, 3363, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3369, 587, 0, 0, 0, 541, 587, 563, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 3071, 563, 563, 563, 563, 563, 0, 0, 0, 0, 541, 541, 3660, 3661, 541, 541, 563, 563, 3664, 3665, 563, 563, 563, 563, 1423, 563, 563, 1430, 563, 563, 563, 563, 563, 563, 563, 563, 2631, 563, 563, 563, 563, 563, 563, 563, 587, 587, 3668, 3669, 587, 587, 0, 0, 0, 0, 541, 541, 541, 541, 563, 563, 563, 924, 928, 931, 563, 939, 563, 563, 563, 954, 956, 959, 0, 0, 690, 691, 0, 0, 0, 0, 696, 0, 0, 0, 365, 365, 365, 0, 0, 0, 0, 0, 1185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3180, 0, 0, 0, 0, 0, 0, 829, 0, 0, 0, 0, 0, 0, 0, 0, 0, 758, 0, 0, 0, 0, 0, 0, 758, 0, 0, 0, 0, 0, 758, 758, 910, 541, 563, 563, 563, 563, 927, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1432, 563, 563, 1436, 563, 563, 563, 983, 0, 587, 587, 587, 587, 1057, 78115, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 1220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 587, 1521, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1514, 587, 0, 0, 0, 1721, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1193, 0, 0, 0, 0, 2040, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 749, 0, 2171, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2211, 3288, 541, 3290, 563, 3292, 587, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3514, 468, 468, 468, 486, 494, 494, 486, 494, 494, 494, 494, 494, 494, 494, 494, 519, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 536, 527, 527, 527, 527, 527, 549, 572, 549, 572, 549, 549, 572, 549, 596, 572, 572, 572, 572, 572, 572, 572, 596, 596, 596, 549, 596, 596, 596, 596, 596, 596, 596, 596, 572, 572, 549, 572, 596, 572, 596, 1, 795, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1652, 0, 818, 0, 0, 0, 795, 0, 0, 818, 0, 0, 0, 0, 0, 818, 818, 0, 0, 0, 0, 795, 0, 0, 0, 0, 0, 0, 836, 791, 0, 0, 836, 857, 541, 865, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3527, 563, 911, 541, 563, 563, 563, 563, 563, 930, 563, 938, 563, 563, 563, 563, 563, 563, 1850, 563, 563, 563, 563, 563, 563, 563, 563, 563, 0, 587, 587, 587, 587, 587, 587, 587, 1012, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1058, 984, 0, 587, 587, 587, 1077, 1058, 78115, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 1243, 0, 0, 0, 0, 0, 0, 0, 0, 1259, 0, 0, 0, 1263, 0, 0, 0, 0, 0, 0, 0, 1139, 1140, 0, 0, 0, 0, 0, 365, 365, 0, 0, 0, 0, 0, 0, 1113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2071, 0, 0, 0, 0, 0, 1180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1705, 1340, 541, 541, 1344, 541, 541, 541, 541, 541, 1350, 541, 541, 541, 1357, 541, 541, 541, 541, 541, 1812, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1360, 1403, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2638, 563, 563, 1442, 563, 563, 563, 1449, 563, 563, 26028, 1360, 988, 587, 587, 587, 587, 587, 587, 3272, 587, 587, 587, 587, 587, 587, 587, 587, 3278, 587, 587, 1487, 587, 587, 587, 587, 587, 587, 587, 1495, 587, 587, 587, 587, 587, 587, 2365, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2691, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1524, 587, 587, 1528, 587, 587, 587, 587, 587, 1534, 587, 587, 587, 587, 587, 1492, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1510, 587, 587, 587, 587, 587, 1541, 587, 587, 0, 541, 587, 563, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 3476, 563, 563, 563, 3480, 563, 563, 563, 563, 563, 563, 2863, 563, 563, 2867, 563, 563, 563, 563, 563, 563, 1409, 563, 563, 1413, 563, 563, 563, 563, 563, 563, 1448, 563, 563, 26028, 1360, 988, 587, 587, 587, 587, 0, 0, 0, 1595, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1223, 0, 0, 0, 0, 0, 1655, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1664, 0, 0, 0, 0, 0, 0, 1126, 0, 0, 0, 1130, 1131, 0, 0, 0, 0, 0, 0, 0, 2818048, 2846720, 0, 2916352, 0, 0, 3002368, 0, 0, 1718, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2053, 1702, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3326, 541, 541, 541, 563, 563, 563, 1893, 563, 563, 563, 563, 563, 563, 1901, 563, 563, 563, 563, 563, 563, 2887, 563, 563, 563, 2890, 563, 2892, 563, 563, 563, 587, 1944, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1940, 587, 587, 1974, 587, 587, 587, 587, 1980, 587, 587, 587, 587, 587, 587, 587, 587, 1989, 2007, 2009, 587, 587, 587, 587, 587, 541, 587, 563, 541, 541, 541, 541, 563, 563, 563, 563, 587, 587, 587, 587, 2030, 0, 2032, 0, 0, 2079, 0, 0, 0, 2082, 0, 0, 0, 0, 0, 2088, 0, 0, 0, 0, 0, 0, 1141, 0, 1143, 0, 0, 365, 365, 0, 0, 0, 0, 0, 0, 1154, 0, 0, 0, 0, 0, 1160, 0, 1162, 0, 2104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2115, 0, 0, 0, 0, 0, 1192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 0, 0, 563, 563, 563, 563, 563, 563, 2250, 563, 563, 563, 563, 563, 563, 563, 1851, 563, 563, 563, 563, 1855, 563, 563, 563, 587, 587, 587, 587, 2349, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1985, 587, 587, 1988, 587, 2262, 541, 541, 541, 541, 563, 563, 563, 563, 587, 587, 587, 587, 0, 0, 0, 0, 0, 2732, 0, 2450, 0, 0, 0, 0, 0, 0, 0, 0, 2455, 0, 0, 2458, 0, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 57344, 0, 0, 0, 0, 0, 0, 2748, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192972, 192972, 192972, 192972, 192972, 192972, 192972, 0, 0, 0, 0, 2462, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 2809, 541, 2473, 0, 0, 0, 0, 0, 0, 0, 2481, 0, 0, 0, 2483, 0, 0, 0, 0, 0, 0, 1170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2989, 0, 0, 0, 0, 0, 0, 2500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2510, 0, 0, 0, 0, 0, 0, 1186, 0, 0, 0, 1191, 0, 0, 0, 0, 1107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 758, 0, 0, 0, 0, 0, 0, 0, 2524, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2536, 541, 541, 2552, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 905, 541, 541, 2564, 541, 541, 541, 541, 541, 541, 2571, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1768, 541, 541, 541, 541, 541, 541, 541, 2578, 541, 541, 541, 2581, 541, 541, 541, 541, 541, 541, 541, 0, 0, 0, 0, 0, 0, 1203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 813, 0, 0, 0, 0, 0, 0, 0, 0, 563, 2588, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1903, 1904, 563, 563, 563, 2611, 563, 563, 563, 563, 563, 563, 2616, 563, 563, 563, 563, 563, 563, 563, 2622, 587, 587, 587, 587, 2702, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2710, 587, 587, 587, 2713, 587, 587, 587, 587, 587, 587, 587, 2718, 2719, 2720, 541, 541, 541, 541, 541, 2177, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2845, 541, 541, 541, 2758, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2103, 0, 2773, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1120, 0, 0, 0, 2789, 0, 0, 0, 0, 2794, 0, 0, 0, 2796, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 316, 317, 317, 422, 423, 65536, 430, 541, 541, 541, 541, 2814, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1333, 541, 541, 541, 541, 541, 2848, 541, 541, 541, 541, 541, 541, 0, 0, 563, 563, 563, 2856, 563, 0, 587, 587, 1047, 587, 587, 78115, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 1159168, 365, 0, 0, 0, 0, 0, 0, 563, 563, 563, 563, 2861, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2294, 563, 563, 563, 563, 563, 563, 563, 563, 2897, 563, 563, 563, 563, 563, 563, 0, 0, 587, 587, 587, 587, 587, 587, 587, 2338, 587, 587, 587, 587, 587, 587, 587, 3122, 587, 587, 587, 587, 587, 587, 587, 587, 1036, 587, 587, 587, 587, 1054, 587, 587, 2905, 587, 587, 587, 587, 587, 2910, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1935, 587, 587, 587, 587, 1941, 587, 3006, 0, 0, 0, 0, 3010, 0, 0, 0, 0, 3015, 0, 0, 0, 0, 0, 0, 0, 2749, 0, 0, 0, 0, 0, 0, 0, 0, 0, 697, 698, 0, 365, 365, 365, 0, 3191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2145, 3300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3180, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 163840, 0, 0, 0, 0, 65536, 0, 563, 563, 563, 3340, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2283, 563, 563, 563, 563, 563, 563, 3351, 563, 563, 563, 563, 563, 563, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3359, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1942, 3370, 587, 587, 587, 587, 587, 587, 541, 541, 563, 563, 587, 587, 0, 0, 0, 0, 3297, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3394, 0, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3211, 541, 541, 3486, 587, 587, 587, 587, 587, 587, 587, 587, 3495, 587, 3497, 3498, 587, 3500, 587, 0, 0, 0, 541, 587, 563, 541, 541, 541, 904, 541, 563, 563, 563, 977, 3502, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 854, 541, 541, 3612, 541, 3613, 541, 541, 541, 563, 563, 563, 563, 563, 563, 3619, 563, 0, 996, 1075, 1041, 587, 587, 78115, 1079, 0, 0, 1081, 1085, 0, 0, 1089, 3620, 563, 563, 563, 563, 587, 587, 587, 587, 587, 587, 3627, 587, 3628, 587, 587, 0, 3603, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 3610, 541, 563, 563, 587, 587, 587, 587, 0, 0, 541, 541, 563, 563, 587, 587, 3683, 3684, 3685, 3686, 0, 541, 563, 587, 0, 541, 563, 587, 0, 541, 563, 587, 0, 0, 0, 0, 0, 0, 0, 0, 3180, 0, 0, 0, 0, 0, 0, 0, 550, 597, 573, 573, 573, 573, 573, 573, 573, 597, 597, 597, 550, 597, 597, 597, 597, 597, 597, 597, 597, 573, 573, 550, 573, 597, 573, 597, 1, 0, 0, 0, 737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1237, 0, 0, 0, 0, 0, 2041, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1194, 1196, 0, 403, 0, 0, 0, 0, 381, 0, 69632, 73728, 0, 0, 0, 0, 426, 65536, 0, 0, 0, 0, 0, 1202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2444, 2445, 0, 0, 2448, 426, 426, 0, 0, 426, 0, 446, 426, 426, 469, 469, 469, 476, 469, 469, 469, 469, 469, 469, 469, 469, 469, 476, 469, 469, 469, 469, 469, 469, 469, 469, 483, 469, 495, 495, 469, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 538, 551, 574, 551, 574, 551, 551, 574, 551, 598, 574, 574, 574, 574, 574, 574, 574, 598, 598, 598, 551, 598, 598, 598, 598, 598, 598, 598, 598, 574, 574, 551, 574, 598, 574, 598, 1, 0, 0, 0, 0, 660, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3001, 0, 0, 0, 0, 0, 0, 0, 0, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 661, 0, 0, 0, 0, 0, 827, 0, 0, 0, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 729, 0, 742, 661, 0, 0, 0, 0, 0, 541, 844, 541, 541, 541, 541, 541, 2191, 541, 541, 541, 541, 541, 541, 2197, 541, 2199, 541, 541, 859, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 897, 541, 541, 541, 541, 541, 541, 2817, 541, 2819, 541, 541, 541, 541, 541, 541, 541, 541, 2572, 541, 541, 541, 541, 541, 541, 541, 541, 1349, 541, 541, 541, 541, 541, 541, 541, 541, 1752, 541, 541, 541, 541, 541, 541, 541, 541, 1767, 541, 541, 541, 541, 541, 541, 541, 541, 1782, 541, 541, 541, 541, 541, 541, 541, 541, 1815, 1817, 541, 541, 541, 541, 541, 1360, 563, 563, 563, 970, 563, 563, 563, 563, 563, 0, 587, 587, 990, 587, 587, 587, 587, 587, 1526, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1953, 587, 587, 587, 587, 587, 1006, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1044, 587, 587, 587, 587, 587, 587, 3285, 587, 587, 587, 587, 587, 587, 541, 587, 563, 1094, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1101, 1102, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 167936, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 1229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1247, 0, 0, 0, 0, 0, 0, 0, 1102, 0, 0, 0, 0, 1260, 1261, 0, 0, 1101, 0, 0, 0, 0, 0, 0, 2134756, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1116, 0, 0, 0, 0, 0, 541, 1306, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 0, 2241, 1360, 914, 563, 1363, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1377, 1384, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1398, 563, 563, 563, 563, 563, 563, 3079, 563, 563, 563, 563, 563, 563, 563, 563, 563, 0, 587, 587, 989, 587, 587, 587, 1418, 563, 563, 563, 563, 563, 563, 563, 1431, 563, 563, 563, 563, 563, 563, 563, 1897, 563, 563, 563, 563, 563, 563, 563, 563, 1395, 563, 563, 563, 563, 563, 563, 563, 587, 587, 1523, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1537, 587, 0, 0, 0, 541, 587, 563, 541, 541, 541, 1067, 911, 563, 563, 563, 1072, 563, 587, 587, 1523, 587, 587, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2781, 0, 0, 0, 0, 0, 541, 541, 541, 1746, 1747, 541, 541, 541, 541, 1754, 541, 541, 541, 541, 541, 541, 541, 1290, 541, 1295, 541, 541, 1299, 541, 541, 1302, 541, 541, 541, 541, 1795, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1335, 541, 541, 541, 1825, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1841, 1842, 563, 563, 563, 563, 1849, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3347, 563, 563, 563, 563, 3348, 1890, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2649, 587, 1945, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2372, 587, 587, 1959, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2384, 2385, 587, 587, 587, 587, 2012, 587, 587, 541, 587, 563, 541, 541, 541, 541, 563, 563, 587, 587, 2961, 0, 0, 2964, 2965, 0, 0, 0, 0, 0, 0, 0, 2505, 0, 0, 0, 0, 0, 0, 0, 0, 0, 387, 0, 0, 0, 0, 0, 387, 0, 0, 0, 2054, 0, 2055, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2064, 541, 541, 541, 541, 2216, 541, 541, 541, 541, 541, 541, 2221, 541, 541, 541, 541, 541, 541, 1285, 1292, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1800, 541, 541, 541, 1805, 541, 541, 541, 2226, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 0, 0, 563, 563, 563, 563, 563, 563, 563, 563, 2302, 563, 563, 563, 563, 563, 563, 2307, 563, 563, 563, 563, 563, 563, 3080, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1883, 563, 563, 563, 563, 563, 563, 563, 2313, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 0, 0, 587, 587, 587, 587, 587, 587, 2389, 587, 587, 587, 587, 587, 587, 2394, 587, 587, 587, 587, 587, 587, 2377, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1952, 587, 587, 587, 587, 1956, 587, 587, 2400, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 541, 587, 0, 0, 0, 541, 587, 563, 541, 541, 895, 541, 541, 563, 563, 968, 563, 0, 587, 587, 587, 587, 587, 78115, 1079, 0, 0, 1082, 1086, 0, 0, 1090, 0, 2437, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1178, 0, 587, 2671, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2931, 587, 0, 0, 0, 2736, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1588, 1589, 0, 0, 2787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2797, 0, 0, 0, 0, 0, 0, 1204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1631, 0, 0, 0, 0, 0, 541, 541, 541, 2813, 541, 541, 541, 541, 541, 541, 2821, 541, 541, 541, 541, 541, 541, 541, 2555, 541, 541, 541, 541, 541, 541, 541, 2562, 563, 563, 563, 2860, 563, 563, 563, 563, 563, 563, 2868, 563, 563, 563, 563, 563, 563, 3094, 563, 563, 3096, 563, 563, 563, 563, 563, 563, 1880, 1881, 1882, 563, 563, 1885, 1886, 563, 563, 563, 0, 0, 3008, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1197, 0, 0, 541, 541, 3227, 541, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 563, 563, 3073, 563, 563, 563, 3571, 541, 3573, 541, 541, 541, 563, 563, 563, 563, 563, 563, 563, 3583, 563, 3585, 0, 0, 0, 0, 541, 3659, 541, 541, 541, 541, 563, 3663, 563, 563, 563, 563, 563, 1878, 563, 563, 563, 563, 1884, 563, 563, 563, 563, 563, 563, 2864, 563, 2866, 563, 563, 563, 563, 563, 563, 563, 3354, 563, 563, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1057, 587, 3667, 587, 587, 587, 587, 0, 0, 0, 0, 541, 541, 541, 541, 563, 563, 915, 563, 563, 563, 563, 563, 563, 946, 563, 563, 563, 563, 563, 1427, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3535, 563, 563, 563, 563, 563, 563, 587, 587, 587, 587, 3112, 587, 587, 587, 587, 3116, 470, 470, 470, 470, 454, 454, 470, 454, 454, 454, 454, 454, 454, 454, 454, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 552, 575, 552, 575, 552, 552, 575, 552, 599, 575, 575, 575, 575, 575, 575, 575, 599, 599, 599, 552, 599, 599, 599, 599, 599, 599, 599, 599, 575, 575, 552, 575, 599, 575, 599, 1, 541, 860, 541, 541, 874, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1770, 541, 541, 541, 1007, 587, 587, 1021, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1971, 587, 587, 587, 0, 1123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1184, 1184, 1251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2156, 0, 0, 0, 1268, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1360, 541, 541, 541, 1323, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2534, 541, 541, 541, 1341, 541, 541, 541, 541, 541, 1348, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2234, 541, 541, 541, 541, 0, 0, 1440, 563, 563, 563, 563, 563, 563, 563, 563, 26028, 1360, 988, 587, 587, 587, 587, 587, 587, 3365, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2936, 587, 587, 587, 2939, 587, 2941, 587, 587, 587, 587, 587, 1525, 587, 587, 587, 587, 587, 1532, 587, 587, 587, 587, 587, 587, 2392, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1472, 587, 587, 587, 587, 1482, 587, 563, 587, 587, 587, 1557, 587, 1079, 0, 1561, 0, 0, 0, 1567, 0, 0, 0, 0, 0, 0, 1218, 1219, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1235, 0, 0, 0, 0, 0, 0, 1573, 0, 0, 0, 1579, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 1779, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2548, 541, 541, 563, 1843, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1854, 563, 563, 563, 563, 563, 1879, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3344, 563, 563, 563, 563, 563, 563, 563, 563, 1865, 563, 563, 563, 563, 563, 563, 563, 2065, 2066, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1210, 0, 2117, 0, 0, 2120, 2121, 0, 0, 0, 0, 0, 2127, 0, 0, 0, 0, 0, 0, 0, 2765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 550, 573, 550, 573, 550, 550, 573, 541, 2213, 541, 541, 541, 541, 2218, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2182, 541, 541, 541, 541, 541, 2299, 563, 563, 563, 563, 2304, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1917, 563, 26028, 0, 587, 587, 587, 2386, 587, 587, 587, 587, 2391, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2001, 587, 587, 587, 587, 587, 2006, 541, 541, 541, 3037, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2846, 541, 541, 563, 563, 3077, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1887, 1888, 563, 587, 587, 587, 3119, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1986, 587, 587, 587, 563, 563, 3247, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2296, 563, 563, 587, 0, 0, 0, 3445, 0, 0, 0, 0, 3180, 0, 0, 0, 0, 0, 0, 0, 1242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 380, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 3460, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2207, 541, 541, 541, 541, 541, 563, 587, 587, 587, 587, 3491, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2354, 587, 587, 587, 587, 587, 587, 563, 563, 563, 563, 3623, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2395, 587, 587, 587, 587, 587, 3631, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 541, 563, 563, 920, 563, 563, 563, 563, 563, 563, 949, 951, 563, 563, 563, 563, 563, 3421, 563, 563, 563, 3425, 563, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3501, 388, 390, 340, 0, 0, 0, 0, 0, 0, 339, 0, 0, 340, 0, 0, 0, 0, 0, 0, 1598, 0, 0, 0, 0, 0, 0, 0, 0, 1604, 0, 0, 0, 387, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 1217, 0, 0, 0, 0, 0, 0, 0, 1224, 0, 0, 0, 0, 0, 347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3316, 0, 0, 0, 0, 0, 0, 435, 339, 0, 0, 447, 0, 0, 471, 471, 471, 471, 471, 471, 471, 471, 471, 553, 576, 553, 576, 553, 553, 576, 471, 482, 471, 471, 471, 500, 477, 500, 500, 500, 500, 500, 500, 500, 500, 471, 471, 477, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 481, 481, 471, 482, 471, 471, 553, 600, 576, 576, 576, 576, 576, 576, 576, 600, 600, 600, 553, 600, 600, 600, 600, 600, 600, 600, 600, 576, 576, 553, 576, 600, 576, 600, 1, 0, 0, 750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1603, 0, 0, 0, 0, 0, 0, 663, 0, 788, 0, 0, 0, 0, 0, 0, 0, 792, 0, 0, 0, 0, 0, 1231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2153, 0, 0, 0, 0, 0, 0, 0, 801, 0, 0, 0, 0, 0, 809, 0, 0, 0, 0, 706, 0, 0, 0, 0, 0, 0, 0, 0, 715, 0, 717, 0, 828, 0, 0, 0, 663, 831, 0, 788, 0, 0, 0, 0, 0, 837, 0, 0, 0, 0, 0, 1597, 0, 0, 0, 577536, 0, 0, 1602, 0, 0, 0, 0, 0, 0, 1257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2508, 0, 0, 0, 0, 0, 541, 861, 541, 541, 875, 541, 541, 541, 541, 888, 541, 541, 541, 541, 906, 541, 541, 541, 541, 541, 3519, 541, 541, 541, 541, 541, 541, 541, 541, 563, 563, 563, 923, 563, 929, 563, 563, 942, 563, 563, 953, 563, 958, 961, 563, 563, 563, 563, 979, 563, 563, 563, 0, 587, 587, 991, 587, 587, 587, 587, 587, 1962, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3287, 587, 587, 587, 541, 587, 563, 1008, 587, 587, 1022, 587, 587, 587, 587, 1035, 587, 587, 587, 587, 1053, 587, 587, 587, 587, 587, 2945, 587, 587, 2948, 587, 587, 2951, 587, 2952, 2953, 2954, 0, 0, 0, 0, 1216, 0, 0, 0, 0, 1221, 0, 0, 0, 0, 0, 0, 0, 1258, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 299, 0, 0, 0, 0, 0, 0, 1144, 0, 0, 1256, 0, 0, 0, 0, 0, 0, 0, 0, 1235, 0, 0, 0, 0, 0, 0, 2891776, 0, 0, 0, 0, 0, 2392064, 2412544, 0, 0, 0, 0, 0, 0, 2123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2727936, 0, 0, 0, 3084288, 0, 0, 0, 1267, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1741, 541, 541, 541, 1309, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3045, 541, 3047, 563, 587, 587, 1556, 587, 587, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 1621, 0, 0, 1624, 0, 1626, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3198, 3199, 0, 0, 0, 0, 0, 0, 0, 1722, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 683, 684, 685, 0, 0, 541, 541, 541, 541, 1780, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1820, 541, 541, 1360, 0, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1836, 563, 563, 563, 563, 563, 2263, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1433, 563, 563, 563, 563, 563, 1875, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2872, 1943, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2359, 0, 0, 2135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1618, 0, 0, 2146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2484, 0, 0, 0, 0, 541, 541, 541, 2163, 2164, 541, 541, 541, 541, 541, 541, 541, 541, 2180, 541, 541, 541, 541, 2185, 541, 541, 541, 541, 541, 2228, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 0, 0, 563, 563, 563, 563, 2857, 0, 0, 563, 563, 563, 2247, 563, 2249, 563, 563, 563, 563, 563, 563, 563, 563, 2320, 563, 563, 563, 563, 563, 0, 0, 563, 563, 563, 2315, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 0, 0, 988, 587, 587, 587, 587, 0, 0, 587, 587, 587, 2334, 587, 2336, 587, 587, 587, 587, 587, 587, 587, 587, 1965, 1966, 1968, 587, 587, 587, 587, 587, 587, 587, 587, 2402, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 541, 587, 0, 0, 0, 541, 587, 563, 541, 541, 897, 541, 541, 563, 563, 970, 563, 0, 997, 587, 1076, 1048, 587, 78115, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 458, 1147355, 1147355, 1147355, 1147355, 1147355, 1147355, 1147355, 1147355, 1147355, 1147355, 1147355, 1147355, 1147355, 1147355, 1147355, 1147355, 0, 0, 2438, 0, 0, 0, 0, 0, 0, 2443, 0, 0, 0, 2446, 2447, 0, 0, 0, 0, 0, 1610, 0, 0, 1613, 0, 0, 0, 0, 0, 0, 0, 0, 1584, 0, 0, 0, 0, 0, 0, 0, 0, 1683, 0, 0, 0, 0, 0, 0, 0, 0, 334, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134, 0, 0, 0, 0, 2487, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2498, 0, 0, 0, 2515, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2523, 0, 541, 541, 541, 541, 541, 3576, 563, 563, 563, 3580, 563, 563, 563, 563, 563, 563, 2290, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1899, 563, 563, 563, 563, 563, 1906, 2537, 2538, 541, 541, 541, 541, 541, 2543, 541, 2545, 541, 541, 541, 541, 2549, 541, 541, 541, 541, 541, 3614, 3615, 541, 563, 563, 563, 563, 563, 563, 563, 563, 3424, 563, 563, 587, 587, 587, 587, 587, 563, 563, 2598, 563, 563, 2601, 2602, 563, 563, 563, 563, 563, 2607, 563, 2609, 563, 0, 999, 1039, 587, 1050, 587, 78115, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 3184, 0, 0, 0, 0, 0, 0, 0, 0, 2750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2732032, 0, 0, 0, 0, 0, 0, 563, 563, 563, 2613, 563, 563, 563, 563, 563, 563, 563, 563, 2619, 563, 563, 563, 563, 563, 3624, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1967, 587, 587, 587, 1972, 587, 587, 563, 2639, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1402, 563, 587, 587, 587, 2673, 587, 2675, 587, 587, 587, 587, 2679, 587, 587, 587, 587, 587, 587, 2676, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1469, 1476, 587, 587, 587, 587, 587, 587, 587, 587, 2685, 587, 587, 587, 587, 587, 587, 587, 587, 2693, 587, 587, 587, 587, 587, 1979, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2926, 2927, 587, 587, 587, 587, 2930, 587, 587, 587, 587, 587, 2701, 587, 587, 587, 587, 2705, 587, 587, 587, 587, 587, 587, 587, 2378, 2379, 587, 587, 587, 587, 587, 587, 587, 2406, 587, 587, 2409, 2410, 587, 587, 2176, 2348, 0, 2745, 0, 0, 0, 0, 0, 0, 0, 2751, 2752, 2753, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 172032, 0, 0, 0, 0, 65536, 0, 2772, 0, 2774, 0, 0, 0, 0, 2778, 0, 0, 0, 0, 2783, 0, 0, 2786, 541, 541, 2828, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1771, 541, 541, 541, 541, 541, 2838, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3337, 563, 563, 541, 2847, 541, 541, 2850, 541, 541, 2853, 541, 0, 0, 2854, 563, 563, 563, 563, 563, 2277, 563, 563, 2280, 563, 563, 563, 563, 563, 563, 563, 3081, 563, 563, 563, 563, 563, 563, 563, 563, 3355, 563, 587, 587, 587, 587, 587, 587, 563, 563, 2875, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2324, 0, 0, 563, 563, 563, 563, 2886, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2606, 563, 2608, 563, 563, 563, 563, 563, 2896, 563, 563, 2899, 563, 563, 2902, 563, 0, 0, 2903, 587, 587, 587, 587, 587, 3284, 587, 587, 587, 587, 587, 587, 587, 541, 587, 563, 541, 541, 563, 563, 587, 587, 587, 2921, 587, 587, 2924, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2666, 587, 587, 587, 587, 0, 0, 0, 0, 0, 2972, 2973, 0, 0, 0, 0, 2978, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 221184, 0, 0, 0, 0, 65536, 0, 3021, 0, 0, 3023, 0, 0, 541, 541, 3028, 541, 541, 541, 541, 541, 541, 541, 541, 2205, 2206, 541, 541, 541, 541, 541, 541, 0, 0, 3160, 0, 3162, 0, 0, 0, 3166, 0, 0, 0, 0, 0, 0, 0, 0, 2518, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 3030, 541, 541, 541, 541, 3034, 3234, 3235, 563, 563, 563, 563, 3239, 3240, 563, 563, 563, 563, 563, 3244, 563, 563, 563, 563, 1445, 563, 563, 563, 563, 26028, 1360, 988, 587, 1455, 587, 587, 0, 3632, 0, 0, 0, 0, 541, 541, 541, 541, 541, 3641, 541, 563, 563, 563, 563, 587, 587, 587, 587, 587, 587, 587, 3263, 3264, 587, 587, 587, 587, 587, 587, 3435, 587, 587, 587, 587, 587, 587, 587, 541, 563, 3268, 3269, 587, 587, 587, 587, 587, 3273, 587, 587, 587, 587, 587, 587, 587, 587, 2393, 587, 587, 587, 587, 587, 587, 587, 3279, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 541, 587, 563, 2721, 541, 0, 0, 0, 3312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1633, 0, 0, 0, 541, 3404, 541, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3419, 563, 563, 563, 563, 563, 563, 563, 587, 587, 587, 587, 587, 3113, 587, 587, 587, 587, 587, 0, 3443, 0, 0, 3446, 0, 0, 0, 3180, 0, 0, 0, 0, 0, 0, 0, 1583, 0, 1585, 0, 0, 0, 0, 0, 0, 0, 1106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 756, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 3458, 541, 541, 541, 541, 3463, 541, 541, 541, 541, 3468, 541, 541, 541, 541, 872, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1316, 541, 541, 541, 563, 587, 587, 3489, 587, 587, 587, 587, 3494, 587, 587, 587, 587, 3499, 587, 587, 587, 587, 587, 3364, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2664, 587, 587, 2667, 2668, 587, 587, 563, 563, 3645, 3646, 563, 563, 563, 587, 587, 587, 3651, 3652, 587, 587, 587, 0, 541, 587, 563, 541, 541, 541, 541, 541, 563, 563, 563, 563, 587, 587, 587, 587, 0, 0, 0, 2730, 0, 0, 563, 587, 0, 541, 563, 587, 3691, 3692, 3693, 3694, 0, 541, 563, 587, 0, 0, 0, 0, 0, 0, 0, 0, 3180, 0, 0, 0, 0, 0, 3453, 342, 343, 344, 345, 346, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 713, 0, 0, 0, 0, 0, 0, 0, 391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1674, 0, 0, 0, 345, 345, 0, 346, 345, 0, 344, 345, 455, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 487, 496, 496, 504, 496, 506, 496, 496, 506, 506, 496, 506, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 554, 577, 554, 577, 554, 554, 577, 554, 601, 577, 577, 577, 577, 577, 577, 577, 601, 601, 601, 554, 601, 601, 601, 601, 601, 601, 601, 601, 577, 577, 554, 577, 601, 577, 601, 1, 656, 657, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1590, 1591, 672, 673, 0, 675, 676, 0, 0, 0, 0, 0, 682, 0, 0, 0, 0, 0, 0, 0, 2804, 0, 0, 0, 541, 2808, 541, 541, 541, 0, 0, 0, 0, 692, 0, 0, 0, 0, 0, 0, 699, 365, 365, 365, 0, 0, 0, 0, 0, 1658, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3180, 0, 0, 0, 3308, 0, 719, 0, 721, 0, 723, 0, 0, 0, 0, 0, 0, 0, 0, 0, 733, 0, 0, 0, 0, 646, 752, 753, 754, 0, 0, 0, 0, 0, 760, 761, 0, 0, 0, 0, 0, 1680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3180, 0, 3306, 0, 0, 763, 764, 675, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 779, 780, 0, 0, 0, 0, 0, 1696, 1697, 1698, 1699, 0, 0, 0, 0, 0, 0, 0, 0, 755, 0, 0, 0, 0, 0, 0, 0, 0, 772, 0, 0, 0, 0, 0, 0, 0, 0, 782, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1601, 0, 0, 761, 0, 0, 787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 794, 675, 723, 0, 692, 811, 0, 0, 0, 0, 761, 0, 0, 0, 0, 0, 0, 0, 1591, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1662, 0, 0, 0, 0, 0, 0, 0, 0, 754, 820, 821, 0, 0, 0, 0, 0, 0, 754, 0, 0, 825, 699, 0, 0, 0, 830, 0, 0, 0, 832, 0, 0, 0, 692, 699, 0, 0, 692, 830, 830, 0, 0, 0, 0, 0, 0, 0, 0, 0, 692, 541, 541, 851, 855, 858, 541, 866, 541, 541, 541, 881, 883, 886, 541, 541, 541, 898, 902, 541, 541, 541, 541, 541, 2541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3044, 541, 541, 541, 563, 563, 563, 971, 975, 563, 563, 563, 563, 0, 587, 587, 587, 998, 1002, 1005, 587, 1013, 587, 587, 587, 1028, 1030, 1033, 587, 587, 587, 1045, 1049, 587, 587, 587, 587, 587, 1995, 587, 587, 587, 587, 587, 2002, 587, 587, 587, 587, 587, 587, 2946, 587, 587, 587, 587, 587, 587, 541, 587, 563, 1073, 0, 998, 587, 1045, 1049, 1078, 78115, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 2779, 0, 0, 0, 0, 0, 0, 0, 0, 303, 303, 303, 303, 0, 303, 303, 303, 0, 0, 0, 0, 1168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 729, 0, 0, 0, 0, 0, 0, 1199, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1209, 0, 0, 0, 0, 0, 0, 2912256, 0, 3207168, 2465792, 0, 0, 2719744, 0, 0, 0, 0, 0, 0, 541, 541, 541, 3397, 541, 541, 541, 541, 3401, 541, 0, 0, 1214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1634, 0, 0, 0, 0, 1254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1665, 0, 0, 1321, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1331, 541, 541, 1338, 541, 541, 541, 541, 873, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1332, 541, 541, 541, 563, 563, 1443, 563, 563, 563, 563, 563, 563, 26028, 1360, 988, 587, 587, 587, 587, 587, 587, 3548, 587, 3550, 587, 587, 3552, 587, 587, 0, 0, 0, 0, 0, 0, 541, 541, 541, 3639, 3640, 541, 541, 563, 1501, 587, 587, 1505, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1515, 587, 0, 0, 0, 541, 587, 563, 541, 541, 899, 541, 541, 563, 563, 972, 563, 0, 1074, 587, 587, 1052, 587, 78115, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 2445312, 0, 2842624, 0, 0, 0, 2637824, 0, 587, 1522, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1535, 587, 587, 587, 587, 587, 2013, 587, 541, 587, 563, 541, 541, 541, 541, 563, 563, 563, 563, 587, 587, 587, 587, 0, 0, 0, 0, 0, 0, 1666, 0, 1668, 0, 0, 0, 1670, 0, 748, 0, 0, 0, 0, 0, 0, 0, 0, 3174, 0, 0, 0, 0, 0, 0, 0, 0, 791, 0, 0, 0, 0, 0, 0, 0, 0, 833, 0, 0, 0, 0, 0, 0, 808, 0, 0, 1693, 0, 0, 0, 0, 0, 0, 1700, 0, 0, 0, 0, 0, 0, 0, 1660, 1661, 0, 0, 0, 0, 0, 0, 0, 0, 710, 0, 0, 0, 0, 0, 0, 0, 0, 726, 0, 0, 0, 0, 0, 0, 0, 0, 0, 274432, 274432, 274432, 0, 274432, 274432, 274432, 541, 541, 1762, 541, 541, 541, 541, 541, 541, 541, 541, 1769, 541, 541, 541, 1773, 541, 541, 1778, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1788, 541, 541, 0, 563, 1828, 563, 563, 563, 563, 563, 563, 563, 1835, 563, 563, 563, 563, 563, 563, 3250, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2321, 563, 563, 563, 563, 0, 0, 563, 1908, 563, 563, 563, 563, 563, 563, 563, 563, 563, 26028, 0, 587, 1924, 587, 0, 0, 0, 541, 587, 563, 541, 541, 900, 541, 541, 563, 563, 973, 563, 563, 563, 563, 2262, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1434, 563, 563, 563, 563, 587, 587, 587, 1960, 587, 587, 587, 1964, 587, 587, 1969, 587, 587, 587, 587, 587, 587, 2688, 587, 587, 587, 587, 587, 587, 2695, 587, 587, 563, 563, 587, 587, 587, 587, 0, 0, 0, 2031, 0, 1082, 0, 0, 0, 2033, 0, 1086, 0, 0, 0, 2035, 0, 1090, 0, 0, 0, 2037, 0, 1094, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1620, 2587, 0, 1825, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2610, 2650, 563, 563, 563, 0, 0, 0, 2653, 0, 1921, 587, 587, 587, 587, 587, 587, 587, 3549, 587, 587, 587, 587, 587, 587, 0, 0, 3672, 0, 541, 541, 541, 541, 563, 563, 0, 0, 2969, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2102, 0, 0, 0, 0, 0, 3161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1703, 0, 0, 0, 0, 0, 3319, 541, 541, 541, 541, 541, 541, 541, 3324, 541, 541, 541, 541, 541, 541, 541, 2832, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2573, 541, 541, 541, 541, 541, 541, 587, 587, 3361, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2709, 587, 587, 3379, 0, 0, 3382, 0, 0, 0, 0, 3180, 3387, 0, 0, 0, 0, 0, 0, 0, 1682, 0, 1684, 0, 0, 0, 0, 0, 0, 0, 1114, 0, 0, 0, 0, 1118, 0, 0, 1121, 541, 541, 541, 541, 3407, 541, 541, 541, 563, 563, 563, 3412, 563, 563, 563, 563, 563, 2289, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2605, 563, 563, 563, 563, 563, 3416, 563, 563, 563, 563, 563, 3422, 563, 563, 563, 563, 587, 587, 587, 3428, 587, 0, 0, 0, 541, 587, 563, 850, 541, 1066, 901, 541, 923, 563, 1071, 974, 587, 587, 587, 3432, 587, 587, 587, 587, 587, 3438, 587, 587, 587, 587, 541, 563, 563, 563, 563, 2276, 563, 563, 563, 563, 563, 563, 2282, 563, 2284, 563, 2287, 563, 587, 587, 587, 587, 587, 3492, 587, 587, 587, 3496, 587, 587, 587, 587, 587, 587, 2704, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1470, 587, 587, 587, 587, 587, 587, 0, 0, 3657, 0, 541, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 563, 936, 563, 563, 563, 563, 563, 563, 563, 563, 587, 3687, 3688, 3689, 3690, 0, 541, 563, 587, 0, 541, 563, 587, 0, 0, 0, 0, 0, 0, 0, 0, 3180, 0, 0, 3450, 3451, 0, 0, 389, 0, 0, 0, 393, 389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 405, 0, 347, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 1709, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 399, 0, 0, 0, 0, 0, 0, 0, 436, 0, 0, 443, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 522, 522, 522, 522, 522, 0, 0, 0, 0, 0, 0, 0, 0, 0, 522, 522, 522, 522, 522, 522, 522, 522, 522, 555, 578, 555, 578, 555, 555, 578, 555, 602, 578, 578, 578, 578, 578, 578, 578, 602, 602, 602, 555, 602, 602, 602, 602, 602, 602, 602, 602, 578, 578, 617, 622, 602, 622, 628, 1, 0, 0, 0, 751, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2061, 0, 0, 0, 962, 563, 563, 563, 563, 980, 563, 563, 563, 0, 587, 587, 992, 587, 587, 587, 587, 587, 2350, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1936, 587, 587, 587, 587, 587, 1107, 0, 0, 0, 0, 1112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 1360, 914, 563, 563, 563, 1366, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1380, 563, 563, 1404, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2620, 563, 563, 563, 1441, 563, 563, 563, 563, 563, 563, 563, 26028, 1360, 988, 587, 587, 587, 1458, 563, 587, 587, 587, 587, 587, 1079, 0, 1562, 0, 0, 0, 1568, 0, 0, 0, 0, 0, 0, 1627, 1628, 1629, 0, 0, 0, 0, 0, 0, 0, 0, 343, 0, 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, 0, 0, 0, 0, 0, 0, 407, 407, 407, 407, 0, 407, 407, 407, 1574, 0, 0, 0, 1580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 808, 541, 541, 852, 541, 1605, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1619, 0, 0, 0, 0, 0, 1723, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2625536, 0, 2699264, 2715648, 0, 1973, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2373, 563, 563, 587, 587, 587, 587, 0, 0, 1563, 0, 0, 0, 0, 0, 1569, 0, 1575, 0, 1581, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1262, 0, 0, 0, 0, 0, 0, 0, 0, 1575, 0, 0, 0, 0, 0, 1581, 0, 0, 0, 0, 0, 0, 0, 2974, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 0, 253952, 0, 0, 0, 0, 541, 541, 541, 2190, 541, 541, 541, 541, 2194, 541, 2196, 541, 541, 541, 541, 541, 541, 541, 3039, 541, 541, 541, 541, 541, 541, 541, 541, 541, 887, 541, 541, 541, 541, 541, 541, 563, 563, 2275, 563, 563, 563, 563, 2279, 563, 2281, 563, 563, 563, 563, 563, 563, 1896, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1397, 1399, 563, 563, 563, 563, 563, 587, 587, 2362, 587, 587, 587, 587, 2366, 587, 2368, 587, 587, 587, 587, 587, 587, 1465, 587, 587, 587, 587, 587, 587, 1480, 587, 587, 0, 0, 0, 0, 0, 2489, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196608, 0, 0, 0, 0, 563, 563, 2625, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2648, 563, 563, 0, 0, 0, 0, 3024, 0, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1330, 541, 541, 541, 541, 0, 3380, 0, 0, 0, 0, 0, 0, 3180, 0, 0, 0, 0, 3391, 0, 0, 0, 0, 0, 328, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 3393, 0, 0, 0, 0, 0, 541, 3396, 541, 541, 3398, 541, 541, 541, 541, 541, 541, 541, 3040, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1783, 541, 541, 541, 541, 1789, 541, 0, 3455, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 563, 563, 563, 541, 862, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1319, 541, 541, 912, 563, 563, 563, 563, 563, 563, 935, 563, 563, 563, 563, 563, 563, 563, 2291, 2292, 563, 563, 563, 563, 563, 563, 563, 2319, 563, 563, 2322, 2323, 563, 563, 0, 0, 1009, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2697, 1059, 0, 0, 0, 541, 587, 563, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 2614, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3649, 587, 587, 587, 587, 587, 587, 587, 0, 1095, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2513, 0, 0, 1623, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2130, 0, 2132, 1826, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3258, 541, 3215, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1337, 541, 587, 587, 587, 3271, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2370, 587, 587, 587, 0, 0, 0, 0, 348, 348, 350, 348, 348, 348, 348, 348, 348, 513, 348, 348, 0, 350, 348, 0, 0, 348, 348, 0, 0, 0, 0, 349, 0, 0, 0, 0, 0, 329, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2509, 0, 0, 0, 0, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 556, 579, 556, 579, 556, 556, 579, 556, 603, 579, 579, 579, 579, 579, 579, 579, 603, 603, 603, 556, 603, 603, 603, 603, 603, 603, 603, 603, 579, 579, 556, 579, 603, 579, 603, 1, 0, 0, 0, 0, 722, 0, 724, 0, 0, 0, 0, 0, 0, 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 739, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 836, 541, 541, 541, 541, 0, 0, 0, 766, 0, 0, 0, 771, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1189, 0, 0, 0, 0, 0, 0, 541, 541, 541, 870, 541, 541, 541, 541, 541, 890, 892, 541, 541, 903, 541, 541, 541, 541, 541, 2569, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2835, 541, 541, 541, 963, 965, 563, 563, 976, 563, 563, 563, 563, 0, 587, 587, 993, 999, 587, 587, 587, 587, 587, 3374, 587, 541, 541, 563, 563, 587, 587, 0, 0, 0, 0, 0, 0, 3299, 0, 0, 0, 587, 587, 1017, 587, 587, 587, 587, 587, 1037, 1039, 587, 587, 1050, 587, 587, 587, 587, 587, 2364, 587, 587, 2367, 587, 587, 587, 587, 587, 587, 587, 2677, 587, 587, 587, 587, 587, 587, 2682, 587, 0, 0, 0, 1151, 0, 1153, 0, 1155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1231, 541, 541, 541, 541, 541, 541, 0, 1181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1636, 0, 0, 1198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1675, 0, 0, 1266, 0, 0, 0, 0, 0, 0, 0, 1181, 541, 541, 541, 541, 541, 541, 541, 1326, 541, 541, 541, 541, 541, 541, 541, 1339, 1305, 1307, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1358, 541, 541, 541, 1343, 541, 541, 541, 541, 541, 541, 541, 541, 1354, 1355, 541, 541, 541, 541, 541, 541, 2840, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3056, 541, 3058, 541, 541, 541, 1360, 914, 563, 563, 563, 563, 1367, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3242, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1421, 563, 563, 563, 563, 563, 563, 563, 1435, 563, 563, 563, 563, 563, 2627, 563, 563, 563, 563, 563, 563, 2635, 563, 563, 563, 1459, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2942, 587, 587, 587, 1489, 1491, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2707, 2708, 587, 587, 587, 1554, 587, 1555, 587, 587, 1558, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 204800, 204800, 0, 205106, 204800, 1, 0, 1677, 0, 0, 1679, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1159, 0, 0, 0, 0, 541, 541, 541, 541, 1763, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2208, 541, 541, 541, 0, 563, 563, 563, 563, 563, 563, 563, 1833, 563, 563, 563, 563, 563, 563, 563, 2879, 563, 563, 563, 563, 563, 563, 563, 563, 2644, 563, 563, 563, 2647, 563, 563, 563, 1858, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1857, 563, 563, 563, 1909, 563, 563, 563, 563, 1915, 563, 563, 563, 26028, 0, 587, 587, 587, 587, 587, 2376, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2717, 541, 587, 563, 541, 541, 587, 587, 587, 587, 1929, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2938, 587, 587, 587, 587, 587, 1991, 587, 587, 587, 1996, 587, 587, 587, 587, 587, 587, 587, 587, 2005, 587, 0, 0, 0, 541, 587, 563, 852, 892, 541, 903, 541, 925, 965, 563, 976, 587, 587, 587, 2011, 587, 587, 587, 541, 587, 563, 541, 541, 541, 541, 563, 563, 916, 563, 563, 563, 932, 563, 563, 563, 563, 563, 563, 563, 1864, 563, 563, 563, 1868, 563, 563, 1873, 563, 2077, 0, 0, 0, 0, 0, 0, 0, 0, 2085, 0, 0, 0, 0, 0, 2089, 0, 0, 2091, 0, 0, 0, 0, 0, 0, 0, 2099, 0, 0, 0, 0, 0, 0, 0, 3012, 3013, 0, 0, 0, 0, 3018, 0, 0, 2133, 2134, 0, 2136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2144, 0, 0, 2149, 2150, 0, 0, 0, 0, 0, 2154, 0, 0, 0, 0, 0, 0, 0, 2160, 541, 541, 541, 541, 541, 541, 2167, 541, 541, 541, 541, 541, 541, 1288, 541, 541, 541, 541, 1298, 541, 541, 541, 541, 541, 541, 1325, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1801, 541, 541, 541, 541, 541, 2202, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2209, 541, 541, 541, 541, 541, 2815, 541, 2818, 541, 541, 541, 541, 2823, 541, 541, 541, 541, 541, 541, 3409, 541, 563, 563, 563, 563, 563, 563, 563, 563, 3479, 563, 3481, 3482, 563, 3484, 563, 541, 541, 541, 2215, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 895, 541, 541, 541, 0, 0, 2244, 563, 563, 563, 563, 563, 563, 563, 2252, 563, 563, 563, 563, 563, 563, 3534, 563, 3536, 563, 563, 3538, 563, 563, 587, 587, 563, 563, 2301, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2893, 563, 563, 0, 0, 2331, 587, 587, 587, 587, 587, 587, 587, 2339, 587, 587, 587, 587, 587, 587, 2715, 587, 587, 587, 587, 541, 587, 563, 541, 541, 587, 587, 587, 587, 2363, 587, 587, 587, 587, 587, 587, 2369, 587, 2371, 587, 2374, 587, 587, 2388, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2918, 587, 587, 0, 2474, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2482, 0, 0, 0, 0, 0, 0, 0, 122880, 122880, 122880, 122880, 122880, 0, 122880, 0, 2105632, 0, 0, 2514, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2522, 0, 0, 541, 541, 541, 541, 541, 3461, 541, 541, 541, 3465, 541, 541, 541, 541, 541, 541, 1287, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2546, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2540, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2222, 541, 541, 541, 563, 563, 563, 2599, 563, 563, 563, 563, 563, 2604, 563, 563, 563, 563, 563, 563, 2278, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2632, 563, 563, 563, 563, 563, 563, 2670, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3143, 587, 587, 587, 587, 2686, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3125, 587, 587, 587, 587, 541, 541, 2723, 563, 563, 563, 2725, 587, 587, 587, 2727, 2728, 0, 0, 0, 0, 0, 0, 0, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 1, 0, 0, 2746, 0, 2747, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1175, 0, 0, 0, 0, 0, 0, 0, 0, 2762, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1192, 0, 1195, 0, 0, 2811, 541, 2812, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1804, 541, 541, 541, 541, 541, 2849, 541, 541, 541, 541, 541, 0, 0, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2255, 563, 2858, 563, 2859, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3086, 563, 563, 587, 587, 2907, 587, 2908, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3139, 587, 3141, 587, 587, 0, 0, 0, 2983, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2073, 0, 0, 0, 0, 0, 3381, 0, 0, 0, 0, 0, 3180, 0, 0, 0, 3390, 0, 0, 0, 0, 0, 0, 1659, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114688, 0, 241664, 258048, 0, 0, 3430, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3439, 587, 587, 587, 541, 563, 563, 563, 563, 2303, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 26028, 0, 587, 587, 587, 541, 541, 541, 541, 3518, 541, 541, 541, 541, 541, 541, 541, 541, 541, 563, 563, 563, 3232, 563, 563, 563, 563, 563, 563, 3531, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 587, 587, 587, 3357, 587, 587, 587, 587, 587, 3545, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 0, 0, 0, 0, 0, 0, 3637, 541, 541, 541, 541, 541, 541, 3643, 563, 563, 563, 563, 3647, 563, 563, 587, 587, 587, 587, 587, 3653, 587, 587, 0, 0, 0, 0, 3635, 0, 541, 541, 541, 541, 541, 541, 541, 563, 2724, 563, 563, 587, 2726, 587, 587, 0, 0, 0, 0, 0, 0, 0, 0, 3607, 0, 541, 541, 541, 541, 0, 3656, 0, 3658, 541, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 563, 937, 563, 563, 563, 563, 563, 563, 563, 0, 0, 0, 0, 394, 395, 0, 396, 0, 0, 0, 0, 0, 396, 0, 0, 0, 0, 0, 331, 332, 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 560, 583, 560, 583, 560, 560, 583, 401, 0, 0, 0, 0, 0, 368, 376, 404, 0, 0, 0, 0, 0, 368, 0, 0, 396, 0, 0, 0, 0, 0, 351, 0, 0, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2744, 409, 411, 0, 0, 368, 376, 0, 69632, 73728, 0, 0, 0, 0, 427, 65536, 0, 0, 0, 0, 0, 2044, 2045, 0, 0, 0, 0, 0, 0, 0, 0, 0, 361, 0, 0, 0, 0, 0, 361, 427, 427, 437, 0, 427, 0, 411, 427, 456, 0, 0, 0, 0, 0, 0, 0, 0, 106496, 0, 106496, 0, 0, 0, 0, 106496, 396, 0, 409, 0, 497, 497, 0, 497, 497, 497, 497, 497, 497, 497, 497, 523, 523, 523, 523, 523, 456, 456, 456, 456, 531, 456, 456, 532, 456, 523, 537, 523, 523, 523, 537, 523, 523, 523, 523, 539, 557, 580, 557, 580, 557, 557, 580, 557, 604, 580, 580, 580, 580, 580, 580, 580, 604, 604, 604, 557, 604, 604, 604, 604, 604, 604, 604, 604, 580, 580, 618, 623, 604, 623, 629, 1, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2101, 0, 0, 0, 783, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2757, 0, 0, 0, 802, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2129, 0, 0, 0, 587, 587, 587, 1023, 1025, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3275, 587, 587, 587, 587, 0, 0, 0, 0, 1096, 0, 0, 1098, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1630, 0, 0, 0, 0, 0, 1636, 0, 0, 0, 0, 1111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1207, 0, 0, 0, 0, 1098, 1227, 0, 0, 0, 0, 0, 0, 1234, 0, 0, 0, 0, 0, 0, 0, 0, 155648, 0, 0, 0, 0, 0, 0, 0, 0, 1239, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1239, 1248, 0, 0, 0, 0, 0, 0, 1681, 0, 0, 0, 0, 0, 0, 1687, 0, 1689, 0, 0, 0, 0, 1239, 1269, 1270, 0, 1239, 0, 541, 541, 541, 541, 541, 541, 541, 3207, 3208, 541, 541, 541, 541, 3212, 3213, 1278, 541, 541, 541, 1282, 541, 541, 1293, 541, 541, 1297, 541, 541, 541, 541, 541, 541, 541, 3054, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1784, 541, 541, 541, 541, 541, 541, 1360, 914, 563, 563, 563, 563, 563, 563, 563, 1370, 563, 563, 563, 1374, 563, 563, 563, 563, 1847, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2308, 563, 563, 563, 563, 1385, 563, 563, 1389, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2295, 563, 563, 563, 563, 563, 563, 1406, 563, 563, 563, 1410, 563, 563, 563, 563, 563, 563, 563, 563, 2901, 563, 563, 0, 0, 587, 587, 587, 587, 587, 587, 1462, 587, 587, 587, 1466, 587, 587, 1477, 587, 587, 1481, 587, 587, 587, 587, 587, 3434, 587, 3436, 587, 587, 587, 587, 587, 587, 541, 563, 587, 1502, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3128, 587, 0, 1622, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1635, 0, 0, 0, 0, 0, 2067, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2076, 1637, 0, 0, 0, 1641, 0, 0, 0, 1645, 0, 0, 0, 1649, 0, 0, 0, 0, 0, 0, 2056, 0, 2057, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1676, 0, 563, 563, 1844, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3540, 587, 587, 1958, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3127, 587, 3129, 587, 587, 2010, 587, 587, 587, 587, 1749, 1940, 1844, 541, 541, 541, 541, 563, 563, 917, 563, 563, 563, 934, 563, 563, 948, 563, 563, 563, 563, 563, 1895, 563, 563, 563, 1900, 563, 563, 563, 563, 563, 563, 1914, 563, 563, 563, 563, 26028, 0, 587, 587, 587, 0, 2118, 0, 0, 0, 0, 0, 0, 2125, 0, 0, 0, 0, 0, 0, 0, 0, 184726, 184932, 184932, 184932, 0, 184932, 184932, 184932, 0, 0, 2159, 0, 541, 541, 2162, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2833, 541, 541, 541, 541, 541, 541, 541, 2227, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 0, 0, 563, 2855, 563, 563, 563, 0, 0, 563, 563, 2246, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3255, 563, 563, 563, 563, 563, 563, 2314, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 0, 0, 587, 2904, 587, 0, 0, 587, 587, 2333, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3440, 587, 587, 541, 563, 587, 587, 587, 587, 2390, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2928, 587, 587, 587, 587, 587, 587, 587, 587, 2401, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 541, 587, 0, 0, 0, 541, 587, 563, 1064, 541, 541, 905, 541, 1069, 563, 563, 978, 541, 541, 541, 2567, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 900, 541, 541, 541, 2698, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3277, 587, 587, 0, 2759, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1716, 0, 541, 2827, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1758, 541, 563, 2874, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2285, 563, 587, 587, 587, 2923, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2382, 587, 587, 587, 0, 0, 2993, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2433, 0, 2435, 3171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2771, 3202, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2577, 3225, 541, 541, 541, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 563, 563, 2888, 563, 563, 563, 563, 563, 563, 563, 563, 3241, 563, 563, 563, 563, 563, 563, 563, 587, 587, 587, 3282, 587, 587, 587, 587, 587, 587, 587, 587, 587, 541, 587, 563, 2018, 541, 541, 541, 2022, 563, 541, 3289, 563, 3291, 587, 3293, 3294, 0, 0, 0, 0, 3298, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 365, 0, 0, 0, 1134592, 0, 0, 0, 1134592, 1134592, 0, 0, 1134592, 0, 0, 1134592, 0, 0, 0, 3311, 0, 0, 0, 0, 3315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1725, 0, 0, 0, 0, 0, 0, 3318, 0, 541, 541, 541, 3320, 541, 541, 541, 3323, 541, 541, 541, 541, 541, 541, 541, 1751, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2586, 0, 563, 563, 563, 563, 563, 3338, 563, 563, 563, 3341, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 26028, 1921, 587, 587, 587, 587, 3360, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3554, 0, 0, 3403, 541, 3405, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3075, 563, 563, 3418, 563, 3420, 563, 563, 563, 563, 563, 563, 587, 587, 587, 587, 587, 587, 587, 3596, 587, 3598, 587, 587, 0, 0, 0, 0, 3560, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2169, 541, 541, 541, 541, 541, 3574, 541, 541, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1417, 3586, 563, 563, 563, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3599, 587, 0, 0, 0, 853, 1000, 926, 849, 1065, 894, 541, 541, 922, 1070, 967, 563, 0, 587, 587, 587, 587, 587, 78115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 0, 305, 0, 0, 0, 0, 3611, 541, 541, 541, 541, 541, 541, 541, 563, 563, 3617, 563, 3618, 563, 563, 563, 563, 587, 587, 587, 587, 3594, 587, 587, 587, 587, 587, 587, 587, 541, 541, 563, 563, 587, 587, 3378, 0, 0, 410, 356, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 2122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 304, 304, 0, 0, 0, 0, 0, 0, 354, 0, 0, 0, 356, 0, 0, 473, 473, 473, 473, 473, 473, 473, 478, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 478, 473, 484, 473, 0, 0, 473, 0, 0, 0, 0, 0, 0, 0, 0, 524, 528, 528, 528, 528, 473, 473, 473, 473, 473, 473, 473, 478, 473, 528, 524, 528, 528, 528, 524, 528, 528, 528, 528, 540, 558, 581, 558, 581, 558, 558, 581, 558, 605, 581, 581, 581, 581, 581, 581, 581, 605, 605, 605, 558, 605, 605, 605, 605, 605, 605, 605, 605, 581, 581, 619, 624, 605, 624, 630, 1, 0, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1606, 0, 0, 0, 0, 688, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 365, 365, 0, 0, 0, 0, 0, 2138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2768, 0, 0, 0, 0, 0, 0, 0, 738, 0, 0, 0, 644, 738, 0, 744, 745, 644, 0, 0, 0, 0, 0, 0, 790, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2058, 0, 0, 0, 0, 0, 0, 0, 0, 799, 0, 804, 0, 0, 0, 0, 0, 0, 804, 0, 0, 0, 0, 0, 644, 0, 0, 0, 799, 0, 804, 0, 790, 0, 819, 0, 0, 0, 665, 0, 0, 0, 0, 819, 0, 0, 0, 0, 0, 0, 0, 2473984, 2478080, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2767, 0, 0, 0, 0, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 0, 0, 790, 0, 0, 0, 0, 0, 0, 0, 3165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 563, 541, 563, 541, 541, 563, 0, 0, 790, 790, 0, 644, 0, 0, 790, 804, 842, 0, 541, 848, 541, 541, 541, 541, 541, 2839, 541, 541, 541, 2842, 541, 2844, 541, 541, 541, 541, 541, 541, 879, 541, 884, 541, 891, 541, 894, 541, 541, 908, 541, 541, 867, 871, 877, 541, 882, 541, 541, 541, 541, 541, 899, 541, 541, 541, 541, 541, 541, 2852, 541, 541, 0, 0, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2256, 563, 563, 563, 972, 563, 563, 563, 563, 563, 0, 587, 587, 995, 587, 587, 587, 587, 587, 2687, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2937, 587, 587, 587, 587, 587, 587, 587, 1014, 1018, 1024, 587, 1029, 587, 587, 587, 587, 587, 1046, 587, 587, 587, 587, 587, 1026, 587, 1031, 587, 1038, 587, 1041, 587, 587, 1055, 587, 1149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2799, 0, 0, 0, 1200, 0, 0, 0, 0, 0, 1205, 0, 0, 0, 0, 0, 0, 0, 1714, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2140, 2141, 0, 0, 2143, 0, 0, 1099, 0, 0, 0, 1230, 0, 1232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 351, 352, 353, 0, 0, 0, 0, 1240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1246, 0, 1249, 1200, 0, 0, 0, 0, 0, 2427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 336, 337, 0, 0, 0, 0, 1230, 1252, 0, 1255, 0, 0, 0, 0, 0, 1130, 0, 0, 0, 0, 1264, 0, 0, 1149, 1264, 0, 1271, 541, 541, 541, 541, 1277, 1360, 914, 1362, 563, 563, 563, 563, 563, 1369, 563, 563, 563, 563, 1375, 563, 563, 563, 563, 1862, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3084, 563, 563, 563, 563, 563, 563, 563, 1407, 563, 563, 563, 563, 1412, 563, 563, 563, 563, 563, 563, 563, 2900, 563, 563, 563, 0, 0, 587, 587, 587, 563, 1419, 563, 563, 563, 1426, 1428, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3346, 563, 563, 563, 563, 563, 563, 587, 587, 1461, 587, 587, 587, 587, 1467, 587, 587, 587, 587, 587, 587, 587, 587, 2663, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1488, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1499, 587, 587, 587, 587, 1463, 587, 587, 587, 587, 587, 1475, 587, 587, 587, 587, 587, 587, 2014, 541, 587, 563, 1791, 541, 2020, 541, 1886, 563, 587, 587, 1504, 587, 587, 587, 587, 587, 587, 587, 587, 1511, 587, 587, 587, 1518, 1520, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2396, 2397, 2398, 587, 587, 1542, 587, 0, 541, 587, 563, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 2862, 563, 2865, 563, 563, 563, 563, 2870, 563, 563, 563, 563, 587, 587, 587, 587, 587, 1079, 0, 0, 1563, 0, 0, 0, 1569, 0, 0, 0, 0, 0, 376, 0, 0, 0, 0, 368, 0, 385, 0, 351, 0, 0, 1575, 0, 0, 0, 1581, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, 303, 0, 0, 0, 0, 1592, 1593, 0, 0, 0, 0, 0, 1599, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2098, 0, 2100, 0, 0, 0, 0, 0, 1638, 0, 0, 0, 0, 0, 0, 0, 1646, 1647, 0, 0, 0, 0, 0, 0, 0, 3197, 0, 0, 0, 0, 0, 0, 3200, 0, 0, 1654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2038, 0, 1690, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3005, 0, 1706, 1707, 0, 0, 0, 1710, 0, 0, 0, 0, 0, 1714, 0, 0, 1717, 0, 0, 1730, 0, 1732, 1706, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2547, 541, 541, 541, 541, 541, 1744, 541, 541, 541, 541, 1750, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3220, 541, 541, 541, 541, 541, 541, 1761, 541, 541, 541, 541, 1765, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3335, 541, 541, 563, 563, 563, 541, 1776, 541, 541, 541, 1781, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2559, 541, 541, 541, 541, 1808, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1360, 914, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1376, 563, 0, 587, 587, 1046, 587, 587, 78115, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 225890, 225890, 225890, 225890, 225741, 225890, 225890, 225890, 0, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1839, 563, 563, 563, 563, 1877, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2869, 563, 563, 563, 563, 563, 563, 1845, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1856, 563, 563, 563, 563, 1894, 563, 563, 563, 1898, 563, 563, 563, 563, 563, 563, 563, 1450, 563, 26028, 1360, 988, 1454, 587, 587, 587, 563, 563, 1860, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1871, 563, 563, 563, 563, 1911, 1913, 563, 563, 563, 563, 563, 26028, 0, 587, 587, 587, 587, 587, 1506, 587, 587, 1508, 587, 587, 587, 1512, 587, 587, 587, 0, 1286, 1470, 1378, 541, 541, 541, 1549, 541, 563, 563, 563, 1553, 563, 1876, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2297, 2298, 563, 563, 587, 2027, 587, 587, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3511, 0, 3513, 0, 541, 0, 0, 0, 2080, 2081, 0, 0, 2083, 2084, 0, 0, 0, 0, 0, 0, 0, 0, 286720, 0, 0, 0, 0, 0, 0, 0, 0, 0, 286720, 286720, 0, 286720, 286720, 1, 0, 0, 0, 2106, 0, 0, 0, 0, 2109, 2110, 0, 0, 0, 0, 0, 0, 0, 2069, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 564, 541, 564, 541, 541, 564, 541, 541, 541, 541, 2175, 541, 541, 2179, 541, 541, 541, 2183, 541, 541, 541, 541, 541, 541, 1347, 541, 541, 541, 541, 541, 541, 541, 541, 541, 563, 563, 3231, 563, 563, 563, 563, 2225, 541, 541, 541, 541, 2230, 541, 541, 541, 541, 541, 541, 541, 541, 0, 0, 0, 0, 0, 386, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 2242, 0, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2325, 0, 563, 563, 563, 2260, 563, 563, 2264, 563, 563, 563, 2268, 563, 563, 563, 563, 563, 587, 587, 3625, 587, 3626, 587, 587, 587, 587, 587, 587, 1493, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2380, 587, 587, 587, 587, 587, 587, 2312, 563, 563, 563, 563, 2317, 563, 563, 563, 563, 563, 563, 563, 563, 0, 0, 0, 0, 0, 0, 587, 587, 2655, 587, 587, 587, 2329, 0, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2680, 587, 587, 587, 587, 587, 587, 2347, 587, 587, 2351, 587, 587, 587, 2355, 587, 587, 587, 587, 587, 587, 2925, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1471, 587, 587, 587, 587, 587, 587, 2399, 587, 587, 587, 587, 2404, 587, 587, 587, 587, 587, 587, 587, 587, 541, 587, 0, 0, 0, 854, 1001, 927, 541, 541, 541, 541, 910, 563, 563, 563, 563, 563, 1848, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3097, 563, 3099, 563, 563, 563, 0, 0, 0, 0, 2439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1616, 0, 0, 0, 0, 0, 0, 2475, 0, 0, 0, 2479, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 0, 0, 0, 0, 0, 0, 541, 2525, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2533, 541, 541, 541, 541, 541, 541, 3053, 541, 541, 3055, 541, 541, 541, 541, 541, 541, 541, 1311, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1753, 541, 541, 541, 541, 541, 541, 541, 2551, 541, 541, 2553, 541, 2554, 541, 541, 541, 541, 541, 541, 541, 2561, 541, 541, 541, 541, 876, 878, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1353, 541, 541, 541, 541, 541, 2565, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2576, 541, 541, 541, 541, 1283, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1304, 0, 0, 0, 563, 563, 2589, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3537, 563, 563, 3539, 563, 587, 587, 563, 2597, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2326, 0, 563, 563, 2612, 563, 563, 563, 2615, 563, 563, 2617, 563, 2618, 563, 563, 563, 563, 563, 2877, 2878, 563, 563, 563, 563, 2881, 563, 563, 563, 563, 563, 1863, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3356, 587, 587, 587, 587, 587, 563, 563, 563, 563, 2626, 563, 563, 2630, 563, 563, 563, 563, 563, 563, 563, 563, 3345, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2641, 2642, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 26028, 1360, 988, 587, 587, 587, 587, 2683, 587, 2684, 587, 587, 587, 587, 587, 587, 587, 587, 2692, 587, 587, 2696, 587, 0, 0, 0, 1061, 1062, 1063, 851, 541, 898, 902, 1068, 924, 563, 971, 975, 2733, 2734, 0, 0, 2737, 2738, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 307, 0, 0, 0, 0, 0, 2788, 0, 2790, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2457, 0, 0, 0, 0, 0, 0, 0, 2803, 0, 0, 0, 0, 0, 0, 541, 541, 541, 541, 541, 541, 541, 3033, 541, 541, 2826, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2825, 2873, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2883, 563, 563, 563, 563, 1912, 563, 563, 563, 563, 563, 563, 26028, 0, 587, 587, 587, 587, 587, 2934, 587, 587, 587, 587, 587, 587, 587, 2940, 587, 587, 587, 587, 2922, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2932, 0, 2982, 0, 0, 2984, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1632, 0, 0, 0, 0, 0, 0, 0, 0, 2995, 0, 0, 2998, 0, 2999, 0, 0, 0, 0, 0, 0, 0, 2096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 562, 585, 562, 585, 562, 562, 585, 541, 3049, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3061, 3089, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2621, 563, 3103, 563, 563, 563, 563, 563, 587, 587, 587, 3111, 587, 587, 587, 587, 587, 587, 1507, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1983, 1984, 587, 587, 587, 587, 587, 587, 3131, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2929, 587, 587, 587, 587, 3145, 587, 587, 587, 587, 587, 541, 587, 563, 541, 541, 563, 563, 587, 587, 0, 2962, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2507, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3163, 0, 0, 0, 0, 0, 0, 0, 3169, 0, 0, 0, 0, 0, 438, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2142, 0, 0, 0, 0, 541, 3226, 541, 541, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 563, 563, 3095, 563, 563, 563, 563, 563, 563, 563, 563, 2306, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3236, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2309, 2310, 2311, 563, 563, 3246, 563, 563, 563, 563, 563, 563, 3252, 563, 3254, 563, 563, 563, 563, 563, 1392, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1853, 563, 563, 563, 563, 563, 563, 563, 563, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3265, 587, 587, 587, 587, 587, 2703, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2950, 587, 587, 541, 587, 563, 587, 587, 3281, 587, 3283, 587, 587, 587, 587, 587, 587, 587, 587, 541, 587, 563, 3153, 541, 3155, 563, 3157, 587, 0, 0, 0, 3301, 0, 0, 0, 0, 0, 0, 0, 3180, 0, 0, 0, 0, 0, 0, 0, 3014656, 3207168, 0, 2691072, 0, 0, 3215360, 0, 0, 3309, 0, 0, 0, 0, 0, 3314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 0, 0, 0, 0, 131072, 131072, 563, 563, 3339, 563, 563, 563, 3343, 563, 563, 563, 563, 563, 563, 563, 563, 563, 26028, 1360, 988, 587, 587, 1456, 587, 587, 587, 587, 3362, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3126, 587, 587, 587, 587, 587, 3371, 587, 587, 587, 587, 541, 541, 563, 563, 587, 587, 0, 0, 0, 3296, 0, 0, 0, 0, 0, 0, 3557, 3558, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 3568, 541, 541, 541, 541, 541, 1284, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1303, 563, 563, 3588, 563, 587, 587, 587, 3593, 587, 587, 587, 587, 587, 587, 587, 587, 2690, 587, 587, 587, 587, 2694, 587, 587, 3601, 587, 0, 0, 0, 0, 0, 3604, 3605, 3606, 0, 3608, 541, 541, 541, 541, 541, 541, 1813, 541, 541, 541, 541, 1819, 541, 541, 541, 1360, 563, 3621, 3622, 563, 563, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3629, 3630, 563, 563, 587, 587, 587, 587, 3679, 0, 541, 3680, 563, 3681, 587, 3682, 0, 541, 541, 541, 541, 1345, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2560, 541, 541, 541, 358, 359, 0, 0, 0, 0, 0, 0, 0, 365, 0, 293, 0, 0, 0, 0, 0, 0, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1174, 0, 0, 0, 0, 0, 0, 0, 0, 392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2495, 0, 0, 0, 474, 474, 474, 488, 0, 0, 488, 359, 359, 359, 510, 359, 359, 359, 359, 474, 559, 606, 582, 582, 582, 582, 582, 582, 582, 606, 606, 606, 559, 606, 606, 606, 606, 606, 606, 606, 606, 582, 582, 559, 582, 606, 582, 606, 1, 541, 541, 868, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 904, 541, 541, 541, 541, 541, 2851, 541, 541, 541, 0, 0, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2254, 563, 563, 563, 587, 1015, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1051, 587, 587, 587, 587, 587, 2909, 587, 587, 587, 587, 587, 587, 2917, 587, 587, 587, 587, 587, 1527, 587, 587, 587, 587, 587, 587, 587, 587, 1538, 1539, 1197, 0, 0, 0, 0, 0, 0, 0, 1197, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2980, 0, 0, 541, 541, 1280, 541, 541, 541, 1289, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3524, 541, 541, 3526, 563, 563, 1360, 914, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1372, 563, 563, 563, 1381, 587, 587, 1543, 0, 1289, 1473, 1381, 541, 541, 541, 541, 541, 563, 563, 563, 563, 563, 2898, 563, 563, 563, 563, 563, 0, 0, 587, 587, 587, 587, 587, 587, 2337, 587, 587, 587, 587, 587, 587, 587, 2352, 587, 587, 587, 587, 2357, 587, 587, 587, 563, 587, 587, 587, 587, 587, 1079, 0, 0, 0, 1564, 0, 0, 0, 1570, 0, 0, 0, 0, 0, 2440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2871296, 0, 0, 2424832, 0, 0, 0, 1576, 0, 0, 0, 1582, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 0, 0, 0, 0, 155648, 0, 0, 1606, 0, 0, 0, 0, 0, 0, 0, 1614, 1615, 0, 0, 0, 0, 0, 0, 0, 3385, 3180, 0, 0, 0, 0, 0, 0, 0, 0, 2097, 0, 0, 0, 0, 0, 0, 0, 0, 2070, 0, 0, 0, 0, 2074, 0, 0, 0, 0, 0, 0, 1625, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1648, 0, 0, 0, 0, 563, 1891, 563, 563, 563, 563, 563, 563, 563, 563, 1902, 563, 563, 563, 563, 563, 1408, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1867, 563, 563, 563, 563, 563, 587, 1975, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 1987, 587, 587, 587, 587, 1490, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2381, 587, 587, 587, 587, 2008, 587, 587, 587, 587, 587, 587, 541, 587, 563, 541, 541, 541, 541, 563, 563, 918, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2634, 563, 563, 563, 563, 0, 2243, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2637, 563, 0, 2330, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3276, 587, 587, 587, 0, 0, 2451, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2471, 0, 2472, 0, 0, 0, 563, 563, 563, 563, 563, 563, 563, 2593, 563, 563, 563, 563, 563, 1424, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2293, 563, 563, 563, 563, 563, 563, 587, 2659, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2912, 587, 587, 2916, 587, 587, 587, 587, 0, 0, 0, 0, 0, 2776, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 372, 0, 0, 373, 0, 0, 563, 2895, 563, 563, 563, 563, 563, 563, 563, 563, 563, 0, 0, 587, 587, 587, 587, 2335, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2947, 587, 587, 587, 587, 587, 541, 587, 563, 587, 2906, 587, 587, 587, 587, 587, 587, 2913, 587, 2915, 587, 587, 587, 587, 587, 587, 2935, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2408, 587, 587, 587, 587, 2177, 2349, 587, 587, 587, 2944, 587, 587, 587, 587, 587, 587, 587, 587, 587, 541, 587, 563, 563, 563, 563, 563, 563, 563, 587, 587, 587, 541, 587, 587, 587, 0, 541, 587, 563, 541, 1547, 541, 541, 1550, 563, 1551, 563, 563, 0, 0, 0, 0, 0, 3561, 0, 0, 0, 541, 541, 541, 541, 541, 541, 541, 541, 3464, 541, 3466, 3467, 541, 3469, 541, 541, 541, 541, 3575, 541, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3423, 563, 563, 563, 3426, 587, 587, 587, 587, 563, 3587, 563, 563, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3600, 587, 587, 587, 587, 3670, 587, 0, 0, 0, 0, 541, 541, 541, 541, 563, 563, 919, 925, 563, 563, 563, 563, 943, 563, 563, 563, 563, 563, 563, 3353, 563, 563, 563, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3267, 0, 0, 360, 0, 0, 0, 0, 0, 0, 365, 0, 293, 0, 0, 0, 0, 0, 0, 331, 0, 0, 0, 0, 0, 0, 0, 331, 0, 0, 69632, 73728, 0, 419, 419, 0, 0, 65536, 419, 0, 0, 0, 0, 375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1663, 0, 0, 0, 0, 0, 0, 360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2511, 0, 0, 0, 0, 0, 370, 0, 0, 370, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2496, 0, 0, 560, 607, 583, 583, 583, 583, 583, 583, 583, 607, 607, 607, 560, 607, 607, 607, 607, 607, 607, 607, 607, 583, 583, 560, 583, 607, 583, 607, 1, 541, 863, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1772, 541, 1010, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3123, 587, 587, 587, 587, 587, 587, 587, 563, 1386, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2871, 563, 0, 0, 2760, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2755, 0, 0, 0, 0, 0, 0, 0, 2985, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 406, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3302, 0, 3303, 0, 0, 0, 0, 3180, 0, 0, 0, 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2801664, 0, 0, 0, 0, 2142208, 0, 0, 0, 361, 362, 363, 364, 0, 0, 365, 0, 293, 0, 0, 0, 0, 0, 0, 348, 349, 350, 0, 0, 0, 0, 0, 0, 0, 0, 3180, 0, 3388, 0, 0, 0, 0, 0, 0, 362, 0, 361, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 428, 65536, 0, 0, 0, 0, 0, 2463, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2807, 541, 541, 541, 541, 428, 428, 0, 0, 428, 0, 362, 428, 457, 0, 0, 0, 0, 0, 0, 0, 0, 1159168, 0, 1159168, 0, 0, 0, 0, 1159168, 0, 0, 0, 0, 498, 498, 0, 505, 505, 505, 505, 511, 512, 505, 505, 525, 525, 525, 525, 525, 457, 457, 457, 457, 457, 457, 457, 457, 457, 525, 525, 525, 525, 525, 525, 525, 525, 525, 561, 584, 561, 584, 561, 561, 584, 561, 608, 584, 584, 584, 584, 584, 584, 584, 608, 608, 608, 561, 608, 608, 608, 608, 608, 608, 608, 608, 584, 584, 620, 625, 608, 625, 631, 1, 563, 563, 563, 973, 563, 563, 563, 563, 563, 0, 587, 587, 587, 587, 587, 587, 1963, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3137, 587, 587, 587, 587, 587, 587, 587, 0, 2105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2052, 0, 0, 0, 0, 0, 541, 2161, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 3336, 541, 563, 563, 563, 0, 0, 563, 2245, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2882, 563, 563, 563, 0, 0, 587, 2332, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3286, 587, 587, 587, 587, 541, 587, 563, 2550, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2210, 541, 541, 541, 2579, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 0, 0, 0, 0, 0, 0, 2068, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 0, 0, 122880, 122880, 0, 0, 2711, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 541, 587, 563, 541, 541, 541, 2021, 563, 563, 562, 609, 585, 585, 585, 585, 585, 585, 585, 609, 609, 609, 562, 609, 609, 609, 609, 609, 609, 609, 609, 585, 585, 562, 585, 609, 585, 609, 1, 0, 0, 0, 705, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2742, 0, 0, 0, 0, 735, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2075, 0, 541, 864, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 2238, 0, 1011, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2689, 587, 587, 587, 587, 587, 587, 587, 587, 2716, 587, 587, 587, 541, 587, 563, 541, 541, 1136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 365, 0, 0, 0, 0, 0, 0, 2095, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2375680, 0, 0, 0, 0, 0, 587, 1503, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2911, 587, 2914, 587, 587, 587, 587, 2919, 587, 563, 587, 587, 587, 587, 587, 1079, 1560, 0, 0, 0, 1566, 0, 0, 0, 1572, 0, 0, 0, 1578, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2754, 0, 0, 0, 563, 563, 563, 563, 2600, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 26028, 1922, 587, 587, 587, 0, 0, 0, 0, 647, 0, 0, 0, 0, 0, 0, 743, 541, 541, 541, 541, 541, 541, 2178, 541, 541, 541, 541, 541, 541, 541, 541, 541, 0, 2242, 563, 563, 563, 563, 563, 0, 0, 1594, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2770, 0, 0, 563, 563, 563, 1846, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3085, 563, 3087, 563, 2187, 541, 2189, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1821, 541, 1360, 0, 0, 563, 563, 563, 563, 2248, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2305, 563, 563, 563, 563, 563, 563, 563, 563, 563, 0, 587, 587, 994, 587, 587, 587, 563, 2274, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 2894, 563, 587, 2361, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 3121, 587, 587, 587, 587, 587, 587, 587, 587, 563, 563, 541, 563, 587, 563, 587, 1, 2623, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3101, 563, 563, 563, 563, 2651, 0, 0, 0, 0, 0, 0, 587, 587, 587, 587, 587, 587, 587, 587, 587, 2340, 587, 587, 587, 587, 0, 0, 3179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2798, 0, 0, 3245, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 3257, 563, 1134592, 0, 1134592, 0, 0, 0, 1134592, 1135008, 1135008, 0, 0, 0, 0, 0, 1135008, 0, 0, 0, 0, 0, 2478, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3180, 0, 0, 3307, 0, 1134592, 0, 1134592, 1134592, 0, 0, 0, 0, 1135203, 1135203, 1135203, 1135203, 1134592, 1135203, 1135203, 1135203, 1135203, 1135203, 1135203, 1135203, 0, 1134592, 1134592, 1134592, 1134592, 1135203, 1134592, 1135203, 1, 0, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 988, 2125824, 2125824, 2125824, 2125824, 1147355, 1147355, 1147355, 1147355, 458, 458, 1147355, 458, 458, 458, 458, 458, 458, 458, 458, 1147406, 1147406, 1147406, 1147406, 1147406, 1147406, 1147406, 1147406, 1147406, 1147406, 1147406, 1147406, 1147406, 1147406, 1147406, 1147406, 0, 0, 0, 0, 0, 0, 0, 0, 458, 0, 0, 0, 0, 0, 1147355, 1147355, 1147355, 1147406, 1147406, 1147355, 1147406, 1147406, 1, 12290, 3, 0, 0, 0, 0, 249856, 0, 0, 0, 249856, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 425, 65536, 0, 1159168, 0, 0, 1159168, 0, 1159168, 1159168, 0, 1159168, 1159168, 0, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 0, 1159168, 1159168, 0, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1159168, 0, 0, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1, 12290, 3, 78115, 293, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 131072, 0, 0, 1163264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3170, 0, 913, 2125824, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 1453, 2125824, 2125824, 2125824, 2125824, 106496, 0, 106496, 106496, 0, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 0, 0, 0, 106496, 0, 0, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 541, 541, 1275, 541, 541, 0, 0, 0, 3117056, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2979, 0, 0, 0, 0, 3108864, 3198976, 0, 0, 3043328, 0, 3149824, 2936832, 0, 2760704, 0, 2437120, 0, 0, 0, 0, 0, 0, 2107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 0, 293, 0, 0, 0, 0, 0, 0, 0, 0, 2875392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2834432
];
XQueryParser.EXPECTED =
-[ 260, 268, 276, 283, 296, 304, 881, 312, 318, 331, 366, 339, 350, 361, 369, 342, 288, 886, 1555, 1545, 377, 384, 1551, 392, 400, 415, 423, 431, 439, 447, 455, 463, 486, 553, 490, 500, 500, 499, 498, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 353, 1871, 509, 517, 525, 1149, 688, 533, 1759, 407, 548, 949, 561, 323, 569, 1480, 1303, 866, 577, 1034, 592, 596, 1439, 1444, 604, 1857, 628, 636, 644, 1919, 1049, 652, 673, 660, 668, 681, 696, 995, 710, 718, 731, 1324, 739, 761, 1116, 776, 784, 792, 1170, 1200, 1204, 807, 843, 851, 859, 894, 902, 910, 723, 918, 926, 934, 942, 753, 957, 1568, 965, 980, 611, 988, 1738, 1003, 1011, 616, 1185, 1827, 871, 1539, 1029, 1042, 1418, 584, 1424, 972, 1057, 1065, 1073, 1598, 1087, 1095, 1103, 1111, 1134, 1142, 768, 478, 1163, 1289, 620, 1155, 1178, 876, 1620, 1643, 1193, 702, 1812, 799, 1789, 1212, 1753, 1218, 1226, 1234, 1242, 500, 1250, 1258, 828, 1266, 1274, 1282, 1297, 1850, 1311, 1319, 1332, 1079, 540, 1345, 1017, 1337, 1359, 1021, 1367, 1375, 1390, 1398, 1403, 1411, 1432, 1452, 1460, 1468, 1476, 1488, 1496, 1382, 1516, 1524, 1532, 1563, 1576, 746, 1584, 1592, 1502, 1606, 1614, 814, 1628, 1636, 469, 821, 1661, 1665, 1673, 1678, 1686, 1694, 1702, 1710, 1718, 501, 1726, 1734, 1746, 1767, 1775, 1783, 1351, 1126, 1797, 1805, 1121, 835, 1820, 474, 1835, 1843, 1865, 1508, 1879, 1649, 1653, 1887, 1892, 1900, 1908, 1916, 500, 500, 1927, 1975, 1928, 1939, 1939, 1939, 1934, 1938, 1939, 1930, 1943, 1950, 1946, 1954, 1958, 1961, 1964, 1968, 1972, 1979, 2007, 2007, 2007, 3094, 2007, 1983, 3521, 2007, 2812, 2007, 2007, 2007, 2007, 2779, 2007, 2007, 2132, 2007, 4152, 3820, 3824, 1987, 2098, 1994, 2000, 2006, 2007, 2007, 3996, 2007, 2007, 2012, 4079, 3820, 3824, 3824, 3824, 3824, 2019, 2097, 2097, 2026, 2170, 2032, 2007, 2007, 2007, 2007, 2919, 2007, 2428, 3887, 2007, 3734, 2038, 2089, 2007, 2007, 2007, 3390, 3824, 3824, 2045, 2097, 2097, 2097, 2097, 2097, 2099, 1996, 2067, 2059, 2063, 2003, 2007, 2007, 2007, 2007, 2007, 2259, 3005, 2007, 3049, 2007, 2007, 2007, 3818, 3820, 3820, 3820, 3820, 2133, 3824, 3824, 3824, 3824, 3824, 2055, 3820, 2139, 3824, 3824, 3824, 3827, 2097, 2097, 2022, 2072, 2007, 2007, 4080, 2007, 2162, 2077, 2007, 2007, 2779, 3400, 3820, 3820, 2053, 3824, 3825, 2097, 2097, 2084, 2072, 2088, 4151, 2385, 2007, 2007, 2007, 2007, 3112, 2752, 3820, 2052, 3824, 2095, 2097, 2104, 2778, 2050, 3823, 2095, 2115, 2129, 3821, 3826, 1989, 3390, 3822, 3827, 1990, 2137, 2141, 2149, 3819, 2141, 2159, 2167, 2048, 2174, 2028, 2181, 2184, 2188, 2192, 2202, 2202, 2193, 2197, 2201, 2203, 2207, 2211, 2215, 2219, 2222, 2226, 2230, 2234, 2238, 2732, 2242, 2007, 2007, 2737, 2247, 2007, 2007, 2007, 3028, 4134, 2007, 2007, 2007, 3213, 2007, 2007, 2007, 2007, 2702, 3310, 2007, 3694, 2243, 2007, 4531, 2253, 2007, 2007, 2007, 2007, 2007, 4488, 2007, 2007, 2007, 4489, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 4297, 2280, 2282, 2286, 2289, 2293, 2297, 2301, 2662, 2386, 2007, 2007, 2007, 2007, 2387, 2307, 2314, 2318, 4376, 4208, 2325, 2681, 3075, 3584, 2645, 2353, 2359, 2620, 2007, 2007, 2381, 2363, 2007, 2007, 3675, 2007, 3534, 4411, 3291, 4070, 3348, 2391, 2007, 2395, 2399, 2007, 2007, 2007, 2007, 3092, 3298, 2007, 2007, 2402, 2007, 2007, 2007, 3382, 2007, 2007, 2418, 3423, 2432, 2007, 2007, 2007, 2007, 2797, 2433, 2797, 2457, 2007, 2007, 2007, 2007, 2463, 2007, 2007, 3716, 3131, 2917, 2007, 2007, 3777, 4457, 4344, 2470, 2007, 2007, 2007, 2477, 2007, 2007, 2007, 2484, 2007, 2107, 3702, 2007, 3700, 2493, 2007, 2111, 2007, 2007, 3723, 3037, 2007, 2007, 2007, 2090, 3072, 2007, 2007, 2007, 2007, 2261, 3346, 2007, 2007, 2500, 2007, 2505, 4255, 4115, 4254, 2007, 4238, 2510, 4117, 3651, 3491, 2511, 4118, 4239, 4255, 3650, 4117, 2516, 4116, 4117, 3593, 3670, 3596, 2528, 2531, 2535, 2538, 2542, 2007, 3509, 2620, 4365, 4173, 2562, 2566, 2570, 2007, 2674, 2672, 3782, 2574, 2007, 3457, 2579, 2007, 2501, 2007, 4424, 3255, 2555, 2588, 4214, 4424, 4450, 2584, 2592, 2599, 3102, 4176, 2007, 2007, 3778, 2008, 2342, 4482, 2348, 4126, 4353, 2007, 2007, 2007, 2721, 2607, 2007, 2007, 2007, 3379, 2007, 2007, 2007, 3480, 2619, 2007, 4362, 2007, 4150, 4231, 2625, 4223, 2632, 2636, 2007, 4444, 2654, 2007, 2007, 2007, 2007, 3897, 2007, 2007, 4225, 2675, 2642, 2007, 2007, 2007, 2007, 4443, 2653, 4024, 2007, 4424, 4341, 2118, 4304, 2679, 2007, 2007, 3794, 2734, 2268, 4056, 2403, 2007, 2007, 3896, 2007, 2655, 2910, 4541, 3011, 2685, 2775, 2007, 2007, 2007, 3576, 2686, 2007, 2007, 4010, 3290, 2007, 2007, 3151, 3295, 3238, 2007, 2697, 2007, 3451, 2403, 4245, 2586, 4285, 2701, 3577, 2715, 2007, 2007, 2007, 3620, 2706, 2007, 2007, 2007, 2007, 2713, 2775, 2007, 2007, 4082, 3399, 2007, 2007, 4082, 3399, 2741, 2769, 2855, 2774, 2007, 3410, 2751, 2007, 2007, 4104, 2007, 2007, 2007, 2007, 2506, 4140, 4109, 4114, 3788, 2803, 4147, 2007, 2007, 4385, 3699, 2007, 3534, 4411, 2007, 2041, 4469, 4448, 2007, 2007, 2007, 2709, 3410, 2751, 2702, 2784, 3450, 4048, 2121, 2770, 3436, 2007, 3434, 3438, 2007, 2791, 2007, 2795, 2801, 2328, 2810, 2787, 2452, 2816, 2453, 2007, 2443, 2450, 2424, 2465, 2007, 2007, 2007, 2007, 3098, 2007, 2007, 2007, 2007, 3372, 2007, 2007, 2007, 2007, 3389, 3820, 3820, 3820, 2163, 3824, 3824, 3824, 3824, 4039, 2821, 2787, 2832, 2786, 3985, 2838, 2843, 4030, 3312, 2839, 2844, 4031, 4431, 2848, 2834, 2852, 2859, 2860, 2177, 2864, 3301, 4460, 4463, 2871, 4547, 2875, 2879, 2883, 2886, 2890, 2894, 2897, 2899, 2900, 2007, 2007, 2904, 2007, 3808, 2910, 4541, 3081, 2914, 2007, 2007, 2924, 2928, 2937, 2944, 2952, 2961, 2968, 3274, 2970, 2007, 2473, 2408, 2007, 2007, 2007, 2007, 2414, 3024, 2007, 2495, 2976, 2980, 4495, 4081, 2986, 2999, 2007, 2007, 2007, 2007, 2007, 3335, 2007, 2489, 2007, 3285, 2007, 3286, 2007, 3109, 2656, 3009, 3015, 3021, 3139, 2007, 4251, 2344, 3032, 2007, 2007, 2007, 2007, 3722, 3036, 2007, 2612, 2007, 2007, 3782, 2574, 2007, 3508, 4541, 3046, 3053, 2702, 3058, 2007, 2007, 3062, 3067, 2007, 2007, 2007, 2007, 3063, 2007, 2007, 2007, 3691, 2007, 2007, 2007, 2007, 2338, 3741, 2007, 2007, 3119, 2007, 2007, 2007, 3125, 2007, 2007, 2007, 2550, 4047, 2007, 2007, 2920, 3125, 2007, 2007, 3428, 4501, 2355, 3026, 2007, 2615, 2654, 4143, 3807, 3464, 2520, 2524, 3111, 2918, 2007, 3114, 3109, 3780, 3113, 3150, 3110, 3781, 3147, 4236, 3779, 2920, 3137, 2919, 2920, 3489, 4183, 3144, 3155, 2155, 2007, 2007, 2007, 4522, 3741, 2007, 3667, 2007, 3121, 3163, 3167, 3171, 3175, 3179, 3183, 3187, 3191, 2007, 2007, 2817, 3354, 2007, 2765, 3195, 3974, 3201, 3218, 4237, 3222, 3226, 3236, 4136, 3242, 3713, 3038, 3248, 3246, 2007, 2007, 2007, 2575, 2690, 2007, 2007, 2007, 2007, 4428, 2007, 2007, 2007, 2249, 4402, 4409, 2007, 2007, 3231, 3253, 2007, 2765, 3195, 3974, 3259, 3475, 4398, 3265, 3269, 3278, 2007, 2007, 3282, 2007, 2647, 2638, 3815, 3004, 2336, 2007, 2007, 2007, 3352, 2007, 2765, 3195, 2780, 3316, 2068, 3260, 3320, 3417, 3327, 3333, 2007, 2719, 3457, 2007, 2725, 2730, 2741, 4471, 3360, 3364, 3407, 2007, 2007, 2007, 3368, 2007, 2736, 3608, 3079, 3085, 3140, 2702, 4437, 3054, 3399, 2007, 2007, 2007, 4081, 3398, 2007, 2745, 2007, 2007, 3576, 2749, 2007, 2007, 2719, 2756, 2763, 3971, 3448, 2007, 2007, 3455, 2007, 2007, 3455, 2007, 2255, 2007, 3975, 3472, 3484, 2007, 3497, 2971, 3449, 2972, 2007, 3503, 3273, 4555, 4530, 4554, 3513, 4094, 4553, 3271, 4553, 4095, 4554, 3272, 4093, 4528, 3271, 3515, 4528, 4529, 2007, 4379, 2620, 3519, 2007, 3525, 4151, 3529, 3538, 3542, 3546, 3550, 3554, 3558, 3562, 3566, 2828, 3729, 2918, 2410, 4192, 3571, 3230, 4556, 3575, 3581, 3356, 3619, 3590, 2007, 2007, 4378, 3676, 2007, 3534, 4488, 2007, 2948, 3600, 2007, 2867, 3355, 2007, 2007, 2007, 2007, 3339, 4185, 3612, 2007, 2007, 2580, 3618, 2007, 2007, 2549, 2551, 2386, 2007, 2007, 3132, 3630, 2007, 2007, 2608, 3641, 2007, 3647, 4412, 2007, 3655, 3866, 3249, 3663, 2007, 2007, 2007, 2660, 2007, 2007, 2666, 2007, 4405, 2007, 2007, 2007, 2007, 2337, 3687, 2007, 2594, 3230, 4081, 3698, 2007, 2805, 3682, 2007, 2007, 2007, 3686, 2007, 2007, 2824, 2007, 2007, 2007, 2007, 2826, 4487, 2995, 2957, 2349, 3606, 2007, 2007, 3706, 2007, 4081, 3710, 2007, 2595, 2007, 3720, 4485, 2946, 3727, 3068, 3733, 2007, 3738, 2620, 2007, 2940, 2777, 3753, 3945, 3949, 3954, 3868, 2007, 3747, 2620, 2007, 2007, 3747, 2620, 3751, 2378, 2034, 3757, 3764, 3636, 2007, 4288, 2007, 2007, 4288, 3428, 3769, 2466, 2015, 3765, 3773, 2007, 3786, 2007, 3127, 2007, 2954, 2007, 2007, 3775, 2007, 2007, 3775, 2007, 2007, 2956, 2007, 2548, 2459, 2007, 3792, 3751, 3798, 3760, 3637, 2602, 2007, 3149, 4508, 2110, 2488, 2007, 3701, 2494, 2007, 2007, 4046, 2007, 3780, 2603, 2007, 3802, 3806, 3812, 3837, 4356, 3836, 3831, 2331, 3835, 3677, 3841, 2332, 3836, 3678, 4221, 3854, 3848, 4359, 3847, 3845, 3852, 3877, 3863, 3874, 3881, 3884, 2007, 2007, 2007, 2007, 2480, 2437, 2007, 2007, 2964, 2776, 2007, 3893, 3901, 3905, 3909, 3913, 3917, 3921, 3925, 3929, 3933, 3937, 2007, 2007, 2982, 4068, 4074, 4253, 2007, 2007, 3212, 4493, 2007, 2007, 2007, 2248, 3959, 3964, 3968, 4202, 3979, 3983, 3989, 3950, 2007, 4000, 4007, 4014, 2007, 2007, 2963, 2421, 3753, 4019, 4023, 2040, 3626, 4028, 4035, 2007, 3229, 3106, 3743, 3026, 2726, 2007, 2007, 2007, 4080, 2007, 4152, 3820, 3820, 2054, 3824, 3824, 2096, 2097, 2097, 2097, 2097, 2100, 2143, 4043, 2007, 2007, 3205, 3209, 2007, 2007, 2007, 2990, 2994, 2007, 2007, 2248, 3207, 2007, 2007, 2007, 3197, 4052, 2310, 4253, 4060, 2669, 2007, 4114, 2007, 2007, 2007, 2628, 3210, 2007, 2007, 2007, 2506, 4064, 2007, 2007, 3232, 3254, 3975, 2007, 4119, 3159, 2962, 4078, 3753, 4086, 2404, 2007, 4090, 2620, 4114, 2007, 2007, 2007, 4099, 2620, 2007, 2007, 3376, 2007, 2007, 2007, 2007, 2933, 4100, 4108, 4113, 2007, 2439, 4123, 3603, 4423, 2007, 3870, 3133, 2007, 2007, 2007, 4130, 2007, 3386, 2068, 4158, 3394, 3506, 2007, 2007, 2007, 4526, 2007, 2007, 2007, 4526, 2007, 3992, 2370, 4535, 4156, 2920, 2007, 2007, 4162, 2007, 2007, 2007, 4162, 2558, 2007, 4166, 4170, 2007, 4180, 2007, 2007, 4189, 2007, 2007, 4196, 4200, 4206, 4212, 3859, 4218, 2007, 2693, 2007, 2007, 4229, 2007, 3586, 2152, 2145, 4235, 3487, 2007, 4243, 3642, 2775, 3643, 4249, 4440, 2806, 3659, 4259, 4264, 3657, 3857, 3940, 2080, 3658, 3858, 3941, 4274, 3939, 3857, 4278, 3856, 3857, 4282, 3017, 4292, 4293, 4270, 2321, 4301, 4003, 4311, 4315, 4319, 4323, 4327, 4330, 4334, 4338, 2007, 2007, 2007, 2007, 2621, 3230, 3492, 3042, 4267, 3478, 2931, 3955, 4350, 4514, 4396, 3306, 3462, 3468, 3444, 2007, 4516, 2007, 2007, 2446, 2007, 2007, 2007, 2759, 2375, 3002, 4369, 4307, 2007, 4015, 2007, 2546, 2544, 4373, 4383, 2007, 2007, 2007, 4389, 3478, 2931, 2068, 3670, 3532, 4437, 2007, 4393, 2007, 2007, 3427, 3432, 2303, 3443, 3422, 2007, 2007, 4416, 4081, 2007, 2091, 3671, 3422, 3203, 4420, 2007, 2007, 2007, 2007, 2007, 3342, 2007, 3388, 3404, 3414, 3421, 2007, 2254, 3381, 3994, 2931, 4346, 4454, 4260, 3567, 3304, 2007, 3439, 3100, 2007, 2007, 2007, 2007, 3089, 2007, 4467, 2007, 2007, 2007, 2007, 2007, 3214, 2124, 2007, 2007, 4475, 2365, 3889, 3499, 2007, 3616, 2007, 2007, 2007, 2337, 3624, 2007, 2906, 2007, 3329, 3633, 2007, 2499, 3960, 4434, 2007, 2007, 2007, 2007, 4479, 2007, 2007, 3493, 2265, 2007, 2272, 3323, 2276, 4499, 2125, 2007, 4505, 2367, 4512, 2007, 4520, 2512, 2007, 2007, 3211, 4539, 2007, 3211, 4539, 2073, 4037, 4454, 2007, 2007, 2007, 4545, 2007, 2649, 2007, 2007, 4551, 3115, 4157, 3422, 2007, 2369, 2007, 2370, 2007, 2371, 3261, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 3458, 2007, 2007, 2080, 4576, 4599, 4601, 4601, 4596, 4590, 4601, 4601, 5213, 4588, 4600, 4601, 4601, 4601, 4601, 4601, 4601, 4605, 4601, 4601, 4624, 4632, 4592, 4611, 4609, 4615, 4626, 4639, 4641, 4646, 4628, 4651, 4653, 4653, 4647, 4635, 4657, 4642, 4661, 4665, 4669, 4673, 4676, 4680, 4682, 4686, 4690, 4560, 6008, 4569, 4572, 6007, 4694, 4697, 4751, 6953, 4752, 5681, 6931, 4707, 6326, 4735, 4735, 4712, 4752, 4752, 5273, 4792, 6322, 4707, 4735, 5096, 4719, 4736, 5094, 5098, 4748, 4748, 4750, 4752, 4752, 4752, 4752, 4564, 5125, 5113, 4729, 5190, 6233, 4752, 5981, 4707, 4707, 4734, 4735, 4711, 4791, 6324, 5279, 4792, 6322, 4707, 4735, 6320, 4748, 4749, 4752, 4752, 4582, 6339, 6230, 4730, 5190, 4752, 4752, 4752, 6892, 4707, 4707, 6327, 4735, 4714, 6320, 6322, 6322, 6322, 6324, 4707, 4707, 4707, 4710, 4735, 4793, 4788, 6324, 4709, 4765, 5096, 5096, 4748, 4752, 4752, 4752, 4758, 4721, 4752, 4752, 4752, 4777, 4792, 4788, 4709, 4752, 4561, 4752, 5750, 4735, 4735, 4794, 6324, 4752, 5743, 4752, 4752, 4752, 4757, 4752, 4707, 4709, 4735, 4735, 4735, 4735, 4711, 4791, 6322, 4792, 5276, 4722, 4752, 4563, 5399, 6420, 4752, 6238, 5201, 5242, 4735, 4735, 4785, 4752, 4563, 5663, 4752, 4563, 6254, 5386, 5386, 5386, 4752, 4752, 4752, 5746, 4752, 6321, 6322, 6322, 6322, 6323, 6320, 6322, 6322, 6323, 4707, 4707, 4707, 4735, 4752, 4752, 4584, 5193, 4735, 4735, 4713, 4752, 4563, 6913, 6240, 6240, 6240, 6929, 4735, 4735, 4714, 5739, 6322, 6322, 6322, 6325, 6322, 6324, 4707, 4710, 4740, 5096, 5097, 4707, 4709, 4735, 4752, 4698, 4752, 6653, 4709, 5467, 5467, 5467, 4752, 5513, 5517, 5483, 4804, 4818, 4798, 4802, 4844, 4844, 4844, 4808, 4815, 4812, 4828, 4832, 4842, 4844, 4844, 4844, 4844, 4845, 4838, 4926, 4844, 4852, 4850, 4913, 4853, 4857, 4861, 4865, 4835, 4869, 4872, 4879, 4876, 4881, 4883, 4887, 4889, 4891, 4893, 4900, 4900, 4897, 4907, 4910, 4923, 4846, 4916, 4919, 4930, 4933, 4935, 4939, 4903, 4943, 4752, 4752, 4752, 4948, 4715, 4752, 4752, 4752, 4977, 6877, 4954, 4752, 4752, 4752, 4978, 6115, 4759, 4759, 4752, 4752, 4753, 6060, 5603, 6128, 4975, 4752, 4714, 4752, 6620, 4752, 6554, 6723, 6126, 4984, 5424, 5283, 4988, 4992, 4993, 4993, 4993, 4997, 5000, 5002, 5006, 5009, 5013, 5017, 5017, 5019, 5023, 5024, 5028, 5030, 5034, 5038, 5037, 5042, 5046, 4752, 4752, 4760, 5740, 4752, 5065, 4752, 5423, 4752, 4725, 4724, 4723, 4565, 5750, 4752, 5657, 4752, 5671, 5072, 4752, 4743, 4752, 5390, 5082, 4752, 6010, 4752, 4751, 5572, 6253, 5505, 4752, 5971, 6389, 5056, 4752, 4752, 4752, 5074, 5535, 6350, 4752, 4752, 6930, 5401, 4752, 5494, 4752, 4752, 4752, 5125, 4752, 6136, 6009, 4752, 5110, 6936, 6567, 5134, 5141, 5150, 5143, 5152, 4752, 4752, 4754, 4752, 4752, 4752, 4755, 4752, 4752, 4752, 4752, 6233, 6232, 4752, 4752, 6347, 4752, 4752, 6356, 5137, 5161, 5250, 4752, 4752, 4752, 5060, 6584, 5222, 5223, 5186, 4752, 6234, 5190, 6523, 5174, 5165, 5171, 5181, 4752, 4752, 4752, 5190, 4752, 5143, 5180, 4752, 4752, 4756, 6223, 4752, 6358, 5781, 5171, 4752, 6600, 5055, 5251, 4752, 5745, 4752, 4752, 6357, 5166, 4752, 5700, 4752, 6585, 5199, 5167, 5205, 5153, 4752, 5211, 5207, 4752, 4752, 4757, 5714, 4752, 5698, 4752, 5191, 5136, 5142, 5151, 5221, 6420, 4752, 4752, 4757, 5946, 5568, 5167, 6098, 6009, 4752, 5973, 4752, 5175, 5166, 6097, 5153, 4752, 4752, 4583, 6238, 5201, 5241, 4752, 4752, 6357, 5780, 6547, 5167, 5243, 4752, 4752, 6357, 5781, 4960, 4752, 6600, 5250, 5242, 4752, 4752, 4752, 5291, 5782, 5243, 4752, 4752, 4752, 5293, 6836, 6078, 4752, 4752, 4752, 5346, 5256, 4752, 4752, 4752, 5355, 4752, 6927, 4752, 4752, 4752, 5377, 5972, 4752, 4752, 6928, 5301, 5305, 5306, 5306, 5307, 5306, 5306, 5311, 5314, 5316, 5318, 5320, 5320, 5320, 5320, 5321, 5325, 5325, 5325, 5327, 5325, 5325, 5331, 5331, 4752, 4752, 4761, 6855, 4752, 4752, 4960, 4752, 4752, 4752, 5217, 4752, 6405, 5353, 5571, 4752, 6913, 6240, 5376, 5259, 4752, 5068, 5397, 4752, 5067, 5385, 5396, 4752, 6696, 6700, 5406, 4752, 4752, 4752, 5471, 5263, 4752, 4752, 4752, 5531, 6256, 5416, 4752, 5572, 4752, 5665, 4752, 5365, 4752, 5664, 4752, 4752, 4961, 4961, 4961, 5670, 4752, 6018, 4752, 4752, 6375, 6009, 4752, 6535, 4752, 4752, 4752, 5581, 5083, 5429, 6534, 4752, 4752, 6428, 6383, 5341, 6009, 4752, 4752, 4752, 5187, 5417, 4752, 5573, 4753, 5358, 6639, 6644, 6017, 4752, 6260, 6601, 4752, 6413, 4752, 4752, 4968, 5118, 5439, 5444, 5449, 4752, 4752, 6578, 5109, 4752, 4752, 4753, 6958, 5445, 5153, 4752, 4752, 4752, 5387, 6259, 6593, 5458, 4752, 4752, 5050, 5054, 5721, 5336, 5342, 4752, 4752, 6591, 4752, 4752, 6698, 4752, 4752, 4752, 5434, 5465, 6603, 4752, 4752, 5080, 4752, 6569, 5473, 5477, 5445, 6429, 5475, 5869, 5481, 4752, 4752, 6717, 6721, 4752, 5720, 5335, 5491, 6602, 4752, 4752, 4752, 5747, 5525, 5477, 5500, 4752, 4752, 6740, 6908, 6569, 5524, 5476, 5499, 6429, 4752, 4752, 6712, 4752, 4752, 5084, 5430, 6860, 4752, 4752, 4752, 5748, 5187, 4752, 4752, 5223, 4752, 5745, 6422, 4752, 4752, 4752, 6219, 4752, 5571, 4752, 5665, 6571, 5548, 5869, 5516, 5812, 5477, 5871, 4752, 4752, 4752, 5750, 5720, 5335, 5504, 4752, 4752, 6868, 5157, 4752, 6861, 4752, 4752, 5111, 6426, 5386, 5748, 5510, 4752, 4752, 5870, 6429, 4752, 4752, 4752, 5746, 4752, 4752, 4752, 4760, 5529, 4752, 4752, 5560, 5567, 4752, 4752, 4757, 5546, 5554, 6429, 4752, 6713, 4752, 4752, 5191, 5176, 5559, 5113, 4752, 4752, 5192, 4752, 4752, 4752, 6727, 4752, 6319, 4752, 4752, 5228, 4752, 5568, 4752, 4752, 4752, 5811, 5225, 6277, 5386, 4752, 4752, 6874, 6878, 4752, 4752, 6206, 4752, 5720, 5814, 5569, 4752, 5687, 5691, 5225, 6255, 6934, 5689, 5570, 5570, 4752, 5944, 5690, 4752, 5689, 5570, 4752, 5688, 4752, 6238, 5563, 4752, 4753, 5522, 5548, 5687, 5577, 4752, 5687, 5577, 6238, 5401, 6651, 4752, 4753, 6054, 6070, 5386, 6364, 5586, 6009, 6256, 5600, 4752, 6419, 5378, 5602, 5607, 5620, 5611, 5619, 5614, 5615, 5615, 5615, 5615, 5624, 5631, 5628, 5635, 5637, 5637, 5637, 5642, 5638, 5646, 5646, 5646, 5646, 4752, 4752, 6449, 4752, 4752, 5247, 5251, 6259, 4778, 5412, 6009, 4752, 5705, 4752, 6945, 4752, 4752, 4752, 6239, 4752, 4752, 5678, 4752, 4752, 5650, 4752, 5656, 5652, 4752, 4756, 4752, 4752, 6103, 4752, 5661, 5669, 5675, 4752, 4757, 5847, 5927, 4752, 5685, 4752, 6232, 4752, 5377, 6310, 4752, 4752, 5695, 4752, 4752, 5289, 5389, 4752, 4752, 5957, 6439, 4752, 4752, 4752, 5845, 5211, 5251, 4752, 6437, 6441, 4752, 4752, 4752, 5860, 4581, 5709, 4752, 4752, 5227, 4752, 5718, 4752, 4752, 5356, 6055, 5761, 5726, 5732, 5738, 4752, 5759, 5763, 5728, 5734, 4752, 4752, 4752, 5980, 5762, 5727, 5733, 4752, 4758, 4752, 4752, 6124, 5052, 5056, 4779, 6862, 4752, 4752, 5380, 5228, 4752, 5767, 6936, 4752, 6937, 6934, 5378, 4752, 5228, 5704, 4752, 4752, 6947, 4752, 4752, 5356, 5549, 5774, 5786, 6683, 5251, 5787, 6684, 4752, 4752, 4752, 5990, 6258, 4778, 5412, 6009, 4752, 6557, 5986, 4752, 4775, 4752, 5744, 6946, 4752, 4752, 4752, 6094, 6233, 4752, 4752, 5791, 4752, 5805, 6900, 6682, 6686, 6686, 4752, 4752, 4752, 6117, 5774, 6902, 6684, 4752, 4950, 5088, 5102, 5411, 6870, 4752, 4752, 5380, 6635, 5768, 6937, 5802, 4744, 5810, 6902, 6685, 4752, 4959, 4752, 4752, 4702, 4752, 4752, 5809, 6901, 5818, 4752, 4752, 5421, 4954, 4752, 5798, 4780, 6870, 5972, 4752, 4752, 4752, 6241, 4752, 4752, 4752, 5188, 6000, 5824, 5251, 4752, 4752, 5842, 5822, 5828, 4752, 4752, 5453, 5153, 5281, 4752, 4752, 4752, 6238, 6233, 6238, 4752, 4752, 5971, 5570, 4752, 4752, 6241, 5972, 4752, 6241, 4752, 4752, 6238, 4752, 4752, 4752, 5230, 6239, 4752, 6241, 5973, 5838, 5237, 4752, 6254, 6635, 5226, 5851, 6443, 5858, 5866, 5875, 5879, 5884, 5886, 5880, 5890, 5893, 5896, 5899, 5901, 5903, 5907, 5907, 5913, 5907, 5907, 5909, 5920, 5921, 5917, 5917, 5919, 5917, 5917, 5918, 5917, 5931, 5265, 4752, 4752, 5460, 5360, 4757, 4752, 6931, 4752, 4752, 4752, 5461, 5361, 6613, 5542, 4752, 4752, 4752, 6896, 5776, 6882, 4752, 4752, 5742, 5936, 5195, 4752, 6225, 5942, 6564, 5950, 5953, 5961, 4752, 4961, 4752, 4752, 4752, 6000, 6367, 5966, 6419, 4752, 4752, 5487, 4752, 6294, 4752, 6293, 5985, 4752, 5990, 5994, 4752, 4752, 4752, 6298, 6367, 5927, 4752, 4752, 4752, 6243, 4759, 6930, 4752, 4752, 5741, 4752, 4752, 6938, 6005, 6421, 6050, 6014, 4752, 4752, 5505, 4752, 4752, 4752, 6437, 4752, 6209, 5755, 5755, 6022, 6026, 6110, 4752, 4962, 4961, 4752, 4752, 6111, 4752, 4752, 4752, 6317, 6031, 6026, 6110, 4752, 4966, 4752, 5225, 5398, 4752, 5400, 4752, 4752, 4752, 6254, 4752, 6366, 5926, 4752, 4752, 5561, 5225, 5266, 4752, 4752, 5224, 6352, 4752, 6628, 4752, 4972, 5386, 5066, 6048, 5970, 4752, 4752, 5573, 5398, 4752, 6208, 4752, 4752, 5596, 4752, 6059, 5779, 6064, 4752, 4977, 4821, 6882, 6069, 6065, 4752, 4752, 5699, 4752, 4752, 6001, 5925, 5251, 4752, 4752, 4752, 6247, 4752, 5739, 4752, 6353, 4752, 6629, 4752, 5973, 4752, 6569, 6074, 6089, 6569, 6084, 6088, 5251, 6082, 6086, 6090, 4752, 4979, 4579, 4752, 4752, 4752, 6422, 4752, 6423, 6722, 4752, 4752, 4752, 6321, 6322, 5389, 6627, 4752, 5971, 4980, 4580, 4752, 4752, 4752, 6320, 4757, 4752, 5740, 4752, 5075, 5968, 4752, 4977, 5523, 6665, 6354, 6627, 4752, 5972, 4752, 4752, 6036, 4753, 6937, 4752, 4752, 4752, 6418, 6252, 4752, 4752, 4752, 6423, 6860, 6869, 4752, 4752, 5720, 5813, 5555, 4752, 4752, 4752, 5809, 6354, 6627, 4752, 4753, 6937, 4978, 4581, 4752, 4752, 4752, 6429, 4752, 4979, 4581, 4752, 4752, 5722, 5337, 5263, 4752, 6861, 6870, 4752, 5287, 5297, 4758, 4752, 5742, 6353, 6860, 6869, 4758, 5740, 5390, 5998, 6234, 4752, 4752, 4752, 6102, 4752, 5386, 6234, 5505, 6935, 4755, 6239, 4752, 5971, 4752, 4752, 4752, 5386, 4754, 5720, 4581, 4752, 4752, 5741, 6936, 4752, 6863, 5739, 4752, 5076, 4752, 4752, 5720, 5335, 5341, 4752, 6869, 4752, 6313, 4752, 6311, 4752, 6608, 4752, 4752, 5745, 4752, 6259, 4752, 4618, 6121, 6232, 6230, 6230, 5741, 6935, 4752, 4752, 6201, 5189, 4752, 6134, 6132, 6140, 6144, 6151, 6145, 6145, 6150, 6146, 6155, 6159, 6163, 6167, 6169, 6174, 6176, 6169, 6169, 6170, 6186, 6187, 6180, 6180, 6185, 6180, 6180, 6181, 6191, 4752, 4752, 4752, 6545, 6229, 6841, 5573, 5061, 6250, 4752, 4752, 4752, 6569, 5524, 4752, 6247, 6251, 4752, 5107, 4752, 4752, 4753, 6719, 6266, 6265, 6267, 4752, 5110, 4752, 5111, 4752, 5113, 5111, 4752, 5956, 4752, 5192, 4752, 6621, 5747, 6333, 4752, 4752, 5797, 5191, 6271, 6276, 5252, 4961, 4752, 6281, 6287, 6251, 4752, 4752, 4752, 6570, 6286, 6291, 4752, 4752, 5751, 4752, 5833, 5832, 5831, 4752, 5110, 6077, 4752, 4752, 6362, 4752, 4752, 4770, 4752, 4752, 4752, 6717, 5589, 4752, 6202, 5190, 4752, 5110, 6929, 4752, 4752, 6307, 4752, 4752, 6934, 4752, 4752, 4752, 6934, 4759, 6304, 5573, 4961, 5831, 5831, 5831, 4752, 5112, 4752, 4752, 5742, 5580, 4769, 6009, 4752, 4752, 6387, 4752, 5126, 4752, 6331, 4961, 4753, 5534, 5538, 5542, 4752, 6282, 5536, 5540, 4752, 5112, 6427, 5932, 5582, 4771, 4752, 4752, 4752, 6546, 5782, 5243, 4752, 5579, 5536, 5540, 5862, 5538, 5542, 4752, 5114, 5993, 4752, 4961, 4752, 5797, 4768, 5153, 4752, 4752, 5804, 6899, 5787, 6318, 4752, 4752, 5957, 4752, 6213, 6334, 4752, 4752, 4752, 6731, 4752, 6234, 6343, 5539, 6009, 4752, 4752, 5769, 4752, 4752, 5938, 6343, 5539, 4752, 6425, 4961, 4752, 5193, 4752, 4752, 6231, 4752, 5377, 5401, 4752, 6254, 6318, 4752, 4752, 6255, 4752, 6425, 4752, 4752, 5409, 6311, 4961, 4752, 4752, 5823, 4752, 4752, 4752, 6240, 4752, 4752, 4752, 5103, 5454, 6009, 4752, 4752, 5844, 5146, 5452, 6377, 4752, 4752, 5846, 5145, 6860, 6009, 4752, 5190, 6375, 6009, 6422, 6424, 4752, 6868, 4752, 4752, 4752, 5388, 5380, 6254, 6362, 4752, 5124, 5122, 4752, 4752, 6322, 6322, 6322, 6322, 4707, 4707, 4707, 4707, 4708, 4735, 4735, 6381, 4752, 6009, 5377, 6389, 4752, 4752, 6885, 6009, 4752, 4752, 6868, 5377, 6253, 6887, 4752, 4752, 6887, 4752, 4752, 6886, 4752, 6403, 5971, 6255, 4752, 4752, 5853, 4752, 4752, 4752, 6936, 6255, 6886, 5971, 6255, 5191, 4752, 4752, 5752, 4752, 4756, 6589, 6886, 6401, 6885, 6885, 4752, 6886, 5377, 6885, 6394, 6394, 4703, 4703, 4703, 4752, 5185, 4752, 4752, 4757, 5110, 4960, 5744, 6398, 4752, 5187, 6451, 4752, 4752, 6409, 4752, 6411, 5750, 6215, 6417, 5744, 6435, 6217, 4752, 5189, 6447, 6457, 6461, 6462, 6466, 6486, 6469, 6484, 6472, 6478, 6475, 6480, 6498, 6492, 6490, 6496, 6496, 6500, 6506, 6506, 6507, 6504, 6506, 6506, 6506, 6511, 6514, 4752, 4752, 5854, 4752, 4752, 4752, 6619, 4824, 5749, 6417, 6518, 4752, 4752, 4752, 6756, 5187, 4752, 4752, 4752, 6834, 6431, 4752, 4752, 4752, 6836, 5834, 6009, 6522, 6527, 6869, 4752, 6430, 4752, 5188, 4752, 5223, 4752, 4752, 4752, 6253, 4752, 6540, 6551, 6561, 5402, 6575, 4752, 4752, 5945, 4752, 4752, 6755, 6009, 4752, 5188, 5194, 4752, 4752, 4752, 6252, 6255, 4752, 6756, 5962, 4752, 5222, 5392, 5390, 4752, 6849, 6848, 4752, 5231, 6032, 6027, 6850, 4752, 4752, 4752, 6854, 6619, 4824, 5749, 6582, 5518, 4752, 4752, 4752, 6861, 4753, 6634, 4752, 4752, 5945, 5691, 4752, 4752, 6589, 4752, 4753, 4752, 4757, 5561, 4752, 6597, 4752, 6607, 4752, 5235, 4752, 4752, 4752, 5225, 6612, 5541, 4752, 6617, 5229, 6351, 5401, 6625, 4752, 5753, 4752, 6633, 5359, 6640, 6645, 6009, 4944, 5540, 4752, 4752, 5955, 4752, 6649, 6238, 5686, 5686, 5144, 4752, 5744, 4752, 4752, 4752, 4753, 4980, 6619, 4824, 6272, 6654, 5754, 4753, 4752, 6311, 4752, 4752, 6312, 4752, 4752, 5355, 5359, 5550, 6658, 6009, 5357, 6678, 4944, 5541, 4752, 5571, 4752, 6597, 6597, 6597, 6597, 4752, 4752, 4752, 6928, 4752, 4752, 5110, 6426, 4752, 5746, 6423, 4752, 5266, 4752, 4564, 4752, 6662, 5550, 6671, 6670, 6009, 4752, 4752, 5977, 4752, 6664, 6669, 5153, 4752, 5270, 6423, 5505, 4823, 5748, 5401, 5189, 4752, 4752, 4752, 5739, 6322, 5752, 4753, 4752, 4752, 5741, 5390, 4752, 6675, 6690, 6429, 6694, 4752, 4752, 5193, 6234, 4824, 5750, 4752, 5369, 4752, 4955, 4752, 4752, 5385, 5753, 4756, 4752, 6239, 4752, 6240, 4752, 5349, 4758, 4752, 6705, 6429, 4752, 5372, 4758, 5592, 4752, 6705, 6429, 5572, 6238, 6913, 4752, 4752, 6009, 4752, 4752, 5712, 4752, 4752, 6010, 6536, 4714, 6709, 4752, 4752, 6016, 4752, 4756, 4752, 6240, 4752, 5379, 6255, 4752, 5388, 4752, 6257, 6419, 5074, 6720, 4752, 4752, 6042, 4752, 5749, 4752, 4752, 4752, 6929, 4752, 4752, 5971, 6717, 6429, 4752, 4752, 6042, 5417, 6914, 6241, 4752, 5747, 6233, 4752, 4752, 4752, 6926, 4752, 6729, 4752, 4752, 4752, 6933, 6727, 4563, 4752, 5747, 6741, 5389, 5192, 5222, 4752, 5986, 4561, 5748, 4752, 6936, 6934, 4562, 5749, 6934, 5853, 4563, 6935, 4752, 5387, 5748, 4752, 4752, 6735, 6371, 4563, 6936, 6934, 4752, 4752, 6739, 6680, 6421, 4744, 6300, 6231, 5091, 4752, 5389, 5748, 4752, 4752, 6701, 4581, 6039, 6745, 6748, 4620, 6733, 6752, 6760, 6768, 6762, 6764, 6771, 6775, 6779, 6782, 6784, 6788, 6790, 6794, 6797, 6801, 6804, 6809, 6808, 6813, 6815, 6819, 6817, 6823, 6827, 6830, 4752, 5391, 5223, 5222, 6421, 4752, 4752, 4759, 5112, 4760, 4752, 5113, 4752, 5428, 6533, 4752, 4752, 6388, 4752, 4752, 6393, 4752, 4752, 6428, 4752, 4752, 6428, 6260, 6840, 5381, 4752, 6845, 4584, 4752, 6043, 4752, 5495, 4752, 4752, 4753, 6197, 4769, 6859, 6044, 4752, 4752, 6195, 5582, 4752, 6739, 6907, 5191, 4752, 6867, 6915, 4752, 5506, 5505, 4752, 5973, 4752, 4563, 4752, 5386, 4752, 5533, 5537, 5541, 5389, 5388, 4752, 4752, 6232, 4752, 4752, 5747, 6741, 6355, 6235, 4752, 6543, 6238, 5400, 4752, 5188, 4752, 4752, 6891, 5777, 5700, 4752, 5562, 6253, 4752, 4752, 6912, 4752, 4752, 6932, 4752, 4752, 6935, 4752, 4753, 5435, 5440, 5445, 5388, 5388, 4752, 4752, 6242, 6042, 4752, 5739, 6934, 4752, 5571, 4752, 5398, 4752, 4751, 5401, 5401, 5399, 5793, 4753, 6898, 5778, 4563, 4752, 5388, 5749, 6601, 5747, 6906, 5192, 6236, 4752, 6897, 5777, 4563, 4752, 5130, 4752, 4752, 6338, 4752, 4752, 6231, 4752, 4752, 6920, 4752, 4752, 4752, 6261, 4752, 5775, 6919, 4752, 5386, 6258, 4781, 5595, 5193, 6237, 4752, 5571, 4752, 5399, 4760, 4752, 5740, 6935, 4752, 4752, 6107, 4752, 4752, 6924, 4752, 4752, 6281, 5535, 6896, 6942, 4752, 4752, 6311, 4752, 4752, 4752, 6530, 4759, 4752, 5740, 6935, 6951, 4752, 4752, 4752, 6311, 5770, 4977, 6959, 4752, 4752, 6312, 5113, 4752, 6957, 4752, 4752, 6313, 4752, 4752, 4752, 6453, 2, 4, 8, 262144, 0, 0, 0, 0x80000000, 1073741824, 0, 0, 1075838976, 2097152, 2097152, 268435456, 4194432, 4194560, 4196352, 270532608, 2097152, 4194304, 50331648, 0, 0, 0, 4194304, 0, 0, 541065216, 541065216, -2143289344, -2143289344, 4194304, 4194304, 4196352, -2143289344, 4194304, 4194432, 37748736, 541065216, -2143289344, 4194304, 4194304, 4194304, 4194304, 4194304, 4194304, 4198144, 4196352, 8540160, 4194304, 4194304, 4194304, 4196352, 276901888, 4194304, 4194304, 8425488, 4194304, 1, 0, 1024, 137363456, 66, 37748736, 742391808, 239075328, -1405091840, 775946240, 775946240, 775946240, 171966464, 742391808, 742391808, 742391808, 775946240, -1371537408, 775946240, 775946240, -1405091840, -1371537408, 775946240, 775946240, 775946240, 775946240, 4718592, -1371537408, 775946240, -1371537408, 775946240, -1371537408, 171966464, 775946240, 171966464, 171966464, 171966464, 171966464, 239075328, 171966464, 775946240, 239075328, 64, 4718592, 2097216, 4720640, 541589504, 4194368, 541589504, 4194400, 4194368, 541065280, 4194368, 4194368, -2143289280, 4194368, -2143285440, -2143285408, -2143285408, 776470528, -2143285408, -2109730976, -2143285408, -2143285408, -2143285408, -2109730976, -2143285408, 775946336, 775946304, 775946304, 776470528, 775946304, -1908404384, 775946304, -1908404384, 0, 2097152, 4194304, 128, 0, 256, 2048, 0, 0, 16777216, 16777216, 16777216, 16777216, 64, 64, 64, 64, 96, 96, 96, 64, 0, 0, 0, 24, 64, 0, 96, 96, 0, 0, 0, 288, 8388608, 0, 0, 8388608, 4096, 4096, 4096, 32, 96, 96, 96, 96, 262144, 96, 96, 1048576, 128, 0, 1048576, 0, 0, 2048, 2048, 2048, 2048, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 96, 96, 128, 128, 2048, 524288, 268435456, 536870912, 1073741824, 0, 0, 8388608, 4096, 0, 64, 0, 2048, 524288, 536870912, 0, 64, 524288, 64, 96, 64, 524288, 524288, 96, 96, 64, 524288, 96, 64, 80, 528, 524304, 1048592, 2097168, 268435472, 16, 16, 2, 536936448, 16, 262160, 16, 536936448, 16, 17, 17, 20, 16, 48, 16, 16, 20, 48, 64, 128, 1024, 134217728, 0, 0, 24, 560, 48, 2097680, 3145744, 1048592, 1048592, 2097168, 16, 1049104, 16, 16, 20, 560, 2097168, 2097168, 16, 16, 16, 16, 20, 16, 2097552, 3146256, 16, 16, 16, 28, 0, 2, 2098064, 17, 21, 16, 16, 163577856, 17, 528, 528, 16, 528, 2228784, -161430188, -161429680, -161430188, -161430188, -161430188, -161429680, -161430188, -161429676, -160905388, -161429676, -161430188, -161429676, -161429676, -161429676, -161429676, -161429675, -161349072, -161349072, -161429675, -161349072, -161349072, -161349072, -161349072, -161347728, -161347728, -161347728, -161347728, -161298576, -160299088, -161298576, -161298572, -161298572, -161298572, -161298572, -18860267, -160774284, -18729163, -160774288, -160299084, -161298572, -160774284, -161298572, -161298572, 16, 16, 28, 16, 16, 112, 21, 53, 146804757, 146812949, 0, 16, 0, 48, 3146256, 2097680, 1048592, 146862101, 146863389, -161429676, 146863389, 146863421, 146863389, 146863389, 146863389, 146863421, -161429740, -161429676, -160905388, -161298572, 0, 65536, 524288, 1048576, 33554432, 0, 159383552, 0, 0, 0, 1157627904, -1073741824, 0, 0, 0, 300, 142606336, 0, 8192, 0, 0, 0, 384, 0, 243269632, 0, 0, 0, 1862270976, 1, 32768, 131328, 131072, 16777216, 0, 0, 1, 2, 4, 128, 2097152, 0, 1073741825, 0x80000000, 0x80000000, 8, 16777216, 1073774592, 278528, 1226014816, 100665360, 100665360, 100665360, 100665360, 100665360, 100665360, -2046818288, 1091799136, -2044196848, 1091799136, 1091799136, 1091799136, 1091799136, 1091799136, 1091803360, 1091799136, 1091799136, 1158908000, 1158908001, 1192462432, 1192462448, 1192462448, 1192462448, 1192462448, 1200851056, 1091799393, 1200851056, 1200851056, 1192462448, 1870630720, 1870647104, 1870630720, 1870647104, 1870630720, 1870647104, 1870647104, 1870647104, 1870647104, 1870647104, 1870647120, 1870647124, 1870647124, 1870647124, 1870630736, 1870655316, 1870655316, 1870655316, 1870655317, 1870655348, 1870647120, 1870647120, 1870647120, 1879019376, 1879035760, 1870647124, 1879035760, 1879035764, 32768, 131072, 524288, 2097152, 8388608, 16777216, 134217728, 268435456, 1073741824, 0x80000000, 131328, 0, 0, 0, 832, 0, 164096, 0, 0, 0, 520, 4333568, 1048576, 1224736768, 0, 0, 1, 4, 0, 0, 235712, 0, 1090519040, 0, 0, 0, 999, 259072, 1191182336, 0, 0, 9437184, 0, 0, 1048576, 0, 128, 128, 128, 128, 2048, 2048, 231744, 0, 0, 0, 1007, 495424, 7864320, 1862270976, 0, 0, 0, 1024, 0, 0, 0, 63, 520000, 1862270976, 1862270976, 16252928, 0, 0, 16252928, 0, 0, 0, 1536, 0x80000000, 64, 98304, 1048576, 150994944, 0, 64, 256, 3584, 16384, 98304, 393216, 98304, 393216, 524288, 1048576, 2097152, 4194304, 0x80000000, 0, 0, 2097152, 4194304, 251658240, 536870912, 1073741824, 0, 0, 8192, 1073741824, 1073741824, 8388608, 2097152, 16777216, 134217728, 268435456, 2048, 65536, 262144, 524288, 1048576, 2097152, 1048576, 2097152, 4194304, 117440512, 64, 256, 1536, 16384, 65536, 117440512, 134217728, 536870912, 1073741824, 0, 0, 100663296, 0, 0, 0, 4096, 0, 0, 0, 64, 0, 0, 128, -2113929216, 64, 256, 1536, 65536, 262144, 524288, 4194304, 16777216, 100663296, 134217728, 536870912, 1073741824, 1048576, 2097152, 4194304, 16777216, 4194432, 3145728, 524288, 2097152, 134217728, 268435456, 65536, 1048576, 0, 0, 0, 2048, 0, 0, 134217728, 0, 0, 0, 15, 16, 524288, 2097152, 1073741824, 0x80000000, 0x80000000, 0, 1048576, 2097152, 67108864, 1073741824, 0, 0, 0, 0, 2097152, 1073741824, 0x80000000, 0, 0, 0, 768, 0, 2097152, 0x80000000, 0, -872415232, 0, -872415232, 67108864, 134217728, 1073741824, 0, 0x80000000, 0, 0, 0, 8192, 4096, 0, 0, 1536, 524288, 64, 64, 96, 64, 0, 524288, 0, 1073741824, 2621440, 1073741824, 9476, 512, 0, 32, 384, 8192, 0, 0, 1, 8, 512, 512, 9476, 134218240, 1050624, 262144, 512, 50331649, 1275208192, 4194312, 4194312, 4194312, 4194312, 541065224, 4194312, 4194312, 4194344, -869654016, 4203820, -869654016, -869654016, -869654016, -869654016, 1279402504, 1279402504, 1279402504, 1279402504, 2143549415, 2143549415, 2143549415, 2143549415, 2143549415, 2143549423, 2143549415, 2143549423, 2143549423, 2143549423, 2143549423, 16, 32, 256, 1024, 8192, 33554432, 8192, 33554432, 67108864, 134217728, 0, 0, 536870912, 9216, 0, 0, 1792, 0x80000000, 0, 1050624, 0, 0, 1, 14, 16, 32, 1024, 2048, 77824, 524288, 0, 512, 139264, 1275068416, 512, 2760704, -872415232, 0, 0, 1856, 0x80000000, 4203520, 0, 0, 0, 32768, 0, 0, 0, 58624, 520, 0, 0, 0, 131072, 0, 0, 0, 512, 0, 1048576, 0, 1275068416, 0, 0, 0, 65536, 0, 0, 0, 12561, 0, 1007, 1007, 0, 0, 2048, 524288, 0, 536870912, 0, 512, 0, 2048, 1048576, 0, 0, 40, 0, 2621440, 0, 0, 0x80000000, 999, 259072, 4194304, 25165824, 100663296, 402653184, 1, 102, 384, 512, 5120, 5120, 8192, 16384, 229376, 4194304, 4194304, 25165824, 33554432, 67108864, 402653184, 402653184, 536870912, 1073741824, 0, 0, 2048, 3145728, 16777216, 536870912, 110, 110, 0, 0, 1, 30, 32, 0, 40, 0, 524288, 64, 96, 1, 6, 96, 384, 512, 1024, 4096, 8192, 16384, 229376, 67108864, 402653184, 536870912, 0, 2, 16, 104, 0, 104, 104, 8192, 33554432, 134217728, 0, 0, 2048, 100663296, 0, 229376, 25165824, 33554432, 402653184, 536870912, 8192, 33554432, 0, 0, 0, 17408, 0, 524288, 2097152, 0, 0, 2048, 268435456, 536870912, 0, 0, 268435456, 49152, 2, 4, 32, 64, 256, 512, 1024, 8, 8, 0, 0, 1, 64, 128, 3584, 16384, 3145728, 16777216, 67108864, 134217728, 805306368, 1073741824, 0, 0, 4, 64, 256, 1024, 4096, 8192, 65536, 524288, 98304, 131072, 25165824, 268435456, 536870912, 0, 2, 4, 256, 1024, 0, 2048, 0, 98304, 131072, 16777216, 268435456, 0, 0, 0, 262144, 0, 0, 65536, 268435456, 0, 0, 1, 128, 512, 2048, 524288, 2048, 524288, 67108864, 536870912, 0, 262144, 0, 0, 2432, 0, 0, 4096, 8192, 0, 32, 4100, 67108864, 0, 32768, 0, 32768, 0, 0, 134348800, 134348800, 1049088, 1049088, 8192, 1049088, 12845065, 12845065, 12845065, 12845065, 270532608, 0, 1049088, 0, 134348800, 12845065, 12845065, 147193865, 5505537, 5591557, 5587465, 5587457, 5587457, 147202057, 5587457, 5587457, 5591557, 5587457, 13894153, 13894153, 13894153, 13894153, -1881791493, 13894153, 81003049, 13894153, 13894153, -1881791493, -1881791493, -1881791493, -1881791493, 0, 9, 0, 0, 1, 5505024, 142606336, 0, 0, 0, 278528, 0, 82432, 0, 0, 1, 16777216, 0, 0, 0, 139264, 0, 0, 0, 229440, 0, 5, 86528, 9, 4456448, 8388608, 0, 0, 8192, 8392704, 9, 8388608, 0, 0, 256, 1024, 65536, 16777216, 268435456, 0, 0, 41, 75497472, 0, 0, 16384, 262144, 0, 0, 0, 512, 1048576, 0, 0, 262144, 4194304, 8388608, 0, 0, 16384, 4194304, 0x80000000, 0, 0, 81920, 0, 0, 2, 4, 16, 32, 8192, 131072, 262144, 1048576, 4194304, 8388608, 4194304, 8388608, 16777216, 33554432, -1946157056, 0, -1946157056, 0, 0, 0, 524288, 0, 0, 0, 16, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 13, 0, 1, 2, 56, 64, 896, 8192, 131072, 0, 0, 33554432, 1024, 0, 4, 0, 8, 16, 32, 64, 128, 1024, 2048, 16384, 65536, 262144, 524288, 2097152, 384, 512, 8192, 131072, 1048576, 0, 16384, 65536, 0, 65536, 0, 0, 131072, 0, 32, 0, 32768, 134217728, 0, 0, 2, 8, 16, 0, 2, 8, 32, 64, 256, 1024, 98304, 131072, 1048576, 33554432, 134217728, 0x80000000, 8, 32, 384, 8192, 131072, 33554432, 131072, 33554432, 0x80000000, 0, 0, 24576, 0, 0, 0, 50331648, 0, 8396800, 4194304, 134217728, 2048, 134217728, 0, 0, 2, 16384, 32768, 1048576, 2097152, 0, 8396800, 0, 0, 4, 8, 0, 0, 16384, 0, 2, 4, 128, 3584, 16384, 16384, 16384, 16777216, 16384, 229376, 25165824, 33554432, 268435456, 536870912, 524288, 268567040, 16384, -2113929088, 2113544, 68423701, 68423701, 68423701, 68423701, 68489237, 68423701, 68423701, 68423701, 85200917, 68423701, 68489237, 72618005, 68423701, 68423701, -2079059883, 68423701, -2079059883, 68425749, 68423703, 69488664, 85200919, 69488664, 69488664, 69488664, 69488664, 70537244, 70537245, 70537245, 70537245, 70537245, 70537245, 70539293, -2022351809, -2076946339, 70537245, -2076946339, -2076946339, -2022351681, -2022351681, -2022351681, -2022351681, -2022351809, -2022351681, -2022351809, -2022351681, 32768, 65536, 4194304, 16777216, 0x80000000, 0, 0, 0, 8388608, 134217728, 1073741824, 131584, 268435456, 0, 0, 4, 128, 1048576, 67108864, 0, 0, 4, 256, 1024, 98304, 0, 0, 5242880, -2080374784, 268288, 0, 0, 4, 16777216, 0, 0, 23, 0, 0, 0, 867391, 24, 282624, 0, 0, 6, 0, 0, 0, 2097152, 0, 0, 0, 28, 3145728, 0, 0, 32768, 65536, 0, 284672, 0, 0, 0, 1048576, 0, 63, 128, 351232, 7340032, -2030043136, 0, 0, 131072, 268435456, 0, 0, 8, 32, 64, 16, 4096, 262144, 1048576, 1073741824, 0, 0, 0, -2046820352, 0, 20480, 0, 0, 8, 4194304, 0, 0, 15, 16, 32, 3072, 20480, 65536, 262144, 7340032, 50331648, 16, 32, 128, 3072, 20480, 0, 1, 4, 1048576, 4096, 1048576, 512, 0, 0, 0, 150528, 0, 0, 0, 5242880, 0, 7, 0, 14, 32, 1024, 2048, 12288, 1, 14, 32, 128, 1024, 7340032, 50331648, 0x80000000, 0, 0, 2048, 16384, 65536, 7340032, 50331648, 8, 32, 1024, 65536, 262144, 2097152, 1073741824, 0, 1, 6, 8, 32, 128, 1024, 65536, 2097152, 4194304, 50331648, 0x80000000, 0, 1, 2, 4, 2097152, 4194304, 67108864, 134217728, 536870912, 0, 32768, 4194304, 16777216, 0, 1, 2, 4, 50331648, 67108864, 0x80000000, 0, 0, 128, 50331648, 0, 0, 8, 33554432, 4096, 4194304, 268435456, 0, 0, 32768, 131072, 131072, 0, 32768, 32768, 268435968, 268435968, 1073743872, 268435968, 0, 128, 6144, 0, 229376, 128, 268435968, 16777220, 268436032, 256, 256, 256, 256, 257, 256, 256, 536871168, 256, 256, 256, 256, 384, -1879046336, -1879046334, 1073744256, -1879046334, -1879046326, -1879046334, -1879046334, -1879046326, -1879046326, -1845491902, -1878784182, 268444480, 268444480, 268444480, 268444480, 2100318145, 268436288, 268436288, 268436288, 268436288, 268436289, 268436288, 2100318149, 2100318149, 2100318149, 2100318149, 2100326337, 2100318149, 2100318149, 2100318145, 2100318149, 2100318145, 2100318149, 2100326341, 2100318149, 2100326341, 2100326341, 0, 1, 16, 32, 128, 512, 0, 4194304, 1, 1024, 0, 0, 229376, 0, 0, 12, 3145728, 0, 0, 576, 0, 0, 16, 8192, 0, 0, 16, 262144, 0, 384, 0, 0, 21, 266240, 1864, 0, 0, 0, 8388608, 0, 0, 0, 128, 0, 0, 0, 256, 0, 0, 0, 260, 512, 0, 1, 4036, 19939328, 2080374784, 0, 0, 0, 16777216, 0, 0, 0, 32, 0, 0, 0, 40, 67108864, 0, 19947520, 0, 0, 0, 19947520, 2304, 0, 8, 0, 512, 301989888, 0, 0, 262144, 16777216, 0, 1, 4, 64, 128, 64, 128, 3840, 16384, 19922944, 19922944, 2080374784, 0, 0, 29, 0, 0, 1536, 0x80000000, 0, 0, 32, 1, 8, 0, 33554432, 0, 0, 32768, 196608, 0, 0, 0, 33554432, 0, 0, 32768, 65536, 131072, 0, 0, 524288, 524288, 524288, 524288, 64, 64, 64, 32, 96, 8, 0, 33554432, 262144, 8192, 0, 0, 4194304, 1024, 0, 4096, 0, 1024, 2048, 16384, 3145728, 2048, 524288, 536870912, 1073741824, 8, 0, 0, 512, 131072, 0, 0, 64, 256, 1536, 2048, 33554432, 8192, 0, 0, 32, 64, 256, 32768, 65536, 16777216, 134217728, 536870912, 1073741824, 0, 3145728, 16777216, 536870912, 1073741824, 0, 0, 8192, 8192, 8192, 9216, 33554432, 0, 2097152, 16777216, 1073741824, 0, 0, 32768, 0, 16777216, 0, 16777216, 64, 0, 2, 0, 0, 32768, 16777216, 0, 0, 32, 512, 128, 131072, 0, 134218752, 0, 0, 44, 0, 66048, 0, 0, 0, 67108864, 0, 0, 0, 8192, 0, 8192, 0, 536870912, 0, 0, 0, 12289, 0, 268500992, 4243456, 0, 0, 59, 140224, 5505024, -1887436800, 0, 0, 2, 2, 4096, 4096, 0, 4096, 8192, 67108864, 0, 0, 1, 4032, 0, 4243456, 4096, 1048588, 12289, 1124073472, 1124073472, 1124073472, 1124073472, 1124073472, 1124073488, 1124073472, 1124073472, 1124073474, 1124073472, 1124073472, 1392574464, 1124073472, 12289, 1073754113, 12289, 12289, 1124073472, 12289, 12289, 1098920193, 1098920193, 1124073488, 1124073472, 1258292224, 1124073472, 1124073472, 1124073472, 1124085761, 1258304513, 1124085761, 1124085761, 1124085761, 1124085777, 1132474625, 1098920209, 1132474625, 1132474625, 1132474625, 1132474625, 1400975617, 2132360255, 2132622399, 2132622399, 2132360255, 2132360255, 2132360255, 2132360255, 2132622399, 2132360255, 2132360255, 2132360255, 2140749119, 2132360255, 2140749119, 2140749119, 0, 65536, 268435456, 49152, 184549376, 0, 0, 0, 83886080, 0, 0, 318767104, 0, 0, 32768, 100663296, 402653184, 1610612736, 0, 0, 0, 231488, 0, 12545, 25165824, 0, 0, 49152, 0, 0, 256, 1536, 65536, 0, 0, 58720256, 0, 0, 131072, 32768, 0, 0, 134217728, 0, 12305, 13313, 0, 0, 331776, 83886080, 117440512, 0, 0, 1, 6, 32, 64, 0, 78081, 327155712, 0, 0, 511808, 7864320, 512, 65536, 0, 0, 64, 65536, 1048576, 0, 0, 33554432, 1073741824, 0, 0, 110, 0, 0, 256, 8388608, 0, 0, 524288, 2097152, 0x80000000, 0, 0, 77824, 0, 0, 0, 268435456, 524288, 1048576, 16777216, 100663296, 134217728, 0, 339968, 0, 0, 128, 131072, 1024, 134217728, 0, 268435456, 0, 0, 128, 33554432, 0, 0, 1, 12288, 0, 0, 0, 134217728, 2048, 12288, 65536, 524288, 1048576, 1048576, 33554432, 67108864, 134217728, 805306368, 0, 327680, 0, 0, 256, 65536, 0, 0, 268435456, 1048576, 33554432, 134217728, 805306368, 1, 14, 16, 1024, 4096, 8192, 229376, 65536, 524288, 33554432, 134217728, 536870912, 1073741824, 0, 1, 14, 1024, 2048, 4096, 8192, 131072, 1048576, 8388608, 33554432, 134217728, 0x80000000, 0, 0, 4096, 65536, 524288, 134217728, 16384, 4194304, 0, 0, 999, 29619200, 2113929216, 0, 0, 0, 148480, 1, 12, 1024, 134217728, 0, 128, 134217728, 8, 0, 8, 8, 8, 0, 1, 4, 8, 134217728, 536870912, 0, 0, 1073741824, 32768, 0, 4, 8, 536870912, 0, 0, 1024, 1024, 0, 1024, 2048, 3145728, 0, 8, 32, 512, 4096, 8192, 0, 0, 68157440, 137363456, 0, 66, 66, 524288, 4100, 1024, 0, 0, 605247, 1058013184, 1073741824, 100680704, 25165824, 92274688, 25165824, 25165824, 92274688, 92274688, 25165952, 25165824, 25165824, 26214400, 92274688, 25165824, 92274688, 93323264, 92274688, 92274688, 92274688, 92274688, 92274720, 93323264, 25165890, 100721664, 25165890, 100721928, 100721928, 100787464, 100853000, 100721928, 100721928, 125977600, 125977600, 125977600, 125977600, 125846528, 125846528, 126895104, 125846528, 125846528, 125846528, 125846560, 125977600, 127026176, 125977600, 125977600, 127026176, 127026176, 281843, 1330419, 281843, 1330419, 281843, 281843, 1330419, 1330419, 281843, 281843, 5524723, 5524723, 5524723, 5524723, 93605107, 5524723, 39079155, 72633587, 72633587, 5524723, 92556531, 93605107, 93605107, 127290611, 97799411, 127290611, 131484915, 2097152, 134217728, 0, 0, 1024, 65536, 58368, 0, 0, 0, 301989888, 8, 124160, 189696, 0, 0, 605503, 1066401792, 0, 0, 3, 240, 19456, 262144, 0, 150528, 0, 0, 0, 536870912, 0, 1073741824, 0, 57344, 0, 0, 0, 1073741824, 0, 0, 0, 1, 2, 112, 128, 3072, 16384, 262144, 2048, 16384, 262144, 0, 0, 2097152, 16777216, 0, 0, 0, 1, 2, 48, 64, 0, 1, 2, 16, 32, 64, 384, 8192, 131072, 1048576, 32, 4096, 8192, 131072, 0, 0, 32768, 0, 256, 0, 256, 0, 65536, 1024, 2048, 262144, 0, 0, 32768, 256, 0, 0, 1024, 2097152, 0, 0, 0, 16384, 0, 0, 0, 4, 0, 0, 0, 5, 64, 128, 262144, 0, 0, 2097152, 268435456, 0, 0, 64, 128, 0, 0, 1536, 1792, 1, 2, 16, 64, 0, 0
+[ 1039, 1047, 1048, 1046, 1042, 1052, 1056, 1060, 1064, 1068, 1446, 1074, 2948, 2053, 1092, 1446, 2490, 1670, 1213, 1080, 1084, 1085, 1446, 1089, 1446, 1446, 2818, 1098, 1103, 1108, 1187, 1181, 1181, 1114, 1118, 1446, 1933, 1123, 1446, 1136, 1098, 1098, 1204, 1108, 1108, 1171, 1181, 1181, 1130, 1134, 1446, 1446, 1140, 1446, 1147, 1098, 1152, 1108, 1108, 1109, 1181, 1181, 1182, 1158, 1446, 1446, 1238, 1668, 1098, 1148, 1108, 1108, 1206, 1181, 1181, 1165, 1446, 3130, 2162, 1098, 1099, 1108, 1177, 1181, 1215, 1219, 2143, 1136, 1098, 1186, 1110, 1181, 1191, 3130, 2153, 1099, 1108, 1180, 1217, 2659, 2819, 1197, 1173, 1201, 1104, 1235, 1210, 1224, 1154, 1228, 1232, 1168, 1243, 1247, 1251, 1255, 1259, 1261, 1266, 1262, 1270, 1274, 1278, 1282, 1286, 1290, 1220, 1295, 1890, 1296, 1446, 1446, 1446, 1446, 1375, 2489, 1446, 1446, 1446, 2385, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1076, 1446, 1446, 1446, 1446, 2986, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1300, 1304, 1305, 1309, 1405, 1315, 1318, 1322, 1326, 1330, 1446, 1446, 1804, 1334, 2315, 1338, 2350, 1142, 1143, 1342, 1346, 1446, 1446, 2834, 1352, 1362, 1369, 1446, 1126, 1446, 2386, 1379, 1446, 1384, 1390, 1446, 2987, 2588, 1396, 2688, 1457, 1446, 1518, 1446, 1446, 2269, 1446, 1446, 1446, 1402, 1446, 1441, 1897, 1409, 1413, 1446, 1447, 1419, 1446, 1447, 1419, 1446, 1446, 1193, 1446, 2988, 3136, 2482, 1446, 2617, 1425, 1446, 1448, 1431, 1446, 1918, 1446, 2648, 1436, 1457, 1348, 1457, 1380, 1440, 1446, 1445, 3050, 1452, 1446, 1456, 1311, 1446, 1916, 2325, 1463, 2125, 1347, 1472, 2317, 1909, 1478, 3010, 2343, 2076, 2746, 2758, 1482, 2765, 2077, 1799, 1486, 2744, 1493, 1358, 1446, 1446, 2131, 1446, 2559, 1386, 1365, 1497, 1501, 1505, 1509, 1515, 2369, 1569, 2450, 1522, 2538, 1526, 1530, 1536, 2479, 2088, 1457, 1971, 1540, 1544, 1548, 1552, 1557, 1446, 2103, 1446, 1532, 1446, 2479, 2082, 1563, 1568, 2137, 1573, 1577, 3026, 1446, 1446, 2116, 1446, 1446, 3027, 1446, 1586, 1938, 1584, 2123, 1647, 1590, 1432, 1594, 1446, 2517, 1600, 1446, 2517, 1600, 1446, 2872, 1606, 1612, 1616, 1620, 1626, 1446, 1239, 1633, 1446, 1596, 1640, 3118, 2782, 1645, 1651, 1863, 1446, 1863, 1446, 1602, 1446, 2675, 2173, 1655, 2685, 1559, 1866, 2685, 3124, 1659, 1665, 2904, 2903, 3055, 2673, 1674, 1678, 3047, 2266, 2239, 1682, 1686, 1690, 1694, 1698, 2892, 1702, 1715, 1719, 1723, 1727, 1731, 1446, 2332, 1773, 1737, 1744, 1748, 1751, 1755, 1758, 1446, 1772, 2979, 1777, 1781, 2506, 1788, 1792, 1635, 1636, 1446, 2668, 2874, 1796, 1808, 2784, 1815, 1819, 1823, 2304, 1828, 1446, 2430, 1446, 1446, 2334, 1853, 2583, 1834, 1843, 1446, 2069, 1446, 1446, 1954, 1446, 1446, 2070, 1446, 1446, 1622, 1608, 1847, 1851, 1857, 1641, 1871, 1446, 2225, 1956, 1446, 2225, 1956, 1446, 2374, 1885, 1876, 1811, 1446, 1883, 1446, 1947, 1889, 1446, 1511, 1446, 1291, 2287, 1894, 1901, 1906, 1446, 1906, 1446, 1913, 1446, 1740, 1922, 1446, 1932, 1733, 1446, 1932, 1830, 1094, 1732, 1446, 1937, 2066, 2439, 2671, 1945, 1942, 2455, 1489, 2323, 1951, 1709, 1711, 1629, 1161, 1962, 1968, 1977, 1980, 1984, 1446, 1119, 1994, 1999, 2003, 2007, 2011, 2015, 2019, 2023, 1986, 1872, 2093, 1928, 2028, 2032, 2036, 1802, 2040, 1446, 1446, 2044, 1580, 2050, 2059, 2063, 2074, 2046, 1446, 2024, 2081, 1446, 2086, 1446, 1446, 1988, 2092, 2097, 2109, 2113, 1446, 2120, 1446, 1446, 2129, 1446, 1558, 2135, 1446, 1446, 2141, 2535, 2866, 2147, 1446, 1990, 1446, 1446, 3096, 1446, 1446, 3096, 1446, 1446, 1466, 2151, 2157, 2204, 1458, 2161, 1446, 2914, 1446, 1446, 1764, 1446, 3053, 2166, 2170, 1446, 2182, 1446, 2187, 1446, 2916, 1957, 2192, 2202, 2305, 1446, 2210, 2496, 1824, 3112, 2217, 1761, 1459, 1558, 2224, 2229, 2841, 2969, 2682, 2815, 2233, 2248, 2236, 2243, 1837, 1839, 2247, 2252, 2100, 1446, 1446, 1446, 1446, 2918, 1766, 2256, 2260, 2273, 2277, 2281, 2284, 1446, 2889, 1902, 2985, 2524, 2433, 2299, 2576, 2212, 2213, 2303, 1415, 1457, 2309, 1958, 2321, 2329, 1446, 2976, 1446, 1398, 1446, 1553, 2338, 2342, 2751, 1446, 2347, 2503, 2354, 2358, 1558, 2363, 1446, 1995, 2368, 1446, 1421, 2364, 2373, 2733, 2378, 2383, 2390, 3044, 1446, 2715, 1446, 1446, 1860, 1446, 1446, 1860, 2719, 2733, 2397, 2176, 2401, 1946, 2461, 1446, 1446, 2405, 1446, 1473, 2717, 2413, 2417, 2427, 2437, 3061, 1446, 2105, 1446, 1973, 2407, 2443, 2447, 2454, 2459, 2379, 1446, 2465, 2472, 2476, 2486, 2511, 2494, 2701, 2409, 2500, 2510, 2516, 2521, 2528, 2220, 2532, 2542, 2546, 2198, 2312, 2550, 2554, 2563, 2567, 2571, 2575, 1446, 2580, 2592, 2596, 2600, 2604, 2608, 2612, 2616, 1446, 2621, 2393, 1372, 2628, 2632, 2636, 2640, 2652, 3103, 1446, 2708, 2468, 2656, 2665, 2679, 2692, 1558, 2699, 1446, 2705, 1446, 2998, 2712, 1446, 2723, 2624, 1768, 1879, 3159, 1446, 2205, 2727, 1446, 1468, 2732, 1446, 2206, 2982, 1446, 3004, 2737, 2741, 3109, 2750, 1446, 2755, 1446, 1446, 2762, 1446, 1446, 2762, 2769, 3037, 2775, 2420, 2779, 1446, 2788, 1446, 1446, 2795, 1446, 1427, 2801, 3020, 2805, 2646, 1446, 2812, 1446, 2809, 1446, 3067, 2853, 2823, 2643, 2183, 2827, 2863, 2512, 2832, 2838, 1707, 1070, 2359, 2845, 2851, 2857, 1964, 1474, 3084, 2557, 2878, 2955, 3090, 2882, 2293, 2295, 2886, 2896, 2900, 2908, 2912, 1446, 1446, 1446, 2922, 2926, 2930, 2934, 2938, 2942, 2946, 1446, 2055, 2952, 1355, 2791, 2178, 2959, 1867, 2963, 1784, 2967, 1446, 2973, 2423, 2992, 2996, 3002, 1446, 2728, 1446, 1446, 3008, 1446, 3014, 3018, 1446, 3024, 2188, 3031, 3147, 1446, 1446, 2694, 1446, 1446, 2847, 1446, 1446, 2695, 3035, 1446, 3041, 3078, 3141, 3059, 1446, 1446, 3065, 1446, 1446, 3065, 1446, 1446, 3071, 1446, 3075, 1925, 3153, 1446, 1446, 3082, 1446, 1564, 3088, 1446, 1661, 3094, 3100, 2195, 3116, 1446, 3122, 1446, 3128, 1446, 3134, 1705, 3140, 2586, 2797, 1446, 3145, 2771, 1392, 3151, 1446, 3157, 2290, 2828, 2661, 2869, 2422, 3106, 2860, 2263, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1473, 3163, 3166, 3170, 3182, 3186, 3182, 3189, 3181, 3182, 3182, 3182, 3182, 3177, 3173, 3193, 3182, 3197, 3201, 3204, 3210, 3214, 3216, 3206, 3220, 3224, 3228, 3232, 3235, 3239, 3243, 3729, 3929, 3929, 3246, 3929, 3929, 5383, 3929, 3929, 3300, 3929, 3261, 3562, 3273, 4078, 3734, 3929, 3929, 3929, 3277, 3287, 3294, 4847, 3929, 3250, 3929, 3929, 3344, 3929, 4873, 4873, 4873, 4873, 3266, 4873, 4873, 3564, 3564, 3567, 3564, 3564, 3564, 3564, 3267, 3256, 3305, 3562, 3568, 3335, 4081, 3929, 3929, 3929, 3323, 4919, 3377, 4693, 3929, 3252, 3722, 3750, 3365, 3315, 3269, 3334, 4080, 3732, 3929, 3929, 3559, 4873, 5799, 4692, 3929, 3929, 3688, 3929, 3929, 3560, 4873, 4873, 4873, 4195, 4873, 4873, 4873, 4874, 3564, 3267, 3264, 3331, 3339, 3929, 3342, 3929, 3738, 3256, 3367, 3317, 3321, 3560, 4873, 3564, 3309, 3256, 3256, 3365, 3371, 3564, 3564, 3564, 3567, 3256, 3256, 3256, 3256, 3327, 4195, 3564, 3564, 3564, 3310, 3365, 3359, 3929, 3929, 3813, 3929, 3564, 3564, 3564, 3364, 3929, 5741, 3559, 4873, 4194, 3564, 3564, 3268, 3256, 4193, 4873, 3266, 3564, 3310, 3256, 3256, 3256, 3366, 3348, 3929, 3929, 3929, 3505, 3383, 3256, 3373, 3766, 3256, 3384, 3929, 4872, 4874, 3564, 3268, 3256, 3257, 3373, 4694, 3929, 3929, 3929, 3355, 3566, 3256, 3321, 4194, 3565, 3311, 3560, 3563, 3384, 3561, 3319, 3360, 3388, 3390, 4109, 3394, 3401, 3405, 3429, 3429, 3429, 3429, 3424, 3430, 3412, 3416, 3420, 3428, 3434, 3438, 3442, 3397, 3446, 3450, 3453, 3457, 3460, 3463, 3465, 3469, 3473, 3408, 3477, 3481, 3485, 3696, 3498, 4473, 3929, 3929, 3929, 3512, 3511, 3929, 3929, 3929, 3517, 4964, 4966, 3929, 3523, 3527, 3929, 3929, 3929, 3752, 3534, 3543, 3929, 3929, 3850, 3854, 3578, 3582, 3586, 3589, 3590, 3594, 3597, 3601, 3604, 3608, 3611, 3614, 3618, 3622, 3626, 4965, 3648, 3636, 5178, 3647, 5820, 3654, 4257, 3659, 3929, 3669, 4219, 3694, 3703, 3929, 5714, 3525, 3929, 3929, 3929, 3770, 3790, 3929, 5539, 3707, 3929, 3342, 5695, 3904, 3929, 3289, 3290, 3906, 3929, 4658, 4464, 5227, 4306, 3936, 3718, 3726, 3743, 3929, 3375, 3631, 3929, 3548, 5050, 5064, 3749, 3929, 3929, 3929, 3836, 3758, 3298, 3929, 3929, 3915, 3927, 4893, 3528, 3929, 3929, 3921, 4548, 5744, 4281, 3929, 3929, 3932, 5019, 3929, 5587, 5178, 3929, 3553, 3557, 3572, 5826, 3929, 3929, 4530, 3789, 3794, 3929, 3929, 3972, 4899, 3798, 3806, 3929, 3929, 3972, 5040, 3817, 3826, 3929, 3929, 3972, 5490, 3785, 3929, 3929, 3929, 3869, 4728, 4203, 3770, 3790, 4142, 3929, 3929, 3929, 3894, 4001, 3929, 3929, 3929, 3929, 3252, 3798, 4127, 4203, 3850, 3854, 4139, 3744, 3929, 3929, 3929, 3844, 5313, 5832, 4137, 4141, 3929, 3650, 3929, 3929, 4854, 4858, 4140, 3929, 3929, 3929, 3930, 5557, 3873, 3929, 3929, 3883, 3929, 5107, 3929, 5107, 4780, 3929, 4781, 5020, 3929, 3929, 3738, 5109, 3929, 3290, 3904, 3940, 3947, 3946, 3942, 3951, 3955, 3956, 3956, 3960, 3962, 3963, 3962, 3967, 3971, 3929, 3929, 4017, 4021, 4708, 3978, 3988, 3929, 3683, 3781, 3802, 3995, 4392, 3929, 5597, 5363, 3530, 3929, 4135, 4005, 4013, 3929, 3929, 4065, 4070, 4026, 3929, 3929, 4026, 3375, 3929, 3929, 4049, 4056, 4576, 3997, 5403, 5596, 3929, 3856, 4795, 3529, 3929, 3929, 3929, 3931, 4061, 3929, 3929, 3929, 3972, 4199, 3911, 3929, 3929, 3929, 3974, 5170, 3929, 3929, 4704, 3929, 4075, 5320, 4248, 5165, 3855, 4657, 4085, 3929, 3690, 4699, 5178, 3978, 3251, 3929, 3929, 4101, 3929, 5319, 4247, 5772, 5010, 4113, 3981, 3929, 3929, 4164, 4148, 4148, 4120, 3929, 3929, 4165, 4115, 4709, 4132, 3929, 3929, 4247, 4459, 5170, 3929, 3929, 4706, 3879, 4572, 4576, 5321, 4249, 4655, 3929, 3929, 4274, 3929, 3972, 4146, 4150, 3929, 3735, 3929, 3735, 4154, 4158, 3929, 3929, 4396, 3929, 3929, 3982, 3929, 3929, 3929, 4029, 4107, 3929, 4706, 3929, 4366, 4574, 4181, 5320, 5850, 4644, 4180, 5319, 4886, 4217, 4208, 4673, 3929, 3929, 4424, 5855, 3279, 5321, 4215, 3929, 3766, 4873, 4873, 3563, 3564, 4228, 3929, 4451, 4182, 4233, 4305, 4240, 4273, 4435, 4246, 4434, 4245, 4708, 4241, 3929, 3699, 4502, 3698, 4255, 5609, 4272, 5609, 4272, 3699, 5199, 5610, 4273, 4253, 3281, 4246, 4270, 3929, 3809, 3929, 4549, 3737, 3929, 3896, 3929, 5021, 3770, 4271, 3771, 4182, 5163, 5161, 3929, 3283, 5762, 3710, 4279, 4279, 4211, 4127, 4128, 4405, 3712, 4286, 3929, 3929, 3929, 4052, 3929, 5548, 3754, 4301, 3929, 3842, 3574, 4534, 4651, 5125, 3745, 4537, 4310, 4314, 4318, 4319, 4323, 4327, 4333, 4334, 4331, 4338, 4339, 4339, 4340, 3929, 3844, 4827, 3929, 3846, 3929, 3929, 4905, 3929, 3376, 5780, 4202, 3929, 3929, 3929, 4235, 4524, 5352, 5187, 4364, 4473, 3342, 4273, 3929, 3888, 5737, 4840, 4356, 4374, 4378, 4842, 5051, 4864, 3929, 4387, 4491, 3929, 4413, 3929, 3892, 5107, 3929, 3665, 3929, 3929, 4681, 3640, 4265, 4472, 3929, 4802, 3929, 4518, 3670, 4266, 4421, 3929, 4204, 4203, 3929, 4718, 4428, 4432, 3929, 3929, 3929, 4451, 4440, 4445, 3929, 3929, 4450, 4541, 4470, 3929, 3343, 3929, 3897, 3929, 4294, 3929, 4296, 3929, 5616, 3929, 5461, 4463, 3929, 5347, 4362, 5468, 4800, 3929, 3929, 4457, 4461, 5243, 3929, 4484, 3929, 3931, 5074, 3929, 3972, 4166, 4116, 3929, 3929, 3929, 4035, 4737, 3929, 3929, 3929, 4505, 3929, 5347, 4495, 3929, 3972, 5410, 5415, 4015, 4019, 3929, 3929, 4457, 4490, 4499, 3929, 3929, 3929, 4624, 5347, 3929, 4801, 3929, 3997, 3929, 5743, 4160, 3929, 3929, 3929, 4628, 3929, 5704, 4529, 3929, 3998, 5353, 5435, 3929, 5703, 4528, 3929, 4000, 3929, 3929, 3999, 3528, 4505, 5352, 4800, 3929, 4007, 4653, 3929, 4009, 3929, 4642, 5697, 3929, 3929, 3929, 4695, 4052, 3929, 3929, 3929, 4708, 4545, 3929, 3929, 3301, 4450, 3929, 3929, 3929, 4734, 3929, 5303, 3342, 3929, 4030, 4480, 3929, 3929, 3929, 4516, 4994, 3894, 3929, 3895, 3929, 3929, 3351, 3892, 3737, 3735, 3929, 4039, 3929, 3929, 4086, 5090, 3895, 5020, 3895, 3737, 5022, 3736, 3737, 4554, 4556, 3929, 3929, 4638, 4794, 3929, 3929, 4668, 4806, 4689, 3929, 3929, 3929, 4752, 4504, 3929, 3929, 5097, 4566, 4022, 5334, 4383, 5691, 4570, 4582, 4586, 4590, 4594, 4598, 4602, 4605, 4608, 4612, 4614, 4618, 4634, 4632, 4634, 4621, 3929, 3929, 3929, 4757, 4725, 4816, 3929, 4648, 4662, 4666, 5081, 4672, 3929, 5344, 4398, 4352, 4678, 3929, 3929, 4678, 4687, 5178, 3929, 3929, 4745, 4749, 4210, 3929, 4965, 4768, 5739, 3929, 3929, 3322, 5689, 3899, 5181, 4703, 5110, 5214, 4713, 4722, 3929, 4051, 3558, 3929, 4028, 4478, 4500, 3929, 5400, 4741, 3929, 3929, 4780, 3929, 4780, 4762, 3929, 3929, 3929, 4821, 4756, 4761, 3929, 3929, 4818, 4822, 4505, 3863, 3867, 3929, 3341, 3341, 3929, 4766, 4294, 3929, 3899, 3929, 4066, 3929, 3929, 4087, 5091, 3767, 5433, 4817, 4683, 4716, 3929, 5809, 3929, 4091, 4095, 3751, 3972, 4773, 4777, 3929, 4107, 3929, 3929, 4137, 4141, 4786, 4775, 3929, 3929, 4820, 3910, 4788, 4777, 3929, 3929, 4828, 3972, 3322, 4792, 3929, 3929, 4847, 3929, 5432, 4816, 4833, 4799, 3929, 5147, 3929, 3929, 4872, 4873, 4966, 4295, 4304, 4814, 4826, 3929, 3929, 3929, 4871, 4674, 3929, 4708, 3897, 5180, 5433, 4832, 3929, 4159, 3929, 3377, 3299, 3929, 4503, 4708, 3929, 4837, 3929, 3929, 3929, 4913, 5207, 3929, 3929, 3929, 4965, 3929, 5148, 3929, 4008, 3929, 4408, 3929, 4172, 3929, 4172, 3900, 5432, 3628, 3929, 3929, 3929, 4856, 4860, 3844, 5313, 3929, 3929, 4982, 3929, 5086, 3768, 5434, 3630, 3929, 4174, 3929, 4562, 5312, 3929, 3929, 3929, 5003, 4502, 5148, 4878, 4885, 4293, 3929, 3929, 4296, 3929, 4296, 3929, 4229, 5198, 5520, 3928, 3929, 3928, 3897, 4293, 3929, 3898, 3929, 5228, 3899, 3898, 3929, 4296, 3929, 5547, 3519, 4911, 3929, 5584, 4917, 3769, 3929, 3929, 3929, 4240, 4273, 3929, 3779, 3800, 3744, 4923, 4927, 4934, 4935, 4930, 4939, 4943, 4949, 4953, 4945, 4957, 4957, 4958, 4962, 3929, 4247, 4511, 3929, 3972, 5871, 3929, 3983, 3929, 5572, 5591, 3929, 4731, 4359, 5861, 5581, 4990, 3929, 3929, 3929, 5111, 4846, 5503, 4707, 5051, 3929, 4263, 4465, 3929, 4282, 3929, 3929, 3860, 3929, 5742, 3929, 3929, 3737, 3929, 3894, 5322, 3929, 5000, 5007, 3507, 3929, 4290, 3929, 3929, 4449, 3929, 5018, 3929, 3929, 3642, 5026, 3929, 3929, 3929, 5177, 4628, 3929, 3300, 3929, 4346, 3674, 3681, 3547, 3929, 3539, 5030, 5034, 3929, 3929, 3929, 5337, 5040, 3822, 3929, 3929, 3641, 5042, 3929, 3929, 3929, 5368, 3643, 3929, 3929, 3929, 5405, 5793, 3929, 3929, 3929, 5453, 4626, 3377, 5052, 3929, 3929, 3929, 3721, 4501, 4368, 3929, 3546, 3490, 5496, 5308, 5793, 3929, 3929, 5485, 4370, 3929, 3929, 5068, 3972, 5073, 4863, 3929, 3513, 4450, 5122, 3375, 5406, 3842, 3929, 3655, 5793, 3929, 3739, 4707, 5781, 3929, 3990, 3929, 3929, 4006, 3299, 4452, 4369, 3929, 4439, 4444, 3929, 3895, 4547, 3886, 3929, 5078, 3929, 3929, 5048, 5304, 3929, 5095, 3929, 5486, 5051, 4451, 4368, 3929, 4474, 4050, 4057, 4293, 4450, 3929, 3929, 5228, 3929, 5453, 3929, 3929, 5072, 4862, 3929, 5101, 3929, 3512, 5742, 3929, 5241, 5105, 4986, 3751, 5323, 3296, 4502, 4381, 3929, 4486, 4034, 3929, 3684, 3783, 3744, 5062, 3929, 3929, 4209, 3929, 3929, 3929, 3560, 3929, 5118, 3929, 3929, 5111, 4852, 4515, 4382, 5129, 3929, 4502, 4176, 3929, 4350, 5314, 3549, 3929, 5797, 3929, 3929, 3929, 5526, 5795, 3929, 3929, 3929, 5603, 5136, 5144, 5227, 4451, 4236, 3929, 4975, 3676, 5063, 4465, 3744, 4042, 4464, 5152, 3929, 4507, 3865, 3929, 4121, 5622, 4297, 4174, 3342, 5169, 3342, 5169, 4514, 3537, 4561, 4558, 3929, 4559, 4453, 3929, 5213, 4466, 3929, 4520, 3929, 3929, 5170, 4045, 5196, 5187, 5174, 4560, 5185, 4558, 5193, 5203, 5211, 5218, 5221, 5222, 5226, 3929, 3929, 3929, 5725, 3929, 5232, 4690, 3929, 4524, 5352, 3677, 3929, 3929, 3929, 5771, 3929, 5740, 3929, 4274, 4848, 5238, 5247, 5773, 5254, 5251, 4704, 3918, 5260, 5266, 5262, 5268, 5272, 5276, 5280, 5284, 5287, 5291, 5294, 5293, 5298, 5302, 3929, 3929, 3929, 5742, 5425, 3929, 4694, 5050, 3546, 3490, 3494, 3929, 5318, 3929, 5327, 3923, 4464, 4390, 5227, 3929, 5816, 5331, 5341, 3929, 5782, 3744, 3929, 4547, 3770, 3929, 4547, 3929, 3736, 5322, 3929, 5189, 3929, 3929, 5189, 5361, 5367, 3374, 3929, 4693, 3929, 3929, 3829, 3929, 5372, 3929, 5411, 3929, 4704, 4292, 3929, 3892, 3929, 3929, 4517, 5713, 4819, 4170, 3929, 5416, 3991, 3929, 4708, 4852, 3929, 4186, 4190, 3929, 3765, 3775, 3800, 5841, 5084, 3929, 3929, 5111, 5157, 3753, 5377, 5381, 3929, 3929, 5117, 3929, 3929, 5388, 3821, 3929, 4708, 5234, 4550, 3929, 5393, 5392, 3929, 4751, 5041, 3744, 3929, 3929, 5048, 5036, 3929, 5373, 5397, 4693, 3501, 3929, 3929, 3929, 5766, 4862, 3929, 3929, 3929, 5789, 5048, 4769, 3378, 3492, 5429, 4705, 5779, 3929, 4781, 4779, 3929, 4505, 5110, 3876, 3929, 3929, 3929, 5791, 3972, 5439, 3839, 3929, 4815, 3929, 4778, 5514, 5443, 3839, 3929, 4815, 3929, 5108, 5841, 5843, 3929, 3929, 5139, 3929, 5050, 5457, 3492, 4485, 5465, 3770, 3878, 3929, 4821, 3929, 3929, 4417, 3929, 3929, 5472, 5477, 3929, 4881, 3929, 5701, 5473, 5482, 3929, 3929, 5140, 3929, 5478, 3929, 5420, 3877, 3546, 5494, 3714, 3632, 3929, 5514, 5508, 3929, 4907, 5500, 3929, 4890, 4880, 3929, 4193, 4873, 4873, 4195, 5742, 3379, 5773, 3631, 5525, 3929, 3929, 3929, 5870, 5524, 3760, 3896, 3929, 5819, 4519, 5513, 3488, 5530, 5351, 3929, 4708, 4846, 4159, 3929, 3929, 3929, 5155, 5159, 5336, 5518, 3761, 3929, 3929, 5512, 5536, 4519, 4522, 3989, 3929, 3929, 3929, 4913, 5518, 3929, 4964, 4293, 5179, 5352, 3929, 3929, 4125, 3929, 3929, 4247, 4402, 4086, 3353, 3929, 5556, 5570, 3929, 5570, 5578, 3983, 3929, 5573, 3929, 4971, 3751, 3929, 4253, 3929, 4261, 5594, 4522, 3929, 5601, 3984, 3929, 5574, 3929, 4978, 4224, 3929, 3929, 5608, 5571, 5607, 5351, 5349, 3929, 3929, 3929, 5206, 4827, 3929, 3929, 4897, 4901, 5733, 5834, 3662, 4782, 5757, 3879, 5132, 5614, 5467, 5620, 5626, 5630, 5634, 5638, 5642, 5646, 5650, 5654, 5658, 5662, 5666, 5670, 5673, 5677, 5681, 5685, 3929, 3929, 5256, 4275, 5756, 3929, 3972, 3929, 4996, 3929, 5561, 5708, 5718, 3929, 5722, 5729, 3929, 3888, 3998, 5749, 3929, 3929, 3929, 5311, 3929, 5731, 5753, 5459, 3929, 5014, 4985, 3929, 4344, 4461, 3929, 3875, 5420, 3929, 3878, 3929, 3929, 3929, 3736, 4071, 4506, 3929, 3766, 4521, 4967, 3929, 3929, 3929, 5387, 3820, 5761, 4485, 3929, 3929, 5424, 4691, 5113, 3998, 3929, 3929, 5435, 3873, 3929, 5112, 5770, 4234, 5849, 3929, 3929, 3929, 5447, 3929, 5732, 5805, 3929, 3972, 4093, 4097, 3929, 3905, 3929, 4408, 3670, 5786, 3929, 3929, 3929, 5447, 4693, 4517, 5803, 5807, 3929, 5046, 5056, 3929, 4434, 4245, 3929, 3770, 5321, 3929, 3649, 3929, 3929, 4977, 4223, 3929, 5830, 3929, 3929, 5450, 5042, 4423, 5838, 3929, 3929, 5507, 4159, 4423, 5838, 4248, 5847, 4578, 5805, 3929, 4548, 3929, 3929, 5813, 4423, 5854, 3929, 3929, 5552, 5542, 5859, 3929, 3929, 3929, 5564, 3929, 5786, 4235, 3929, 3929, 5566, 4810, 4103, 5807, 3990, 3929, 5059, 5357, 3929, 4549, 3929, 3929, 4549, 5416, 3929, 4674, 3929, 4868, 5532, 3929, 3929, 3929, 5710, 3929, 3831, 3998, 3929, 3929, 5712, 4818, 3973, 5866, 3929, 3929, 5739, 3929, 3972, 5865, 3929, 3929, 5745, 3929, 4964, 3929, 5180, 4523, 5824, 3832, 3929, 3929, 3929, 5777, 5545, 4965, 3929, 4409, 3929, 3675, 3738, 3973, 3547, 3929, 3929, 5841, 3929, 6277, 6502, 5875, 6282, 5878, 6547, 6266, 5881, 6546, 5889, 6232, 5882, 6232, 5892, 6221, 6267, 5888, 5883, 5884, 6232, 6232, 6232, 6232, 6414, 5887, 5883, 6232, 5891, 6232, 6232, 5894, 6232, 6232, 5922, 5937, 5949, 5938, 5939, 5949, 5944, 5950, 5944, 5944, 5940, 5944, 5941, 5952, 5941, 5944, 5946, 5945, 5946, 5946, 5946, 5946, 5947, 5941, 5948, 5952, 5948, 5944, 5942, 5954, 5956, 5958, 5962, 5960, 5959, 5964, 5966, 5967, 5971, 5967, 5968, 5967, 5969, 5974, 5973, 5976, 5978, 6293, 5998, 5875, 6282, 5896, 6871, 6437, 6282, 6321, 6282, 6282, 6282, 5917, 6456, 6456, 6456, 6456, 5991, 5906, 6379, 6455, 5990, 6019, 5991, 5904, 5904, 5904, 6456, 6456, 5926, 5899, 6456, 6456, 5997, 6282, 6408, 6410, 6282, 5932, 6282, 5933, 6464, 6024, 6282, 6282, 6379, 5924, 6282, 6282, 5924, 6282, 6362, 6010, 5984, 6282, 6003, 6282, 6362, 6282, 6282, 6282, 6004, 6456, 5906, 6455, 5990, 5904, 5902, 6456, 6456, 6456, 5906, 6457, 6019, 6019, 5904, 5904, 6456, 6456, 6282, 6282, 6282, 5980, 5917, 6456, 6456, 6456, 6455, 5905, 6456, 6445, 5926, 5926, 5926, 5926, 6032, 6032, 6008, 5932, 6282, 6282, 6282, 6434, 6024, 6282, 6019, 5904, 6456, 6282, 5896, 6873, 6282, 6282, 6282, 6474, 5903, 6457, 6019, 5904, 6456, 6229, 5904, 6456, 6456, 6456, 6018, 6457, 6019, 5991, 5905, 5906, 6282, 6282, 6282, 5984, 6282, 6282, 6282, 5925, 6543, 5905, 6456, 6456, 6456, 6282, 5905, 6229, 5905, 6229, 5905, 6282, 6650, 6437, 6043, 6515, 6056, 6672, 6088, 6052, 6515, 6520, 6054, 6060, 6058, 6515, 6515, 6083, 6528, 6101, 6761, 6518, 6521, 6516, 6517, 6063, 6065, 6068, 6061, 6057, 6515, 6515, 6519, 6515, 6070, 6072, 6066, 6515, 6515, 6515, 6515, 6125, 6522, 6074, 6515, 6515, 6076, 6515, 6523, 6079, 6082, 6515, 6081, 6055, 6091, 6089, 6090, 6093, 6114, 6092, 6113, 6114, 6114, 6114, 6114, 6115, 6117, 6116, 6117, 6117, 6118, 6119, 6120, 6121, 6121, 6095, 6097, 6099, 6122, 6123, 6124, 6524, 5900, 6515, 6518, 6103, 6108, 6110, 6104, 6105, 6109, 6106, 6112, 6121, 6127, 6129, 6282, 5899, 6282, 5925, 6463, 6321, 6282, 6294, 6006, 6378, 6282, 6508, 6282, 6449, 6646, 6218, 6604, 6282, 6524, 6291, 6282, 6774, 6282, 6270, 6282, 6282, 6282, 6000, 6000, 6027, 6161, 6282, 6282, 5895, 6375, 6282, 6312, 6230, 6366, 6265, 5876, 6282, 6282, 6282, 6015, 6406, 6282, 6284, 6027, 6027, 6137, 6282, 6282, 6379, 6281, 6372, 6028, 6159, 6282, 5899, 6282, 6282, 6282, 6573, 6282, 6282, 6467, 6282, 6311, 6312, 6372, 6282, 6282, 6282, 6019, 6019, 5904, 5904, 5904, 5904, 5905, 6456, 6456, 6031, 6154, 6158, 6282, 6149, 6273, 6282, 6163, 6282, 6677, 6280, 6166, 6279, 6682, 6685, 6501, 6173, 6175, 6178, 6178, 6178, 6178, 6176, 6181, 6180, 6181, 6181, 6183, 6181, 6185, 6187, 6188, 6188, 6188, 6194, 6193, 6194, 6193, 6193, 6189, 6191, 6190, 6190, 6196, 6196, 6198, 6203, 6202, 6204, 6208, 6203, 6205, 6199, 6200, 6210, 6206, 6212, 6282, 6282, 5896, 6282, 6282, 6282, 6512, 6282, 6150, 6135, 6320, 6500, 6163, 6282, 6282, 6282, 6026, 6282, 6026, 6166, 6282, 6282, 6282, 6027, 6221, 6282, 6505, 6282, 6282, 6282, 6032, 6238, 6282, 6241, 6282, 5899, 6451, 6282, 5913, 6669, 6401, 6238, 6282, 6282, 6282, 6037, 6245, 6282, 6282, 6282, 6040, 6282, 6282, 6225, 6248, 6282, 6282, 5916, 6722, 6377, 6247, 6249, 6282, 6282, 5924, 6370, 6252, 6253, 6282, 6282, 5932, 6282, 6282, 6530, 5924, 6254, 6282, 6282, 6254, 6282, 6322, 6228, 6282, 5933, 6378, 6282, 6378, 6282, 6452, 6282, 6432, 6317, 6282, 5917, 6086, 6725, 6727, 6216, 6086, 6726, 6450, 6231, 5926, 5933, 6008, 6008, 6008, 6282, 6282, 6282, 5918, 6282, 6282, 6282, 5923, 6309, 6683, 6282, 6282, 6282, 6148, 6216, 6308, 6310, 6282, 6282, 6282, 6149, 6282, 5903, 6397, 6605, 6282, 6282, 5933, 5933, 5933, 6780, 6282, 6282, 6282, 6229, 6282, 6282, 6282, 5933, 5924, 6316, 5917, 6723, 6377, 5916, 6722, 6323, 6448, 6454, 6216, 6332, 6436, 6683, 6282, 5917, 6328, 6465, 6450, 6217, 6231, 6160, 6436, 6683, 6328, 6448, 6454, 6216, 6610, 6436, 6683, 6282, 6221, 6602, 6310, 6282, 5984, 5899, 5925, 6229, 6435, 6500, 6281, 6722, 6013, 6465, 6450, 6160, 6603, 6683, 6282, 6282, 6231, 6218, 6310, 6282, 5984, 6282, 6283, 6043, 5914, 6282, 5933, 6328, 6465, 6450, 6647, 6604, 6282, 6000, 6282, 6282, 6283, 6277, 6707, 6733, 6282, 6722, 6465, 6230, 6396, 6282, 6282, 6282, 6235, 6686, 6282, 6708, 6281, 6282, 6000, 6437, 6362, 6338, 6279, 6282, 6282, 6283, 6444, 6145, 6683, 6282, 6282, 5933, 6003, 6282, 6282, 6282, 6006, 6375, 6465, 6708, 6282, 6005, 6282, 6282, 6287, 6289, 6282, 6548, 6282, 6282, 5933, 6282, 6282, 6282, 6137, 6282, 6282, 6020, 6282, 6375, 6282, 6282, 6282, 6281, 6471, 6218, 6683, 6282, 6282, 6282, 6370, 5984, 6282, 6010, 6795, 5984, 5899, 6282, 6282, 6661, 6282, 6000, 6137, 6282, 6282, 6282, 6282, 5896, 5914, 6704, 6273, 5928, 6340, 6344, 6503, 6348, 6349, 6349, 6350, 6355, 6352, 6349, 6349, 6349, 6349, 6354, 6355, 6355, 6355, 6356, 6357, 6357, 6357, 6357, 6357, 6358, 6359, 6359, 6359, 6359, 6383, 6360, 6382, 6382, 6382, 6361, 6282, 6282, 6282, 6283, 6043, 5903, 5897, 6485, 6376, 6395, 6425, 6282, 6282, 6282, 6293, 6291, 6338, 6282, 6282, 6282, 6284, 6282, 6282, 6345, 6282, 6282, 6291, 6282, 6282, 6282, 6230, 5876, 6282, 6407, 6282, 6282, 6282, 6286, 6282, 6282, 6037, 6411, 6417, 6282, 6282, 5979, 5903, 6470, 6313, 6647, 6281, 6282, 6282, 6408, 6416, 6418, 6282, 6282, 5979, 6525, 6458, 6342, 6422, 6282, 6282, 6282, 6288, 6282, 6664, 6731, 6282, 6012, 6000, 6282, 6012, 6335, 6310, 5985, 6504, 6282, 6282, 6273, 6470, 6372, 6273, 6504, 6385, 6282, 6282, 6412, 6257, 6598, 6600, 6282, 6411, 6413, 6597, 6599, 6599, 6282, 6282, 6282, 6291, 6410, 6282, 6322, 6451, 5926, 5926, 6008, 6008, 6008, 5932, 6236, 6282, 6282, 6282, 6292, 5982, 6282, 6283, 6442, 6050, 6013, 6609, 6259, 6424, 6310, 6282, 5919, 5920, 6282, 6282, 6011, 5916, 6282, 6664, 6282, 6282, 6023, 6437, 6459, 5983, 6013, 6594, 6700, 6437, 6282, 6424, 6437, 6282, 6282, 6235, 6480, 6481, 6282, 6282, 6133, 6282, 6282, 6485, 6376, 6647, 6282, 6016, 6282, 6282, 5933, 6330, 6454, 6217, 6683, 6282, 6282, 6484, 5917, 5929, 6011, 6608, 6259, 6425, 6282, 6486, 5983, 6013, 6594, 6786, 6437, 6282, 6282, 6282, 6294, 6282, 6283, 6484, 5917, 5983, 6013, 6531, 6471, 6282, 6282, 6146, 6683, 6282, 6282, 6155, 6282, 6282, 6385, 6282, 6322, 6282, 6282, 6275, 6493, 5917, 5983, 6324, 6259, 6729, 6282, 6019, 6019, 6019, 5991, 5904, 6277, 5903, 6531, 6011, 6148, 6282, 6282, 6282, 6234, 6531, 6282, 6282, 6282, 6322, 6282, 6133, 6372, 6505, 6282, 6230, 6282, 6282, 6171, 6756, 6531, 6046, 6834, 6437, 6282, 6282, 6285, 6530, 5924, 6282, 6684, 6282, 6149, 6282, 6282, 6282, 6325, 6285, 6530, 6045, 6159, 6024, 6046, 6386, 6282, 6282, 6282, 6372, 6282, 6294, 6282, 6530, 6464, 6386, 6282, 6282, 6215, 6224, 5933, 5924, 6410, 6282, 6040, 6282, 6482, 6282, 6282, 6282, 6531, 6536, 6024, 6282, 6282, 6282, 6370, 5987, 6282, 6535, 6282, 6282, 6227, 6282, 6282, 6282, 6378, 6378, 6378, 6282, 6452, 5994, 6282, 6282, 6282, 6394, 6282, 6282, 6282, 6404, 6539, 6333, 6683, 6282, 6020, 6282, 6282, 6282, 6341, 6282, 6570, 6300, 6569, 6301, 6370, 6545, 6300, 6302, 6303, 6303, 6303, 6303, 6303, 6304, 6551, 6554, 6552, 6561, 6552, 6555, 6563, 6564, 6563, 6563, 6563, 6563, 6564, 6556, 6557, 6557, 6557, 6557, 6558, 6372, 6273, 6282, 6282, 6243, 6282, 6509, 6566, 6282, 6282, 6271, 6213, 6282, 6283, 6568, 6282, 6021, 6041, 6282, 6027, 6282, 6321, 6282, 6006, 6282, 6282, 6027, 6462, 6282, 6282, 6282, 6572, 6282, 6168, 6282, 6575, 6510, 6282, 6029, 6282, 6282, 6282, 6588, 5907, 5909, 5911, 6282, 6036, 6282, 6282, 6388, 6407, 5908, 5910, 6282, 6282, 6272, 6282, 6526, 6282, 5916, 6322, 6282, 6378, 6282, 6020, 6282, 6278, 6282, 6282, 6394, 5924, 6278, 6282, 6283, 6502, 6365, 6282, 6579, 6282, 6282, 6275, 6525, 5914, 5992, 6371, 6048, 6365, 6367, 6369, 6282, 6282, 6277, 6531, 6046, 6275, 6583, 5993, 6047, 6256, 6256, 6366, 6368, 6282, 6282, 6452, 6000, 6282, 6282, 6282, 6408, 6282, 6027, 6282, 6372, 6526, 6282, 5899, 6539, 6664, 6682, 6282, 6282, 6282, 6146, 6282, 6482, 6282, 6006, 6451, 6282, 6282, 6282, 5985, 6458, 6342, 6313, 6136, 6152, 6282, 6037, 6378, 6282, 6282, 6282, 6421, 6584, 6020, 6437, 6683, 6282, 6027, 6321, 6282, 6451, 6646, 6152, 6282, 6282, 6282, 6410, 6282, 6282, 6282, 6375, 6282, 6000, 6526, 6322, 6533, 6682, 6282, 6408, 6282, 6282, 6282, 6505, 6282, 6282, 6278, 6282, 6282, 6282, 6143, 6371, 6472, 6282, 6282, 6282, 6423, 6539, 6437, 6683, 6282, 6040, 6148, 6040, 6149, 6273, 6229, 6682, 6282, 6470, 6282, 6282, 6283, 6282, 6282, 6282, 6524, 6548, 5933, 6282, 5933, 6282, 6434, 6410, 6282, 6282, 6434, 6537, 6282, 6664, 6491, 6866, 5876, 6482, 6491, 6282, 6282, 6283, 6410, 6282, 6427, 6282, 6282, 5980, 6011, 6276, 6037, 6285, 6038, 6590, 6783, 6607, 6612, 6620, 6619, 6620, 6620, 6616, 6620, 6620, 6618, 6622, 6620, 6614, 6613, 6624, 6627, 6626, 6627, 6627, 6628, 6630, 6630, 6634, 6630, 6632, 6631, 6630, 6630, 6630, 6636, 6638, 6638, 6637, 6637, 6640, 6641, 6282, 6132, 6282, 6282, 5895, 5924, 5984, 6282, 6640, 6637, 6640, 6640, 6640, 6640, 6505, 5903, 6644, 6331, 6649, 6282, 6282, 6229, 5879, 6282, 6527, 6653, 6148, 6282, 6137, 5924, 6282, 6282, 6282, 6230, 6281, 6282, 6282, 6306, 6402, 6433, 6346, 6656, 6658, 6549, 6282, 6282, 6283, 6475, 6423, 6282, 6282, 6282, 6437, 6682, 5912, 6668, 6400, 6282, 6157, 6282, 6282, 5896, 6451, 5980, 5917, 6029, 6221, 6281, 6282, 6282, 6524, 6282, 6282, 6282, 5930, 6664, 6282, 6264, 6683, 6694, 6282, 6282, 6282, 6452, 6282, 6282, 6282, 6285, 5897, 6453, 6654, 6282, 6346, 6295, 6282, 6282, 6283, 6582, 6297, 6282, 6681, 6282, 6164, 6024, 6282, 6133, 6451, 6282, 5988, 6281, 6285, 5980, 6458, 6371, 6263, 6647, 6281, 6282, 6676, 6282, 6676, 6514, 5903, 6680, 6465, 6489, 5995, 6282, 6282, 6283, 6496, 6085, 6282, 6513, 6525, 6679, 6688, 6688, 6399, 6713, 6281, 6282, 6286, 6282, 6037, 6282, 6282, 6282, 5899, 6691, 6497, 6724, 6488, 6734, 6282, 6282, 6282, 6498, 6282, 6282, 6282, 6255, 6282, 6283, 6691, 6696, 6724, 6488, 6698, 6331, 6222, 6282, 6282, 6282, 6431, 6296, 6282, 6282, 6282, 6499, 6282, 6282, 5903, 6464, 6231, 6734, 6696, 6134, 6733, 6281, 6693, 6282, 6282, 6434, 6282, 6282, 6282, 6277, 6525, 6531, 6471, 6218, 6231, 6490, 6282, 6282, 6282, 6504, 6548, 6282, 6283, 6278, 6282, 6275, 6710, 6733, 6282, 6169, 6282, 6282, 6509, 6003, 6712, 6282, 6282, 6282, 6508, 5899, 6702, 6490, 6282, 6282, 6283, 6861, 6854, 6033, 6858, 6646, 6218, 6604, 6282, 6282, 6282, 6577, 6286, 6282, 6394, 6282, 6229, 6019, 6019, 6019, 6019, 5904, 6286, 6282, 6137, 6282, 6229, 6282, 6292, 6229, 6282, 6282, 6372, 6505, 6282, 6437, 6683, 6282, 6229, 6146, 6265, 6282, 6283, 6525, 5927, 6539, 6729, 6683, 6282, 6282, 6650, 6282, 6282, 6283, 6863, 6364, 6024, 6282, 6282, 6283, 6869, 6282, 6362, 6282, 6362, 6363, 6010, 6592, 5925, 6719, 6591, 6593, 6718, 6721, 5934, 5934, 5935, 6469, 6736, 5934, 5934, 5934, 6736, 6738, 6742, 6740, 6739, 6744, 6746, 6751, 6751, 6752, 6753, 6747, 6748, 6748, 6748, 6749, 6751, 6751, 6751, 6753, 6753, 6753, 6753, 6758, 6754, 6755, 6282, 6282, 6285, 6282, 6282, 6282, 6014, 6760, 5981, 6007, 6728, 6282, 6763, 6282, 6282, 6285, 6496, 6531, 6282, 6283, 6768, 6770, 6282, 6282, 6282, 6539, 6392, 6282, 6282, 6392, 6027, 6156, 6282, 6282, 6293, 6586, 6282, 6373, 6281, 6285, 6507, 5903, 6470, 6326, 6505, 6659, 6282, 6234, 6229, 5879, 6283, 6496, 6703, 6776, 6704, 6777, 6282, 6282, 6282, 6548, 6282, 5918, 6025, 6282, 6282, 6026, 6282, 6286, 6505, 6394, 6282, 6291, 6370, 6282, 6370, 6282, 6496, 6085, 6831, 6147, 6603, 6683, 6282, 6380, 6282, 6282, 6370, 6282, 6282, 6282, 6003, 6282, 6294, 6336, 6000, 6282, 6239, 6846, 6282, 6260, 6282, 6282, 6282, 6642, 6379, 6282, 6505, 6336, 6283, 6702, 6782, 6319, 6218, 6604, 6282, 6785, 5999, 6282, 6269, 6663, 6282, 6140, 6282, 6282, 6393, 6282, 5982, 6724, 6319, 6218, 6604, 6539, 6310, 6282, 6282, 6375, 6370, 6375, 6788, 6320, 6310, 6000, 6000, 6282, 6282, 6375, 6548, 6282, 6282, 6282, 6275, 6084, 6447, 6282, 6788, 6429, 6683, 6282, 6282, 6664, 6683, 6282, 6273, 6541, 6148, 6282, 6394, 6000, 6282, 6274, 6282, 6003, 6318, 6429, 6683, 6282, 6275, 5898, 5915, 6282, 6282, 6370, 6370, 6370, 6664, 6282, 6683, 6282, 6410, 6282, 6699, 6282, 6275, 5901, 5982, 6724, 6291, 6282, 6282, 6531, 6689, 6282, 6282, 6220, 6282, 6537, 6282, 6282, 6282, 6664, 6146, 6282, 6282, 6434, 6281, 6282, 6282, 6282, 6020, 6282, 6006, 6410, 6408, 6282, 6027, 6282, 6282, 6250, 6843, 6434, 6410, 6282, 6434, 6410, 6282, 6408, 6282, 6322, 6282, 6410, 6410, 6027, 6282, 6275, 6702, 6231, 6490, 6146, 6282, 6146, 6282, 6282, 6282, 6671, 6146, 6410, 6408, 6408, 6409, 6409, 6409, 6409, 6409, 6282, 6282, 6282, 6682, 6282, 6282, 6285, 6039, 6216, 6221, 6281, 6286, 6282, 6282, 6790, 6543, 6282, 6505, 6003, 6282, 6559, 6282, 6282, 6559, 6508, 6792, 6282, 6077, 6139, 6282, 6282, 6379, 6374, 6793, 6806, 6798, 6798, 6801, 6799, 6798, 6799, 6798, 6797, 6803, 6808, 6807, 6808, 6805, 6808, 6809, 6810, 6813, 6814, 6815, 6816, 6815, 6818, 6811, 6813, 6811, 6813, 6820, 6822, 6822, 6821, 6821, 6824, 6824, 6824, 6824, 6821, 6824, 6824, 6828, 6825, 6826, 6282, 6282, 6282, 6683, 6282, 6282, 6689, 6439, 6282, 6277, 6715, 6282, 6282, 6282, 6510, 6035, 6282, 6282, 6282, 6684, 6282, 6282, 6282, 6233, 6282, 6716, 6282, 6580, 6419, 6282, 6836, 6282, 6281, 6282, 6282, 6283, 6293, 6337, 6282, 6838, 6840, 6282, 6282, 6666, 6282, 6143, 6292, 6282, 6282, 6292, 6282, 6282, 6282, 6378, 6845, 6282, 6282, 6845, 6282, 6487, 6282, 6282, 6391, 6391, 6651, 6282, 6282, 6282, 6730, 6512, 6282, 6282, 6282, 6830, 6853, 5931, 6141, 6428, 6602, 6604, 6282, 6282, 6409, 6410, 6282, 6852, 6854, 6856, 6450, 6002, 6282, 6001, 6003, 6282, 6645, 6231, 6281, 6282, 6282, 6674, 6282, 6167, 6282, 6282, 6000, 6282, 6000, 6034, 6282, 6282, 6282, 6848, 6282, 6394, 6683, 6282, 6282, 5933, 6003, 5933, 6003, 6282, 6830, 6645, 6231, 6222, 6487, 6282, 6024, 6282, 6282, 6693, 6282, 6282, 6282, 6464, 6861, 6854, 6009, 6377, 6525, 5931, 6011, 6465, 6282, 6830, 5885, 6282, 6282, 6702, 5931, 6319, 6436, 6683, 5916, 6282, 6282, 5925, 6282, 6282, 6448, 6282, 6282, 6931, 6282, 6282, 6451, 6282, 6282, 6282, 6860, 6044, 6011, 6465, 6449, 6647, 6310, 6282, 6282, 6142, 6436, 6683, 6282, 6282, 6732, 5924, 5984, 6861, 5983, 6377, 6454, 5982, 6321, 6282, 6294, 6138, 6282, 6461, 6151, 6437, 6282, 6282, 6732, 6772, 6860, 5983, 6465, 6151, 6437, 6282, 6865, 6282, 6282, 6282, 6860, 6337, 6437, 6282, 6282, 6466, 6282, 6144, 6436, 6282, 6282, 6282, 6868, 6219, 6282, 6282, 6282, 6468, 6282, 6282, 6732, 6282, 5916, 6262, 6299, 6282, 5918, 5918, 5918, 6378, 6282, 6282, 6526, 6282, 6148, 6282, 6283, 6293, 6586, 6292, 6502, 6437, 6282, 6282, 6282, 6294, 6282, 6292, 6294, 6282, 6282, 6474, 5980, 6293, 6291, 6282, 6282, 6292, 6502, 6282, 6278, 6294, 6282, 6278, 6282, 6282, 6765, 6282, 6229, 6362, 6282, 6230, 6320, 6500, 6282, 6505, 6282, 6292, 6502, 6282, 6505, 6233, 6282, 6282, 6293, 6282, 6282, 6282, 6474, 6478, 6291, 6278, 6282, 6282, 6292, 6531, 6536, 6875, 6255, 6282, 6282, 6476, 6282, 6006, 6255, 6282, 6006, 6390, 6282, 6314, 6049, 6282, 6877, 6878, 6881, 6375, 6880, 5930, 6282, 6532, 6542, 6883, 6596, 6258, 6885, 6596, 6595, 6595, 6886, 6889, 6595, 6888, 6890, 6889, 6892, 6897, 6893, 6894, 6895, 6899, 6900, 6905, 6905, 6901, 6902, 6912, 6903, 6902, 6906, 6905, 6906, 6905, 6906, 6907, 6909, 6908, 6910, 6914, 6908, 6908, 6922, 6922, 6921, 6922, 6923, 6916, 6917, 6918, 6920, 6926, 6925, 6928, 6460, 6371, 6282, 6282, 6482, 5932, 6321, 6285, 6282, 6282, 6494, 6371, 6930, 6282, 6282, 6282, 6505, 6494, 6371, 6130, 6282, 6282, 6282, 6505, 6506, 6282, 6282, 6282, 6312, 6933, 6282, 6505, 6935, 6282, 6282, 6937, 6282, 6282, 6767, 6769, 6290, 6282, 6282, 6282, 6505, 6692, 6011, 6313, 6291, 6233, 6282, 6282, 6508, 6282, 6282, 6282, 5916, 6030, 6282, 6423, 6170, 6282, 6282, 6170, 6011, 6372, 6282, 5916, 6282, 6282, 5915, 6451, 6440, 6282, 6282, 5918, 6322, 6283, 6939, 6446, 6705, 6447, 6291, 6282, 6282, 6294, 6282, 6282, 6282, 6438, 6282, 6282, 6511, 6282, 6282, 6282, 6842, 6149, 6282, 6149, 6282, 6282, 6779, 6007, 6728, 6310, 6282, 6282, 6319, 6310, 6282, 6282, 6363, 6282, 6692, 6011, 6372, 5916, 6282, 5915, 6282, 6282, 6511, 6268, 6286, 6282, 5924, 6282, 6282, 6833, 6282, 6279, 6398, 6282, 6282, 6014, 6282, 6282, 6282, 6601, 6282, 6439, 5933, 6133, 6282, 6148, 6282, 6255, 6282, 5914, 5931, 6705, 6282, 6282, 6850, 6282, 6850, 6282, 6372, 6282, 6372, 6282, 6149, 6282, 6505, 5914, 5931, 6291, 6282, 6282, 5982, 6585, 6282, 6282, 6660, 6291, 6043, 5914, 6291, 6282, 6282, 6283, 6043, 5899, 6282, 6282, 1048576, 1073741824, 0x80000000, 1075838976, 2097152, 0x80000000, 4194560, 4196352, -2143289344, -2143289344, 4194304, 0x80000000, 37748736, 541065216, 541065216, -2143289344, 4198144, 4196352, 276901888, 8540160, 4194304, 1, 4, 16, 64, 0, 48, 64, 32, 64, 64, 96, 0, 59, 140224, 5505024, -1887436800, 0, 63, 64, 128, 0, 64, 256, 0, 110, 110, 8425488, 4194304, 1024, 0, 128, 128, 512, 512, 1024, 1024, 2048, 0, 256, 256, 257, 37748736, 742391808, 742391808, 775946240, -1371537408, 775946240, 4718592, 775946240, 775946240, 171966464, 171966464, 775946240, 239075328, -1405091840, -1371537408, 239075328, 171966464, 64, 4718592, 2097216, 4720640, 541589504, 4194368, 4194368, 541065280, 541589504, 4194400, -2143289280, 4194368, -2143285440, -2143285408, -2143285408, -2109730976, 775946336, 776470528, -2143285408, 776470528, 775946304, 775946304, -1908404384, 775946304, -1908404384, 2, 8, 32, 128, 1024, 4096, 0, 260, 8392704, 0, 1856, 64, 524288, 64, 896, 8192, 67108864, 0x80000000, 96, 262144, 262144, 8192, 0, 288, 8388608, 0, 384, 0, 512, 2048, 2048, 4096, 4096, 8192, 8192, 16384, 0, 520, 520, 96, 524288, 524288, 0, 2432, 2048, 268435456, 0, 24576, 0, 32768, 32768, 65536, 1048576, 128, 2048, 12288, 0, 12289, 0, 16384, 16384, 32768, 0, 1864, 2, 16, 1024, 98304, 131072, 262144, 1048576, 512, 5120, 2, 536936448, 80, 528, 528, 2097168, 2097168, 268435472, 524304, 1048592, 2097168, 24, 560, 48, 2097680, 1048592, 3145744, 1048592, 20, 560, 48, 3146256, 2097552, 3146256, 28, 16, 8192, 2, 2098064, 163577856, 17, 21, 112, 128, 3584, 8192, 2228784, -161430188, -161430188, -161429680, -161430188, -161429676, -161430188, -161298576, -160299088, -161298576, -161298572, -160774288, -160299084, 146804757, 146812949, 146862101, 146863389, 146863389, 148960541, -161429740, -161429676, 146863421, 148960541, 146863389, -161429676, -160905388, -161429676, -161429676, -161429675, -161349072, -161349072, -161347728, -161347728, -161298572, -161298572, -160774284, -161298572, 16, 262160, -18860267, -160774284, -18729163, 0, 58368, 159383552, 0, 65536, 2097152, 8388608, 33554432, 0, 66048, 0, 77824, 524288, 33554432, 1024, 262144, 2097152, 16777216, 67108864, 0, 131072, 524288, 134217728, 0x80000000, 1, 32768, 196608, 0, 131328, 131072, 16777216, 100663296, -1073741824, 164096, 0, 131584, 2621440, 0, 139264, 0, 150528, 0, 235712, 16777216, 1073774592, 1226014816, 100665360, -2046818288, 100665360, 100665360, -2044196848, 1091799136, 1091799136, 1091803360, 1091799136, 1158908000, 1158908001, 1192462432, 1192462448, 1192462448, 1870638912, 1870655296, 1870638912, 1200851056, 1200851056, 1091799393, 1870655296, 1870655296, 1870655312, 1870655316, 1870655312, 1870655312, 1870638928, 1870655316, 1870655316, 1870655317, 1870655316, 1879043952, 1870655348, 1870655316, 1879027568, 1879043952, 1879043956, 0, 284672, 229440, 1048576, 2097152, 67108864, 134217728, 8, 4194304, 16777216, 0x80000000, 1224736768, 0, 503616, 2048, 100663296, 0, 524288, 2097152, 4194304, 4194304, 0, 40, 0, 44, -2046820352, 0, 605503, 231488, 1090519040, 1157627904, 1191182336, 9437184, 231744, 520000, 7864320, 1862270976, 0, 867391, 1862270976, 1862270976, 16252928, 0, 1048576, 4194304, 25165824, 25165824, 33554432, 8192, 98304, 1048576, 8388608, 134217728, 268435456, 4194432, 3145728, 0, 24, 0, 29, 0, 32, 1, 2, 2, 4, 0, 0x80000000, 0x80000000, 0, 0, 1, 0, 2, 0, 3, 240, 19456, 262144, 0, 4, 8, 0, 6, 0, 7, 150994944, 0, 1049088, 1049088, 12845065, 12845065, 147193865, 128, 6144, 4194304, 251658240, 536870912, 1073741824, 32768, 131072, 1048576, 4096, 83886080, 117440512, 0, 3145728, 16777216, 134217728, 0, 2048, 8192, 229376, 0, 2304, 1536, 8192, 1536, 65536, 4194304, 67108864, 536870912, 9216, 33554432, 262144, 134217728, 1073741824, 50331649, 9476, 512, 8192, 134218240, 1050624, 0, 5242880, 1275208192, 4194312, 4194312, 4194344, 4194312, 541065224, 4203820, -869654016, -869654016, 1279402504, 1279402504, 2143549415, 2143549415, 2143549423, 0, 8388608, 4096, 4194304, 8388608, 16777216, 33554432, -1946157056, 0, 8192, 131072, 0, 1792, 0, 1024, 8192, 65536, 0, 1536, 0x80000000, 2143549423, 2143549423, 2143549415, 1, 16777216, 268435456, 512, 139264, 2760704, -872415232, 0, 19947520, 0, 33554432, 67108864, 1073741824, 1073741824, 262144, 7340032, -2030043136, 0, 331776, 300, 4203520, 4333568, 1275068416, 0, 16777216, 16777216, 0, 999, 259072, 4194304, 4194432, 999, 29619200, 2113929216, 0, 58720256, 1007, 1007, 0, 67108864, 402653184, 536870912, 2048, 1048576, 16777216, 536870912, 300, 0, 83886080, 0, 2097152, 134217728, 536870912, 0, 49152, 0, 57344, 102, 384, 6, 96, 128, 3072, 16384, 65536, 524288, 1048576, 0, 4096, 262144, 524288, 96, 96, 64, 384, 512, 4096, 65536, 131072, 1024, 65536, 262144, 131072, 32768, 256, 384, 8192, 33554432, 0x80000000, 1, 6, 8, 8388608, 96, 384, 104, 104, 0, 134217728, 6, 32, 256, 512, 65536, 7340032, 50331648, 0, 8396800, 4, 32, 384, 4, 64, 1024, 2097152, 268435456, 1073741824, 8, 262144, 512, 0, 8, 8, 16, 0, 9, 0, 12, 0, 15, 16, 16, 17, 20, 16, 20, 48, 16, 28, 0, 16, 32, 0, 21, 53, 4, 256, 1024, 524288, 536870912, 256, 65536, 16777216, 1073741824, 2048, 524288, 32, 4100, 1024, 134217728, 1049088, 270532608, 2097152, 2097152, 0, 23, 5505537, 5587457, 5591557, 147202057, 5587457, 13894153, -1881791493, -1881791493, 0, 134218752, 5587465, 5587457, 13894153, 13894153, 81003049, 4456448, 8388608, 5505024, 0, 134348800, 134348800, 82432, 0, 142606336, 5, 86528, 41, 75497472, 81920, 0, 184549376, 2, 56, 64, 2048, 262144, 536870912, 2048, 134217728, -2113929216, 16777216, 1073743872, 268435968, 229376, 25165824, 92274688, 25165824, 100663296, 402653184, 1610612736, 0, 100663296, 134217728, 805306368, 1073741824, 8388608, 268567040, 16384, 229376, 4194304, 117440512, 2113544, 68423701, -2079059883, -2079059947, 85200917, 68423701, 68423765, 68489237, 68423701, 68423701, 72618005, 68423701, 68425749, 68423703, 85200919, 69488664, 69488664, 70537244, 70537245, 70537245, -2076946339, -2076946403, 70537245, 70537309, 70539293, -2022351745, -2022351617, -2022351745, -2022351617, -2022351617, 0, 243269632, 256, 32768, 1048576, 33554432, 134217728, -2113929216, 0, 268435456, 49152, 266240, 1048576, 67108864, -2080374784, -2080374784, 268288, 0, 301989888, 0, 318767104, 282624, 0, 536870912, 28, 3145728, 192, 351232, 7340032, 5, 16, 1049104, 12, 3145728, 13, 0, 1073741825, 192, 3072, 20480, 0, 1073741824, 0, 262144, 2621440, -1073741824, 20480, 65536, 268435456, 14, 32, 512, 131072, 268435456, 192, 1024, 64, 32768, 33554432, 268435456, 4, 128, 3840, 16384, 262144, 128, 2097152, 1073741824, 4, 2097152, 4, 50331648, 67108864, 128, 50331648, 1073741824, 128, 268435968, 268435968, 268436032, 256, 1536, 2048, 16384, 98304, 393216, 524288, 268435456, 536870912, 9216, 0, 4194304, 50331648, 0x80000000, 256, 536871168, -1879046336, -1879046334, -1879046326, -1879046334, 1073744256, -1879046334, -1879046326, -1845491902, -1878784182, 268444480, 268436288, 268436288, 268436289, 268444480, 268444480, 2100318149, 2100318149, 2100326341, 0, 1090519040, 2100326341, 2100326341, 1, 16, 536936448, 576, 0, 832, 8192, 1, 4036, 19939328, 2080374784, 0, 1, 1024, 768, 8192, 16384, 19922944, 2080374784, 1, 128, 4096, 3584, 16384, 524288, 8, 33554432, 402653184, 2048, 3145728, 128, 131072, 268500992, 4243456, 4096, 1048588, 0, 1258292224, 1124073472, 1124073472, 1124073488, 1124073474, 1124073472, 1392574464, 1124073472, 1073754113, 12289, 1124073472, 12289, 12289, 1098920193, 1132474625, 1098920209, 1132474625, 1132474625, 1124085761, 1124085761, 1124085777, 1258304513, 1124085761, 1400975617, 2132360255, 2132622399, 2132360255, 2132622399, 2132622399, 2141011263, 0, 2140749119, 2141011263, 2, 16384, 3145728, 12545, 25165824, 268435456, 12305, 13313, 12561, 0, 78081, 327155712, 605247, 1058013184, 1073741824, 867647, 1066401792, 0, 1, 12288, 256, 8388608, 1, 30, 32, 1024, 2048, 339968, 327680, 524288, 1, 14, 16, 14, 1024, 16384, 4194304, 134217728, 1, 12, 1024, 8, 134217728, 8, 536870912, 9437184, 0, 68157440, 137363456, 0, 137363456, 66, 66, 100680704, 25165824, 26214400, 92274688, 25165952, 93323264, 92274688, 92274688, 92274720, 93323264, 25165890, 100721928, 100721928, 100787464, 100721664, 100721664, 100853000, 100721928, 125977600, 125846528, 125846528, 125846560, 125977600, 125977600, 127026176, 281843, 281843, 1330419, 281843, 126895104, 125846528, 1330419, 1330419, 72633587, 5524723, 72633587, 92556531, 93605107, 93605107, 5524723, 5524723, 39079155, 97799411, 127290611, 127290611, 131484915, 0, 17408, 33554432, 1073741824, 58624, 0, 124160, 189696, 148480, 50331648, 2, 112
];
XQueryParser.TOKEN =
@@ -21793,51 +48535,1002 @@ XQueryParser.TOKEN =
"'}'",
"'}}'"
];
- });
-ace.define('ace/mode/xquery/visitors/SemanticHighlighter', ['require', 'exports', 'module' ], function(require, exports, module) {
+},
+{}],
+11:[function(require,module,exports){
+'use strict';
+
+exports.TreeOps = {
+ flatten: function(node){
+ var that = this;
+ var value = '';
+ if(!node) {
+ throw new Error('Invalid node found');
+ } else if (node.value === undefined) {
+ node.children.forEach(function(child){
+ value += that.flatten(child);
+ });
+ } else {
+ value += node.value;
+ }
+ return value;
+ },
+
+ concat: function(obj1, obj2, copy){
+ var result = copy ? {} : obj1;
+ if(copy){
+ Object.keys(obj1).forEach(function(key){
+ result[key] = obj1[key];
+ });
+ }
+ var keys = Object.keys(obj2);
+ keys.forEach(function(key){
+ result[key] = obj2[key];
+ });
+ return result;
+ },
+
+ removeParentPtr: function(ast){
+ if(ast.getParent !== undefined) {
+ delete ast.getParent;
+ }
+ for(var i in ast.children) {
+ var child = ast.children[i];
+ this.removeParentPtr(child);
+ }
+ },
+
+ inRange: function(p, pos, exclusive){
+ if(p && p.sl <= pos.line && pos.line <= p.el) {
+ if(p.sl < pos.line && pos.line < p.el) {
+ return true;
+ } else if(p.sl === pos.line && pos.line < p.el) {
+ return p.sc <= pos.col;
+ } else if(p.sl === pos.line && p.el === pos.line) {
+ return p.sc <= pos.col && pos.col <= p.ec + (exclusive ? 1 : 0);
+ } else if(p.sl < pos.line && p.el === pos.line) {
+ return pos.col <= p.ec + (exclusive ? 1 : 0);
+ }
+ }
+ },
+
+ findNode: function(ast, pos) {
+ if(!ast) {
+ return;
+ }
+ var p = ast.pos;
+ if(this.inRange(p, pos) === true) {
+ for(var i in ast.children) {
+ var child = ast.children[i];
+ var n = this.findNode(child, pos);
+ if(n !== undefined) {
+ return n;
+ }
+ }
+ return ast;
+ } else {
+ return;
+ }
+ },
+
+ astAsXML: function(node, indent){
+ var result = '';
+ indent = indent ? indent : '';
+ if(node.value) {
+ result += (indent + '<' + node.name + '>' + node.value + '</' + node.name + '>\n');
+ }
+ result += indent + '<' + node.name + '>\n';
+ var that = this;
+ node.children.forEach(function(child){
+ result += that.astAsXML(child, indent + ' ');
+ });
+ result += indent + '</' + node.name + '>\n';
+ return result;
+ }
+};
+},
+{}],
+12:[function(require,module,exports){
+'use strict';
+
+var JSONiqParser = require('./parsers/JSONiqParser').JSONiqParser;
+var XQueryParser = require('./parsers/XQueryParser').XQueryParser;
+var JSONParseTreeHandler = require('./parsers/JSONParseTreeHandler').JSONParseTreeHandler;
+var Translator = require('./compiler/translator').Translator;
+var StyleChecker = require('./formatter/style_checker').StyleChecker;
+var completer = require('../lib/completion/completer');
+
+var createStaticContext = exports.createStaticContext = function(){
+ var StaticContext = require('./compiler/static_context').StaticContext;
+ return new StaticContext();
+};
+
+var defaults = function(current, def){
+ if(!current) {
+ return def;
+ }
+ Object.keys(def).forEach(function(key){
+ if(current[key] === undefined){
+ current[key] = def[key];
+ }
+ });
+ return current;
+};
+
+var convertPosition = function (code, begin, end) {
+ var before = code.substring(0, begin);
+ var after = code.substring(0, end);
+ var startline = before.split('\n').length;
+ var startcolumn = begin - before.lastIndexOf('\n');
+ var endline = after.split('\n').length;
+ var endcolumn = end - after.lastIndexOf('\n');
+ var pos = {
+ sl: startline - 1,
+ sc: startcolumn - 1,
+ el: endline - 1,
+ ec: endcolumn - 1
+ };
+ return pos;
+};
+
+exports.XQLint = function (source, opts) {
+
+ opts = opts ? opts : {};
+ opts = defaults(opts, { styleCheck: false });
+
+ var ast;
+ this.getAST = function () {
+ return ast;
+ };
+
+ var markers = [];
+ this.getMarkers = function () {
+ return markers;
+ };
+
+ this.getMarkers = function(type){
+ var m = [];
+ markers.forEach(function(marker){
+ if(marker.type === type || type === undefined){
+ m.push(marker);
+ }
+ });
+ return m;
+ };
- var SemanticHighlighter = exports.SemanticHighlighter = function(ast) {
+ this.getErrors = function(){
+ return this.getMarkers('error');
+ };
+
+ this.getWarnings = function(){
+ return this.getMarkers('warning');
+ };
- this.tokens = {};
+ this.getCompletions = function(pos){
+ return completer.complete(source, ast, sctx, pos);
+ };
- this.getTokens = function() {
- this.visit(ast);
- return this.tokens;
+ var syntaxError = false;
+ this.hasSyntaxError = function () {
+ return syntaxError;
};
- this.EQName = this.NCName = function(node)
- {
- var row = node.pos.sl;
- this.tokens[row] = this.tokens[row] === undefined ? [] : this.tokens[row];
- node.pos.type = "support.function";
- this.tokens[row].push(node.pos);
- return true;
- };
+ var sctx = opts.staticContext ? opts.staticContext : createStaticContext();
+ var file = opts.fileName ? opts.fileName : '';
+ var isJSONiq = ((file.substring(file.length - '.jq'.length).indexOf('.jq') !== -1) && source.indexOf('xquery version') !== 0) || source.indexOf('jsoniq version') === 0;
+ var h = new JSONParseTreeHandler(source);
+ var parser = isJSONiq ? new JSONiqParser(source, h) : new XQueryParser(source, h);
+ try {
+ parser.parse_XQuery();
+ } catch (e) {
+ if (e instanceof parser.ParseException) {
+ syntaxError = true;
+ h.closeParseTree();
+ var pos = convertPosition(source, e.getBegin(), e.getEnd());
+ var message = parser.getErrorMessage(e);
+ if (pos.sc === pos.ec) {
+ pos.ec++;
+ }
+ markers.push({
+ pos: pos,
+ type: 'error',
+ level: 'error',
+ message: message
+ });
+ } else {
+ throw e;
+ }
+ }
+ ast = h.getParseTree();
+ if(opts.styleCheck) {
+ markers = markers.concat(new StyleChecker(ast, source).getMarkers());
+ }
+ var translator = new Translator(sctx, ast);
+ markers = markers.concat(translator.getMarkers());
+};
- this.visit = function(node) {
- var name = node.name;
- var skip = false;
+},
+{"../lib/completion/completer":6,"./compiler/static_context":4,"./compiler/translator":5,"./formatter/style_checker":7,"./parsers/JSONParseTreeHandler":8,"./parsers/JSONiqParser":9,"./parsers/XQueryParser":10}]},{},[12])(12)
- if (typeof this[name] === "function") skip = this[name](node) === true ? true : false;
+});
- if (!skip) {
- this.visitChildren(node);
- }
+ace.define("ace/mode/xquery_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/xquery/xqlint"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var XQLintLib = require("./xquery/xqlint");
+var XQLint = XQLintLib.XQLint;
+
+var getModuleResolverFromModules = function(modules){
+ return function(uri){
+ var index = modules;
+ var mod = index[uri];
+ var variables = {};
+ var functions = {};
+ mod.functions.forEach(function(fn){
+ functions[uri + '#' + fn.name + '#' + fn.arity] = {
+ params: []
+ };
+ fn.parameters.forEach(function(param){
+ functions[uri + '#' + fn.name + '#' + fn.arity].params.push('$' + param.name);
+ });
+ });
+ mod.variables.forEach(function(variable){
+ var name = variable.name.substring(variable.name.indexOf(':') + 1);
+ variables[uri + '#' + name] = { type: 'VarDecl', annotations: [] };
+ });
+ return {
+ variables: variables,
+ functions: functions
+ };
};
+};
- this.visitChildren = function(node, handler) {
- for (var i = 0; i < node.children.length; i++) {
- var child = node.children[i];
- if (handler !== undefined && typeof handler[child.name] === "function") {
- handler[child.name](child);
+var XQueryWorker = exports.XQueryWorker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(200);
+ this.opts = {
+ styleCheck: false
+ };
+ var that = this;
+
+ this.sender.on("complete", function(e){
+ if(that.xqlint) {
+ var pos = { line: e.data.pos.row, col: e.data.pos.column };
+ var proposals = that.xqlint.getCompletions(pos);
+ that.sender.emit("complete", proposals);
}
- else {
- this.visit(child);
+ });
+
+ this.sender.on("setAvailableModuleNamespaces", function(e){
+ that.availableModuleNamespaces = e.data;
+ });
+
+ this.sender.on("setModuleResolver", function(e){
+ that.moduleResolver = getModuleResolverFromModules(e.data);
+ });
+};
+
+oop.inherits(XQueryWorker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ this.sender.emit("start");
+ var value = this.doc.getValue();
+ var sctx = XQLintLib.createStaticContext();
+ if(this.moduleResolver) {
+ sctx.setModuleResolver(this.moduleResolver);
}
- }
+ if(this.availableModuleNamespaces) {
+ sctx.availableModuleNamespaces = this.availableModuleNamespaces;
+ }
+ var opts = {
+ styleCheck: this.styleCheck,
+ staticContext: sctx
+ };
+ this.xqlint = new XQLint(value, opts);
+ this.sender.emit("markers", this.xqlint.getMarkers());
};
-
- };
-
+}).call(XQueryWorker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ return bound;
+ };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ while (++i < length) {
+ if (i in self) {
+ fun.call(thisp, self[i], i, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ var i = 0;
+ var result;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i++];
+ break;
+ }
+ if (++i >= length) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ var result, i = length - 1;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i--];
+ break;
+ }
+ if (--i < 0) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+
+ var i = 0;
+ if (arguments.length > 1) {
+ i = toInteger(arguments[1]);
+ }
+ i = i >= 0 ? i : Math.max(0, length + i);
+ for (; i < length; i++) {
+ if (i in self && self[i] === sought) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+ var i = length - 1;
+ if (arguments.length > 1) {
+ i = Math.min(i, toInteger(arguments[1]));
+ }
+ i = i >= 0 ? i : length - Math.abs(i);
+ for (; i >= 0; i--) {
+ if (i in self && sought === self[i]) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+if (!Object.getPrototypeOf) {
+ Object.getPrototypeOf = function getPrototypeOf(object) {
+ return object.__proto__ || (
+ object.constructor ?
+ object.constructor.prototype :
+ prototypeOfObject
+ );
+ };
+}
+if (!Object.getOwnPropertyDescriptor) {
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+ "non-object: ";
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT + object);
+ if (!owns(object, property))
+ return;
+
+ var descriptor, getter, setter;
+ descriptor = { enumerable: true, configurable: true };
+ if (supportsAccessors) {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+
+ var getter = lookupGetter(object, property);
+ var setter = lookupSetter(object, property);
+ object.__proto__ = prototype;
+
+ if (getter || setter) {
+ if (getter) descriptor.get = getter;
+ if (setter) descriptor.set = setter;
+ return descriptor;
+ }
+ }
+ descriptor.value = object[property];
+ return descriptor;
+ };
+}
+if (!Object.getOwnPropertyNames) {
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ return Object.keys(object);
+ };
+}
+if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
+ Object.create = function create(prototype, properties) {
+ var object;
+ if (prototype === null) {
+ object = createEmpty();
+ } else {
+ if (typeof prototype != "object")
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+ var Type = function () {};
+ Type.prototype = prototype;
+ object = new Type();
+ object.__proto__ = prototype;
+ }
+ if (properties !== void 0)
+ Object.defineProperties(object, properties);
+ return object;
+ };
+}
+
+function doesDefinePropertyWork(object) {
+ try {
+ Object.defineProperty(object, "sentinel", {});
+ return "sentinel" in object;
+ } catch (exception) {
+ }
+}
+if (Object.defineProperty) {
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
+ doesDefinePropertyWork(document.createElement("div"));
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+ var definePropertyFallback = Object.defineProperty;
+ }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+ "on this javascript engine";
+
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+ if (definePropertyFallback) {
+ try {
+ return definePropertyFallback.call(Object, object, property, descriptor);
+ } catch (exception) {
+ }
+ }
+ if (owns(descriptor, "value")) {
+
+ if (supportsAccessors && (lookupGetter(object, property) ||
+ lookupSetter(object, property)))
+ {
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+ delete object[property];
+ object[property] = descriptor.value;
+ object.__proto__ = prototype;
+ } else {
+ object[property] = descriptor.value;
+ }
+ } else {
+ if (!supportsAccessors)
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+ if (owns(descriptor, "get"))
+ defineGetter(object, property, descriptor.get);
+ if (owns(descriptor, "set"))
+ defineSetter(object, property, descriptor.set);
+ }
+
+ return object;
+ };
+}
+if (!Object.defineProperties) {
+ Object.defineProperties = function defineProperties(object, properties) {
+ for (var property in properties) {
+ if (owns(properties, property))
+ Object.defineProperty(object, property, properties[property]);
+ }
+ return object;
+ };
+}
+if (!Object.seal) {
+ Object.seal = function seal(object) {
+ return object;
+ };
+}
+if (!Object.freeze) {
+ Object.freeze = function freeze(object) {
+ return object;
+ };
+}
+try {
+ Object.freeze(function () {});
+} catch (exception) {
+ Object.freeze = (function freeze(freezeObject) {
+ return function freeze(object) {
+ if (typeof object == "function") {
+ return object;
+ } else {
+ return freezeObject(object);
+ }
+ };
+ })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+ Object.preventExtensions = function preventExtensions(object) {
+ return object;
+ };
+}
+if (!Object.isSealed) {
+ Object.isSealed = function isSealed(object) {
+ return false;
+ };
+}
+if (!Object.isFrozen) {
+ Object.isFrozen = function isFrozen(object) {
+ return false;
+ };
+}
+if (!Object.isExtensible) {
+ Object.isExtensible = function isExtensible(object) {
+ if (Object(object) === object) {
+ throw new TypeError(); // TODO message
+ }
+ var name = '';
+ while (owns(object, name)) {
+ name += '?';
+ }
+ object[name] = true;
+ var returnValue = owns(object, name);
+ delete object[name];
+ return returnValue;
+ };
+}
+if (!Object.keys) {
+ var hasDontEnumBug = true,
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ for (var key in {"toString": null}) {
+ hasDontEnumBug = false;
+ }
+
+ Object.keys = function keys(object) {
+
+ if (
+ (typeof object != "object" && typeof object != "function") ||
+ object === null
+ ) {
+ throw new TypeError("Object.keys called on a non-object");
+ }
+
+ var keys = [];
+ for (var name in object) {
+ if (owns(object, name)) {
+ keys.push(name);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+ var dontEnum = dontEnums[i];
+ if (owns(object, dontEnum)) {
+ keys.push(dontEnum);
+ }
+ }
+ }
+ return keys;
+ };
+
+}
+if (!Date.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ };
+}
+
+function toInteger(n) {
+ n = +n;
+ if (n !== n) { // isNaN
+ n = 0;
+ } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ }
+ return n;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
});